/* ============================================================
   BuildItPlayIt — design system
   Promoted from mockups/index.html. Keep the two in sync.
   ============================================================ */

:root{
  --bg:#0d0b1a; --bg-2:#141130; --surface:#1a1636; --surface-2:#221d45;
  --border:#2e2860; --border-soft:#241f4d;
  --text:#f2efff; --dim:#a49ecb; --faint:#6f6796;
  --violet:#7c5cff; --pink:#ff5c9d; --amber:#ffb340; --mint:#3ddc97; --sky:#4cc9f0;
  --danger:#ff5c5c; --warn:#ffb340; --ok:#3ddc97;
  --grad:linear-gradient(135deg,var(--violet),var(--pink) 55%,var(--amber));
  --r:18px; --r-sm:12px; --r-lg:28px;
  --sh:0 18px 50px -12px rgba(0,0,0,.7);
  --font:'Segoe UI',system-ui,-apple-system,'Helvetica Neue',sans-serif;
  --mono:ui-monospace,SFMono-Regular,Menlo,monospace;
}
[data-theme="light"]{
  --bg:#f6f4ff; --bg-2:#efeaff; --surface:#ffffff; --surface-2:#f4f1ff;
  --border:#ded5ff; --border-soft:#ebe5ff;
  --text:#1a1240; --dim:#635b8a; --faint:#948cba;
  --sh:0 18px 40px -16px rgba(80,60,180,.3);
}

*{box-sizing:border-box;margin:0;padding:0}
/* Any class that sets `display` silently outranks the `hidden` attribute, so
   `el.hidden = true` does nothing and the close button appears broken. Bitten
   twice — once by the Problems panel, once by the picture picker. */
[hidden]{display:none !important}
html{scroll-behavior:smooth}
body{background:var(--bg);color:var(--text);font-family:var(--font);-webkit-font-smoothing:antialiased;
  min-height:100vh}
button,input,textarea,select{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none}
a{color:inherit}
img{max-width:100%;display:block}

/**
 * Layout width.
 *
 * A global cap wastes a large monitor: a grid of games should show MORE games
 * when there is room, not the same six with empty gutters. So the default wrap
 * is generous and scales with the viewport.
 *
 * The exception is running prose. Past ~75 characters a line, the eye starts
 * losing its place on the return sweep, so text pages opt into `.wrap.reading`.
 * That is a constraint on the text, not on the page.
 */
.wrap{width:100%;max-width:1760px;margin:0 auto;padding:0 clamp(18px,3vw,48px)}
/* Standalone utilities, not `.wrap.reading` — they are also used on .empty and
   other blocks that are not wraps. */
.reading{max-width:74ch;margin-left:auto;margin-right:auto}
.narrow{max-width:520px;margin-left:auto;margin-right:auto}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---- header ---- */
.topbar{display:flex;align-items:center;gap:14px;padding:18px 0;border-bottom:1px solid var(--border-soft)}
/* ---- logo ---- */
.logo{display:flex;align-items:center;gap:11px;text-decoration:none}
/* The mark frames Vibi's face out of the full figure in CSS — the source PNG is
   never cropped or re-encoded, so it cannot be degraded by processing. */
.logo .mark{width:38px;height:38px;flex:none;display:block;
  object-fit:cover;object-position:50% 12%;
  filter:drop-shadow(0 3px 8px rgba(255,92,157,.35))}
.logo .stack{display:flex;flex-direction:column;gap:2px}
/* The logo's tagline, which unfortunately shares a class name with the badge
   component further down (.tag.pass, .tag.block and friends). That rule sets
   padding:3px 9px, and 9px of it was pushing the tagline right so it no longer
   lined up with the B of the wordmark above it. Reset what belongs to the badge;
   the two are unrelated things that happen to be called the same. */
.logo .tag{padding:0;border-radius:0;display:block;
  font-size:10.5px;color:var(--faint);font-weight:500;letter-spacing:.04em}

/**
 * Wordmark.
 *
 * Each syllable carries its own vertical gradient plus a solid extruded face
 * below it, so the letters read as objects rather than flat text. The extrude is
 * expressed in em, not pixels, so it scales with the type instead of turning into
 * a smudge at small sizes.
 */
.wm{font-weight:800;letter-spacing:-.035em;line-height:1;white-space:nowrap;display:inline-flex;
  font-size:21px}
.wm .s{position:relative;display:inline-block;-webkit-background-clip:text;background-clip:text;
  color:transparent}
.wm .s::before{content:attr(data-t);position:absolute;left:0;top:0;z-index:-1;
  -webkit-text-fill-color:initial;background:none}
.wm .s.b {background-image:linear-gradient(180deg,#8df7cf,#3ddc97 45%,#16a877)}
.wm .s.i1{background-image:linear-gradient(180deg,#ffe0a6,#ffb340 45%,#e0870c)}
.wm .s.p {background-image:linear-gradient(180deg,#ffb3d4,#ff5c9d 45%,#d61f68)}
.wm .s.i2{background-image:linear-gradient(180deg,#c4b2ff,#7c5cff 45%,#4b2fd0)}
.wm .s.b::before {color:#0d7a56;text-shadow:0 .02em 0 #0d7a56,0 .04em 0 #0d7a56,0 .06em 0 #0d7a56,0 .075em 0 rgba(0,0,0,.4)}
.wm .s.i1::before{color:#a35f05;text-shadow:0 .02em 0 #a35f05,0 .04em 0 #a35f05,0 .06em 0 #a35f05,0 .075em 0 rgba(0,0,0,.4)}
.wm .s.p::before {color:#9c1149;text-shadow:0 .02em 0 #9c1149,0 .04em 0 #9c1149,0 .06em 0 #9c1149,0 .075em 0 rgba(0,0,0,.4)}
.wm .s.i2::before{color:#331d99;text-shadow:0 .02em 0 #331d99,0 .04em 0 #331d99,0 .06em 0 #331d99,0 .075em 0 rgba(0,0,0,.4)}
.wm.xl{font-size:clamp(34px,6vw,60px)}
.topbar nav{margin-left:auto;display:flex;align-items:center;gap:8px}
.topbar nav a{padding:8px 13px;border-radius:9px;font-size:13.5px;color:var(--dim);text-decoration:none}
.topbar nav a:hover{background:var(--surface);color:var(--text)}

/* ---- buttons ---- */
.btn{padding:11px 20px;border-radius:11px;font-weight:650;font-size:14px;background:var(--surface-2);
  border:1px solid var(--border);color:var(--text);display:inline-flex;align-items:center;gap:8px;
  text-decoration:none}
.btn:hover{border-color:var(--violet)}
.btn.primary{background:var(--grad);border:0;color:#fff;box-shadow:0 8px 22px -8px var(--violet)}
.btn.ghost{background:none;border:1px solid var(--border)}
.btn.sm{padding:7px 13px;font-size:12.5px;border-radius:9px}
.btn.block{width:100%;justify-content:center}
.btn[disabled],.btn.off{opacity:.45;pointer-events:none}

.iconbtn{width:34px;height:34px;border-radius:9px;background:var(--surface-2);border:1px solid var(--border);
  display:grid;place-items:center;font-size:14px;color:var(--dim)}
.iconbtn:hover{color:var(--text);border-color:var(--violet)}

/* ---- forms ---- */
.field{margin-bottom:14px}
.field label{display:block;font-size:12.5px;color:var(--dim);margin-bottom:7px;font-weight:600}
.input{width:100%;padding:12px 14px;border-radius:11px;background:var(--bg-2);border:1px solid var(--border);
  outline:0;font-size:14.5px}
.input:focus{border-color:var(--violet)}
.input.bad{border-color:var(--danger)}
.input.good{border-color:var(--ok)}
.fine{font-size:11.5px;color:var(--faint);line-height:1.6;margin-top:16px;text-align:center}

/* ---- cards / grid ---- */
.section-h{display:flex;align-items:end;gap:14px;margin:64px 0 20px}
.section-h h3{font-size:23px;letter-spacing:-.02em;font-weight:750}
.section-h p{font-size:13.5px;color:var(--faint);margin-left:auto}
/* auto-fill, so a wider window genuinely shows more games rather than bigger ones */
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(216px,1fr));gap:16px}
@media(min-width:1500px){.grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:20px}}
.card{background:var(--surface);border:1px solid var(--border-soft);border-radius:var(--r);overflow:hidden;
  transition:transform .15s,border-color .15s;text-decoration:none;display:block}
.card:hover{transform:translateY(-3px);border-color:var(--violet)}
.thumb{aspect-ratio:16/10;position:relative;display:grid;place-items:center;font-size:38px;
  background:linear-gradient(140deg,#5b3fd4,#c13ba0)}
.card-b{padding:12px 14px 14px}
.card-b h4{font-size:14.5px;font-weight:650;margin-bottom:3px}
.card-b .meta{font-size:12px;color:var(--faint);display:flex;gap:10px}
.slot{border:1.5px dashed var(--border);border-radius:var(--r);display:grid;place-items:center;
  aspect-ratio:16/13;color:var(--faint);font-size:13px;text-align:center;padding:16px;line-height:1.6}

/* ---- Vibi + moderation messages ---- */
.mod{border-radius:var(--r-sm);padding:14px 16px;font-size:13px;line-height:1.6;margin-top:12px;
  display:flex;gap:11px;align-items:flex-start}
.mod .ico{font-size:16px;flex:none;line-height:1.3}
.mod.block{background:rgba(255,92,92,.1);border:1px solid rgba(255,92,92,.35)}
.mod.block b{color:#ff8f8f}
.mod.pass{background:rgba(61,220,151,.1);border:1px solid rgba(61,220,151,.32)}
.mod.pass b{color:var(--ok)}
.mod.check{background:var(--surface-2);border:1px solid var(--border);color:var(--dim)}
.mod a{color:var(--sky);text-decoration:underline;text-underline-offset:2px}
.spin{width:13px;height:13px;border-radius:50%;border:2px solid var(--border);border-top-color:var(--violet);
  animation:sp .7s linear infinite;flex:none;margin-top:2px}
@keyframes sp{to{transform:rotate(360deg)}}

/* ---- game surface ---- */
.gamebox{width:100%;border-radius:16px;overflow:hidden;position:relative;border:1px solid var(--border);
  box-shadow:var(--sh);background:var(--bg-2)}
.gamebox iframe{width:100%;height:100%;border:0;display:block;background:#000}
.sandbadge{position:absolute;left:11px;bottom:11px;font-size:10.5px;padding:4px 9px;border-radius:6px;
  background:rgba(0,0,0,.55);color:#c9c2ea;font-family:var(--mono)}

.av{width:40px;height:40px;border-radius:12px;background:var(--grad);display:grid;place-items:center;
  font-size:17px;flex:none}
.pill{padding:4px 10px;border-radius:99px;font-size:11.5px;font-weight:650;border:1px solid var(--border);
  color:var(--dim)}
.pill.quota{border-color:rgba(255,179,64,.4);color:var(--amber);background:rgba(255,179,64,.09)}

.statrow{display:flex;gap:22px;flex-wrap:wrap;padding:14px 0;border-top:1px solid var(--border-soft);
  border-bottom:1px solid var(--border-soft);font-size:13px;color:var(--dim)}
.statrow b{color:var(--text);font-weight:700}

/* ---- public game page ---- */
/* Game left, feedback right. The comments column has a natural comfortable width,
   so extra screen goes to the game rather than stretching lines of text. */
.gp{display:grid;grid-template-columns:minmax(0,1fr) clamp(300px,24vw,420px);
  gap:clamp(20px,2.5vw,40px);margin-top:26px;align-items:start}
.gp-main .gamebox{aspect-ratio:16/10;max-height:calc(100vh - 250px)}
@media(max-width:1080px){.gp{grid-template-columns:1fr}}

/* ---- profile ---- */
.phead{display:flex;gap:20px;align-items:center;padding:34px 0 26px;flex-wrap:wrap}
.phead .av{width:78px;height:78px;border-radius:22px;font-size:34px}
.phead h2{font-size:27px;letter-spacing:-.025em;font-weight:800}
.phead .handle{font-size:14px;color:var(--faint);font-family:var(--mono);margin-top:3px}
.phead .bio{font-size:13.5px;color:var(--dim);margin-top:9px;max-width:440px;line-height:1.6}
.phead .acts{margin-left:auto}

/* ---- editor ---- */
/**
 * The editor owns the whole viewport.
 *
 * Pinned rather than merely `height:100vh`: in normal flow anything a few pixels
 * too tall pushes the chat box and the right-hand pane off the bottom and side of
 * the screen, which is exactly what happened. Fixed to the viewport, nothing can
 * escape it, and 100dvh keeps it correct on phones where the browser chrome
 * grows and shrinks.
 *
 * minmax(0,1fr) on the middle column matters too: a plain 1fr refuses to shrink
 * below its content, so a wide game would push the assets pane out of frame.
 */
.editor{position:fixed;inset:0;display:grid;
  /* The art panel earns more room on a big screen — it is where the pieces of
     the game are looked at, and 262px was a column sized for a laptop. */
  grid-template-columns:clamp(300px,20vw,380px) minmax(0,1fr) clamp(262px,21vw,440px);
  height:100dvh;max-height:100dvh;overflow:hidden}
/* Every grid child must be allowed to shrink, or its content sets the floor. */
.editor > *{min-width:0;min-height:0}
.pane.assets{border-right:0;border-left:1px solid var(--border-soft)}
.tabs{display:flex;gap:4px;padding:10px 12px;border-bottom:1px solid var(--border-soft)}
.tabs button{flex:1;padding:7px 0;border-radius:8px;font-size:12px;font-weight:650;color:var(--faint)}
.tabs button.on{background:var(--surface-2);color:var(--text)}
.assetbody{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:14px}
.assetgrid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.asset{aspect-ratio:1;border-radius:11px;border:1px solid var(--border-soft);background:var(--surface-2);
  display:grid;place-items:center;font-size:26px;position:relative;overflow:hidden;cursor:pointer}
.asset:hover{border-color:var(--violet)}
.asset img{width:100%;height:100%;object-fit:contain;padding:6px}
.asset .del{position:absolute;top:3px;right:3px;width:20px;height:20px;border-radius:6px;
  background:rgba(0,0,0,.6);color:#fff;font-size:11px;display:none;place-items:center}
.asset:hover .del{display:grid}
.asset .badge{position:absolute;left:3px;bottom:3px;font-size:9px;padding:2px 5px;border-radius:4px;
  background:rgba(255,179,64,.9);color:#2a1a00;font-weight:700}
.drop{border:1.5px dashed var(--border);border-radius:12px;padding:20px 12px;text-align:center;font-size:12.5px;
  color:var(--faint);line-height:1.6;cursor:pointer}
.drop:hover,.drop.over{border-color:var(--violet);color:var(--dim)}
.drop b{color:var(--dim);display:block;font-size:13px;margin-bottom:3px}
.quota{margin-top:14px;font-size:11.5px;color:var(--faint);line-height:1.6}
.bar{height:5px;border-radius:3px;background:var(--border);margin:7px 0;overflow:hidden}
.bar i{display:block;height:100%;background:var(--grad);border-radius:3px}
.lookgrid{display:flex;flex-direction:column;gap:7px}
.look{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:11px;
  background:var(--surface-2);border:1px solid var(--border-soft);width:100%;text-align:left}
.look:hover{border-color:var(--violet)}
.look .sw{display:flex;border-radius:6px;overflow:hidden;flex:none;box-shadow:0 0 0 1px rgba(0,0,0,.25)}
.look .sw i{width:11px;height:22px;display:block}
.look .nm{font-size:12.5px;font-weight:600;color:var(--dim)}
.look:hover .nm{color:var(--text)}
/* Off by default; the drawer only exists on narrow screens. */
.drawerbtn,.drawerscrim{display:none}

/*
 * Narrow screens: the art panel becomes a drawer.
 *
 * It used to be display:none, which meant the pieces, the uploads and the game's
 * settings simply did not exist below 1180px — unreachable rather than tucked
 * away. Now it slides over the top and can always be opened.
 */
@media(max-width:1180px){
  .editor{grid-template-columns:clamp(280px,32vw,340px) minmax(0,1fr)}
  .pane.assets{position:fixed;top:0;right:0;bottom:0;z-index:55;
    width:min(360px,88vw);border-left:1px solid var(--border);
    box-shadow:-24px 0 60px -20px rgba(0,0,0,.75);
    transform:translateX(101%);transition:transform .22s cubic-bezier(.4,0,.2,1);
    display:flex}
  .pane.assets.open{transform:translateX(0)}
  .drawerbtn{display:inline-flex}
  .drawerscrim{display:block;position:fixed;inset:0;z-index:54;background:rgba(6,4,16,.55);
    opacity:0;pointer-events:none;transition:opacity .22s}
  .drawerscrim.on{opacity:1;pointer-events:auto}
}
/* On a phone the columns have to become rows — a 300px sidebar next to the stage
   left the game a 51px sliver. Game on top, chat under it, both scrollable. */
@media(max-width:760px){
  .editor{grid-template-columns:1fr;grid-template-rows:minmax(0,46dvh) minmax(0,1fr)}
  .pane.assets{order:0}                     /* fixed; the grid order is irrelevant */
  .stagewrap{order:1;border-bottom:1px solid var(--border-soft)}
  .pane{order:2;border-right:0}
  .stage-h{padding:8px 12px;gap:7px;flex-wrap:wrap}
  .stage-h .pill.quota{display:none}
  .gname{font-size:14px;flex:1 1 120px}
  .gctl{padding:0 12px 10px;gap:6px}
  .gctl .btn{font-size:11.5px;padding:6px 9px}
  .pane-h{padding:10px 12px}
  .chatlog{padding:12px}
  /* At this size the badge sits on top of the game's own control hint. */
  .sandbadge{display:none}
}
.pane{border-right:1px solid var(--border-soft);display:flex;flex-direction:column;
  min-width:0;min-height:0;overflow:hidden;background:var(--bg)}
.pane:last-child{border-right:0}
.pane-h{padding:14px 16px;border-bottom:1px solid var(--border-soft);display:flex;align-items:center;gap:9px;
  font-size:12.5px;font-weight:700;text-transform:uppercase;letter-spacing:.09em;color:var(--faint)}
.pane-h a{color:var(--faint);text-decoration:none}
.pane-h a:hover{color:var(--text)}
/* flex:1 with min-height:0 is what keeps the composer pinned at the bottom —
   without it the log grows and pushes the input off the screen. */
.chatlog{flex:1 1 auto;min-height:0;overflow-y:auto;padding:16px;display:flex;
  flex-direction:column;gap:14px}
.msg{font-size:13.5px;line-height:1.62;max-width:100%}
.msg.you{background:var(--surface);border:1px solid var(--border-soft);border-radius:14px 14px 4px 14px;
  padding:11px 14px;align-self:flex-end;max-width:88%;word-wrap:break-word}
.msg.ai{color:var(--dim);display:flex;gap:10px}
.msg.ai .avv{width:26px;height:26px;flex:none;display:block;
  object-fit:cover;object-position:50% 12%}
.msg.ai .body{min-width:0;flex:1}
.built{margin-top:8px;background:var(--surface);border:1px solid var(--border-soft);border-radius:10px;
  padding:9px 12px;font-size:12.5px;color:var(--text);display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.built b{font-weight:700}
.chat-in{flex:0 0 auto;padding:14px;border-top:1px solid var(--border-soft);background:var(--bg)}
.chat-in .box{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:11px 13px}
.chat-in .box:focus-within{border-color:var(--violet)}
.chat-in textarea{width:100%;background:none;border:0;outline:0;resize:none;font-size:13.5px;min-height:44px;
  font-family:inherit;line-height:1.5}
.chat-in .r{display:flex;align-items:center;gap:8px;margin-top:8px}
.chat-in .r .btn{margin-left:auto}
.chat-in .hint{font-size:11px;color:var(--faint)}

.stagewrap{display:flex;flex-direction:column;background:var(--bg-2);min-width:0;min-height:0;overflow:hidden}
.stage-h{flex:0 0 auto;padding:12px 18px;display:flex;align-items:center;gap:12px;
  border-bottom:1px solid var(--border-soft);flex-wrap:wrap}
.gname{font-weight:700;font-size:15px}
.stage-h .sp{margin-left:auto;display:flex;gap:8px;align-items:center}
.canvasarea{flex:1;display:grid;place-items:center;padding:clamp(12px,1.6vw,26px);
  min-height:0;overflow:hidden;container-type:size}
/**
 * The game takes whatever room is going, bounded by the pane rather than a pixel
 * cap. Sized in container units so it fits BOTH dimensions: 4/3 means the width
 * can be at most 133.33% of the available height, whichever limit bites first.
 */
.canvasarea .gamebox{width:min(100cqw, calc(100cqh * 4 / 3));height:auto;
  aspect-ratio:4/3;max-width:100%;max-height:100%}
.gctl{flex:0 0 auto;display:flex;gap:8px;justify-content:center;padding:0 20px 16px;flex-wrap:wrap}
.emptystage{text-align:center;color:var(--faint);font-size:14px;line-height:1.7;max-width:320px}
.emptystage .big{font-size:52px;margin-bottom:14px}

/* ---- comments ---- */
.cmt{display:flex;gap:10px;padding:13px 0;border-top:1px solid var(--border-soft);
  font-size:13.5px;line-height:1.6;word-wrap:break-word}
.cmt .cname{font-size:12.5px;color:var(--dim);font-weight:650;margin-bottom:2px}
.cmt .cname span{color:var(--faint);font-weight:400;margin-left:6px}
.input.bad{border-color:var(--danger)}
.btn.on{border-color:var(--pink)}

/* ---- admin ---- */
.admingrid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:26px 0}
.kpi{background:var(--surface);border:1px solid var(--border-soft);border-radius:var(--r);padding:17px 19px}
.kpi .l{font-size:11.5px;text-transform:uppercase;letter-spacing:.09em;color:var(--faint);margin-bottom:7px}
.kpi .v{font-size:27px;font-weight:800;letter-spacing:-.02em}
.kpi .v.d{color:var(--danger)} .kpi .v.w{color:var(--warn)} .kpi .v.o{color:var(--ok)}
table{width:100%;border-collapse:collapse;background:var(--surface);border:1px solid var(--border-soft);
  border-radius:var(--r);overflow:hidden;font-size:13px}
th{text-align:left;padding:12px 15px;font-size:11px;text-transform:uppercase;letter-spacing:.09em;
  color:var(--faint);border-bottom:1px solid var(--border);font-weight:700}
td{padding:13px 15px;border-bottom:1px solid var(--border-soft);color:var(--dim);vertical-align:middle}
tr:last-child td{border-bottom:0}
td b{color:var(--text);font-weight:650}
.tag{display:inline-block;padding:3px 9px;border-radius:6px;font-size:11px;font-weight:650}
.tag.bullying{background:rgba(255,92,92,.14);color:#ff8f8f}
.tag.sexual{background:rgba(255,92,157,.14);color:#ff8fbc}
.tag.abusive{background:rgba(255,179,64,.14);color:var(--amber)}
.tag.illegal{background:rgba(200,92,255,.14);color:#d19bff}
.tag.personal_info{background:rgba(76,201,240,.14);color:var(--sky)}
.tag.self_harm{background:rgba(124,92,255,.16);color:#b9a6ff}
.tag.violence{background:rgba(255,120,80,.14);color:#ff9f7f}
.tag.other{background:rgba(160,160,180,.14);color:var(--dim)}
.tag.pass{background:rgba(61,220,151,.14);color:var(--ok)}
.tag.block{background:rgba(255,92,92,.14);color:#ff8f8f}
.tag.error{background:rgba(160,160,180,.14);color:var(--faint)}
.sev{display:inline-flex;align-items:center;gap:6px;font-weight:650}
.sev::before{content:'';width:7px;height:7px;border-radius:50%}
.sev.hi::before{background:var(--danger)} .sev.hi{color:#ff8f8f}
.sev.md::before{background:var(--warn)} .sev.md{color:var(--amber)}
.sev.lo::before{background:var(--faint)} .sev.lo{color:var(--faint)}
.excerpt{font-family:var(--mono);font-size:11.5px;color:var(--faint);max-width:340px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
.adminnav{display:flex;gap:6px;margin:18px 0 0}
.adminnav a{padding:8px 14px;border-radius:10px;font-size:13px;color:var(--dim);text-decoration:none;
  border:1px solid transparent}
.adminnav a.on{background:var(--surface);border-color:var(--border);color:var(--text);font-weight:650}
@media(max-width:820px){.admingrid{grid-template-columns:1fr 1fr}}

/* ---- empty / error states ---- */
.empty{text-align:center;padding:80px 20px;max-width:480px;margin:0 auto}
.empty .vibi{width:120px;height:120px;margin:0 auto 14px;display:block;object-fit:contain}
.emptystage .big{margin:0 auto 14px;display:block;object-fit:contain;opacity:.9}
.empty h2{font-size:26px;letter-spacing:-.025em;font-weight:800;margin-bottom:10px}
.empty p{font-size:15px;color:var(--dim);line-height:1.65;margin-bottom:24px}

/* ---- hero + prompt ---- */
.hero{text-align:center;padding:74px 0 30px;position:relative}
.hero::before{content:'';position:absolute;inset:-40px 10% auto;height:340px;z-index:-1;
  background:radial-gradient(closest-side,rgba(124,92,255,.28),transparent 70%);filter:blur(20px)}
.eyebrow{display:inline-flex;align-items:center;gap:7px;padding:6px 14px;border-radius:99px;
  background:var(--surface);border:1px solid var(--border);font-size:12.5px;color:var(--dim);margin-bottom:22px}
.eyebrow .dot{width:6px;height:6px;border-radius:50%;background:var(--mint)}
.hero h1{font-size:clamp(38px,6vw,62px);line-height:1.04;letter-spacing:-.035em;font-weight:850;margin-bottom:18px}
.hero h1 em{font-style:normal;background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero p.sub{font-size:17.5px;color:var(--dim);max-width:560px;margin:0 auto 34px;line-height:1.6}

.promptbox{max-width:720px;margin:0 auto;background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r-lg);padding:18px;box-shadow:var(--sh);text-align:left;transition:border-color .2s}
.promptbox:focus-within{border-color:var(--violet)}
.promptbox textarea{width:100%;background:none;border:0;outline:0;resize:none;font-size:16.5px;
  line-height:1.55;min-height:76px;font-family:inherit}
.promptbox textarea::placeholder{color:var(--faint)}
.promptrow{display:flex;align-items:center;gap:10px;margin-top:12px;padding-top:13px;border-top:1px solid var(--border-soft)}
.promptrow .btn{margin-left:auto}

.chips{display:flex;flex-wrap:wrap;gap:9px;justify-content:center;margin-top:24px}
.chip{padding:8px 15px;border-radius:99px;background:var(--surface);border:1px solid var(--border);
  font-size:13px;color:var(--dim)}
.chip:hover{border-color:var(--violet);color:var(--text)}
.trust{display:flex;gap:26px;justify-content:center;flex-wrap:wrap;margin-top:44px;font-size:13px;color:var(--faint)}
.trust span{display:flex;align-items:center;gap:7px}

/* ---- modal ---- */
.backdrop{position:fixed;inset:0;background:rgba(6,4,18,.72);backdrop-filter:blur(3px);z-index:60;
  display:none;place-items:center;padding:24px;overflow:auto}
.backdrop.on{display:grid}
.modal{width:100%;max-width:430px;background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r-lg);padding:32px;box-shadow:var(--sh);position:relative}
.modal h3{font-size:23px;letter-spacing:-.02em;margin-bottom:8px;font-weight:780}
.modal p.lede{font-size:14px;color:var(--dim);line-height:1.6;margin-bottom:24px}
.modal .x{position:absolute;top:16px;right:16px;width:30px;height:30px;border-radius:8px;color:var(--faint);
  display:grid;place-items:center;font-size:17px}
.modal .x:hover{background:var(--surface-2);color:var(--text)}
.saved{display:flex;gap:11px;align-items:flex-start;background:var(--surface-2);border:1px solid var(--border);
  border-radius:var(--r-sm);padding:12px 14px;margin-bottom:22px;font-size:13px;color:var(--dim);line-height:1.5}
.oauth{display:flex;flex-direction:column;gap:9px;margin-bottom:20px}
.oauth button{display:flex;align-items:center;justify-content:center;gap:10px;padding:12px;border-radius:11px;
  background:var(--surface-2);border:1px solid var(--border);font-size:14px;font-weight:600;width:100%}
.oauth button:hover{border-color:var(--violet)}
.divider{display:flex;align-items:center;gap:12px;color:var(--faint);font-size:11.5px;margin:20px 0;
  text-transform:uppercase;letter-spacing:.1em}
.divider::before,.divider::after{content:'';flex:1;height:1px;background:var(--border-soft)}

/* ---- onboarding ---- */
.steps{display:flex;gap:6px;margin-bottom:26px}
.steps i{height:4px;flex:1;border-radius:2px;background:var(--border);transition:background .25s}
.steps i.on{background:var(--grad)}
.agepick{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:8px}
.agepick button{padding:13px 0;border-radius:11px;background:var(--bg-2);border:1px solid var(--border);
  font-size:15px;font-weight:650}
.agepick button:hover{border-color:var(--violet)}
.agepick button.on{background:var(--violet);border-color:var(--violet);color:#fff}
.urlprev{display:flex;align-items:center;font-size:13px;color:var(--faint);margin-top:10px;
  background:var(--bg-2);border:1px solid var(--border-soft);border-radius:9px;padding:9px 12px;font-family:var(--mono)}
.urlprev b{color:var(--mint);font-weight:600}
.sugg{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}
.sugg button{padding:6px 12px;border-radius:99px;background:var(--surface-2);border:1px solid var(--border);
  font-size:12.5px;color:var(--dim)}
.sugg button:hover{border-color:var(--violet);color:var(--text)}
.step{display:none}.step.on{display:block}

/* ---- footer ---- */
.foot{border-top:1px solid var(--border-soft);margin-top:70px;padding:28px 0 40px;
  display:flex;gap:18px;align-items:center;flex-wrap:wrap;font-size:12.5px;color:var(--faint)}
.foot a{color:var(--dim);text-decoration:none}
.foot a:hover{color:var(--text)}
.foot .sp{margin-left:auto}

@media(max-width:720px){
  .wrap{padding:0 18px}
  .topbar nav a{display:none}
  .section-h{margin:44px 0 16px}
}

/* Vibi waving beside the prompt box. Sits level with the prompt box rather than
   the chips below it, so it never covers a tappable suggestion. */
.hero{position:relative}
.herovibi{position:absolute;right:0;top:58%;width:clamp(90px,10vw,150px);height:auto;
  pointer-events:none;filter:drop-shadow(0 10px 26px rgba(255,92,157,.28))}
/* Below this the hero text would collide with it, so it steps out. */
@media(max-width:1180px){.herovibi{display:none}}

/* ---- the waiting game ---- */
.waitwrap{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:10px}
.waitstage{width:100%;max-width:min(100%,calc((100vh - 230px) * 16 / 10));aspect-ratio:16/10;
  max-height:100%;border-radius:16px;overflow:hidden;border:1px solid var(--border);
  box-shadow:var(--sh);position:relative;background:var(--bg-2)}
.waitstage .waitcanvas{display:block;width:100%;height:100%;touch-action:manipulation;cursor:pointer;
  outline:0}
.waitstage:has(.waitcanvas:focus-visible){outline:2px solid var(--violet);outline-offset:2px}
.waithint{font-size:12px;color:var(--faint)}

/* The game only takes the keyboard once it has been clicked, so it has to say so
   — otherwise an unfocused game looks broken rather than idle. */
.wggate{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;
  background:rgba(13,11,26,.45);transition:opacity .18s}
.wggate.off{opacity:0}
.wggate span{background:rgba(13,11,26,.8);border:1px solid var(--border);border-radius:11px;
  padding:9px 16px;font-size:13px;font-weight:650;color:var(--text)}

/* ---- end of run ----
   DOM rather than canvas: twenty rows need real text layout and a scrollbar. */
/* Flex, not grid: under `place-items:center` the track sizes to content, so the
   card's max-height:100% resolves to its own height and 20 rows overflow the
   stage instead of scrolling inside it. */
.wgover{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  padding:14px;background:rgba(13,11,26,.82);backdrop-filter:blur(3px);z-index:2}
.wgover[hidden]{display:none}
.wgcard{width:min(100%,320px);max-height:100%;display:flex;flex-direction:column;
  background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:16px}
.wgcard h4{font-size:19px;font-weight:780;letter-spacing:-.02em;text-align:center}
.wgscore{display:flex;gap:10px;margin:10px 0 4px}
.wgscore span{flex:1;background:var(--surface-2);border-radius:11px;padding:8px 6px;text-align:center;
  font-size:10.5px;color:var(--faint);line-height:1.35;text-transform:uppercase;letter-spacing:.05em}
.wgscore b{display:block;font-size:22px;font-weight:800;color:var(--text);letter-spacing:-.02em;
  text-transform:none}
.wglabel{font-size:10.5px;color:var(--faint);text-transform:uppercase;letter-spacing:.07em;
  font-weight:700;margin:12px 0 6px}
.wgboard{flex:1 1 auto;min-height:0;overflow-y:auto;list-style:none;margin:0 -4px}
.wgboard li{display:flex;align-items:center;gap:9px;padding:5px 8px;border-radius:8px;font-size:12.5px}
.wgboard li b{width:20px;flex:none;text-align:right;color:var(--faint);font-weight:700;font-size:11px}
.wgboard li:nth-child(1) b{color:var(--amber)}
.wgboard li .u{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  color:var(--dim)}
.wgboard li .u i{font-style:normal;font-size:10px;color:var(--violet);font-weight:700}
.wgboard li .v{font-variant-numeric:tabular-nums;font-weight:700;color:var(--text)}
.wgboard li.me{background:rgba(124,92,255,.16)}
.wgboard li.me .u{color:var(--text)}
.wgboard li.apart{margin-top:6px;border-top:1px solid var(--border-soft);border-radius:0 0 8px 8px}
.wgagain{margin-top:12px;justify-content:center;width:100%}

/* ---- account menu ---- */
.acct{position:relative}
.acct summary{list-style:none;cursor:pointer;display:flex;align-items:center}
.acct summary::-webkit-details-marker{display:none}
.acct .av{width:32px;height:32px;border-radius:10px;font-size:14px}
.acct[open] summary .av{outline:2px solid var(--violet);outline-offset:2px}
.acctmenu{position:absolute;right:0;top:calc(100% + 8px);min-width:184px;z-index:40;
  background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:6px;
  box-shadow:var(--sh)}
.acctmenu .who{padding:9px 11px 10px;border-bottom:1px solid var(--border-soft);margin-bottom:5px}
.acctmenu .who b{display:block;font-size:13.5px}
.acctmenu .who span{font-size:11.5px;color:var(--faint);font-family:var(--mono)}
.acctmenu a{display:block;padding:9px 11px;border-radius:9px;font-size:13px;color:var(--dim);
  text-decoration:none}
.acctmenu a:hover{background:var(--surface-2);color:var(--text)}

/* Contact addresses are written obfuscated in the markup and assembled on click,
   so harvesters scraping the page get nothing useful. */
.obf{cursor:pointer;border-bottom:1px dashed var(--border);color:var(--sky)}

/* ---- the game's own console ----
   Shown in the editor so a child can hand a real error to Vibi rather than
   describing it. Deliberately plain-language, not a devtools clone. */
.cbadge{display:inline-grid;place-items:center;min-width:17px;height:17px;padding:0 5px;
  border-radius:9px;background:var(--border);color:var(--dim);font-size:10.5px;font-weight:700}
.cbadge.hot{background:var(--danger);color:#fff}
.gconsole{border-top:1px solid var(--border-soft);background:#100d24;max-height:34%;
  display:flex;flex-direction:column}
.gconsole-h{display:flex;align-items:center;gap:8px;padding:9px 14px;
  border-bottom:1px solid var(--border-soft);font-size:12px}
.gconsole-h b{font-size:12px;font-weight:700;color:var(--dim)}
.gconsole-h #cHint{color:var(--faint);font-size:11.5px;flex:1;overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.gconsole-b{overflow-y:auto;padding:6px 14px 12px;font-family:var(--mono);font-size:11.5px;
  line-height:1.6}
.gline{padding:6px 0;border-bottom:1px solid rgba(255,255,255,.05);display:flex;gap:9px;
  align-items:flex-start;word-break:break-word}
.gline:last-child{border-bottom:0}
.gline .t{color:var(--faint);flex:none}
.gline.err .m{color:#ff9f9f}
.gline.warn .m{color:var(--amber)}
.gline.ok .m{color:var(--ok)}
.gline .m{flex:1}

/* ---- editable game name ----
   An input styled as a heading: it reads as the title but invites a click. */
.gname{background:none;border:1px solid transparent;border-radius:9px;padding:4px 9px;
  font-weight:700;font-size:15px;color:var(--text);min-width:120px;max-width:340px;
  width:clamp(120px,22vw,340px);outline:0}
.gname:hover{border-color:var(--border)}
.gname:focus{border-color:var(--violet);background:var(--bg-2)}
.gname::placeholder{color:var(--faint);font-weight:600}
.gname[disabled]{opacity:.5;cursor:not-allowed}
.gnamemsg{font-size:11px;color:var(--faint);white-space:nowrap}
.gnamemsg.ok{color:var(--ok)}
.gnamemsg.bad{color:#ff8f8f}

/* ---- immersive game ----
   Fallback for anywhere the Fullscreen API is unavailable or refused — notably
   iOS Safari, which only ever fullscreens <video>. */
.gamebox.immersive{position:fixed;inset:0;z-index:200;width:100vw;height:100dvh;
  max-width:none;max-height:none;aspect-ratio:auto;border-radius:0;border:0}
.gamebox.immersive iframe{width:100%;height:100%}
html.immersive-lock,html.immersive-lock body{overflow:hidden;overscroll-behavior:none}
.gamebox.immersive .sandbadge{display:none}
.exitfs{position:fixed;top:calc(env(safe-area-inset-top,0px) + 12px);
  right:calc(env(safe-area-inset-right,0px) + 12px);z-index:201;display:none;
  background:rgba(13,11,26,.72);color:#fff;border:1px solid rgba(255,255,255,.25);
  border-radius:11px;padding:9px 14px;font-size:13px;font-weight:650;backdrop-filter:blur(6px)}
.exitfs.show{display:block}
.exitfs:active{background:rgba(13,11,26,.9)}
/* Corner button on the game itself — the discoverable one on a phone. */
.fsbtn{position:absolute;top:10px;right:10px;z-index:3;width:34px;height:34px;
  display:flex;align-items:center;justify-content:center;font-size:15px;line-height:1;
  background:rgba(13,11,26,.55);color:#fff;border:1px solid rgba(255,255,255,.22);
  border-radius:10px;backdrop-filter:blur(6px);opacity:.72;transition:opacity .15s,transform .15s}
.fsbtn:hover{opacity:1;transform:scale(1.06)}
.gamebox.immersive .fsbtn{display:none}
@media (max-width:760px){.fsbtn{opacity:1;width:38px;height:38px}}
/* Fullscreen API path: the browser's own chrome handles exit, but keep the frame full */
.gamebox:fullscreen{width:100vw;height:100vh;max-width:none;max-height:none;
  aspect-ratio:auto;border-radius:0}
.gamebox:fullscreen iframe{width:100%;height:100%}

/* Stop, offered inside the progress message while a build runs. */
.stopbuild{margin-top:9px}

/* ---- settings, in the editor and on the account page ---- */
.setshead{display:flex;align-items:flex-end;gap:14px;margin-bottom:20px;flex-wrap:wrap}
.setshead .sp{flex:1}
.sets{display:grid;gap:14px;max-width:640px}
.setcard{background:var(--surface);border:1px solid var(--border-soft);border-radius:var(--r);padding:20px}
.setcard h3{font-size:15.5px;font-weight:720;margin-bottom:5px}
.setcard .lede{font-size:13px;color:var(--faint);line-height:1.65;margin-bottom:14px}
.hint2{font-size:11.5px;color:var(--faint);line-height:1.6;margin-top:8px}
.btn.armed{border-color:var(--danger);color:#ff8f8f}
.acctgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}
.acctgrid div{display:flex;flex-direction:column;gap:3px}
.acctgrid span{font-size:11px;color:var(--faint)}
.acctgrid b{font-size:13.5px;font-weight:650;word-break:break-word}

/* A switch, not a checkbox — this is a toy for teenagers, not a settings dialog. */
.toggle{display:flex;align-items:center;gap:11px;font-size:13px;cursor:pointer;margin-top:4px}
.toggle input{position:absolute;opacity:0;width:0;height:0}
.toggle .tr{width:42px;height:24px;border-radius:999px;background:var(--surface-2);
  border:1px solid var(--border);position:relative;flex:none;transition:background .16s,border-color .16s}
.toggle .tr::after{content:'';position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;
  background:var(--faint);transition:transform .16s,background .16s}
.toggle input:checked + .tr{background:var(--grad);border-color:transparent}
.toggle input:checked + .tr::after{transform:translateX(18px);background:#fff}
.toggle input:focus-visible + .tr{outline:2px solid var(--violet);outline-offset:2px}

/* ---- picking a picture (game thumbnail, profile picture) ---- */
.thumbpick{display:flex;gap:12px;align-items:flex-start}
.thumbnow{width:62px;height:62px;flex:none;border-radius:12px;background:var(--surface-2);
  border:1px solid var(--border-soft);display:grid;place-items:center;overflow:hidden;
  font-size:10.5px;color:var(--faint);text-align:center;padding:4px}
.thumbnow img{width:100%;height:100%;object-fit:cover}
.thumbgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(52px,1fr));gap:7px;margin-top:12px}
.tpick{aspect-ratio:1;border-radius:9px;overflow:hidden;border:2px solid transparent;
  background:var(--surface-2);padding:0;display:grid;place-items:center}
.tpick img{width:100%;height:100%;object-fit:cover}
.tpick:hover{border-color:var(--border)}
.tpick.on{border-color:var(--violet)}
.tpick.clear{font-size:10px;color:var(--faint);border:1px dashed var(--border)}

/* ---- naming your art ---- */
.assetcell{display:flex;flex-direction:column;gap:4px}
.aname{width:100%;font-size:10.5px;padding:4px 6px;border-radius:7px;background:var(--bg-2);
  border:1px solid var(--border-soft);color:var(--dim);outline:0;text-align:center}
.aname:focus{border-color:var(--violet);color:var(--text)}
.aname.bad{border-color:var(--danger)}
.aname::placeholder{color:var(--faint);opacity:.6}

/* ---- what the game is made of ---- */
.partlist{display:flex;flex-direction:column;gap:5px}
.part{text-align:left;padding:7px 10px;border-radius:9px;background:var(--surface-2);
  border:1px solid var(--border-soft);width:100%;display:flex;flex-direction:column;gap:2px}
.part:hover{border-color:var(--violet)}
.part b{font-size:12px;font-weight:650;color:var(--dim)}
.part:hover b{color:var(--text)}
.part span{font-size:10.5px;color:var(--faint);line-height:1.4}

/* A real picture on a game card, with the emoji only as the fallback. */
.thumbimg{width:100%;height:100%;object-fit:cover;display:block}
/* A real profile picture fills the avatar chip; emoji still centres. */
.av img{width:100%;height:100%;object-fit:cover;border-radius:inherit}

/* ---- past requests in the chat ---- */
.histhead{display:flex;margin-bottom:10px}
.histhead button{font-size:11.5px}
.msg.hist{opacity:.72;transition:opacity .15s}
.msg.hist:hover{opacity:1}
.histmeta{display:flex;align-items:center;gap:8px;margin-top:6px;font-size:10.5px;color:var(--faint)}
.histmeta .tag{padding:1px 6px;border-radius:5px;font-size:9.5px;font-weight:650}
.histmeta .tag.ok{background:rgba(61,220,151,.14);color:var(--ok)}
.histmeta .tag.bad{background:rgba(255,92,92,.14);color:#ff8f8f}

/* ---- signed in as someone else ---- */
.impbar{position:sticky;top:0;z-index:60;display:flex;align-items:center;gap:10px;
  padding:8px clamp(14px,3vw,28px);font-size:12.5px;font-weight:600;color:#2a1400;
  background:linear-gradient(90deg,var(--amber),#ff9f43);
  box-shadow:0 2px 14px -4px rgba(0,0,0,.5)}
.impbar b{font-weight:800}
.impbar .dot{width:8px;height:8px;border-radius:50%;background:#2a1400;flex:none;
  animation:imppulse 1.6s ease-in-out infinite}
.impbar a{margin-left:auto;white-space:nowrap;background:rgba(0,0,0,.22);color:#fff;
  padding:5px 12px;border-radius:8px;text-decoration:none;font-weight:700}
.impbar a:hover{background:rgba(0,0,0,.38)}
@keyframes imppulse{0%,100%{opacity:1}50%{opacity:.25}}
/* The editor is fixed to the viewport, so it has to start below the bar. */
body:has(.impbar) .editor{top:37px}
@media(max-width:620px){.impbar{font-size:11.5px;flex-wrap:wrap}}

/* The waiting game is a real game in a real sandbox frame. */
.waitbox{width:min(100%, calc((100cqh - 46px) * 4 / 3));aspect-ratio:4/3;margin:0 auto}
.waithint b{display:block;color:var(--dim);font-size:12px;margin-bottom:2px}
.waithint span{display:block;font-size:11px;color:var(--faint)}

/* Pieces of the game, listed in the asset library. */
.piecehead{display:flex;align-items:center;gap:8px;margin-bottom:9px}
.piecehead b{font-size:12px;color:var(--dim);font-weight:650}
.piecehead button{margin-left:auto;font-size:11px}
/* The pieces sheet: a sandboxed frame that draws the game's own geometry. */
.piecesheet{width:100%;height:360px;border:0;border-radius:12px;background:#1a1636;display:block}
.piecebusy{margin-left:auto;display:flex;align-items:center;gap:6px;font-size:10.5px;color:var(--faint)}

/* ---- explore ---- */
.explorebar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:22px}
.explorebar .input{width:auto;flex:1 1 260px;max-width:420px;padding:9px 13px;font-size:13.5px}
.explorebar .sortby{display:flex;gap:6px;margin-left:auto;flex-wrap:wrap}
.thumbimg{width:100%;height:100%;object-fit:cover}
@media(max-width:620px){.explorebar .sortby{margin-left:0;width:100%}}
/* Pill links: sort order on Explore, account filters in admin. */
.chipg{padding:6px 12px;border-radius:999px;font-size:12.5px;font-weight:600;text-decoration:none;
  background:var(--surface);border:1px solid var(--border-soft);color:var(--faint)}
.chipg:hover{border-color:var(--violet);color:var(--text)}
.chipg.on{background:var(--surface-2);border-color:var(--violet);color:var(--text)}

/* ---- reporting ---- */
.repreasons{display:grid;gap:7px}
.repreasons button{text-align:left;padding:10px 13px;border-radius:11px;font-size:13.5px;
  background:var(--surface-2);border:1px solid var(--border-soft);color:var(--dim)}
.repreasons button:hover{border-color:var(--violet);color:var(--text)}
.repreasons button.on{border-color:var(--violet);background:var(--surface);color:var(--text);font-weight:650}
.cflag{margin-left:6px;font-size:10px;opacity:0;transition:opacity .15s;padding:0 3px}
.cmt:hover .cflag,.cflag:focus-visible{opacity:.75}
.cflag:hover{opacity:1}

/* ---- game page, narrow screens ---- */
.gamehead{display:flex;align-items:center;gap:12px;margin:18px 0;flex-wrap:wrap}
.gamehead > div:first-of-type{min-width:0;flex:1 1 200px}
.gameacts{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}
/* The owner/draft banners are a row of prose plus buttons; below this width the
   prose column gets squeezed to one word per line, so they stack instead. */
.notice{align-items:center}
.noticetext{flex:1}
@media(max-width:620px){
  .notice{flex-wrap:wrap}
  .noticetext{flex:1 1 100%}
  .notice .btn{flex:1 1 auto;justify-content:center}
  .gameacts{margin-left:0;width:100%}
  .gameacts .btn{flex:1 1 auto;justify-content:center}
}
.dellist{margin:10px 0 0;padding-left:20px;font-size:13px;color:var(--dim);line-height:1.8}
.dellist li::marker{color:var(--danger)}

/* "Something went wrong" — the only way a repair starts. */
.wrongbox{margin-top:10px;resize:none;font-size:13.5px}
.wronginc{display:flex;align-items:center;gap:7px;margin-top:9px;font-size:11.5px;color:var(--faint)}
.dbgbtn{opacity:.6;font-size:11.5px}
.dbgbtn:hover{opacity:1}

/* Reference pictures attached to a message. */
.refstrip{display:flex;gap:7px;flex-wrap:wrap;padding:0 0 9px}
.refchip{position:relative;width:52px;height:52px;border-radius:9px;overflow:hidden;
  border:1px solid var(--border);background:var(--surface-2);flex:none}
.refchip img{width:100%;height:100%;object-fit:cover}
.refchip .x{position:absolute;top:2px;right:2px;width:17px;height:17px;border-radius:5px;
  background:rgba(0,0,0,.68);color:#fff;font-size:10px;display:grid;place-items:center;line-height:1}
.refchip.busy{display:grid;place-items:center}
.refbtn{padding:6px 9px;font-size:13px}
