/* The judge's sheet (/judge): one column of cards, sized for a phone held under the table. Score buttons rather
   than sliders, so scrolling past a row never changes it; the clock and the score stick to the top of the sheet. */
.judge { width: min(100% - 24px, 36rem); margin-inline: auto; padding: 22px 0 calc(48px + env(safe-area-inset-bottom)); display: grid; gap: 16px; }
.judge h1 { margin: 0; }
.judge__lede { margin: 0; color: var(--muted); }
.judge .card { margin: 0; padding: 20px 16px 22px; }
.judge__h3 { margin: 22px 0 10px; font: var(--display-weight) 1.25rem/1.1 var(--display); text-transform: uppercase; letter-spacing: var(--display-tracking); }
.judge__rubric, .judge__more { margin-top: 12px; }
.judge__rubric summary, .judge__more summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.judge__rubric ul { margin: 6px 0 0; padding-left: 1.2em; }
.judge__rubric li { margin: 4px 0; }

.judge__pair { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 14px; align-items: end; }
.judge__pair .field { margin-top: 18px; }
.judge__penalty { padding-bottom: 12px; }

/* The clock and the running score, stuck to the top of the screen while the sheet scrolls. */
.judge__bar {
  position: sticky; top: 0; z-index: 5; margin: 14px -16px 0; padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-block: 1px solid var(--rule-soft);
  transition: background .3s;
}
.judge__clock { font: var(--display-weight) 2rem/1 var(--display); font-variant-numeric: tabular-nums; min-width: 3.1em; }
.judge__bar .btn { min-width: 6.5em; justify-content: center; }
.judge__barscore { margin-left: auto; display: flex; align-items: baseline; gap: 2px; }
.judge__barscore strong { font: var(--display-weight) 2.2rem/1 var(--display); color: var(--accent); font-variant-numeric: tabular-nums; }
.judge__barscore small { color: var(--muted); font-weight: 600; }
.judge__bar.is-light { background: color-mix(in srgb, var(--gold) 28%, var(--card)); }
.judge__bar.is-over { background: color-mix(in srgb, var(--accent) 32%, var(--card)); }
.judge__bar.is-over .judge__clock { color: var(--accent-bright); }
.judge__editing { margin-top: 8px; color: var(--accent); font-weight: 600; }

/* The laugh counter: two big thumbs-reach buttons. */
.judge__lpm { margin-top: 18px; padding: 14px; border-radius: 12px; background: var(--rule-soft); }
.judge__lpmread { margin: 0 0 12px; font-weight: 700; font-size: 1.05rem; }
.judge__laughs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.judge__laughs .btn { justify-content: center; min-height: 76px; touch-action: manipulation; }
.judge__lpm .linkish { margin-top: 6px; }

.judge__criteria { display: grid; gap: 18px; margin-top: 20px; }
.judge__crit { display: grid; gap: 6px; }
.judge__crithead { display: flex; align-items: baseline; gap: 8px; }
.judge__critname { font-weight: 700; font-size: 1.05rem; }
.judge__w { font-size: .8rem; font-weight: 700; color: var(--muted); padding: 1px 7px; border-radius: 999px; border: 1px solid var(--rule); }
.judge__critv { margin-left: auto; font: var(--display-weight) 1.4rem/1 var(--display); color: var(--accent); min-width: 1.4em; text-align: right; }
.judge__nums { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
.judge__n {
  min-height: 44px; padding: 0; border-radius: 10px; border: 1px solid var(--rule); background: transparent; color: var(--ink);
  font: 700 1rem/1 var(--body); font-variant-numeric: tabular-nums; cursor: pointer; touch-action: manipulation;
}
.judge__n:hover { border-color: var(--ink); }
.judge__n[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.judge__n:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.judge__crit .field__hint { margin: 0; }
.judge__more { margin-top: 0; font-size: .95rem; }
.judge__more dl, .judge__rows { margin: 6px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; }
.judge__more dt { font-weight: 700; color: var(--muted); white-space: nowrap; }
.judge__more dd, .judge__rows dd { margin: 0; }

.judge__over { margin-top: 18px; }
.judge__total { margin: 10px 0 0; color: var(--muted); }

.judge__verdict { margin: 14px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--rule-soft); font-size: 1.2rem; line-height: 1.45; min-height: 3em; }
.judge__verdict:empty::before { content: "Pick a tone and tap Write verdict."; color: var(--muted); font-size: 1rem; }
.judge__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.judge__save { display: grid; justify-items: center; gap: 6px; margin-top: 18px; }

.judge__board { margin: 0; padding: 0; list-style: none; }
.judge__row { padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }
.judge__pick { width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.judge__place { color: var(--muted); font-weight: 700; min-width: 1.6em; }
.judge__rowname { flex: 1; min-width: 0; font-weight: 700; font-size: 1.1rem; overflow-wrap: anywhere; }
.judge__rowname small { display: block; font-weight: 400; font-size: .85rem; color: var(--muted); }
.judge__rowscore { font: var(--display-weight) 1.6rem/1 var(--display); color: var(--accent); text-align: right; }
.judge__rowscore small { display: block; font: 700 .7rem/1.3 var(--body); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.judge__rowtools { display: flex; gap: 14px; padding-left: 2.2em; }
.judge__rowtools .linkish { font-size: .88rem; }
.judge__rownote { display: block; padding-left: 2.2em; color: var(--muted); font-size: .9rem; }

.judge__guide p { margin: 8px 0; }
.judge__guide h4 { margin: 16px 0 4px; font-size: 1rem; }
.judge__guide ul { margin: 0; padding-left: 1.2em; }
.judge__guide li { margin: 3px 0; }
.judge__rows { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.judge__rows dt { font-weight: 700; margin-top: 8px; }
.judge__rows dd { color: var(--text); }

/* Phones: two rows of five, so every number is a thumb-sized target. */
@media (max-width: 480px) {
  .judge__nums { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .judge__n { min-height: 46px; font-size: 1.1rem; }
}
@media (max-width: 360px) { .judge__clock { font-size: 1.7rem; } .judge__bar .btn { min-width: 5.5em; } }

/* No site menu here, so the header scrolls away and the clock bar gets the top of the screen. */
.topnav.judge__top { position: relative; }
.judge__actions .btn { flex: 1 1 auto; justify-content: center; }
.judge__paste { font: 400 1rem/1.4 var(--body); min-height: 8em; }
#j-panel .judge__pick { cursor: default; }

/* Into a room's panel (/judge), and the panel prompt in one (/r/<room>/judge). */
.judge__findform { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.judge__findform .btn { min-height: 48px; }
.judge__joininfo { margin: 6px 0 0; }
.judge__joinnote { margin: 12px 0 0; color: var(--accent); font-weight: 600; }
.judge__joinnote:empty { display: none; }
.judge__join .btn--block { margin-top: 18px; }
.judge__roombar { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; color: var(--muted); }
.judge__roombar b { color: var(--ink); overflow-wrap: anywhere; }
.judge__sync { font-size: .85rem; font-weight: 700; color: var(--gold); }
.judge__sync.is-off { color: var(--accent); }
.judge__roombar .linkish { margin-left: auto; font-size: .9rem; }
.judge__roomnight { margin: 6px 0 0; }

/* Tonight's list: tap a comic to score them. */
.judge__list { display: grid; gap: 6px; margin-top: 16px; max-height: 21rem; overflow-y: auto; overscroll-behavior: contain; }
.judge__comic {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 12px; border-radius: 12px;
  border: 1px solid var(--rule); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; touch-action: manipulation;
}
.judge__comic[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.judge__comic.is-up { border-width: 2px; border-color: var(--gold); }
.judge__comicn { color: var(--muted); font-weight: 700; min-width: 1.4em; font-variant-numeric: tabular-nums; }
.judge__comicname { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.judge__comicname small { display: block; font-weight: 600; font-size: .8rem; color: var(--gold); text-transform: uppercase; letter-spacing: .05em; }
.judge__comicscore { font: var(--display-weight) 1.3rem/1 var(--display); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.judge__comic.is-scored .judge__comicscore { color: var(--accent); }
.judge__comicscore small { display: block; font: 700 .65rem/1.3 var(--body); text-transform: uppercase; color: var(--muted); }
.judge__nowup { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 24%, var(--card)); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.judge__nowup .btn { margin-left: auto; }
.judge__locked { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--rule-soft); font-weight: 600; }
.judge__save .btn:disabled { opacity: .55; }
/* A class that sets display would otherwise show what the page has hidden. */
.judge [hidden] { display: none !important; }
.judge__joininfo { margin-bottom: 10px; }
