/* The viewport contains only the heading and the app grid. */
:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #f1f4f0;
  background: #101619;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body {
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  background: radial-gradient(ellipse at 50% 0%, #1b2927 0, transparent 65%);
}
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 3px solid #d5f1bc; outline-offset: 5px; }
.launcher {
  width: min(100%, 1000px);
  height: min(100%, 390px);
  min-height: 0;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr);
  gap: 30px;
}
.heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { display: block; }
.brand > span { font-size: 15px; font-weight: 650; line-height: 1.3; letter-spacing: .3px; }
.brand-detail { display: block; font-size: 11px; font-weight: 400; color: #8f9d9c; margin-top: 2px; letter-spacing: 0; }
h1 { font-size: 13px; font-weight: 400; color: #8f9d9c; margin: 0; }
.apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
}
.app {
  --accent: #c1eca0;
  --tint: #c1eca00d;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  min-width: 0;
  min-height: 0;
  padding: 24px;
  background: linear-gradient(145deg, var(--tint), transparent 80%), #192124;
  border: 1px solid #2b3639;
  border-radius: 23px;
  transition: background .16s, border-color .16s, transform .16s;
}
.app:hover { border-color: var(--accent); background-color: #202b2d; transform: translateY(-3px); }
.app:active { transform: scale(.98); }
.app.blue { --accent: #9bc5ef; --tint: #9bc5ef0d; }
.app.purple { --accent: #c4afe8; --tint: #c4afe80d; }
.app.terracotta { --accent: #edb08e; --tint: #edb08e0d; }
.app.honey { --accent: #f2c36f; --tint: #f2c36f12; }
.app-icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 22px; background: var(--tint); color: var(--accent); }
.app-icon svg { display: block; width: 42px; height: 42px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.app-icon img { display: block; width: 90%; height: 90%; object-fit: contain; }
.app-name { font-size: clamp(19px, 2.4vw, 25px); line-height: 1.2; font-weight: 550; letter-spacing: -.5px; text-align: center; overflow-wrap: anywhere; }
.app-arrow { position: absolute; top: 22px; right: 24px; width: 22px; height: 22px; color: #778681; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
@media (max-width: 600px) and (orientation: portrait) {
  body { padding: max(22px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left)); }
  .launcher { height: min(100%, 740px); gap: 24px; }
  .apps { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .app { flex-direction: row; justify-content: flex-start; gap: 20px; padding: 24px; border-radius: 20px; }
  .app-icon { width: 58px; height: 58px; border-radius: 17px; flex-shrink: 0; }
  .app-icon svg { width: 33px; height: 33px; }
  .app-name { font-size: 23px; text-align: left; padding-right: 18px; }
  .app-arrow { top: 50%; right: 22px; transform: translateY(-50%); }
}
@media (max-height: 580px) and (orientation: portrait) {
  body { padding: 16px; }
  .launcher { grid-template-rows: 40px minmax(0, 1fr); gap: 16px; }
  .apps { gap: 10px; }
  .app { padding: 16px; gap: 14px; border-radius: 16px; }
  .app-icon { width: 44px; height: 44px; border-radius: 13px; }
  .app-icon svg { width: 28px; height: 28px; }
  .app-name { font-size: 20px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  body { padding: 14px 24px; }
  .launcher { grid-template-rows: 38px minmax(0, 1fr); gap: 14px; }
  .brand img { width: 34px; height: 34px; }
  .app { gap: 13px; padding: 16px; border-radius: 17px; }
  .app-icon { width: 48px; height: 48px; border-radius: 14px; }
  .app-icon svg { width: 30px; height: 30px; }
  .app-name { font-size: 19px; }
  .app-arrow { top: 14px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) { .app { transition: none; } .app:hover { transform: none; } }

/* Six apps: clear rows on desktop, reachable links on short phone viewports. */
html, body { height: auto; min-height: 100%; overflow: auto; }
body { height: auto; min-height: 100vh; min-height: 100dvh; }
.launcher { height: auto; }
.apps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.app { min-height: 190px; }
.app.coral { --accent: #ffb5a7; --tint: #ffb5a712; }
@media (max-width: 600px) and (orientation: portrait) {
  .launcher { height: auto; }
  .apps { grid-template-columns: minmax(0, 1fr); }
  .app { min-height: 94px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  .launcher { height: auto; }
  .app { min-height: 120px; }
}
