/* Authentication on this route belongs to Regathering itself. */
.auth-shell { min-height: min(680px, calc(100vh - 120px)); display: grid;
  place-items: center; padding: clamp(20px, 6vw, 72px); }
.auth-card { width: min(100%, 430px); padding: 28px;
  border-color: rgba(187,154,247,.3);
  box-shadow: 0 24px 70px rgba(0,0,0,.32); }
.auth-card h3 { margin: 0 0 6px; font-size: 20px; }
.auth-card .menu { margin-top: 20px; }
.auth-card .menu input { min-height: 46px; }
.auth-card .quickrow button { min-height: 44px; padding-left: 18px; padding-right: 18px; }

@media (max-width: 1080px) {
  .home-shell { grid-template-columns: 1fr; }
  .home-rail { display: none; }
  .home-side { position: static; }
}
@media (min-width: 1081px) {
  body:has(.home-shell) header #navgames,
  body:has(.home-shell) header #navdecks,
  body:has(.home-shell) header #navprofiles { display: none; }
}
body:has(.auth-shell) header #navgames,
body:has(.auth-shell) header #navdecks,
body:has(.auth-shell) header #navprofiles { display: none; }
@media (max-width: 760px) {
  main:has(.home-shell), main:has(.auth-shell) { padding: 10px 10px 180px; }
  .home-shell { gap: 10px; }
  .home-hero { min-height: 260px; padding: 28px 22px; border-radius: 16px; }
  .home-hero h2 { font-size: 45px; }
  .home-dashboard { grid-template-columns: 1fr; }
  .home-wide { margin-top: 10px; }
  .newseat::before { flex-basis: 100%; margin-bottom: -4px; }
  .newseat .kind { flex: 1 1 105px; }
  .newseat .profile { flex: 2 1 160px; }
  .newseat .deck, .newseat .pname { flex-basis: calc(100% - 48px); }
  .auth-shell { min-height: 0; padding: 26px 8px; }
  .auth-card { padding: 20px; }
  /* thumb-sized header controls: at 24px tall these were the smallest
     targets on the phone layout and sat right next to each other */
  .hbtn { min-height: 34px; padding: 6px 12px; }
  /* a seat/spectator URL is 70-odd characters; wrapped, it was three lines
     of monospace pushing the copy button off the row. It is there to be
     COPIED, not read, so it gets one line and an ellipsis. */
  .linkrow code { flex: 1 1 140px; min-width: 0; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 430px) {
  .home-hero h2 { font-size: 40px; }
  .hero-actions { width: 100%; }
  .hero-actions button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .setup-chevron::before { transition: none; }
}

.card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
        padding: 16px; margin-bottom: 14px; }
.card h2 { margin: 0 0 12px; font-size: 15px; }
/* flex, not grid: each control sizes to its role and the AI-profile select
   (hidden for non-bot seats) reflows cleanly. a fixed 4-col grid put the
   name in a 40px track and pushed the ✕ onto a huge second row */
.newseat { display: flex; gap: 8px; margin-bottom: 8px; align-items: center;
           flex-wrap: wrap; }
.newseat .kind { flex: 0 0 110px; }
.newseat .profile { flex: 1 1 160px; min-width: 0; }  /* sits inline, not a full row */
.newseat .deck { flex: 3 1 240px; min-width: 0; }   /* grows for long deck names */
.newseat .pname { flex: 1 1 150px; min-width: 0; }  /* keep the name usable */
/* ---------- deck picker (core/deckpick.js) ----------
   Rows are three aligned columns — pips | title | detail — which a native <option>
   cannot draw. Every row's grid shares one container width and one pip-column
   width (--pw, set from the widest pip run), so the columns line up down the list. */
select.dpick-native { display: none; }
.dpick { position: relative; min-width: 0; }
.newseat .dpick { flex: 3 1 240px; }
.nrrow .dpick { flex: 1 1 240px; }
@media (max-width: 760px) { .newseat .dpick { flex-basis: calc(100% - 48px); } }
.dpick-btn { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px;
  padding: 6px 10px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 14px;
  text-align: left; cursor: pointer; }
.dpick-btn:hover { border-color: var(--border2); }
.dpick-btn:focus-visible, .dpick-btn[aria-expanded="true"] {
  border-color: var(--accent); outline: none; }
.home-shell.compact .dpick-btn { min-height: 34px; padding-top: 4px; padding-bottom: 4px; }
.dpick-caret { flex: 0 0 auto; color: var(--faint); font-size: 12px; }
.dpick-cur, .dpick-opt { display: grid; align-items: center; min-width: 0; column-gap: 10px;
  grid-template-columns: var(--pw, 12px) minmax(0, 1.3fr) minmax(0, 1fr); }
.dpick-cur { flex: 1 1 auto; }
.dpick-title, .dpick-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dpick-sub { color: var(--faint); font-size: 12px; }
.dpick-pips { display: flex; gap: 2px; }
.dpip { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.dpip.none { background: transparent; box-shadow: inset 0 0 0 1.5px var(--faint); }
.dpick-list { position: absolute; z-index: 40; left: 0; top: calc(100% + 4px);
  width: max(100%, 440px); max-width: 92vw; max-height: min(340px, 60vh); overflow-y: auto;
  padding: 4px; background: var(--panel2); border: 1px solid var(--border2);
  border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .45); }
.dpick.up .dpick-list { top: auto; bottom: calc(100% + 4px); }
.dpick-grp { padding: 8px 8px 4px; color: var(--faint); font-size: 10.5px;
  font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.dpick-opt { min-height: 30px; padding: 5px 8px; border-radius: 6px; font-size: 13px;
  cursor: pointer; }
.dpick-opt.is-act { background: var(--panel3); }
.dpick-opt.is-sel .dpick-title { color: var(--accent); font-weight: 600; }
.dpick-opt.is-off { opacity: .45; cursor: not-allowed; }
@media (max-width: 560px) {
  .dpick-opt { min-height: 40px; }
  .dpick-list { width: 100%; }
  /* the closed button gives the whole width to the title; the detail stays in the list */
  .dpick-cur { grid-template-columns: var(--pw, 12px) minmax(0, 1fr); }
  .dpick-cur .dpick-sub { display: none; }
}
select, .newseat input, .optrow input, .menu input {
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 10px; font-size: 14px; width: 100%;
  font-family: inherit; min-height: 40px;
}
.newseat .del { flex: 0 0 40px; min-height: 40px; padding: 4px;
                text-align: center; color: var(--faint); }
.optrow { display: flex; gap: 10px; margin: 10px 0; align-items: center;
          flex-wrap: wrap; font-size: 13px; color: var(--dim); }
.optrow label { display: flex; gap: 6px; align-items: center; }
.optrow input { width: 110px; }
.linkrow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px;
           flex-wrap: wrap; }
.linkrow code { background: var(--bg); padding: 6px 8px; border-radius: 6px;
                font-size: 12px; overflow-wrap: anywhere; flex: 1; min-width: 180px; }
.over { border-color: var(--good); }
.over h2 { color: var(--good); }
.hint { color: var(--faint); font-size: 12px; margin-top: 8px; line-height: 1.5; }
/* one running game: a panel (admin .repdetail look) grouping its header row
   with the indented per-seat join / spectator links. */
.gitem { background: var(--panel2); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.gitem:last-child { margin-bottom: 0; }
.ghead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-bottom: 4px; }
.ghead b { font-size: 14px; }
.ghead:last-child { margin-bottom: 0; }

/* ---------- my bug reports ---------- */
#myreports .mrbody { margin-top: 10px; }
.mrrow { padding: 9px 0; border-top: 1px solid var(--border); }
.mrrow:first-child { padding-top: 0; border-top: none; }
.mrhead { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.mrtext { margin-top: 4px; font-size: 13px; color: var(--dim);
          white-space: pre-wrap; overflow-wrap: anywhere; }
.badge.tg-invalid { color: var(--faint); border-color: var(--faint); }
.badge.tg-disputed { color: var(--warn); border-color: var(--warn); }
/* the reporter-facing answer: brighter than their own quoted text, because
   the whole point is that it gets read */
.mrres { margin-top: 7px; padding: 8px 10px; font-size: 13px;
         background: var(--panel2); border: 1px solid var(--border);
         border-left: 3px solid var(--accent); border-radius: 6px;
         color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.mrres b { color: var(--dim); font-weight: 600; }
.mrres.mrdis { border-left-color: var(--warn); }
.mrres .sub { display: block; margin-top: 3px; }
.mract { display: flex; gap: 8px; align-items: center;
         flex-wrap: wrap; margin-top: 7px; }
/* button.quick sets display:inline-block, which OUTRANKS the UA's
   [hidden]{display:none} — without this the dispute button stays on screen
   after openDispute() hides it. Scoped to the report card, attribute-matched
   so it covers the collapsed form box too. */
.mrrow [hidden] { display: none; }
button.mrdisbtn { font-size: 12px; padding: 5px 9px; color: var(--dim); }
.dspbox { flex: 1 1 100%; }
.dspbox textarea { width: 100%; }
.dsperr { color: var(--bad); }

/* ---------- changelog ("What's new") ---------- */
/* a <details> reusing .card; the summary is the h2-style toggle */
#whatsnew > summary, #myreports > summary, #running > summary,
#history > summary { cursor: pointer;
  user-select: none; list-style: none; font-size: 15px; font-weight: 650;
  color: var(--text); }
#whatsnew > summary::-webkit-details-marker,
#myreports > summary::-webkit-details-marker,
#running > summary::-webkit-details-marker,
#history > summary::-webkit-details-marker { display: none; }
#whatsnew > summary::before,
#myreports > summary::before,
#running > summary::before,
#history > summary::before { content: "▸ "; color: var(--faint); }
#whatsnew[open] > summary::before,
#myreports[open] > summary::before,
#running[open] > summary::before,
#history[open] > summary::before { content: "▾ "; }
#whatsnew #clbody { margin-top: 10px; }
.clrel { padding: 10px 0; border-top: 1px solid var(--border); }
.clrel:first-child { padding-top: 0; border-top: none; }
.clhead { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.clver { font-weight: 700; font-family: ui-monospace, Consolas, monospace;
         font-size: 13.5px; color: var(--accent); }
.cldate { color: var(--faint); font-size: 12px; }
.clsec { display: flex; gap: 8px; margin-top: 6px; }
.clsec .badge { flex: 0 0 auto; margin-top: 2px; }
.clsec ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5;
            color: var(--dim); }
.clsec li { margin: 1px 0; }
/* the two inline Markdown spans clInline() renders */
.clsec li strong { color: var(--text); font-weight: 600; }
.clsec li code { font-size: 12px; background: var(--bg); border-radius: 4px;
                 padding: 0 4px; overflow-wrap: anywhere; }
