/* 또삼 (provisional). Source: subway platform LED destination board. Grammar in docs/DESIGN.md; every colour is a token here. */
:root {
  --wall: #16191d;     /* station wall, page */
  --panel: #1f2329;    /* sign panels, cards */
  --line: #3a414a;     /* frames, rules */
  --ink: #eceff2;      /* text */
  --sub: #a4adb8;      /* second text */
  --housing: #0b0c0e;  /* board body */
  --field: #050506;    /* LED field (unlit) */
  --led: #ff8a1f;      /* amber LED: board text, 글쎄, the one filled button */
  --led-g: #3fd67f;    /* green LED: 또 삼 */
  --led-r: #ff5a4f;    /* red LED: 안 삼 */
  --op: #b9a6ff;       /* 운영자 후기 badge */
  --on-led: #111111;   /* text on the amber fill */
  --hint: #8b949f;     /* placeholder text */
  --paper: #ffffff;    /* order screenshot backing in the admin queue */
  --r: 3px; --gap: 16px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--wall); color: var(--ink); font: 16px/1.55 var(--font); word-break: keep-all; overflow-wrap: break-word; }
a { color: inherit; }
main { max-width: 860px; margin: 0 auto; padding: 0 var(--gap) 48px; }
h1 { font-size: 26px; line-height: 1.25; margin: 20px 0 8px; }
h2 { font-size: 18px; margin: 28px 0 10px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sub, .meta, .src { color: var(--sub); font-size: 13px; }
.none, .loading { color: var(--sub); }

/* header */
.top { max-width: 860px; margin: 0 auto; padding: 12px var(--gap); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 19px; text-decoration: none; min-height: 40px; }
.brand svg { width: 28px; height: 28px; }
.bname { display: flex; flex-direction: column; line-height: 1.15; }
.brand small { font-weight: 400; font-size: 12px; color: var(--sub); margin-top: 2px; }
.acts { display: flex; gap: 8px; flex: none; }
.acts .btn { white-space: nowrap; }

/* buttons and inputs: square-ish, never pills */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); border-radius: var(--r); font: inherit; font-size: 15px; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--led); color: var(--on-led); border-color: var(--led); font-weight: 700; }
.btn.led { border-color: var(--led); color: var(--led); font-weight: 700; }
.btn.on { border-color: var(--led-g); box-shadow: inset 0 0 0 1px var(--led-g); }
.btn.big { min-height: 52px; width: 100%; font-size: 17px; font-weight: 700; }
.btn:active, .btn.pressed { transform: translateY(1px); filter: brightness(.85); }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, .link:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .tip:focus-visible { outline: 2px solid var(--led); outline-offset: 2px; }
.link { background: none; border: 0; padding: 0; min-height: 24px; font: inherit; color: var(--sub); text-decoration: underline; cursor: pointer; }
input, textarea, select { font: inherit; color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; width: 100%; }
input::placeholder, textarea::placeholder { color: var(--hint); }
input[type="radio"], input[type="checkbox"] { width: auto; padding: 0; accent-color: var(--led); }
textarea { resize: vertical; }
.tip { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: var(--r);
  font-size: 13px; color: var(--sub); cursor: help; vertical-align: 2px; margin-left: 4px; }
.tipbox { position: absolute; z-index: 20; background: var(--housing); color: var(--ink); border: 1px solid var(--led); border-radius: var(--r); padding: 8px 10px; font-size: 14px; }

/* ---- the LED board (home) ---- */
.board { margin: 12px 0 0; background: var(--housing); border: 1px solid #2a2e33; border-radius: var(--r); padding: 10px 10px 0;
  box-shadow: 0 2px 0 #000, inset 0 0 0 4px #121418; }
.bhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 6px 8px; }
.bhead .led { font-size: 24px; font-weight: 700; }
.bback { background: none; border: 1px solid var(--line); color: var(--sub); border-radius: var(--r); min-height: 32px; padding: 0 10px; font: inherit; font-size: 14px; cursor: pointer; }
.led { color: var(--led); text-shadow: 0 0 1px currentColor; }
.brows { list-style: none; margin: 0; padding: 0; background: var(--field); position: relative; }
/* dot mask over the LED field: text reads as lit dots */
.brows::after, .marquee::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle, transparent 1px, rgba(5,5,6,.6) 1.45px) 0 0 / 3px 3px; }
.brow { border-bottom: 1px solid #15171a; }
.brow > a:not(.bact), .brow.wait { display: grid; grid-template-columns: 4.2em minmax(0, 1fr) auto; gap: 0 10px; align-items: baseline; padding: 10px 8px; text-decoration: none; min-height: 48px; }
.brow .v { font-weight: 700; } .brow .v.count { color: var(--ink); } .brow .v.yes { color: var(--led-g); } .brow .v.no { color: var(--led-r); } .brow .v.unsure { color: var(--led); }
.brow .name { font-weight: 700; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow .when, .brow .ago { color: var(--sub); text-shadow: none; position: relative; z-index: 1; }
.brow .when { font-size: 14px; grid-column: 3; grid-row: 1; text-align: right; white-space: nowrap; }
.brow .ago { font-size: 13px; grid-column: 3; grid-row: 2; text-align: right; white-space: nowrap; }
.brow .q { grid-column: 2 / 3; grid-row: 2; color: var(--ink); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; z-index: 1; }
.brow.wait { grid-template-columns: minmax(0, 1fr) auto; font-size: 17px; font-weight: 700; }
.bact { position: relative; z-index: 1; color: var(--ink); font-size: 15px; font-weight: 400; min-height: 32px; display: inline-flex; align-items: center; white-space: nowrap; border: 1px solid var(--ink); border-radius: var(--r); padding: 0 12px; text-decoration: none; }
.board.seek .bhead .led { color: var(--ink); }
.marquee { position: relative; overflow: hidden; white-space: nowrap; background: var(--field); border-top: 2px solid var(--housing); padding: 8px 0; margin: 0 0 10px; }
.marquee span { display: inline-block; padding-left: 100%; color: var(--led); font-size: 18px; font-weight: 700; animation: run 34s linear infinite; }
@keyframes run { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .marquee span { animation: none; padding-left: 8px; white-space: normal; } }

.brow.sample { position: relative; outline: 2px dashed var(--sub); outline-offset: -4px; padding-top: 6px; }
.sbadge { position: relative; z-index: 2; display: inline-block; margin: 8px 8px 0; background: var(--ink); color: var(--housing); font-weight: 700; font-size: 15px; padding: 2px 10px; border-radius: var(--r); }
.srow { display: grid; grid-template-columns: 4.2em minmax(0, 1fr) auto; gap: 0 10px; align-items: baseline; padding: 6px 8px 10px; }
.srow .when, .srow .ago { grid-column: 3; text-align: right; } .srow .when { grid-row: 1; } .srow .ago { grid-row: 2; }
.acts2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 0; }
.acts2 .btn { flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; min-height: 60px; font-weight: 700; }
.acts2 .btn small { font-weight: 400; font-size: 13px; color: var(--sub); }
.search { display: flex; gap: 8px; margin: 12px 0 0; }
.search input { font-size: 17px; min-height: 52px; }
.search .btn { min-height: 52px; min-width: 88px; font-size: 17px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 14px 8px; margin-top: 16px; }
.panel h2 { margin: 12px 0 6px; font-size: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.results, .ticker, .waiting, .plist, .reviews, .queue { list-style: none; padding: 0; margin: 0; }
.results li, .waiting li, .plist li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; min-height: 44px; align-items: center; }
.plist li:last-child { border-bottom: 0; }
.results li a, .plist li a, .waiting li a { text-decoration: none; }

/* verdict chips: coloured LED text on the dark field, not filled pills */
.verdict { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: var(--r); background: var(--field); color: var(--led); border: 1px solid currentColor; }
.verdict.yes { color: var(--led-g); } .verdict.no { color: var(--led-r); }

/* product page */
.product h1 { margin-bottom: 2px; }
.maker { margin: 0 0 12px; color: var(--sub); }
.rebuy { background: var(--housing); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.rbar { display: flex; height: 14px; border-radius: var(--r); overflow: hidden; background: var(--field); }
.rb.yes { background: var(--led-g); } .rb.no { background: var(--led-r); } .rb.unsure { background: var(--led); } .rb.none { background: var(--line); }
.rlegend { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: var(--r); margin-right: 4px; background: var(--led); }
.dot.yes { background: var(--led-g); } .dot.no { background: var(--led-r); }
.rebuy .sub { margin: 6px 0 0; }
.often { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13px; padding: 2px 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.buy { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.disclose { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--sub); }
.facts { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); }
.facts th, .facts td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 15px; }
.facts th { width: 7.5em; color: var(--sub); font-weight: 500; }
.facts .src { display: block; }
.facts a { color: var(--led); }
.ingr { display: block; font-size: 14px; }
.count { color: var(--sub); font-weight: 500; }
.rv { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-bottom: 10px; }
.rv:target { border-color: var(--led); }
.rvhead { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: var(--r); border: 1px solid var(--line); color: var(--sub); cursor: help; }
.badge.op { border-color: var(--op); color: var(--op); font-weight: 700; }
.badge.warn { border-color: var(--led-r); color: var(--led-r); }
.rv .body { margin: 8px 0; white-space: pre-wrap; overflow-wrap: break-word; }
.rvfoot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rvfoot .report { margin-left: auto; font-size: 13px; }
.per { font-size: 13px; color: var(--sub); }
.empty { background: var(--panel); border: 1px dashed var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.empty p { flex-basis: 100%; margin: 0 0 4px; }
.more { margin-top: 12px; }

/* write page */
.writer .step { border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); padding: 12px; margin: 0 0 12px; }
.writer legend { font-weight: 700; padding: 0 4px; cursor: help; }
.writer label { display: block; margin: 8px 0; font-size: 14px; color: var(--sub); }
.writer label input:not([type=radio]):not([type=checkbox]), .writer label textarea { margin-top: 4px; }
.writer details { margin-top: 8px; } .writer summary { cursor: pointer; color: var(--sub); min-height: 32px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid2 legend, .grid2 .seg { grid-column: 1 / -1; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; border: 0; }
.seg label, .chip, .vbtn { display: inline-flex !important; align-items: center; gap: 4px; margin: 0 !important; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: var(--r); color: var(--ink) !important; cursor: pointer; background: var(--field); min-height: 40px; }
.seg input, .chip input, .vbtn input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked), .chip:has(input:checked) { border-color: var(--led); color: var(--led) !important; box-shadow: inset 0 0 0 1px var(--led); }
.seg label:has(input:focus-visible), .chip:has(input:focus-visible), .vbtn:has(input:focus-visible) { outline: 2px solid var(--led); outline-offset: 2px; }
.verdicts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vbtn { justify-content: center; min-height: 52px; font-weight: 700; }
.vbtn.yes:has(input:checked) { border-color: var(--led-g); color: var(--led-g) !important; box-shadow: inset 0 0 0 2px var(--led-g); }
.vbtn.no:has(input:checked) { border-color: var(--led-r); color: var(--led-r) !important; box-shadow: inset 0 0 0 2px var(--led-r); }
.vbtn.unsure:has(input:checked) { border-color: var(--led); color: var(--led) !important; box-shadow: inset 0 0 0 2px var(--led); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.cg { flex-basis: 100%; font-size: 13px; color: var(--sub); }
.chip.hot { border-color: var(--led); }
.ready { border-left: 4px solid var(--led); background: var(--panel); border-radius: var(--r); padding: 10px 12px; margin: 0 0 14px; }
.ready p { margin: 2px 0 0; }
.writer .step > .meta { margin: 0 0 8px; }
.cnt { float: right; }
.oath { display: flex !important; gap: 8px; align-items: center; margin: 12px 0; }
.oath input { width: auto; }
.err { color: var(--led-r); font-weight: 700; }
.cropper canvas[data-canvas] { width: 100%; height: auto; touch-action: none; border: 1px solid var(--line); border-radius: var(--r); cursor: crosshair; }
.cropper .tools { display: flex; gap: 6px; margin: 8px 0; }
.cropper .hint { font-size: 13px; color: var(--sub); }
.cropper .out canvas { max-width: 100%; border: 1px solid var(--line); }
.cropper figcaption { font-size: 13px; color: var(--sub); }
.st { font-size: 12px; padding: 1px 6px; border-radius: var(--r); border: 1px solid var(--line); }
.st.live { border-color: var(--led-g); color: var(--led-g); } .st.rejected { border-color: var(--led-r); color: var(--led-r); }

.doc ul { padding-left: 1.2em; } .doc li { margin: 4px 0; }
.doc .facts td, .doc .facts th { font-size: 14px; width: auto; }

.qcard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-bottom: 12px; }
.qcard img { width: 100%; border: 1px solid var(--line); background: var(--paper); }
.row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.row input, .row select { width: auto; }

.foot { max-width: 860px; margin: 0 auto; padding: 24px var(--gap) 40px; border-top: 1px solid var(--line); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; }
.foot nav a, .foot nav .link { display: inline-flex; align-items: center; min-height: 32px; color: var(--sub); }
.fine { font-size: 12px; color: var(--sub); margin: 8px 0 0; }
dialog { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; width: min(92vw, 420px); }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog h2 { margin-top: 0; }
dialog label { display: flex; align-items: center; gap: 8px; margin: 6px 0; min-height: 40px; }
dialog .seg label { min-height: 40px; }
dialog menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; margin: 12px 0 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--housing); color: var(--led); border: 1px solid var(--led); padding: 10px 16px; border-radius: var(--r); z-index: 10; }

@media (max-width: 599px) {
  h1 { font-size: 24px; }
  .two, .grid2, .qcard { grid-template-columns: 1fr; }
  .bhead .led { font-size: 21px; }
  .brand small { font-size: 11px; }
  .acts .btn { padding: 8px 10px; }
  .brow > a:not(.bact), .srow { grid-template-columns: 3.6em minmax(0, 1fr); }
  .brow .when { grid-column: 2; grid-row: 2; text-align: left; }
  .brow .ago { grid-column: 1; grid-row: 2; text-align: left; }
  .brow .q { grid-column: 1 / -1; grid-row: 3; }
}

.panel .meta { margin: 0 0 4px; }
