:root {
  --sea-paper: #f8f7f3;
  --sea-surface: #fffefa;
  --sea-ink: #172333;
  --sea-muted: #334155;
  --sea-line: #dcdfdc;
  --sea-blue: #1755e8;
  --sea-blue-hover: #1243bd;
  --sea-soft: #edf1f8;
  --sea-night: #10243b;
  --sea-night-surface: #1b2e46;
  --sea-night-line: #435670;
  --sea-night-text: #f4f4ed;
  --sea-danger: #a43b32;
  --sea-radius: 24px;
  --sea-glass-light: #f1f3f1;
  --sea-glass-context: #f2f4f1;
  --sea-glass-sheet: #f5f6f2;
  --sea-glass-dark: #1b2e46;
  --sea-glass-inner: #fffefa;
  --sea-glass-muted: #edf1f8;
  --sea-glass-edge: #fffefa8c;
  --sea-glass-dark-edge: #d6e4ff3d;
  --sea-glass-shadow: 0 8px 32px #06122529, inset 0 1px 0 #fffefaa3;
  --sea-glass-dark-shadow: 0 8px 24px #06122533, inset 0 1px 0 #e0ebff24;
  --sea-frost: none;
  --sea-scrim: #081321a8;
  --sea-font: 'Avenir Next', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --sea-ease: cubic-bezier(.2, .7, .2, 1);
  --sea-header-height: 72px;
  color-scheme: light;
  font-family: var(--sea-font);
  color: var(--sea-ink);
  background: var(--sea-night);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { font-size: 14px; line-height: 1.6; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button, a { touch-action: manipulation; }
button { transition: background-color .16s var(--sea-ease), border-color .16s var(--sea-ease), color .16s var(--sea-ease), box-shadow .16s var(--sea-ease); }
button:disabled, button[aria-disabled="true"] { cursor: not-allowed; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--sea-blue);
  outline-offset: 4px;
}
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { word-break: keep-all; letter-spacing: -.035em; }
svg { flex-shrink: 0; }
.sea-icon { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.sea-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Opaque materials are the baseline; capable browsers receive the frost below. */
.sea-brand, .sea-header-actions, .sea-room-pill, .sea-direction-pad button,
.sea-camera-button, .sea-help-button, .sea-jump-button, .sea-emote-button, .sea-chat-button, .sea-sound-button, .sea-atmosphere-picker, .sea-context-panel, .sea-mining-card, .sea-sheet, #sea-notice {
  -webkit-backdrop-filter: var(--sea-frost);
  backdrop-filter: var(--sea-frost);
  background-clip: padding-box;
}

#sea-app { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; overflow: hidden; isolation: isolate; }
#sea-world { position: absolute; inset: 0; background: var(--sea-night); overflow: hidden; touch-action: none; }
.sea-travel-effect { position: absolute; z-index: 5; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, #345478 0%, #14263d 55%, #091525 100%); transition: opacity 220ms ease-out; }
#sea-app[data-travelling="true"] .sea-travel-effect { opacity: .98; transition: opacity 140ms ease-in; }
#sea-world canvas { display: block; width: 100%; height: 100%; touch-action: none; }
#sea-world:focus-visible { outline-color: #c4d4ff; outline-offset: -5px; }
#sea-chrome { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
#sea-chrome button, #sea-chrome a { pointer-events: auto; }

.sea-header {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: calc(var(--sea-header-height) + env(safe-area-inset-top));
  padding: calc(10px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
  background: transparent;
  border: 0;
  color: var(--sea-ink);
}
.sea-brand { display: flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 52px; gap: 9px; padding: 7px 10px; border: 1px solid var(--sea-glass-edge); border-radius: 18px; background: var(--sea-glass-light); box-shadow: var(--sea-glass-shadow); text-decoration: none; }
.sea-brand img { display: block; width: 32px; height: 32px; border-radius: 9px; object-fit: contain; }
.sea-brand h1 { font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: -.04em; white-space: nowrap; }
.sea-brand-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.sea-brand-parent { display: block; color: var(--sea-muted); font-size: 11px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.sea-brand-lockup { display: flex; align-items: center; gap: 10px; }
.sea-brand-lockup > img { display: block; width: 36px; height: 36px; border-radius: 10px; object-fit: contain; }
.sea-brand-lockup > span { color: var(--sea-ink); font-size: 20px; font-weight: 700; letter-spacing: -.04em; line-height: 1.3; }
.sea-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; min-width: 0; padding: 4px; border: 1px solid var(--sea-glass-edge); border-radius: 18px; background: var(--sea-glass-light); box-shadow: var(--sea-glass-shadow); }
.sea-header-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 6px; min-width: 44px; min-height: 44px; padding: 8px; border: 0; border-radius: 13px; background: transparent; box-shadow: none; font-size: 12px; font-weight: 600; line-height: 1.35; white-space: nowrap; }
.sea-header-button:hover:enabled { background: var(--sea-surface); border-color: #fffefad9; }
.sea-header-button:active:enabled { background: #e1e8f5; }
.sea-header-button .sea-icon { width: 19px; height: 19px; }
.sea-button-label { display: none; }
.sea-self-button { gap: 5px; padding-inline: 8px; }
.sea-self-tag { display: grid; place-items: center; flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--sea-blue); color: var(--sea-surface); font-size: 10px; font-weight: 700; }
#sea-self-name { display: inline-block; max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sea-count { min-width: 14px; color: var(--sea-blue); text-align: center; font-variant-numeric: tabular-nums; }
.sea-header-button[data-action="fleet"] { position: relative; }
.sea-reply-badge { position: absolute; top: -4px; right: -3px; min-width: 18px; height: 18px; padding-inline: 4px; border: 2px solid var(--sea-surface); border-radius: 12px; background: var(--sea-blue); color: #fff; font-size: 10px; font-weight: 700; line-height: 14px; text-align: center; font-variant-numeric: tabular-nums; }
.sea-reply-badge[hidden] { display: none; }
.sea-invite-button { background: #dfe9ff; color: var(--sea-blue); box-shadow: none; }

.sea-scene-top { position: absolute; top: calc(var(--sea-header-height) + env(safe-area-inset-top) + 16px); left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right)); display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sea-place-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.sea-zone-line { display: flex; align-items: center; gap: 8px; min-height: 30px; color: var(--sea-night-text); font-size: 14px; font-weight: 600; text-shadow: 0 1px 6px #10243b; }
.sea-location-dot { width: 7px; height: 7px; border: 2px solid #dbe6fa; border-radius: 50%; box-shadow: 0 0 0 3px #234362; }
.sea-destination-nav { display: flex; gap: 2px; padding: 0; background: transparent; border: 0; box-shadow: none; }
.sea-destination-nav button { min-width: 56px; min-height: 44px; padding: 9px 11px; border: 1px solid transparent; border-radius: 13px; background: transparent; color: var(--sea-night-text); font-size: 12px; font-weight: 500; line-height: 1.4; }
.sea-destination-nav button:hover:enabled { background: #c7dcff18; }
.sea-destination-nav button:active:enabled, .sea-destination-nav button[aria-current="true"], .sea-destination-nav button[aria-current="location"], .sea-destination-nav button.is-active { border-color: #d6e4ff50; background: #c7dcff1f; box-shadow: none; color: var(--sea-night-text); }
.sea-destination-nav button:focus-visible { outline-color: #c4d4ff; }
.sea-mining-card { width: 292px; max-width: calc(100vw - 32px); margin-top: 6px; padding: 14px; border: 1px solid var(--sea-glass-edge); border-radius: 20px; background: var(--sea-glass-light); color: var(--sea-ink); box-shadow: var(--sea-glass-shadow); }
.sea-mining-heading { display: flex; align-items: center; gap: 9px; }
.sea-mining-heading .sea-icon { width: 19px; height: 19px; color: #956121; }
.sea-mining-heading h2 { font-size: 13px; font-weight: 600; line-height: 1.5; }
#sea-mining-progress { display: block; width: 100%; height: 5px; margin: 11px 0 9px; overflow: hidden; appearance: none; border: 0; border-radius: 10px; background: #b9c6d64d; accent-color: #c88b32; }
#sea-mining-progress::-webkit-progress-bar { border-radius: 10px; background: #b9c6d64d; }
#sea-mining-progress::-webkit-progress-value { border-radius: 10px; background: #c88b32; }
#sea-mining-progress::-moz-progress-bar { border-radius: 10px; background: #c88b32; }
.sea-mining-explainer { margin-top: 7px; color: var(--sea-muted); font-size: 11px; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; }
.sea-mining-reward-note { margin-top: 7px; color: var(--sea-muted); font-size: 12px; line-height: 1.65; word-break: keep-all; }
.sea-mining-action { display: block; min-width: 76px; min-height: 44px; margin: 5px -3px -5px auto; padding: 9px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--sea-blue); font-size: 12px; font-weight: 600; }
.sea-mining-action:hover:enabled { background: var(--sea-soft); }
.sea-mining-glow-option { display: flex; align-items: flex-start; gap: 11px; min-height: 44px; margin: 4px 0 16px; padding: 12px; border: 1px solid #ba843d55; border-radius: 14px; background: #d7b5760b; cursor: pointer; }
.sea-mining-glow-option input { flex-shrink: 0; width: 19px; height: 19px; margin: 2px 0; accent-color: var(--sea-blue); }
.sea-mining-glow-option > span { min-width: 0; }
.sea-mining-glow-label { display: block; font-size: 14px; font-weight: 600; line-height: 1.6; }
.sea-mining-glow-help { display: block; margin-top: 3px; color: var(--sea-muted); font-size: 12px; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
.sea-boat-effect { display: block; width: fit-content; margin-top: 5px; padding: 2px 7px; border: 1px solid #b47c3040; border-radius: 7px; background: #e4bd751a; color: #79501c; font-size: 11px; line-height: 1.5; }
.sea-detail-meta .sea-boat-effect { margin-top: 0; }
.sea-room-pill { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 5px; max-width: 160px; min-height: 30px; padding: 6px 9px; border: 1px solid #d6e4ff24; border-radius: 12px; background: var(--sea-glass-dark); box-shadow: none; color: var(--sea-night-text); font-size: 11px; line-height: 1.45; }
.sea-room-pill:is(:hover, :active) { box-shadow: inset 0 0 0 1px #819ac680; }
.sea-connection-dot { width: 5px; height: 5px; flex-shrink: 0; background: #c8d8ed; border-radius: 50%; }
#sea-app[data-connection="connecting"] .sea-connection-dot { background: #c68533; }
#sea-app:is([data-connection="disconnected"], [data-connection="full"], [data-connection="locked"], [data-connection="restricted"]) .sea-connection-dot { background: #e77366; }
#sea-room-short-status { display: none; }
.sea-room-people { display: inline-flex; gap: 2px; padding-left: 6px; border-left: 1px solid #d6e4ff38; font-variant-numeric: tabular-nums; }
.sea-scene-settings { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.sea-atmosphere-picker { display: flex; align-items: center; padding: 3px; border: 1px solid var(--sea-glass-edge); border-radius: 15px; background: var(--sea-glass-light); box-shadow: var(--sea-glass-shadow); }
.sea-atmosphere-picker button { min-width: 44px; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 11px; background: transparent; color: var(--sea-muted); font-size: 12px; font-weight: 600; }
.sea-atmosphere-picker button:hover:enabled { background: var(--sea-glass-inner); color: var(--sea-ink); }
.sea-atmosphere-picker button[aria-pressed="true"] { background: var(--sea-blue); color: var(--sea-surface); box-shadow: 0 2px 8px #1755e82b; }
.sea-sound-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 9px 12px; border: 1px solid var(--sea-glass-edge); border-radius: 15px; background: var(--sea-glass-light); color: var(--sea-muted); box-shadow: var(--sea-glass-shadow); font-size: 12px; font-weight: 600; }
.sea-sound-button .sea-icon { width: 17px; height: 17px; }
.sea-sound-button[aria-pressed="true"] { color: var(--sea-blue); }
.sea-sound-button:hover:enabled { background: var(--sea-surface); }
.sea-sound-button:disabled { opacity: .6; }
.sea-sound-button[aria-pressed="false"] .sea-sound-waves, .sea-sound-button[aria-pressed="true"] .sea-sound-slash { display: none; }
.sea-sound-settings { display: grid; gap: 12px; margin-top: 18px; padding: 16px; border: 1px solid var(--sea-glass-edge); border-radius: 18px; background: var(--sea-glass-inner); }
.sea-sound-settings label { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; }
.sea-sound-settings input { width: 100%; min-height: 44px; accent-color: var(--sea-blue); cursor: pointer; }
#sea-app:is([data-atmosphere="day"], [data-atmosphere="sunset"]) .sea-zone-line { color: var(--sea-ink); text-shadow: 0 1px 7px #fffefacc; }
#sea-app:is([data-atmosphere="day"], [data-atmosphere="sunset"]) .sea-location-dot { border-color: var(--sea-blue); box-shadow: 0 0 0 3px #fffefa80; }
#sea-app:is([data-atmosphere="day"], [data-atmosphere="sunset"]) .sea-destination-nav button { border-color: #fffefa80; background: var(--sea-glass-inner); color: var(--sea-ink); }
#sea-app:is([data-atmosphere="day"], [data-atmosphere="sunset"]) .sea-destination-nav button:hover:enabled { background: var(--sea-surface); }
#sea-app:is([data-atmosphere="day"], [data-atmosphere="sunset"]) .sea-destination-nav button[aria-current="location"] { border-color: #1755e852; background: var(--sea-soft); color: var(--sea-blue); }
#sea-app:is([data-atmosphere="day"], [data-atmosphere="sunset"]) .sea-destination-nav button:focus-visible { outline-color: var(--sea-blue); }

.sea-walk-wrap { position: absolute; bottom: calc(16px + env(safe-area-inset-bottom)); left: max(12px, env(safe-area-inset-left)); width: 162px; text-align: center; }
.sea-direction-pad { display: grid; grid-template-columns: repeat(3, 50px); grid-template-rows: repeat(3, 50px); gap: 6px; width: 162px; height: 162px; }
.sea-direction-pad button { display: grid; place-items: center; min-width: 50px; min-height: 50px; padding: 0; border: 1px solid var(--sea-glass-dark-edge); border-radius: 17px; background: var(--sea-glass-dark); color: var(--sea-night-text); box-shadow: var(--sea-glass-dark-shadow); font-size: 27px; font-weight: 400; line-height: 1; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.sea-direction-pad button[data-dir="up"] { grid-column: 2; grid-row: 1; }
.sea-direction-pad button[data-dir="left"] { grid-column: 1; grid-row: 2; }
.sea-direction-pad button[data-dir="right"] { grid-column: 3; grid-row: 2; }
.sea-direction-pad button[data-dir="down"] { grid-column: 2; grid-row: 3; }
.sea-direction-pad button:hover:enabled { background: #2b3f56f0; border-color: #d6e4ff8c; }
.sea-direction-pad button:active:enabled, .sea-direction-pad button.is-pressed, .sea-direction-pad button[aria-pressed="true"] { background: var(--sea-surface); border-color: var(--sea-surface); color: var(--sea-blue); box-shadow: 0 2px 12px #0612251f, inset 0 1px 0 #fffefa; }
.sea-direction-pad button:focus-visible { outline-color: #c4d4ff; }
.sea-pad-center { display: grid; place-items: center; grid-column: 2; grid-row: 2; color: #e5ebf3; font-size: 11px; line-height: 1; text-shadow: 0 1px 6px #10243b; }
.sea-direction-pad .sea-run-button { align-content: center; gap: 3px; border-color: transparent; background: var(--sea-glass-dark); font-size: 12px; font-weight: 600; line-height: 1.2; text-shadow: none; touch-action: manipulation; }
.sea-run-mode { font-size: 11px; font-weight: 400; }
.sea-direction-pad .sea-run-button:disabled { opacity: .55; }
.sea-direction-pad .sea-run-button[aria-pressed="true"] { border-color: var(--sea-glass-edge); background: var(--sea-blue); color: var(--sea-surface); box-shadow: var(--sea-glass-dark-shadow); }
.sea-direction-pad .sea-run-button[aria-pressed="true"]:hover:enabled { background: var(--sea-blue-hover); }
#sea-walk-hint { margin-top: 12px; color: #e5ebf3; font-size: 11px; line-height: 1.6; text-shadow: 0 1px 5px #10243b; word-break: keep-all; }

.sea-context-wrap { position: absolute; right: max(12px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); width: min(196px, calc(100% - 198px)); }
.sea-scene-tools { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-bottom: 10px; }
.sea-camera-button, .sea-help-button, .sea-jump-button, .sea-emote-button, .sea-chat-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 9px 11px; border: 1px solid var(--sea-glass-dark-edge); border-radius: 15px; background: var(--sea-glass-dark); box-shadow: var(--sea-glass-dark-shadow); color: var(--sea-night-text); font-size: 11px; line-height: 1.4; }
.sea-scene-tools { flex-wrap: wrap; }
.sea-emote-wrap { display: contents; }
.sea-emote-button { flex-shrink: 0; gap: 4px; padding-inline: 8px; }
.sea-emote-button .sea-icon { width: 17px; height: 17px; }
.sea-emote-button:disabled { opacity: .55; }
.sea-emote-button[aria-expanded="true"] { background: var(--sea-surface); color: var(--sea-blue); border-color: var(--sea-glass-edge); }
.sea-emote-button:hover:enabled { background: #2b3f56f0; border-color: #d6e4ff8c; }
.sea-emote-button[aria-expanded="true"]:hover:enabled { background: var(--sea-surface); }
.sea-emote-button:focus-visible { outline-color: #c4d4ff; }
.sea-chat-wrap { display: contents; }
.sea-chat-button { flex-shrink: 0; }
.sea-chat-button .sea-icon { width: 17px; height: 17px; }
.sea-chat-button:disabled { opacity: .55; }
.sea-chat-button:hover:enabled { background: #2b3f56f0; border-color: #d6e4ff8c; }
.sea-chat-button[aria-expanded="true"], .sea-chat-button[aria-expanded="true"]:hover:enabled { background: var(--sea-surface); color: var(--sea-blue); border-color: var(--sea-glass-edge); }
.sea-chat-button:focus-visible { outline-color: #c4d4ff; }
.sea-chat-option { justify-content: flex-start; }
.sea-emote-popover { position: absolute; z-index: 25; right: 0; bottom: calc(100% + 10px); width: min(272px, calc(100vw - 32px)); max-height: min(440px, calc(100dvh - 240px)); padding: 12px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--sea-glass-edge); border-radius: 22px; background: var(--sea-glass-sheet); color: var(--sea-ink); box-shadow: var(--sea-glass-shadow); pointer-events: auto; -webkit-backdrop-filter: var(--sea-frost); backdrop-filter: var(--sea-frost); }
.sea-emote-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.sea-emote-heading h2 { padding-left: 8px; font-size: 15px; font-weight: 600; }
.sea-emote-close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--sea-muted); }
.sea-emote-close:hover { background: var(--sea-soft); color: var(--sea-ink); }
.sea-emote-close .sea-icon { width: 18px; height: 18px; }
.sea-emote-options { display: grid; gap: 3px; }
.sea-emote-option { display: flex; align-items: center; gap: 12px; min-height: 44px; width: 100%; padding: 10px 12px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--sea-ink); font-size: 14px; line-height: 1.45; text-align: left; }
.sea-emote-option .sea-icon { width: 20px; height: 20px; color: var(--sea-muted); }
.sea-emote-option:hover:enabled, .sea-emote-option[aria-pressed="true"] { background: var(--sea-soft); color: var(--sea-blue); }
.sea-emote-option[aria-pressed="true"] { border-color: #1755e829; }
.sea-emote-option[aria-pressed="true"] .sea-icon { color: var(--sea-blue); }
.sea-emote-option:disabled { opacity: .45; }
.sea-emote-option kbd { display: none; margin-left: auto; color: var(--sea-muted); font: inherit; font-size: 12px; }
.sea-emote-status { margin: 10px 8px 4px; color: var(--sea-muted); font-size: 12px; line-height: 1.6; word-break: keep-all; }
.sea-emote-current { width: fit-content; max-width: 100%; margin: 0 0 8px auto; padding: 5px 10px; border: 1px solid var(--sea-glass-dark-edge); border-radius: 10px; background: var(--sea-glass-dark); color: var(--sea-night-text); font-size: 12px; line-height: 1.5; word-break: keep-all; -webkit-backdrop-filter: var(--sea-frost); backdrop-filter: var(--sea-frost); }
.sea-star-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 9px 13px; border: 1px solid #cbdcff55; border-radius: 15px; background: var(--sea-glass-dark); box-shadow: var(--sea-glass-dark-shadow); color: #fff3cf; font-size: 12px; -webkit-backdrop-filter: var(--sea-frost); backdrop-filter: var(--sea-frost); }
.sea-star-button:disabled { opacity: .5; }
.sea-star-button:hover:enabled { background: #294260; }
.sea-star-button .sea-icon { width: 17px; height: 17px; }
.sea-camera-wrap { display: contents; }
.sea-camera-popover { position: absolute; z-index: 27; right: 0; bottom: calc(100% + 10px); width: min(288px, calc(100vw - 32px)); max-height: calc(100dvh - 180px); overflow-y: auto; padding: 12px; border: 1px solid var(--sea-glass-edge); border-radius: 22px; background: var(--sea-glass-sheet); color: var(--sea-ink); box-shadow: var(--sea-glass-shadow); pointer-events: auto; -webkit-backdrop-filter: var(--sea-frost); backdrop-filter: var(--sea-frost); }
.sea-camera-presets { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin: 8px 0 12px; }
.sea-camera-presets button, .sea-camera-adjust button, .sea-camera-reset { min-height: 44px; padding: 8px; border: 1px solid var(--sea-line); border-radius: 12px; background: var(--sea-glass-inner); color: var(--sea-ink); font-size: 13px; }
.sea-camera-presets button:hover, .sea-camera-adjust button:hover, .sea-camera-reset:hover { background: var(--sea-soft); color: var(--sea-blue); }
.sea-camera-adjust { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; }
.sea-camera-adjust button { font-size: 20px; }
.sea-camera-reset { width: 100%; margin-top: 12px; }
.sea-camera-park { border-color: #c3954c66; background: #edcb811c; color: var(--sea-blue); }
.sea-camera-popover p { padding: 10px 4px 2px; color: var(--sea-muted); font-size: 12px; line-height: 1.6; word-break: keep-all; }
#sea-camera-menu-button[aria-expanded="true"] { background: var(--sea-surface); color: var(--sea-blue); }
.sea-sky-view { position: absolute; inset: 0; color: #eef1f7; pointer-events: none; }
.sea-sky-heading { position: absolute; top: calc(24px + env(safe-area-inset-top)); left: max(24px,env(safe-area-inset-left)); text-shadow: 0 2px 15px #07152e; }
.sea-sky-heading > span { font-size: 11px; letter-spacing: .08em; color: #d4dfef; }
.sea-sky-heading h2 { margin-top: 5px; font-size: clamp(21px,3vw,28px); font-weight: 500; letter-spacing: -.04em; }
.sea-sky-exit { position: absolute; top: calc(24px + env(safe-area-inset-top)); right: max(24px,env(safe-area-inset-right)); display: inline-flex; align-items: center; gap: 15px; min-height: 44px; padding: 10px 16px; border: 1px solid #e0eaff40; border-radius: 16px; background: #152841ba; color: #f4f4ef; font-size: 13px; -webkit-backdrop-filter: var(--sea-frost); backdrop-filter: var(--sea-frost); }
.sea-sky-exit span { font-size: 20px; }
.sea-sky-footer { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom)); left: 24px; right: 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 13px; text-align: center; text-shadow: 0 2px 12px #08132c; }
.sea-sky-footer > span { font-size: 11px; color: #bac9df; }
.sea-sky-footer div { display: flex; gap: 8px; }
.sea-sky-footer button { width: 44px; height: 44px; border: 1px solid #e0eaff35; border-radius: 50%; background: #1528419c; color: #f4f4ef; font-size: 21px; -webkit-backdrop-filter: var(--sea-frost); backdrop-filter: var(--sea-frost); }
#sea-app[data-stargazing="true"] :is(.sea-header,.sea-scene-top,.sea-walk-wrap,.sea-context-wrap,#sea-walk-hint) { display: none; }

.sea-camera-button .sea-icon { width: 16px; height: 16px; }
.sea-jump-button { flex-shrink: 0; }
.sea-jump-button .sea-icon { width: 17px; height: 17px; }
.sea-jump-button:disabled { opacity: .55; }
.sea-help-button { flex-shrink: 0; min-width: 44px; font-size: 19px; font-weight: 500; }
.sea-camera-button:hover:enabled, .sea-help-button:hover:enabled, .sea-jump-button:hover:enabled { background: #2b3f56f0; border-color: #d6e4ff8c; }
.sea-camera-button:focus-visible, .sea-help-button:focus-visible, .sea-jump-button:focus-visible { outline-color: #c4d4ff; }
.sea-context-panel { padding: 12px; border: 1px solid var(--sea-glass-dark-edge); border-radius: 20px; background: var(--sea-glass-dark); color: var(--sea-night-text); box-shadow: var(--sea-glass-dark-shadow); }
#sea-context-caption { margin-bottom: 10px; font-size: 13px; font-weight: 500; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
.sea-context-guide { margin: -4px 0 10px; color: #e2ebf4; font-size: 11px; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
.sea-compose-guide { margin-bottom: 12px; color: var(--sea-ink); font-size: 14px; line-height: 1.7; word-break: keep-all; }
#sea-context-button { width: 100%; padding-inline: 9px; font-size: 12px; }

.sea-primary, .sea-secondary, .sea-danger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; max-width: 100%; padding: 11px 18px; border: 1px solid var(--sea-blue); border-radius: 14px; background: var(--sea-blue); color: var(--sea-surface); font-size: 14px; font-weight: 600; line-height: 1.55; text-align: center; text-decoration: none; word-break: keep-all; }
.sea-primary { box-shadow: 0 3px 10px #1755e824, inset 0 1px 0 #fffefa24; }
.sea-primary:hover:enabled { background: var(--sea-blue-hover); border-color: var(--sea-blue-hover); }
.sea-primary:active:enabled { background: #0d369d; border-color: #0d369d; }
.sea-primary:disabled, .sea-primary[aria-disabled="true"] { background: #e5e8ea; border-color: #d9dfe4; color: #69747f; box-shadow: none; }
.sea-secondary { border-color: #8999ad4d; background: var(--sea-glass-inner); color: var(--sea-ink); box-shadow: inset 0 1px 0 #fffefa80; }
.sea-secondary:hover:enabled { background: var(--sea-soft); border-color: #b7c5db; }
.sea-secondary:active:enabled { background: #e1e8f5; }
.sea-secondary:disabled, .sea-danger:disabled { opacity: .5; }
.sea-text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 2px; border: 0; border-radius: 4px; background: transparent; color: var(--sea-blue); font-size: 14px; font-weight: 600; line-height: 1.5; text-decoration: underline; text-underline-offset: 4px; }
.sea-text-button:hover:enabled { color: var(--sea-blue-hover); }
.sea-text-button:disabled { color: var(--sea-muted); opacity: .6; text-decoration: none; }
.sea-danger { border-color: #ddbbb6; background: transparent; color: var(--sea-danger); }
.sea-danger:hover:enabled { border-color: var(--sea-danger); background: #faeeea; }
.sea-danger:active:enabled { background: #f5dfd8; }

#sea-loading { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; background: var(--sea-paper); color: var(--sea-ink); }
.sea-loading-inner { max-width: 360px; text-align: center; }
.sea-loading-brand { justify-content: center; }
.sea-loading-brand > img { width: 40px; height: 40px; border-radius: 11px; }
.sea-loading-mark { display: flex; justify-content: center; gap: 6px; margin: 36px 0 24px; }
.sea-loading-mark span { width: 6px; height: 6px; border-radius: 50%; background: var(--sea-blue); animation: sea-loading-pulse 1.1s var(--sea-ease) infinite; }
.sea-loading-mark span:nth-child(2) { animation-delay: .15s; }
.sea-loading-mark span:nth-child(3) { animation-delay: .3s; }
#sea-load-text { font-size: 21px; font-weight: 600; line-height: 1.5; }
#sea-load-detail { margin-top: 10px; color: var(--sea-muted); font-size: 14px; line-height: 1.8; word-break: keep-all; }
@keyframes sea-loading-pulse { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

#sea-sheet-cover { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; }
.sea-sheet-scrim { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: var(--sea-scrim); cursor: default; }
.sea-sheet { position: relative; display: flex; flex-direction: column; width: min(100%, 480px); max-height: min(760px, calc(100dvh - 48px)); overflow: hidden; border: 1px solid var(--sea-glass-edge); border-radius: 28px; background: var(--sea-glass-sheet); color: var(--sea-ink); box-shadow: 0 28px 90px #04102057, 0 8px 24px #04102026, inset 0 1px 0 #fffefab3; animation: sea-sheet-enter .2s var(--sea-ease) both; }
.sea-sheet:focus { outline: none; }
.sea-sheet:focus-visible { outline: 3px solid var(--sea-blue); outline-offset: 4px; }
.sea-sheet-header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 16px; padding: 20px 20px 16px 24px; }
.sea-sheet-header h2 { min-width: 0; margin: 0; font-size: 22px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.sea-sheet-close { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border: 1px solid #8999ad33; border-radius: 50%; background: var(--sea-glass-inner); box-shadow: inset 0 1px 0 #fffefa99; color: var(--sea-muted); }
.sea-sheet-close:hover:enabled { background: var(--sea-soft); color: var(--sea-ink); }
#sea-sheet-body { min-height: 0; padding: 0 24px 24px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #b9c2ce transparent; }
#sea-sheet-body:empty { min-height: 100px; }
.sea-sheet-footer { flex-shrink: 0; padding: 14px 24px max(20px, env(safe-area-inset-bottom)); border-top: 1px solid #17233312; background: var(--sea-glass-inner); }
.sea-sheet-footer > button { width: 100%; }
.sea-sheet:has(.sea-sheet-footer:not([hidden])) #sea-sheet-body { padding-bottom: 16px; }
#sea-sheet-body > :last-child { margin-bottom: 0; }
#sea-sheet-body > .sea-primary, #sea-sheet-body > .sea-secondary, #sea-sheet-body > .sea-danger { width: 100%; margin-top: 10px; }
#sea-sheet-body > .sea-input { margin-bottom: 20px; }
#sea-sheet-body form { display: grid; gap: 16px; margin: 0; }
#sea-sheet-body fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
#sea-sheet-body legend { margin-bottom: 10px; padding: 0; }
#sea-sheet-body ul, #sea-sheet-body ol { margin: 0 0 20px; padding-left: 22px; }
#sea-sheet-body li + li { margin-top: 8px; }
@keyframes sea-sheet-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.sea-copy { margin: 0 0 20px; color: var(--sea-muted); font-size: 14px; line-height: 1.85; word-break: keep-all; overflow-wrap: anywhere; }
.sea-mining-info-step { margin-bottom: 12px; color: var(--sea-blue); font-size: 12px; font-weight: 600; line-height: 1.6; }
.sea-mining-info-summary { margin-bottom: 16px; color: var(--sea-ink); font-size: 17px; font-weight: 500; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
.sea-mining-info-nav { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; margin-bottom: 12px; }
.sea-mining-info-nav button { min-height: 44px; }
.sea-mining-info-count { color: var(--sea-muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sea-label { display: block; margin-bottom: 8px; color: var(--sea-ink); font-size: 14px; font-weight: 600; line-height: 1.6; }
.sea-label > span { color: var(--sea-muted); font-weight: 400; }
.sea-input, .sea-textarea { display: block; width: 100%; min-width: 0; min-height: 48px; margin: 0; padding: 12px 13px; border: 1px solid #8999ad66; border-radius: 14px; background: var(--sea-glass-inner); box-shadow: inset 0 1px 2px #17233306, 0 1px 0 #fffefa80; color: var(--sea-ink); font-size: 16px; line-height: 1.65; caret-color: var(--sea-blue); }
.sea-input::placeholder, .sea-textarea::placeholder { opacity: 1; color: #66717d; }
.sea-input:focus, .sea-textarea:focus { border-color: var(--sea-blue); }
.sea-input:focus-visible, .sea-textarea:focus-visible { border-color: transparent; outline-width: 2px; outline-offset: 2px; }
.sea-input[aria-invalid="true"], .sea-textarea[aria-invalid="true"] { border-color: var(--sea-danger); }
.sea-input:disabled, .sea-textarea:disabled { background: var(--sea-soft); color: var(--sea-muted); }
.sea-textarea { min-height: 160px; max-height: 40dvh; resize: vertical; }
.sea-counter { display: block; margin-top: 6px; color: var(--sea-muted); font-size: 12px; line-height: 1.5; text-align: right; font-variant-numeric: tabular-nums; }
.sea-note, .sea-storage-note { margin: 12px 0 20px; color: var(--sea-muted); font-size: 12px; line-height: 1.8; word-break: keep-all; overflow-wrap: anywhere; }
.sea-storage-note { padding: 12px 14px; border: 1px solid #8999ad26; border-radius: 14px; background: var(--sea-glass-muted); }
.sea-menu-item.sea-place-choice { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; gap: 3px; }
.sea-place-description { display: block; margin-top: 3px; color: var(--sea-muted); font-size: 11px; font-weight: 400; line-height: 1.6; }
.sea-friend-objective { margin: 0 0 20px; padding: 14px 16px; border: 1px solid #1755e824; border-radius: 16px; background: #1755e808; }
.sea-friend-objective h3 { margin: 0; font-size: 14px; font-weight: 600; }
.sea-friend-objective .sea-note { margin: 6px 0 0; }
.sea-friend-objective[data-complete="true"] { border-color: #368a6940; background: #438e7010; }
.sea-quality-options { display: grid; gap: 10px; }
.sea-quality-choice { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 12px 14px; border: 1px solid #8999ad33; border-radius: 14px; cursor: pointer; }
.sea-quality-choice:has(:checked) { border-color: #1755e8; background: #1755e80a; }
.sea-quality-choice input { flex: 0 0 18px; width: 18px; height: 18px; margin: 0; accent-color: var(--sea-blue); }
.sea-quality-choice strong { font-size: 14px; font-weight: 600; }
.sea-quality-report { display: block; margin: 18px 0 0; font-size: 12px; line-height: 1.8; color: var(--sea-muted); font-variant-numeric: tabular-nums; }
.sea-recovery-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.sea-settings-divider { margin: 24px 0; border: 0; border-top: 1px solid #8999ad33; }
.sea-report-reasons { display: grid; gap: 8px; }
.sea-report-choice { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 12px; border: 1px solid #8999ad33; border-radius: 12px; font-size: 14px; }
.sea-report-choice:has(:checked) { border-color: var(--sea-blue); background: #1755e809; }
.sea-report-choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--sea-blue); }
.sea-error { margin: 8px 0 0; color: var(--sea-danger); font-size: 13px; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
.sea-confirm { display: grid; gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--sea-line); }
.sea-confirm > p { color: var(--sea-muted); font-size: 14px; line-height: 1.8; }
.sea-row-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.sea-row-actions > .sea-primary, .sea-row-actions > .sea-secondary, .sea-row-actions > .sea-danger { flex: 1 1 120px; }

.sea-list { display: grid; gap: 0; margin: 0 0 20px; padding: 0; list-style: none; border-top: 1px solid var(--sea-line); }
.sea-list .sea-boat-row { margin: 0; }
.sea-boat-row { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 18px 0; border: 0; border-bottom: 1px solid var(--sea-line); background: transparent; color: var(--sea-ink); text-align: left; text-decoration: none; }
button.sea-boat-row:hover:enabled, a.sea-boat-row:hover { color: var(--sea-blue); }
.sea-boat-row > div { min-width: 0; flex: 1; }
.sea-swatch { position: relative; display: inline-block; flex-shrink: 0; width: 36px; height: 36px; border: 1px solid #17233326; border-radius: 9px; background: var(--boat-color, #91b3ff); }
.sea-swatch::after { content: ''; position: absolute; inset: 11px 8px 9px; border: 1px solid #17233366; clip-path: polygon(0 0, 100% 0, 74% 100%, 26% 100%); background: #fffefa80; }
.sea-boat-title { display: block; margin: 0 0 4px; font-size: 14px; font-weight: 600; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; }
.sea-boat-meta { display: block; color: var(--sea-muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.sea-own-tag { display: inline-flex; align-items: center; flex-shrink: 0; gap: 4px; margin-left: 5px; padding: 2px 7px; border: 1px solid #cbd8f9; border-radius: 4px; background: var(--sea-soft); color: var(--sea-blue); font-size: 11px; font-weight: 600; line-height: 1.6; vertical-align: 1px; }
.sea-empty { padding: 28px 12px; margin-bottom: 20px; border-block: 1px solid var(--sea-line); text-align: center; color: var(--sea-muted); font-size: 14px; line-height: 1.85; word-break: keep-all; }
.sea-empty strong { display: block; margin-bottom: 8px; color: var(--sea-ink); font-size: 16px; font-weight: 600; }
.sea-letter { padding: 20px; margin: 16px 0 20px; border: 1px solid #8999ad33; border-radius: 18px; background: var(--sea-glass-inner); box-shadow: inset 0 1px 0 #fffefab3; color: var(--sea-ink); font-size: 16px; line-height: 2; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.sea-detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; color: var(--sea-muted); font-size: 12px; line-height: 1.7; }
.sea-detail-meta .sea-swatch { width: 24px; height: 24px; border-radius: 6px; }
.sea-detail-meta .sea-swatch::after { inset: 7px 5px 6px; }

.sea-profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.sea-player-identity { display: flex; align-items: center; gap: 20px; padding: 4px 0 12px; }
.sea-player-preview { flex-shrink: 0; width: 100px; height: 112px; object-fit: contain; }
.sea-player-detail { min-width: 0; }
.sea-player-name { margin: 0 0 8px; font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.sea-player-meta, .sea-player-marker { color: var(--sea-muted); font-size: 13px; line-height: 1.7; }
.sea-player-marker { display: flex; align-items: center; gap: 7px; margin-top: 12px; }
.sea-player-marker .sea-swatch { width: 16px; height: 16px; border-radius: 50%; }
.sea-player-marker .sea-swatch::after { content: none; }
.sea-badge-emoji { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 24px; font-size: 22px; line-height: 1; }
.sea-badge-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px !important; }
.sea-badge-options > legend { grid-column: 1 / -1; }
.sea-badge-options .sea-choice { min-height: 74px; gap: 7px; padding: 12px 8px; font-size: 13px; }
.sea-badge-options .sea-choice:has(> input:checked)::after { top: 5px; right: 5px; width: 16px; height: 16px; font-size: 10px; }
.sea-profile-grid > legend { grid-column: 1 / -1; }
.sea-choice { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-width: 0; min-height: 98px; padding: 16px 12px; border: 1px solid #8999ad40; border-radius: 16px; background: var(--sea-glass-inner); box-shadow: inset 0 1px 0 #fffefa99; color: var(--sea-ink); font-size: 14px; font-weight: 600; line-height: 1.6; text-align: center; cursor: pointer; }
.sea-choice > input[type="radio"] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.sea-choice:has(> input:focus-visible) { outline: 3px solid var(--sea-blue); outline-offset: 4px; }
.sea-choice:hover:enabled, label.sea-choice:hover:not(:has(> input:disabled)) { border-color: #a9bde9; background: var(--sea-soft); }
.sea-choice.is-selected, .sea-choice[aria-checked="true"], .sea-choice[aria-pressed="true"], .sea-choice:has(> input:checked) { border-color: var(--sea-blue); background: var(--sea-soft); box-shadow: inset 0 0 0 1px var(--sea-blue); color: var(--sea-blue); }
.sea-choice.is-selected::after, .sea-choice[aria-checked="true"]::after, .sea-choice[aria-pressed="true"]::after, .sea-choice:has(> input:checked)::after { content: '✓'; position: absolute; top: 8px; right: 9px; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--sea-blue); color: var(--sea-surface); font-size: 12px; line-height: 1; }
.sea-choice img { display: block; max-width: 100%; max-height: 116px; object-fit: contain; }
.sea-profile-grid .sea-avatar-preview { display: block; width: min(100%, 120px); height: 128px; max-height: none; margin-inline: auto; object-fit: contain; }
.sea-profile-grid .sea-avatar-preview > img, .sea-profile-grid .sea-avatar-preview > canvas { display: block; width: 100%; height: 100%; max-height: none; object-fit: contain; }
.sea-profile-grid .sea-choice:has(.sea-avatar-preview) { gap: 10px; min-height: 186px; padding: 14px 10px 12px; }
.sea-choice small { color: var(--sea-muted); font-size: 12px; font-weight: 400; }
.sea-color-options { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 4px 0; }
#sea-sheet-body .sea-profile-grid, #sea-sheet-body .sea-color-options { margin: 0 0 20px; }
.sea-color-options > .sea-choice { flex: 1 1 calc(50% - 10px); flex-direction: row; justify-content: flex-start; min-height: 48px; padding: 10px 12px; font-size: 13px; text-align: left; }
.sea-color-options > .sea-choice > span:last-child { white-space: nowrap; }
.sea-color-options > .sea-choice:has(> input:checked) { padding-right: 34px; }
.sea-color-options > .sea-choice:has(> input:checked)::after { top: 50%; right: 8px; width: 16px; height: 16px; font-size: 10px; transform: translateY(-50%); }
.sea-color-options > .sea-choice:has(> input[name="sea-greeting"]) { flex-basis: 100%; padding: 14px 34px 14px 14px; font-size: 14px; line-height: 1.7; }
.sea-color-options > .sea-choice .sea-swatch { width: 24px; height: 24px; }
.sea-color-options > .sea-choice:hover { border-color: #a9bde9; }
.sea-color-options button { position: relative; display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 5px; border: 1px solid #bfc7cd; border-radius: 50%; background: var(--boat-color, var(--sea-soft)); color: var(--sea-ink); }
.sea-color-options button[aria-pressed="true"], .sea-color-options button[aria-checked="true"], .sea-color-options button.is-selected { border-color: var(--sea-blue); box-shadow: 0 0 0 2px var(--sea-surface), 0 0 0 4px var(--sea-blue); }
.sea-color-options button[aria-pressed="true"]::after, .sea-color-options button[aria-checked="true"]::after, .sea-color-options button.is-selected::after { content: '✓'; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--sea-surface); color: var(--sea-blue); font-size: 13px; font-weight: 700; }
.sea-color-options .sea-swatch { width: 30px; height: 30px; border-radius: 50%; border: 0; }
.sea-color-options .sea-swatch::after { content: none; }
.sea-invite-card { margin-bottom: 20px; padding: 20px; border: 1px solid #fffefa99; border-radius: 20px; background: var(--sea-glass-inner); box-shadow: inset 0 1px 0 #fffefab3; }
.sea-invite-brand { margin-bottom: 14px; }
.sea-invite-card h3 { margin-bottom: 10px; font-size: 18px; font-weight: 600; line-height: 1.5; }
.sea-invite-card p { color: var(--sea-muted); font-size: 14px; line-height: 1.85; word-break: keep-all; }
.sea-readonly-link { display: block; width: 100%; min-width: 0; margin: 14px 0 0; padding: 12px; border: 1px solid #8999ad4d; border-radius: 12px; background: var(--sea-glass-inner); color: var(--sea-ink); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; user-select: all; }
input.sea-readonly-link { font-size: 16px; }

#sea-notice { position: absolute; z-index: 80; top: calc(var(--sea-header-height) + env(safe-area-inset-top) + 20px); left: 50%; width: max-content; max-width: min(420px, calc(100% - 32px)); margin: 0; padding: 12px 18px; border: 1px solid var(--sea-glass-edge); border-radius: 18px; background: var(--sea-glass-sheet); color: var(--sea-ink); box-shadow: var(--sea-glass-shadow); font-size: 14px; line-height: 1.7; text-align: center; word-break: keep-all; overflow-wrap: anywhere; transform: translateX(-50%); pointer-events: none; }
.sea-noscript { position: fixed; z-index: 100; inset: 0; display: grid; align-content: center; justify-items: center; gap: 16px; padding: 28px; background: var(--sea-paper); color: var(--sea-ink); text-align: center; }
.sea-noscript a { color: var(--sea-blue); text-underline-offset: 4px; }

@media (min-width: 600px) {
  :root { --sea-header-height: 76px; }
  .sea-header { gap: 24px; padding-inline: max(24px, env(safe-area-inset-left)) max(24px, env(safe-area-inset-right)); }
  .sea-brand { gap: 10px; }
  .sea-brand img { width: 32px; height: 32px; }
  .sea-brand h1 { font-size: 18px; }
  .sea-header-actions { gap: 4px; }
  .sea-header-button { padding: 9px 12px; font-size: 13px; }
  #sea-self-name { max-width: 100px; }
  .sea-button-label { display: inline; }
  .sea-scene-top { top: calc(var(--sea-header-height) + env(safe-area-inset-top) + 24px); left: max(28px, env(safe-area-inset-left)); right: max(28px, env(safe-area-inset-right)); }
  .sea-place-stack { gap: 6px; }
  .sea-zone-line { font-size: 16px; }
  .sea-destination-nav button { min-width: 72px; padding-inline: 16px; font-size: 13px; }
  .sea-room-pill { max-width: 240px; padding: 8px 12px; gap: 8px; font-size: 12px; }
  .sea-walk-wrap { bottom: calc(28px + env(safe-area-inset-bottom)); left: max(28px, env(safe-area-inset-left)); }
  .sea-context-wrap { bottom: calc(28px + env(safe-area-inset-bottom)); right: max(28px, env(safe-area-inset-right)); width: 250px; }
  .sea-context-panel { padding: 14px; }
  #sea-context-caption { font-size: 14px; margin-bottom: 12px; }
  #sea-context-button { font-size: 14px; }
  .sea-camera-button { padding-inline: 13px; font-size: 12px; }
}

@media (min-width: 600px) and (max-width: 820px) {
  .sea-brand { gap: 8px; }
  .sea-brand h1 { font-size: 16px; }
  .sea-brand img { width: 30px; height: 30px; }
  .sea-header-button { gap: 5px; padding-inline: 8px; font-size: 12px; }
  .sea-button-label { display: none; }
  #sea-self-name { max-width: 68px; }
}

@media (max-width: 599px) {
  #sea-sheet-cover { align-items: end; padding: calc(16px + env(safe-area-inset-top)) 0 0; }
  .sea-sheet { width: 100%; max-height: min(86dvh, 760px); border-inline: 0; border-bottom: 0; border-radius: 28px 28px 0 0; }
  .sea-sheet-header { padding: 18px 16px 14px 20px; }
  .sea-sheet-header h2 { font-size: 21px; }
  #sea-sheet-body { padding: 0 20px max(24px, env(safe-area-inset-bottom)); }
  .sea-textarea { min-height: 144px; max-height: 32dvh; }
  .sea-letter { padding: 16px; }
}

@media (max-width: 359px) {
  .sea-color-options > .sea-choice { gap: 6px; padding-inline: 8px; font-size: 12px; }
  .sea-color-options > .sea-choice:has(> input:checked) { padding-right: 26px; }
  .sea-color-options > .sea-choice:has(> input:checked)::after { right: 6px; width: 14px; height: 14px; }
  .sea-color-options > .sea-choice .sea-swatch { width: 20px; height: 20px; flex-shrink: 0; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .sea-sheet { max-height: calc(100dvh - 24px); }
  .sea-sheet-header { padding-top: 12px; padding-bottom: 10px; }
  .sea-textarea { min-height: 100px; }
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root {
    --sea-glass-light: rgb(248 247 243 / .70);
    --sea-glass-context: rgb(248 250 246 / .80);
    --sea-glass-sheet: rgb(248 250 246 / .90);
    --sea-glass-dark: rgb(19 36 57 / .66);
    --sea-glass-inner: rgb(255 254 250 / .64);
    --sea-glass-muted: rgb(237 241 248 / .72);
    --sea-frost: blur(20px) saturate(125%);
    --sea-scrim: rgb(5 14 27 / .43);
  }
}

@media (min-width: 600px) and (hover: hover) and (pointer: fine) {
  .sea-emote-option kbd { display: inline; }
  .sea-direction-pad { display: none; }
  .sea-walk-wrap { width: auto; max-width: calc(100% - 340px); text-align: left; }
  #sea-walk-hint { margin: 0; padding: 10px 14px; border: 1px solid var(--sea-glass-dark-edge); border-radius: 14px; background: var(--sea-glass-dark); color: var(--sea-night-text); font-size: 12px; line-height: 2; text-shadow: none; -webkit-backdrop-filter: var(--sea-frost); backdrop-filter: var(--sea-frost); }
  #sea-walk-hint kbd { display: inline-block; min-width: 22px; margin-inline: 2px; padding: 0 5px; border: 1px solid #d6e4ff40; border-radius: 5px; background: #d6e4ff12; color: var(--sea-night-text); font: inherit; line-height: 1.7; text-align: center; }
}

@media (max-width: 599px) {
  .sea-profile-grid .sea-avatar-preview { height: 112px; }
  .sea-profile-grid .sea-choice:has(.sea-avatar-preview) { min-height: 170px; }
  #sea-walk-hint[data-controls="keyboard"] { display: none; }
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --sea-glass-light: #f8f7f3;
    --sea-glass-context: #f8f7f3;
    --sea-glass-sheet: #fffefa;
    --sea-glass-dark: #1b2e46;
    --sea-glass-inner: #fffefa;
    --sea-glass-muted: #edf1f8;
    --sea-frost: none;
    --sea-scrim: #081321a8;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
  .sea-loading-mark span { opacity: .7; }
}

/* A location action keeps the park overview discoverable on touch screens. */
#sea-app[data-mining-overview="true"] .sea-context-panel,
#sea-app[data-mining-overview="true"]:not(:is([data-mining="starting"],[data-mining="active"],[data-mining="finishing"])) .sea-place-stack .sea-mining-card { display: none; }
.sea-mine-view { min-height:44px; min-width:72px; padding:0 9px; border:1px solid var(--sea-glass-edge); border-radius:12px; background:var(--sea-glass-light); color:var(--sea-blue); font-family:inherit; font-size:11px; font-weight:600; line-height:1.4; text-shadow:none; }



/* Touch HUD: the world stays visible; destinations and settings open only on request. */
.sea-mobile-only, .sea-joystick, #sea-run-button { display: none; }
.sea-menu-label { margin: 22px 0 10px; color: var(--sea-muted); font-size: 12px; font-weight: 600; line-height: 1.5; letter-spacing: 0; }
.sea-menu-label:first-child { margin-top: 2px; }
.sea-menu-grid, .sea-social-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.sea-menu-scenery { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.sea-menu-item, .sea-menu-reward, .sea-menu-help { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 12px; border: 1px solid var(--sea-line); border-radius: 14px; background: var(--sea-glass-inner); color: var(--sea-ink); font-size: 14px; font-weight: 500; line-height: 1.5; word-break: keep-all; }
.sea-brand-choices { display: grid; gap: 8px; }
.sea-place-choice[aria-current="location"] { border-color: #1755e852; background: var(--sea-soft); }
.sea-menu-item[aria-pressed="true"] { border-color: var(--sea-blue); background: var(--sea-blue); color: var(--sea-surface); }
.sea-menu-item:disabled { opacity: .5; }
.sea-menu-reward { width: 100%; margin-top: 12px; border-color: #b7843c55; background: #d7b57618; color: #79501c; }
.sea-menu-help { width: 100%; margin-top: 16px; background: transparent; }

@media (max-width: 599px), (pointer: coarse), (max-width: 950px) and (max-height: 500px) and (orientation: landscape) {
  :root { --sea-header-height: 56px; }
  .sea-mobile-only { display: inline-flex; }
  .sea-header { min-height: calc(56px + env(safe-area-inset-top)); gap: 6px; padding: calc(6px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 6px max(12px,env(safe-area-inset-left)); }
  .sea-brand { min-height: 44px; padding: 6px 5px; border-radius: 15px; gap: 5px; }
  .sea-brand img { width: 24px; height: 24px; border-radius: 8px; }
  .sea-brand-copy { gap: 1px; }
  .sea-brand-parent { font-size: 10px; }
  .sea-brand h1 { display: block; font-size: 12.5px; line-height: 1.1; }
  .sea-header-actions { gap: 0; padding: 0; border-radius: 15px; }
  .sea-header-button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; gap: 2px; border-radius: 14px; }
  .sea-header-actions .sea-header-button:nth-child(2) { width: 52px; }
  .sea-self-button .sea-self-tag { width: 24px; height: 24px; font-size: 11px; }
  #sea-self-name, .sea-header-button .sea-button-label { display: none; }
  .sea-count { min-width: 9px; font-size: 11px; }
  .sea-invite-button { background: transparent; color: var(--sea-blue); }
  #sea-mobile-menu { position: relative; flex-direction: column; gap: 1px; }
  #sea-mobile-menu .sea-icon { width: 19px; height: 19px; }
  .sea-mobile-menu-label { font-size: 9px; line-height: 1.2; }
  #sea-app[data-mining-glow="true"] #sea-mobile-menu::after { content: ""; position: absolute; top: 7px; right: 7px; width: 5px; height: 5px; border-radius: 50%; background: #ba843d; }
  .sea-scene-top { top: calc(60px + env(safe-area-inset-top)); left: max(14px,env(safe-area-inset-left)); right: max(14px,env(safe-area-inset-right)); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .sea-place-stack { display: contents; }
  .sea-zone-line { min-width: 0; min-height: 28px; gap: 6px; font-size: 12px; line-height: 1.4; }
  #sea-zone { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sea-location-dot { width: 5px; height: 5px; flex-shrink: 0; }
  .sea-scene-top .sea-destination-nav, .sea-scene-settings > :not(.sea-room-pill),
  #sea-app[data-zone="mine"] #sea-skipping-entry { display: none; }
  .sea-scene-settings { display: contents; }
  .sea-room-pill { flex: 0 0 auto; justify-content: center; min-width: 44px; min-height: 44px; flex-wrap: nowrap; gap: 5px; padding: 3px 8px; border-radius: 12px; font-size: 11px; white-space: nowrap; }
  #sea-room-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  #sea-room-short-status { display: inline; }
  .sea-room-people { padding: 0; border: 0; }
  .sea-mining-card { display: none; }
  #sea-app:is([data-mining="starting"],[data-mining="active"],[data-mining="finishing"]) .sea-mining-card { display: block; position: absolute; top: 50px; left: 0; right: 0; width: auto; max-width: none; margin: 0; padding: 10px 64px 10px 12px; border-radius: 16px; }
  .sea-mining-heading { min-height: 20px; gap: 6px; padding: 0; }
  .sea-mining-heading h2 { font-size: 12px; line-height: 1.4; }
  .sea-mining-heading .sea-icon { width: 16px; height: 16px; }
  #sea-mining-progress { width: 100%; height: 4px; margin: 5px 0 0; }
  .sea-mining-reward-note, .sea-mining-explainer-long { display: none; }
  .sea-mining-explainer { display: block; margin: 4px 0 0; font-size: 10px; line-height: 1.5; color: var(--sea-muted); }
  .sea-mining-card [data-action="mining-cancel"] { position: absolute; right: 4px; top: 4px; min-width: 52px; min-height: 44px; margin: 0; padding: 8px; font-size: 12px; }
  .sea-walk-wrap { left: max(14px,env(safe-area-inset-left)); bottom: calc(14px + env(safe-area-inset-bottom)); width: 116px; height: 168px; text-align: center; }
  .sea-direction-pad { display: none; }
  .sea-joystick { --joystick-x: 0px; --joystick-y: 0px; display: block; position: absolute; left: 0; bottom: 0; width: 116px; height: 116px; border: 1px solid #f3f7ff4d; border-radius: 50%; background: #14283a45; box-shadow: inset 0 1px 0 #ffffff35,0 3px 16px #0612251a; -webkit-backdrop-filter: var(--sea-frost); backdrop-filter: var(--sea-frost); pointer-events: auto; touch-action: none; -webkit-user-select: none; user-select: none; }
  .sea-joystick-ring { position: absolute; inset: 17px; border: 1px solid #e6efff30; border-radius: 50%; pointer-events: none; }
  .sea-joystick-thumb { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; border: 1px solid #ffffff73; border-radius: 50%; background: #f0f5f3cf; box-shadow: 0 3px 10px #06122530,inset 0 1px 0 #fff; transform: translate(calc(-50% + var(--joystick-x)),calc(-50% + var(--joystick-y))); pointer-events: none; transition: background-color .16s var(--sea-ease); }
  .sea-joystick[data-active="true"] { border-color: #d4e2ffb3; background: #14283a66; }
  .sea-joystick[data-active="true"] .sea-joystick-thumb { background: #dce8ff; border-color: #fff; }
  #sea-run-button { display: inline-flex; position: absolute; left: 20px; top: 0; align-items: center; justify-content: center; gap: 6px; width: 76px; min-width: 44px; min-height: 44px; padding: 8px; border: 1px solid var(--sea-glass-dark-edge); border-radius: 22px; background: var(--sea-glass-dark); color: var(--sea-night-text); font-size: 11px; line-height: 1.3; box-shadow: var(--sea-glass-dark-shadow); -webkit-backdrop-filter: var(--sea-frost); backdrop-filter: var(--sea-frost); }
  #sea-run-button .sea-icon { width: 18px; height: 18px; }
  #sea-run-button[aria-pressed="true"] { background: var(--sea-blue); color: var(--sea-surface); border-color: #dce7ff88; }
  #sea-run-button:disabled { opacity: .5; }
  #sea-walk-hint { display: none; }
  .sea-context-wrap { right: max(14px,env(safe-area-inset-right)); bottom: calc(14px + env(safe-area-inset-bottom)); width: min(152px,calc(100% - 166px)); display: flex; flex-direction: column-reverse; gap: 10px; }
  .sea-context-wrap .sea-scene-tools { display: flex; width: auto; max-width: none; justify-content: flex-end; align-items: flex-end; flex-wrap: nowrap; gap: 10px; margin: 0; }
  .sea-scene-tools > :is(.sea-camera-wrap,.sea-chat-wrap,.sea-emote-wrap) { display: contents; }
  .sea-scene-tools :is(.sea-camera-button,.sea-emote-button,.sea-chat-button,.sea-help-button,#sea-return-camera) { display: none; }
  .sea-scene-tools .sea-jump-button { display: inline-flex; flex: 0 0 56px; width: 56px; min-width: 56px; height: 56px; min-height: 56px; padding: 10px; border-radius: 50%; }
  .sea-scene-tools .sea-jump-button span { display: none; }
  .sea-mobile-social { display: inline-flex; flex: 0 0 44px; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 44px; min-height: 48px; padding: 4px; border: 1px solid var(--sea-glass-dark-edge); border-radius: 16px; background: var(--sea-glass-dark); color: var(--sea-night-text); font-size: 10px; line-height: 1.3; box-shadow: var(--sea-glass-dark-shadow); -webkit-backdrop-filter: var(--sea-frost); backdrop-filter: var(--sea-frost); }
  .sea-mobile-social .sea-icon { width: 20px; height: 20px; }
  .sea-context-panel { display: none; width: 100%; padding: 0; border: 0; border-radius: 16px; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  #sea-app[data-context-action="true"] .sea-context-panel { display: block; }
  #sea-context-caption, #sea-dock-guidance, .sea-emote-current { display: none; }
  #sea-context-button { min-height: 48px; padding: 10px 12px; border-radius: 16px; font-size: 13px; line-height: 1.4; }
  .sea-camera-wrap { display: contents; }
  .sea-camera-popover, .sea-chat-popover, .sea-emote-popover { position: fixed; left: max(12px,env(safe-area-inset-left)); right: max(12px,env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; max-height: min(76dvh,600px); overflow-y: auto; overscroll-behavior: contain; padding: 14px; border-radius: 24px; }
  .sea-camera-popover:not([hidden]), .sea-chat-popover:not([hidden]), .sea-emote-popover:not([hidden]) { display: block; }
  #sea-app[data-panel] :is(.sea-walk-wrap,.sea-context-wrap) { visibility: hidden; }
  #sea-notice { top: calc(112px + env(safe-area-inset-top)); padding: 10px 14px; font-size: 13px; }
  #sea-sheet-cover { align-items: end; padding: calc(12px + env(safe-area-inset-top)) 0 0; }
  .sea-sheet { width: 100%; max-height: min(86dvh,760px); border-inline: 0; border-bottom: 0; border-radius: 26px 26px 0 0; }
  .sea-sheet-header { padding: 16px 14px 12px 18px; }
  .sea-sheet-header h2 { font-size: 20px; }
  #sea-sheet-body { padding: 0 18px max(20px,env(safe-area-inset-bottom)); }
  #sea-app[data-stargazing="true"] :is(.sea-header,.sea-scene-top,.sea-walk-wrap,.sea-context-wrap) { display: none; }
}
@media (max-width: 950px) and (max-height: 500px) and (orientation: landscape),
       (max-height: 500px) and (orientation: landscape) and (pointer: coarse) {
  #sea-app {
    --sea-hud-left: max(12px, env(safe-area-inset-left));
    --sea-hud-right: max(12px, env(safe-area-inset-right));
    --sea-hud-top: max(6px, env(safe-area-inset-top));
    --sea-hud-bottom: max(10px, env(safe-area-inset-bottom));
    --sea-hud-stick: clamp(86px, 27dvh, 108px);
    --sea-hud-walk-width: calc(var(--sea-hud-stick) + 52px);
  }
  .sea-header { min-height: 0; padding: var(--sea-hud-top) var(--sea-hud-right) 0 var(--sea-hud-left); }
  .sea-scene-top { top: calc(var(--sea-hud-top) + 52px); left: var(--sea-hud-left); right: var(--sea-hud-right); }
  .sea-zone-line { flex: 1 1 auto; min-width: 0; max-width: none; min-height: 44px; }
  .sea-scene-settings { display: flex; flex: 0 0 auto; flex-direction: row; align-items: center; gap: 6px; }
  #sea-star-button { display: inline-flex; min-width: 44px; padding-inline: 9px; font-size: 11px; }
  #sea-app:is([data-mining="starting"],[data-mining="active"],[data-mining="finishing"]) .sea-mining-card {
    right: auto; width: min(320px, 100%);
  }
  .sea-walk-wrap {
    left: var(--sea-hud-left); bottom: var(--sea-hud-bottom);
    width: var(--sea-hud-walk-width); max-width: none; height: var(--sea-hud-stick);
  }
  .sea-joystick { width: var(--sea-hud-stick); height: var(--sea-hud-stick); }
  #sea-run-button { left: calc(var(--sea-hud-stick) + 8px); top: auto; bottom: 0; width: 44px; padding: 8px; }
  #sea-run-label { display: none; }
  .sea-context-wrap {
    right: var(--sea-hud-right); bottom: var(--sea-hud-bottom);
    width: max-content; max-width: calc(100% - var(--sea-hud-left) - var(--sea-hud-right) - var(--sea-hud-walk-width) - 12px);
    flex-flow: row-reverse wrap; align-items: flex-end; gap: 7px;
  }
  .sea-context-panel { width: min(158px, 100%); }
  .sea-context-wrap .sea-scene-tools { max-width: 100%; flex-wrap: wrap; gap: 6px; }
  .sea-scene-tools :is(#sea-camera-menu-button, #sea-return-camera) { display: inline-flex; min-width: 44px; min-height: 48px; padding-inline: 8px; }
  #sea-camera-menu-button { flex-direction: column; gap: 2px; width: 44px; padding: 4px; font-size: 10px; }
  .sea-scene-tools .sea-jump-button { flex-basis: 52px; width: 52px; min-width: 52px; height: 52px; min-height: 52px; }
  .sea-camera-popover, .sea-chat-popover, .sea-emote-popover {
    left: auto; right: var(--sea-hud-right); bottom: var(--sea-hud-bottom);
    width: min(320px, calc(100vw - var(--sea-hud-left) - var(--sea-hud-right)));
    max-height: calc(var(--sea-overlay-height, 100dvh) - var(--sea-hud-top) - var(--sea-hud-bottom) - 6px);
    touch-action: pan-y;
  }
  .sea-camera-popover .sea-emote-heading { position: sticky; top: 0; z-index: 1; border-radius: 12px; background: var(--sea-paper); }
  .sea-sky-heading { top: var(--sea-hud-top); left: var(--sea-hud-left); }
  .sea-sky-heading h2 { margin-top: 1px; font-size: 21px; }
  .sea-sky-exit { top: var(--sea-hud-top); right: var(--sea-hud-right); gap: 7px; padding-inline: 9px; }
  .sea-sky-footer {
    bottom: var(--sea-hud-bottom); left: var(--sea-hud-left); right: var(--sea-hud-right);
    flex-flow: row wrap; justify-content: center; gap: 6px 14px;
  }
}

/* Overlay surfaces follow the visible area when a phone keyboard is open. */
#sea-sheet-cover { top: var(--sea-overlay-top, 0px); bottom: auto; height: var(--sea-overlay-height, 100%); }
.sea-sheet { max-height: min(760px, calc(var(--sea-overlay-height, 100dvh) - 48px)); }
.sea-sheet-feedback { flex: 0 0 auto; max-height: min(110px, 24dvh); margin: 0 20px 12px; padding: 10px 12px; overflow-y: auto; border: 1px solid var(--sea-line); border-radius: 12px; background: var(--sea-soft); color: var(--sea-ink); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.sea-exit-cover { position: absolute; z-index: 90; inset: var(--sea-overlay-top, 0px) 0 auto; height: var(--sea-overlay-height, 100%); display: grid; place-items: center; padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: var(--sea-scrim); color: var(--sea-ink); }
.sea-exit-cover[hidden] { display: none; }
.sea-exit-dialog { width: min(100%, 420px); max-height: calc(var(--sea-overlay-height, 100dvh) - 40px); padding: 26px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--sea-glass-edge); border-radius: 26px; background: var(--sea-glass-sheet); box-shadow: var(--sea-glass-shadow); -webkit-backdrop-filter: var(--sea-frost); backdrop-filter: var(--sea-frost); }
.sea-exit-title { margin: 0 0 12px; font-size: 22px; line-height: 1.4; }
.sea-exit-description { margin: 0 0 24px; color: var(--sea-muted); font-size: 14px; line-height: 1.8; word-break: keep-all; overflow-wrap: anywhere; }
.sea-exit-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.sea-exit-actions button { min-width: 0; min-height: 48px; padding: 12px 10px; border: 1px solid var(--sea-line); border-radius: 14px; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.5; word-break: keep-all; }
.sea-exit-stay { background: var(--sea-blue); color: white; }
.sea-exit-confirm { background: var(--sea-glass-inner); color: var(--sea-ink); }
.sea-exit-actions button:focus-visible { outline: 3px solid var(--sea-blue); outline-offset: 3px; }
#sea-app[data-exit-open="true"] #sea-notice { visibility: hidden; }
@media (max-width: 599px), (pointer: coarse), (max-width: 950px) and (max-height: 500px) and (orientation: landscape) {
  .sea-sheet { max-height: min(86dvh, calc(var(--sea-overlay-height, 100dvh) - 12px)); }
  .sea-sheet-feedback { margin-inline: 18px; }
}
@media (max-width: 360px) {
  .sea-exit-dialog { padding: 22px; }
  .sea-exit-actions { grid-template-columns: minmax(0, 1fr); }
}
