:root {
  --dw-bg: #1b130c; --dw-fg: #f1e3c2; --dw-accent: #e0a84a; --dw-panel: rgba(36, 24, 14, .96);
  --dw-font-body: 'IM Fell English', Georgia, serif; --display: 'Pirata One', Georgia, serif;
  --teal: #1f6f78; --felt: #0f4c4f; --wine: #8c2f39; --brass: #c9963b; --line: rgba(241, 227, 194, .18); --paper: #f1e3c2; --ink: #22180f;
}
body { overflow-x: hidden; font-size: 1.12rem; background: #1b130c repeating-linear-gradient(90deg, #ffffff05 0 2px, transparent 2px 46px); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1; margin: 0 0 .45em; letter-spacing: .01em; }
h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); color: var(--dw-accent); }
h3 { font-size: 1.6rem; }
section { padding: clamp(56px, 9vw, 110px) clamp(16px, 5vw, 64px); }
.dw-plain { font: inherit; color: inherit; }

.topbar { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 10px clamp(16px, 4vw, 40px); background: #1b130cd9; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 2px solid #c9963b55; }
.brand { font-family: var(--display); font-size: 1.9rem; color: var(--dw-accent); text-decoration: none; }
.topbar nav { display: flex; align-items: center; gap: 18px; }
.topbar nav a { color: var(--dw-fg); text-decoration: none; opacity: .85; }
.topbar nav a:hover { color: var(--dw-accent); }
@media (max-width: 640px) { .topbar nav a { display: none; } }

.hero { position: relative; min-height: 100svh; display: grid; align-items: end; padding: 0; overflow: hidden; }
.hero-art { position: absolute; inset: -4% 0 auto; width: 100%; height: 110%; object-fit: cover; object-position: 65% 40%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, #1b130cf2 0%, #1b130c99 35%, transparent 60%), linear-gradient(transparent 60%, #1b130c 98%); }
@media (max-width: 760px) { .hero-shade { background: linear-gradient(#1b130c22, #1b130cdd 50%, #1b130c 95%); } }
.hero-copy { position: relative; z-index: 2; max-width: 660px; padding: 110px clamp(16px, 5vw, 64px) clamp(40px, 8vh, 96px); }
.kicker { font-style: italic; color: var(--dw-accent); margin: 0 0 .6rem; }
.hero h1 { font-size: clamp(3rem, 7.5vw, 6rem); text-shadow: 0 4px 30px #000; }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); }
.word { background: none; border: 0; padding: 0; cursor: pointer; color: #ff9b6b; text-decoration: underline dotted; text-underline-offset: .2em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4rem; }
.btn { font-family: var(--display); font-size: 1.35rem; text-decoration: none; color: var(--dw-fg); border: 2px solid var(--brass); padding: .35em 1em; border-radius: 6px; transition: background .2s, color .2s; }
.btn:hover { background: var(--brass); color: var(--ink); }
.btn-hot { background: var(--wine); border-color: var(--wine); }

.duel { background: radial-gradient(90% 70% at 50% 30%, #13575a, #0b2f33 70%, #1b130c); }
.duel-head { max-width: 860px; margin: 0 auto 1.4rem; text-align: center; }
.table { max-width: 980px; margin: 0 auto; display: grid; gap: 14px; }
.sea-wrap { border-radius: 12px; overflow: hidden; border: 3px solid var(--brass); box-shadow: 0 20px 60px #0009; background: #0d3a44; }
#sea { width: 100%; height: auto; aspect-ratio: 960 / 220; display: block; }
.hulls { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; padding: 10px 14px; background: #1b130c; }
@media (max-width: 600px) { .hulls { grid-template-columns: 1fr; } }
.hull { margin: 0; display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.hull .bar { flex: 1; height: 10px; background: #3a2a1b; border-radius: 5px; overflow: hidden; min-width: 60px; }
.hull .bar span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #8fd06b, #e0a84a); transition: width .5s; }
.hull.foe .bar span { background: linear-gradient(90deg, #e0a84a, #d4483b); }
.hull b { font-family: var(--display); font-size: 1.2rem; min-width: 2ch; text-align: right; }
.foe-hand { display: flex; justify-content: center; gap: 4px; min-height: 52px; }
.back { width: 36px; height: 52px; border-radius: 5px; border: 2px solid var(--paper); background: var(--wine) repeating-linear-gradient(45deg, #ffffff18 0 4px, transparent 4px 9px); box-shadow: 0 3px 8px #0006; }
.piles { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.pile { width: 78px; height: 108px; border-radius: 8px; display: grid; place-items: center; align-content: center; gap: 4px; font: inherit; cursor: pointer; box-shadow: 0 6px 14px #0007; }
.pile.deck { background: var(--wine) repeating-linear-gradient(45deg, #ffffff18 0 4px, transparent 4px 9px); color: var(--paper); border: 2px solid var(--paper); font-family: var(--display); font-size: 1.3rem; }
.pile.discard { background: var(--paper); color: var(--ink); border: 2px solid var(--brass); font-size: 1.6rem; font-weight: 700; }
.pile.discard.red { color: #b3222f; }
.pile small { font-size: .7rem; font-family: var(--dw-font-body); opacity: .8; }
.pile:disabled { opacity: .5; cursor: default; }
.pile:not(:disabled):hover { transform: translateY(-3px); }
.duel-msg { flex: 1 1 260px; max-width: 520px; margin: 0; padding: 10px 14px; background: #1b130ccc; border: 1px solid var(--line); border-radius: 8px; min-height: 3.6em; font-size: 1rem; }
.my-hand { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 6px 0; }
.card { width: 62px; height: 90px; border-radius: 8px; background: var(--paper); color: var(--ink); border: 2px solid #b89a63; font: inherit; cursor: pointer; display: grid; place-items: center; align-content: center;
  box-shadow: 0 4px 10px #0007; transition: transform .15s, box-shadow .15s; padding: 0; }
.card .r { font-size: 1.45rem; font-weight: 700; line-height: 1; }
.card .s { font-size: 1.4rem; line-height: 1; }
.card.red { color: #b3222f; }
.card.sel { transform: translateY(-14px); border-color: var(--dw-accent); box-shadow: 0 0 0 3px var(--dw-accent), 0 12px 20px #000a; }
.my-hand.hint .card { animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(-3px); } }
@media (max-width: 480px) { .card { width: 44px; height: 66px; } .card .r { font-size: 1.1rem; } .card .s { font-size: 1.05rem; } .back { width: 26px; height: 38px; } }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.act { font-family: var(--display); font-size: 1.3rem; padding: .3em 1em; border-radius: 6px; cursor: pointer; border: 2px solid var(--brass); background: #2a1c10; color: var(--dw-fg); }
.act.fire { background: var(--wine); border-color: #e06a5a; }
.act:disabled { opacity: .4; cursor: not-allowed; }
.act.ghost { background: transparent; font-size: 1.1rem; }
.spoils { max-width: 980px; margin: 14px auto 0; text-align: center; }
.spoil { background: var(--paper); color: var(--ink); border: 2px solid var(--brass); border-radius: 8px; padding: .7em 1.2em; cursor: pointer; font-size: 1.1rem; }

.cabin { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (max-width: 860px) { .cabin { grid-template-columns: 1fr; } }
.art { position: relative; margin: 0; border-radius: 10px; overflow: hidden; border: 3px solid var(--brass); box-shadow: 0 30px 80px #000a; }
.art img { width: 100%; height: auto; }
.hs { position: absolute; width: 10%; aspect-ratio: 1; border-radius: 50%; border: 2px dashed transparent; background: transparent; cursor: pointer; transition: border-color .3s, background .3s; }
.hs:hover, .hs:focus-visible { border-color: var(--dw-accent); background: #e0a84a22; }
.hs.is-found { border-color: #8fd06b99; }
.hs-bottle { left: 3%; top: 26%; width: 14%; } .hs-parrot { left: 85%; top: 29%; width: 11%; } .hs-apple { left: 19%; top: 68%; width: 9%; } .hs-spyglass { left: 46.5%; top: 57%; width: 12%; }
.features { padding-left: 1.1em; }
.features li { margin: .45em 0; }
.features b { color: var(--dw-accent); }

.found-wrap { text-align: center; padding-top: 20px; }
.found b { color: var(--dw-accent); }
.reward { max-width: 640px; margin: 1rem auto; padding: 1rem 1.2rem; border: 2px solid var(--brass); border-radius: 8px; background: #e0a84a14; }
.journal { max-width: 760px; margin: 1rem auto 0; text-align: left; }
.journal li { margin: .5em 0; }

.vote { text-align: center; max-width: 1000px; margin: 0 auto; }
.vote h3 { color: var(--paper); margin-top: 1.8rem; }
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: .8rem auto 0; }
.offers.four { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.offer { font: inherit; font-size: 1.15rem; color: var(--ink); background: var(--paper); border: 2px solid var(--brass); border-radius: 8px; padding: 1em; cursor: pointer; transition: transform .15s; }
.offer.small { padding: .8em; }
.offer small { font-size: .9rem; opacity: .8; }
.offer:hover, .offer:focus-visible { transform: translateY(-3px) rotate(-.5deg); }

.crew { display: grid; justify-items: center; text-align: center; background: linear-gradient(#1b130c, #0d3a44); }
.crew .dw-optin { text-align: left; width: 100%; }
.dw-optin button[type=submit] { background: var(--wine); color: var(--paper); font-family: var(--display); font-size: 1.2rem; font-weight: 400; }
.offer-note { margin: 0; color: var(--dw-accent); }

.foot { padding: 30px 16px 10px; text-align: center; border-top: 2px solid #c9963b55; }
.jolly { background: none; border: 0; color: var(--dw-accent); cursor: pointer; font-size: 1.1rem; opacity: .6; }
.jolly:hover, .jolly:focus-visible { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .my-hand.hint .card { animation: none; } }
