/* Eight Seats. Flat panels, 1px borders, solid fills; the 3D room is the only thing that glows. */
:root {
  --ink: #0b0a09;
  --panel: #131211;
  --panel-2: #1a1917;
  --panel-3: #22201e;
  --panel-4: #2b2826;
  --line: #2b2825;
  --line-2: #3b3733;
  --text: #f0eae0;
  --text-2: #bdb4a7;
  --text-3: #8a8175;
  --accent: #e0523a;
  --accent-2: #f06a50;
  --accent-ink: #ffffff;
  --gold: #e0b154;
  --pos: #74c477;
  --neg: #ef6f63;
  --warn: #e9a640;
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --good: #0ca30c;
  --critical: #d03b3b;
  --hud-h: 56px;
  --foot-h: 30px;
  --radius: 8px;
  --display: 'Shippori Mincho B1', 'Hiragino Mincho ProN', 'Yu Mincho', Georgia, serif;
  --sans: 'Zen Kaku Gothic New', 'Hiragino Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'DM Mono', ui-monospace, Menlo, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
.num {
  font-variant-numeric: tabular-nums;
}

#view {
  position: fixed;
  inset: 0;
  z-index: 0;
  touch-action: none;
}
#view canvas {
  display: block;
  width: 100%;
  height: 100%;
}
#overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

/* ---------- HUD ---------- */
#hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--hud-h);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
}
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.brand-sub {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}
.phases {
  display: flex;
  gap: 4px;
  margin: 0 auto;
}
.phase {
  font-size: 12px;
  color: var(--text-3);
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  white-space: nowrap;
}
.phase.on {
  color: var(--text);
  border-color: var(--line-2);
  background: var(--panel-2);
}
.phase.done {
  color: var(--text-2);
}
.stats {
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}
.stat .k {
  font-size: 11px;
  color: var(--text-3);
}
.stat .v {
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat .v.neg {
  color: var(--neg);
}
.stars {
  color: var(--gold);
  letter-spacing: 1px;
}
.iconbtn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  display: inline-grid;
  place-items: center;
  padding: 0;
}
.iconbtn:hover {
  border-color: var(--text-3);
}
.iconbtn svg {
  width: 18px;
  height: 18px;
}
.speed {
  display: flex;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  overflow: hidden;
}
.speed button {
  background: var(--panel-2);
  border: 0;
  border-right: 1px solid var(--line-2);
  padding: 0 10px;
  height: 34px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  min-width: 38px;
}
.speed button:last-child {
  border-right: 0;
}
.speed button.on {
  background: var(--text);
  color: var(--ink);
}
.clock {
  white-space: nowrap;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 86px;
  text-align: right;
}

/* ---------- footer credit (always on screen) ---------- */
#credit {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--foot-h);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-3);
  background: var(--ink);
  border-top: 1px solid var(--line);
}
#credit a {
  color: var(--text-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}
#credit a:hover {
  color: var(--text);
}

/* ---------- generic ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: var(--panel-3);
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.btn:hover {
  border-color: var(--text-3);
  background: var(--panel-4);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn.primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
}
.btn.light {
  background: var(--text);
  border-color: var(--text);
  color: var(--ink);
}
.btn.big {
  height: 52px;
  font-size: 16px;
  padding: 0 22px;
}
.btn.sm {
  height: 30px;
  padding: 0 10px;
  font-size: 12.5px;
}
.btn.ghost {
  background: transparent;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}
.chip.good {
  color: var(--pos);
  border-color: #2e4a2f;
}
.chip.bad {
  color: var(--neg);
  border-color: #5a2a26;
}
.chip.warn {
  color: var(--warn);
  border-color: #5a4320;
}
.chip.gold {
  color: var(--gold);
  border-color: #5a4a20;
}
.muted {
  color: var(--text-3);
}
.dim {
  color: var(--text-2);
}
.pos {
  color: var(--pos);
}
.neg {
  color: var(--neg);
}
.warn {
  color: var(--warn);
}
.gold {
  color: var(--gold);
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
}
.display {
  font-family: var(--display);
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 14px 0;
}
.hidden {
  display: none !important;
}
input[type='range'] {
  accent-color: var(--accent);
  width: 100%;
}
input[type='number'] {
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 4px 8px;
  width: 80px;
  text-align: right;
}
.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--panel-4);
  border: 1px solid var(--line-2);
  flex: none;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-3);
  transition: transform 0.15s, background 0.15s;
}
.toggle.on {
  background: var(--accent);
  border-color: var(--accent);
}
.toggle.on::after {
  transform: translateX(18px);
  background: #fff;
}

/* ---------- panels ---------- */
.panel {
  position: fixed;
  z-index: 10;
  background: var(--panel);
  border: 1px solid var(--line);
}
.scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.card + .card {
  margin-top: 10px;
}
.card h3 {
  font-size: 14px;
  margin-bottom: 8px;
}
.sect-title {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.sect-sub {
  color: var(--text-3);
  font-size: 13px;
  margin-top: 2px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.row.between {
  justify-content: space-between;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.grid4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.tile {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  min-width: 0;
}
.tile .k {
  font-size: 12px;
  color: var(--text-3);
}
.tile .v {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile .d {
  font-size: 12px;
  color: var(--text-2);
}
table.t {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.t th {
  text-align: left;
  font-weight: 500;
  color: var(--text-3);
  font-size: 12px;
  padding: 6px 6px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.t td {
  padding: 7px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.t tr:last-child td {
  border-bottom: 0;
}
table.t .r {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
table.t tr.total td {
  font-weight: 700;
  border-top: 1px solid var(--line-2);
}
table.t tr.sub td {
  color: var(--text-2);
}
table.t td.ind {
  padding-left: 18px;
  color: var(--text-2);
}
.bar {
  height: 6px;
  border-radius: 3px;
  background: var(--panel-4);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  background: var(--s1);
  border-radius: 3px;
}

/* ---------- title ---------- */
#title {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 56px calc(var(--foot-h) + 56px);
  pointer-events: none;
}
#title > * {
  pointer-events: auto;
}
.logo {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(56px, 9vw, 120px);
  line-height: 0.95;
  letter-spacing: 0.02em;
}
.logo small {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-top: 16px;
}
.title-copy {
  max-width: 520px;
  color: var(--text-2);
  margin: 22px 0 26px;
  font-size: 16px;
}
.title-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.title-plate {
  background: rgba(11, 10, 9, 0.86);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px 30px;
  max-width: 640px;
}
.title-meta {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- morning ---------- */
#morning {
  top: var(--hud-h);
  bottom: var(--foot-h);
  left: 0;
  width: 620px;
  border-left: 0;
  border-top: 0;
  border-bottom: 0;
  display: flex;
}
.tabs {
  width: 82px;
  flex: none;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 8px 6px;
  gap: 2px;
  overflow-y: auto;
  scrollbar-width: none;
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 2px 7px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-3);
  font-size: 11px;
  position: relative;
}
.tab svg {
  width: 21px;
  height: 21px;
}
.tab:hover {
  color: var(--text);
  background: var(--panel-2);
}
.tab.on {
  color: var(--text);
  background: var(--panel-3);
  border-color: var(--line-2);
}
.tab .dot {
  position: absolute;
  top: 6px;
  right: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.tabbody {
  flex: 1;
  min-width: 0;
  padding: 18px 18px 28px;
}
.tabhead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

#tonight {
  right: 16px;
  bottom: calc(var(--foot-h) + 16px);
  width: 360px;
  border-radius: 12px;
  padding: 16px;
}
#tonight h3 {
  font-family: var(--display);
  font-size: 20px;
}
.checklist {
  list-style: none;
  margin: 10px 0 12px;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 13.5px;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
}
.checklist .ck {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  flex: none;
  display: grid;
  place-items: center;
}
.checklist li.ok .ck {
  background: var(--pos);
  border-color: var(--pos);
}
.checklist li.ok .ck::after {
  content: '';
  width: 8px;
  height: 4px;
  border-left: 2px solid #0b0a09;
  border-bottom: 2px solid #0b0a09;
  transform: rotate(-45deg) translate(1px, -1px);
}
.checklist li.bad .ck {
  border-color: var(--neg);
}
.news {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
}

/* market */
.fishcard {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.fishcard:last-child {
  border-bottom: 0;
}
.fishswatch {
  width: 64px;
  height: 40px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line-2);
}
.fishname {
  font-weight: 700;
}
.fishname .jp {
  font-family: var(--display);
  color: var(--text-3);
  font-weight: 500;
  margin-left: 6px;
}
.lot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  flex-wrap: wrap;
}
.buy {
  display: flex;
  align-items: center;
  gap: 6px;
}
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  overflow: hidden;
  height: 30px;
}
.stepper button {
  width: 28px;
  height: 100%;
  border: 0;
  background: var(--panel-3);
  font-weight: 700;
}
.stepper span {
  min-width: 46px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.stallbar {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  overflow: hidden;
}
.seg button {
  border: 0;
  background: var(--panel-2);
  padding: 7px 12px;
  font-size: 13px;
  color: var(--text-2);
  border-right: 1px solid var(--line-2);
}
.seg button:last-child {
  border-right: 0;
}
.seg button.on {
  background: var(--text);
  color: var(--ink);
  font-weight: 700;
}

/* menu */
.menurow {
  display: grid;
  grid-template-columns: 40px 1fr 92px 64px 70px;
  gap: 8px;
  align-items: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.menurow.head {
  color: var(--text-3);
  font-size: 12px;
}
.menurow .price {
  display: flex;
  align-items: center;
  gap: 4px;
}
.menurow .price input {
  width: 64px;
}
.menurow.off {
  opacity: 0.5;
}
.menucat {
  margin: 16px 0 4px;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* staff */
.person {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: start;
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}
.meters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.meters .k {
  font-size: 11px;
  color: var(--text-3);
}
.days {
  display: flex;
  gap: 3px;
  margin-top: 8px;
}
.days button {
  width: 30px;
  height: 24px;
  font-size: 11px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text-3);
  padding: 0;
}
.days button.on {
  background: var(--text);
  color: var(--ink);
  border-color: var(--text);
  font-weight: 700;
}

/* upgrades */
.up {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.up .what {
  font-size: 13px;
  color: var(--text-2);
}
.owned {
  color: var(--pos);
  font-weight: 700;
  font-size: 13px;
}

/* ---------- service ---------- */
#live {
  top: calc(var(--hud-h) + 12px);
  right: 12px;
  bottom: calc(var(--foot-h) + 12px);
  width: 360px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}
#live .scroll {
  padding: 14px;
  flex: 1;
}
.kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.kpis .tile .v {
  font-size: 20px;
}
.rail {
  position: fixed;
  z-index: 9;
  top: calc(var(--hud-h) + 12px);
  left: 12px;
  right: 384px;
  display: flex;
  gap: 8px;
  overflow: hidden;
  pointer-events: none;
}
.ticket {
  flex: none;
  width: 126px;
  background: #f1ebde;
  color: #1c1814;
  border-radius: 4px;
  padding: 7px 8px 8px;
  font-size: 12px;
  line-height: 1.25;
  border-top: 4px solid #1c1814;
  pointer-events: auto;
}
.ticket .tt {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: #5a5248;
}
.ticket .it {
  font-weight: 700;
  margin-top: 3px;
}
.ticket.late {
  border-top-color: var(--accent);
}
.ticket.late .tt b {
  color: #b3321f;
}
.ticket.mine {
  outline: 2px solid var(--gold);
}
.ticket .who {
  color: #6a6157;
  font-size: 11px;
}
#feed:empty {
  display: none;
}
#feed {
  left: 12px;
  bottom: calc(var(--foot-h) + 12px);
  width: 380px;
  max-height: 34vh;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  overflow: hidden;
  font-size: 13px;
}
.feedline {
  display: flex;
  gap: 8px;
  color: var(--text-2);
}
.feedline time {
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 11.5px;
  flex: none;
  padding-top: 1px;
}
.feedline.good span {
  color: var(--pos);
}
.feedline.bad span {
  color: var(--neg);
}
.feedline.warn span {
  color: var(--warn);
}
.feedline.gold span {
  color: var(--gold);
}
#takeboard {
  position: fixed;
  z-index: 11;
  right: 396px;
  bottom: calc(var(--foot-h) + 14px);
}
.minibar {
  display: flex;
  height: 8px;
  gap: 2px;
}
.minibar i {
  display: block;
  height: 100%;
  border-radius: 2px;
}
.qline {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
}
.qline:last-child {
  border-bottom: 0;
}

/* bubbles over heads */
.bubble {
  position: absolute;
  left: 0;
  top: 0;
  padding: 4px 9px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  background: #f1ebde;
  color: #1c1814;
  will-change: transform;
}
.bubble.bad {
  background: #3a1612;
  color: #ffb3a8;
  border: 1px solid #6a2a22;
}
.bubble.good {
  background: #1d3a1e;
  color: #b8f0b8;
  border: 1px solid #2e5a2f;
}
.bubble.gold {
  background: #3a2e12;
  color: #ffe2a3;
  border: 1px solid #6a5420;
}
.money {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
  font-size: 15px;
  color: #ffe08a;
  will-change: transform;
  -webkit-text-stroke: 3px rgba(11, 10, 9, 0.85);
  paint-order: stroke fill;
}

/* ---------- board mode ---------- */
#board {
  position: fixed;
  inset: var(--hud-h) 0 var(--foot-h) 0;
  z-index: 10;
  pointer-events: none;
}
#board > * {
  pointer-events: auto;
}
.queue {
  position: absolute;
  left: 12px;
  top: 12px;
  bottom: 12px;
  width: 270px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}
.queue .scroll {
  padding: 10px;
  flex: 1;
  display: grid;
  gap: 6px;
  align-content: start;
}
.qitem {
  text-align: left;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  border-radius: 8px;
  padding: 9px 10px;
  display: grid;
  gap: 2px;
}
.qitem:hover {
  border-color: var(--text-3);
}
.qitem.on {
  border-color: var(--gold);
  background: var(--panel-3);
}
.qitem .n {
  font-weight: 700;
}
.qitem .m {
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  justify-content: space-between;
}
.qitem.late .m b {
  color: var(--neg);
}
.steps {
  position: absolute;
  left: 50%;
  top: 14px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: min(620px, calc(100% - 600px));
  text-align: center;
}
.stepdots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.stepdots span {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(11, 10, 9, 0.82);
  border: 1px solid var(--line-2);
  color: var(--text-3);
}
.stepdots span.on {
  background: var(--text);
  color: var(--ink);
  border-color: var(--text);
  font-weight: 700;
}
.stepdots span.done {
  color: var(--pos);
}
.hint {
  background: rgba(11, 10, 9, 0.86);
  border: 1px solid var(--line-2);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
}
.itemtitle {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  background: rgba(11, 10, 9, 0.82);
  padding: 2px 14px;
  border-radius: 8px;
}
.boardbtns {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: calc(100% - 600px);
}
.fillchips {
  position: absolute;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  max-width: min(640px, calc(100% - 600px));
}
.fillchip {
  height: 38px;
  padding: 0 12px 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(19, 18, 17, 0.94);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
}
.fillchip i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.fillchip.used {
  opacity: 0.45;
}
.ricebar {
  position: absolute;
  right: 312px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 200px;
  border-radius: 6px;
  background: rgba(11, 10, 9, 0.8);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.ricebar i {
  display: block;
  width: 100%;
  background: #f4f1ea;
}
.ricebar-label {
  position: absolute;
  right: 300px;
  top: calc(50% + 110px);
  font-size: 11px;
  color: var(--text-2);
  width: 40px;
  text-align: center;
}
.meter {
  position: fixed;
  z-index: 12;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.flash {
  position: absolute;
  left: 50%;
  top: 168px;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  font-weight: 800;
}
.flash {
  background: rgba(11, 10, 9, 0.86);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 8px 18px 10px;
  min-width: 160px;
}
.flash:empty {
  display: none;
}
.flash .w {
  font-family: var(--display);
  font-size: 28px;
  color: #fff;
}
.flash .s {
  font-size: 20px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.flash.bad .w {
  color: #ff9d90;
}
.scorecard {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 280px;
  border-radius: 12px;
  padding: 14px;
}
.bigscore {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.partline {
  display: grid;
  grid-template-columns: 80px 1fr 34px;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  margin-top: 6px;
}
.backbtn {
  position: absolute;
  right: 12px;
  bottom: 12px;
}
.boardclock {
  position: absolute;
  right: 12px;
  bottom: 64px;
  width: 280px;
  font-size: 12.5px;
  color: var(--text-2);
  padding: 10px 12px;
  border-radius: 10px;
}

/* ---------- report ---------- */
#report {
  position: fixed;
  z-index: 15;
  top: var(--hud-h);
  bottom: var(--foot-h);
  left: 0;
  right: 0;
  overflow-y: auto;
  background: rgba(11, 10, 9, 0.74);
}
.report-inner {
  max-width: 1120px;
  margin: 24px auto 40px;
  padding: 0 16px;
}
.report-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.hero {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cols {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 12px;
  align-items: start;
}
.fixes {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.fixes li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 8px;
  font-size: 14px;
}
.fixes li b {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.review {
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  font-size: 13.5px;
}
.review:last-child {
  border-bottom: 0;
}
.review .who {
  font-size: 12px;
  color: var(--text-3);
}
.chart {
  width: 100%;
  display: block;
}
.chart text {
  fill: var(--text-3);
  font-size: 11px;
  font-family: var(--sans);
}
.chart .grid {
  stroke: #2a2724;
  stroke-width: 1;
}
.legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-2);
  flex-wrap: wrap;
}
.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -1px;
}
.tip {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 12.5px;
  max-width: 240px;
}
.tip b {
  display: block;
}

/* ---------- modal ---------- */
#modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(11, 10, 9, 0.72);
  padding: 16px;
}
.modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  border-radius: 14px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line-2);
}
.modal h2 {
  font-family: var(--display);
  font-size: 26px;
}
.auction-board {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.bidprice {
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.bidder {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.bidder.lead {
  color: var(--gold);
  font-weight: 700;
}
.bidder.out {
  color: var(--text-3);
  text-decoration: line-through;
}
.hammer {
  height: 6px;
  border-radius: 3px;
  background: var(--panel-4);
  overflow: hidden;
  margin-top: 12px;
}
.hammer i {
  display: block;
  height: 100%;
  background: var(--accent);
}
.toast {
  position: fixed;
  z-index: 70;
  left: 50%;
  bottom: calc(var(--foot-h) + 80px);
  transform: translateX(-50%);
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  max-width: calc(100vw - 32px);
}
.toast.bad {
  border-color: #6a2a22;
}
.coach {
  position: fixed;
  z-index: 45;
  background: var(--text);
  color: var(--ink);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  max-width: 320px;
  font-weight: 500;
}
.coach b {
  display: block;
  margin-bottom: 2px;
}
.coach .row {
  margin-top: 8px;
}

/* ---------- phones and small tablets ---------- */
@media (max-width: 900px) {
  #morning {
    width: 100%;
    top: auto;
    height: 70vh;
    height: 70svh;
    border-right: 0;
    border-top: 1px solid var(--line);
    flex-direction: column;
  }
  .tabs {
    width: auto;
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px;
  }
  .tab {
    min-width: 74px;
    font-size: 10.5px;
  }
  .tabbody {
    padding: 14px 14px 140px;
  }
  #tonight {
    left: 10px;
    right: 10px;
    width: auto;
    bottom: calc(var(--foot-h) + 8px);
    padding: 10px 12px;
    z-index: 12;
  }
  #tonight .checklist,
  #tonight .news,
  #tonight .tonight-extra,
  #tonight .tonight-head,
  #tonight .tonight-sub {
    display: none;
  }
  #tonight {
    padding: 8px;
  }
  #tonight .row {
    margin-top: 0 !important;
  }
  #live {
    top: auto;
    left: 0;
    right: 0;
    width: auto;
    height: 46vh;
    height: 46svh;
    bottom: var(--foot-h);
    border-radius: 12px 12px 0 0;
  }
  .rail {
    right: 12px;
    top: calc(var(--hud-h) + 8px);
  }
  .ticket {
    width: 104px;
    font-size: 11px;
  }
  #feed {
    display: none;
  }
  #takeboard {
    right: 12px;
    bottom: calc(46svh + var(--foot-h) + 10px);
  }
  .queue {
    top: auto;
    bottom: 8px;
    left: 8px;
    right: 8px;
    width: auto;
    height: 132px;
  }
  .queue .scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .qitem {
    min-width: 150px;
  }
  .scorecard {
    top: auto;
    bottom: 150px;
    right: 8px;
    width: 150px;
    padding: 10px;
  }
  .scorecard .partline,
  .scorecard .notes,
  .scorecard .muted {
    display: none;
  }
  #board.playing .queue,
  #board.playing .scorecard {
    display: none;
  }
  .bigscore {
    font-size: 34px;
  }
  .backbtn {
    top: 8px;
    right: 8px;
    bottom: auto;
  }
  .boardclock {
    display: none;
  }
  .steps {
    top: 54px;
    max-width: calc(100% - 20px);
    gap: 6px;
  }
  .itemtitle {
    font-size: 18px;
  }
  .stepdots span {
    font-size: 11px;
    padding: 3px 8px;
  }
  .hint {
    font-size: 13px;
    padding: 6px 10px;
  }
  .boardbtns {
    bottom: 12px;
    max-width: calc(100% - 20px);
  }
  .fillchips {
    left: 8px;
    right: 8px;
    bottom: 64px;
    transform: none;
    max-width: none;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .fillchip {
    height: 34px;
    font-size: 12px;
    flex: none;
  }
  .flash {
    top: 150px;
    min-width: 120px;
    padding: 6px 12px 8px;
  }
  .flash .w {
    font-size: 21px;
  }
  .flash .s {
    font-size: 16px;
  }
  .ricebar {
    right: 14px;
    height: 140px;
  }
  .ricebar-label {
    right: 0;
    top: calc(50% + 78px);
  }
  .cols {
    grid-template-columns: 1fr;
  }
  .grid4 {
    grid-template-columns: 1fr 1fr;
  }
  .hero {
    font-size: 42px;
  }
}
@media (max-width: 640px) {
  :root {
    --hud-h: 50px;
    --foot-h: 28px;
  }
  #hud {
    gap: 10px;
    padding: 0 10px;
  }
  .brand-name,
  .brand-sub,
  .phases {
    display: none;
  }
  .stats {
    gap: 10px;
    margin-left: auto;
  }
  .stat .v {
    font-size: 15px;
  }
  .stat.hide-sm {
    display: none;
  }
  .speed button {
    min-width: 30px;
    padding: 0 6px;
  }
  .clock {
    font-size: 16px;
    min-width: 0;
  }
  #title {
    padding: 0 16px calc(var(--foot-h) + 16px);
  }
  .title-plate {
    padding: 18px;
  }
  .menurow {
    grid-template-columns: 34px 1fr 80px 52px;
  }
  .menurow .mgn {
    display: none;
  }
  .grid3 {
    grid-template-columns: 1fr 1fr;
  }
  .fishcard {
    grid-template-columns: 48px 1fr;
  }
  .fishcard .buy {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
  .fishswatch {
    width: 48px;
    height: 34px;
  }
  .auction-board {
    grid-template-columns: 1fr;
  }
  .meters {
    grid-template-columns: 1fr 1fr;
  }
}

/* the card between phases */
.daycard {
  position: fixed;
  z-index: 55;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-align: center;
  padding: 22px 34px;
  background: rgba(11, 10, 9, 0.88);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  min-width: min(420px, calc(100vw - 32px));
}
.daycard .k {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-3);
}
.daycard .t {
  font-family: var(--display);
  font-size: 34px;
  font-weight: 700;
  margin: 4px 0 2px;
}
.daycard .s {
  color: var(--text-2);
  font-size: 14px;
}

/* morning messages */
.msg {
  width: min(520px, 100%);
}
.msg-from {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}
.msg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.msg p {
  margin: 10px 0 18px;
  font-size: 15px;
}

/* achievements */
.achv {
  position: fixed;
  z-index: 65;
  right: 16px;
  width: 300px;
  background: var(--panel-3);
  border: 1px solid #6a5420;
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
}
.achv-k {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.achv b {
  display: block;
  font-size: 15px;
}
.achv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.achv-cell {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-3);
  display: grid;
  gap: 2px;
}
.achv-cell b {
  color: var(--text-2);
  font-size: 13px;
}
.achv-cell.on {
  border-color: #6a5420;
}
.achv-cell.on b {
  color: var(--gold);
}

.move {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.move:last-child {
  border-bottom: 0;
}

/* morning overview */
.spark {
  display: block;
  width: 100%;
  height: 34px;
  margin-top: 6px;
}
.delta {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.alerts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.alerts li {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 8px;
  align-items: start;
  font-size: 13.5px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.alerts li i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
}
.alerts li.bad i {
  background: var(--critical);
}
.alerts li.warn i {
  background: var(--warn);
}
.alerts li.good i {
  background: var(--good);
}
.alerts li.info i {
  background: var(--s1);
}
.fc {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.fc div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--text-2);
}
.fc b {
  display: block;
  color: var(--text);
  font-size: 14px;
}
.goal {
  display: grid;
  grid-template-columns: 1fr 120px 56px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
.goal:last-child {
  border-bottom: 0;
}

.react {
  position: absolute;
  left: 50%;
  top: 36%;
  transform: translateX(-50%);
  background: rgba(11, 10, 9, 0.9);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 8px 16px;
  display: grid;
  gap: 2px;
  text-align: center;
  pointer-events: none;
  font-size: 13px;
}
.react b {
  font-family: var(--display);
  font-size: 22px;
}
.react.good {
  border-color: #2e5a2f;
}
.react.bad {
  border-color: #6a2a22;
}

.paddle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  transition: transform 0.15s;
}
.paddle.up {
  transform: translateY(-4px) scale(1.12);
}

@media (max-width: 640px) {
  .achv {
    top: calc(var(--hud-h) + 8px);
    bottom: auto !important;
    right: 8px;
    left: 8px;
    width: auto;
  }
}
.ticket .items {
  margin-top: 3px;
  display: grid;
  gap: 1px;
}
.ticket .items div {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticket .items div.done {
  text-decoration: line-through;
  color: #8a8175;
  font-weight: 500;
}
