:root {
  /* K1: one material, one accent. Text is cool white; sea glass marks what is active or selected;
     orange is only ever a warning and always comes with ⚠ or ▼; money is white with a coin. */
  --glass: linear-gradient(160deg, rgba(34,52,66,0.52), rgba(12,20,28,0.6)); --glass-strong: linear-gradient(160deg, rgba(26,44,58,0.8), rgba(8,15,22,0.92));
  --line: rgba(255, 255, 255, 0.14); --edge: rgba(255,255,255,0.12); --edge2: rgba(255,255,255,0.22);
  --text: #eef4f8; --dim: rgba(226, 236, 244, 0.68); --faint: rgba(226, 236, 244, 0.44);
  --accent: #8be0ee; --sand: var(--accent); --sea: var(--accent); --brass: var(--accent); --warn: #ffa352; --ok: #8be0ee; --good: #8be0ee;
  --sea1: #12324a; --sea2: #081a28;
  --display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, sans-serif; --ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 30px rgba(0, 0, 0, 0.28);
  --blur: blur(24px) saturate(1.6);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b0f14; color: var(--text); font: 450 14px/1.45 var(--ui); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; font-feature-settings: "cv11", "ss03"; letter-spacing: -0.006em; }
canvas { display: block; width: 100vw; height: 100vh; touch-action: none; }
button { font: inherit; color: inherit; cursor: pointer; }
.ic { width: 16px; height: 16px; flex: none; display: block; }
[data-icon] { display: contents; }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.22); border-bottom-width: 2px; background: rgba(255,255,255,0.07); font: 600 11px/1 var(--ui); color: var(--text); }
.glassy, #place, #topright .bar, #hint, #flash, #autopill, #buyerpill, #power, #fight, #card, #strip, #helm, #sonar, #act, #sailpad button, #anchor, #tackle .tk {
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: var(--shadow);
}

/* Top left: where you are and what opens the next region. */
#place { position: fixed; top: 14px; left: 16px; display: flex; flex-direction: column; gap: 1px; padding: 10px 14px 11px; border-radius: 18px; pointer-events: none; width: max-content; max-width: 340px; }
#place strong { font: 600 20px/1.15 var(--display); letter-spacing: 0.005em; }
#place > span { color: var(--dim); font-size: 12px; }
#goalchip { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 7px; padding-top: 7px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 12px; color: var(--dim); align-items: center; }
#goalchip > span { display: inline-flex; align-items: center; gap: 4px; }
#goalchip > span:first-child { width: 100%; color: var(--text); }
#goalchip .ic { width: 13px; height: 13px; }
#goalchip .g { padding: 2px 8px; border-radius: 99px; border: 1px dashed rgba(255,255,255,0.25); }
#goalchip .g.ok { border: 1px solid rgba(139,224,238, 0.6); color: var(--sand); }

/* Top right: one status pill (money, cool box), one row of round tool buttons, and a small
   time-and-weather list that opens from its button. Labels show as tooltips. */
#topright { position: fixed; top: 14px; right: 16px; display: flex; gap: 8px; align-items: center; }
#money { display: flex; align-items: center; height: 40px; padding: 0 6px; border-radius: 99px; background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: var(--shadow); font-variant-numeric: tabular-nums; }
#money .chip { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 10px; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; box-shadow: none; }
#money .chip + .chip { border-left: 1px solid rgba(255,255,255,0.14); height: 20px; }
#money .chip b { font-weight: 700; font-size: 13px; white-space: nowrap; letter-spacing: 0.01em; }
#money .chip .ic { color: var(--sand); }
#money .cooler .ic { color: var(--sea); }
#money .cooler.full .ic, #money .cooler em { color: var(--warn); }
#money .cooler em { font-style: normal; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 99px; border: 1px solid var(--warn); }
#topright .bar { display: flex; align-items: center; gap: 2px; height: 40px; padding: 0 4px; border-radius: 99px; }
.ib, .seg button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 0; border-radius: 99px; background: none; font-size: 13px; font-weight: 600; transition: background 0.15s; }
.ib:hover, .seg button:hover { background: rgba(255,255,255,0.12); }
.ib kbd { margin-left: 2px; min-width: 18px; height: 18px; font-size: 11px; color: var(--dim); }
#topright .ib { position: relative; justify-content: center; width: 32px; height: 32px; padding: 0; }
#topright .ib .ic { width: 17px; height: 17px; }
#topright .ib[aria-expanded="true"] { background: rgba(255,255,255,0.18); }
#topright .ib[data-tip]:hover::after { content: attr(data-tip); position: absolute; top: calc(100% + 10px); right: 50%; transform: translateX(50%); padding: 5px 9px; border-radius: 8px; background: rgba(8,11,15,0.92); border: 1px solid var(--line); font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; z-index: 12; }
#todpop { position: absolute; top: calc(100% + 8px); right: 40px; display: grid; gap: 2px; width: 168px; padding: 6px; border-radius: 18px; background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: var(--shadow), 0 20px 50px rgba(0,0,0,0.35); z-index: 11; animation: sheet 0.18s ease; }
#todpop button { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border: 0; border-radius: 12px; background: none; color: var(--dim); font-size: 13px; font-weight: 600; text-align: left; }
#todpop button:hover { background: rgba(255,255,255,0.1); color: var(--text); }
#todpop button[aria-pressed="true"] { background: rgba(255,255,255,0.16); color: var(--text); }
#todpop button[aria-pressed="true"]::after { content: "✓"; margin-left: auto; color: var(--sand); }
.seg { display: flex; gap: 1px; }
.seg button { color: var(--dim); padding: 0 9px; }
.seg button[aria-pressed="true"] { background: rgba(255,255,255,0.16); color: var(--text); }
#count { display: none; }
.gfxk { font-size: 11px; font-weight: 800; color: var(--dim); margin-left: -2px; }

#reticle { position: fixed; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.7); pointer-events: none; }

/* Prompts. */
#hint { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); margin: 0; padding: 9px 18px; border-radius: 99px; text-align: center; font-size: 14px; font-weight: 600; pointer-events: none; white-space: nowrap; }
#hint:empty { display: none; }
#hint.urgent { font: 600 24px/1.2 var(--display); letter-spacing: 0.02em; padding: 10px 26px; border-color: rgba(139,224,238, 0.75); color: var(--sand); animation: pulse 0.35s ease-in-out infinite alternate; }
@keyframes pulse { from { transform: translateX(-50%) scale(1); } to { transform: translateX(-50%) scale(1.07); } }
#flash { position: fixed; left: 50%; top: 24%; transform: translateX(-50%); margin: 0; padding: 10px 20px; border-radius: 99px; font: 600 20px/1.2 var(--display); opacity: 0; pointer-events: none; white-space: nowrap; letter-spacing: -0.02em; }
#flash:empty { display: none; }
#flash.show { animation: flash 2.6s ease forwards; }
#flash.bad { border-color: rgba(255,163,82, 0.7); }
#flash.bad::before { content: "⚠  "; color: var(--warn); font-family: var(--ui); }
@keyframes flash { 0% { opacity: 0; transform: translate(-50%, 10px) scale(0.97); } 10%, 72% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -6px); } }

#power { position: fixed; left: 50%; bottom: 86px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 9px 16px; border-radius: 99px; }
#power .lbl { font-size: 11px; color: var(--dim); }
#power .bar { position: relative; width: 240px; height: 8px; border-radius: 99px; background: rgba(255,255,255,0.14); overflow: hidden; }
#power .bar i { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,0.55), #fff); transform-origin: left; border-radius: 99px; }
#power .sweet { position: absolute; left: 80%; top: 0; bottom: 0; width: 10%; border-right: 2px solid var(--sand); background: repeating-linear-gradient(45deg, rgba(139,224,238, 0.55) 0 3px, transparent 3px 6px); border-left: 2px solid var(--sand); }
#power span#powerVal { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 44px; }

/* Fight gauge. Tension shows as a number and a label as well as colour; danger adds stripes and a shake. */
#fight { position: fixed; right: 24px; top: 50%; transform: translateY(-50%); display: flex; gap: 16px; align-items: stretch; padding: 16px 18px; border-radius: 22px; }
#fight .tension { display: grid; justify-items: center; gap: 7px; }
#fight .lbl, #fight .small { font-size: 11px; color: var(--dim); }
#fight .vbar { position: relative; width: 16px; height: 190px; border-radius: 99px; background: rgba(255,255,255,0.1); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); }
#fight .vbar i { position: absolute; left: 0; right: 0; bottom: 0; height: 100%; background: linear-gradient(0deg, #4cb8cc, var(--sea)); transform-origin: bottom; transition: transform 0.08s linear; }
#fight .vbar .limit { position: absolute; left: -2px; right: -2px; top: 16.6%; height: 2px; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,0.8); }
#fight.danger .vbar i { background: var(--warn); background-image: repeating-linear-gradient(45deg, rgba(0,0,0,0.35) 0 4px, transparent 4px 8px); }
#fight.danger .vbar { animation: shake 0.12s linear infinite; }
#fight.slack .vbar i { background: repeating-linear-gradient(0deg, rgba(255,255,255,0.5) 0 3px, transparent 3px 6px); }
@keyframes shake { 0%,100% { transform: translateX(0); } 50% { transform: translateX(2px); } }
#tVal { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 16px; }
#fight .info { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 168px; }
#fishMode { font: 600 24px/1.1 var(--display); letter-spacing: -0.02em; }
#tWarn { align-self: flex-start; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: rgba(139,224,238, 0.16); border: 1px solid rgba(139,224,238, 0.45); }
#tWarn:empty { display: none; }
#fight.danger #tWarn, #fight.slack #tWarn { background: var(--warn); border-color: var(--warn); color: #1b0e04; }
#fight .hbar { width: 168px; height: 6px; margin-top: 6px; border-radius: 99px; background: rgba(255,255,255,0.12); overflow: hidden; }
#fight .hbar i { display: block; height: 100%; background: #fff; transform-origin: left; }
#fight .small b { color: var(--text); font-variant-numeric: tabular-nums; }

/* The catch. */
#card { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); width: min(400px, 92vw); padding: 0 22px 16px; border-radius: 26px; text-align: center; background: var(--glass-strong); animation: rise 0.5s cubic-bezier(.2,.9,.3,1.2); overflow: hidden; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 24px) scale(0.96); } }
#card .ph { margin: 0 -22px 2px; height: 150px; display: grid; place-items: center; background: radial-gradient(ellipse 60% 70% at 50% 60%, rgba(139,224,238, 0.22), transparent 70%); }
#card .ph img { width: 92%; max-height: 150px; object-fit: contain; filter: drop-shadow(0 12px 14px rgba(0,0,0,0.45)); animation: swimin 0.7s cubic-bezier(.2,.9,.3,1.1); }
@keyframes swimin { from { transform: translateX(-30px) rotate(-4deg); opacity: 0; } }
#card .tag { display: inline-block; padding: 3px 11px; border-radius: 99px; font-size: 11px; font-weight: 700; color: var(--dim); border: 1px solid var(--line); }
#card .tag:empty { display: none; }
#card .tag.hi { background: var(--sand); color: #06222b; border-color: var(--sand); }
#card .tag.hi::before { content: "✓ "; }
#card h2 { margin: 8px 0 0; font: 600 32px/1.1 var(--display); letter-spacing: -0.02em; }
#card .en { margin: 3px 0 14px; color: var(--dim); font-size: 13px; }
#card .stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1); }
#card .stats div { display: grid; gap: 1px; padding: 10px 4px; }
#card .stats div + div { border-left: 1px solid rgba(255,255,255,0.1); }
#card .stats b { font: 600 20px/1.2 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
#card .stats div:last-child b { color: var(--sand); font-size: 16px; line-height: 1.4; }
#card .stats span { font-size: 11px; color: var(--dim); }
#card .small { margin: 12px 0 0; font-size: 12px; color: var(--dim); }

/* Before the game: the title reel, the menu, the guide, credits and the logbook. The sea stays
   in view behind all of it; only a soft shade on the left keeps the words readable. */
#start { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
#start > * { pointer-events: auto; }
#start::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(5,8,12,0.62), rgba(5,8,12,0.18) 46%, rgba(5,8,12,0) 70%); opacity: 0; transition: opacity 1.2s; }
#start:not([data-step="title"])::before { opacity: 1; }
#start[data-step="title"]::before { opacity: 1; background: linear-gradient(0deg, rgba(5,8,12,0.6), rgba(5,8,12,0.15) 45%, rgba(5,8,12,0) 60%); }
#start .eyebrow { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sand); }
#start h1 { margin: 0; font: 500 132px/0.9 var(--display); letter-spacing: -0.035em; text-shadow: 0 6px 40px rgba(0,0,0,0.35); }
#start .side, #menu, #prep, #titleScreen { transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2,.9,.3,1), visibility 0s 0.9s; opacity: 0; visibility: hidden; }
#start[data-step="title"] #titleScreen, #start[data-step="menu"] #menu, #start[data-step="guide"] #guide, #start[data-step="credits"] #creditsBox, #start[data-step="prep"] #prep { opacity: 1; visibility: visible; transform: none; transition-delay: 0s, 0s, 0s; }
#titleScreen { position: absolute; left: 0; right: 0; bottom: 15vh; text-align: center; animation: titlein 3.4s cubic-bezier(.2,.8,.2,1) both; pointer-events: none; }
@keyframes titlein { from { opacity: 0; letter-spacing: 0.08em; filter: blur(8px); } 40% { opacity: 0; } }
#titleScreen h1 { font-size: clamp(84px, 13vw, 168px); }
#press { margin: 22px 0 0; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
#press.ready { color: var(--text); animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.4; } }
#start .loading { width: 180px; margin: 14px auto 0; transition: opacity 0.6s; }
#start .loading.done { opacity: 0; }
#start .loadbar { height: 1px; background: rgba(255,255,255,0.18); overflow: hidden; }
#start .loadbar i { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); transition: transform 0.5s; }
#loadtip { display: none; }
/* The menu: words on the sea, no card. */
#menu { position: absolute; left: clamp(28px, 7vw, 110px); top: 50%; transform: translate(-16px, -50%); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: min(420px, 80vw); }
#start[data-step="menu"] #menu { transform: translate(0, -50%); }
#menu h1 { font-size: 96px; margin-bottom: 4px; }
#startSub { margin: 0 0 26px; color: var(--dim); font-size: 13px; }
#menu button { position: relative; display: flex; align-items: center; gap: 0; padding: 7px 0; border: 0; background: none; font: 500 24px/1.15 var(--display); color: rgba(236,243,248, 0.62); transition: color 0.3s, transform 0.35s cubic-bezier(.2,.9,.3,1); text-align: left; letter-spacing: -0.02em; }
#menu button::before { content: ""; width: 0; height: 1px; margin-right: 0; background: var(--sand); transition: width 0.35s cubic-bezier(.2,.9,.3,1), margin 0.35s cubic-bezier(.2,.9,.3,1); }
#menu button:hover:not(:disabled), #menu button:focus-visible { color: var(--text); outline: none; }
#menu button:hover:not(:disabled)::before, #menu button:focus-visible::before { width: 26px; margin-right: 12px; }
#menu button[data-m="continue"] { color: var(--text); font-size: 32px; margin-bottom: 6px; }
#menu button:disabled { cursor: progress; color: var(--faint); }
#menu button[data-m="new"] span { transition: color 0.2s; }
/* Guide and credits: a quiet column on the left. */
#start .side { position: absolute; left: clamp(28px, 7vw, 110px); top: 50%; transform: translate(-16px, -50%); width: min(560px, calc(100vw - 56px)); max-height: 86vh; overflow: auto; }
#start[data-step="guide"] #guide, #start[data-step="credits"] #creditsBox { transform: translate(0, -50%); }
#start .side h2 { margin: 0 0 18px; font: 500 40px/1 var(--display); letter-spacing: -0.02em; }
#start .controls { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 18px; }
#start h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 10px; font-size: 11px; font-weight: 700; color: var(--sand); }
#start dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; margin: 0; align-items: center; }
#start dt { display: flex; gap: 3px; justify-content: flex-end; }
#start dd { margin: 0; font-size: 13px; color: rgba(236,243,248, 0.9); }
#start .cr { grid-template-columns: 1fr; gap: 2px; }
#start .cr dt { justify-content: flex-start; margin-top: 12px; font-size: 11px; font-weight: 700; color: var(--sand); }
#start .dockhelp { margin: 4px 0 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.14); }
#start .dockhelp .only { margin: 0 0 10px; font-size: 13px; color: var(--text); }
#start .dockhelp dt { font-size: 12px; font-weight: 700; color: var(--sand); justify-content: flex-start; }
#start .touchhelp { display: none; margin: 0 0 18px; padding-left: 18px; color: rgba(236,243,248, 0.9); }
#start .touchhelp li { margin: 5px 0; }
#start .small { font-size: 12px; color: var(--faint); margin: 0 0 18px; }
#start .back { height: 40px; padding: 0 20px; margin-top: 8px; border: 1px solid rgba(255,255,255,0.3); border-radius: 99px; background: none; font-weight: 600; }
#start .back:hover { background: rgba(255,255,255,0.1); }
#start .skip { position: absolute; right: 22px; bottom: 18px; margin: 0; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); opacity: 0; transition: opacity 0.6s; pointer-events: none; }
#start[data-step="title"] .skip { opacity: 1; }
#start.hidden { display: none; }
body.departing :is(#autopill, #buyerpill, #place, #topright, #sonar, #hint, #flash, #reticle, #act, #anchor, #sailpad, #fishcam, #coach, #nav), body:has(#start:not(.hidden)) :is(#place, #topright, #sonar, #hint, #flash, #reticle, #act, #anchor, #sailpad, #fishcam, #coach) { visibility: hidden; }
/* Coming on stage: the HUD fades in after the opening shot. */
body.enter :is(#place, #topright, #sonar, #hint, #fishcam) { animation: hudin 1.4s ease both; }
@keyframes hudin { from { opacity: 0; } }

/* Film: letterbox bars to 2.39:1, title cards, fades through black. */
#bars { position: fixed; inset: 0; pointer-events: none; z-index: 35; }
#bars i { position: absolute; left: 0; right: 0; height: max(0px, calc((100vh - 100vw / 2.39) / 2)); background: #000; transform: scaleY(0); transition: transform 1.1s cubic-bezier(.6,0,.2,1); }
#bars i:first-child { top: 0; transform-origin: top; }
#bars i:last-child { bottom: 0; transform-origin: bottom; }
#bars.on i { transform: scaleY(1); }
@media (max-aspect-ratio: 16/10) { #bars i { height: 9vh; } }
#titlecard { position: fixed; left: 0; right: 0; bottom: 19vh; z-index: 36; text-align: center; pointer-events: none; opacity: 0; transition: opacity 1.4s ease; }
#titlecard.show { opacity: 1; transition-duration: 0.9s; }
#titlecard .eb { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sand); text-shadow: 0 2px 12px rgba(0,0,0,0.5); }
#titlecard h2 { margin: 6px 0 0; font: 500 clamp(40px, 6vw, 74px)/1 var(--display); letter-spacing: -0.02em; text-shadow: 0 4px 30px rgba(0,0,0,0.45); }
#titlecard.show h2 { animation: track 4s cubic-bezier(.2,.8,.2,1) both; }
@keyframes track { from { letter-spacing: 0.06em; filter: blur(6px); opacity: 0; } 30% { filter: blur(0); opacity: 1; } }
#titlecard .sb { margin: 8px 0 0; font-size: 13px; letter-spacing: 0.06em; color: rgba(236,243,248, 0.82); text-shadow: 0 2px 12px rgba(0,0,0,0.5); }
#fade { position: fixed; inset: 0; z-index: 60; background: #000; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
#fade.on { opacity: 1; }
/* H hides every piece of interface for a clean view. */
body.noui :is(#autopill, #buyerpill, #place, #topright, #sonar, #hint, #reticle, #fight, #tarc, #act, #anchor, #sailpad, #nav, #fishcam, #coach, #fisharrow, #toasts, #power, #cupchip, #card) { opacity: 0 !important; pointer-events: none !important; transition: opacity 0.6s; }

/* Panels: dock, journal, map. */
#panel { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(5,8,12,0.42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 20; animation: fade 0.2s ease; }
@keyframes fade { from { opacity: 0; } }
#panel .sheet { display: flex; flex-direction: column; width: min(900px, 100%); max-height: min(86vh, 860px); border-radius: 28px; background: var(--glass-strong); backdrop-filter: blur(26px) saturate(1.4); -webkit-backdrop-filter: blur(26px) saturate(1.4); border: 1px solid var(--line); box-shadow: var(--shadow), 0 30px 80px rgba(0,0,0,0.4); overflow: hidden; animation: sheet 0.28s cubic-bezier(.2,.9,.3,1); }
#panel .sheet.again { animation: none; }
@keyframes sheet { from { opacity: 0; transform: translateY(14px) scale(0.985); } }
#panel header { display: flex; align-items: center; gap: 12px; padding: 18px 20px 12px 22px; }
#panel header > div { flex: 1; min-width: 0; }
#panel .badge { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: rgba(139,224,238, 0.14); color: var(--sand); }
#panel .badge .ic { width: 20px; height: 20px; }
#panel h2 { margin: 0; font: 600 24px/1.15 var(--display); letter-spacing: -0.02em; }
#panel .sub { margin: 2px 0 0; color: var(--dim); font-size: 13px; }
#panel .x { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px 0 10px; border: 1px solid var(--line); background: rgba(255,255,255,0.05); border-radius: 99px; }
#panel .x:hover { background: rgba(255,255,255,0.12); }
#panel .x kbd { height: 18px; font-size: 11px; color: var(--dim); }
#panel .body { overflow: auto; padding: 4px 22px 22px; overscroll-behavior: contain; }
#panel footer { display: flex; align-items: center; gap: 16px; padding: 14px 22px; border-top: 1px solid var(--line); background: rgba(255,255,255,0.03); }
#panel h3 { margin: 18px 0 9px; font-size: 11px; font-weight: 700; color: var(--dim); }
#panel .tabs { display: flex; gap: 2px; margin: 0 22px 10px; padding: 3px; border-radius: 99px; background: rgba(255,255,255,0.06); align-self: flex-start; }
#panel .tabs button { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border: 0; border-radius: 99px; background: none; color: var(--dim); font-size: 13px; font-weight: 600; }
#panel .tabs button[aria-selected="true"] { background: rgba(255,255,255,0.16); color: var(--text); }
#panel .tabs em { font-style: normal; font-size: 11px; min-width: 18px; height: 18px; display: grid; place-items: center; border-radius: 99px; background: var(--sand); color: #06222b; }
#panel button:disabled { cursor: default; }
#panel .item button, #panel .region button, #panel .primary, #panel .order button, #panel footer button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px; border: 1px solid var(--line); background: rgba(255,255,255,0.08); border-radius: 99px; font-size: 13px; font-weight: 700; transition: background 0.15s; }
#panel .item button:hover:not(:disabled), #panel .region button:hover:not(:disabled), #panel .order button:hover:not(:disabled), #panel footer button:not(.primary):hover:not(:disabled) { background: rgba(255,255,255,0.18); }
#panel .item button:disabled, #panel .region button:disabled, #panel .order button:disabled, #panel footer button:disabled { background: none; color: var(--dim); border-color: transparent; padding-left: 0; }
#panel .item button .ic, #panel .region button .ic { width: 14px; height: 14px; }
#panel button.short { color: var(--faint); border-style: dashed; }
#panel .primary { height: 40px; padding: 0 22px; background: #fff; color: #10141a; border: 0; margin-left: auto; }
#panel .primary:hover { background: #dfe9ef; }
#panel .total { display: flex; flex-direction: column; }
#panel .total span { font-size: 11px; color: var(--dim); }
#panel .total b { font: 600 24px/1.2 var(--display); color: var(--sand); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
#panel .empty { display: grid; justify-items: center; gap: 2px; padding: 40px 0 30px; color: var(--dim); text-align: center; }
#panel .empty .ic { width: 34px; height: 34px; opacity: 0.6; margin-bottom: 6px; }
#panel .empty p { margin: 0; color: var(--text); font-weight: 600; }
#panel .empty span { font-size: 13px; }
#panel .rows { display: grid; gap: 6px; }
#panel .row { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 14px; padding: 6px 14px 6px 6px; border-radius: 16px; background: rgba(255,255,255,0.045); }
#panel .row img { width: 96px; height: 44px; object-fit: contain; }
#panel .row div { display: grid; }
#panel .row span { font-size: 12px; color: var(--dim); }
#panel .row strong { font-variant-numeric: tabular-nums; }
#panel .rig { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 2px; padding: 10px 12px; border-radius: 16px; background: rgba(139,224,238, 0.08); border: 1px solid rgba(139,224,238, 0.2); }
#panel .rig span { font-size: 11px; font-weight: 700; color: var(--dim); margin-right: 4px; }
#panel .rig b { font-size: 13px; padding: 3px 10px; border-radius: 99px; background: rgba(255,255,255,0.07); font-variant-numeric: tabular-nums; }
#panel .items { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
#panel .item { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 13px 14px 12px; border-radius: 18px; background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.07); }
#panel .item > b { padding-right: 26px; line-height: 1.25; }
#panel .item > span:not(.meter):not(.tier) { font-size: 12px; color: var(--dim); }
#panel .item .tier { position: absolute; top: 10px; right: 13px; font: 600 14px/1 var(--display); color: var(--faint); letter-spacing: -0.01em; }
#panel .item.own { background: rgba(255,255,255,0.07); }
#panel .item.eq { border-color: rgba(139,224,238, 0.65); background: rgba(139,224,238, 0.07); }
#panel .item.eq .tier { color: var(--sand); }
#panel .item.soon { opacity: 0.55; }
#panel .item button { align-self: flex-start; margin-top: auto; }
#panel .item .meter { margin: 3px 0 0; }
#panel .boats .item { min-height: 168px; }
.meter { display: block; height: 4px; border-radius: 99px; background: rgba(255,255,255,0.1); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--sea); }

#panel .goals { padding: 14px 16px; border-radius: 20px; background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.07); }
#panel .goals h3 { margin: 0 0 10px; }
#panel .goal { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 12px; padding: 8px 0; }
#panel .goal + .goal { border-top: 1px solid rgba(255,255,255,0.07); }
#panel .goal .mk { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px dashed rgba(255,255,255,0.35); }
#panel .goal.ok .mk { border: 0; background: var(--sand); color: #06222b; }
#panel .goal.ok .mk .ic { width: 15px; height: 15px; stroke-width: 2.4; }
#panel .goal div { display: grid; gap: 5px; }
#panel .goal div span:not(.meter) { font-size: 12px; color: var(--dim); }
#panel .goal strong { font-variant-numeric: tabular-nums; }
#panel .goal.ok strong { color: var(--sand); }
#panel .goals .small { display: flex; gap: 6px; align-items: center; margin: 8px 0 0; color: var(--dim); font-size: 12px; }
#panel .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
#panel .fishcard { display: flex; flex-direction: column; gap: 2px; padding: 0 12px 11px; border-radius: 18px; background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.07); }
#panel .fishcard .ph { position: relative; margin: 0 -12px 4px; height: 92px; padding-top: 14px; display: grid; place-items: center; background: radial-gradient(ellipse 60% 70% at 50% 60%, rgba(139,224,238, 0.14), transparent 70%); }
#panel .fishcard .ph img { width: 86%; height: 70px; object-fit: contain; }
#panel .fishcard.unknown { border-style: dashed; border-color: rgba(255,255,255,0.14); }
#panel .fishcard.unknown img, #panel .fishrow img.unknown { filter: brightness(0) invert(1); opacity: 0.26; }
#panel .fishcard.unknown b { color: var(--dim); }
#panel .fishcard span { font-size: 12px; color: var(--dim); }
#panel .fishcard em { display: flex; justify-content: space-between; margin-top: 4px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,0.07); font-style: normal; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
#panel .fishcard em span:last-child { color: var(--text); font-weight: 700; }
#panel .pill { position: absolute; top: 7px; right: 8px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; border: 1px dashed rgba(139,224,238, 0.6); color: var(--sand); }
#panel .pill.ok { border-style: solid; }
#panel .pill .ic { width: 11px; height: 11px; stroke-width: 2.4; }

/* Map. */
.chart { display: block; width: 100%; height: auto; }
.chart .grid { stroke: rgba(255,255,255,0.05); stroke-width: 1; fill: none; }
.chart .eq { stroke: rgba(255,255,255,0.14); stroke-width: 1; stroke-dasharray: 2 5; fill: none; }
.chart .near { fill: #1f3029; stroke: #34503f; stroke-width: 0.7; }
.chart .indo { fill: #3c5f4a; stroke: #86b394; stroke-width: 0.7; stroke-linejoin: round; }
.chart .leg { fill: none; stroke: rgba(255,255,255,0.35); stroke-width: 1.4; stroke-dasharray: 3 5; }
.chart .leg.open { stroke: rgba(139,224,238, 0.85); stroke-dasharray: none; stroke-width: 1.8; }
.chart .pin circle { fill: #fff; stroke: var(--sea2); stroke-width: 2; }
.chart .pin.here circle { fill: var(--sand); }
.chart .pin.here .halo { fill: none; stroke: var(--sand); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; animation: halo 1.8s ease-out infinite; }
@keyframes halo { from { transform: scale(0.5); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.chart .pin.locked circle { fill: var(--sea2); stroke: rgba(255,255,255,0.55); stroke-width: 1.3; stroke-dasharray: 3 2; }
.chart .pin .lk { fill: none; stroke: rgba(255,255,255,0.8); stroke-width: 1.1; stroke-linejoin: round; }
.chart .pin text { fill: #fff; font: 700 13px var(--ui); paint-order: stroke; stroke: rgba(8,26,38,0.9); stroke-width: 4px; stroke-linejoin: round; }
.chart .pin text .n { fill: var(--sand); }
.chart .pin.locked text { fill: rgba(255,255,255,0.6); }
.chart .pin.locked text .n { fill: rgba(255,255,255,0.6); }
.chart .pin .hit { fill: transparent; stroke: none; }
.chart .pin[data-act] { cursor: pointer; }
.chart .pin[data-act]:hover text { fill: var(--sand); }
#panel .mapwrap { border-radius: 20px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); background: var(--sea2); }
#panel .regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 8px; margin-top: 12px; }
#panel .region { display: grid; grid-template-columns: 30px 1fr; gap: 4px 12px; padding: 12px 14px; border-radius: 18px; background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.07); }
#panel .region .num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: #10141a; font: 600 14px/1 var(--display); letter-spacing: -0.01em; }
#panel .region.here { border-color: rgba(139,224,238, 0.65); background: rgba(139,224,238, 0.07); }
#panel .region.here .num { background: var(--sand); }
#panel .region.locked .num { background: none; border: 1.5px dashed rgba(255,255,255,0.4); color: var(--dim); }
#panel .region.locked .txt b { color: var(--dim); }
#panel .region .txt { display: grid; gap: 1px; min-width: 0; }
#panel .region .txt > span { font-size: 12px; color: var(--dim); }
#panel .fishrow { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 6px; }
#panel .fishrow img { width: 46px; height: 22px; object-fit: contain; }
#panel .region button { grid-column: 2; justify-self: start; margin-top: 6px; }
#panel .region button.go { background: #fff; color: #10141a; border-color: #fff; }
#panel .region button.go:hover { background: #dfe9ef; }

/* Voyage between regions. */
#voyage { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(5,8,12,0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); z-index: 30; text-align: center; animation: fade 0.4s ease; }
#voyage .vg { width: min(780px, 100%); }
#voyage .eyebrow { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sand); }
#voyage h2 { margin: 4px 0 2px; font: 600 40px/1.05 var(--display); letter-spacing: -0.02em; }
#voyage .vg > p:not(.eyebrow) { color: var(--dim); margin: 0 0 18px; }
#voyage .chart { border-radius: 22px; border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 30px 80px rgba(0,0,0,0.45); }
#voyage .trip { fill: none; stroke: var(--sand); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 5.4s cubic-bezier(.45,0,.55,1); }
#voyage.go .trip { stroke-dashoffset: 0; }
#voyage .ship circle { fill: #fff; stroke: var(--sand); stroke-width: 2.5; }
#voyage .bar { width: min(360px, 80%); height: 4px; border-radius: 99px; background: rgba(255,255,255,0.14); overflow: hidden; margin: 20px auto 8px; }
#voyage .bar i { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(0); transition: transform 5.5s linear; }
#voyage.go .bar i { transform: scaleX(1); }
#voyage .small { font-size: 12px; color: var(--faint); }

/* Sailing HUD: compass strip, throttle and speed. */
#nav { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); width: min(560px, 46vw); text-align: center; pointer-events: none; }
#strip { position: relative; height: 46px; border-radius: 16px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
#strip::after { content: ""; position: absolute; left: 50%; top: 0; width: 0; height: 0; margin-left: -6px; border: 6px solid transparent; border-top-color: #fff; }
#strip span { position: absolute; top: 6px; transform: translateX(-50%); font-size: 11px; font-weight: 600; white-space: nowrap; }
#strip .cd { top: 15px; font: 600 14px/1 var(--display); color: var(--dim); letter-spacing: -0.01em; }
#strip .mk { display: grid; justify-items: center; line-height: 1.15; }
#strip .mk i { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); margin-bottom: 2px; box-shadow: 0 0 0 2px rgba(0,0,0,0.25); }
#strip .mk.dock i { border-radius: 1px; background: #fff; }
#strip .mk.dock { color: #fff; font-weight: 700; }
#strip .edge { top: 13px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,0.92); color: #10141a; font-size: 11px; font-weight: 700; transform: none; }
#strip .edge.l { left: 16% !important; }
#strip .edge.r { left: auto !important; right: 16%; }
#strip .edge b { font-size: 12px; }
#strip .mk.rumpon i { transform: rotate(45deg); border-radius: 1px; }
#strip .mk em { font-style: normal; color: var(--dim); font-size: 11px; font-variant-numeric: tabular-nums; }
#helm { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; padding: 6px 14px 6px 10px; border-radius: 99px; }
#helm .lever { width: 6px; height: 26px; border-radius: 99px; background: rgba(255,255,255,0.15); overflow: hidden; display: flex; align-items: flex-end; }
#helm .lever i { display: block; width: 100%; height: 100%; background: #fff; transform-origin: bottom; }
#helm .lever i.rev { background: repeating-linear-gradient(45deg, #fff 0 3px, transparent 3px 6px); }
#speed { font: 600 20px/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
#navhint { margin: 8px 0 0; font-size: 13px; font-weight: 600; text-shadow: 0 1px 8px rgba(0,0,0,0.7); }

#sonar { position: fixed; right: 16px; bottom: 16px; padding: 5px; border-radius: 18px; }
#finder { width: 240px; height: 150px; border-radius: 13px; }
#sonar .lbl { position: absolute; top: 11px; left: 13px; font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.55); pointer-events: none; }
/* E5: the sounder grows on a click (F); E4: the view chip cycles normal, bottom zoom, DownScan (B). */
#sonar { cursor: pointer; }
#finder { display: block; }
#sview { position: absolute; top: 9px; left: 58px; height: 20px; padding: 0 8px; border-radius: 99px; border: 1px solid rgba(255,255,255,0.22); background: rgba(4,16,25,0.55); color: #fff; font: 600 10.5px/1 var(--body, Inter, sans-serif); cursor: pointer; }
#sview::after { content: " ▸"; color: var(--accent); }
#sview:hover { background: rgba(255,255,255,0.16); }
body.sonar-big #finder { width: 440px; height: 272px; }
@media (min-width: 900px) and (pointer: fine) {
  body.sonar-big #tackle { top: auto; bottom: 316px; transform: none; }
  body.sonar-big #hint { left: calc((100vw - 480px) / 2); max-width: calc(100vw - 540px); white-space: normal; border-radius: 22px; }
}
#fishcam { position: fixed; left: 30px; bottom: 300px; font-size: 11px; font-weight: 700; color: var(--dim); text-shadow: 0 1px 6px rgba(0,0,0,0.6); pointer-events: none; }
#fishcam b { color: var(--text); margin-left: 6px; }
body[data-mode="sail"] #reticle, body[data-mode="sail"] #fishcam { display: none; }

/* Touch controls. */
#act { display: none; position: fixed; right: 18px; bottom: 22px; width: 96px; height: 96px; border-radius: 50%; font-weight: 800; font-size: 16px; touch-action: none; }
#act.urgent { border-color: var(--sand); color: var(--sand); animation: pulse2 0.35s ease-in-out infinite alternate; }
@keyframes pulse2 { to { transform: scale(1.08); } }
#act:active { background: rgba(255,255,255,0.22); }
#sailpad, #anchor { display: none; }
#anchor { align-items: center; gap: 7px; }

@media (max-width: 1180px) {
  #nav { width: min(460px, 40vw); }
}
@media (pointer: coarse) {
  kbd, .ib kbd, #panel .x kbd { display: none; }
  #act { display: block; }
  #fight { right: 12px; top: 40%; padding: 12px 14px; }
  #fight .vbar { height: 130px; }
  #hint { bottom: 184px; font-size: 13px; white-space: normal; width: max-content; max-width: 86vw; }
  #start .controls, #start .small { display: none; }
  #start .touchhelp { display: block; }
  #start .skip { display: none; }
  #sonar { left: 10px; right: auto; bottom: 20px; }
  body[data-mode="sail"] #sonar { left: auto; right: 10px; }
  #finder { width: 156px; height: 98px; }
  body[data-mode="sail"] #act { display: none; }
  body[data-mode="sail"] #sailpad { display: grid; }
  #sailpad { position: fixed; left: 14px; bottom: 18px; grid-template-columns: 66px 66px 66px; grid-template-rows: 66px 66px; gap: 8px; }
  #sailpad button { border-radius: 18px; font-size: 20px; touch-action: none; }
  #sailpad button:active { background: rgba(255,255,255,0.22); }
  #sailpad [data-d="up"] { grid-column: 2; grid-row: 1; }
  #sailpad [data-d="left"] { grid-column: 1; grid-row: 2; }
  #sailpad [data-d="right"] { grid-column: 3; grid-row: 2; }
  #sailpad [data-d="down"] { grid-column: 2; grid-row: 2; }
  #anchor { display: inline-flex; position: fixed; right: 16px; bottom: 136px; border-radius: 99px; height: 48px; padding: 0 18px; font-size: 14px; font-weight: 700; }
  #card { bottom: 130px; }
}
@media (max-width: 760px) {
  #place { top: 60px; left: 10px; padding: 8px 12px 9px; max-width: calc(100vw - 20px); }
  #place strong { font-size: 16px; }
  #goalchip { margin-top: 5px; padding-top: 5px; font-size: 11px; }
  #topright { top: 10px; right: 10px; left: 10px; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  #topright .bar { margin-left: auto; }
  #money { height: 40px; }
  #money .chip { padding: 0 8px; }
  #todpop { right: 0; }
  #nav { top: 190px; width: 92vw; }
  #fight { top: auto; bottom: 236px; right: 10px; transform: none; padding: 10px 12px; gap: 10px; }
  #fight .vbar { height: 100px; width: 10px; }
  #fight .info { min-width: 128px; }
  #fight .hbar { width: 128px; }
  #fishMode { font-size: 16px; }
  #menu { left: 22px; top: auto; bottom: 26px; transform: translateY(12px); }
  #start[data-step="menu"] #menu { transform: none; }
  #menu h1 { font-size: 64px; }
  #menu button { font-size: 20px; padding: 6px 0; }
  #menu button[data-m="continue"] { font-size: 32px; }
  #start .side { left: 18px; width: calc(100vw - 36px); }
  #start .side h2 { font-size: 32px; }
  #start .controls { grid-template-columns: 1fr; }
  #prep { left: 8px; right: 8px; width: auto; top: auto; bottom: 8px; transform: translateY(30px); max-height: 68vh; }
  #start[data-step="prep"] #prep { transform: none; }
  #start::before { background: linear-gradient(0deg, rgba(5,8,12,0.7), rgba(5,8,12,0) 70%); }
  #panel { padding: 0; place-items: end center; }
  #panel .sheet { max-height: 92vh; border-radius: 26px 26px 0 0; }
  #panel header { padding: 16px 16px 10px; }
  #panel .body { padding: 4px 16px 18px; }
  #panel .tabs { margin: 0 16px 10px; }
  #panel .tabs button { padding: 0 11px; font-size: 13px; }
  #panel footer { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  #panel .items { grid-template-columns: 1fr 1fr; }
  #panel .cards { grid-template-columns: 1fr 1fr; }
  #panel .row { grid-template-columns: 72px 1fr auto; gap: 10px; }
  #panel .row img { width: 72px; }
  #voyage h2 { font-size: 32px; }
}

/* HUD size, toggles and high contrast from Settings. */
#place, #topright, #hint, #fight, #card, #sonar, #power, #nav, #act, #anchor, #sailpad { zoom: var(--hud, 1); }
body.no-sonar #sonar, body.no-compass #strip { display: none; }
body.contrast { --glass: rgba(6, 9, 13, 0.86); --glass-strong: rgba(6, 9, 13, 0.95); --line: rgba(255, 255, 255, 0.55); --dim: rgba(236,243,248,  0.85); }

/* Pause menu and settings. */
#panel .menu { display: grid; gap: 8px; max-width: 360px; margin: 6px auto 0; }
#panel .menu button { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,0.06); font-size: 16px; font-weight: 600; text-align: left; }
#panel .menu button:hover { background: rgba(255,255,255,0.14); }
#panel .menu button.primary { background: #fff; color: #10141a; border-color: #fff; margin: 0; }
#panel .menu .ic { width: 18px; height: 18px; }
#panel .center { text-align: center; color: var(--faint); font-size: 12px; }
#panel .sheet.pause { width: min(440px, 100%); }
#panel .sheet.settings { width: min(620px, 100%); }
#panel .set { display: grid; grid-template-columns: 1fr minmax(160px, 240px) 48px; align-items: center; gap: 14px; padding: 12px 2px; border-bottom: 1px solid rgba(255,255,255,0.07); }
#panel .set > span { display: grid; gap: 2px; font-weight: 600; }
#panel .set em { font-style: normal; font-weight: 500; font-size: 12px; color: var(--dim); }
#panel .set output { font-size: 12px; color: var(--dim); text-align: right; font-variant-numeric: tabular-nums; }
#panel .set input[type=range] { width: 100%; accent-color: #fff; }
#panel .set .seg2 { grid-column: 2 / 4; display: flex; gap: 2px; padding: 3px; border-radius: 99px; background: rgba(255,255,255,0.07); }
#panel .set .seg2 button { flex: 1; height: 32px; border: 0; border-radius: 99px; background: none; color: var(--dim); font-weight: 600; }
#panel .set .seg2 button[aria-pressed="true"] { background: #fff; color: #10141a; }
#panel .set.tog { grid-template-columns: 1fr auto; cursor: pointer; }
#panel .set.tog input { position: absolute; opacity: 0; pointer-events: none; }
#panel .set.tog i { position: relative; width: 44px; height: 26px; border-radius: 99px; background: rgba(255,255,255,0.16); transition: background 0.15s; }
#panel .set.tog i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
#panel .set.tog input:checked + i { background: var(--sea); }
#panel .set.tog input:checked + i::after { transform: translateX(18px); }
#panel .set.tog input:focus-visible + i { outline: 2px solid #fff; outline-offset: 2px; }
#panel dl.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; align-items: center; }
#panel dl.keys dt { display: flex; gap: 4px; justify-content: flex-end; }
#panel dl.keys dd { margin: 0; color: var(--dim); font-size: 13px; }
@media (max-width: 760px) { #panel .set { grid-template-columns: 1fr 120px 40px; } }

/* Calm HUD while waiting for a bite. */
#place, #topright, #sonar, #hint { transition: opacity 0.6s; }
body.calm :is(#place, #topright, #nav) { opacity: 0.15; transition: opacity 1.6s; }
/* The sounder stays lit while you wait: that is when you match the bait to the marks. */
body.calm #hint { opacity: 0.5; transition: opacity 1.6s; }

/* Tension arc by the float: three quarters of a circle, breaking point marked. */
#tarc { position: fixed; left: 50%; top: 58%; width: 132px; height: 132px; margin: -66px; pointer-events: none; display: grid; place-items: center; zoom: var(--hud, 1); }
#tarc svg { position: absolute; inset: 0; transform: rotate(135deg); overflow: visible; }
#tarc circle { fill: none; stroke-width: 7; stroke-linecap: round; }
#tarc .trk { stroke: rgba(0,0,0,0.35); stroke-dasharray: 235.6 314.2; stroke-width: 10; }
#tarc .lim { stroke: #fff; stroke-dasharray: 2.5 314.2; stroke-dashoffset: -196; stroke-width: 12; }
#tarc .val { stroke: var(--sea); transition: stroke-dasharray 0.08s linear; }
#tarc.danger .val { stroke: var(--warn); }
#tarc.danger { animation: shake 0.12s linear infinite; }
#tarc b { font: 700 24px/1 var(--ui); font-variant-numeric: tabular-nums; text-shadow: 0 1px 8px rgba(0,0,0,0.6); margin-top: 6px; }
#tarc span { position: absolute; bottom: 10px; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: rgba(0,0,0,0.35); }
#tarc.danger span, #tarc.slack span { background: var(--warn); color: #1b0e04; }
#fight .tension { display: none; }
#hint kbd { margin: 0 2px; vertical-align: 1px; }

/* Arrow at the screen edge toward a fish that has run out of view. */
#fisharrow { position: fixed; z-index: 5; display: grid; justify-items: center; gap: 2px; transform: translate(-50%, -50%); pointer-events: none; color: var(--warn); }
#fisharrow svg { width: 34px; height: 34px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6)); }
#fisharrow span { font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,0.7); }

/* Loading on the title card. */
#start .loading { margin: 0 0 16px; transition: opacity 0.5s; }
#start .loading.done { opacity: 0; height: 0; margin: 0; overflow: hidden; }
#start .loadbar { height: 4px; border-radius: 99px; background: rgba(255,255,255,0.12); overflow: hidden; }
#start .loadbar i { display: block; height: 100%; background: var(--sand); transform: scaleX(0.05); transform-origin: left; transition: transform 0.4s; }
#loadtip { margin: 8px 0 0; font-size: 13px; color: var(--dim); min-height: 18px; }

/* First-trip coach. */
#coach { position: fixed; left: 50%; top: 84px; transform: translateX(-50%); width: min(520px, 92vw); padding: 12px 16px 10px; border-radius: 18px; background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid rgba(139,224,238, 0.5); box-shadow: var(--shadow); z-index: 8; zoom: var(--hud, 1); }
#coach.pop { animation: coachRise 0.4s ease; }
@keyframes coachRise { from { opacity: 0; transform: translate(-50%, 8px); } }
#coach .dots { display: flex; gap: 5px; margin-bottom: 6px; }
#coach .dots i { width: 18px; height: 4px; border-radius: 99px; background: rgba(255,255,255,0.18); }
#coach .dots i.done { background: var(--sand); }
#coach .dots i.now { background: #fff; }
#coach p { margin: 0; font-size: 14px; line-height: 1.5; }
#coach button { margin-top: 6px; border: 0; background: none; color: var(--dim); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
body[data-mode="sail"] #coach { top: 196px; }
#panel .tipbar { display: flex; gap: 8px; align-items: center; margin: 4px 0 10px; padding: 9px 12px; border-radius: 14px; background: rgba(139,224,238, 0.1); border: 1px solid rgba(139,224,238, 0.35); font-size: 13px; }
#panel .tipbar .ic { color: var(--sand); width: 12px; height: 12px; }

/* Catch card buttons and the personal-best shine. */
#card .cardbtns { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
#card .cardbtns button { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 99px; background: rgba(255,255,255,0.06); font-size: 12px; font-weight: 700; }
#card .cardbtns kbd { height: 18px; font-size: 11px; color: var(--dim); }
#card.celebrate { border-color: rgba(139,224,238, 0.8); box-shadow: var(--shadow), 0 0 0 1px rgba(139,224,238, 0.4), 0 0 60px rgba(139,224,238, 0.25); }
#card.celebrate::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(220,248,255, 0.35) 50%, transparent 65%); transform: translateX(-120%); animation: shine 1.4s 0.3s ease-out 2; pointer-events: none; }
@keyframes shine { to { transform: translateX(120%); } }
@media (pointer: coarse) { #card .cardbtns kbd { display: none; } }

/* Photo mode: everything but the photo bar goes. */
body.photo :is(#place, #topright, #sonar, #hint, #flash, #reticle, #fight, #tarc, #card, #act, #anchor, #sailpad, #nav, #fishcam, #coach, #fisharrow, #toasts) { display: none !important; }
#pmask { position: fixed; inset: 0; pointer-events: none; z-index: 9; }
#pmask i { position: absolute; background: rgba(0,0,0,0.82); }
#photobar { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 8px 10px; border-radius: 22px; background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); z-index: 10; max-width: 94vw; }
#photobar .seg button { display: inline-flex; color: var(--dim); }
#photobar p { width: 100%; margin: 0; text-align: center; font-size: 12px; color: var(--dim); }
#photobar kbd { height: 18px; font-size: 11px; }

/* Achievement toasts, top right under the bar. */
#toasts { position: fixed; top: 64px; right: 16px; display: grid; gap: 8px; z-index: 9; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; width: 300px; padding: 12px 14px; border-radius: 18px; background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid rgba(139,224,238, 0.6); box-shadow: var(--shadow); animation: toastIn 0.45s cubic-bezier(.2,.9,.3,1.2); }
.toast.out { opacity: 0; transform: translateX(20px); transition: all 0.5s; }
.toast .ic { width: 28px; height: 28px; color: var(--sand); }
.toast b { display: block; font: 600 16px/1.2 var(--display); letter-spacing: -0.01em; }
.toast span { font-size: 12px; color: var(--dim); }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } }
@media (max-width: 760px) { #toasts { top: auto; bottom: 200px; right: 10px; left: 10px; } .toast { width: auto; } }

/* Achievements list in the journal. */
#panel .achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
#panel .ach { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,0.045); border: 1px dashed rgba(255,255,255,0.14); }
#panel .ach .mk { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.08); color: var(--faint); }
#panel .ach.got { border: 1px solid rgba(139,224,238, 0.55); background: rgba(139,224,238, 0.07); }
#panel .ach.got .mk { background: var(--sand); color: #06222b; }
#panel .ach div { display: grid; gap: 2px; }
#panel .ach div span { font-size: 12px; color: var(--dim); }
#panel .ach em { font-style: normal; font-size: 11px; color: var(--sand); }

/* Tackle comparison, shipyard pictures and stats. */
#panel .cmp { font-size: 12px; font-weight: 700; color: var(--dim); }
#panel .cmp.up { color: var(--sea); }
#panel .cmp.down { color: var(--warn); }
#panel .item.boat { padding-top: 6px; }
#panel .boatpic { width: 100%; height: 110px; object-fit: contain; margin-bottom: 4px; }
#panel .boatpic.none { display: grid; place-items: center; align-content: center; gap: 4px; color: var(--faint); font-size: 11px; border-radius: 12px; background: rgba(255,255,255,0.03); }
#panel .boatpic.none .ic { width: 28px; height: 28px; }
#panel .bstats { display: grid; gap: 4px; margin: 4px 0; }
#panel .bstats label { display: grid; grid-template-columns: 74px 1fr; align-items: center; font-size: 11px; color: var(--dim); }
#panel .boats .item { min-height: 0; }

/* Fish detail page. */
#panel .fishcard { cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
#panel .fishcard:hover { border-color: rgba(255,255,255,0.35); transform: translateY(-1px); }
#panel .back { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: none; font-size: 12px; margin-bottom: 8px; }
#panel .back .ic { width: 12px; height: 12px; }
#panel .fdetail { display: grid; grid-template-columns: minmax(200px, 1fr) 1.2fr; gap: 18px; align-items: center; }
#panel .fdetail .ph { display: grid; place-items: center; height: 170px; border-radius: 20px; background: radial-gradient(ellipse 60% 70% at 50% 60%, rgba(139,224,238, 0.18), transparent 70%); }
#panel .fdetail .ph img { width: 92%; max-height: 160px; object-fit: contain; }
#panel .fdetail.unknown img { filter: brightness(0) invert(1); opacity: 0.2; }
#panel .fdetail h3 { margin: 0; font: 600 24px/1.15 var(--display); text-transform: none; letter-spacing: 0; color: var(--text); }
#panel .facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
#panel .facts div { display: grid; gap: 2px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,0.05); }
#panel .facts b { font-variant-numeric: tabular-nums; }
#panel .facts span { font-size: 11px; color: var(--dim); }
#panel .homes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
#panel .home { display: grid; gap: 4px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,0.045); }
#panel .home span, #panel .home em { font-size: 12px; color: var(--dim); font-style: normal; }
#panel .home.locked { opacity: 0.5; }
#panel .spark { width: 100%; max-width: 420px; height: 70px; }
#panel .spark polyline { fill: none; stroke: var(--sea); stroke-width: 2; }
#panel .spark circle { fill: #fff; }
@media (max-width: 760px) { #panel .fdetail { grid-template-columns: 1fr; } }

/* Map: selected region card and route. */
#panel .mapwrap { position: relative; }
#panel .mapinfo { position: absolute; right: 12px; bottom: 12px; width: 250px; padding: 12px 14px; border-radius: 18px; background: var(--glass-strong); border: 1px solid var(--line); display: grid; gap: 4px; }
#panel .mapinfo > span { font-size: 12px; color: var(--dim); }
#panel .mapinfo dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 6px 0; font-size: 12px; }
#panel .mapinfo dt { color: var(--dim); }
#panel .mapinfo dd { margin: 0; }
#panel .mapinfo button { justify-self: start; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: none; font-weight: 700; font-size: 13px; }
#panel .mapinfo button.go { background: #fff; color: #10141a; border-color: #fff; }
#panel .mapinfo button:disabled { color: var(--dim); }
.chart .trip.sel { fill: none; stroke: var(--sand); stroke-width: 3; stroke-dasharray: 8 6; animation: march 1s linear infinite; }
@keyframes march { to { stroke-dashoffset: -14; } }
.chart .pin { cursor: pointer; }
.chart .pin.sel text { fill: var(--sand); }
.chart .pin.sel circle:not(.hit):not(.halo) { stroke: var(--sand); stroke-width: 3; }
@media (max-width: 760px) { #panel .mapinfo { position: static; width: auto; margin: 8px; } }

/* Phones held sideways: everything pulled to the edges, smaller chrome. */
@media (pointer: coarse) and (orientation: landscape) and (max-height: 520px) {
  #place { top: 8px; left: 8px; padding: 6px 10px; max-width: 220px; }
  #place #goalchip { display: none; }
  #topright { top: 8px; right: 8px; left: auto; flex-direction: row; }
  #nav { top: 52px; width: 50vw; }
  #sonar { left: 8px; bottom: 8px; }
  #finder { width: 130px; height: 80px; }
  body[data-mode="sail"] #sonar { left: auto; right: 8px; bottom: 8px; }
  #act { right: 14px; bottom: 50%; transform: translateY(50%); width: 88px; height: 88px; }
  #anchor { right: 116px; bottom: 14px; }
  #hint { bottom: 12px; }
  #card { bottom: 12px; width: min(380px, 60vw); }
  #card .ph { height: 90px; }
  #fight { top: 52px; bottom: auto; right: 116px; }
  #coach { top: 52px; }
  #sailpad { grid-template-columns: 58px 58px 58px; grid-template-rows: 58px 58px; }
}

/* Market: today's prices, orders from town, freshness of the catch. */
#panel .prices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
#panel .price { position: relative; display: grid; gap: 1px; padding: 8px 10px 9px; border-radius: 14px; background: rgba(255,255,255,0.045); }
#panel .price img { width: 100%; height: 34px; object-fit: contain; margin-bottom: 2px; }
#panel .price b { font-size: 13px; line-height: 1.2; }
#panel .price > span { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
#panel .price .hot, #panel .order .hot { position: absolute; top: 6px; right: 7px; font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: rgba(139,224,238, 0.18); color: var(--sand); border: 1px solid rgba(139,224,238, 0.4); }
#panel .orders { display: grid; gap: 6px; }
#panel .order { display: grid; grid-template-columns: 80px 1fr auto auto; align-items: center; gap: 12px; padding: 6px 8px 6px 6px; border-radius: 16px; background: rgba(255,255,255,0.045); border: 1px solid transparent; }
#panel .order.ready { border-color: rgba(139,224,238, 0.4); background: rgba(139,224,238, 0.07); }
#panel .order img { width: 80px; height: 38px; object-fit: contain; }
#panel .order div { display: grid; }
#panel .order span { font-size: 12px; color: var(--dim); }
#panel .order span .ic { width: 12px; height: 12px; vertical-align: -2px; margin-right: 3px; }
#panel .order strong { font-variant-numeric: tabular-nums; color: var(--sand); }
#panel .row .fresh { display: flex; align-items: center; gap: 6px; }
#panel .row .fresh .meter { width: 54px; }
@media (max-width: 760px) {
  #panel .order { grid-template-columns: 56px 1fr auto; }
  #panel .order img { width: 56px; }
  #panel .order button { grid-column: 1 / -1; }
}

/* Cup chip under the place header, the cup tab, shipyard swatches. */
#cupchip { margin-top: 6px; padding: 4px 10px; border-radius: 99px; width: fit-content; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; background: rgba(139,224,238, 0.16); border: 1px solid rgba(139,224,238, 0.4); color: var(--sand); }
#panel .cuphead { display: grid; gap: 4px; padding: 14px 16px; border-radius: 18px; background: rgba(139,224,238, 0.07); border: 1px solid rgba(139,224,238, 0.25); }
#panel .cuphead > b { font: 600 20px/1.2 var(--display); letter-spacing: -0.02em; }
#panel .cuphead > span { font-size: 13px; color: var(--dim); }
#panel .prizes { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
#panel .prizes div { display: grid; padding: 6px 12px; border-radius: 12px; background: rgba(255,255,255,0.06); }
#panel .prizes em { font-style: normal; font-size: 11px; color: var(--dim); }
#panel .prizes b { font-variant-numeric: tabular-nums; }
#panel .cuprow { grid-template-columns: 48px 1fr auto; padding-left: 14px; }
#panel .cuprow.me { background: rgba(139,224,238, 0.1); outline: 1px solid rgba(139,224,238, 0.4); }
#panel .items.custom .swatch { display: block; width: 100%; height: 22px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.18); margin-bottom: 4px; }
#panel .ach .meter { margin-top: 4px; max-width: 220px; }
#todpop button.auto { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; padding-top: 2px; }
#panel .savebtns { display: flex; gap: 8px; margin: 14px 0 6px; flex-wrap: wrap; }
#panel .savebtns button:not(.primary) { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255,255,255,0.08); font-weight: 700; }
#panel .savebtns .primary { margin-left: 0; }
@media (max-width: 760px) {
  #panel footer { flex-wrap: wrap; gap: 8px 10px; }
  #panel footer .primary { flex: 1 1 100%; margin-left: 0; }
  #panel .tabs { overflow-x: auto; scrollbar-width: none; }
  #panel .tabs::-webkit-scrollbar { display: none; }
  #panel .tabs button { flex: none; }
}

/* ---- The dock (D2–D4): a glass room with a rail, cards and a compare drawer. Brass is money
   and buying, sea blue is information, orange always comes with ⚠ or an arrow. ---- */
#panel .sheet.dk {
  --brass2: #4cb8cc; --edge: rgba(255,255,255,0.12); --edge2: rgba(255,255,255,0.22); --glass2: rgba(20,36,48,0.55);
  position: relative; display: grid; grid-template-columns: 236px 1fr; width: min(1180px, 96vw); height: min(760px, 92vh); max-height: none; border-radius: 30px;
  background: linear-gradient(160deg, rgba(26,44,58,0.74), rgba(8,15,22,0.9)); backdrop-filter: blur(30px) saturate(1.5); -webkit-backdrop-filter: blur(30px) saturate(1.5);
  border: 1px solid var(--edge); box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 40px 120px rgba(0,0,0,0.55), 0 8px 30px rgba(0,0,0,0.35);
}
#panel .dk-noise { position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0.06; mix-blend-mode: overlay; z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
#panel .dk > aside, #panel .dk > main { position: relative; z-index: 1; min-height: 0; }
/* Rail. */
#panel .dk-rail { display: flex; flex-direction: column; gap: 4px; padding: 26px 16px 18px; border-right: 1px solid var(--edge); background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent 40%); }
#panel .dk-place { padding: 0 10px 18px; }
#panel .dk-place .eb { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); }
#panel .dk-place h1 { margin: 4px 0 0; font: 600 24px/1.1 var(--display); letter-spacing: -0.02em; }
#panel .dk-nav { display: grid; gap: 2px; }
#panel .dk-nav button { display: flex; align-items: center; gap: 12px; width: 100%; height: 46px; padding: 0 12px; border: 0; border-radius: 14px; background: none; color: var(--dim); font-size: 14px; font-weight: 600; position: relative; transition: background 0.2s, color 0.2s; }
#panel .dk-nav .ic { width: 20px; height: 20px; flex: none; }
#panel .dk-nav button:hover { background: rgba(255,255,255,0.06); color: var(--text); }
#panel .dk-nav button[aria-current="true"] { background: linear-gradient(90deg, rgba(139,224,238, 0.16), rgba(139,224,238, 0.04)); color: var(--text); box-shadow: inset 0 0 0 1px rgba(139,224,238, 0.25); }
#panel .dk-nav button[aria-current="true"]::before { content: ""; position: absolute; left: -16px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--brass); }
#panel .dk-nav button[aria-current="true"] .ic { color: var(--brass); }
#panel .dk-nav .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--brass); color: #06222b; font-size: 11px; font-weight: 800; font-style: normal; display: grid; place-items: center; }
#panel .dk-wallet { margin-top: auto; padding: 14px; border-radius: 18px; background: var(--glass2); border: 1px solid var(--edge); box-shadow: inset 0 1px 0 rgba(255,255,255,0.1); }
#panel .dk-money { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; font: 600 20px/1 var(--display); font-variant-numeric: tabular-nums; color: var(--brass); letter-spacing: -0.02em; }
#panel .dk-money small { font-size: 11px; font-weight: 700; color: var(--dim); letter-spacing: 0.08em; font-family: inherit; }
#panel .dk-money.gain b { animation: dkGain 0.9s ease; } #panel .dk-money.spend b { animation: dkSpend 0.9s ease; }
@keyframes dkGain { 30% { text-shadow: 0 0 18px rgba(139,224,238, 0.9); transform: scale(1.06); } }
@keyframes dkSpend { 30% { opacity: 0.6; } }
#panel .dk-wallet dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; margin: 12px 0 0; font-size: 12px; align-items: center; }
#panel .dk-wallet dt { color: var(--dim); display: flex; gap: 6px; align-items: center; }
#panel .dk-wallet dt .ic, #panel .dk-wallet dd .ic { width: 14px; height: 14px; vertical-align: -2px; }
#panel .dk-wallet dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
#panel .dk-wallet .warn { font-style: normal; color: var(--warn); }
#panel .dk-bar { height: 4px; border-radius: 99px; background: rgba(255,255,255,0.12); overflow: hidden; grid-column: 1 / -1; margin-top: -4px; }
#panel .dk-bar i { display: block; height: 100%; background: var(--sea); }
#panel .dk-bar.low i { background: var(--warn); }
/* Main. */
#panel .dk-main { display: flex; flex-direction: column; min-width: 0; }
#panel .dk header { display: flex; align-items: flex-end; gap: 16px; padding: 26px 30px 16px; }
#panel .dk header h2 { margin: 0; font: 600 32px/1 var(--display); letter-spacing: -0.01em; }
#panel .dk header p { margin: 6px 0 0; color: var(--dim); font-size: 13px; }
#panel .dk-close { margin-left: auto; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--edge2); background: rgba(255,255,255,0.05); font-size: 12px; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; flex: none; }
#panel .dk-close:hover { background: rgba(255,255,255,0.12); }
#panel .dk-close kbd { font-size: 11px; height: 18px; color: var(--dim); }
#panel .dk-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 30px 16px; }
#panel .dk-chips button { height: 34px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--edge); background: rgba(255,255,255,0.04); color: var(--dim); font-size: 13px; font-weight: 600; }
#panel .dk-chips button:hover { color: var(--text); }
#panel .dk-chips button[aria-pressed="true"] { background: var(--text); color: #0c141b; border-color: var(--text); }
#panel .dk-kit { margin-left: auto; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
#panel .dk-content { flex: 1; display: grid; grid-template-columns: 1fr 300px; gap: 18px; padding: 0 30px 26px; min-height: 0; }
#panel .dk-scroll { overflow: auto; padding: 2px 4px 2px 2px; min-height: 0; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent; }
#panel .dk h4 { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 10px; font-size: 11px; font-weight: 700; color: var(--dim); }
#panel .dk h4:first-child { margin-top: 2px; }
#panel .dk h4 small { font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--faint); font-size: 11px; }
/* Cards. */
#panel .dk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
#panel .dk-card { position: relative; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025)); border: 1px solid var(--edge); box-shadow: inset 0 1px 0 rgba(255,255,255,0.12); transition: transform 0.25s cubic-bezier(.2,.9,.3,1), box-shadow 0.25s, border-color 0.25s; animation: dkRise 0.55s cubic-bezier(.2,.9,.3,1) both; animation-delay: var(--d, 0ms); }
#panel .again .dk-card, #panel .dk-card.fishc { animation: none; }
#panel .dk-card[data-act] { cursor: pointer; }
#panel .dk-card[data-act]:hover { transform: translateY(-3px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 14px 34px rgba(0,0,0,0.35), 0 0 0 1px rgba(139,224,238, 0.25); }
#panel .dk-card[aria-selected="true"] { border-color: rgba(139,224,238, 0.6); box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 0 0 1px rgba(139,224,238, 0.35), 0 18px 40px rgba(0,0,0,0.4); }
#panel .dk-card:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
#panel .dk-card.soon { opacity: 0.6; }
@keyframes dkRise { from { opacity: 0; transform: translateY(14px); } }
#panel .dk-ph { position: relative; height: 132px; display: grid; place-items: center; background: radial-gradient(ellipse 70% 80% at 50% 70%, rgba(139,224,238, 0.18), transparent 70%), linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.15)); }
#panel .dk-ph img { max-width: 100%; max-height: 128px; filter: drop-shadow(0 14px 14px rgba(0,0,0,0.5)); opacity: 0; transition: opacity 0.4s; }
#panel .dk-ph img[src] { opacity: 1; }
#panel .dk-ph:not(.ready)::after { content: ""; position: absolute; inset: 30% 20%; border-radius: 99px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent); background-size: 200% 100%; animation: dkShim 1.2s linear infinite; }
@keyframes dkShim { to { background-position: -200% 0; } }
#panel .dk-ph.sm { height: 74px; }
#panel .dk-ph.sm img { max-height: 64px; width: 88%; object-fit: contain; opacity: 1; }
#panel .dk-ph .slip { display: grid; justify-items: center; gap: 4px; color: var(--faint); font-size: 12px; }
#panel .dk-ph .slip .ic { width: 30px; height: 30px; }
#panel .dk-tier { position: absolute; top: 10px; left: 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
#panel .dk-badge { position: absolute; top: 9px; right: 10px; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; }
#panel .dk-badge .ic { width: 12px; height: 12px; stroke-width: 2.4; }
#panel .dk-badge.eq { background: var(--text); color: #0c141b; }
#panel .dk-badge.own { border: 1px solid var(--edge2); color: var(--dim); }
#panel .dk-card.stamp .dk-badge { animation: dkStamp 0.6s cubic-bezier(.2,1.6,.4,1); }
#panel .dk-card.stamp { animation: dkGlow 1.2s ease; }
@keyframes dkStamp { from { transform: scale(2.2) rotate(-12deg); opacity: 0; } }
@keyframes dkGlow { 20% { box-shadow: 0 0 0 2px rgba(139,224,238, 0.8), 0 0 40px rgba(139,224,238, 0.45); } }
#panel .dk-body { padding: 12px 14px 14px; display: grid; gap: 6px; }
#panel .dk-body h3 { margin: 0; font: 600 20px/1.15 var(--display); letter-spacing: -0.02em; }
#panel .dk-body p { margin: 0; color: var(--dim); font-size: 12px; min-height: 34px; }
#panel .dk-stat { font-size: 12px; font-weight: 700; color: var(--sea); }
#panel .dk-stat.down { color: var(--warn); }
#panel .dk-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; min-height: 22px; }
#panel .dk-price { display: inline-flex; align-items: center; gap: 6px; font: 600 16px var(--display); color: var(--brass); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
#panel .dk-price .ic { width: 16px; height: 16px; }
#panel .dk-price.short { color: var(--faint); }
#panel .dk .mine { font-size: 12px; color: var(--dim); font-weight: 600; }
#panel .dk-lock { color: var(--warn); font-size: 12px; font-weight: 700; }
/* Buttons. */
#panel .dk-buy { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 16px; border-radius: 99px; border: 0; font-size: 12px; font-weight: 800; color: #06222b; background: linear-gradient(180deg, #b8ecf6, var(--brass2)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 6px 14px rgba(76,184,204, 0.35); transition: filter 0.15s, transform 0.15s; }
#panel .dk-buy:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
#panel .dk-buy:active:not(:disabled) { transform: translateY(1px); }
#panel .dk-buy:disabled { background: rgba(255,255,255,0.08); color: var(--dim); box-shadow: none; }
#panel .dk-buy .ic { width: 15px; height: 15px; stroke-width: 2.2; }
#panel .dk-buy.alt { background: var(--text); color: #0c141b; box-shadow: none; }
#panel .dk-buy.short { background: none; border: 1px dashed rgba(255,163,82, 0.6); color: var(--warn); box-shadow: none; }
#panel .dk-buy.big { width: 100%; height: 46px; font-size: 14px; }
#panel .dk-ghost { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--edge2); background: rgba(255,255,255,0.05); font-size: 13px; font-weight: 700; }
#panel .dk-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.12); }
#panel .dk-ghost:disabled { color: var(--dim); border-color: transparent; }
#panel .dk-ghost .ic { width: 15px; height: 15px; }
/* Drawer. */
#panel .dk-drawer { border-radius: 22px; background: var(--glass2); border: 1px solid var(--edge); box-shadow: inset 0 1px 0 rgba(255,255,255,0.12); padding: 18px; display: flex; flex-direction: column; gap: 12px; overflow: auto; min-height: 0; }
#panel .dk-big { height: 150px; border-radius: 16px; display: grid; place-items: center; background: radial-gradient(ellipse 70% 80% at 50% 70%, rgba(139,224,238, 0.18), transparent 70%); flex: none; }
#panel .dk-big img { max-width: 100%; max-height: 140px; filter: drop-shadow(0 16px 16px rgba(0,0,0,0.5)); }
#panel .dk-big img:not([src]) { visibility: hidden; }
#panel .dk .tierline { margin: 0 0 -8px; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); }
#panel .dk-drawer h3 { margin: 0; font: 600 24px/1.1 var(--display); letter-spacing: -0.02em; }
#panel .dk-cmp { display: grid; gap: 10px; }
#panel .dk-cmp .crow { display: grid; gap: 5px; font-size: 12px; }
#panel .dk-cmp .crow b { display: flex; justify-content: space-between; color: var(--dim); font-weight: 600; }
#panel .dk-cmp .crow em { font-style: normal; font-weight: 800; color: var(--dim); }
#panel .dk-cmp .crow em.up { color: var(--good); } #panel .dk-cmp .crow em.down { color: var(--warn); }
#panel .dk .track { position: relative; height: 8px; border-radius: 99px; background: rgba(255,255,255,0.08); overflow: hidden; }
#panel .dk .track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; transition: width 0.5s cubic-bezier(.2,.9,.3,1); }
#panel .dk .track .now { background: rgba(236,243,248, 0.45); }
#panel .dk .track .new { background: linear-gradient(90deg, var(--sea), #b8ecf6); mix-blend-mode: screen; opacity: 0.85; }
#panel .dk .legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; color: var(--dim); }
#panel .dk .legend span::before { content: ""; display: inline-block; width: 10px; height: 4px; border-radius: 4px; margin-right: 6px; vertical-align: middle; }
#panel .dk .legend .a::before { background: rgba(236,243,248, 0.45); } #panel .dk .legend .b::before { background: var(--sea); }
#panel .dk-drawer .dk-buy.big { margin-top: auto; flex: none; }
#panel .dk-after { margin: -4px 0 0; font-size: 12px; color: var(--dim); text-align: center; }
#panel .dk-after b { color: var(--text); font-variant-numeric: tabular-nums; }
#panel .dk-note { margin: 0; font-size: 12px; color: var(--dim); }
#panel .dk-empty { display: grid; justify-items: center; gap: 2px; padding: 34px 0 26px; color: var(--dim); text-align: center; border-radius: 20px; border: 1px dashed var(--edge); }
#panel .dk-empty .ic { width: 32px; height: 32px; opacity: 0.6; margin-bottom: 6px; }
#panel .dk-empty p { margin: 0; color: var(--text); font-weight: 600; }
#panel .dk-empty span { font-size: 13px; }
/* Market. */
#panel .dk-fish { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
#panel .fishc .dk-body { gap: 3px; padding: 8px 12px 12px; }
#panel .fishc h3 { font-size: 16px; }
#panel .fishc .kg { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
#panel .fishc .fresh { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--dim); }
#panel .fishc .fresh.low { color: var(--warn); }
#panel .dk-meter { flex: 1; height: 4px; border-radius: 99px; background: rgba(255,255,255,0.1); overflow: hidden; }
#panel .dk-meter b { display: block; height: 100%; background: var(--sea); }
#panel .fresh.low .dk-meter b { background: var(--warn); }
#panel .fishc .val { font: 600 16px var(--display); color: var(--brass); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
#panel .fishc.fly { animation: dkFly 0.6s cubic-bezier(.5,0,.75,0) forwards; z-index: 5; }
@keyframes dkFly { 25% { transform: translateY(-8px) scale(1.03); } to { transform: translate(var(--tx), var(--ty)) scale(0.12); opacity: 0; } }
#panel .dk-slips { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
#panel .dk-slip { display: grid; gap: 6px; padding: 12px 14px; border-radius: 6px 6px 14px 14px; color: #2b2418; transform: rotate(var(--r)); box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  background: linear-gradient(180deg, rgba(0,0,0,0.04) 1px, transparent 1px) 0 0 / 100% 22px, linear-gradient(170deg, #f4ead2, #e6d7b3); position: relative; }
#panel .dk-slip::before { content: ""; position: absolute; top: -5px; left: 50%; width: 46px; height: 12px; margin-left: -23px; background: rgba(255,255,255,0.45); transform: rotate(-3deg); box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
#panel .dk-slip .who { margin: 0; font: 600 16px/1.2 var(--display); letter-spacing: -0.01em; }
#panel .dk-slip .what { display: grid; grid-template-columns: 64px 1fr; gap: 8px; align-items: center; }
#panel .dk-slip .what img { width: 64px; height: 30px; object-fit: contain; }
#panel .dk-slip .what div { display: grid; font-size: 12px; }
#panel .dk-slip .what span { color: #6a5b40; }
#panel .dk-slip .when { margin: 0; font-size: 11px; color: #6a5b40; display: flex; align-items: center; gap: 4px; }
#panel .dk-slip .when .ic { width: 12px; height: 12px; stroke-width: 2.4; }
#panel .dk-slip .pay { display: flex; align-items: center; justify-content: space-between; border-top: 1px dashed rgba(60,45,20,0.3); padding-top: 8px; }
#panel .dk-slip .pay strong { font: 600 16px var(--display); color: #7a4f10; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
#panel .dk-slip .dk-buy:disabled { background: rgba(60,45,20,0.08); color: rgba(60,45,20,0.45); }
#panel .dk-slip.ready { box-shadow: 0 0 0 2px rgba(139,224,238, 0.9), 0 10px 24px rgba(0,0,0,0.35); }
#panel .dk-board { display: grid; gap: 4px; }
#panel .dk-tick { display: grid; grid-template-columns: 70px 1fr 84px 112px; align-items: center; gap: 12px; padding: 6px 12px 6px 6px; border-radius: 14px; background: rgba(255,255,255,0.04); }
#panel .dk-tick img { width: 70px; height: 30px; object-fit: contain; }
#panel .dk-tick .nm { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
#panel .dk-tick .hot { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; padding: 2px 7px; border-radius: 99px; background: var(--brass); color: #06222b; }
#panel .dk-spark { width: 84px; height: 26px; }
#panel .dk-spark polyline { fill: none; stroke: var(--sea); stroke-width: 1.6; stroke-linejoin: round; }
#panel .dk-spark circle { fill: #fff; }
#panel .dk-tick .px { display: grid; justify-items: end; font-variant-numeric: tabular-nums; }
#panel .dk-tick .px b { font-size: 13px; }
#panel .dk-sum { display: grid; gap: 2px; padding: 14px; border-radius: 16px; background: rgba(0,0,0,0.18); }
#panel .dk-sum span { font-size: 11px; font-weight: 700; color: var(--dim); }
#panel .dk-sum b { font: 600 32px/1.1 var(--display); color: var(--brass); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
#panel .dk-sum p { margin: 4px 0 0; font-size: 12px; color: var(--dim); }
#panel .dk-extras { display: flex; flex-wrap: wrap; gap: 6px; }
/* Shipyard. */
#panel .dk-grid.boats .dk-ph img { width: 92%; max-height: 120px; object-fit: contain; opacity: 1; }
#panel .dk-spin { position: relative; height: 190px; flex: none; border-radius: 16px; overflow: hidden; display: grid; place-items: center; color: var(--faint); font-size: 12px;
  background: radial-gradient(ellipse 60% 22% at 50% 82%, rgba(0,0,0,0.45), transparent 70%), radial-gradient(ellipse 80% 80% at 50% 60%, rgba(139,224,238, 0.16), transparent 70%); }
#panel .dk-spin canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.5s; }
#panel .dk-spin.ready canvas { opacity: 1; }
#panel .dk-spin.ready .load { display: none; }
#panel .dk-spin.none { gap: 4px; align-content: center; }
#panel .dk-spin.none .ic { width: 34px; height: 34px; }
#panel .dk-refit { margin-top: 8px; }
#panel .dk-refit h4.lead { font: 600 24px/1 var(--display); text-transform: none; letter-spacing: 0; color: var(--text); margin: 22px 0 4px; }
#panel .dk-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
#panel .dk-sw { display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; gap: 1px 10px; align-items: center; text-align: left; padding: 9px 10px; border-radius: 14px; border: 1px solid var(--edge); background: rgba(255,255,255,0.04); }
#panel .dk-sw:hover:not(:disabled) { background: rgba(255,255,255,0.09); }
#panel .dk-sw i { grid-row: 1 / 4; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25), inset 0 -6px 10px rgba(0,0,0,0.25); display: grid; place-items: center; color: var(--text); }
#panel .dk-sw i .ic { width: 15px; height: 15px; }
#panel .dk-sw b { font-size: 13px; line-height: 1.2; }
#panel .dk-sw small { font-size: 11px; color: var(--dim); }
#panel .dk-sw span { display: flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--brass); }
#panel .dk-sw span .ic { width: 11px; height: 11px; stroke-width: 2.4; }
#panel .dk-sw.eq { border-color: rgba(139,224,238, 0.6); background: rgba(139,224,238, 0.08); }
#panel .dk-sw.eq span { color: var(--text); }
/* Cup. */
#panel .dk-cuphead { position: relative; display: grid; gap: 4px; padding: 20px; border-radius: 22px; overflow: hidden; background: radial-gradient(ellipse 60% 90% at 85% 100%, rgba(139,224,238, 0.22), transparent 70%), linear-gradient(160deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)); border: 1px solid var(--edge); }
#panel .dk-cuphead .eb { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); }
#panel .dk-cuphead h3 { margin: 0; font: 600 32px/1.05 var(--display); letter-spacing: -0.02em; }
#panel .dk-cuphead > span { max-width: 46ch; font-size: 13px; color: var(--dim); }
#panel .dk-podium { display: flex; align-items: flex-end; gap: 8px; margin-top: 14px; }
#panel .dk-podium div { flex: 1; max-width: 150px; display: grid; justify-items: center; gap: 2px; text-align: center; }
#panel .dk-podium em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--dim); }
#panel .dk-podium b { font: 600 16px var(--display); color: var(--brass); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
#panel .dk-podium i { width: 100%; border-radius: 10px 10px 0 0; background: linear-gradient(180deg, rgba(139,224,238, 0.35), rgba(139,224,238, 0.05)); border: 1px solid rgba(139,224,238, 0.35); border-bottom: 0; }
#panel .dk-podium .p1 em { color: var(--brass); }
#panel .dk-table { display: grid; gap: 4px; }
#panel .dk-table .tr { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(255,255,255,0.04); font-variant-numeric: tabular-nums; }
#panel .dk-table .tr div { display: grid; } #panel .dk-table .tr span { font-size: 12px; color: var(--dim); }
#panel .dk-table .tr.me { background: rgba(139,224,238, 0.12); box-shadow: inset 0 0 0 1px rgba(139,224,238, 0.45); }
/* Phones and narrow windows: the rail becomes a strip of tabs on top, the drawer follows the cards. */
@media (max-width: 860px) {
  #panel .sheet.dk { grid-template-columns: 1fr; grid-template-rows: auto 1fr; width: 100%; height: 94vh; border-radius: 26px 26px 0 0; }
  #panel .dk-rail { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 14px 10px; border-right: 0; border-bottom: 1px solid var(--edge); }
  #panel .dk-place { display: none; }
  #panel .dk-nav { display: flex; gap: 2px; overflow-x: auto; flex: 1 1 100%; order: 2; }
  #panel .dk-nav button { width: auto; height: 38px; padding: 0 12px; flex: none; font-size: 13px; }
  #panel .dk-nav button[aria-current="true"]::before { display: none; }
  #panel .dk-wallet { order: 1; margin: 0; flex: 1; display: flex; align-items: center; gap: 14px; padding: 8px 12px; }
  #panel .dk-wallet dl { display: flex; gap: 10px; margin: 0; }
  #panel .dk-wallet .dk-bar { display: none; }
  #panel .dk-money { font-size: 20px; }
  #panel .dk header { padding: 14px 16px 10px; }
  #panel .dk header h2 { font-size: 24px; }
  #panel .dk-chips { padding: 0 16px 12px; }
  #panel .dk-kit { display: none; }
  #panel .dk-main { min-height: 0; }
  #panel .dk-content { display: block; overflow: auto; padding: 0 16px calc(16px + env(safe-area-inset-bottom)); }
  #panel .dk-scroll { overflow: visible; }
  #panel .dk-drawer { margin-top: 16px; overflow: visible; }
  #panel .dk-tick { grid-template-columns: 56px 1fr 84px; }
  #panel .dk-tick .dk-spark { display: none; }
  #panel .dk-tick img { width: 56px; }
}
@media (max-width: 860px) { #panel:has(.dk) { padding: 0; place-items: end center; } }
@media (prefers-reduced-motion: reduce) { #panel .dk-card, #panel .dk-card.stamp, #panel .dk-card.stamp .dk-badge { animation: none; } }
#panel .dk h3 { text-transform: none; letter-spacing: 0; color: var(--text); }
#panel .dk[data-tab="market"] .dk-drawer .dk-buy.big, #panel .dk[data-tab="cup"] .dk-drawer .dk-buy.big { margin-top: 0; }
#panel .dk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#panel .dk .dk-empty { margin-top: 14px; }
#panel .dk h4 + .dk-empty, #panel .dk-cuphead + .dk-empty { margin-top: 14px; }
@media (max-width: 860px) {
  #panel .sheet.dk { grid-template-columns: minmax(0, 1fr); }
  #panel .dk-rail, #panel .dk-main { min-width: 0; }
  #panel .dk-wallet dt, #panel .dk-wallet dd { white-space: nowrap; }
  #panel .dk-wallet dl > :nth-child(n+3) { display: none; }
  #panel .dk-grid { gap: 10px; }
  #panel .dk-ph { height: 104px; } #panel .dk-ph img { max-height: 100px; }
  #panel .dk-body { padding: 10px 11px 12px; }
  #panel .dk-body h3 { font-size: 16px; }
  #panel .dk-body p { display: none; }
  #panel .dk-price { font-size: 16px; }
}

/* The voyage planner (before setting sail): dark sea glass like the dock, on the right while
   the camera circles the boat. */
#prep { position: absolute; right: clamp(16px, 4vw, 64px); top: 50%; transform: translate(24px, -50%); width: min(480px, calc(100vw - 32px)); max-height: 92vh; display: flex; }
#start[data-step="prep"] #prep { transform: translate(0, -50%); }
#start[data-step="prep"]::before { background: linear-gradient(270deg, rgba(5,8,12,0.55), rgba(5,8,12,0) 55%); }
#prep .vp { --brass2: #4cb8cc; --edge: rgba(255,255,255,0.12); --edge2: rgba(255,255,255,0.22); --sea1: #12324a; --sea2: #081a28;
  position: relative; display: flex; flex-direction: column; width: 100%; overflow: auto; overscroll-behavior: contain; padding: 24px 24px 0; border-radius: 28px; color: var(--text);
  background: linear-gradient(160deg, rgba(26,44,58,0.78), rgba(8,15,22,0.9)); backdrop-filter: blur(28px) saturate(1.5); -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border: 1px solid var(--edge); box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 40px 100px rgba(0,0,0,0.5); scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent; }
#prep .vp > * { flex: none; }
#start[data-step="prep"] #prep .vp > * { animation: vpIn 0.7s cubic-bezier(.2,.9,.3,1) both; }
#start[data-step="prep"] #prep .vp > :nth-child(2) { animation-delay: 0.06s; } #start[data-step="prep"] #prep .vp > :nth-child(n+3) { animation-delay: 0.12s; } #start[data-step="prep"] #prep .vp > :nth-child(n+7) { animation-delay: 0.2s; }
@keyframes vpIn { from { opacity: 0; transform: translateY(12px); } }
#prep .eb { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass); }
#prep h2 { margin: 6px 0 0; font: 600 32px/1 var(--display); letter-spacing: -0.01em; }
#prep .sb { margin: 6px 0 16px; color: var(--dim); font-size: 13px; }
#prep h3 { margin: 18px 0 9px; font-size: 11px; font-weight: 700; color: var(--dim); display: block; }
#prep .note { margin: 8px 0 0; font-size: 12px; color: var(--dim); }
/* Chart. */
#prep .map { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--edge); box-shadow: inset 0 0 40px rgba(0,0,0,0.4); }
#prep .chart { display: block; }
#prep .chart .grid { stroke: rgba(139,224,238, 0.08); }
#prep .chart .eq { stroke: rgba(139,224,238, 0.18); stroke-dasharray: 4 6; }
#prep .chart .near { fill: rgba(255,255,255,0.05); stroke: rgba(255,255,255,0.1); }
#prep .chart .indo { fill: rgba(214,226,232,0.16); stroke: rgba(184,236,246,0.55); stroke-width: 0.8; filter: drop-shadow(0 0 5px rgba(139,224,238, 0.35)); }
#prep .chart .leg { stroke: rgba(255,255,255,0.12); stroke-dasharray: 3 5; fill: none; }
#prep .chart .leg.open { stroke: rgba(139,224,238, 0.45); }
#prep .chart .pin .dot { fill: #0c1a24; stroke: rgba(255,255,255,0.8); stroke-width: 1.6; }
#prep .chart .pin.here .dot { fill: var(--brass); stroke: #fff; }
#prep .chart .pin.sel .dot { fill: var(--sea); stroke: #fff; }
#prep .chart .pin .pulse { fill: none; stroke: var(--brass); stroke-width: 1.5; transform-origin: center; transform-box: fill-box; animation: vpPulse 2.2s ease-out infinite; }
@keyframes vpPulse { from { opacity: 0.9; transform: scale(0.8); } to { opacity: 0; transform: scale(2.6); } }
#prep .chart .pin text { fill: #fff; font: 700 12px var(--ui); stroke: rgba(5,12,18,0.85); stroke-width: 3px; paint-order: stroke; }
#prep .chart .pin.locked circle { fill: none; stroke: rgba(255,255,255,0.35); stroke-width: 1.2; stroke-dasharray: 2 2; }
#prep .chart .pin.locked text { fill: rgba(255,255,255,0.45); font-weight: 600; font-size: 11px; }
#prep .chart .pin.open { cursor: pointer; }
#prep .chart .pin circle.hit { fill: transparent; stroke: none; }
#prep .chart .trip { fill: none; stroke: var(--sea); stroke-width: 2.4; stroke-dasharray: 1; stroke-dashoffset: 1; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(139,224,238, 0.8)); transition: stroke-dashoffset 1.6s cubic-bezier(.45,0,.55,1); }
#prep .chart .trip.go { stroke-dashoffset: 0; }
#prep .trip-chip { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 5px 11px; border-radius: 99px; font-size: 11px; font-weight: 600; color: var(--text); background: rgba(5,12,18,0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--edge); }
/* Boat and rig cards. */
#prep .vp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; }
#prep .vp-card { position: relative; display: grid; gap: 1px; justify-items: start; padding: 0 0 10px; border-radius: 16px; overflow: hidden; text-align: left; border: 1px solid var(--edge); background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)); color: var(--text); transition: transform 0.2s, border-color 0.2s; }
#prep .vp-card:hover { transform: translateY(-2px); border-color: var(--edge2); }
#prep .vp-card[aria-pressed="true"] { border-color: rgba(139,224,238, 0.65); box-shadow: 0 0 0 1px rgba(139,224,238, 0.3); }
#prep .vp-card .ph { display: grid; place-items: center; width: 100%; height: 64px; margin-bottom: 6px; background: radial-gradient(ellipse 70% 80% at 50% 70%, rgba(139,224,238, 0.16), transparent 70%); }
#prep .vp-card img { max-width: 92%; max-height: 58px; object-fit: contain; filter: drop-shadow(0 8px 8px rgba(0,0,0,0.45)); }
#prep .vp-card img:not([src]) { visibility: hidden; }
#prep .vp-card b { padding: 0 10px; font-size: 13px; }
#prep .vp-card small { padding: 0 10px; font-size: 11px; color: var(--dim); }
#prep .vp-card .on { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--brass); color: #06222b; }
#prep .vp-card .on .ic { width: 12px; height: 12px; stroke-width: 2.6; }
/* Conditions. */
#prep .vp-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#prep .tile { display: grid; gap: 3px; align-content: start; padding: 12px 13px; border-radius: 16px; background: rgba(255,255,255,0.045); border: 1px solid var(--edge); min-width: 0; }
#prep .tile .k { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--dim); }
#prep .tile .k .ic { width: 14px; height: 14px; color: var(--sea); }
#prep .tile b { font: 600 20px/1.15 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
#prep .tile b small { font: 600 12px var(--ui); color: var(--dim); }
#prep .tile em { display: flex; align-items: center; gap: 5px; font-style: normal; font-size: 12px; color: var(--dim); }
#prep .tile.warn { border-color: rgba(255,163,82, 0.45); }
#prep .tile.warn em { color: var(--warn); font-weight: 700; }
#prep .tile .dir { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: rgba(139,224,238, 0.18); color: var(--sea); font-style: normal; font-weight: 800; font-size: 11px; }
#prep .tile .fishes { display: flex; gap: 4px; height: 26px; }
#prep .tile .fishes img { height: 26px; max-width: 50%; object-fit: contain; }
/* Challenges. */
#prep .vp-goals { display: grid; gap: 6px; }
#prep .goal { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 14px; background: rgba(255,255,255,0.045); border: 1px solid var(--edge); }
#prep .goal div { display: grid; gap: 7px; }
#prep .goal b { font-size: 13px; font-weight: 600; line-height: 1.3; }
#prep .goal .bar { height: 4px; border-radius: 99px; background: rgba(255,255,255,0.1); overflow: hidden; }
#prep .goal .bar i { display: block; height: 100%; background: var(--sea); }
#prep .goal em { display: grid; justify-items: end; font-style: normal; font-size: 12px; font-weight: 700; color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
#prep .goal em small { font: 600 14px var(--display); color: var(--brass); letter-spacing: -0.01em; }
#prep .goal em .ic { width: 12px; height: 12px; stroke-width: 2.4; display: inline; vertical-align: -1px; margin-right: 3px; }
#prep .goal.done { border-color: rgba(139,224,238, 0.5); background: rgba(139,224,238, 0.08); }
#prep .goal.done em { display: flex; align-items: center; gap: 2px; color: var(--brass); }
#prep .goal.done em small { display: none; }
#prep .goal.done .bar i { background: var(--brass); }
/* Footer. */
#prep footer { position: sticky; bottom: 0; display: flex; gap: 10px; margin: 18px -24px 0; padding: 14px 24px 18px; border-top: 1px solid var(--edge); background: linear-gradient(180deg, rgba(12,22,30,0.85), rgba(8,15,22,0.96)); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
#prep footer button { height: 48px; padding: 0 20px; border-radius: 99px; font-weight: 700; font-size: 14px; }
#prep .back { border: 1px solid var(--edge2); background: rgba(255,255,255,0.05); color: var(--text); }
#prep .back:hover { background: rgba(255,255,255,0.12); }
#prep .go { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; color: #06222b; font-weight: 800; background: linear-gradient(180deg, #b8ecf6, var(--brass2)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 10px 24px rgba(76,184,204, 0.35); transition: transform 0.15s, filter 0.15s; }
#prep .go:hover { transform: translateY(-1px); filter: brightness(1.06); }
#prep .go kbd { height: 18px; font-size: 11px; background: rgba(42,29,5,0.12); border-color: rgba(42,29,5,0.25); color: rgba(42,29,5,0.7); }
@media (max-width: 760px) {
  #prep { left: 8px; right: 8px; width: auto; top: auto; bottom: 8px; transform: translateY(30px); max-height: 72vh; }
  #start[data-step="prep"] #prep { transform: none; }
  #prep .vp { padding: 18px 16px 0; border-radius: 24px; }
  #prep h2 { font-size: 32px; }
  #prep footer { margin: 14px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  #prep .go kbd { display: none; }
  #prep .vp-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) { #start[data-step="prep"] #prep .vp > *, #prep .chart .pin .pulse { animation: none; } }
#prep .chart .pin.locked .lk { fill: none; stroke: rgba(255,255,255,0.55); stroke-width: 0.8; stroke-dasharray: none; }
#prep .vp-kit { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
#prep .vp-kit .vp-cards { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }

/* Liquid glass buttons (Teguh: brass gradient looked cheap). Clear frosted pills with a bright
   rim and a soft specular sheen; the main action is the same glass, brighter and larger. */
:is(#prep .go, #prep .back, #panel .dk-buy, #panel .dk-ghost, #panel .dk-close) {
  position: relative; overflow: hidden; isolation: isolate;
  color: var(--text); font-weight: 700; letter-spacing: 0.01em;
  background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.22); border-style: solid;
  backdrop-filter: blur(18px) saturate(1.8); -webkit-backdrop-filter: blur(18px) saturate(1.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.45), inset 0 -1px 0 rgba(255,255,255,0.08), inset 0 -10px 18px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.28);
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s, border-color 0.2s; filter: none;
}
/* The sheen: a soft highlight across the top half. */
:is(#prep .go, #prep .back, #panel .dk-buy, #panel .dk-ghost, #panel .dk-close)::after {
  content: ""; position: absolute; inset: 1px 1px 50% 1px; border-radius: 99px 99px 40% 40% / 99px 99px 20px 20px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0));
}
:is(#prep .go, #prep .back, #panel .dk-buy, #panel .dk-ghost, #panel .dk-close):hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(255,255,255,0.24), rgba(255,255,255,0.09)); border-color: rgba(255,255,255,0.36); transform: translateY(-1px); filter: none;
}
:is(#prep .go, #prep .back, #panel .dk-buy, #panel .dk-ghost, #panel .dk-close):active:not(:disabled) { transform: translateY(1px) scale(0.99); }
:is(#prep .go, #panel .dk-buy, #panel .dk-ghost, #panel .dk-close):focus-visible, #prep .back:focus-visible { outline: 2px solid rgba(255,255,255,0.9); outline-offset: 2px; }
/* Main action: brighter glass, a cool rim light, the label in white. */
#prep .go, #panel .dk-buy.big:not(:disabled):not(.short) {
  color: #fff; font-weight: 800;
  background: linear-gradient(180deg, rgba(255,255,255,0.34), rgba(255,255,255,0.12)), radial-gradient(120% 140% at 50% 120%, rgba(139,224,238, 0.4), transparent 60%);
  border-color: rgba(255,255,255,0.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), inset 0 -1px 0 rgba(255,255,255,0.15), inset 0 -14px 24px rgba(139,224,238, 0.12), 0 10px 30px rgba(0,0,0,0.3), 0 0 0 1px rgba(139,224,238, 0.12);
  text-shadow: 0 1px 8px rgba(0,0,0,0.25);
}
#prep .go:hover, #panel .dk-buy.big:hover:not(:disabled):not(.short) {
  background: linear-gradient(180deg, rgba(255,255,255,0.38), rgba(255,255,255,0.14)), radial-gradient(120% 140% at 50% 120%, rgba(139,224,238, 0.45), transparent 60%);
}
#prep .go kbd { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.8); }
#panel .dk-buy.alt { color: #fff; }
#panel .dk-buy:disabled, #panel .dk-ghost:disabled { color: var(--dim); background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); box-shadow: inset 0 1px 0 rgba(255,255,255,0.12); transform: none; }
#panel .dk-buy:disabled::after, #panel .dk-ghost:disabled::after { opacity: 0.3; }
/* Not enough money: the glass stays, the edge and label turn orange with the ⚠. */
#panel .dk-buy.short { color: var(--warn); border: 1px dashed rgba(255,163,82, 0.55); background: linear-gradient(180deg, rgba(255,163,82, 0.1), rgba(255,163,82, 0.03)); }

/* ==== K3–K7: one component system over the whole game (Teguh: fonts and colours did not look
   premium). Everything below wins over the older rules above. ==== */

/* Type: Inter Tight for headings and numbers that lead, Inter for everything else. */
:is(h1, h2, h3, h4) { font-feature-settings: "ss01"; }
#start h1 { font-weight: 600; letter-spacing: -0.055em; }
#titleScreen h1 { font-weight: 600; }
#menu button { font-weight: 500; letter-spacing: -0.02em; }
#menu button[data-m="continue"] { font-weight: 600; }
:is(#start .eyebrow, #titlecard .eb, #prep .eb, #panel .dk-place .eb, #panel .dk-cuphead .eb, #panel .dk .tierline, #panel .dk-tier, #voyage .eyebrow) { color: var(--dim); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
#panel :where(h3) { font-size: 13px; font-weight: 600; letter-spacing: -0.005em; text-transform: none; color: var(--dim); }
#panel .dk :where(h4) { font-size: 13px; font-weight: 600; letter-spacing: -0.005em; text-transform: none; color: var(--dim); }
#prep :where(h3) { font-size: 13px; font-weight: 600; letter-spacing: -0.005em; text-transform: none; color: var(--dim); }
#start :where(h3) { font-size: 13px; font-weight: 600; letter-spacing: -0.005em; text-transform: none; color: var(--dim); }
#start .cr :where(dt) { font-size: 13px; font-weight: 600; letter-spacing: -0.005em; text-transform: none; color: var(--dim); }
#start :where(h3), #start .cr :where(dt) { color: var(--text); }
:is(#prep .tile .k, #panel .dk-sum span, #card .stats span, #panel .total span, #panel .prizes em, #panel .rig span, #power .lbl, #fight .lbl, #fight .small, #sonar .lbl, #fishcam) { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
#fishcam, #sonar .lbl { font-weight: 600; }

/* Money: white numbers, the coin icon carries the meaning. */
:is(#panel .dk-money, #panel .dk-price, #panel .fishc .val, #panel .dk-sum b, #panel .total b, #panel .order strong, #panel .dk-podium b, #prep .goal em small, #panel .dk-slip .pay strong, #panel .dk-sw span, #card .stats div:last-child b) { color: var(--text); }
#money .chip .ic, #panel .dk-price .ic { color: var(--dim); }
#panel .dk-price.short { color: var(--faint); }
@keyframes dkGain { 30% { text-shadow: 0 0 18px rgba(139,224,238,0.8); transform: scale(1.06); } }

/* Glass surfaces: the HUD, panels and popovers share one material. */
:is(.glassy, #place, #topright .bar, #money, #hint, #flash, #power, #fight, #card, #strip, #helm, #sonar, #act, #sailpad button, #anchor, #coach, .toast, #todpop, #photobar, #panel .mapinfo) {
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: var(--shadow);
}
:is(#card, #coach, .toast, #todpop, #photobar, #panel .mapinfo) { background: var(--glass-strong); }
#panel .sheet { background: var(--glass-strong); backdrop-filter: blur(30px) saturate(1.5); -webkit-backdrop-filter: blur(30px) saturate(1.5); border: 1px solid var(--edge); box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 40px 120px rgba(0,0,0,0.55), 0 8px 30px rgba(0,0,0,0.35); }
#panel { background: rgba(4,9,14,0.38); }
#panel .badge { display: none; }
#panel h2 { font: 600 24px/1.1 var(--display); letter-spacing: -0.02em; }
#panel header { padding: 22px 22px 12px 24px; }

/* Buttons: liquid glass everywhere, three weights — default, main (brighter, sea rim) and quiet. */
:is(#panel .item button, #panel .region button, #panel .primary, #panel .order button, #panel footer button, #panel .x, #panel .menu button, #panel .menu button.primary, #panel .savebtns button, #panel .back, #panel .mapinfo button, #panel .mapinfo button.go, #panel .region button.go, #card .cardbtns button, #start .back):not(:disabled) {
  position: relative; isolation: isolate; color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0.045));
  border: 1px solid rgba(255,255,255,0.2); border-style: solid;
  backdrop-filter: blur(18px) saturate(1.8); -webkit-backdrop-filter: blur(18px) saturate(1.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 0 -1px 0 rgba(255,255,255,0.06), 0 6px 18px rgba(0,0,0,0.22);
  transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
:is(#panel .item button, #panel .region button, #panel .primary, #panel .order button, #panel footer button, #panel .x, #panel .menu button, #panel .savebtns button, #panel .back, #panel .mapinfo button, #card .cardbtns button, #start .back):hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(255,255,255,0.24), rgba(255,255,255,0.08)); border-color: rgba(255,255,255,0.34);
}
:is(#panel .item button, #panel .region button, #panel .primary, #panel .order button, #panel footer button, #panel .x, #panel .menu button, #panel .savebtns button, #panel .back, #panel .mapinfo button, #card .cardbtns button, #start .back, #prep .go, #prep .back, #panel .dk-buy, #panel .dk-ghost, #panel .dk-close, #panel .dk-chips button, #panel .tabs button, .seg button, #panel .seg2 button):active:not(:disabled) { transform: scale(0.97); }
:is(#panel .primary, #panel .menu button.primary, #panel .mapinfo button.go, #panel .region button.go):not(:disabled) {
  color: #fff; font-weight: 700;
  background: linear-gradient(180deg, rgba(255,255,255,0.32), rgba(255,255,255,0.1)), radial-gradient(120% 140% at 50% 120%, rgba(139,224,238,0.42), transparent 60%);
  border-color: rgba(255,255,255,0.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), inset 0 -12px 22px rgba(139,224,238,0.12), 0 10px 28px rgba(0,0,0,0.3);
}
:is(#panel .primary, #panel .menu button.primary, #panel .mapinfo button.go, #panel .region button.go):hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(255,255,255,0.38), rgba(255,255,255,0.14)), radial-gradient(120% 140% at 50% 120%, rgba(139,224,238,0.5), transparent 60%);
}
#panel .menu button { height: 50px; border-radius: 18px; font-weight: 600; }
#panel .x kbd, #card .cardbtns kbd { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.22); }
#panel button.short { color: var(--warn); border: 1px dashed rgba(255,163,82,0.55); background: rgba(255,163,82,0.06); box-shadow: none; }

/* Tabs and segmented controls: one glass track, the chosen one is a raised glass pill. */
:is(#panel .tabs, #panel .set .seg2) { padding: 3px; border-radius: 99px; background: rgba(0,0,0,0.22); box-shadow: inset 0 1px 2px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.07); }
:is(#panel .tabs button, #panel .set .seg2 button, .seg button) { transition: background 0.2s, color 0.2s, box-shadow 0.2s; }
:is(#panel .tabs button[aria-selected="true"], #panel .set .seg2 button[aria-pressed="true"], .seg button[aria-pressed="true"], #panel .dk-chips button[aria-pressed="true"], #todpop button[aria-pressed="true"]) {
  color: #fff; background: linear-gradient(180deg, rgba(255,255,255,0.26), rgba(255,255,255,0.1)); border-color: rgba(255,255,255,0.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 2px 8px rgba(0,0,0,0.25);
}
#panel .tabs em { background: var(--accent); color: #06222b; font-weight: 700; }
#panel .dk-chips button { transition: background 0.2s, color 0.2s, border-color 0.2s; }
#panel .dk-chips button:hover { background: rgba(255,255,255,0.08); }
#panel .dk-nav button[aria-current="true"] { background: linear-gradient(90deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), inset 0 0 0 1px rgba(255,255,255,0.1); }
#panel .dk-nav .count { background: var(--accent); color: #06222b; font-weight: 700; }
#todpop button[aria-pressed="true"]::after { color: var(--accent); }

/* Cards, chosen states and badges. Chosen = sea rim plus a ✓ or a label, never colour alone. */
:is(#panel .item, #panel .region, #panel .fishcard, #panel .goals, #panel .ach, #panel .row, #panel .price, #panel .order, #panel .home, #panel .facts div, #panel .dk-tick, #panel .dk-table .tr, #prep .tile, #prep .goal) {
  background: linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.025)); border: 1px solid var(--edge); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
#panel .fishcard.unknown, #panel .ach:not(.got) { border-style: dashed; }
:is(#panel .item.eq, #panel .region.here, #panel .ach.got, #panel .dk-sw.eq, #prep .goal.done, #panel .dk-table .tr.me, #panel .cuprow.me, #panel .order.ready) {
  background: linear-gradient(180deg, rgba(139,224,238,0.12), rgba(139,224,238,0.04)); border: 1px solid rgba(139,224,238,0.5); outline: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}
#panel .dk-card[aria-selected="true"], #prep .vp-card[aria-pressed="true"] { border-color: rgba(139,224,238,0.6); box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 0 0 1px rgba(139,224,238,0.3), 0 18px 40px rgba(0,0,0,0.4); }
:is(#panel .goal.ok .mk, #panel .ach.got .mk, #panel .region.here .num, #prep .vp-card .on, #card .tag.hi) { background: var(--accent); color: #06222b; border-color: var(--accent); }
#panel .region .num { background: rgba(255,255,255,0.12); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2); font-weight: 600; }
:is(#panel .pill, #panel .price .hot, #panel .order .hot, #panel .dk-tick .hot, #cupchip) { background: rgba(139,224,238,0.14); color: var(--accent); border: 1px solid rgba(139,224,238,0.4); font-weight: 600; letter-spacing: 0; text-transform: none; }
#panel .pill:not(.ok) { border-style: dashed; }
#panel .dk-badge.eq { background: var(--text); color: #06222b; }
:is(#panel .ach em, #panel .goal.ok strong, #panel .item.eq .tier) { color: var(--accent); }
#panel .item .tier { font: 600 13px/1 var(--display); }
#panel .tipbar { background: rgba(255,255,255,0.05); border: 1px solid var(--edge); }
#panel .tipbar .ic { color: var(--accent); }
#panel .cuphead, #panel .dk-cuphead { background: radial-gradient(ellipse 60% 90% at 85% 100%, rgba(139,224,238,0.16), transparent 70%), linear-gradient(160deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)); border: 1px solid var(--edge); }
#panel .dk-podium i { background: linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0.03)); border-color: rgba(255,255,255,0.22); }
#panel .dk-podium .p1 i { background: linear-gradient(180deg, rgba(139,224,238,0.35), rgba(139,224,238,0.04)); border-color: rgba(139,224,238,0.45); }
#panel .dk-podium .p1 em { color: var(--accent); }
#panel .dk-big { background: radial-gradient(ellipse 70% 80% at 50% 70%, rgba(139,224,238,0.16), transparent 70%); }

/* Order slips: glass cards like the rest, no more paper. */
#panel .dk-slip { color: var(--text); transform: none; border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025)); border: 1px solid var(--edge); box-shadow: inset 0 1px 0 rgba(255,255,255,0.1); }
#panel .dk-slip::before { display: none; }
#panel .dk-slip .who { font: 600 16px/1.2 var(--display); letter-spacing: -0.01em; }
#panel .dk-slip .what span, #panel .dk-slip .when { color: var(--dim); }
#panel .dk-slip .pay { border-top: 1px solid var(--edge); }
#panel .dk-slip .dk-buy:disabled { color: var(--dim); background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
#panel .dk-slip.ready { border-color: rgba(139,224,238,0.6); box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 0 0 1px rgba(139,224,238,0.3); }

/* Toggles and sliders. */
#panel .set.tog i { background: rgba(0,0,0,0.3); box-shadow: inset 0 1px 2px rgba(0,0,0,0.4), inset 0 0 0 1px rgba(255,255,255,0.12); }
#panel .set.tog i::after { box-shadow: 0 2px 6px rgba(0,0,0,0.35); }
#panel .set.tog input:checked + i { background: var(--accent); }
#panel .set input[type=range] { accent-color: var(--accent); }
#panel .set .seg2 button[aria-pressed="true"] { color: #fff; }

/* Charts: the journal map uses the same night chart as the voyage planner. */
.chart .grid { stroke: rgba(139,224,238,0.07); }
.chart .eq { stroke: rgba(139,224,238,0.16); stroke-dasharray: 4 6; }
.chart .near { fill: rgba(255,255,255,0.05); stroke: rgba(255,255,255,0.1); }
.chart .indo { fill: rgba(214,226,232,0.16); stroke: rgba(184,236,246,0.55); stroke-width: 0.8; }
.chart .leg.open { stroke: rgba(255,255,255,0.4); stroke-width: 1.4; }
.chart .pin circle { fill: #0c1a24; stroke: rgba(255,255,255,0.85); stroke-width: 1.6; }
.chart .pin.here circle:not(.halo):not(.hit) { fill: #fff; stroke: var(--accent); stroke-width: 2.4; }
.chart .pin.here .halo { stroke: #fff; }
.chart .pin text .n { fill: rgba(255,255,255,0.6); }
#panel .mapwrap { background: radial-gradient(ellipse at 50% 30%, var(--sea1), var(--sea2)); border-color: var(--edge); }
#voyage .ship circle { stroke: var(--accent); }
#prep .chart .leg.open { stroke: rgba(255,255,255,0.32); }
#prep .chart .pin.here .dot { fill: #fff; stroke: var(--accent); stroke-width: 2.4; }
#prep .chart .pin .pulse { stroke: #fff; }

/* K5 HUD: thinner, cleaner, one style. */
#place { padding: 11px 15px 12px; border-radius: 20px; }
#place strong { font: 600 17px/1.15 var(--display); letter-spacing: -0.015em; }
#goalchip .g { border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05); }
#goalchip .g.ok { border-color: rgba(139,224,238,0.5); background: rgba(139,224,238,0.1); color: var(--accent); }
#money .chip b { font-weight: 600; }
#topright .ib[data-tip]:hover::after { background: rgba(8,14,20,0.94); border-radius: 10px; font-weight: 500; }
#hint { font-weight: 500; }
#hint.urgent { font: 600 24px/1.2 var(--display); letter-spacing: -0.01em; }
#coach { border: 1px solid var(--line); border-radius: 20px; }
#coach .dots i.done { background: var(--accent); }
#coach button { color: var(--dim); }
.toast { border: 1px solid var(--line); }
.toast .ic { color: var(--accent); }
.toast b { font: 600 16px/1.2 var(--display); letter-spacing: -0.01em; }
#sonar { padding: 4px; border-radius: 18px; }
#finder { border-radius: 14px; }
#sonar .lbl { color: rgba(255,255,255,0.7); font-size: 11px; }
#card.celebrate { border-color: rgba(139,224,238,0.7); box-shadow: var(--shadow), 0 0 0 1px rgba(139,224,238,0.35), 0 0 60px rgba(139,224,238,0.2); }
#card .tag { letter-spacing: 0; text-transform: none; font-weight: 600; font-size: 12px; }
#card h2 { letter-spacing: -0.02em; }
#tarc span { letter-spacing: 0; text-transform: none; font-weight: 700; font-size: 12px; }
#fisharrow span { letter-spacing: 0; text-transform: none; font-weight: 700; }
#strip .edge { background: rgba(255,255,255,0.92); color: #06222b; }
#power .sweet { background: repeating-linear-gradient(45deg, rgba(139,224,238,0.55) 0 3px, transparent 3px 6px); border-left-color: var(--accent); }
#act { font-weight: 700; }
#act.urgent { border-color: var(--accent); color: var(--accent); }
#start .loadbar i { background: #fff; }

/* K6 front end. */
#press { letter-spacing: 0.24em; font-weight: 500; }
#startSub { font-size: 14px; }
#menu button::before { background: #fff; }
#start .side h2 { letter-spacing: -0.03em; font-weight: 600; }
#start dd { color: rgba(236,243,248,0.86); }
#start .dockhelp dt { color: var(--text); }
#titlecard h2 { font-weight: 600; letter-spacing: -0.03em; }

/* K7: one focus ring, calm motion. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#menu button:focus-visible { outline: none; }
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0.01ms !important; } }
:is(#panel .body, #panel .dk-scroll, #prep .vp, #start .side) { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.18) transparent; }
.chart .pin circle.hit { fill: transparent !important; stroke: none !important; }
.chart .pin.locked circle:not(.hit) { fill: rgba(8,26,40,0.7); stroke: rgba(255,255,255,0.45); stroke-dasharray: 3 2; }
.chart .pin.here .halo { fill: none; }
#panel .chart .pin.locked circle:not(.hit) { r: 6.5px; }
#panel .chart .pin.here circle:not(.halo):not(.hit) { r: 5px; }
#panel .chart .pin.here .halo { r: 9px; }
#panel .chart .pin.open:not(.here) circle:not(.hit) { r: 4.5px; }
#panel .chart .pin .lk { transform: scale(0.8); }
#panel .dk-tick { grid-template-columns: 64px minmax(0, 1fr) 84px auto; }
#panel .dk-tick .px { white-space: nowrap; }
@media (max-width: 1240px) { #panel .dk-tick { grid-template-columns: 56px minmax(0, 1fr) auto; } #panel .dk-tick .dk-spark { display: none; } #panel .dk-tick img { width: 56px; } }
#panel .dk h4 { flex-wrap: wrap; }
/* States the shared groups above would otherwise flatten. */
#hint.urgent { border-color: rgba(139,224,238,0.75); }
#flash.bad { border-color: rgba(255,163,82,0.7); }
#prep .tile.warn { border-color: rgba(255,163,82,0.55); }
#panel .fishcard:hover { border-color: rgba(255,255,255,0.32); }
#panel .item.own { background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.035)); }
#panel .dk-body h3 { font-size: 16px; letter-spacing: -0.01em; }
#panel .tabs { flex: none; max-width: calc(100% - 32px); }
@media (max-width: 760px) { #coach { top: 172px; } }
/* Market board: sized by its own width, not the window, so names and the "In demand" tag never squeeze. */
#panel .dk-board { container-type: inline-size; }
#panel .dk-tick .nm { min-width: 0; }
#panel .dk-tick .hot { white-space: nowrap; flex: none; line-height: 1.3; }
@container (max-width: 520px) { #panel .dk-tick { grid-template-columns: 56px minmax(0, 1fr) auto; } #panel .dk-tick .dk-spark { display: none; } #panel .dk-tick img { width: 56px; } }
@container (min-width: 521px) { #panel .dk-tick { grid-template-columns: 64px minmax(0, 1fr) 84px auto; } #panel .dk-tick .dk-spark { display: block; } }

/* ---- M0–M6: phones. ---- */
/* M0: the game's words are not page text: no selection, no long-press Copy / Select All menu,
   no grey tap flash, no dragging pictures out. Real text fields stay selectable. */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
input, textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img, svg { -webkit-user-drag: none; }

@media (max-width: 760px) {
  /* M1: one slim top row (money + buttons), the place as one quiet line under it. The island's
     name shows for a moment on arrival; the goal lives in the journal (tap the line). */
  #topright { top: calc(8px + env(safe-area-inset-top)); left: 8px; right: 8px; flex-wrap: nowrap; gap: 6px; }
  #money { height: 36px; }
  #topright .bar { padding: 2px; gap: 0; }
  #topright .ib { width: 32px; height: 32px; }
  #place { top: calc(52px + env(safe-area-inset-top)); left: 8px; max-width: calc(100vw - 16px); padding: 0 6px; background: none !important; border: 0 !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; pointer-events: auto; gap: 0; }
  #place > span { font-size: 12px; font-weight: 600; color: var(--text); text-shadow: 0 1px 6px rgba(0,0,0,0.75); }
  #place > span::after { content: " ›"; color: var(--dim); }
  #place strong { font-size: 0; line-height: 0; opacity: 0; transition: opacity 0.6s, font-size 0s 0.6s, line-height 0s 0.6s; }
  body.arrive #place strong { font-size: 22px; line-height: 1.15; opacity: 1; transition: opacity 0.6s; text-shadow: 0 2px 14px rgba(0,0,0,0.6); }
  #place #goalchip { display: none; }
  #place #cupchip { margin-top: 4px; padding: 2px 8px; font-size: 11px; }

  /* M2: the compass strip and the helm in one row of about 40 px, under the place line. */
  #nav { top: calc(78px + env(safe-area-inset-top)); width: calc(100vw - 16px); display: flex; align-items: center; gap: 6px; }
  #strip { flex: 1; height: 38px; border-radius: 13px; }
  #strip span { top: 4px; font-size: 10px; }
  #strip .cd { top: 12px; font-size: 12px; }
  #strip .mk i { width: 6px; height: 6px; }
  #strip .mk em { font-size: 10px; }
  #strip .edge { top: 10px; font-size: 10px; padding: 2px 6px; }
  #helm { margin: 0; padding: 4px 10px 4px 8px; gap: 6px; flex: none; height: 38px; box-sizing: border-box; }
  #helm .lever { height: 20px; width: 5px; }
  #speed { font-size: 13px; }
  #navhint { display: none; }

  /* M3 + M4: one text slot above the bottom row; the coach takes it over from the hint. */
  #hint { bottom: calc(132px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); font-size: 13px; }
  body[data-mode="sail"] #hint { bottom: calc(166px + env(safe-area-inset-bottom)); }
  body #coach, body[data-mode="sail"] #coach { top: auto; bottom: calc(132px + env(safe-area-inset-bottom)); width: calc(100vw - 24px); padding: 10px 14px 9px; }
  body[data-mode="sail"] #coach { bottom: calc(166px + env(safe-area-inset-bottom)); }
  body:has(#coach:not([hidden])) #hint { visibility: hidden; }
  body.sonar-open[data-mode="sail"] :is(#hint, #coach) { bottom: calc(262px + env(safe-area-inset-bottom)); }

  /* M4: bottom row, nothing on top of anything. Fishing: sonar left, anchor, cast right.
     Sailing: helm pad left, anchor right (big), sonar pill above it. */
  #act { right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 88px; height: 88px; }
  #anchor { right: 112px; bottom: calc(28px + env(safe-area-inset-bottom)); width: 64px; height: 64px; padding: 4px 0 0; border-radius: 50%; flex-direction: column; justify-content: center; gap: 1px; font-size: 10px; font-weight: 700; line-height: 1.1; text-align: center; }
  #anchor .ic { width: 20px; height: 20px; }
  #anchor span { max-width: 56px; }
  body[data-mode="sail"] #anchor { right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 88px; height: 88px; font-size: 12px; }
  body[data-mode="sail"] #anchor .ic { width: 26px; height: 26px; }
  #sailpad { left: 10px; bottom: calc(16px + env(safe-area-inset-bottom)); grid-template-columns: 56px 56px 56px; grid-template-rows: 56px 56px; gap: 6px; }
  #sailpad button { border-radius: 16px; font-size: 18px; }
  /* The sonar: a pill until it is wanted. */
  #sonar, body[data-mode="sail"] #sonar { left: 10px; right: auto; bottom: calc(40px + env(safe-area-inset-bottom)); padding: 0; height: 40px; width: 84px; border-radius: 99px; cursor: pointer; transition: width 0.3s, height 0.3s, border-radius 0.3s, bottom 0.3s; overflow: hidden; }
  #sonar #finder { opacity: 0; transition: opacity 0.25s; }
  #sonar .lbl { top: 50%; left: 0; right: 0; transform: translateY(-50%); text-align: center; font-size: 12px; color: var(--text); }
  #sonar .lbl::before { content: "▸ "; color: var(--accent); }
  body.sonar-open #sonar { width: 166px; height: 108px; padding: 5px; border-radius: 18px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  body.sonar-open #sonar #finder { opacity: 1; width: 156px; height: 98px; }
  body.sonar-open #sonar .lbl { top: 10px; left: 12px; right: auto; transform: none; text-align: left; font-size: 11px; color: rgba(255,255,255,0.55); }
  body.sonar-open #sonar .lbl::before { content: ""; }
  #sview { display: none; top: 6px; left: 54px; }
  body.sonar-big.sonar-open #sview { display: block; }
  /* The big sheet sits above the bottom row, full width. */
  body.sonar-big.sonar-open #sonar, body.sonar-big.sonar-open[data-mode="sail"] #sonar { left: 10px; right: auto; width: calc(100vw - 20px); height: 232px; bottom: calc(124px + env(safe-area-inset-bottom)); }
  body.sonar-big.sonar-open #sonar #finder { width: calc(100vw - 30px); height: 222px; }
  body.sonar-big.sonar-open :is(#hint, #coach), body.sonar-big.sonar-open[data-mode="sail"] :is(#hint, #coach) { bottom: calc(364px + env(safe-area-inset-bottom)); }
  body.sonar-big.sonar-open[data-mode="sail"] #sonar { bottom: calc(216px + env(safe-area-inset-bottom)); }
  body[data-mode="sail"] #sonar { left: auto; right: 14px; bottom: calc(116px + env(safe-area-inset-bottom)); }
  body.sonar-open[data-mode="sail"] #sonar { right: 14px; bottom: calc(116px + env(safe-area-inset-bottom)); }
  /* Messages come in at the top, under the place line, not over the controls. */
  #toasts { top: calc(78px + env(safe-area-inset-top)); bottom: auto; left: 10px; right: 10px; }
  body[data-mode="sail"] #toasts { top: calc(124px + env(safe-area-inset-top)); }
  #fight { bottom: calc(132px + env(safe-area-inset-bottom)); }
  body:has(#fight:not([hidden])) :is(#hint, #coach) { bottom: calc(232px + env(safe-area-inset-bottom)); }
  #power { bottom: calc(132px + env(safe-area-inset-bottom)); }
  /* The catch card sits above the round button (it says Keep), the rest of the bottom row and
     the coach step aside while it shows. */
  #card { bottom: calc(118px + env(safe-area-inset-bottom)); max-height: calc(100vh - 190px); overflow: auto; }
  body:has(#card:not([hidden])) :is(#sonar, #anchor, #coach, #hint) { visibility: hidden; }

  /* M5: the dock rail is four equal tabs with the icon over the label; cards are rows; the
     buy button stays at the bottom of the sheet. */
  #panel .dk-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; overflow: visible; }
  #panel .dk-nav button { flex-direction: column; justify-content: center; gap: 3px; height: 54px; padding: 0 2px; font-size: 11px; line-height: 1.1; text-align: center; border-radius: 14px; }
  #panel .dk-nav button span { white-space: nowrap; }
  #panel .dk-nav .ic { width: 18px; height: 18px; }
  #panel .dk-nav .count { position: absolute; top: 4px; right: 6px; margin: 0; min-width: 18px; height: 18px; padding: 0 5px; font-size: 10px; }
  #panel .dk-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  #panel .dk-card { flex-direction: row; align-items: stretch; }
  #panel .dk-ph { width: 112px; height: auto; min-height: 84px; flex: none; }
  #panel .dk-ph img { max-height: 80px; max-width: 104px; }
  #panel .dk-body { flex: 1; min-width: 0; align-self: center; }
  #panel .dk-card .dk-badge { top: auto; bottom: 8px; left: 8px; right: auto; }
  #panel .dk-tier { top: 8px; left: 10px; font-size: 10px; }
  #panel .dk-content { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  #panel .dk-drawer .dk-buy.big { position: fixed; left: 16px; right: 16px; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; z-index: 3; box-shadow: 0 10px 30px rgba(0,0,0,0.45); }
  #panel .mapwrap .chart { touch-action: pan-y; }
  #panel .mapwrap .chart.zoomed { touch-action: none; }
}

/* M6: phones held sideways get the same system: slim place line, compass under the middle of
   the top row, one text slot at the bottom centre, sonar as a pill in a bottom corner. */
@media (pointer: coarse) and (orientation: landscape) and (max-height: 520px) {
  #place { top: calc(10px + env(safe-area-inset-top)); left: calc(10px + env(safe-area-inset-left)); max-width: 30vw; padding: 0 4px; background: none !important; border: 0 !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; pointer-events: auto; }
  #place > span { font-size: 12px; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,0.75); }
  #place > span::after { content: " ›"; color: var(--dim); }
  #place strong { font-size: 0; line-height: 0; opacity: 0; transition: opacity 0.6s, font-size 0s 0.6s, line-height 0s 0.6s; }
  body.arrive #place strong { font-size: 18px; line-height: 1.15; opacity: 1; transition: opacity 0.6s; text-shadow: 0 2px 14px rgba(0,0,0,0.6); }
  #place #cupchip { margin-top: 3px; padding: 2px 8px; font-size: 11px; }
  #topright { right: calc(8px + env(safe-area-inset-right)); }
  #nav { top: 54px; width: min(420px, 48vw); display: flex; align-items: center; gap: 6px; }
  #strip { flex: 1; height: 36px; }
  #strip span { top: 4px; font-size: 10px; } #strip .cd { top: 11px; font-size: 12px; } #strip .mk em { font-size: 10px; }
  #helm { margin: 0; padding: 4px 10px 4px 8px; height: 36px; box-sizing: border-box; flex: none; }
  #speed { font-size: 13px; } #helm .lever { height: 18px; }
  #navhint { display: none; }
  #hint, #coach, body[data-mode="sail"] #coach { top: auto; bottom: calc(10px + env(safe-area-inset-bottom)); max-width: min(480px, 52vw); }
  #coach, body[data-mode="sail"] #coach { width: min(480px, 52vw); padding: 8px 12px 7px; }
  body:has(#coach:not([hidden])) #hint { visibility: hidden; }
  body:has(#card:not([hidden])) :is(#sonar, #anchor, #coach, #hint) { visibility: hidden; }
  #anchor { right: calc(116px + env(safe-area-inset-right)); bottom: 12px; width: 60px; height: 60px; padding: 3px 0 0; border-radius: 50%; flex-direction: column; justify-content: center; gap: 1px; font-size: 10px; line-height: 1.1; text-align: center; }
  #anchor .ic { width: 18px; height: 18px; } #anchor span { max-width: 54px; }
  body[data-mode="sail"] #anchor { right: calc(14px + env(safe-area-inset-right)); bottom: 50%; transform: translateY(50%); width: 84px; height: 84px; font-size: 11px; }
  #sonar, body[data-mode="sail"] #sonar { left: calc(10px + env(safe-area-inset-left)); right: auto; bottom: 10px; padding: 0; height: 36px; width: 80px; border-radius: 99px; overflow: hidden; }
  body[data-mode="sail"] #sonar { left: auto; right: calc(10px + env(safe-area-inset-right)); }
  #sonar #finder { opacity: 0; }
  #sonar .lbl { top: 50%; left: 0; right: 0; transform: translateY(-50%); text-align: center; font-size: 12px; color: var(--text); }
  #sonar .lbl::before { content: "▸ "; color: var(--accent); }
  body.sonar-open #sonar { width: 140px; height: 90px; padding: 5px; border-radius: 16px; }
  body.sonar-open #sonar #finder { opacity: 1; width: 130px; height: 80px; }
  body.sonar-open #sonar .lbl { top: 9px; left: 11px; right: auto; transform: none; text-align: left; font-size: 11px; color: rgba(255,255,255,0.55); }
  body.sonar-open #sonar .lbl::before { content: ""; }
  #sview { display: none; top: 5px; left: 52px; }
  body.sonar-big.sonar-open #sview { display: block; }
  body.sonar-big.sonar-open #sonar { width: 310px; height: 190px; }
  body.sonar-big.sonar-open #sonar #finder { width: 300px; height: 180px; }
  #toasts { top: 54px; bottom: auto; left: auto; right: calc(10px + env(safe-area-inset-right)); }
  body[data-mode="sail"] #toasts { top: 100px; }
}

/* H1–H7: tackle you set yourself (drag, bait depth, leader) and the tide. Sits where the fight
   gauge goes, which only shows once a fish is on. Words and numbers carry the state. */
#tackle { position: fixed; right: 24px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 5; }
#tackle .tk { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 8px 6px 14px; border-radius: 99px; font: 600 13px/1 var(--ui); color: var(--text); }
#tackle .tk > span { color: var(--dim); font-weight: 500; font-size: 12px; }
#tackle .tk b { min-width: 46px; text-align: center; font-variant-numeric: tabular-nums; }
#tackle button.tk { cursor: pointer; }
#tackle .tk button, #fight .frow button { width: 28px; height: 28px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255,255,255,0.08); color: var(--text); font: 600 15px/1 var(--ui); cursor: pointer; display: grid; place-items: center; padding: 0; }
#tackle .tk button:hover, #fight .frow button:hover { background: rgba(139,224,238, 0.2); border-color: rgba(139,224,238, 0.6); }
#tackle .tide { padding: 7px 14px; font-weight: 500; font-size: 12px; color: var(--dim); }
#tackle .tide:empty { display: none; }
#fight .spool { height: 6px; }
#fight .spool i { background: rgba(238,244,248, 0.85); }
#fight .frow { display: flex; align-items: center; gap: 8px; margin-top: 2px; pointer-events: auto; }
#fight .frow b { min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; font-size: 13px; }
#fWear { font-style: normal; color: var(--warn); }
#fWear:not(:empty)::before { content: "⚠ "; }
#fight.low-line #spFill { background: var(--warn); background-image: repeating-linear-gradient(45deg, rgba(0,0,0,0.35) 0 4px, transparent 4px 8px); }
@media (max-width: 760px) {
  #tackle { top: calc(80px + env(safe-area-inset-top)); right: 10px; transform: none; gap: 6px; }
  #tackle .tide { max-width: 62vw; white-space: normal; text-align: right; line-height: 1.3; }
  /* The fight panel carries the drag and the spool now: the hint goes above it. */
  body:has(#fight:not([hidden])) :is(#hint, #coach) { bottom: calc(360px + env(safe-area-inset-bottom)); }
  #fight .info { gap: 4px; }
  #tackle .tk { padding: 4px 6px 4px 11px; font-size: 12px; gap: 6px; }
  #tackle .tk b { min-width: 40px; }
  #tackle .tk button, #fight .frow button { width: 30px; height: 30px; }
  #tackle .tk kbd { display: none; }
  #tackle .tide { padding: 5px 11px; font-size: 11px; }
}
@media (pointer: coarse) and (orientation: landscape) and (max-height: 520px) {
  #tackle { top: calc(52px + env(safe-area-inset-top)); right: 10px; transform: none; gap: 5px; }
  #tackle .tk kbd { display: none; }
}

/* J5: the week (tournament, research) and record photos in the journal. */
#panel .wk { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 10px; border-radius: 16px; background: rgba(255,255,255,0.055); border: 1px solid rgba(255,255,255,0.12); }
#panel .wk img { width: 72px; height: 44px; object-fit: contain; }
#panel .wk b { display: block; font-size: 14px; }
#panel .wk span { display: block; font-size: 12px; color: rgba(238,244,248,0.7); margin-top: 2px; }
#panel .wk em { font-style: normal; font-weight: 600; font-size: 13px; }
#panel .medals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
#panel .medal { font-size: 11.5px; padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.16); color: rgba(238,244,248,0.75); background: rgba(255,255,255,0.04); }
#panel .medal.got { color: #0b1a20; background: #8be0ee; border-color: #8be0ee; font-weight: 600; }
#panel .recph { margin: 0 0 14px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,0.14); background: rgba(0,0,0,0.25); }
#panel .recph img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
#panel .recph figcaption { font-size: 12px; padding: 8px 12px; color: rgba(238,244,248,0.8); }
@media (max-width: 760px) { #panel .wk { grid-template-columns: 56px 1fr; } #panel .wk img { width: 56px; } #panel .wk em { grid-column: 2; } }
#panel .savecode { width: 100%; box-sizing: border-box; font: 500 12px/1.4 ui-monospace, Menlo, monospace; color: #eef4f8; background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.16); border-radius: 12px; padding: 10px 12px; resize: vertical; margin: 6px 0 8px; }
#panel .row button { font: inherit; font-size: 12px; padding: 6px 12px; border-radius: 999px; color: #eef4f8; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); cursor: pointer; }

/* S5: cast bar inside the fish zone: an outline and a ✓ in the readout, not only colour. */
#power .bar i { z-index: 1; mix-blend-mode: normal; opacity: .85; }
#power .sweet { z-index: 2; border-left: 2px solid #fff; border-right: 2px solid #fff; background: repeating-linear-gradient(45deg, rgba(139,224,238,.9) 0 3px, rgba(6,34,42,.35) 3px 6px) !important; }
#power.in { box-shadow: 0 0 0 2px var(--accent), 0 8px 30px rgba(0,0,0,.35); }
#power.in #powerVal { color: var(--accent); }
#power .lbl { min-width: 72px; }
/* S1: what the fish is doing, on the fish cam. */
#fishcam em { font-style: normal; margin-left: 8px; padding: 2px 9px; border-radius: 99px; border: 1px solid rgba(255,255,255,.28); color: var(--text); }
#fishcam[data-st="taken"] em { background: var(--accent); color: #06222a; border-color: var(--accent); font-weight: 800; animation: takenpulse .5s ease-in-out infinite alternate; }
@keyframes takenpulse { to { transform: scale(1.08); } }
/* S2: the take, in the middle of the screen. */
#strikecue { position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%) scale(.9); z-index: 40; pointer-events: none; opacity: 0; padding: 12px 26px; border-radius: 99px; font: 800 26px/1 Inter, system-ui, sans-serif; letter-spacing: .02em; color: #06222a; background: var(--accent); box-shadow: 0 0 0 3px rgba(255,255,255,.85), 0 12px 40px rgba(0,0,0,.4); transition: opacity .12s, transform .12s; }
#strikecue.show { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: strikepulse .35s ease-in-out infinite alternate; }
@keyframes strikepulse { to { transform: translate(-50%, -50%) scale(1.06); } }
body.photo #strikecue, body.noui #strikecue { display: none; }
@media (max-width: 700px) { #strikecue { font-size: 20px; top: 34%; } }
/* S5 on a phone: the cast bar fits the width and sits above the hint line. */
@media (max-width: 760px) {
  #power { width: calc(100vw - 32px); box-sizing: border-box; bottom: calc(196px + env(safe-area-inset-bottom)); gap: 10px; padding: 8px 14px; }
  #power .bar { flex: 1; width: auto; }
  #power .lbl { min-width: 0; white-space: nowrap; }
}

/* Plan T: the Go to menu, the autopilot pill, the buyer boat alongside. */
#gopop { position: absolute; top: calc(100% + 8px); right: 40px; width: 360px; max-height: min(70vh, 560px); overflow-y: auto; padding: 8px; border-radius: 18px; background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--line); box-shadow: var(--shadow), 0 20px 50px rgba(0,0,0,0.35); z-index: 11; animation: sheet 0.18s ease; scrollbar-width: thin; }
#gopop h4 { margin: 6px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
#gopop h4 + .gorow { border-top: 0; }
#gopop .gorow { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); }
#gopop .gorow.radio { grid-template-columns: 1fr auto; }
#gopop .gorow b { display: block; font-size: 14px; font-weight: 700; color: var(--text); }
#gopop .gorow span { display: block; font-size: 12px; color: var(--dim); line-height: 1.35; }
#gopop button { height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255,255,255,0.08); color: var(--text); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
#gopop button:hover:not(:disabled) { background: rgba(255,255,255,0.16); }
#gopop button[data-go^="auto"] { border-color: rgba(139,224,238,0.55); }
#gopop button:disabled { opacity: 0.42; }
#autopill { position: fixed; left: 50%; top: 156px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 16px; border-radius: 99px; font-size: 13px; font-weight: 600; white-space: nowrap; z-index: 6; }
#autopill[hidden], #buyerpill[hidden] { display: none; }
#autopill button { height: 30px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255,255,255,0.1); color: var(--text); font-weight: 700; }
#buyerpill { position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 99px; border-color: rgba(139,224,238,0.6); color: var(--text); font-size: 14px; font-weight: 700; z-index: 6; }
#panel .rows.buyer .row { grid-template-columns: 56px 1fr auto; }
#panel .rows.buyer img { width: 56px; height: 32px; object-fit: contain; }
@media (max-width: 760px) {
  #gopop { position: fixed; top: 64px; right: 10px; left: 10px; width: auto; }
  #autopill { top: auto; bottom: 200px; max-width: calc(100vw - 32px); font-size: 12px; }
  #autopill span { overflow: hidden; text-overflow: ellipsis; }
  #buyerpill { left: 16px; bottom: 136px; transform: none; }
}
@media (pointer: coarse) { #buyerpill kbd { display: none; } }
body.warp :is(#nav, #place, #sonar, #hint) { opacity: 0; transition: opacity 0.6s; }
body.gopen #tackle { visibility: hidden; }

/* N1: the fuel gauge on the helm. Low fuel is told by the ⚠ mark and words, not colour alone. */
#fuelg { display: inline-flex; align-items: center; gap: 6px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,0.16); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
#fuelg[hidden] { display: none; }
#fuelg > i .ic, #fuelg > i svg { width: 14px; height: 14px; opacity: 0.8; }
#fuelg .bar { width: 46px; height: 6px; border-radius: 99px; background: rgba(255,255,255,0.15); overflow: hidden; }
#fuelg .bar i { display: block; height: 100%; background: #eef4f8; border-radius: 99px; }
#fuelg em { font-style: normal; font-weight: 500; opacity: 0.8; }
#fuelg.low .bar i { background: #ffa352; }
#fuelg.low em { color: #ffa352; opacity: 1; }
@media (max-width: 760px) { #fuelg .bar { width: 30px; } #fuelg em { display: none; } }
/* N3: the almanac. */
#panel .almtop { display: flex; gap: 18px; align-items: center; margin: 4px 0 10px; }
#panel .almtop h3 { margin: 0 0 4px; }
#panel .almtop p { margin: 2px 0; }
#panel .moonface { width: 84px; height: 84px; flex: none; }
#panel .moonface .dark { fill: rgba(255,255,255,0.08); stroke: rgba(255,255,255,0.25); stroke-width: 1; }
#panel .moonface .lit { fill: #eef4f8; }
#panel .tidechart { width: 100%; height: auto; max-height: 160px; margin: 4px 0 10px; overflow: visible; }
#panel .tidechart polyline { fill: none; stroke: #8be0ee; stroke-width: 2; }
#panel .tidechart .mid { stroke: rgba(255,255,255,0.15); stroke-dasharray: 3 4; }
#panel .tidechart .now { stroke: #eef4f8; stroke-width: 1.5; }
#panel .tidechart circle { fill: #eef4f8; }
#panel .tidechart text { fill: #eef4f8; font: 600 9px var(--ui, sans-serif); }
#panel .tidechart text.ax { fill: rgba(238,244,248,0.55); font-weight: 500; }
#panel .ach.warn b { color: #ffa352; }
/* N6: the Go to sheet sits over everything while open (the coach and, on phones, the compass
   strip used to cover its first and last rows). */
body.gopen #coach, body.gopen #hint { visibility: hidden; }
@media (max-width: 760px) { body.gopen #nav { visibility: hidden; } }
/* F2: the fish's next move, called out above the fight. Words and arrows, not colour alone. */
#tellcue { position: fixed; left: 50%; top: 30%; transform: translate(-50%, -50%) scale(.92); z-index: 39; pointer-events: none; opacity: 0; padding: 9px 20px; border-radius: 99px; font: 700 18px/1 Inter, system-ui, sans-serif; letter-spacing: .01em; color: #eef4f8; background: rgba(8,20,28,.72); border: 2px solid rgba(255,255,255,.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: opacity .1s, transform .1s; white-space: nowrap; }
#tellcue.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#tellcue.good { color: #06222a; background: var(--accent); border-color: rgba(255,255,255,.9); }
body.photo #tellcue, body.noui #tellcue { display: none; }
@media (max-width: 700px) { #tellcue { font-size: 15px; top: 27%; padding: 8px 14px; } }
/* F5: the stamp on the catch card, and money counting up. */
#card .stamp { position: absolute; right: 14px; top: 14px; padding: 6px 12px; border: 2.5px solid #eef4f8; border-radius: 8px; font: 800 15px/1 Inter, system-ui, sans-serif; letter-spacing: .12em; color: #eef4f8; background: rgba(8,20,28,.35); transform: rotate(-8deg) scale(1.8); opacity: 0; pointer-events: none; }
#card .stamp:empty { display: none; }
#card .stamp.on { animation: stampin .32s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes stampin { from { opacity: 0; transform: rotate(-8deg) scale(1.8); } to { opacity: 1; transform: rotate(-8deg) scale(1); } }
#money.gain .chip:first-child { box-shadow: 0 0 0 1.5px var(--accent) inset; }

/* Plan M: the Go menu by keyboard, the free cursor, the tow slate. */
#gopop .gorow[data-n] { grid-template-columns: 16px 1fr auto auto; }
#gopop .gorow.radio[data-n] { grid-template-columns: 16px 1fr auto; }
#gopop .gorow[data-n]::before { content: attr(data-n); font: 600 11px/1 var(--ui); color: var(--dim); text-align: center; }
#gopop .gorow.sel { background: rgba(139,224,238,0.12); box-shadow: inset 2px 0 0 var(--accent); border-radius: 8px; }
#gopop .gorow.sel::before { color: var(--accent); font-size: 13px; }
#gopop .gokeys { margin: 8px 10px 4px; font-size: 11px; color: var(--dim); }
body.cursor-free #reticle { opacity: 0.25; }
#panel .dk-debt { display: block; margin-top: 6px; font-style: normal; font-size: 12px; font-weight: 600; color: #ffa352; }

/* Plan R: the clock chip where the time menu was. */
#topright .ib.clock { width: auto; padding: 0 11px 0 8px; gap: 6px; }
#clock { font: 600 13px/1 var(--ui); font-variant-numeric: tabular-nums; color: var(--text); }

/* Plan C: the strike combo and the fight cues. */
#combo { position: fixed; left: 50%; top: 36%; transform: translate(-50%, -50%); z-index: 41; display: none; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; text-align: center; }
#combo.show { display: flex; }
#combo .pad { width: 132px; height: 132px; padding: 0; border: 0; border-radius: 50%; background: rgba(6,20,28,0.62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); pointer-events: auto; cursor: pointer; touch-action: none; box-shadow: 0 10px 34px rgba(0,0,0,0.35); }
#combo svg { width: 100%; height: 100%; display: block; }
#combo .track { fill: none; stroke: rgba(255,255,255,0.22); stroke-width: 7; }
#combo .fill { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 0.08s linear; }
#combo .arrow { fill: #fff; transform-origin: 60px 60px; transition: transform 0.12s; }
#combo[data-dir="R"] .arrow { transform: rotate(90deg); }
#combo[data-dir="D"] .arrow { transform: rotate(180deg); }
#combo[data-dir="L"] .arrow { transform: rotate(-90deg); }
#combo.pop .pad { animation: combopop 0.22s ease-out; }
#combo.wrong .pad { animation: comboshake 0.25s linear; }
@keyframes combopop { from { transform: scale(1.22); } to { transform: scale(1); } }
@keyframes comboshake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-9px); } 75% { transform: translateX(9px); } }
#combo .key { padding: 5px 14px; border-radius: 99px; background: rgba(6,20,28,0.7); font: 700 15px/1 var(--ui); color: #fff; letter-spacing: 0.02em; }
#combo .lbl { font: 600 14px/1.2 var(--ui); color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,0.75); }
#combo .dots { font: 700 14px/1 var(--ui); color: #fff; letter-spacing: 0.12em; text-shadow: 0 1px 6px rgba(0,0,0,0.7); min-height: 14px; }
#combo .time { width: 132px; height: 4px; border-radius: 99px; background: rgba(255,255,255,0.2); overflow: hidden; }
#combo .time i { display: block; width: 100%; height: 100%; background: #fff; transform-origin: left; }
body.photo #combo, body.noui #combo { display: none; }
@media (max-width: 700px) { #combo { top: 40%; } #combo .pad { width: 150px; height: 150px; } }

/* Plan O: the kampung, the drying racks, the trophy wall. */
#panel .kp .who small { display: block; font-weight: 500; color: var(--dim); font-size: 11px; margin-top: 2px; }
#panel .kp .pay small { font-size: 11px; font-weight: 600; color: var(--dim); margin-left: 4px; }
#panel .kp-rack, #panel .kp-cure { display: grid; grid-template-columns: 48px 1fr auto auto; align-items: center; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--line); }
#panel .kp-rack { grid-template-columns: 48px 1fr auto; }
#panel .kp-rack img, #panel .kp-cure img { width: 48px; height: 30px; object-fit: contain; }
#panel .kp-rack b, #panel .kp-cure b { display: block; font-size: 13px; }
#panel .kp-rack span, #panel .kp-cure span { display: block; font-size: 12px; color: var(--dim); }
#panel .kp-cure .dk-ghost { height: 30px; padding: 0 10px; font-size: 12px; }
#panel .kp-levels { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 6px; }
#panel .kp-levels li { padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); }
#panel .kp-levels li b { display: flex; align-items: center; gap: 6px; font-size: 13px; }
#panel .kp-levels li span { display: block; font-size: 12px; color: var(--dim); margin-top: 2px; }
#panel .kp-levels li.got { border-color: rgba(139,224,238,0.45); background: rgba(139,224,238,0.08); }
#panel .dk-meter.big { display: block; height: 8px; margin: 10px 0 6px; }
#panel .tw-host { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: #120c08; }
#panel .tw-host.jr { margin-bottom: 10px; }
#panel .tw-host canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 0.6s; }
#panel .tw-host.ready canvas { opacity: 1; }
#panel .tw-list { display: grid; gap: 4px; margin-top: 12px; }
#panel .tw-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 6px 4px; border-top: 1px solid var(--line); }
#panel .tw-row img { width: 44px; height: 28px; object-fit: contain; }
#panel .tw-row.tw-legend b { color: var(--accent); }
#panel .tw-row b { display: block; font-size: 13px; }
#panel .tw-row span { display: block; font-size: 11px; color: var(--dim); }
#panel .tw-row strong { font-size: 13px; font-variant-numeric: tabular-nums; }
