/* The Voyages of Sinbad: cream paper, a dark sea table, one chocolate accent, a teal "your move" glow.
   Cargo colours (spice, pearls, silk, amber) belong to the cargoes only. No web fonts: system faces keep the
   console clean and the first paint fast, and nothing here imitates a script.
   Mobile first: the base rules are the 390 px phone layout. */
:root {
  --paper: #f3e3c3;
  --paper-2: #e9d5a8;
  --card: #fbf4e2;
  --ink: #2a140c;
  --ink-2: #5a2e1e;
  --ink-soft: #6f4b39;
  --line: #d6be90;
  --accent: #5a2e1e;
  --accent-dark: #3a1c11;
  --turn: #139a94;
  --gold: #f0b429;
  --good: #2e7d4f;
  --bad: #9a2f1e;
  --sea: #1b120c;
  --sea-line: #120a06;
  --cream: #f3e3c3;
  --s-spice: #c8673f;
  --s-amber: #e3b13e;
  --s-silk: #6f9a7a;
  --s-pearls: #5f86ad;
  --font-display: Rockwell, 'Rockwell Extra Bold', 'Roboto Slab', Georgia, 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --gutter: 16px;
  --tw: 54px; /* width of a card in the trick */
  --pawn-isle: 40px; /* width of a ship pawn on an island (the dhow is wider than tall: height follows) */
  --pawn-small: 38px; /* the pawn beside a name under a played card */
  --hw: min(64px, calc((100vw - 2 * var(--gutter) - 24px - 24px) / 6)); /* width of a card in the hand (6 per row on a phone) */
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.45 var(--font-body);
  overflow-x: hidden;
}
main { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter) 32px; }
body[data-screen='game'] main { max-width: 1380px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 8px; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; margin-bottom: 2px; }
p { margin: 0 0 8px; }
img { max-width: 100%; }
a { color: var(--ink-2); }
small { font-size: 0.8em; }
.muted { color: var(--ink-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--turn); outline-offset: 2px; }

/* ---------- buttons and form bits ---------- */
.btn, .linkbtn { font: inherit; color: inherit; cursor: pointer; }
.btn { min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 2px solid var(--ink-2); background: var(--card); font-weight: 700; }
.btn:hover { background: var(--paper-2); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn--primary { background: var(--accent); border-color: var(--accent-dark); color: #fbf4e2; box-shadow: 0 3px 0 var(--accent-dark); }
.btn--primary:hover { background: var(--accent-dark); }
.btn--big { font-size: 1.1rem; padding: 10px 26px; }
.btn--quiet { border-color: var(--line); font-weight: 600; }
.btn--small { padding: 6px 12px; min-height: 36px; font-size: 0.9rem; }
.linkbtn { background: none; border: 0; padding: 8px 6px; min-height: 40px; text-decoration: underline; text-underline-offset: 3px; color: var(--ink-2); font-weight: 600; }
select, input[type='text'] { font: inherit; color: var(--ink); background: #fffaf0; border: 2px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 42px; max-width: 100%; width: 100%; }
.field { display: flex; flex-direction: column; gap: 2px; font-weight: 600; font-size: 0.9rem; margin: 6px 0; }
.field small { font-weight: 400; color: var(--ink-soft); }

/* ---------- landing ---------- */
.landing { padding-top: 4px; }
.topnav { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.topnav__brand { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--ink-2); }
.hero { margin-bottom: 14px; }
.hero__art { border-radius: 14px; overflow: hidden; border: 3px solid var(--ink-2); background: #f1c779; box-shadow: 0 4px 0 var(--accent-dark); }
.hero__art img, .hero__art picture { display: block; width: 100%; height: auto; }
.hero__art--plain { padding: 22px 12px; text-align: center; color: #fff; background: var(--ink-2); }
.hero__title { font-family: var(--font-display); font-weight: 700; font-size: 2rem; margin: 0 0 8px; }
.hero__suits { display: flex; justify-content: center; gap: 10px; margin: 0; }
.hero__art .hero__suit { width: 30px; height: 30px; font-size: 1rem; display: inline-grid; }
.hero__text { padding: 14px 2px 0; }
.hero__hook { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; line-height: 1.15; }
.hero__sub { color: var(--ink-soft); }
.stats { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 0 0 14px; }
.stats li { display: flex; align-items: center; gap: 8px; background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; min-width: 0; color: var(--ink-2); }
.stats svg { width: 30px; height: 30px; flex: none; }
.stats b { display: block; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.1; white-space: nowrap; color: var(--ink); }
.stats span { font-size: 0.8rem; color: var(--ink-soft); }
.panel { background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
.setup-panel { border-color: var(--ink-2); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.segs { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { position: relative; flex: 1; min-width: 78px; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span { display: block; text-align: center; padding: 10px 8px; border: 2px solid var(--line); border-radius: 10px; background: #fffaf0; font-weight: 700; }
.seg input:checked + span { background: var(--accent); border-color: var(--accent-dark); color: #fbf4e2; }
.seg input:focus-visible + span { outline: 3px solid var(--turn); outline-offset: 2px; }
.setup__seats { display: grid; grid-template-columns: 1fr; gap: 8px 14px; margin-top: 10px; }
.seatform { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px 8px; }
.seatform legend { font-family: var(--font-display); font-size: 0.95rem; padding: 0 4px; }
.hint { color: var(--ink-soft); margin: 10px 0; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--turn); }
.check span { display: flex; flex-direction: column; gap: 2px; }
.check small { color: var(--ink-soft); font-size: 0.85rem; }
.form-msg { color: var(--bad); font-weight: 700; min-height: 1.2em; }
.form-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.rules { border: 2px dashed var(--line); border-radius: 10px; padding: 8px 12px; margin: 10px 0; background: var(--paper); }
.rules summary { cursor: pointer; font-weight: 700; padding: 6px 0; min-height: 40px; }
.rules summary small { font-weight: 400; color: var(--ink-soft); margin-left: 6px; }
.rules__intro { color: var(--ink-soft); }
.rule { padding: 8px 0; border-top: 1px solid var(--line); }
.rule label { font-weight: 700; display: block; margin-bottom: 4px; }
.rule__id { display: inline-block; font-size: 0.72rem; background: var(--ink-2); color: #fff; border-radius: 4px; padding: 0 5px; margin-right: 4px; vertical-align: 1px; }
.rule__desc { font-size: 0.85rem; color: var(--ink-soft); margin: 4px 0 0; }
.rules-note, .rules-flag { background: #fff0c9; border: 2px solid var(--gold); border-radius: 10px; padding: 8px 12px; font-weight: 600; margin: 8px 0; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; color: var(--ink-soft); font-size: 0.9rem; padding: 10px 0; }

/* how to play */
.how__lead { font-size: 1.05rem; }
.how__cards { display: grid; gap: 8px; margin: 8px 0 4px; }
.how__fact { background: var(--paper); border: 2px solid var(--line); border-radius: 12px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.how__fact b { font-family: var(--font-display); font-size: 1.25rem; color: var(--ink-2); }
.how__fact strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }
.how__sub { margin: 14px 0 4px; color: var(--ink-2); }
.how__steps { padding-left: 0; list-style: none; counter-reset: step; display: grid; gap: 8px; margin: 6px 0; }
.how__steps > li { counter-increment: step; position: relative; padding: 0 0 0 44px; }
.how__steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fbf4e2; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; }
.how__steps h4 { margin: 0; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2); }
.how__steps p { margin: 0; }
.how__score { background: #fff0c9; border: 2px solid var(--gold); border-radius: 10px; padding: 8px 12px; }
.how__suits { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; margin: 6px 0 0; }
.how__suits li { display: flex; align-items: center; gap: 5px; font-weight: 600; }
.how__badge { width: 24px; height: 24px; }
.how__pics { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 12px 0 4px; }
.how__pics figure { margin: 0; width: min(44%, 190px); text-align: center; }
.how__card { display: block; width: 100%; height: auto; aspect-ratio: 300 / 429; border-radius: 4%; filter: drop-shadow(0 2px 5px rgba(42, 20, 12, 0.4)); }
.how__pics figcaption { font-size: 0.8rem; color: var(--ink-soft); margin-top: 4px; }
.how__link { margin-top: 10px; }
.landing__isles { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.landing__isles li { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.landing__isles li span { display: flex; align-items: center; gap: 5px; }
.landing__isle { display: block; width: 100%; height: auto; aspect-ratio: 480 / 335; border-radius: 9px; box-shadow: 0 2px 6px rgba(42, 20, 12, 0.4); }

/* ---------- game screen ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; }
.topbar__title { font-family: var(--font-display); font-weight: 700; color: var(--ink-2); font-size: 1.1rem; white-space: nowrap; }
.topbar .linkbtn { white-space: nowrap; padding: 8px 4px; }
.topbar__right { display: flex; gap: 4px; }
.game { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
/* below 1320 px the two columns dissolve into one stack: the table, the seats, the hand, then the score pad and log */
.col { display: contents; }
.col--main > .table { order: 1; } .col--side > .table__seats { order: 2; }
.col--main > .handbox { order: 3; } .col--side > .side { order: 4; }
.endbar { order: 0; }

/* the table: status, the ring, the trick, the seats (a dark sea) */
.table {
  display: grid; gap: 10px; padding: 10px; border-radius: 18px; border: 3px solid var(--sea-line);
  background: var(--sea) url('assets/table-texture.webp');
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'status' 'ring' 'trick';
}
.table__status { grid-area: status; min-width: 0; }
.table__ring { grid-area: ring; min-width: 0; }
.table__trick { grid-area: trick; min-width: 0; display: flex; }
.table__seats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 0; }

.status { background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.status__line { font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; margin: 0; }
.status__prompt { font-weight: 700; margin: 2px 0 0; min-height: 2.9em; }

/* ---------- the ring: eight islands round a sea, island 1 at the top, sailing clockwise ---------- */
.ring { color: var(--cream); }
.ring__stage { position: relative; width: 100%; aspect-ratio: 1 / 1; --isle-w: 24%; }
.ring__track { position: absolute; left: 19%; right: 19%; top: 19%; bottom: 19%; border: 2px dashed rgba(243, 227, 195, 0.4); border-radius: 50%; }
.ring__arrow { position: absolute; width: 16px; height: 16px; transform: translate(-50%, -50%) rotate(var(--rot)); color: rgba(243, 227, 195, 0.9); display: block; }
.ring__arrow svg { width: 100%; height: 100%; display: block; }
.ring__list { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; }
.ring__isle { position: absolute; width: var(--isle-w); transform: translate(-50%, -50%); }
.ring__isle:has(.is-sailing) { z-index: 6; }
.ring__centre { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44%; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.ring__loop { width: 26px; height: 26px; color: rgba(243, 227, 195, 0.75); }
.ring__big { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.1; }
.ring__small { font-size: 0.78rem; color: rgba(243, 227, 195, 0.9); }
.ring__small .led { color: var(--cream); font-weight: 700; }
.ring__clock { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(243, 227, 195, 0.7); margin-top: 2px; }
.ring__caption { margin: 6px 0 0; font-size: 0.82rem; color: rgba(243, 227, 195, 0.88); text-align: center; min-height: 1.3em; }
.ring__caption.is-sail { color: #fff; font-weight: 700; }

.isle { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; border-radius: 9px; }
.isle--spice { --cg: var(--s-spice); } .isle--amber { --cg: var(--s-amber); }
.isle--silk { --cg: var(--s-silk); } .isle--pearls { --cg: var(--s-pearls); }
.isle__img, .isle .asset-chip { display: block; width: 100%; height: auto; aspect-ratio: 480 / 335; border-radius: 9px; box-shadow: 0 0 0 2px var(--cg, #fff), 0 3px 8px rgba(0, 0, 0, 0.55); }
.isle .asset-chip { background: var(--cg); color: var(--ink); }
.isle__num { position: absolute; left: -5px; top: -5px; width: 19px; height: 19px; border-radius: 50%; background: var(--cream); color: var(--ink); font: 800 0.72rem/19px var(--font-body); text-align: center; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.isle__cargo { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 3px; padding: 8px 2px 2px; background: linear-gradient(to bottom, transparent, rgba(24, 12, 6, 0.88)); border-radius: 0 0 9px 9px; color: var(--cream); font-size: 0.68rem; line-height: 1.1; }
.isle__badge { width: 14px; height: 14px; flex: none; }
.isle__ships { --pawn: var(--pawn-isle); --lift: 15px; --extra: 0px; position: absolute; left: 2px; right: 2px; bottom: calc(var(--lift) + var(--extra)); display: flex; justify-content: center; align-items: flex-end; }
.isle__next { position: absolute; right: 3px; top: 3px; display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; max-width: 70%; }
.nextdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--seat); border: 2px solid var(--cream); box-shadow: 0 0 0 1px var(--ink); }
.nextdot--key { vertical-align: -1px; margin-right: 3px; }
.isle.is-mine .isle__img { box-shadow: 0 0 0 3px var(--turn), 0 0 14px rgba(19, 154, 148, 0.85); }
.isle__hold, .isle__go { position: absolute; left: 50%; top: 34%; transform: translateX(-50%); white-space: nowrap; font-size: 0.66rem; font-weight: 800; border-radius: 999px; padding: 1px 7px; background: rgba(251, 244, 226, 0.94); color: var(--ink); }
.isle__go { display: none; background: var(--turn); color: #fff; }
button.isle { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.isle.is-pickable .isle__img { box-shadow: 0 0 0 3px var(--cream), 0 0 0 5px var(--turn), 0 3px 10px rgba(0, 0, 0, 0.6); animation: beckon 1.6s ease-in-out infinite; }
button.isle.is-pickable:hover, button.isle.is-pickable:focus-visible, button.isle.is-selected { transform: scale(1.08); z-index: 5; }
button.isle.is-pickable:hover .isle__go, button.isle.is-pickable:focus-visible .isle__go, button.isle.is-selected .isle__go { display: block; }
button.isle.is-pickable:hover .isle__hold, button.isle.is-pickable:focus-visible .isle__hold, button.isle.is-selected .isle__hold { display: none; }
button.isle.is-selected .isle__img { animation: none; box-shadow: 0 0 0 4px var(--gold), 0 3px 10px rgba(0, 0, 0, 0.6); }
button.isle:focus-visible { outline: none; }

.pawn { position: relative; display: inline-block; width: var(--pawn); aspect-ratio: 256 / 215; margin-left: calc(var(--pawn) * -0.22); flex: none; }
.pawn:first-child { margin-left: 0; }
.pawn .pawn__img, .pawn .shipchip { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7)); }
.pawn .shipchip { aspect-ratio: auto; border-radius: 40%; }
/* three or more ships on one island: smaller pawns, wrapped into overlapping rows that stay on the card, above the cargo name
   (three get 0.7 of the normal pawn, four and five 0.62; the lift keeps the lowest row clear of the label despite the row overlap) */
.isle__ships[data-n='3'], .isle__ships[data-n='4'], .isle__ships[data-n='5'] { flex-wrap: wrap; --pawn: calc(var(--pawn-isle) * 0.8); --extra: calc(var(--pawn) * 0.3); }
.isle__ships[data-n='3'] { --pawn: calc(var(--pawn-isle) * 0.7); }
.isle__ships[data-n='4'], .isle__ships[data-n='5'] { --pawn: calc(var(--pawn-isle) * 0.62); }
.isle__ships[data-n='3'] .pawn, .isle__ships[data-n='4'] .pawn, .isle__ships[data-n='5'] .pawn { margin-bottom: calc(var(--pawn) * -0.3); }
.pawn.is-you::after { content: ''; position: absolute; left: 10%; right: 10%; bottom: -5px; height: 4px; border-radius: 2px; background: var(--turn); box-shadow: 0 0 0 1px var(--cream), 0 1px 3px rgba(0, 0, 0, 0.6); }
.pawn.is-sailing { z-index: 6; }
.pawn.is-new { animation: dropin 0.45s ease-out; }
.pawn--small { --pawn: var(--pawn-small); margin-left: 0; }
.shipchip { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--seat, #333); color: var(--ink); border: 2px solid var(--ink); font-size: 0.7rem; font-weight: 800; }
.shipimg { width: 22px; height: auto; }
.ring.is-fresh .ring__isle { animation: islandin 0.5s ease-out both; }

/* ---------- seats ---------- */
.seat { background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 7px 8px 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; position: relative; container-type: inline-size; }
.seat.is-turn { border-color: var(--turn); box-shadow: 0 0 0 3px rgba(19, 154, 148, 0.85); }
.seat.is-winning { border-color: var(--gold); }
.seat__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0 7px; min-width: 0; }
.seat__tags { display: flex; gap: 4px; flex-wrap: wrap; min-height: 0; }
.seat__tags:empty { display: none; }
@container (max-width: 190px) {
  .seat__head { grid-template-columns: minmax(0, 1fr) auto; }
  .seat__head .seat__avatar { display: none; }
}
.seat__avatar, .pad__avatar, .rank__avatar, .cover__avatar { border-radius: 50%; object-fit: cover; background: var(--paper-2); flex: none; }
.seat__avatar { width: 32px; height: 32px; }
.seat.is-turn .seat__avatar { box-shadow: 0 0 0 3px var(--turn); }
.avatar-chip { display: inline-grid; place-items: center; color: #fff; font-weight: 800; background: var(--ink-2); }
.seat__id { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.seat__name { font-weight: 800; overflow-wrap: anywhere; }
.badge { display: inline-block; font-size: 0.66rem; font-weight: 700; border-radius: 999px; padding: 0 7px; background: var(--paper-2); color: var(--ink-soft); width: fit-content; }
.badge--human { background: var(--ink-2); color: #fbf4e2; }
.tag { font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; border-radius: 6px; padding: 1px 6px; }
.tag--dealer { background: var(--ink-2); color: #fbf4e2; }
.tag--leader { background: var(--paper-2); color: var(--ink); border: 1px solid var(--ink-2); }
.tag--turn { background: var(--turn); color: #fff; }
.seat__cards { display: flex; flex-direction: column; align-items: center; line-height: 1; color: var(--ink-soft); }
.seat__cardsnum { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.seat__cards small { font-size: 0.55rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 1px; }
.seat__ship { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 0.78rem; line-height: 1.2; }
.seat__ship b { font-weight: 800; }
.seat__shipimg { flex: none; width: 34px; height: auto; }

/* the voyage arithmetic, big: +tricks  -serpents  =  score */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) auto minmax(0, 1fr); align-items: end; gap: 2px; background: var(--paper); border-radius: 10px; padding: 4px 6px 3px; }
.calc__part { display: flex; flex-direction: column; align-items: center; line-height: 1; min-width: 0; }
.calc__part b { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.calc__part i { font-style: normal; font-size: 0.54rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0; white-space: nowrap; color: var(--ink-soft); margin-top: 2px; }
.calc__part--tricks b { color: var(--good); }
.calc__part--serpents b { color: var(--bad); }
.calc__part--score b { font-size: 2.1rem; color: var(--ink); }
.calc__part.is-off b { color: var(--ink-soft); opacity: 0.6; }
.calc__eq { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink-soft); padding-bottom: 12px; }
.seat__serpents { display: flex; flex-wrap: wrap; gap: 3px 0; padding-right: 16px; }
.seat .seat__serpentcard { width: 34px; flex: none; margin-right: -16px; }
.seat__total { font-size: 0.85rem; color: var(--ink-soft); }
.seat__total b { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }

/* badges and card faces */
.badge-suit { display: inline-block; border-radius: 50%; flex: none; vertical-align: middle; }
span.badge-suit { display: inline-grid; place-items: center; color: #fff; font-size: 0.7em; }
.badge-suit--spice { background: var(--s-spice); } .badge-suit--amber { background: var(--s-amber); color: var(--ink); }
.badge-suit--silk { background: var(--s-silk); } .badge-suit--pearls { background: var(--s-pearls); }
.cardimg { display: block; width: 100%; height: auto; aspect-ratio: 300 / 429; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 1px 3px rgba(42, 20, 12, 0.5)); }
.asset-chip.cardchip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 0; background: #fff; border: 2px solid var(--ink); border-radius: 8px; color: var(--ink); font-size: 0.8rem; }
.asset-chip.cardchip b { font-family: var(--font-display); font-size: 1.5em; line-height: 1; }
.asset-chip.cardchip i { font-style: normal; font-size: 1.1em; line-height: 1; }
.asset-chip.cardchip--spice { color: var(--s-spice); border-color: var(--s-spice); } .asset-chip.cardchip--amber { color: #a87c0c; border-color: var(--s-amber); }
.asset-chip.cardchip--silk { color: var(--s-silk); border-color: var(--s-silk); } .asset-chip.cardchip--pearls { color: var(--s-pearls); border-color: var(--s-pearls); }
.asset-chip.cardchip--back { background: repeating-linear-gradient(45deg, var(--ink-2), var(--ink-2) 6px, var(--ink) 6px, var(--ink) 12px); border-color: var(--ink); }
.asset-chip { display: inline-block; background: var(--paper-2); border: 1px dashed var(--ink-soft); border-radius: 6px; padding: 1px 6px; font-size: 0.8rem; color: var(--ink-soft); }
.led { white-space: nowrap; }
.led__badge { width: 18px; height: 18px; margin-right: 3px; vertical-align: -4px; }

/* ---------- the trick ---------- */
.trick { background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px 10px; width: 100%; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.trick__title { font-family: var(--font-display); font-weight: 700; margin: 2px 0 4px; font-size: 1rem; color: var(--ink-2); }
.tplays { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 8px 6px; padding: 0; margin: 0; flex: 1; align-content: center; }
.tplay { display: flex; flex-direction: column; align-items: center; gap: 3px; }
/* every slot is as tall as a card, so a trade laid sideways (wider, shorter) sits level with the rest */
.tplay__box { position: relative; display: grid; place-items: center; width: var(--tw); height: calc(var(--tw) * 1.43); }
.tplay.is-sideways .tplay__box { width: calc(var(--tw) * 1.43); }
.tplay__rot { display: block; width: var(--tw); transition: transform 0.25s ease; }
.tplay.is-sideways .tplay__rot { transform: rotate(90deg); }
.tplay__slot { display: block; width: var(--tw); aspect-ratio: 300 / 429; border: 2px dashed var(--line); border-radius: 6px; }
.tplay__who { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 3px; font-size: 0.72rem; font-weight: 700; line-height: 1.1; max-width: calc(var(--tw) * 1.5); }
.tplay__name { overflow-wrap: anywhere; text-align: center; }
.tplay__tags { display: flex; flex-direction: column; align-items: center; gap: 2px; max-width: calc(var(--tw) * 2); min-height: 1.1em; }
.mark { display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 0.6rem; text-transform: uppercase; font-weight: 800; letter-spacing: 0.03em; padding: 1px 5px; border-radius: 5px; background: var(--paper-2); text-align: center; line-height: 1.2; }
.mark__badge { width: 12px; height: 12px; }
.mark--led { background: var(--ink-2); color: #fbf4e2; }
.mark--wins { background: var(--good); color: #fff; }
.mark--best { background: var(--gold); color: var(--ink); }
.mark--trade { background: var(--s-amber); color: var(--ink); }
.mark--discard { background: #7a7168; color: #fff; }
.mark--serpent { background: #5a2e1e; color: #fff; }
.tplay.is-best .tplay__rot .cardimg { box-shadow: 0 0 0 3px var(--gold); border-radius: 6%; }
.tplay.is-winner .tplay__rot .cardimg { box-shadow: 0 0 0 4px var(--good), 0 0 16px rgba(46, 125, 79, 0.7); border-radius: 6%; animation: pop 0.5s ease-out; }
.tplay.is-discard .tplay__rot .cardimg { filter: grayscale(0.6) brightness(0.85); }
.tplay.is-lost { opacity: 0.6; }
.trick--recap .tplays { opacity: 0.75; }
.trick__msg { margin: 4px 0 0; text-align: center; min-height: 1.5em; font-size: 0.9rem; color: var(--ink-soft); }
.trick__msg.is-banner { font-weight: 800; color: var(--ink); }
.trick__note { margin: 0; text-align: center; min-height: 1.2em; font-size: 0.82rem; font-weight: 700; color: var(--ink-2); }
body[data-busy='1'] .trick { cursor: pointer; }

/* ---------- the hand ---------- */
.handbox { background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 8px 10px 10px; }
.handbox.is-turn { border-color: var(--turn); box-shadow: 0 0 0 3px rgba(19, 154, 148, 0.7); }
.handbox__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px 16px; margin: 0 0 8px; }
.handbox__head .handbox__title { margin: 0; }
.youisle { --cg: var(--ink-2); display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 4px 16px 4px 10px; border-radius: 999px; font-size: 1.2rem; font-weight: 800; line-height: 1.2; background: color-mix(in srgb, var(--cg) 28%, var(--card)); border: 2px solid var(--cg); color: var(--ink); }
.youisle--none { --cg: var(--line); background: var(--paper); color: var(--ink-soft); font-weight: 700; font-size: 1.05rem; padding-left: 16px; }
.youisle--spice { --cg: var(--s-spice); } .youisle--amber { --cg: var(--s-amber); } .youisle--silk { --cg: var(--s-silk); } .youisle--pearls { --cg: var(--s-pearls); }
.youisle .youisle__ship { width: 42px; height: auto; flex: none; }
.youisle__txt { font-weight: 700; }
.youisle__badge { width: 26px; height: 26px; flex: none; }
@media (max-width: 759px) { .handbox__head { flex-direction: column; align-items: flex-start; gap: 4px; } .youisle { font-size: 1.15rem; } }
.youisle.is-changed { animation: youisleflash 1.1s ease-out; }
@keyframes youisleflash { 0% { box-shadow: 0 0 0 0 var(--cg), 0 0 0 4px var(--cream); transform: scale(1.12); } 100% { box-shadow: 0 0 0 0 transparent; transform: none; } }
@media (prefers-reduced-motion: reduce) { .youisle.is-changed { animation: none; } }
.handbox__title { font-family: var(--font-display); font-weight: 700; margin: 0 0 6px; }
.handbox__title span { font-family: var(--font-body); font-weight: 400; font-size: 0.8rem; color: var(--ink-soft); margin-left: 6px; }
.handbox__back { width: 50px; }
.hand { display: grid; grid-template-columns: repeat(6, var(--hw)); gap: 8px 4px; justify-content: center; padding-top: 8px; }
.card { padding: 0; border: 0; background: none; position: relative; width: var(--hw); cursor: pointer; font: inherit; border-radius: 6px; transition: transform 0.12s ease; -webkit-tap-highlight-color: transparent; }
.card.is-legal:hover, .card.is-legal:focus-visible, .card.is-selected { transform: translateY(-8px); }
.card.is-selected .cardimg, .card.is-legal:hover .cardimg { filter: drop-shadow(0 0 3px var(--turn)) drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35)); }
.card.is-blocked { cursor: not-allowed; }
.card.is-blocked .cardimg { filter: grayscale(0.9) brightness(0.62); opacity: 0.7; }
.card.is-wait { cursor: default; }
.card.is-trade .cardimg { box-shadow: 0 0 0 3px var(--s-amber); border-radius: 6%; }
.card__tag { position: absolute; left: 50%; top: -9px; transform: translateX(-50%); background: var(--s-amber); color: var(--ink); font-size: 0.58rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em; border-radius: 5px; padding: 0 5px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.card__hint { position: absolute; right: -3px; bottom: -3px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 900; line-height: 1; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.card__hint.is-win { background: var(--good); color: #fff; }
.card__hint.is-lose { background: #6b6b6b; color: #fff; }
.legend { font-size: 0.82rem; color: var(--ink-soft); margin: 8px 0 2px; }
.preview { min-height: 2.9em; margin: 4px 0 0; font-weight: 600; color: var(--ink-soft); }
.preview--on { color: var(--ink); }
.note { margin: 0; color: var(--bad); font-weight: 700; min-height: 1.3em; }

/* the forced-trade moment, and the mooring step */
.situation { display: flex; gap: 10px; align-items: center; background: #fff0c9; border: 2px solid var(--gold); border-radius: 12px; padding: 8px 12px; margin: 2px 0 8px; }
.situation p { margin: 0 0 3px; }
.situation__title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--ink-2); }
.situation__tip { font-weight: 700; font-size: 0.9rem; }
.situation__isle { flex: none; width: 84px; }
.situation__img, .situation__isle .asset-chip { display: block; width: 100%; height: auto; aspect-ratio: 480 / 335; border-radius: 8px; box-shadow: 0 0 0 2px var(--ink-2); }
.situation--trade { background: #ffe9a6; border-color: var(--s-amber); border-width: 3px; }
.situation--follow, .situation--discard { background: var(--paper); border-color: var(--line); }
.situation--lead { background: var(--paper); border: 2px solid var(--line); border-radius: 12px; padding: 6px 12px; margin: 2px 0 8px; }
.decision { background: #fff0c9; border: 2px solid var(--gold); border-radius: 12px; padding: 8px 12px 10px; margin-bottom: 10px; }
.decision__title { margin: 0 0 4px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--ink-2); }
.decision__text { margin: 0 0 6px; }
.decision__hold { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0; margin: 0; }
.decision__hold li { display: flex; align-items: center; gap: 4px; }
.decision__badge { width: 22px; height: 22px; }

/* score pad and log */
.side .panel { padding: 6px 12px 10px; margin-bottom: 10px; }
.side summary, .panel--pad summary { font-family: var(--font-display); font-weight: 700; cursor: pointer; padding: 6px 0; min-height: 36px; }
.pad { border-collapse: collapse; width: 100%; font-size: 0.9rem; table-layout: fixed; }
.pad th, .pad td { padding: 3px 2px; text-align: center; border-bottom: 1px solid var(--line); }
.pad thead th { vertical-align: bottom; }
.pad tbody th, .pad tfoot th { text-align: left; font-weight: 600; width: 26%; }
.pad__avatar { width: 24px; height: 24px; display: block; margin: 0 auto 1px; font-size: 0.7rem; }
.pad__name { display: block; font-size: 0.7rem; line-height: 1.1; overflow-wrap: anywhere; }
.pad tr.is-now td, .pad tr.is-now th { background: #fff0c9; }
.pad tr.is-todo td { color: var(--line); }
.pad tfoot th, .pad tfoot td { font-family: var(--font-display); font-weight: 700; border-bottom: 0; border-top: 2px solid var(--ink-2); }
.log__list { list-style: none; padding: 0; margin: 0; max-height: 320px; overflow-y: auto; font-size: 0.88rem; }
.log__item { padding: 5px 0; border-bottom: 1px solid var(--line); }
.log__item--hand { font-weight: 700; color: var(--ink-2); }

/* overlays */
.overlay { position: fixed; inset: 0; background: rgba(42, 20, 12, 0.66); display: flex; align-items: center; justify-content: center; padding: var(--gutter); z-index: 20; }
.end, .dialog { background: var(--paper); border: 3px solid var(--ink-2); border-radius: 18px; padding: 18px; width: 100%; max-width: 680px; max-height: calc(100vh - 2 * var(--gutter)); overflow: auto; position: relative; }
.end--hand { max-width: 720px; }
.end__kicker { font-family: var(--font-display); font-weight: 700; color: var(--ink-2); margin: 0; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; }
.end__note { color: var(--ink-soft); font-size: 0.85rem; }
.end__buttons, .dialog__buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.end__rules, .end__tiebreak { margin: 8px 0; }
.end__tiebreak { background: #fff0c9; border: 2px solid var(--gold); border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.dialog__close { position: absolute; right: 8px; top: 6px; border: 0; background: none; font-size: 1.8rem; line-height: 1; cursor: pointer; width: 44px; height: 44px; }
.dialog--wide { max-width: 760px; }
.table-wrap { overflow-x: auto; }
.summary { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.summary th, .summary td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.summary thead th { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); vertical-align: bottom; }
.summary thead em { display: block; font-style: normal; font-weight: 600; text-transform: none; letter-spacing: 0; }
.summary th[scope='row'] { font-weight: 700; }
.summary .who { display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.summary .who .pad__avatar { margin: 0; }
.summary .num { text-align: center; }
.summary .num b { display: block; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.summary .num small { display: block; font-size: 0.66rem; color: var(--ink-soft); }
.summary .num--tricks b { color: var(--good); }
.summary .num--serpents b { color: var(--bad); }
.summary .num--score b { font-size: 2.2rem; }
.summary .num--score { background: var(--card); border-left: 2px solid var(--line); border-right: 2px solid var(--line); }
.summary .num--total { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.summary tr.is-top .num--score { background: #fff0c9; }
.ranking { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.rank { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 6px 10px; }
.rank.is-winner { border-color: var(--gold); background: #fff3d0; }
.rank__pos { font-family: var(--font-display); font-weight: 700; width: 26px; text-align: center; font-size: 1.2rem; }
.rank__avatar { width: 44px; height: 44px; }
.rank__who { display: flex; flex-direction: column; flex: 1; min-width: 100px; line-height: 1.2; }
.crown { font-style: normal; font-size: 0.72rem; font-weight: 800; background: var(--gold); border-radius: 6px; padding: 0 6px; width: fit-content; margin-top: 2px; }
.rank__last { font-size: 0.75rem; color: var(--ink-soft); text-align: center; }
.rank__last b { font-size: 0.95rem; color: var(--ink); }
.rank__total { font-size: 0.9rem; }
.rank__total b { font-family: var(--font-display); font-size: 1.6rem; }
.pad--end { width: 100%; }
.panel--pad { padding: 4px 10px 8px; margin: 8px 0; }
.endbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: #fff3d0; border: 2px solid var(--gold); border-radius: 12px; padding: 8px 12px; grid-column: 1 / -1; }
.endbar > span { flex: 1; min-width: 160px; }
.cover { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: var(--gutter); background: var(--sea) url('assets/table-texture.webp'); }
.cover__card { background: var(--paper); border: 3px solid var(--ink-2); border-radius: 18px; padding: 22px 18px; text-align: center; max-width: 440px; width: 100%; }
.cover__avatar { width: 90px; height: 90px; margin: 0 auto 6px; display: grid; font-size: 2rem; }
.cover__kicker { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.78rem; font-weight: 800; color: var(--ink-soft); margin: 0; }
.cover h2 { font-size: 1.8rem; overflow-wrap: anywhere; }
.cover__msg { color: var(--ink-soft); }

/* ---------- animation (all of it off under reduced motion) ---------- */
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes bump { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }
@keyframes beckon { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.18); } }
@keyframes dropin { 0% { transform: translateY(-16px) scale(1.5); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes islandin { 0% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.fx-bump { animation: bump 0.55s ease-out; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- wider screens ---------- */
@media (min-width: 560px) {
  .setup__seats { grid-template-columns: repeat(2, 1fr); }
  .landing__isles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 700px) {
  :root { --hw: clamp(56px, calc((100vw - 2 * var(--gutter) - 24px - 40px) / 9), 92px); }
  .hand { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 4px; }
  .card.is-first:not(:first-child) { margin-left: 8px; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .how__cards { grid-template-columns: 1.4fr 1fr; }
}
@media (min-width: 760px) {
  :root { --tw: 62px; --pawn-isle: 56px; --pawn-small: 50px; }
  .table__ring { max-width: 560px; width: 100%; margin: 0 auto; }
  .table { padding: 14px; gap: 12px; }
  .ring__stage { aspect-ratio: 1.3 / 1; --isle-w: 22%; }
  .ring__big { font-size: 1.3rem; }
  .ring__loop { width: 32px; height: 32px; }
  .isle__cargo { font-size: 0.78rem; padding-top: 12px; }
  .isle__badge { width: 17px; height: 17px; }
  .isle__ships { --lift: 19px; }
  .isle__num { width: 22px; height: 22px; font-size: 0.8rem; line-height: 22px; }
  .nextdot { width: 12px; height: 12px; }
  .isle__hold, .isle__go { font-size: 0.74rem; top: 30%; }
  .ring__arrow { width: 20px; height: 20px; }
  .table__seats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
  .seat { padding: 8px 10px 10px; gap: 5px; }
  .seat__avatar { width: 38px; height: 38px; }
  .tplay__who { font-size: 0.8rem; }
  .mark { font-size: 0.64rem; }
}
@media (min-width: 900px) {
  .table { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); grid-template-areas: 'status status' 'ring trick'; }
  .table__ring { max-width: none; margin: 0; }
}
@media (min-width: 1000px) {
  :root { --hw: clamp(56px, calc((min(100vw, 1380px) - 2 * var(--gutter) - 24px - 40px) / 10), 92px); }
  .stats { max-width: 860px; }
}
@media (min-width: 1320px) {
  /* wide: the game and the hand on the left, every seat down the right, then the score pad and log */
  .game { grid-template-columns: minmax(0, 1fr) 340px; }
  .col { display: grid; gap: 12px; min-width: 0; align-content: start; }
  .col > * { order: 0 !important; }
  .table__seats { grid-template-columns: minmax(0, 1fr); }
  :root { --hw: clamp(56px, calc((min(100vw, 1380px) - 2 * var(--gutter) - 354px - 24px - 40px) / 9), 92px); --tw: 66px; }
}
@media (min-width: 1100px) {
  .landing { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 0 28px; align-items: start; }
  .landing .topnav, .landing .footer, .landing .hero, .landing__ring { grid-column: 1 / -1; }
  .landing .stats { grid-column: 1 / -1; max-width: none; }
  .landing #how { grid-row: span 1; }
}
@media (max-width: 380px) {
  :root { --gutter: 12px; }
}
@media (max-width: 480px) {
  .topbar__title { display: none; }
  .stats li { padding: 8px 8px; gap: 6px; }
  .stats svg { width: 24px; height: 24px; }
  .stats b { font-size: 1.1rem; }
  .hero__hook { font-size: 1.35rem; }
}
@media (max-width: 759px) {
  .seat__cards small { display: none; }
  .calc__part b { font-size: 1.55rem; }
  .calc__part--score b { font-size: 1.9rem; }
  .situation__isle { width: 64px; }
  .tplay__tags { max-width: calc(var(--tw) * 1.6); }
  .isle__cargo b { font-size: 0.64rem; }
  .ring__big { font-size: 0.95rem; }
  .ring__small { font-size: 0.72rem; }
  .ring__clock { font-size: 0.58rem; }
  .ring__loop { display: none; }
  .bug-button { width: 28px; height: 28px; right: 4px; bottom: 4px; font-size: 0.8rem; }
}

/* stats screen, bug reporter */
.st h3 { margin: 16px 0 4px; font-size: 1.05rem; }
.st__lead { font-size: 1.1rem; }
.st__empty { padding: 24px 0; text-align: center; color: var(--ink-soft); }
.st__muted { color: var(--ink-soft); font-size: 0.9rem; margin: 2px 0 4px; }
.st__small { color: var(--bad); font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.st__scroll { overflow-x: auto; }
.st__table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.st__table th, .st__table td { padding: 5px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.st__table thead th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.st__table td { font-variant-numeric: tabular-nums; }
.st__filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; margin: 8px 0; }
.st__filter select { font: inherit; padding: 6px 8px; border: 2px solid var(--ink-2); border-radius: 8px; background: var(--card); max-width: 100%; width: auto; }
.bug-button { position: fixed; right: 10px; bottom: 10px; z-index: 40; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ink-2); background: var(--card); font-size: 1rem; line-height: 1; cursor: pointer; opacity: 0.55; padding: 0; }
.bug-button:hover, .bug-button:focus-visible { opacity: 1; }
body[data-covered='1'] .bug-button { display: none; }
body[data-screen='game'] { padding-bottom: 52px; }
.bug .field { display: block; margin: 8px 0; }
.bug .field span { display: block; font-weight: 700; font-size: 0.9rem; }
.bug input, .bug textarea { width: 100%; font: inherit; padding: 6px 8px; border: 2px solid var(--ink-2); border-radius: 8px; background: var(--card); }
.bug__lead { color: var(--ink-soft); }
.bug__past { margin-top: 12px; font-size: 0.9rem; }
.bug__past ul { list-style: none; padding: 0; margin: 4px 0 0; }
.bug__past li { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.bug__past .linkbtn { min-height: 32px; }
