/* Hub Play Apps — site styles. Colours are tokens so branding can be swapped (white-label). */
:root {
  --bg: #0f1420;
  --surface: #171e2e;
  --surface-2: #1f2840;
  --text: #eef2f8;
  --muted: #9aa6bd;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #ff7a59;
  --teal: #36c5b4;
  --amber: #f5b841;
  --radius: 18px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6fa;
    --surface: #ffffff;
    --surface-2: #eceff6;
    --text: #141a29;
    --muted: #586379;
    --line: rgba(20, 26, 41, 0.1);
    --accent: #e0573a;
    --teal: #1b9283;
    --amber: #c9890a;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 96px; /* room for the Feedback button and sash */
}
a { color: var(--teal); }
img { display: block; }

.top, main, .foot { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
.top { padding-top: max(16px, env(safe-area-inset-top)); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; }

.intro { padding: 28px 0 8px; }
.intro h1 { font-size: clamp(28px, 7vw, 42px); line-height: 1.12; margin: 0 0 12px; letter-spacing: -0.02em; }
.intro p { color: var(--muted); margin: 0; max-width: 52ch; }

h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 32px 0 14px; font-weight: 600; }

.launcher {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 4px 16px 20px;
  margin-top: 24px;
}
.launcher h2 { margin-top: 18px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 18px 8px;
}
.grid > [role="listitem"] { display: flex; justify-content: center; }
.tile {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 6px 2px;
  background: none; border: 0; color: var(--text); font: inherit;
  text-decoration: none; cursor: pointer; border-radius: 16px;
}
.tile:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.tile-icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--line);
  transition: transform 0.15s ease;
}
.tile:active .tile-icon { transform: scale(0.94); }
.tile-icon > img { width: 64px; height: 64px; }
.tile-icon.mini {
  border-radius: 20px;
  grid-template-columns: 24px 24px; grid-template-rows: 24px 24px;
  gap: 4px; place-content: center;
}
.tile-icon.mini img { width: 24px; height: 24px; border-radius: 50%; }
.tile-label { font-size: 13px; line-height: 1.25; text-align: center; max-width: 92px; }
.chip {
  position: absolute; top: 0; right: 6px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em;
  background: var(--amber); color: #1a1405; border-radius: 6px; padding: 1px 5px;
}

.how ol { margin: 0; padding-left: 22px; color: var(--muted); }
.how li { margin-bottom: 6px; }
.note { color: var(--muted); }

.foot { padding-top: 32px; padding-bottom: 24px; color: var(--muted); font-size: 13px; }
.foot p { margin: 4px 0; }

/* Folder pop-up, like a phone folder */
.folder {
  border: 0; padding: 0; background: transparent; color: var(--text);
  width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
}
.folder::backdrop { background: rgba(5, 8, 14, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.folder-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 28px; padding: 18px 18px 20px;
}
.folder-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.folder-head h2 { margin: 0; text-transform: none; letter-spacing: -0.01em; font-size: 20px; color: var(--text); }
.folder-blurb { color: var(--muted); margin: 6px 0 16px; font-size: 14px; }
.grid-folder { grid-template-columns: repeat(2, 1fr); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer;
}
.btn {
  display: block; margin-top: 18px; text-align: center; text-decoration: none;
  background: var(--accent); color: #fff; font-weight: 600; border-radius: 14px; padding: 12px 16px;
}

.link-btn {
  display: block; margin: 14px auto 0; background: none; border: 0; padding: 6px 10px;
  color: var(--teal); font: 600 14px var(--font); cursor: pointer; text-decoration: underline;
}

/* Simple pages: privacy and terms */
.page { padding: 24px 0; }
.page h1 { font-size: 28px; margin: 8px 0 4px; }
.page h2 { text-transform: none; letter-spacing: 0; font-size: 18px; color: var(--text); margin-top: 28px; }
.page p, .page li { color: var(--muted); }
.draft { background: var(--surface-2); border-left: 3px solid var(--amber); padding: 10px 14px; border-radius: 8px; color: var(--text); }
