/* Suffolk palette - Coastal leads */
:root {
  --coastal: #80A0B7;
  --coastal-deep: #4F6F86;
  --coastal-ink: #23394A;
  --harvest: #F9D17B;
  --pink: #F6B4B5;
  --saltmarsh: #71A8A0;
  --pottery: #F49B70;
  --shingle: #C3C2BE;
  --thatch: #FEEDDC;

  --bg: #FBF6F0;
  --card: #FFFFFF;
  --ink: #1F2A33;
  --muted: #66737D;
  --line: #E4DFD8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(35, 57, 74, .06), 0 6px 18px rgba(35, 57, 74, .06);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex; flex-direction: column; min-height: 100vh;
}
h1, h2, h3 { font-family: Fraunces, Georgia, serif; line-height: 1.2; margin: 0 0 .4em; color: var(--coastal-ink); }
h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
a { color: var(--coastal-deep); }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* ---------- top bar ---------- */
.topbar {
  background: var(--coastal); color: var(--coastal-ink);
  display: flex; align-items: center; gap: 1rem; padding: .6rem clamp(16px, 3vw, 32px);
  position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 10px rgba(35, 57, 74, .15);
}
.brand { display: flex; align-items: center; gap: .5rem; font: 700 1.15rem Fraunces, Georgia, serif; color: var(--coastal-ink); text-decoration: none; margin-right: auto; }
.brand img { filter: brightness(0) saturate(100%) invert(18%) sepia(18%) saturate(1200%) hue-rotate(166deg); }
.topbar nav { display: flex; align-items: center; gap: .25rem; }
.topbar nav > a { color: var(--coastal-ink); text-decoration: none; padding: .45rem .75rem; border-radius: 999px; font-weight: 500; }
.topbar nav > a:hover { background: rgba(255, 255, 255, .25); }
.topbar nav > a.on { background: var(--thatch); }
.topbar nav > a.add-btn { background: var(--coastal-ink); color: #fff; margin-left: .5rem; }
.usermenu { position: relative; margin-left: .25rem; }
.usermenu summary { cursor: pointer; list-style: none; padding: .45rem .75rem; border-radius: 999px; background: rgba(255,255,255,.3); font-weight: 500; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu > div { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border-radius: 10px; box-shadow: var(--shadow); min-width: 190px; padding: .4rem; display: flex; flex-direction: column; }
.usermenu > div a, .usermenu .linkish { padding: .5rem .7rem; border-radius: 8px; color: var(--ink); text-decoration: none; text-align: left; width: 100%; }
.usermenu > div a:hover, .usermenu .linkish:hover { background: var(--thatch); }
.navtoggle, .burger { display: none; }

@media (max-width: 1060px) {
  .burger { display: flex; flex-direction: column; gap: 4px; cursor: pointer; padding: 8px; }
  .burger span { width: 22px; height: 2px; background: var(--coastal-ink); border-radius: 2px; }
  .topbar { flex-wrap: wrap; }
  .topbar nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: .5rem; }
  .navtoggle:checked ~ nav { display: flex; }
  .topbar nav > a.add-btn { margin: .25rem 0; text-align: center; }
  .usermenu > div { position: static; box-shadow: none; background: transparent; }
  .usermenu > div a, .usermenu .linkish { color: var(--coastal-ink); }
}

/* ---------- layout ---------- */
main { width: 100%; max-width: 1200px; margin: 0 auto; padding: 1.5rem clamp(16px, 3vw, 32px) 3rem; flex: 1; }
main.narrow { max-width: 680px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1.25rem; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pagehead p { margin: 0; }
.crumb { margin: 0 0 .75rem; }
.crumb a { text-decoration: none; }
.footer { text-align: center; padding: 1.5rem; font-size: .8rem; }
.bgg-credit { color: var(--muted); }

/* ---------- controls ---------- */
input, select, textarea {
  font: inherit; color: inherit; width: 100%; padding: .55rem .7rem; border: 1px solid var(--line);
  border-radius: 10px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--coastal); outline-offset: 1px; border-color: var(--coastal); }
label { display: block; font-size: .85rem; font-weight: 500; color: var(--coastal-ink); }
label input, label select, label textarea { margin-top: .25rem; font-weight: 400; }
.btn {
  display: inline-block; border: 0; cursor: pointer; font: 600 .95rem Inter, sans-serif; text-decoration: none;
  background: var(--coastal-deep); color: #fff; padding: .65rem 1.1rem; border-radius: 10px;
}
.btn:hover { background: var(--coastal-ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-small { padding: .4rem .75rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--coastal-deep); box-shadow: inset 0 0 0 1.5px var(--coastal); }
.btn-ghost:hover { background: var(--thatch); color: var(--coastal-ink); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--coastal-deep); cursor: pointer; text-decoration: underline; }
.danger { color: #B4532A; }
.stack { display: flex; flex-direction: column; gap: .85rem; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .75rem; }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.inline-form input { flex: 1 1 180px; width: auto; }
.segmented { border: 0; padding: 0; margin: 0; display: flex; background: var(--thatch); border-radius: 10px; padding: 3px; }
.segmented label { flex: 1; text-align: center; padding: .45rem; border-radius: 8px; cursor: pointer; font-weight: 600; }
.segmented input { position: absolute; opacity: 0; width: 1px; }
.segmented label.sel { background: #fff; box-shadow: var(--shadow); }
.segmented label:focus-within { outline: 2px solid var(--coastal); }

.flash { padding: .75rem 1rem; border-radius: 10px; margin-bottom: 1rem; }
.flash-ok { background: #E3F1EE; border-left: 4px solid var(--saltmarsh); }
.flash-error { background: #FDE9E9; border-left: 4px solid var(--pink); }

/* ---------- chips ---------- */
.chip { display: inline-block; font-size: .72rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: var(--thatch); color: var(--coastal-ink); margin-right: .25rem; vertical-align: middle; }
.chip-owned { background: #D9ECE9; }
.chip-wishlist { background: #FCEBC4; }
.chip-backed { background: #FBD8C6; }
.chip-exp { background: var(--pink); }
.chip-kickstarter { background: #D9ECE9; }
.chip-gamefound { background: #DCE6EE; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1.25rem; }
.filters input[type=search] { flex: 1 1 240px; width: auto; }
.filters select { width: auto; flex: 0 1 auto; }
.tabs { display: flex; gap: .25rem; background: #fff; border-radius: 999px; padding: 4px; box-shadow: var(--shadow); }
.tabs a { padding: .4rem .9rem; border-radius: 999px; text-decoration: none; color: var(--coastal-ink); font-weight: 500; }
.tabs a.on { background: var(--coastal); }

/* ---------- tiles ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.tile { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.tile-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; flex: 1; }
.tile-foot { display: block; text-align: center; padding: .6rem; border-top: 1px solid var(--line); font-weight: 600; font-size: .85rem; text-decoration: none; background: #FFF8EA; }
.tile-foot:hover { background: var(--harvest); color: var(--coastal-ink); }
.tile:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(35, 57, 74, .14); }
.tile-img { aspect-ratio: 1 / 1; background: var(--thatch); display: flex; align-items: center; justify-content: center; position: relative; }
.tile-img img { width: 100%; height: 100%; object-fit: contain; padding: .6rem; }
.tile-img .chip { position: absolute; top: .5rem; left: .5rem; }
.noimg { font: 700 2.5rem Fraunces, serif; color: var(--coastal); }
.noimg.big { font-size: 5rem; }
.tile-body { padding: .8rem .9rem 1rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.tile-body h3 { font-size: .98rem; margin: 0; }
.tile-body p { margin: 0; }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .1rem .7rem; font-size: .82rem; color: var(--muted); }
.ratings { display: flex; gap: .4rem; margin-top: auto; padding-top: .3rem; }
.rating { font-size: .78rem; font-weight: 700; padding: .12rem .5rem; border-radius: 6px; background: var(--harvest); color: var(--coastal-ink); }
.rating-bgg { background: #E8EEF3; }
.meter { height: 6px; background: var(--thatch); border-radius: 999px; overflow: hidden; margin-top: .35rem; }
.meter span { display: block; height: 100%; background: var(--saltmarsh); border-radius: 999px; }
.meter-lg { height: 8px; margin: 0 0 1rem; }
.empty { text-align: center; padding: 2.5rem 1rem; }

/* ---------- game page ---------- */
.hero { display: grid; grid-template-columns: minmax(160px, 280px) 1fr; gap: 1.5rem; align-items: start; }
.hero-img { background: var(--thatch); border-radius: 10px; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-img img { width: 100%; height: 100%; object-fit: contain; padding: .75rem; }
.stats { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1rem 0; }
.stats div { background: var(--thatch); border-radius: 10px; padding: .5rem .85rem; min-width: 90px; }
.stats dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.stats dd { margin: 0; font-weight: 700; color: var(--coastal-ink); }
.links { display: flex; flex-wrap: wrap; gap: 1rem; }
.desc summary { cursor: pointer; font-weight: 600; color: var(--coastal-deep); }
.desc p { white-space: pre-line; color: #3B4650; }
@media (max-width: 640px) { .hero { grid-template-columns: 1fr; } .hero-img { max-width: 260px; } }

.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 1.25rem; align-items: start; }
.two-col aside { position: sticky; top: 76px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } .two-col aside { position: static; order: -1; } }
.sectionhead { display: flex; justify-content: space-between; align-items: baseline; }
.exp-filter { margin-bottom: .75rem; }
.exp-list, .comp-list, .results, .plain { list-style: none; margin: 0; padding: 0; }
.exp-list li, .comp-list li, .results li { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.exp-list li:first-child, .comp-list li:first-child, .results li:first-child { border-top: 0; }
.exp-state { width: 1.2rem; text-align: center; color: var(--saltmarsh); font-weight: 700; }
.exp-name { flex: 1; text-decoration: none; color: var(--ink); }
.exp-list li.is-owned .exp-name { font-weight: 600; }
.exp-actions, .add-actions, .row-actions { display: flex; gap: .35rem; flex-shrink: 0; }
.comp-list li, .results li { justify-content: space-between; }
.results { padding: .25rem 1.25rem; }
.aside-actions { display: flex; justify-content: space-between; margin-top: 1rem; font-size: .85rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.manual summary { cursor: pointer; font-weight: 600; color: var(--coastal-deep); }
.manual form { margin-top: 1rem; }

/* ---------- people ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.person { display: flex; gap: 1rem; align-items: center; text-decoration: none; color: inherit; margin: 0; }
.person h3, .person p { margin: 0; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--pink); display: flex; align-items: center; justify-content: center; font: 700 1.3rem Fraunces, serif; color: var(--coastal-ink); flex-shrink: 0; }

/* ---------- login ---------- */
main.login { display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 380px; text-align: center; padding: 2rem; border-top: 6px solid var(--coastal); }
.login-card form { text-align: left; display: flex; flex-direction: column; gap: .9rem; margin-top: 1.25rem; }
.login-mark { margin-bottom: .5rem; }

.spinner { width: 34px; height: 34px; border: 4px solid var(--thatch); border-top-color: var(--coastal); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- owned / wishlist states ---------- */
.state-pill { font-size: .75rem; font-weight: 600; padding: .25rem .6rem; border-radius: 999px; white-space: nowrap; }
.state-owned { background: #D9ECE9; color: #2F6159; }
.state-wishlist { background: #FCEBC4; color: #7A5A12; }
.state-backed { background: #FBD8C6; color: #8A4220; }
.exp-actions { align-items: center; }
.exp-actions .linkish { margin-left: .25rem; }
.comp-form { display: grid; grid-template-columns: 2fr 1.5fr 1fr; gap: .5rem; margin-top: .9rem; }
.comp-buttons { grid-column: 1 / -1; display: flex; gap: .5rem; }
@media (max-width: 640px) { .comp-form { grid-template-columns: 1fr; } }
.extras-wanted { margin-top: 1.5rem; }

/* one-or-the-other status toggle */
.toggle { display: inline-flex; border: 1.5px solid var(--coastal); border-radius: 999px; overflow: hidden; flex-shrink: 0; }
.toggle-opt { font: 600 .8rem Inter, sans-serif; padding: .32rem .8rem; background: #fff; color: var(--coastal-deep); border: 0; cursor: pointer; }
.toggle-opt + .toggle-opt { border-left: 1.5px solid var(--coastal); }
button.toggle-opt:hover { background: var(--thatch); }
.toggle-opt.on { cursor: default; }
.toggle-opt.on-owned { background: var(--saltmarsh); color: #fff; }
.toggle-opt.on-wishlist { background: var(--harvest); color: var(--coastal-ink); }
.icon-btn { background: none; border: 0; font-size: 1.25rem; line-height: 1; color: var(--muted); cursor: pointer; padding: .2rem .4rem; border-radius: 6px; }
.icon-btn:hover { background: #FDE9E9; color: #B4532A; }
.icon-spacer { visibility: hidden; }

/* ---------- extras ---------- */
.comp-list li.extra { flex-wrap: wrap; }
.extra-edit { flex-basis: 100%; padding-left: 1.8rem; }
.extra-edit summary { cursor: pointer; font-size: .8rem; color: var(--muted); width: max-content; }
.extra-edit[open] summary { color: var(--coastal-deep); }
.extra-edit .comp-form { margin-top: .5rem; }
.comp-wide { grid-column: 1 / -1; }
.exp-name a { text-decoration: none; }
.exp-name a:hover { text-decoration: underline; }
.extras-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .extras-cols { grid-template-columns: 1fr; } }

/* ---------- invites ---------- */
.invite-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: .6rem; align-items: end; margin-top: .75rem; }
@media (max-width: 640px) { .invite-form { grid-template-columns: 1fr; } }
.invites { margin-top: 1rem; }
.invites li { align-items: flex-start; }
.invites li.dead { opacity: .55; }
.invite-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.copyrow { display: flex; gap: .4rem; margin-top: .3rem; }
.copyrow input { font-size: .8rem; padding: .4rem .55rem; background: var(--thatch); border-color: transparent; }

/* ---------- game insert ---------- */
.insert-toggle { margin: 0 0 1rem; }
.checkline { display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; padding: .5rem .85rem; border-radius: 10px;
  background: var(--thatch); font-size: .9rem; font-weight: 600; }
.checkline input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--saltmarsh); }
.checkline.is-on { background: #D9ECE9; }
.chip-insert { background: #D9ECE9; color: #2F6159; }
.tile-img .tile-badge { left: auto; right: .5rem; }

/* ---------- first player picker ---------- */
.fp-add { display: flex; gap: .5rem; }
.fp-add input { flex: 1; font-size: 1.05rem; }
.fp-players { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.fp-chip { display: inline-flex; align-items: center; gap: .15rem; background: var(--thatch); border-radius: 999px;
  padding: .35rem .35rem .35rem .9rem; font-weight: 600; font-size: 1.05rem; transition: background .1s, transform .1s; }
.fp-chip.lit { background: var(--harvest); transform: scale(1.06); box-shadow: 0 0 0 3px rgba(249, 209, 123, .45); }
.fp-actions { display: flex; flex-direction: column; gap: .6rem; margin-top: .5rem; }
.fp-go { font-size: 1.15rem; padding: .9rem; }
.fp-result { text-align: center; margin-top: 1.5rem; padding: 1.5rem 1rem; border-radius: var(--radius);
  background: linear-gradient(135deg, #FFF8EA, var(--thatch)); border: 2px solid var(--harvest); animation: pop .35s ease-out; }
.fp-label { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 600; color: var(--muted); }
.fp-winner { margin: .3rem 0 0; font: 700 clamp(2rem, 9vw, 3rem) / 1.1 Fraunces, Georgia, serif; color: var(--coastal-ink); word-break: break-word; }
.fp-order { text-align: left; display: inline-block; margin: 1rem 0 0; padding-left: 1.5rem; font-size: 1.05rem; font-weight: 600; }
.fp-order li { padding: .15rem 0; }
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fp-result { animation: none; } .fp-chip { transition: none; } }

/* ---------- game night ---------- */
.center { text-align: center; }
.night-new { grid-template-columns: 2fr 1fr auto; }
.night-grid { display: grid; grid-template-columns: 1fr 320px; gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .night-grid { grid-template-columns: 1fr; } }
.night-settings { position: relative; }
.night-settings summary { list-style: none; cursor: pointer; }
.night-settings summary::-webkit-details-marker { display: none; }
.night-settings > .card { position: absolute; right: 0; top: calc(100% + 6px); width: 280px; z-index: 5; display: flex; flex-direction: column; gap: .8rem; }
@media (max-width: 640px) { .night-settings > .card { position: static; width: auto; margin-top: .5rem; } }

.night-draw .draw-actions { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.draw-result { display: grid; grid-template-columns: 120px 1fr; gap: 1.25rem; align-items: center; margin-bottom: 1.25rem;
  padding: 1.1rem; border-radius: var(--radius); background: linear-gradient(135deg, #FFF8EA, var(--thatch)); border: 2px solid var(--harvest); }
.draw-result.just-drawn { animation: pop .45s ease-out; }
.draw-img { aspect-ratio: 1 / 1; background: #fff; border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.draw-img img { width: 100%; height: 100%; object-fit: contain; padding: .35rem; }
.draw-name { margin: .15rem 0 .35rem; font: 700 clamp(1.6rem, 5vw, 2.3rem) / 1.1 Fraunces, Georgia, serif; color: var(--coastal-ink); }
@media (max-width: 520px) { .draw-result { grid-template-columns: 1fr; text-align: center; } .draw-img { max-width: 160px; margin: 0 auto; } }

.picker { padding: .7rem 0; border-top: 1px solid var(--line); }
.picker:first-of-type { border-top: 0; padding-top: 0; }
.picker-head { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.picker-head a { margin-left: auto; }
.avatar.sm { width: 28px; height: 28px; font-size: .85rem; background: var(--coastal); color: #fff; }
.pick-list { list-style: none; margin: .45rem 0 0 2.2rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.pick-list li { display: inline-flex; align-items: center; gap: .1rem; background: var(--thatch); border-radius: 999px; padding: .2rem .25rem .2rem .75rem; font-size: .9rem; font-weight: 600; }
.pick-list li.is-drawn { background: var(--harvest); }
.pick-list .icon-btn { font-size: 1.05rem; padding: .1rem .35rem; }
.fp-chip form { display: inline; }

.pool-head { flex-wrap: wrap; gap: .5rem; }
.pool-filters { margin: .75rem 0 1rem; }
.pool { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .6rem; }
.pool li { display: grid; grid-template-columns: 56px 1fr auto; gap: .75rem; align-items: center; padding: .55rem; border-radius: 12px; border: 1.5px solid var(--line); }
.pool li.chosen { border-color: var(--saltmarsh); background: #F1F8F6; }
.pool-img { width: 56px; height: 56px; border-radius: 8px; background: var(--thatch); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pool-img img { width: 100%; height: 100%; object-fit: contain; }
.pool-img .noimg { font-size: 1.4rem; }
.pool-body { min-width: 0; line-height: 1.3; }
.pool-name { font-weight: 600; text-decoration: none; color: var(--ink); display: block; }
.pick-btn.is-chosen { background: var(--saltmarsh); }
.pick-btn:disabled { opacity: .4; }
.pool li.taken { background: #FAFAF8; }
.pool li.taken .pool-img, .pool li.taken .pool-body { opacity: .55; }
.taken-by { font-size: .78rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
[id] { scroll-margin-top: 80px; }

/* ---------- game night: picks as art tiles ---------- */
.pick-tiles { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .75rem; }
.pick-tile { display: flex; flex-direction: column; gap: .35rem; }
.pick-art { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; border-radius: 10px;
  background: var(--thatch); overflow: hidden; border: 2px solid transparent; transition: filter .2s, opacity .2s; }
.pick-art img { width: 100%; height: 100%; object-fit: contain; padding: .35rem; }
.pick-art .chip { position: absolute; left: .35rem; bottom: .35rem; margin: 0; }
.pick-name { font-weight: 600; font-size: .88rem; line-height: 1.25; text-align: center; }
.pick-actions { display: flex; align-items: center; justify-content: center; gap: .25rem; }
.pick-tile.is-drawn .pick-art { border-color: var(--harvest); box-shadow: 0 0 0 3px rgba(249, 209, 123, .45); }
.pick-tile.is-played .pick-art img, .pick-tile.is-played .pick-art .noimg { filter: grayscale(1); opacity: .4; }
.pick-tile.is-played .pick-art { background: #EEEDEA; }
.pick-tile.is-played .pick-name { color: var(--muted); text-decoration: line-through; }
.chip-played { background: var(--coastal-ink); color: #fff; }
.chip-drawn { background: var(--harvest); }
.all-played { text-align: center; padding: 1rem; margin-bottom: 1rem; border-radius: var(--radius); background: #F1F8F6; border: 2px solid var(--saltmarsh); }
.all-played .draw-name { margin: 0; }
.clear-list { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); text-align: right; }
.danger-ghost { color: #B4532A; box-shadow: inset 0 0 0 1.5px #E7B9A4; }
.danger-ghost:hover { background: #FDE9E9; color: #8F3A17; }
.draw-result form { margin-top: .6rem; }

/* ---------- player colours ---------- */
.swatches { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: .5rem; }
.swatches legend { font-size: .85rem; font-weight: 500; color: var(--coastal-ink); margin-bottom: .4rem; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: .25rem; cursor: pointer; font-weight: 400; }
.swatch input { position: absolute; opacity: 0; width: 1px; }
.swatch span { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font: 700 1.1rem Fraunces, serif; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); transition: box-shadow .15s, transform .15s; }
.swatch small { font-size: .7rem; color: var(--muted); text-align: center; line-height: 1.2; }
.swatch input:checked + span { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--coastal-ink); transform: scale(1.05); }
.swatch input:focus-visible + span { outline: 2px solid var(--coastal); outline-offset: 4px; }

.player-chip { gap: .45rem !important; padding-left: .55rem !important; box-shadow: inset 0 0 0 2px var(--pc); background: #fff !important; }
.player-chip .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.pick-tile .pick-art { border: 3px solid var(--pc, transparent); }
.pick-tile.is-played .pick-art { border-color: #D9D8D4; }
.pick-tile.is-drawn .pick-art { box-shadow: 0 0 0 3px var(--harvest); }
.pool li.chosen, .pool li.taken { border-color: var(--pc); border-left-width: 6px; }
.taken-by { padding: .2rem .55rem; border-radius: 999px; }
.picker-name { font-weight: 600; color: var(--coastal-ink); box-shadow: inset 0 -3px 0 var(--pc); }

/* ---------- colour picker ---------- */
.colour-pick { border: 0; padding: 0; margin: 0; }
.colour-pick legend { font-size: .85rem; font-weight: 500; color: var(--coastal-ink); margin-bottom: .5rem; }
.colour-row { display: flex; align-items: center; gap: 1rem; margin-bottom: .75rem; }
.colour-custom { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.colour-custom input[type=color] { width: 56px; height: 40px; padding: 2px; margin: 0; cursor: pointer; }
.presets { display: flex; flex-wrap: wrap; gap: .5rem; }
.preset { width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--line); }
.preset.on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--coastal-ink); }

/* ---------- second-hand prices ---------- */
.market-main { display: flex; align-items: center; gap: .8rem; margin: .25rem 0 .5rem; }
.market-median { font: 700 2rem/1 Fraunces, Georgia, serif; color: var(--coastal-ink); }
.market-more summary { cursor: pointer; font-size: .85rem; color: var(--coastal-deep); margin-bottom: .4rem; }
.market-more ul { margin: 0 0 .6rem; }
.market-actions { display: flex; align-items: center; gap: .6rem; margin: .6rem 0; }
.tiny { font-size: .72rem; margin: 0; }
.two-col aside .card + .card { margin-top: 0; }
.two-col aside > .card { margin-bottom: 1.25rem; }
.toggle-opt.on-backed { background: var(--pottery); color: #fff; }

/* ---------- search results with box art ---------- */
.results li.result { justify-content: flex-start; gap: .85rem; }
.result-img { width: 64px; height: 64px; flex-shrink: 0; border-radius: 8px; background: var(--thatch); display: flex;
  align-items: center; justify-content: center; overflow: hidden; }
.result-img img { width: 100%; height: 100%; object-fit: contain; }
.result-img .noimg { font-size: 1.5rem; }
.result-body { flex: 1; min-width: 0; line-height: 1.4; }
.results li.result > form, .results li.result > .btn { margin-left: auto; flex-shrink: 0; }
@media (max-width: 560px) {
  .results li.result { flex-wrap: wrap; }
  .results li.result > form { margin-left: calc(64px + .85rem); }
}
