@font-face { font-family: 'Pixelify Sans'; src: url('/assets/fonts/pixelify-sans-latin.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: Figtree; src: url('/assets/fonts/figtree-latin.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: Figtree; src: url('/assets/fonts/figtree-italic-latin.woff2') format('woff2'); font-style: italic; font-weight: 300 900; font-display: swap; }
:root {
  color-scheme: dark;
  --purple: #160e20; --surface: #21162b; --field: #2b1c36; --gold: #e6c480; --gold-high: #f5dca9; --gold-low: #d5af66;
  --text: #f6f0e7; --muted: #c0b3ca; --faint: #9a8ca6; --line: #49364f; --water: #a385c7; --track: #34283a; --edge: #0e0915;
  --pixel: 'Pixelify Sans', monospace; --sans: Figtree, sans-serif; --gutter: clamp(20px, 3.4vw, 48px);
  font: 18px/1.4 var(--pixel); background: var(--purple); color: var(--text); accent-color: var(--gold);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100svh; display: flex; flex-direction: column; }
button, input { font: inherit; color: inherit; border-radius: 0; }
button, a, input { touch-action: manipulation; }
button { cursor: pointer; background: none; border: 0; }
button:disabled { cursor: default; opacity: .65; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
button svg { pointer-events: none; }
[hidden] { display: none !important; }
::selection { background: var(--gold); color: var(--purple); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; font-weight: 400; }
h1 { font-size: 32px; line-height: 1.2; }
h1[tabindex='-1']:focus { outline: none; }
h2 { font-size: 24px; line-height: 1.25; }
h3 { font-size: 20px; line-height: 1.3; }
b, strong { font-weight: 500; }
.muted, .small { color: var(--muted); }
.small { font: 15px/1.5 var(--sans); }
.eyebrow { font-size: 16px; color: var(--muted); margin-bottom: 4px; }
.pixel-icon { width: 16px; height: 16px; flex: none; color: inherit; }
span[data-icon] { display: inline-flex; flex: none; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; background: var(--gold); color: var(--purple); padding: 12px; }
.skip-link:focus { top: 10px; }

.site-header { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; padding: 16px var(--gutter); border-bottom: 2px solid var(--line); max-width: 1600px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; font: 600 19px/1.4 var(--sans); letter-spacing: -.02em; flex-shrink: 0; }
.brand em { font-weight: 500; }
.brand-divider { margin: 0 12px; color: var(--faint); font-weight: 400; }
.brand-voyages { color: var(--gold); font: 24px var(--pixel); letter-spacing: 0; }
.pixel-tabs { display: flex; gap: 8px; }
.pixel-tab { position: relative; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border: 2px solid var(--line); background: var(--surface); color: var(--muted); box-shadow: 0 3px 0 var(--edge); font-size: 18px; line-height: 1.2; }
.pixel-tab:hover { border-color: var(--faint); color: var(--text); }
.pixel-tab:is([aria-current='page'], [aria-pressed='true']) { color: var(--gold); border-color: var(--gold); background: var(--field); box-shadow: inset 0 -3px 0 var(--line); }
.pixel-tab:is([aria-current='page'], [aria-pressed='true']):after { content: ''; position: absolute; top: 3px; right: 3px; width: 3px; height: 3px; background: var(--gold); }
.pixel-tab:active { box-shadow: none; transform: translateY(2px); }
.purse { display: flex; align-items: center; gap: 8px; color: var(--muted); min-height: 44px; white-space: nowrap; }
.purse b, .purse .pixel-icon { color: var(--gold); }
.purse b { font-size: 22px; }

.shell { width: 100%; max-width: 1328px; margin: 0 auto; padding: 28px var(--gutter) 0; flex: 1; display: flex; flex-direction: column; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
[data-screen='creator'] > .page-heading { margin-bottom: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 10px 20px; border: 2px solid var(--gold); background: var(--gold); color: var(--purple); box-shadow: inset 0 -4px 0 var(--gold-low), 0 3px 0 var(--edge); font-size: 18px; line-height: 1.3; }
.button:hover { background: var(--gold-high); }
.button:active { box-shadow: none; transform: translateY(2px); }
.button.secondary { background: var(--surface); border-color: var(--faint); color: var(--text); box-shadow: inset 0 -3px 0 var(--field), 0 3px 0 var(--edge); }
.button.secondary:hover { border-color: var(--gold); color: var(--gold); }
.text-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 18px; padding: 8px 4px; }
.text-button:hover, footer a:hover { color: var(--gold); }

.world-card { border: 2px solid var(--line); background: var(--surface); min-width: 0; box-shadow: 4px 4px 0 var(--edge); overflow: hidden; }
.pixel-scene { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.identity-strip { padding: 20px; display: flex; justify-content: space-between; gap: 24px; align-items: center; border-top: 2px solid var(--line); }
.identity-strip > div:first-child { min-width: 0; flex: 1; }
.identity-strip h2 { display: flex; align-items: center; gap: 12px; font-size: 26px; overflow-wrap: anywhere; }
.identity-name { display: flex; align-items: center; gap: 12px; }
.identity-name h2 { min-width: 0; }
.name-edit { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 2px solid var(--line); background: var(--surface); color: var(--muted); box-shadow: 0 3px 0 var(--edge); }
.name-edit:hover { border-color: var(--gold); color: var(--gold); }
.name-edit:active { box-shadow: none; transform: translateY(2px); }
.name-edit[hidden] { display: none; }
.level-pill { padding: 4px 8px; border: 2px solid var(--line); font-size: 16px; color: var(--gold); white-space: nowrap; }
.xp-label { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.xp-label b { color: var(--text); }
.progress-track { height: 8px; background: var(--track); }
.progress-track i { display: block; height: 100%; background: var(--gold); box-shadow: inset 0 -2px 0 var(--gold-low); }

.creator-grid { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr); gap: 40px; align-items: start; }
.creator-preview { position: sticky; top: 24px; min-width: 0; }
.character-stage { height: 352px; display: grid; place-items: center; background: var(--field); padding: 24px; }
.character-stage > svg { width: 100%; max-width: 364px; height: 308px; image-rendering: pixelated; }
.character-stage[data-preview-kind='ship'] > svg { max-width: 432px; height: auto; }
.character-stage[data-preview-kind='setting'] { height: auto; padding: 0; }
.character-stage[data-preview-kind='setting'] > svg { max-width: none; height: auto; }
.creator-preview .identity-strip { min-height: 76px; }
.progression-strip { padding: 14px 20px 18px; border-top: 2px solid var(--line); }
.creator-actions { margin-top: 16px; }
.creator-actions .button { width: 100%; }
.creator-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.part-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 24px; }
.control-group { margin-bottom: 24px; }
.control-group h2, .control-group label { font-size: 20px; display: block; margin-bottom: 12px; font-weight: 400; }
.control-group input { width: 100%; min-height: 48px; background: #180f21; border: 2px solid var(--line); box-shadow: inset 3px 3px 0 var(--edge); padding: 10px 12px; caret-color: var(--gold); }
.control-group input:focus { border-color: var(--gold); }
.name-row { display: flex; gap: 8px; align-items: stretch; }
.name-row input { flex: 1; min-width: 0; }
.name-save { flex: none; min-height: 48px; padding: 8px 16px; gap: 8px; }
.name-save[hidden] { display: none; }
.head-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.head-controls .control-group:first-child { grid-column: 1 / -1; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 48px; height: 48px; border: 2px solid var(--faint); padding: 6px; background: var(--surface); position: relative; box-shadow: 0 3px 0 var(--edge); }
.swatch i { display: block; width: 100%; height: 100%; background: var(--swatch); }
.swatch[aria-pressed='true'] { border-color: var(--gold); box-shadow: inset 0 -2px 0 var(--line); }
.swatch .pixel-icon { position: absolute; right: 2px; bottom: 2px; color: var(--gold); background: var(--purple); }
.option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.item-option { min-width: 0; border: 2px solid var(--line); background: var(--surface); padding: 0; overflow: hidden; text-align: left; box-shadow: 3px 3px 0 var(--edge); }
.item-option:hover { border-color: var(--faint); }
.item-option[aria-pressed='true'] { border-color: var(--gold); }
.option-art { height: 112px; display: flex; align-items: center; justify-content: center; background: var(--field); overflow: hidden; }
.option-art svg { height: 100px; width: auto; max-width: 100%; }
.option-art.setting-art { height: auto; aspect-ratio: 5/3; }
.setting-art svg { height: auto; width: 100%; }
.option-info { padding: 12px; display: block; font-size: 18px; }
.option-info b { display: block; line-height: 1.2; overflow-wrap: anywhere; }
.option-info > span { min-height: 40px; display: flex; gap: 6px; align-items: flex-start; font: 14px/1.4 var(--sans); color: var(--muted); margin-top: 8px; }
.option-info .pixel-icon { margin-top: 2px; }
.item-option[aria-pressed='true'] .option-info > span { color: var(--gold); }
.item-option[aria-disabled='true'] .option-art { opacity: .55; }
.pattern-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }

footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 2px solid var(--line); margin-top: auto; padding: 20px 0 24px; font-size: 14px; color: var(--muted); }
.shell > section:not([hidden]) + footer, .shell > section:not([hidden]) ~ footer { margin-top: 40px; }
footer a { min-height: 44px; display: flex; gap: 8px; align-items: center; }
.notice { padding: 16px; border: 2px solid var(--line); margin-bottom: 24px; color: var(--muted); }
.notice h1, .notice h2 { margin-bottom: 12px; color: var(--text); }
.notice p { font: 16px/1.5 var(--sans); }
.notice p + p { margin-top: 12px; }
.connection-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 20px; }
.save-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 28px; margin-bottom: 16px; }
.save-panel[hidden] { display: flex !important; visibility: hidden; }
.save-panel p { color: var(--muted); font: 15px/1.5 var(--sans); }
.purchase-panel { text-align: left; padding: 28px; width: min(480px, calc(100% - 32px)); }
.purchase-panel.purchase-congrats { text-align: center; }
.purchase-panel.purchase-congrats .reward-art { height: 184px; padding: 16px; background: var(--field); border: 2px solid var(--gold); margin: 0 0 20px; }
.purchase-panel.purchase-congrats h2 { font-size: 28px; margin-bottom: 4px; }
.purchase-panel.purchase-congrats .connection-actions { justify-content: center; }
#purchase-note { font: 15px/1.5 var(--sans); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; background: var(--gold); color: var(--purple); border: 2px solid var(--gold-low); box-shadow: 4px 4px 0 var(--edge); padding: 12px 20px; font-size: 18px; width: max-content; max-width: calc(100% - 40px); text-align: center; opacity: 0; pointer-events: none; }
.toast.visible { opacity: 1; }
dialog { width: min(440px, calc(100% - 40px)); background: var(--surface); color: var(--text); border: 2px solid var(--faint); box-shadow: 6px 6px 0 var(--edge); padding: 40px 28px 28px; text-align: center; }
dialog::backdrop { background: #160e20d9; }
dialog h2 { font-size: 32px; }
dialog > p { font-size: 18px; color: var(--muted); margin-top: 12px; }
.reward-art { height: 112px; display: flex; justify-content: center; margin-bottom: 20px; }
.reward-art svg { height: 100%; width: auto; }
dialog .button { width: 100%; }

/* Primary navigation and server-backed hub views. */
.main-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.main-nav .pixel-tab { min-height: 44px; flex-direction: row; white-space: nowrap; }
#voyages-hub { width: 100%; max-width: 960px; margin-inline: auto; min-height: 400px; }
#voyages-hub[data-hub-view='overview'] { max-width: none; min-height: 0; margin-top: 24px; }
#voyages-hub .page-heading { flex-wrap: wrap; }
#voyages-hub .page-heading h1 { min-width: 0; flex: 1 1 220px; overflow-wrap: anywhere; }
#voyages-hub .page-heading > .hub-actions { min-width: 0; max-width: 100%; }
.hub-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hub-status { min-height: 28px; margin-top: 20px; font: 15px/1.5 var(--sans); }
.hub-status:empty { display: none; }
.hub-filters { margin-bottom: 24px; width: fit-content; }
.hub-filters .pixel-tab { min-width: 44px; }
.hub-empty { padding: 36px 0; font: 16px/1.5 var(--sans); }
.hub-list, .hub-badges { list-style: none; margin: 0; padding: 0; }
.hub-list { border-top: 2px solid var(--line); }
.hub-row { display: flex; align-items: center; gap: 16px; min-height: 88px; padding: 16px 0; border-bottom: 2px solid var(--line); }
.hub-row-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hub-row h3 { font-size: 22px; }
.hub-row .small { margin-top: 4px; }
.hub-title-button { display: block; min-height: 44px; max-width: 100%; padding: 4px 0; text-align: left; font-size: 22px; overflow-wrap: anywhere; }
.hub-title-button:hover { color: var(--gold); }
.hub-menu { flex: none; position: relative; }
.hub-menu summary { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; color: var(--muted); padding: 8px; list-style: none; }
.hub-menu summary::-webkit-details-marker { display: none; }
.hub-menu summary .pixel-icon { transform: rotate(90deg); }
.hub-menu[open] summary, .hub-menu summary:hover { color: var(--gold); }
.hub-menu > div { position: absolute; right: 0; top: 100%; z-index: 10; min-width: 200px; max-width: min(280px, 80vw); padding: 8px; background: var(--surface); border: 2px solid var(--faint); }
.hub-menu > div .text-button { display: flex; width: 100%; justify-content: flex-start; padding-inline: 12px; text-align: left; }
.hub-menu > div .text-button:hover { background: var(--field); }
.hub-badges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-block: 8px; }
.hub-badge { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; padding: 18px; border: 2px solid var(--line); background: var(--surface); box-shadow: 3px 3px 0 var(--edge); min-height: 144px; }
.hub-badge:hover { border-color: var(--faint); background: var(--field); }
.hub-badge.is-earned { border-color: #675072; }
.hub-badge.is-pinned { border-color: var(--gold); background: linear-gradient(180deg, #2d1f39 0%, var(--surface) 100%); }
.hub-badge b { font-size: 22px; overflow-wrap: anywhere; }
.hub-badge-icon { display: grid; place-items: center; width: 32px; height: 32px; color: var(--muted); background: var(--field); border: 2px solid var(--line); }
.hub-badge.is-earned .hub-badge-icon, .hub-badge.is-pinned .hub-badge-icon { color: var(--gold); border-color: var(--gold); }
.hub-avatar { width: 56px; height: 72px; flex: none; background: var(--field); }
.hub-avatar svg { width: 100%; height: 100%; image-rendering: pixelated; }
.hub-section { margin-top: 36px; }
.hub-section > h2 { margin-bottom: 16px; }
.hub-caption { margin-bottom: 20px; font: 15px/1.5 var(--sans); }
.hub-dialog { text-align: left; padding: 28px; width: min(480px, calc(100% - 32px)); max-height: calc(100svh - 32px); overflow-y: auto; }
.hub-dialog h2 { font-size: 28px; margin-bottom: 24px; overflow-wrap: anywhere; }
.hub-dialog .hub-caption { margin-top: 12px; }
.hub-dialog .control-group input, .hub-dialog select { width: 100%; min-height: 48px; padding: 10px 12px; color: var(--text); background: #180f21; border: 2px solid var(--faint); font: inherit; border-radius: 0; }
.hub-dialog .control-group { margin-bottom: 20px; }
.hub-dialog .control-group label { margin-bottom: 8px; }
.hub-dialog-status { margin-top: 16px; min-height: 28px; overflow-wrap: anywhere; font: 15px/1.5 var(--sans); }
.hub-dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
.hub-dialog .button { width: auto; }
.hub-dialog [data-hub-fields] > p { overflow-wrap: anywhere; font: 16px/1.5 var(--sans); }
.hub-dialog .hub-row { gap: 12px; }

/* Signed-in Harbour summary: daily momentum + crew harbour shortcuts. */
.harbour-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.harbour-prompt { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 20px; border: 2px solid var(--line); background: var(--surface); box-shadow: 3px 3px 0 var(--edge); }
.harbour-prompt-icon { width: 36px; height: 36px; display: grid; place-items: center; background: var(--field); color: var(--gold); }
.harbour-prompt-body { min-width: 0; }
.harbour-prompt-body h2 { font-size: 22px; margin-bottom: 4px; }
.harbour-prompt .button { flex: none; padding-inline: 16px; }
.harbour-badges-section > h2 { margin-bottom: 12px; }

/* Shared harbour: scene first, one progress decision, details on request. */
.crew-harbour { margin-bottom: 32px; }
.crew-harbour .world-card { max-width: 960px; margin-inline: auto; }
.harbour-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 24px; padding: 20px 0; }
.harbour-xp { align-self: center; color: var(--gold); }
.harbour-progress progress { grid-column: 1 / -1; width: 100%; height: 10px; border: 0; border-radius: 0; background: var(--track); }
.harbour-progress progress::-webkit-progress-bar { background: var(--track); }
.harbour-progress progress::-webkit-progress-value { background: var(--gold); }
.harbour-progress progress::-moz-progress-bar { background: var(--gold); }
.harbour-progress > .muted, .harbour-rules { grid-column: 1 / -1; }
.harbour-progress > .muted { font: 15px/1.5 var(--sans); }
.harbour-rules summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
.harbour-rules p { max-width: 65ch; padding-bottom: 12px; }

/* Quests board: tactile daily-goal cards, 7-day cadence pips, and clean work-log toolbar. */
.section-bar { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; }
.section-bar > h2 { margin: 0; }
.section-meta { margin: 0; }
.daily-goals { margin-top: 8px; }
.quest-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.quest-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; align-items: start; padding: 18px 20px; border: 2px solid var(--line); background: var(--surface); box-shadow: 3px 3px 0 var(--edge); }
.quest-card.is-active { border-color: #6c5178; background: linear-gradient(90deg, #281b35 0%, var(--surface) 56%); }
.quest-card.is-done { border-color: var(--gold); background: linear-gradient(90deg, #2d2038 0%, var(--surface) 58%); }
.quest-icon { width: 40px; height: 40px; display: grid; place-items: center; border: 2px solid var(--line); background: var(--field); color: var(--gold); }
.quest-card.is-done .quest-icon { border-color: var(--gold); background: #36263c; color: var(--gold-high); }
.quest-body { min-width: 0; display: grid; gap: 12px; }
.quest-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.quest-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; min-width: 0; }
.quest-title-row h3 { font-size: 21px; line-height: 1.25; overflow-wrap: anywhere; }
.quest-card.is-done .quest-title-row h3 { color: var(--gold-high); }
.quest-tier { display: inline-flex; align-items: center; padding: 2px 8px; border: 2px solid var(--gold); background: #33223b; color: var(--gold); font-size: 14px; line-height: 1.2; text-transform: uppercase; letter-spacing: .04em; }
.quest-tier.is-stretch { border-color: var(--gold-high); color: var(--gold-high); }
.quest-rewards { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.reward-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 2px solid var(--line); background: #180f21; color: var(--muted); font-size: 16px; line-height: 1.2; white-space: nowrap; }
.reward-chip.is-coins { color: var(--gold); border-color: #654b62; }
.quest-meter { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.quest-track { height: 10px; background: #160e20; border: 2px solid var(--line); overflow: hidden; }
.quest-track i { display: block; height: 100%; background: var(--gold); box-shadow: inset 0 -2px 0 var(--gold-low); }
.quest-card.is-done .quest-track { border-color: #7c6454; }
.quest-count { font-size: 16px; color: var(--muted); white-space: nowrap; min-width: 64px; text-align: right; }
.quest-card.is-done .quest-count { color: var(--gold); }
.quest-impact { display: flex; align-items: center; gap: 8px; font: 14px/1.45 var(--sans); color: var(--muted); padding-top: 2px; }
.quest-impact .pixel-icon { color: var(--gold); }
.quest-impact.is-earned { color: var(--gold-high); }

.weekly-card { margin-top: 16px; padding: 18px 20px; border: 2px solid var(--line); background: var(--surface); box-shadow: 3px 3px 0 var(--edge); display: grid; gap: 14px; }
.weekly-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.weekly-head h3 { font-size: 20px; }
.week-pips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week-pips i { display: block; height: 10px; background: #160e20; border: 2px solid var(--line); }
.week-pips i.is-milestone { border-color: #6b5276; }
.week-pips i.is-lit { background: var(--gold); border-color: var(--gold); box-shadow: inset 0 -2px 0 var(--gold-low); }
.weekly-bonuses { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 0; margin: 0; }
.weekly-bonuses li { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border: 2px solid var(--line); background: #180f21; color: var(--muted); font-size: 16px; line-height: 1.25; }
.weekly-bonuses .earned { border-color: var(--gold); background: #2c1e36; color: var(--gold); }

.work-log-title { margin: 24px 0 12px; }
.work-log-section { margin-top: 40px; }
.work-log-bar { align-items: center; margin-bottom: 16px; }
.work-log-bar .work-log-title { margin: 0; }
.add-note-btn { gap: 8px; padding: 8px 16px; min-height: 44px; }
.work-log-list { border: 2px solid var(--line); background: var(--surface); box-shadow: 3px 3px 0 var(--edge); }
.work-log-row { padding: 14px 18px; min-height: 76px; }
.work-log-row:last-child { border-bottom: 0; }
.note-kind-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 2px solid var(--line); background: var(--field); color: var(--muted); }
.work-log-row.is-done .note-kind-icon { border-color: var(--gold); color: var(--gold); }
.work-log-section .hub-empty { padding: 28px 20px; border: 2px solid var(--line); background: var(--surface); color: var(--muted); }

/* Signed-out tabs and interactive free-starter sandbox. */
#voyages-preview { width: 100%; max-width: 1040px; margin-inline: auto; }
.preview-intro { margin: 0 0 24px; font: 16px/1.55 var(--sans); color: var(--muted); max-width: 68ch; }
.preview-intro b { color: var(--text); font-weight: 600; }
.preview-intro .text-button { font: 18px/1.2 var(--pixel); color: var(--gold); white-space: nowrap; margin-left: 6px; }
.preview-status:empty { display: none; }
.preview-status { margin-bottom: 16px; }
.preview-heading { flex-wrap: wrap; margin-bottom: 24px; }
.preview-art { margin: 0 0 32px; }
.quests-preview-board { background: #191024; }
.quests-preview-inner { padding: 24px; }
.preview-art figcaption { padding: 12px 16px; border-top: 2px solid var(--line); background: var(--surface); }
.preview-facts { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--line); }
.preview-facts li { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 16px; padding: 16px 0; border-bottom: 2px solid var(--line); font: 16px/1.55 var(--sans); }
.preview-facts li > span[data-icon] { width: 32px; height: 32px; display: grid; place-items: center; background: var(--field); color: var(--gold); }
.preview-facts li a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.preview-facts li a:hover { color: var(--gold-high); }
.preview-facts li code { font: 14px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); background: var(--field); border: 1px solid var(--line); padding: 1px 6px; }

.sandbox-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 32px; align-items: start; margin-bottom: 32px; }
.sandbox-card { margin: 0; }
.sandbox-stage svg { width: 100%; height: auto; image-rendering: pixelated; }
.sandbox-controls .head-controls { grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); gap: 0 16px; }
.sandbox-controls .head-controls .control-group:first-child { grid-column: auto; }
.sandbox-hair-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sandbox-footer { display: flex; justify-content: flex-start; margin-top: -8px; }

@media (max-width: 1100px) {
  .site-header { gap: 16px; flex-wrap: wrap; }
  .brand { font-size: 17px; gap: 8px; }
  .brand-divider { margin: 0 8px; }
  .main-nav { order: 3; width: 100%; }
  .pixel-tab { padding: 10px; }
  .creator-grid, .sandbox-grid { gap: 24px; }
  .identity-strip { flex-wrap: wrap; gap: 16px; }
  .creator-preview .identity-strip { flex-wrap: nowrap; }
  .option-grid { gap: 8px; }
  .option-info { padding: 12px 8px; }
  .harbour-summary { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .site-header { min-height: 0; padding-top: 12px; padding-bottom: 16px; }
  .shell { padding-top: 24px; }
  .creator-grid, .sandbox-grid { grid-template-columns: 1fr; gap: 24px; }
  .creator-preview { position: sticky; top: 0; z-index: 5; padding: 8px 0 12px; background: var(--purple); }
  .character-stage { height: 192px; padding: 12px; }
  .character-stage > svg { height: 176px; max-width: 260px; }
  .character-stage[data-preview-kind='ship'] > svg { max-width: 240px; max-height: 164px; }
  .character-stage[data-preview-kind='setting'] { height: 192px; padding: 0; overflow: hidden; }
  .character-stage[data-preview-kind='setting'] > svg { height: 100%; width: 100%; }
  .creator-preview .identity-strip { min-height: 56px; padding: 12px 16px; }
  .creator-preview .identity-strip h2 { font-size: 24px; }
  .creator-actions { margin-top: 12px; }
  .creator-controls { min-width: 0; }
  .creator-controls :is(button, input) { scroll-margin-top: 344px; }
}
@media (max-width: 720px) {
  .weekly-bonuses { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .harbour-prompt { grid-template-columns: 32px minmax(0, 1fr); }
  .harbour-prompt .button { grid-column: 1 / -1; width: 100%; }
  .quest-card { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .quest-icon { width: 36px; height: 36px; }
  .quests-preview-inner { padding: 16px; }
}
@media (max-width: 480px) {
  .brand { font-size: 16px; }
  .brand img { width: 20px; height: 24px; }
  .brand-divider { margin: 0 8px; }
  .brand-voyages { font-size: 22px; }
  .site-header { gap: 12px; }
  .purse { gap: 4px; }
  .purse > span:last-child { display: none; }
  .pixel-tabs { gap: 6px; }
  .pixel-tab { flex-direction: column; gap: 4px; min-height: 64px; padding: 8px 2px; font-size: 16px; }
  .main-nav { display: flex; gap: 6px; }
  .main-nav .pixel-tab { flex: 1 1 auto; min-height: 44px; flex-direction: row; padding-inline: 8px; font-size: 15px; gap: 4px; }
  .main-nav .pixel-icon { display: none; }
  .page-heading { gap: 12px; margin-bottom: 16px; }
  .page-heading h1 { font-size: 28px; }
  .page-heading .text-button { font-size: 16px; }
  [data-screen='overview'] .page-heading { flex-wrap: wrap; }
  [data-screen='overview'] .hub-actions { gap: 10px; flex-wrap: nowrap; }
  [data-screen='overview'] .page-heading .button { padding: 8px 12px; font-size: 16px; min-height: 44px; }
  .character-stage { height: 144px; padding: 4px; }
  .character-stage > svg { height: 132px; max-width: 220px; }
  .character-stage[data-preview-kind='ship'] > svg { height: 132px; max-width: 200px; }
  .character-stage[data-preview-kind='setting'] { height: 144px; }
  .creator-preview .identity-strip { padding: 8px 12px; min-height: 48px; flex-direction: row; align-items: center; }
  .creator-preview .identity-strip h2 { font-size: 22px; }
  .level-pill { font-size: 14px; }
  .creator-actions .button { font-size: 18px; }
  .head-controls, .sandbox-controls .head-controls { grid-template-columns: 1fr; }
  .creator-controls :is(button, input) { scroll-margin-top: 296px; }
  .option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .option-art { height: 100px; }
  .option-art svg { height: 88px; }
  .option-info { padding: 12px; }
  .identity-strip { flex-direction: column; align-items: flex-start; padding: 16px; }
  .identity-strip h2 { font-size: 24px; flex-wrap: wrap; }
  .save-panel { flex-wrap: wrap; gap: 4px; }
  .connection-actions > .button { width: 100%; }
  .hub-row { gap: 8px; }
  .hub-row h3, .hub-title-button { font-size: 20px; }
  .hub-badges { grid-template-columns: 1fr; gap: 12px; }
  .hub-badge { padding: 16px; min-height: 0; }
  .hub-avatar { width: 40px; height: 56px; }
  .hub-menu summary { padding-inline: 2px; font-size: 16px; }
  .hub-dialog { padding: 24px 20px; }
  .hub-dialog-actions { flex-wrap: wrap; }
  .hub-dialog-actions > .button { flex: 1; min-width: 100px; }
  .harbour-progress { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .quest-card { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .quest-icon { width: 32px; height: 32px; }
  .hub-filters .pixel-tab { min-height: 44px; flex-direction: row; padding-inline: 12px; }
  .work-log-row { padding: 12px; }
  .note-kind-icon { width: 32px; height: 32px; }
  .preview-heading .button { width: 100%; }
  .preview-facts li { gap: 12px; font-size: 15px; }
  .sandbox-hair-grid .pixel-tab { min-height: 44px; flex-direction: row; padding-inline: 6px; }
  footer { margin-top: 32px; }
  .toast { font-size: 16px; }
  dialog { padding: 40px 20px 24px; }
}
@media (max-width: 360px) { .pixel-tab { font-size: 14px; } .main-nav .pixel-tab { padding-inline: 6px; font-size: 14px; } }
@media (max-height: 600px) {
  .creator-preview { position: static; }
  .creator-controls :is(button, input) { scroll-margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
