/* Passport home + onboarding — Sleek base + Playful energy */
.app { max-width: var(--appmax); margin: 0 auto; padding: 14px 16px calc(96px + env(safe-area-inset-bottom)); }
.screen { display: none; }
.screen.on { display: block; animation: fade var(--dur-slow) var(--ease-out); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- top bar ---- */
.appbar { display: flex; align-items: center; gap: 12px; padding: 6px 2px 14px; }
.crest { width: 40px; height: 40px; border-radius: 12px; border: 2.5px solid var(--navy); flex: none;
  display: grid; place-items: center; background: #fff; box-shadow: var(--shadow-sm); }
.crest::after { content: '✓'; color: var(--amber); font-weight: 800; font-size: 21px; }
.brandname { font-family: var(--font-display); font-weight: 800; font-size: 1rem; letter-spacing: .2px; color: var(--navy); line-height: 1; }
.brandname .i { color: var(--amber-bright); }
.brandsub { font-size: .7rem; color: var(--muted); margin-top: 2px; }
.mute { margin-left: auto; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); display: grid; place-items: center; font-size: 15px; }

/* ---- HUD (playful energy) ---- */
.hud { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: grid; gap: 14px; }
.hudrow { display: flex; align-items: center; gap: 14px; }
.lvl { width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--amber) calc(var(--p, .62) * 360deg), #edf1f6 0); position: relative; }
.lvl span { width: 37px; height: 37px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; color: var(--navy); font-size: 1.05rem; }
.xpwrap { flex: 1; }
.xptop { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-bottom: 6px; }
.xptop b { color: var(--ink); font-weight: 600; }
.xpbar { height: 9px; border-radius: 99px; background: #edf1f6; overflow: hidden; }
.xpfill { height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--amber), var(--amber-deep)); box-shadow: var(--glow-amber);
  transition: width var(--dur-slow) var(--ease-out); }
.streak { flex: none; text-align: center; font-family: var(--font-display); font-weight: 800; color: var(--ink); }
.streak .fire { font-size: 1.25rem; line-height: 1; filter: drop-shadow(0 2px 6px rgba(255, 138, 61, .5)); }
.streak .n { font-size: .95rem; }
.streak .l { font-size: .58rem; color: var(--muted); font-weight: 700; letter-spacing: .04em; }

.chips { display: flex; gap: 10px; }
.chip { flex: 1; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.chip .k { font-size: .64rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.chip .v { font-family: var(--font-display); font-weight: 800; color: var(--navy); font-size: 1.05rem; margin-top: 2px; display: flex; align-items: baseline; gap: 4px; }
.chip .v small { font-size: .68rem; color: var(--muted); font-weight: 600; }

/* ---- section + game tiles ---- */
.sec-h { font-family: var(--font-display); font-weight: 800; color: var(--navy); font-size: .82rem;
  text-transform: uppercase; letter-spacing: .06em; margin: 22px 4px 10px; }
.tile { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px;
  border-left: 5px solid var(--amber); margin-bottom: 12px; transition: transform var(--dur) var(--ease-spring); }
.tile:active { transform: scale(.98); }
.tile .ico { width: 46px; height: 46px; border-radius: 13px; flex: none; display: grid; place-items: center; font-size: 22px;
  background: var(--surface-2); }
.tile.social { border-left-color: var(--spark); }
.tile.social .ico { background: #efeaff; }
.tile .body { flex: 1; }
.tile .t { font-family: var(--font-display); font-weight: 800; color: var(--navy); font-size: 1.02rem; }
.tile .d { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.tile .prog { height: 6px; border-radius: 99px; background: #edf1f6; overflow: hidden; margin-top: 8px; max-width: 180px; }
.tile .prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--amber-deep)); }
.tile .go { color: var(--muted); font-size: 20px; }

/* ---- buttons ---- */
.btn { appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 700; width: 100%;
  min-height: 52px; border-radius: 15px; background: var(--navy); color: #fff; font-size: 1rem;
  box-shadow: var(--shadow-sm); transition: transform .06s var(--ease-spring); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn.amber { background: linear-gradient(150deg, var(--amber), var(--amber-deep)); color: var(--ink);
  box-shadow: 0 8px 20px rgba(255, 138, 61, .4); }
.btn:disabled { opacity: .5; }

/* ---- bottom nav ---- */
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; max-width: var(--appmax); margin: 0 auto;
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); z-index: 10; }
.bottomnav a { display: grid; place-items: center; gap: 3px; font-size: .62rem; color: var(--muted); text-decoration: none; width: 64px; }
.bottomnav a.on { color: var(--navy); font-weight: 700; }
.bottomnav svg { width: 22px; height: 22px; }

/* ---- onboarding ---- */
.hero { text-align: center; padding: 26px 8px 8px; }
.hero .bigcrest { width: 76px; height: 76px; border-radius: 22px; margin: 0 auto 16px; border: 3px solid var(--navy);
  display: grid; place-items: center; background: #fff; box-shadow: var(--shadow); }
.hero .bigcrest::after { content: '✓'; color: var(--amber); font-weight: 800; font-size: 42px; }
.hero h1 { font-family: var(--font-display); font-weight: 800; color: var(--navy); font-size: 1.7rem; margin: 0 0 6px; }
.hero h1 .i { color: var(--amber-bright); }
.hero p { color: var(--muted); font-size: .92rem; margin: 0 0 4px; line-height: 1.45; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-top: 18px; }
label.field { display: block; margin: 14px 0 5px; font-weight: 600; font-size: .88rem; color: var(--ink); }
label.field:first-child { margin-top: 0; }
input, select { width: 100%; min-height: var(--tap); font: inherit; font-size: 16px; padding: 0 13px;
  border: 2px solid var(--surface-2); border-radius: var(--radius-sm); background: #fff; color: var(--ink); }
input:focus, select:focus { outline: 3px solid rgba(245, 166, 35, .35); border-color: var(--amber); }
.avatars { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.avatars button { width: 46px; height: 46px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface-2);
  font-size: 24px; cursor: pointer; transition: transform var(--dur) var(--ease-spring); }
.avatars button[aria-pressed="true"] { border-color: var(--amber); background: #fff; box-shadow: var(--glow-amber); transform: scale(1.06); }
.msg { min-height: 20px; margin-top: 10px; font-weight: 600; font-size: .86rem; }
.msg.bad { color: var(--bad); } .msg.good { color: var(--good); }
.finehint { font-size: .74rem; color: var(--muted); text-align: center; margin-top: 12px; line-height: 1.4; }
