@charset "UTF-8";

:root {
  color-scheme: dark;
  --sea: #101e23;
  --panel: #17272b;
  --ink: #eeeadc;
  --muted: #99aaa9;
  --gold: #d3b479;
  --line: #ffffff14;
  --green: #9dc6af;
  --red: #e6a295;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--sea); color: var(--ink); min-width: 320px; background-image: radial-gradient(ellipse at 70% 15%, #34514a25, transparent 55%); }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .13; z-index: -1; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.25' filter='url(%23n)'/%3E%3C/svg%3E"); }
button, input { font: inherit; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button { color: inherit; }
button:disabled { opacity: .45; cursor: not-allowed; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: normal; }
h1 { font-size: clamp(42px, 4.6vw, 70px); line-height: 1.12; letter-spacing: -2px; }
h2 { font-size: 32px; letter-spacing: -.5px; margin-bottom: 14px; }
h3 { font-size: 23px; margin-bottom: 10px; }
em { font-weight: normal; color: var(--gold); }
p { line-height: 1.7; }
small { font-size: 11px; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.gold, .gold-icon { color: var(--gold); }
.positive { color: var(--green); }
.negative { color: var(--red); }
.center { text-align: center; }
.eyebrow { font-size: 10px; letter-spacing: 2.5px; color: var(--gold); font-weight: bold; margin-bottom: 22px; display: flex; align-items: center; gap: 12px; }
.masthead { max-width: 1380px; margin: auto; padding: 29px 54px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 20px; }
.brand { display: flex; align-items: center; gap: 13px; font-family: Georgia, serif; font-size: 21px; letter-spacing: 2px; text-decoration: none; flex-shrink: 0; }
.brand-mark { font-size: 39px; color: var(--gold); line-height: 1; }
.brand small { display: block; font-family: "Trebuchet MS", sans-serif; font-size: 8px; letter-spacing: 2.4px; color: var(--muted); margin-top: 6px; }
.header-right { display: flex; align-items: center; gap: 30px; }
.connection { font-size: 11px; color: var(--muted); }
.connection.online { color: var(--green); }
.button-quiet { border: 0; background: none; padding: 10px 0; font-size: 12px; color: var(--gold); }
.button-quiet span { margin-left: 9px; }
#app { max-width: 1272px; margin: auto; padding: 0 32px; }
body:not(.is-room) .connection { display: none; }
body:not(.is-room) .masthead .button-quiet { min-height: 44px; font-size: 14px; }
.landing { display: flex; justify-content: center; padding: 24px 0; }
.panel { background: linear-gradient(135deg, #1c2d30ee, #152529f5); border: 1px solid #d6bd8b25; border-radius: 6px; box-shadow: 0 15px 40px #00000014; }
.boarding { padding: 24px; max-width: 440px; width: 100%; }
.boarding label { font-size: 14px; letter-spacing: .5px; margin-bottom: 8px; }
.boarding input { font-size: 16px; min-height: 48px; padding: 12px; margin-bottom: 16px; }
.boarding .button-primary { font-size: 16px; min-height: 48px; padding: 12px 16px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; font-size: 15px; color: var(--muted); min-height: 44px; padding: 8px; }
.tabs button[aria-selected="true"] { border-color: var(--gold); color: var(--gold); }
label { display: block; font-size: 9px; font-weight: bold; letter-spacing: 1.4px; margin-bottom: 11px; color: #c9cfc5; }
input { min-width: 0; }
form > input, #join-code input { display: block; width: 100%; background: #0e1b1f80; border: 1px solid #aeb8a827; border-radius: 3px; color: var(--ink); padding: 16px; font-size: 13px; margin-bottom: 23px; }
input::placeholder { color: #708380; }
input:focus { border-color: var(--gold); }
.code-input { text-transform: uppercase; letter-spacing: 4px; }
.button-primary { border: 1px solid #ddbd7f; border-radius: 3px; background: var(--gold); color: #182426; padding: 17px 19px; font-size: 12px; font-weight: bold; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; transition: background .2s, transform .2s; }
.button-primary:not(:disabled):hover { background: #e6c88c; transform: translateY(-1px); }
.button-primary span:last-child:not(:first-child) { font-size: 19px; font-weight: normal; }
.resume-button { display: block; background: transparent; border: 1px dashed #d3b47955; border-radius: 3px; color: var(--gold); padding: 12px; margin: 16px 0 0; width: 100%; min-height: 44px; font-size: 14px; }
.is-room .masthead { padding: 10px 32px; }
.is-room .brand-mark { font-size: 28px; }
.is-room .brand { font-size: 17px; }
.is-room .brand small { display: none; }
.is-room:not([data-screen="lobby"]) .masthead { display: none; }
.is-room #app { min-height: 0; }
.is-room[data-screen="results"] #app { max-width: 680px; }
.room { padding: 12px 0; }
.room-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; position: sticky; top: 0; z-index: 2; background: var(--sea); }
.room-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.exit-game, .view-bids { min-width: 64px; min-height: 44px; padding: 8px 12px; border: 1px solid #d3b47955; border-radius: 4px; background: #d3b4790c; color: var(--gold); font-size: 14px; white-space: nowrap; flex-shrink: 0; }
.exit-game:hover, .view-bids:hover { background: #d3b47922; }
.room-heading .eyebrow { margin-bottom: 4px; font-size: 8px; }
.room-heading h1 { font-size: 30px; margin-bottom: 0; }
.room-heading h1 em { font-style: normal; }
.room-heading .room-brand { font-size: 24px; letter-spacing: 1.5px; min-width: 0; }
.room-brand > span { color: var(--gold); }
.voyage { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; margin: -6px 0 12px; }
.voyage > span { text-align: center; padding: 5px 0; border-bottom: 2px solid var(--line); font-size: 13px; color: #728681; }
.voyage .complete { color: var(--green); border-color: #9dc6af66; }
.voyage .current { color: var(--gold); border-color: var(--gold); background: #d3b47918; box-shadow: 0 3px 12px #d3b47918; border-radius: 3px 3px 0 0; font-weight: bold; }
.out-of { font-size: 22px; color: #819591; letter-spacing: 0; }
.room-code { border: 1px solid #d3b47933; padding: 5px 12px; border-radius: 4px; text-align: center; background: #16272b; }
.room-code > span { display: block; font-size: 8px; letter-spacing: 1.7px; color: var(--muted); }
.room-code button { border: 0; background: none; font-size: 20px; font-family: Georgia, serif; letter-spacing: 4px; color: var(--gold); padding: 5px 0 0; }
.room-code small { letter-spacing: 0; font-size: 20px; }
.game-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 12px; align-items: start; }
.lobby-panel, .round-panel, .standings, .finale { padding: 16px; }
.lobby-panel > .eyebrow { margin-bottom: 14px; }
.lobby-panel > p.muted { font-size: 13px; }
.crew-list { padding: 0; margin: 12px 0 0; list-style: none; }
.crew-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: Georgia, serif; color: var(--gold); background: #d3b47918; border: 1px solid #d3b47925; }
.color-1 { color: #acc9bd; background: #acc9bd14; border-color: #acc9bd30; }
.color-2 { color: #c9b9d1; background: #c9b9d114; border-color: #c9b9d130; }
.color-3 { color: #d5afa0; background: #d5afa014; border-color: #d5afa030; }
.crew-name { flex: 1; font-size: 14px; overflow-wrap: anywhere; }
.crew-name small, .score-list li > span > small { font-size: 9px; color: var(--gold); margin-left: 5px; }
.crew-role { display: block; margin-top: 5px; font-size: 10px; color: var(--muted); }
.ready-dot, .pulse-dot { display: inline-block; width: 6px; height: 6px; background: var(--green); border-radius: 50%; flex-shrink: 0; }
.lobby-bottom { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; font-size: 11px; gap: 10px; }
.waiting-box { display: flex; align-items: center; gap: 12px; padding: 20px; font-size: 12px; border: 1px solid var(--line); margin-top: 10px; border-radius: 3px; color: var(--gold); }
.pulse-dot { background: var(--gold); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.lobby-art { text-align: center; }
.lobby-art img { width: 100%; margin-top: -20px; }
.lobby-art h3 { font-size: 26px; margin-top: -25px; line-height: 1.5; }
.lobby-art p { font-size: 12px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.section-title .eyebrow { font-size: 8px; letter-spacing: 1.8px; margin-bottom: 10px; }
.section-title h2 { font-size: 27px; margin-bottom: 5px; }
.section-title h3 { font-size: 21px; }
.section-title p { margin: 0; }
.gold-icon { font-size: 35px; }
.score-list { padding: 0; margin: 8px 0 0; list-style: none; }
.score-list li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto auto; align-items: center; gap: 2px 8px; padding: 4px; border-top: 1px solid var(--line); font-size: 13px; }
.player-status { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.player-status b { font-weight: normal; color: var(--gold); }
.score-list .is-me { background: #d3b47909; }
.score-list li > span:nth-child(2) { overflow-wrap: anywhere; }
.rank { color: #859b94; font-family: Georgia, serif; font-size: 15px; }
.score-list li:first-child .rank { color: var(--gold); }
.player-history { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
.player-history > span { padding: 3px 1px; border-radius: 2px; background: #0002; text-align: center; font-size: 9px; white-space: nowrap; }
.player-history small { color: var(--muted); font-size: 8px; margin-right: 1px; }
.score-list strong { font-family: Georgia, serif; font-size: 22px; font-weight: normal; white-space: nowrap; }
.score-list strong small { font-family: "Trebuchet MS", sans-serif; font-size: 8px; color: var(--muted); margin-left: 6px; }
.standings-foot { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 6px; font-size: 9px; color: var(--muted); }
.round-panel > p.muted { font-size: 13px; }
.stepper { display: flex; align-items: center; border: 1px solid #d3b47930; border-radius: 4px; background: #0e1b1f80; flex-shrink: 0; overflow: hidden; }
.stepper button { width: 48px; min-height: 48px; background: transparent; color: var(--gold); border: none; font-size: 28px; }
.stepper button:hover { background: #d3b47915; }
.stepper input { width: 48px; min-height: 48px; padding: 0; text-align: center; border: 0; background: transparent; color: var(--ink); font-size: 28px; font-family: Georgia, serif; appearance: textfield; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.stepper input:invalid { color: var(--red); }
.big-stepper { display: flex; justify-content: center; margin: 12px 0; }
.big-stepper .stepper { background: none; }
.big-stepper input { width: 100px; height: 72px; font-size: 44px; }
.big-stepper button { width: 56px; height: 72px; font-size: 25px; }
#bid-form > .button-primary { margin-top: 12px; }
.is-room .button-primary { padding: 12px 16px; min-height: 48px; font-size: 16px; }
.round-panel .button-primary { justify-content: center; }
.round-panel h2 { font-size: 26px; margin-bottom: 8px; }
.round-panel .section-title h3 { font-size: 20px; margin-bottom: 0; }
.sealed-bid { text-align: center; padding: 8px 0; }
.sealed-bid strong { font-family: Georgia, serif; font-size: 56px; font-weight: normal; color: var(--gold); }
.bonus-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.bonus-row { display: flex; flex-direction: column; align-items: stretch; gap: 8px; border: 1px solid var(--line); border-radius: 4px; background: #0e1b1f55; padding: 10px; }
.bonus-copy { display: grid; place-items: center; min-height: 40px; text-align: center; }
.bonus-copy label { font-size: 15px; letter-spacing: 0; margin: 0; line-height: 20px; }
.bonus-copy b { font-weight: normal; color: var(--gold); white-space: nowrap; margin-left: 4px; }
.bonus-copy small { display: block; font-size: 12px; color: var(--muted); line-height: 20px; }
.bonus-row .stepper { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; width: 100%; }
.bonus-row .stepper button, .bonus-row .stepper input { width: 100%; min-height: 48px; }
.taken-row { background: #d3b47908; border-color: #d3b47950; }
.rule-note { font-size: 11px; color: var(--muted); background: #d3b47908; border-left: 2px solid #d3b47955; padding: 12px 15px; margin: 20px 0; }
.saved-result { margin: 8px 0 0; font-size: 12px; }
.room-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 10px; color: #7e948c; margin-top: 4px; }
.room-tools button { font-size: 10px; }
.finale { text-align: center; }
.finale .eyebrow { justify-content: center; font-size: 8px; }
.finale h2 { font-size: 36px; }
.finale > p.muted { font-size: 12px; }
.podium { display: flex; justify-content: center; align-items: end; gap: 10px; margin: 32px 0; }
.podium-place { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.place-1 { order: 2; }
.place-2 { order: 1; }
.place-3 { order: 3; }
.podium-crown { font-size: 26px; color: var(--gold); }
.place-1 .podium-crown { font-size: 43px; }
.podium-name { font-family: Georgia, serif; font-size: 17px; overflow-wrap: anywhere; max-width: 100%; }
.podium-place strong { font-weight: normal; font-size: 23px; color: var(--gold); font-family: Georgia, serif; }
.podium-place strong small { color: var(--muted); font-size: 9px; }
.podium-base { width: 100%; background: linear-gradient(#d3b47920, #d3b47905); border: 1px solid #d3b47933; border-radius: 4px 4px 0 0; height: 105px; padding: 15px 5px; display: flex; flex-direction: column; justify-content: center; }
.place-1 .podium-base { height: 145px; border-color: #d3b47970; }
.place-3 .podium-base { height: 80px; }
.podium-base span { font-size: 38px; font-family: Georgia, serif; color: var(--gold); }
.podium-base small { font-size: 7px; letter-spacing: .8px; color: var(--muted); margin-top: 8px; }
.finale > .small { margin: 15px 0 0; }
.notice { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #352b29; border: 1px solid #d59a82; color: #f5dfcf; padding: 17px 22px; border-radius: 5px; max-width: 620px; width: calc(100% - 32px); font-size: 13px; line-height: 1.7; z-index: 10; box-shadow: 0 10px 40px #0008; overflow-wrap: anywhere; }
dialog { max-width: 620px; width: calc(100% - 32px); border: 1px solid #d3b47955; border-radius: 6px; padding: 35px; background: #17272b; color: var(--ink); max-height: 85dvh; }
dialog::backdrop { background: #061012cc; backdrop-filter: blur(5px); }
#bids-dialog { max-width: 440px; padding: 24px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { font-size: 24px; margin: 0; }
.bids-list { list-style: none; padding: 0; margin: 16px 0 0; }
.bids-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 8px 0; border-top: 1px solid var(--line); }
.bids-list li > span { overflow-wrap: anywhere; min-width: 0; font-size: 16px; }
.bids-list strong { font-family: Georgia, serif; font-size: 26px; line-height: 1; font-weight: normal; color: var(--gold); flex-shrink: 0; }
.bids-list small { font-size: 12px; flex-shrink: 0; }
.dialog-close { float: right; padding: 0; }
dialog .eyebrow { margin-top: 5px; font-size: 8px; }
dialog p { font-size: 12px; color: var(--muted); }
.rules-list { font-size: 12px; line-height: 1.7; }
.rules-list dt { color: var(--gold); margin-top: 15px; }
.rules-list dd { color: var(--muted); margin: 3px 0 0; }
.text-link { font-size: 11px; color: var(--gold); line-height: 1.8; }

@media (max-width: 1050px) {
  .masthead { padding: 25px 32px; }
  .game-grid { grid-template-columns: minmax(0, 1.5fr) minmax(250px, 1fr); }
}
@media (max-width: 760px) {
  .masthead { padding: 16px; gap: 12px; }
  .brand { font-size: 18px; }
  .brand-mark { font-size: 32px; }
  .brand small { font-size: 7px; }
  .connection { display: none; }
  #app { padding: 0 22px; }
  .is-room .masthead { padding: 6px 12px; }
  .is-room .masthead .button-quiet { padding: 4px 0; }
  .is-room #app { padding: 0 10px; }
  .room { padding: 4px 0; }
  .room-heading h1 { font-size: 25px; letter-spacing: -1px; }
  .room-heading .room-brand { font-size: 20px; letter-spacing: 1px; }
  .voyage { gap: 4px; }
  .voyage > span { font-size: 12px; padding: 4px 0; }
  .room-heading .eyebrow { display: none; }
  .room-code { padding: 4px 8px; }
  .room-code > span { display: none; }
  .room-code button { font-size: 17px; letter-spacing: 2px; }
  .room-code small { font-size: 17px; }
  .game-grid { grid-template-columns: minmax(0, 1fr); }
  .lobby-art { display: none; }
  .section-title { gap: 10px; }
  .room-tools > span { display: none; }
  .room-tools .button-quiet { padding: 4px 0; }
  h2 { font-size: 28px; }
  .round-panel > p.muted { font-size: 12px; }
  .lobby-panel, .round-panel, .standings, .finale { padding: 10px; }
  .game-grid { gap: 8px; }
  .bonus-list { gap: 10px; }
  .bonus-row { padding: 8px; }
  .bonus-row .stepper { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .bonus-row .stepper button, .bonus-row .stepper input { min-height: 44px; }
  .bonus-row .stepper input { font-size: 26px; }
  .round-panel .section-title h3 { font-size: 18px; }
  .round-panel .section-title .small { font-size: 10px; }
  .round-panel h2 { font-size: 22px; }
  .standings .section-title h2 { font-size: 18px; line-height: 1.1; margin: 0; }
  .standings .section-title .small { font-size: 9px; }
  .score-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; margin-top: 4px; }
  .score-list li { padding: 4px 0; gap: 3px 4px; font-size: 13px; line-height: 1.2; grid-template-columns: 12px minmax(0, 1fr) auto auto; }
  .score-list strong { font-size: 22px; }
  .score-list strong small { display: none; }
  .score-list .rank { font-size: 11px; }
  .player-status { gap: 3px; font-size: 13px; }
  .player-history { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; }
  .player-history > span { font-size: 9px; line-height: 12px; padding: 0; }
  .player-history small { font-size: 8px; }
  .standings-foot { font-size: 9px; padding-top: 4px; margin-top: 4px; }
  dialog { padding: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
