:root {
  --gold: #f0b429; --gold-2: #ffd56a; --gold-3: #c48412;
  --sky: #7ec8f2; --sky-2: #bfe7ff; --sky-deep: #2f8fd0;
  --cream: #fff7ea; --ink: #2a1e14; --muted: #5a4a3a;
  --card: #ffffff; --line: rgba(42, 30, 20, 0.12);
  --coral: #ff6b6b; --mint: #2dbf7a; --lavender: #8b6cff; --peach: #ffb38a;
  --radius: 20px; --gutter: 16px; --touch: 52px;
  --font-head: "Alfa Slab One","Rockwell","Roboto Slab","Georgia",serif;
  --font-body: "Figtree",system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --font-mono: "DM Mono",ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--font-body); font-size: 18px; line-height: 1.45;
  background: linear-gradient(180deg, var(--sky-2) 0%, #e9f6ff 35%, var(--cream) 80%) fixed;
  overflow-x: hidden; -webkit-tap-highlight-color: transparent;
}
.deco { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.deco svg { position: absolute; opacity: .55; }
.wrap { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 24px var(--gutter) 40px; }
:focus-visible { outline: 4px solid var(--sky-deep); outline-offset: 3px; border-radius: 12px; }

.page-head { text-align: center; padding: 12px 0 28px; }
.lia-hero {
  width: min(200px, 48vw); height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%;
  display: block; margin: 0 auto 16px; border-radius: 28px; background: #e8d4f8;
  border: 4px solid #fff; box-shadow: 0 10px 28px rgba(42, 30, 20, .16);
}
.avatar-amelia img { object-position: 50% 12%; }

.eyebrow { font-family: var(--font-mono); font-weight: 500; text-transform: uppercase; letter-spacing: .16em; font-size: 14px; color: var(--sky-deep); margin: 0 0 8px; }
.page-head h1 { font-family: var(--font-head); font-weight: 400; margin: 0; font-size: clamp(40px, 8vw, 72px); line-height: 1.02; color: var(--ink); text-shadow: 3px 3px 0 var(--gold-2); }
.lede { max-width: 34em; margin: 14px auto 0; color: var(--muted); font-size: 20px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--touch); min-width: 48px; padding: 10px 22px;
  font: 800 18px var(--font-body); color: var(--ink); text-decoration: none; cursor: pointer; border-radius: 16px; border: 2px solid var(--gold-3);
  background: linear-gradient(180deg, var(--gold-2), var(--gold)); box-shadow: 0 5px 0 var(--gold-3); transition: transform .08s, box-shadow .08s;
  touch-action: manipulation;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--gold-3); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.alt { background: #fff; border-color: var(--sky-deep); box-shadow: 0 5px 0 var(--sky-deep); }
.btn.alt:active { box-shadow: 0 1px 0 var(--sky-deep); }
.btn.small { min-height: 48px; padding: 6px 14px; font-size: 16px; }

.back {
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; min-width: 52px; padding: 8px 18px 8px 12px; text-decoration: none;
  font: 800 18px var(--font-body); color: var(--ink); background: #fff; border: 2px solid var(--sky-deep); border-radius: 16px; box-shadow: 0 4px 0 var(--sky-deep);
}
.back:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sky-deep); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.game-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--card); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(42, 30, 20, .12); border-top: 6px solid var(--gold); overflow: hidden; transition: transform .15s, box-shadow .15s;
}
.game-card:nth-child(2) { border-top-color: var(--coral); }
.game-card:nth-child(3) { border-top-color: var(--mint); }
.game-card:hover, .game-card:focus-visible { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(42, 30, 20, .18); }
.game-card .art { height: 170px; display: flex; align-items: center; justify-content: center; background: var(--sky-2); }
.game-card:nth-child(2) .art { background: #ffe3dc; }
.game-card:nth-child(3) .art { background: #d8f5e6; }
.game-card .art svg { height: 100%; width: auto; max-width: 100%; }
.game-card .body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.game-card h2 { font-family: var(--font-head); font-weight: 400; margin: 0; font-size: 28px; }
.meta { font-family: var(--font-mono); font-weight: 500; text-transform: uppercase; letter-spacing: .1em; font-size: 13px; color: var(--muted); }
.game-card p { margin: 0; color: var(--muted); }
.cta { margin-top: auto; padding-top: 10px; font-weight: 800; font-size: 18px; color: var(--sky-deep); min-height: 48px; display: flex; align-items: center; }
.soon-badge { align-self: flex-start; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; background: var(--lavender); color: #fff; border-radius: 99px; padding: 3px 10px; }

.panel { background: var(--card); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(42, 30, 20, .1); padding: 20px; margin-top: 28px; border-top: 6px solid var(--lavender); }
.panel h2 { font-family: var(--font-head); font-weight: 400; margin: 0 0 4px; font-size: 28px; }
.panel .sub { margin: 0 0 14px; color: var(--muted); }
.players { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 18px; padding: 0; list-style: none; }
.player { display: flex; align-items: center; gap: 12px; background: var(--cream); border: 2px solid var(--line); border-radius: 18px; padding: 8px 14px 8px 8px; min-height: 64px; }
.player .pname { font-weight: 800; font-size: 20px; }
.player .tag { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); display: block; }
.player .rm { margin-left: 6px; }
.avatar { flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font-head); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-amelia { background: conic-gradient(from 20deg, var(--coral), var(--gold), var(--mint), var(--sky-deep), var(--lavender), var(--coral)); }
.avatar-amelia > span { background: rgba(255,255,255,.2); width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.add-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.add-form input[type=text] { min-height: var(--touch); font: 700 18px var(--font-body); padding: 8px 14px; border-radius: 14px; border: 2px solid var(--line); background: #fff; color: var(--ink); width: min(100%, 220px); }
.swatches { display: flex; gap: 6px; }
.swatches label { position: relative; display: block; width: 48px; height: 48px; cursor: pointer; }
.swatches input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatches span { display: block; width: 100%; height: 100%; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--line); }
.swatches input:checked + span { box-shadow: 0 0 0 4px var(--ink); }
.swatches input:focus-visible + span { outline: 4px solid var(--sky-deep); outline-offset: 2px; }
.note { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.footer { text-align: center; color: var(--muted); font-size: 15px; margin-top: 32px; }

.soon-page { text-align: center; padding-top: 12px; }
.soon-page .big { margin: 16px auto; max-width: 360px; }
.soon-page h1 { font-family: var(--font-head); font-weight: 400; font-size: clamp(34px, 7vw, 56px); margin: 8px 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.panel-head .sub { margin: 0 0 14px; }
.panel-tools { display: flex; gap: 8px; flex-wrap: wrap; }
#add-avatars.avatar-pick, .hub-avatars { display: flex; flex-wrap: wrap; gap: 8px; }
#add-avatars button, .hub-avatars button {
  width: 52px; height: 52px; padding: 0; border: 3px solid transparent; border-radius: 50%;
  background: none; cursor: pointer;
}
#add-avatars button[aria-checked="true"], .hub-avatars button[aria-checked="true"] { border-color: var(--ink); }
.add-form .pin-row { margin-left: 0; }
.add-form input.pin-in {
  min-height: var(--touch); width: 6.8em; letter-spacing: .28em; text-align: center;
  font: 700 18px var(--font-mono); border-radius: 14px; border: 2px solid var(--line);
  background: #fff; color: var(--ink);
}
