/* Layout: a single column of app tiles under a greeting; tiles are full-width rows with live status chips. */
:root {
  --bg: #08070f;
  --fg: #ffffff;
  --dim: rgba(255, 255, 255, 0.58);
  --card: rgba(255, 255, 255, 0.06);
  --stroke: rgba(255, 255, 255, 0.11);
  --late: #ff4d5a;
  --fire: #ff8a00;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--font); -webkit-font-smoothing: antialiased; }
.glow { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(90% 55% at 10% 0%, rgba(0, 200, 255, 0.28), transparent 60%),
    radial-gradient(80% 55% at 100% 10%, rgba(177, 77, 255, 0.32), transparent 60%),
    radial-gradient(90% 60% at 50% 110%, rgba(255, 45, 135, 0.22), transparent 60%);
}
.wrap { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 28px) 16px calc(env(safe-area-inset-bottom, 0px) + 40px); display: flex; flex-direction: column; gap: 26px; }

.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
h1 { margin: 0; font-size: clamp(32px, 8vw, 46px); font-weight: 900; letter-spacing: -0.02em; line-height: 1.05; text-wrap: balance;
  background: linear-gradient(110deg, #fff 20%, #c9b8ff 60%, #ff9fd0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.acct { width: 44px; height: 44px; border-radius: 50%; padding: 0; border: 2px solid rgba(255,255,255,.25); background: linear-gradient(135deg, #00c8ff, #b14dff); color: #fff; font: 900 18px var(--font); overflow: hidden; cursor: pointer; display: grid; place-items: center; transition: border-color .2s, transform .2s; }
.acct img { width: 100%; height: 100%; object-fit: cover; }
.acct.confirm { border-color: var(--late); transform: scale(1.08); }
.acct.confirm::after { content: "Tap again to sign out"; position: absolute; right: 16px; top: calc(env(safe-area-inset-top, 0px) + 80px); font-size: 12px; font-weight: 800; color: var(--late); }

.signin { padding: 18px; border-radius: 22px; background: var(--card); border: 1px solid var(--stroke); display: grid; gap: 12px; }
.signin p { margin: 0; font-size: 15px; font-weight: 600; color: rgba(255,255,255,.85); }
.signin .fine { font-size: 13px; color: #ff7b85; }
.google { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; border: 0; border-radius: 99px; background: #fff; color: #1f1f1f; font: 800 16px var(--font); cursor: pointer; }
.google svg { width: 20px; height: 20px; }

.section-title { margin: 0 0 12px; font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.grid { display: grid; gap: 12px; }

.tile { position: relative; display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 26px; text-decoration: none; color: inherit; overflow: hidden;
  background: linear-gradient(120deg, color-mix(in srgb, var(--a) 22%, transparent), color-mix(in srgb, var(--b) 14%, transparent) 60%, var(--card));
  border: 1px solid color-mix(in srgb, var(--a) 40%, transparent);
  transition: transform 0.25s cubic-bezier(.34, 1.5, .64, 1), box-shadow 0.3s;
}
a.tile:hover { transform: translateY(-2px); box-shadow: 0 14px 40px color-mix(in srgb, var(--a) 35%, transparent); }
a.tile:active { transform: scale(0.98); }
a.tile:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.tile-icon { flex: none; width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.tile-icon.emoji { display: grid; place-items: center; font-size: 36px; background: linear-gradient(135deg, var(--a), var(--b)); }
.ext { justify-self: start; margin-top: 2px; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.12); color: var(--dim); }
.tile-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.tile h3 { margin: 0; font-size: 22px; font-weight: 900; }
.tile p { margin: 0; font-size: 14px; font-weight: 600; color: var(--dim); }
.open { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 9px 12px 9px 16px; border-radius: 99px; font-size: 14px; font-weight: 900; color: #08070f; background: linear-gradient(135deg, var(--a), var(--b)); }
.open svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.stats { display: grid; gap: 6px; margin-top: 8px; }
.stats:empty { display: none; }
.stat-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.stat-row b { font-size: 12px; font-weight: 900; min-width: 62px; }
.chip { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,.12); white-space: nowrap; }
.chip.late { background: var(--late); }
.chip.fire { background: color-mix(in srgb, var(--fire) 30%, transparent); color: #ffd3a1; }
.chip.dim { color: var(--dim); background: rgba(255,255,255,.07); white-space: normal; }

.ghost { background: transparent; border: 1.5px dashed rgba(255,255,255,.18); opacity: .7; }
.ghost-plus { flex: none; width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font-size: 30px; font-weight: 300; color: var(--dim); border: 1.5px dashed rgba(255,255,255,.2); }

@media (max-width: 460px) {
  .open { padding: 10px; }
  .open-label { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } }
