/* The board, styled from board/design/Main.dc.html. Values come from tokens.css only. */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--text); font-family: var(--font); font-size: var(--fs-14); }
body { min-height: 100vh; overflow-x: hidden; }
a { color: var(--accent); } a:hover { color: var(--accent-hover); }
button { font: inherit; color: inherit; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
       padding: 14px var(--gutter); background: var(--card); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; min-width: 0; }
.brand .name { font-weight: 700; font-size: var(--fs-15); color: var(--text); text-decoration: none; }
.switch { font-size: var(--fs-14); color: var(--muted); margin-left: -14px; }
.switch select { appearance: none; -webkit-appearance: none; border: none; background: none; font: inherit; color: var(--muted); padding: 0; cursor: pointer; max-width: 60vw; }
#tabs { display: flex; gap: 4px; flex-wrap: wrap; }
#tabs a { padding: 8px 12px; border-radius: var(--r-8); color: var(--text); text-decoration: none; font-size: var(--fs-14); }
#tabs a:hover { background: var(--soft); }
#tabs a.on { background: var(--text); color: var(--card); font-weight: 500; }
.meter { display: flex; align-items: center; gap: 10px; font-size: var(--fs-13); color: var(--muted); }
.avatar { width: 32px; height: 32px; border-radius: var(--r-16); background: var(--accent-soft); color: var(--accent);
          display: flex; align-items: center; justify-content: center; font-weight: 600; }

/* page */
.wrap { display: flex; flex-wrap: wrap; gap: 20px; padding: 20px var(--gutter); max-width: 1440px; margin: 0 auto; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-18); padding: 20px; }
.coming { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; }
.coming h1 { margin: 0; font-size: var(--fs-20); font-weight: 600; }
.muted { color: var(--muted); }
.alert { color: var(--red); }

/* Decide: queue */
.queue { flex: 1 1 320px; max-width: 380px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: var(--r-16); border: 1px solid var(--stroke); background: var(--card);
        font-size: var(--fs-13); color: var(--text); }
.chip.on { border-color: var(--text); background: var(--text); color: var(--card); }
.item { text-align: left; color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: var(--r-14);
        padding: 12px 14px; display: flex; gap: 12px; align-items: center; }
.item.on { border: 2px solid var(--accent); padding: 11px 13px; }
.thumb { width: 64px; height: 48px; border-radius: var(--r-8); flex: none; background: var(--clip) center / cover no-repeat; }
.lines { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kind { font-size: var(--fs-11); font-weight: 600; letter-spacing: 0.06em; color: var(--accent); }
.kind.request { color: var(--amber); }
.lines b { font-size: var(--fs-14); font-weight: 600; }
.lines small { font-size: var(--fs-12); color: var(--muted); }
.send-all { height: 44px; border-radius: var(--r-12); border: none; background: var(--text); color: var(--card);
            font-size: var(--fs-14); font-weight: 600; margin-top: 6px; }
.send-all:disabled { cursor: default; }

/* Decide: card */
.card { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.head > div { display: flex; flex-direction: column; gap: 4px; }
.head h1 { margin: 0; font-size: var(--fs-26); font-weight: 600; }
.try { height: 44px; padding: 0 18px; border-radius: var(--r-12); border: none; background: var(--text); color: var(--card);
       display: flex; align-items: center; gap: 8px; font-size: var(--fs-14); font-weight: 600; text-decoration: none; }
.try:hover { color: var(--card); background: var(--accent-hover); }

.clip { position: relative; height: 380px; border-radius: var(--r-14); background: var(--clip); overflow: hidden; }
.clip .stage { position: absolute; inset: 0; }
/* media keeps its own aspect: full height, centred, cropped at the sides; marks map to the element's own box */
.clip video, .clip canvas { position: absolute; top: 0; left: 50%; height: 100%; width: auto; max-width: none; transform: translateX(-50%); }
.media { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.clip .label { position: absolute; left: 14px; top: 14px; font-size: var(--fs-12); color: var(--clip-text);
               background: var(--scrim-soft); padding: 4px 8px; border-radius: 6px; pointer-events: none; }
.clip .pin { position: absolute; width: 26px; height: 26px; border-radius: 13px; background: var(--amber-mark); color: var(--text);
             font-size: var(--fs-12); font-weight: 700; display: flex; align-items: center; justify-content: center;
             transform: translate(-50%, -50%); pointer-events: none; }
.tools { position: absolute; right: 14px; top: 14px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px;
         background: var(--glass); border-radius: var(--r-10); padding: 4px; max-width: calc(100% - 28px); }
.tools button { width: 36px; height: 36px; border: none; border-radius: var(--r-8); background: none; display: flex;
                align-items: center; justify-content: center; font-size: var(--fs-11); font-weight: 600; color: var(--text); }
.tools button.on { background: var(--accent-soft); }
.tools .dot { width: 16px; height: 16px; border-radius: var(--r-8); display: block; }
.tools hr { width: 1px; height: 24px; margin: 6px 2px; border: none; background: var(--stroke); }
.timeline { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px; background: var(--scrim);
            display: flex; align-items: center; gap: 12px; }
.play { width: 36px; height: 36px; border-radius: var(--r-18); border: none; background: var(--card); flex: none;
        display: flex; align-items: center; justify-content: center; }
.scrub { flex: 1; position: relative; height: 6px; border-radius: 3px; background: var(--track); cursor: pointer; touch-action: none; }
.scrub::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px; }
.scrub .fill { position: absolute; left: 0; top: 0; height: 6px; border-radius: 3px; background: var(--card); }
.scrub .mark { position: absolute; top: -4px; width: 4px; height: 14px; background: var(--amber-mark); border-radius: 2px; }
.time { font-family: var(--mono); font-size: var(--fs-12); color: var(--card); }
.rates { display: flex; gap: 4px; }
.rates button { height: 30px; padding: 0 8px; border-radius: 6px; border: none; background: var(--glass-soft);
                font-size: var(--fs-12); color: var(--card); }
.rates button.on { background: var(--card); color: var(--text); }

.measures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.measures div { background: var(--tile); border-radius: var(--r-12); padding: 12px 14px; }
.measures span { display: block; font-size: var(--fs-12); color: var(--muted); }
.measures b { display: block; font-family: var(--mono); font-size: var(--fs-20); font-weight: 400; margin-top: 4px; }
.prior { font-size: var(--fs-13); color: var(--muted); }

.answers { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.answers > button { height: 48px; padding: 0 18px; border-radius: var(--r-12); border: 1px solid var(--border);
                    background: var(--quiet); color: var(--text); font-size: var(--fs-15); }
.answers > button.approve { padding: 0 28px; border: none; background: var(--accent); color: var(--card); font-weight: 600; }
.answers > button.approve:hover { background: var(--accent-hover); }
.answers > button.change { padding: 0 22px; border-color: var(--outline); background: var(--card); font-weight: 600; }
.answers > button.reject { color: var(--red); }
.answers > button.on { outline: 2px solid var(--text); outline-offset: 2px; }
.note { flex: 1 1 260px; height: 48px; border-radius: var(--r-12); border: 1px solid var(--border); display: flex;
        align-items: center; padding: 0 14px; gap: 8px; }
.note input { flex: 1; min-width: 0; border: none; outline: none; font: inherit; font-size: var(--fs-14); background: none; color: var(--text); }
.note button { border: none; background: none; padding: 0; display: flex; }
.foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font-size: var(--fs-13); }
.foot button { border: none; background: none; padding: 0; color: var(--accent); font-size: var(--fs-13); }
.foot button:hover { color: var(--accent-hover); }
.foot button:disabled { color: var(--muted); cursor: default; }
details summary { cursor: pointer; color: var(--accent); }
details[open] { flex: 1 1 100%; }
.targets { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.targets div { display: grid; grid-template-columns: 160px 1fr auto; gap: 10px; align-items: center; }
.targets i { display: block; height: 6px; border-radius: 3px; background: var(--green); }
.targets i.over { background: var(--amber); }
.targets em { font-style: normal; font-family: var(--mono); font-size: var(--fs-12); color: var(--muted); }

@media (max-width: 600px) {
  .switch { margin-left: 0; }
  .queue { max-width: none; }
  .clip { height: auto; display: flex; flex-direction: column; }
  .clip .stage { position: relative; height: 240px; }
  .tools { position: static; max-width: none; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; border-radius: 0; }
  .tools button { flex: none; }
  .timeline { position: static; flex-wrap: wrap; }
  .scrub { flex: 1 1 140px; }
  .measures { grid-template-columns: 1fr; }
  .targets div { grid-template-columns: 1fr; gap: 4px; }
  .answers > button { flex: 1 1 auto; }
}
