:root {
  --bg: #f3f5f6;
  --paper: #ffffff;
  --ink: #1d262b;
  --muted: #4b585f;
  --line: #c9d1d5;
  --soft: #e6eaec;
  --accent: #94451c;
  --accent-ink: #ffffff;
  --accent-soft: #f6e7dd;
  --ok: #2c6b45;
  --late: #a1261d;
  --now: #94451c;
  --focus: #1f5fbf;
  --r: 10px;
  --r-sm: 6px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121618;
    --paper: #1a2023;
    --ink: #e8ecee;
    --muted: #b3bec4;
    --line: #3a464c;
    --soft: #232b2f;
    --accent: #e8976a;
    --accent-ink: #1a1009;
    --accent-soft: #3a2619;
    --ok: #7cc79a;
    --late: #ff8a80;
    --now: #e8976a;
    --focus: #8ab4ff;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--sans); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; }

.top { padding: 28px 0 8px; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 10px; font-weight: 800; }
.lede { margin: 0; max-width: 62ch; color: var(--muted); font-size: 1.06rem; }
h2 { font-size: 1.45rem; line-height: 1.25; margin: 1.8em 0 .5em; letter-spacing: -0.01em; }
.h3 { font-size: 1.15rem; margin: 1.2em 0 .5em; }
.h4 { font-size: 1.05rem; margin: 1.2em 0 .4em; }
.sub { font-weight: 400; color: var(--muted); font-size: .95rem; }

#tool { padding-bottom: 24px; outline: none; }
.kind { display: inline-flex; margin: 16px 0 6px; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; }
.kind label, .seg label { position: relative; cursor: pointer; }
.kind input, .seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.kind span { display: block; padding: 10px 26px; font-weight: 700; min-height: 44px; }
.kind input:checked + span { background: var(--ink); color: var(--bg); }
.kind input:focus-visible + span, .seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }
.summary { margin: 8px 0 14px; font-size: 1.08rem; max-width: 70ch; }

/* all five tabs fit at 320 px: they share the row, nothing scrolls out of sight */
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--line); margin: 6px 0 18px; }
.tabs button { flex: 1 1 auto; min-width: 0; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: 10px 4px; min-height: 44px; font: 600 1rem var(--sans); color: var(--muted); cursor: pointer; }
@media (min-width: 600px) { .tabs button { padding: 10px 14px; } }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; min-width: 0; }
.field > span:first-child { font-weight: 600; font-size: .95rem; }
input[type="text"], input[type="time"], select, textarea {
  font: 16px/1.3 var(--sans); color: var(--ink); background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--r-sm); padding: 10px 11px; min-height: 44px; width: 100%; min-width: 0;
}
textarea { min-height: 96px; resize: vertical; }
input[aria-invalid="true"] { border-color: var(--late); }
.unit-in { display: flex; align-items: center; gap: 6px; }
.unit-in b { font-weight: 600; color: var(--muted); min-width: 1.8em; }
.row2 .pots { grid-column: 1 / -1; }
.row2 .pots input { max-width: 7rem; }
.row2 { display: grid; grid-template-columns: minmax(0, 7rem) minmax(0, 1fr); gap: 12px; max-width: 34rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0 14px; }
.msg { color: var(--late); margin: -4px 0 10px; font-weight: 600; }
.hint { color: var(--muted); font-size: .95rem; margin: 4px 0 10px; }
.warn { color: var(--late); }
body:not([data-kind="tea"]) .tea-only, body[data-kind="tea"] .coffee-only { display: none !important; }
body:not([data-method="cupping"]) .cupping-only, body[data-method="cupping"] .not-cupping, body:not([data-method="press"]) .press-only { display: none !important; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border-radius: var(--r-sm);
  border: 2px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: 700 1rem var(--sans); cursor: pointer; text-decoration: none; }
.btn.small { min-height: 44px; padding: 8px 14px; font-size: .95rem; }
.btn.quiet { background: transparent; color: var(--ink); border-color: var(--line); font-weight: 600; }
.btn.danger { color: var(--late); }
.btn.go { font-size: 1.1rem; padding: 12px 26px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; min-height: 0; }

.drinks { list-style: none; padding: 0; margin: 0 0 8px; }
.drinks > li { padding: 14px 0 6px; border-top: 1px solid var(--line); }
.drinks > li:last-child { border-bottom: 1px solid var(--line); }
.d-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "c n r" "t t t"; gap: 0 12px; align-items: end; }
.d-head .code { grid-area: c; }
.d-head .nm-f { grid-area: n; }
.d-head .nt-f { grid-area: t; }
.d-head .btn { grid-area: r; margin-bottom: 12px; }
@media (min-width: 760px) { .d-head { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto; grid-template-areas: "c n t r"; } }
.code { display: inline-grid; place-items: center; min-width: 2.6em; height: 2.6em; padding: 0 .3em; border-radius: 50%; border: 2px solid var(--accent);
  color: var(--accent); font: 700 1rem var(--mono); letter-spacing: .02em; background: var(--paper); flex: none; }
.d-head .code { margin-bottom: 12px; width: 3em; height: 3em; font-size: 1.1rem; }
.t4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .t4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.read { margin-top: -6px; }

.more { margin: 12px 0; border-top: 1px solid var(--line); }
.more > summary { cursor: pointer; padding: 12px 0; font-weight: 700; min-height: 44px; }
.units { display: flex; gap: 14px; flex-wrap: wrap; margin: 4px 0 14px; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.seg span { display: block; padding: 9px 16px; min-height: 44px; font-weight: 600; }
.seg input:checked + span { background: var(--ink); color: var(--bg); }
.seg.wide { flex-wrap: wrap; }
.ask { background: var(--accent-soft); border-radius: var(--r-sm); padding: 12px 14px; margin: 8px 0 12px; }
.ask p { margin: 0 0 10px; font-weight: 600; }
.kept { list-style: none; padding: 0; margin: 0 0 12px; }
.kept li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--soft); }
.linkbox { margin-top: 6px; font-size: 16px; }
.note, .bar { background: var(--accent-soft); padding: 10px 14px; border-radius: var(--r-sm); margin: 10px 0; }
.bar p { margin: 0 0 8px; }
.undo, .toast { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px;
  border-radius: var(--r-sm); z-index: 20; max-width: calc(100% - 32px); box-shadow: 0 6px 20px rgb(0 0 0 / .25); }
.toast { pointer-events: none; bottom: 76px; }
.undo .btn { background: var(--bg); color: var(--ink); border-color: var(--bg); margin-left: 8px; }

/* prep */
.host { font-weight: 700; color: var(--accent); margin: 0 0 10px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--soft); }
thead th { font-size: .92rem; color: var(--muted); border-bottom: 1.5px solid var(--line); }
.nm { color: var(--muted); font-size: .95rem; }
.key .code, .reveal .code, .scores .code, .grid-sheet .code { width: 2.5em; height: 2.5em; font-size: .95rem; }
.warns { color: var(--late); padding-left: 1.2em; }
.round { margin-top: 10px; }
.steps td { padding: 7px 10px 7px 0; }
.steps thead { display: none; }
.steps td.t { white-space: nowrap; font-variant-numeric: tabular-nums; width: 6.5em; font-weight: 600; }
.steps tr.mark td { color: var(--muted); }
.sec { font-size: .8em; }
b.c { font-family: var(--mono); color: var(--accent); }
@media (max-width: 600px) {
  .key thead { display: none; }
  .key tr { display: grid; grid-template-columns: 3.2em 1fr; gap: 0 10px; padding: 10px 0; border-bottom: 1px solid var(--soft); }
  .key td { border: 0; padding: 2px 0; }
  .key td:first-child { grid-row: span 5; }
  .key td[data-l]:not(:nth-child(2))::before { content: attr(data-l) ": "; color: var(--muted); }
}
.ref th[scope="row"] { white-space: nowrap; padding-right: 14px; }
@media (max-width: 600px) { .ref th[scope="row"] { white-space: normal; } .ref { font-size: .95rem; } }

/* party */
.next { background: var(--paper); border: 2px solid var(--accent); border-radius: var(--r); padding: 14px 16px; margin: 0 0 12px; }
.next .label { margin: 0; font-size: 1rem; }
.next .big { margin: 4px 0 0; font-size: 1.25rem; font-weight: 600; line-height: 1.35; }
.next-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.next-row .label { font-size: 1.05rem; }
.next-row .tick { flex: none; min-width: 5.5em; }
/* on a phone the next step and its Done button stay in view while the list scrolls */
@media (max-width: 760px) {
  .next { position: sticky; top: 0; z-index: 5; box-shadow: 0 4px 12px rgb(0 0 0 / .12); padding: 10px 12px; }
  .next .big { font-size: 1.1rem; }
}
.cd { font-variant-numeric: tabular-nums; }
.now { color: var(--now); font-weight: 800; }
.late { color: var(--late); font-weight: 800; }
.ok { color: var(--ok); font-weight: 700; }
.timers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); gap: 8px; margin-bottom: 8px; }
.timer .code { width: 2.4em; height: 2.4em; font-size: .9rem; }
@media (max-width: 520px) { .timers { grid-template-columns: 1fr 1fr; } .timer { grid-template-columns: auto 1fr; } .timer .tt { grid-column: 1 / -1; order: 3; } }
.timer { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 10px; padding: 6px 10px; background: var(--paper); border-radius: var(--r-sm); border: 1px solid var(--line); }
.timer b { font: 700 1.2rem var(--mono); font-variant-numeric: tabular-nums; }
.timer .tt { color: var(--muted); font-size: .92rem; }
.timer .prog { grid-column: 1 / -1; height: 5px; background: var(--soft); border-radius: 3px; overflow: hidden; }
.timer .prog span { display: block; height: 100%; background: var(--accent); }
.timer.over { border-color: var(--late); }
.timer.over b { color: var(--late); }
.live-steps { list-style: none; padding: 0; margin: 0; }
.step { display: grid; grid-template-columns: 6.6em 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--soft); }
.step .when { font-variant-numeric: tabular-nums; font-size: .95rem; }
.step.mark .what { color: var(--muted); }
.step.is-done .what { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
/* finished steps shrink to one line so the current one stays near the top */
.step.is-done { padding: 2px 0; }
.step.is-done .what { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.step.is-done .tick { min-height: 34px; padding: 4px 12px; }
.step.is-now { background: var(--accent-soft); }
.step.is-late .when { color: var(--late); }
.step .tick { min-width: 5em; }
@media (max-width: 520px) {
  .step { grid-template-columns: minmax(0, 1fr) auto; }
  .step .when { grid-column: 1 / -1; }
  .step.is-done .when { display: none; }
}
.nextround { background: var(--paper); border-radius: var(--r); padding: 12px 16px; margin: 14px 0; border: 1px solid var(--line); }
.nextround p { margin: 0 0 10px; }
.live-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.check { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; }
.check input { width: 22px; height: 22px; }
.empty { color: var(--muted); }

/* cards preview and print cards */
.sample { margin: 12px 0; overflow-x: auto; }
.cards-demo { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 14px; }
.card { background: #fff; color: #1d262b; border: 1.5px dashed #8a959b; padding: 14px 16px; border-radius: 4px; font-size: 15px; line-height: 1.35; }
.card .c-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.card .code { border-color: #94451c; color: #94451c; background: #fff; }
.card .code.big { width: 3em; height: 3em; font-size: 1.25rem; }
.who-line { flex: 1; display: flex; gap: 6px; align-items: flex-end; font-weight: 600; }
.line { display: block; flex: 1; border-bottom: 1px solid #5d6a70; height: 1.35em; min-width: 2em; }
.line.short { display: inline-block; flex: none; width: 2.2em; height: 1em; vertical-align: baseline; }
.attrs { width: 100%; }
.attrs th { font-weight: 600; padding: 3px 8px 3px 0; border: 0; color: #1d262b; font-size: 15px; width: 6.5em; }
.attrs td { padding: 3px 0; border: 0; }
.dots { display: flex; justify-content: space-between; gap: 6px; }
.dots i { display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; border: 1.3px solid #5d6a70; border-radius: 50%; font-style: normal; font-size: 11px; color: #4b585f; }
.card .lbl { margin: 8px 0 0; font-weight: 600; }
.card .foot { display: flex; gap: 12px; margin: 10px 0 0; }
.card .foot.notes { margin-top: 6px; }
.card .foot.notes + .line, .card .line + .line { margin-top: 2px; }
.card .foot > span { display: flex; align-items: flex-end; gap: 4px; white-space: nowrap; }
.card .foot > span:last-child { flex: 1; }
.card.lineup p { margin: 6px 0; }
.names { margin: 4px 0 8px; padding-left: 1.2em; }
.names.two { columns: 2; column-gap: 1.2em; }
.names li { break-inside: avoid; overflow-wrap: anywhere; }
.who-line.named { font-size: 1.05em; }
.card.lineup.tight .names { font-size: 12.5px; line-height: 1.25; }
.card.lineup.tight .hint, .card.lineup.tight .lbl { display: none; }
.card .hint { color: #4b585f; font-size: 13.5px; }
.gpage { background: #fff; color: #1d262b; padding: 16px; border: 1px solid #c9d1d5; }
.gpage h2 { margin: 0; font-size: 1.3rem; }
.g-top { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.grid-sheet { min-width: 680px; }
.grid-sheet th, .grid-sheet td { border: 1px solid #8a959b; padding: 6px; font-size: 14px; text-align: center; }
.grid-sheet td { height: 3.2em; }
.grid-sheet .notes { width: 28%; }
.grid-sheet .guess { width: 18%; }

/* scores */
.who { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.who .field { margin: 0; min-width: 12rem; flex: 1; max-width: 22rem; }
.scores { margin: 12px 0; }
.scores td, .scores th { padding: 6px 10px 6px 0; vertical-align: middle; }
.pts { max-width: 6em; }
/* phones: the guess list gets the full width under the points, so long names are not cut short */
@media (max-width: 480px) {
  .scores thead { display: none; }
  .scores tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--soft); }
  .scores td { padding: 0; border: 0; }
  .scores td:nth-child(2) { display: flex; align-items: center; gap: 10px; }
  .scores td:nth-child(2)::before { content: "Points (0 to 10)"; font-weight: 600; }
  .scores td:nth-child(3) { grid-column: 1 / -1; }
}
.reveal td, .reveal th { vertical-align: middle; }
.reveal td:nth-child(3), .key td:nth-child(2) { overflow-wrap: break-word; }
@media (max-width: 600px) {
  .reveal:not(.blank) thead { display: none; }
  .reveal:not(.blank) tr { display: grid; grid-template-columns: 2.2em 3.2em minmax(0, 1fr); gap: 0 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--soft); }
  .reveal:not(.blank) td { border: 0; padding: 2px 0; grid-column: 3; }
  .reveal:not(.blank) td:nth-child(1) { grid-column: 1; grid-row: 1 / span 3; font-weight: 700; }
  .reveal:not(.blank) td:nth-child(2) { grid-column: 2; grid-row: 1 / span 3; }
  .reveal:not(.blank) td[data-l]:empty { display: none; }
  .reveal:not(.blank) td[data-l]:not(:nth-child(1))::before { content: attr(data-l) ": "; color: var(--muted); }
}
.people { padding-left: 1.2em; }

/* guide */
.guide { padding-bottom: 32px; max-width: 980px; }
.guide p, .guide li { max-width: 72ch; }
.faq h3 { font-size: 1.08rem; margin: 1.3em 0 .3em; }
.faq p { margin: 0; }

.site-foot { border-top: 1px solid var(--line); padding: 20px 0 32px; color: var(--muted); font-size: .95rem; }
.sb-footer p { margin: 0 0 10px; }
.sb-more { line-height: 1.8; }
.sb-footer a { color: var(--ink); }
.print-root { display: none; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* ---------- print ---------- */
@page { margin: 0.4in; }
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  body > *:not(.print-root) { display: none !important; }
  .print-root { display: block !important; }
  .print-root, .print-root * { color: #000; }
  .p-doc { font-size: 11pt; line-height: 1.35; }
  .p-head h2 { font-size: 17pt; margin: 0 0 2pt; }
  .p-head p { margin: 0 0 10pt; color: #333; }
  .p-doc .host { font-weight: 700; margin: 0 0 6pt; }
  .p-doc .table-wrap { overflow: visible; margin-bottom: 6pt; }
  .p-doc table { width: calc(100% - 2px); margin-left: 1px; }
  .p-doc th, .p-doc td { border-bottom: 0.75pt solid #888; padding: 4pt 8pt 4pt 0; font-size: 10.5pt; }
  .p-doc thead th { color: #000; border-bottom: 1.2pt solid #000; }
  .p-doc thead { display: table-header-group; }
  .p-doc tr { break-inside: avoid; }
  .p-doc .nm { color: #333; font-size: 10pt; }
  .p-doc .code { width: 2.3em; height: 2.3em; font-size: 10pt; border: 1.3pt solid #000; color: #000; background: #fff; }
  .p-doc b.c { color: #000; }
  .p-doc .round { break-inside: auto; }
  .p-doc .round h3 { break-after: avoid; font-size: 12.5pt; margin: 12pt 0 4pt; }
  .p-doc .steps td.t { width: 6.4em; }
  .p-doc .steps td { padding: 1.5pt 8pt 1.5pt 0; font-size: 9.5pt; line-height: 1.28; }
  .p-doc p, .p-doc .warns { margin: 0 0 6pt; }
  .p-doc .key td { padding-top: 3pt; padding-bottom: 3pt; }
  .p-doc .steps thead { display: table-header-group; }
  .p-doc .steps thead th { font-size: 9pt; padding: 0 8pt 2pt 0; }
  .p-doc .warns { color: #000; }
  .p-doc .hint { color: #333; }
  .p-page + .p-page { break-before: page; }
  .cardsheet { display: grid; grid-template-columns: 3.6in 3.6in; grid-auto-rows: 3.3in; width: calc(7.2in + 1pt); margin: 0 auto; }
  .cardsheet { border-top: 1pt dashed #777; border-left: 1pt dashed #777; }
  .cardsheet .card { border: 0; border-right: 1pt dashed #777; border-bottom: 1pt dashed #777; border-radius: 0; padding: 0.08in 0.18in 0.04in; font-size: 10.5pt; overflow: hidden; }
  .card .c-top { margin-bottom: 1mm; }
  .card .code { border: 1.4pt solid #000; color: #000; }
  .card .code.big { font-size: 12pt; width: 2.1em; height: 2.1em; }
  /* rating circles 6 mm across, spread over the card, so they can be circled with a pen */
  .card .attrs th, .card .attrs td { padding: 0; height: 6.8mm; font-size: 10.5pt; }
  .card .attrs th { width: 6.2em; }
  .dots i { width: 6mm; height: 6mm; font-size: 7.5pt; border-color: #444; color: #333; }
  .card .lbl { margin-top: 3pt; }
  .card .line { height: 5.4mm; }
  .card .line.short { height: 1em; }
  .card .foot { margin-top: 0; }
  .card .foot + .foot { margin-top: 1.2mm; }
  .card .foot.notes { margin-top: 1mm; }
  .card .foot.notes + .line, .card .line + .line { margin-top: 0; }
  .card.lineup.tight .names { font-size: 9.5pt; }
  .card.lineup.tighter .names { font-size: 8.5pt; line-height: 1.15; }
  .card.lineup.tightest .names { font-size: 7.5pt; line-height: 1.12; margin-top: 2pt; }
  .card.lineup.tighter p, .card.lineup.tightest p { margin: 3pt 0; }
  .card .hint { color: #333; font-size: 9.5pt; }
  .line { border-bottom-color: #333; }
  .gpage { border: 0; padding: 0; }
  .gpage h2 { font-size: 16pt; }
  .grid-sheet { min-width: 0; width: calc(100% - 2px); margin-left: 1px; }
  .grid-sheet th, .grid-sheet td { border: 0.75pt solid #555; font-size: 10pt; padding: 4pt; }
  /* one page per guest: the sheet fills the page, every row at least 25 mm to write in */
  .p-page .gpage { display: flex; flex-direction: column; min-height: calc(100vh - 2px); }
  .p-page .grid-sheet { flex: 1 1 auto; table-layout: fixed; }
  .grid-sheet td { height: 12mm; vertical-align: middle; }
  .grid-sheet tr { break-inside: avoid; }
  .p-page .gpage.few { min-height: 0; }
  .p-page .gpage.few .grid-sheet { flex: none; }
  .gpage.few .grid-sheet td { height: 55mm; }
  .grid-sheet thead { display: table-header-group; }
  .grid-sheet th { font-size: 9pt; padding: 3pt 2pt; vertical-align: bottom; }
  .grid-sheet th:first-child { width: 11mm; }
  .grid-sheet th.at { width: 13.5mm; }
  .grid-sheet th:nth-last-child(3), .grid-sheet th:nth-last-child(2) { width: 14mm; }
  .grid-sheet .notes { width: auto; }
  .grid-sheet .guess { width: 30mm; }
  .grid-sheet .code { width: 2em; height: 2em; font-size: 9.5pt; }
  .grid-sheet .code { width: 2.3em; height: 2.3em; font-size: 10pt; border: 1.3pt solid #000; color: #000; }
  .reveal.blank td { height: 0.42in; }
  .reveal.blank th:nth-child(3), .reveal.blank th:nth-child(5) { width: 17%; }
  .reveal.blank th:nth-child(4) { width: 11%; }
}
.grid-sheet td.of { text-align: right; vertical-align: bottom; color: #4b585f; font-size: 12px; }
@media print { .grid-sheet td.of { vertical-align: bottom; font-size: 8.5pt; color: #333; padding-bottom: 3pt; } }
