@font-face { font-family: Fredoka; src: url('./assets/fredoka-bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: Nunito; src: url('./assets/nunito-sans.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Nunito; src: url('./assets/nunito-sans-bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
:root { --ink: #294543; --muted: #647a70; --paper: #fffdf2; --indigo: #5c5cde; --leaf: #edf2dd; --shadow: 0 10px 36px #284e4821, 0 2px 2px #284e4808; }
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { font: 15px/1.5 Nunito, 'Avenir Next', sans-serif; color: var(--ink); background: #7ccbc2; }
button, input, select { font: inherit; color: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; }
button { transition: transform .18s, background .18s, box-shadow .18s; }
button:hover { transform: translateY(-2px); }
button:active { transform: translateY(1px); }
button:disabled { cursor: wait; opacity: .6; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, canvas:focus-visible { outline: 3px solid var(--indigo); outline-offset: 5px; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
svg { width: 21px; height: 21px; flex-shrink: 0; vertical-align: middle; }
button > span[data-icon] { display: inline-flex; }
.skip-link { position: absolute; z-index: 100; left: 20px; top: -100px; padding: 12px; background: white; }
.skip-link:focus { top: 10px; }
#world { width: 100%; height: 100%; position: fixed; inset: 0; display: block; touch-action: none; outline-offset: -5px; }
.world-vignette { position: fixed; inset: 0; pointer-events: none; background: linear-gradient(180deg, #203f3310, transparent 18%, transparent 82%, #28594c13); }
.topbar { position: fixed; z-index: 5; left: 34px; right: 34px; top: max(25px, env(safe-area-inset-top)); display: flex; align-items: center; justify-content: space-between; gap: 24px; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.wordmark { display: flex; gap: 10px; align-items: center; text-decoration: none; font: 700 29px/.84 Fredoka, sans-serif; letter-spacing: -1px; }
.wordmark-small { display: block; font-size: 19px; letter-spacing: 3.5px; margin-top: 5px; }
.m-mark { display: inline-block; background: currentColor; -webkit-mask: url('../logom.png') center / contain no-repeat; mask: url('../logom.png') center / contain no-repeat; flex-shrink: 0; }
.brand-icon { width: 45px; height: 33px; color: var(--indigo); }
.island-weather { display: flex; gap: 10px; align-items: center; position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.island-weather > span { font-size: 31px; color: #86672d; }
.island-weather strong { display: block; font-size: 13px; }
.island-weather div > span { font-size: 11px; color: #426762; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.round-button { height: 45px; width: 45px; display: grid; place-items: center; border-radius: 50%; background: #fffdf2ef; box-shadow: 0 3px 0 #d1d7bd88, 0 4px 14px #3765600c; }
.round-button[aria-pressed='true'] { background: #eeebff; color: var(--indigo); }
.pill-button { display: flex; align-items: center; gap: 9px; background: var(--paper); border-radius: 28px; padding: 13px 20px; font-weight: 700; box-shadow: 0 3px 0 #d1d7bd88; }
.arrival { position: fixed; z-index: 6; left: 5%; top: 50%; width: 440px; transform: translateY(-42%); }
.travel-tag { display: inline-flex; align-items: center; gap: 9px; padding: 6px 13px 6px 10px; background: #fff9dfd9; border-radius: 20px; font-size: 12px; font-weight: 700; box-shadow: 0 2px 8px #6e784011; }
.travel-tag > span { font-size: 23px; line-height: 1; color: #cc9450; }
h1 { font: 700 clamp(42px, 4.8vw, 68px)/.97 Fredoka, 'Trebuchet MS', sans-serif; letter-spacing: -2px; margin: 18px 0 14px; color: #244943; text-shadow: 0 3px #eff3ce6b; position: relative; }
.title-flower { width: .95em; height: .68em; display: inline-block; color: #faf3b8; font-size: 41px; margin-left: 8px; transform: rotate(15deg); text-shadow: 0 2px #6e7b5733; }
.arrival-copy > p { max-width: 370px; margin: 0 0 22px; font-size: 15px; line-height: 1.55; color: #2b514b; }
.outfitter { background: #fffdf4f7; border-radius: 22px 22px 7px 7px; padding: 18px 19px 18px 10px; display: grid; grid-template-columns: 142px 1fr; gap: 12px; box-shadow: var(--shadow); }
.avatar-stage { position: relative; min-width: 0; background: radial-gradient(ellipse at 50% 66%, #dee8bf 0%, #eff1dba6 48%, transparent 70%); border-radius: 16px; }
#avatar-preview { width: 100%; height: 193px; display: block; }
.avatar-caption { display: block; text-align: center; font-size: 10px; color: var(--muted); margin-top: -5px; }
.shuffle-button { position: absolute; bottom: 26px; right: 0; background: white; border-radius: 50%; width: 31px; height: 31px; display: grid; place-items: center; box-shadow: 0 2px 8px #29454313; }
.shuffle-button svg { width: 16px; height: 16px; }
.name-label { font-size: 11px; font-weight: 700; display: block; margin-bottom: 4px; }
#explorer-name { width: 100%; border: 1px solid #dae0ca; border-radius: 8px; background: #f4f5e9; padding: 7px 10px; font-size: 13px; height: 34px; }
fieldset { padding: 0; border: 0; margin: 10px 0 0; }
legend { padding: 0; font-size: 10px; font-weight: 700; margin-bottom: 5px; }
.swatches { display: flex; gap: 7px; }
.swatch { background: var(--swatch); width: 23px; height: 23px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #dbe0d0; position: relative; }
.swatch[aria-pressed='true'] { box-shadow: 0 0 0 2px var(--ink); }
.swatch[aria-pressed='true']::after { content: ''; width: 5px; height: 5px; background: #fff; border-radius: 50%; position: absolute; top: 7px; left: 7px; box-shadow: 0 0 1px #000; }
.style-options { display: flex; gap: 4px; }
.style-options button { font-size: 10px; padding: 5px 7px; background: #f0f1e4; border-radius: 6px; white-space: nowrap; }
.style-options button[aria-pressed='true'] { color: white; background: #496e5f; }
.enter-button { margin-top: 8px; width: 100%; padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; background: var(--indigo); color: white; border-radius: 7px 7px 18px 18px; box-shadow: 0 5px 0 #4446a7, 0 12px 24px #38446b30; font: 700 19px/1.4 Fredoka, sans-serif; }
.enter-button:hover { background: #6867e9; }
.arrival-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; margin: 17px 5px 0; color: #365f55; }
.status-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #47765e; margin: 0 4px 1px 0; }
.postcard-note { position: fixed; bottom: 35px; right: 42px; text-align: right; color: #30695e; transform: rotate(-3deg); pointer-events: none; }
.postcard-note > span:first-child { font-size: 10px; letter-spacing: 1px; }
.postcard-note strong { display: block; font: 700 20px/1.15 Fredoka, sans-serif; margin-top: 8px; }
.postcard-wave { font-size: 38px; display: block; line-height: 1; margin-top: 4px; }
#load-error { background: var(--paper); padding: 14px; border-radius: 12px; font-size: 13px; }
.game-hud { position: fixed; inset: 0; pointer-events: none; z-index: 4; }
.game-hud button, #joystick { pointer-events: auto; }
.passport-chip { position: absolute; left: 30px; top: 105px; display: flex; text-align: left; gap: 11px; align-items: center; background: var(--paper); padding: 12px 15px 12px 11px; border-radius: 14px; box-shadow: var(--shadow); }
.passport-icon { width: 37px; height: 42px; display: grid; place-items: center; color: #f9edb4; background: #658578; border-radius: 4px 9px 9px 4px; box-shadow: inset 3px 0 #476e5d; }
.passport-chip strong { font-size: 12px; display: block; }
.passport-chip span span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.chip-chevron { font-size: 24px; margin-left: 10px; color: #819482; }
.quest-card { position: absolute; right: 31px; top: 106px; display: flex; gap: 10px; background: #fffdf2e8; box-shadow: var(--shadow); padding: 14px 30px 14px 16px; border-radius: 13px; width: 270px; }
.quest-card strong { display: block; font-size: 12px; }
.quest-card div > span { display: block; font-size: 11px; color: var(--muted); line-height: 1.45; margin-top: 3px; }
.quest-spark { font-size: 26px; color: #99783b; line-height: 1.1; }
#quest-dismiss { position: absolute; top: 4px; right: 4px; background: none; color: #7a8a72; width: 26px; height: 26px; font-size: 18px; }
.minimap-button { position: absolute; bottom: 31px; right: 31px; background: #fffdf2e8; border-radius: 50% 50% 18px 18px; width: 177px; padding: 8px 9px 12px; box-shadow: var(--shadow); }
#minimap { width: 157px; height: 137px; display: block; }
.minimap-button > span { display: flex; gap: 7px; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.minimap-button svg { width: 15px; height: 15px; }
kbd { font: 700 10px Nunito, sans-serif; min-width: 20px; height: 21px; padding: 2px 5px; display: inline-grid; place-items: center; background: #fffdf2f2; border: 1px solid #c9d6c5; border-bottom-width: 3px; border-radius: 5px; }
.movement-hint { position: absolute; bottom: 27px; left: 31px; display: flex; align-items: center; gap: 17px; font-size: 10px; font-weight: 700; color: #295f51; background: #fffdf2b8; padding: 10px 13px; border-radius: 11px; }
.movement-hint > span { display: flex; gap: 4px; align-items: center; }
.camera-buttons { position: absolute; right: 33px; bottom: 230px; display: flex; flex-direction: column; gap: 8px; }
.camera-buttons .round-button { width: 38px; height: 38px; }
.camera-buttons svg { width: 18px; height: 18px; }
.interact-prompt { position: absolute; bottom: 91px; left: 50%; transform: translateX(-50%); display: flex; gap: 14px; align-items: center; background: var(--paper); border-radius: 17px; padding: 13px 19px 13px 13px; box-shadow: 0 5px 0 #d3dbc0, var(--shadow); text-align: left; min-width: 240px; }
.interact-prompt:hover { transform: translateX(-50%) translateY(-3px); }
.interact-prompt kbd { width: 37px; height: 38px; background: #edeafa; color: var(--indigo); border-color: #cec8ee; font-size: 18px; }
.interact-prompt small { font-size: 10px; color: var(--muted); display: block; }
.interact-prompt strong { font: 700 18px Fredoka, sans-serif; display: block; }
.interaction-arrow { color: #829170; margin-left: auto; }
dialog { border: 0; color: var(--ink); background: var(--paper); border-radius: 25px; padding: 0; box-shadow: 0 35px 100px #173c4359; max-height: min(86dvh, 840px); }
dialog::backdrop { background: #264e5159; backdrop-filter: blur(6px); }
.journal { width: min(900px, calc(100% - 40px)); }
.journal[open] { display: flex; flex-direction: column; overflow: hidden; }
.journal .journal-header { flex-shrink: 0; }
.journal .journal-body { min-height: 0; }
.journal-header { padding: 25px 30px 22px; display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 1px solid #e4e7d5; }
.journal-kicker { font-size: 11px; color: #788569; }
.journal-header h2 { font: 700 32px/1.12 Fredoka, sans-serif; margin: 5px 0 0; letter-spacing: -.5px; }
.close-button { background: #eef0df; border-radius: 50%; width: 35px; height: 35px; flex-shrink: 0; font-size: 24px; display: grid; place-items: center; line-height: 1; }
.journal-body { padding: 24px 30px 30px; overflow: auto; max-height: calc(86dvh - 122px); }
.guide-intro { margin: 0 0 20px; color: #62796a; font-size: 14px; max-width: 640px; }
.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.destination-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: #f1f3e6; border-radius: 14px; text-align: left; }
.destination-symbol { display: grid; place-items: center; height: 46px; width: 46px; flex-shrink: 0; font-size: 27px; color: var(--destination-color, #5c5cde); background: #fffdf2; border-radius: 14px; }
.destination-card strong { display: block; font: 700 18px Fredoka, sans-serif; }
.destination-card small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.destination-card .arrow { margin-left: auto; color: #8b9b75; }
.journal-footer { border-top: 1px solid #e3e8d3; padding-top: 18px; margin-top: 24px; display: flex; gap: 15px; flex-wrap: wrap; align-items: center; justify-content: space-between; font-size: 12px; }
.text-link { text-underline-offset: 4px; color: #4e5c96; font-size: 12px; }
.resident-dialogue { display: flex; gap: 16px; align-items: flex-start; background: #edf1df; border-radius: 14px; padding: 18px; margin-bottom: 23px; }
.resident-face { width: 48px; height: 48px; flex-shrink: 0; background: #d6dea6; border-radius: 50%; display: grid; place-items: center; font-size: 29px; }
.resident-dialogue strong { font: 700 19px Fredoka, sans-serif; }
.resident-dialogue p { margin: 4px 0 0; font-size: 13px; line-height: 1.6; color: #52705f; }
.resident-dialogue.has-profile { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px 16px; }
.resident-portrait { width: 88px; height: auto; border-radius: 35px 35px 10px 10px; background: #e0e5d3; }
.resident-heading { align-self: center; }
.resident-heading strong { display: block; }
.resident-heading > span { display: block; font-size: 12px; line-height: 1.5; color: #586a55; margin-top: 5px; }
.resident-dialogue.has-profile p { grid-column: 1 / -1; margin: 0; }
.resident-dialogue .resident-bio { color: #3d5649; }
.resident-intro { border-top: 1px solid #d5dec7; padding-top: 10px; }
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 21px; }
.project-grid:has(.project-card:only-child) { grid-template-columns: 1fr; }
.project-card:only-child { display: grid; grid-template-columns: 1.1fr 1fr; }
.project-card:only-child img { width: 100%; height: 100%; min-height: 290px; object-fit: cover; }
.project-card { border: 1px solid #e0e5d0; border-radius: 14px; overflow: hidden; }
.project-card img { width: 100%; height: auto; aspect-ratio: 1.8; object-fit: cover; background: #e8ecd6; }
.project-card-content { padding: 17px; }
.project-client { font-size: 10px; color: #758567; }
.project-card h3 { font: 700 21px/1.12 Fredoka, sans-serif; margin: 7px 0 9px; }
.project-card p { font-size: 12px; line-height: 1.6; margin: 0 0 14px; color: #607363; }
.project-card a { font-size: 11px; font-weight: 700; color: #5555aa; text-underline-offset: 4px; }
.project-metrics { display: flex; gap: 15px; margin-bottom: 17px; }
.project-metrics strong { display: block; font: 700 20px Fredoka, sans-serif; }
.project-metrics span { font-size: 9px; line-height: 1.4; color: #738265; }
.secondary-button { background: #eae8f7; color: #5654ae; padding: 11px 17px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.primary-button { background: var(--indigo); color: white; padding: 12px 19px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin: 20px 0; }
.service-note { padding: 20px; background: #f1f2df; border-radius: 12px; }
.service-note > span { font-size: 26px; color: #827a53; }
.service-note h3 { font: 700 20px/1.1 Fredoka, sans-serif; margin: 11px 0; }
.service-note p { font-size: 12px; color: #63745e; }
.partner-ledger { padding-top: 15px; border-top: 1px solid #e3e7d4; }
.partner-ledger h3 { font: 700 24px Fredoka, sans-serif; margin: 8px 0 14px; }
.partner-ledger > p { font-size: 11px; color: #76846b; margin: 16px 0 8px; }
.partner-names { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.partner-names > span { font-size: 11px; padding: 8px 12px; border-radius: 7px; background: #e9eedb; }
.partner-names.career > span { background: #f1ecdf; }
.learning-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.learning-list a { border-radius: 10px; padding: 14px; background: #f0f2e5; text-decoration: none; }
.learning-list strong { display: block; font-size: 12px; }
.learning-list small { display: block; color: #718168; font-size: 10px; margin-top: 4px; }
.lesson-box { border-radius: 16px; padding: 23px; background: #eae8f7; margin-bottom: 24px; }
.lesson-box h3 { font: 700 24px Fredoka, sans-serif; margin: 0 0 8px; color: #575391; }
.lesson-box p { font-size: 13px; margin: 0 0 13px; }
.lesson-options { display: grid; gap: 7px; }
.lesson-options button { border-radius: 9px; padding: 11px 14px; background: #fffdf2; text-align: left; font-size: 12px; border: 2px solid transparent; }
.lesson-options button.correct { border-color: #6a9474; background: #edf5df; }
.lesson-options button.incorrect { border-color: #c99174; background: #fff0df; }
.lesson-feedback { margin-top: 13px !important; color: #515678; }
.lesson-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.lesson-tabs button { background: #f2f1e4; padding: 7px 12px; border-radius: 20px; font-size: 11px; }
.lesson-tabs button[aria-pressed='true'] { color: #fff; background: #7771aa; }
.garden-challenges-title { font: 700 24px Fredoka, sans-serif; margin: 28px 0 8px; }
.library-invitation { display: grid; grid-template-columns: 76px 1fr; gap: 16px 22px; align-items: center; padding: 25px; margin: 0 0 24px; background: #e9edd8; border-radius: 8px 22px 22px 8px; border-left: 6px solid #647953; }
.library-invitation h3 { font: 700 27px/1.15 Fredoka, sans-serif; margin: 0 0 10px; max-width: 420px; }
.library-invitation p { font-size: 14px; line-height: 1.6; margin: 0 0 10px; max-width: 540px; }
.library-invitation strong { font-size: 12px; color: #4d664c; }
.field-book { width: 72px; height: 95px; background: #647953; color: #fff3bf; border-radius: 3px 10px 10px 3px; border-left: 7px solid #4c6244; box-shadow: 3px 4px 0 #c2c9a2; display: grid; place-items: center; font: 700 46px Fredoka, sans-serif; transform: rotate(-5deg); }
.library-entry-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.library-entry-actions .text-link { padding: 10px 0; }
.library-invitation button.text-link, .library-shelf button.text-link, .library-chapter button.text-link, .library-passport button.text-link { background: transparent; }
.library-progress { display: flex; gap: 12px; align-items: center; margin: -8px 0 24px; font-size: 12px; }
.library-progress progress { width: 100px; min-width: 80px; height: 8px; accent-color: #647953; }
.library-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.library-filters button { background: #f0f1e7; border: 1px solid #dce2d2; padding: 10px 13px; border-radius: 22px; font-size: 12px; min-height: 44px; }
.library-filters button[aria-pressed='true'] { background: #355b50; border-color: #355b50; color: #fffdf2; }
.library-trail { margin: 28px 0 34px; }
.library-trail-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--trail-color); }
.library-trail-heading > span { font: 700 28px Fredoka, sans-serif; }
.library-trail-heading > strong { margin-left: auto; flex-shrink: 0; font-size: 12px; }
.library-trail-heading h3 { font: 700 22px Fredoka, sans-serif; margin: 0; }
.library-trail-heading p { margin: 4px 0 0; color: #5b6e63; font-size: 12px; }
.library-books { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.library-book { display: flex; text-align: left; gap: 13px; align-items: stretch; padding: 0 14px 0 0; background: #f3f1e5; border-radius: 3px 12px 12px 3px; min-height: 108px; }
.book-spine { width: 29px; flex-shrink: 0; display: grid; place-items: center; background: var(--trail-color); color: #fffdf2; border-radius: 3px 0 0 3px; font-size: 18px; border-left: 4px solid #0002; }
.book-label { padding: 13px 0; flex: 1; min-width: 0; }
.book-label strong { display: block; font: 700 18px/1.2 Fredoka, sans-serif; }
.book-label small { display: block; font-size: 12px; line-height: 1.35; margin-top: 5px; color: #576b60; }
.book-label > span { font-size: 11px; display: block; margin-top: 7px; color: #627267; }
.book-status { align-self: center; color: var(--trail-color); font-size: 20px; min-width: 27px; text-align: center; }
.book-status span { display: block; font-size: 9px; }
.library-book.completed { background: #eaf0dc; }
.library-source-note { font-size: 12px; line-height: 1.6; color: #5d7164; margin: 25px 0 0; max-width: 650px; }
.library-chapter { max-width: 670px; margin: 0 auto; }
.chapter-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 23px; }
.chapter-tools .text-link { min-height: 44px; }
.chapter-tools > span { font-size: 12px; color: #5a7359; }
.chapter-lead { display: flex; align-items: center; gap: 22px; margin-bottom: 28px; }
.chapter-lead p { font-size: 17px; line-height: 1.65; margin: 0; }
.chapter-emblem { display: grid; place-items: center; width: 68px; height: 82px; flex-shrink: 0; background: var(--trail-color); color: #fff9dc; font: 700 36px Fredoka, sans-serif; border-radius: 3px 15px 15px 3px; border-left: 6px solid #0002; }
.chapter-reading { border-left: 2px solid #e1e5d4; padding-left: 26px; }
.chapter-reading section { margin: 0 0 26px; }
.chapter-reading h3, .chapter-action h3 { font: 700 23px/1.2 Fredoka, sans-serif; margin: 0 0 9px; }
.chapter-reading p, .chapter-action p { font-size: 16px; line-height: 1.7; margin: 0; }
.chapter-action { display: flex; align-items: flex-start; gap: 15px; background: #edf1dc; padding: 22px 24px; border-radius: 8px 18px 18px 18px; margin: 30px 0; }
.chapter-action > span { font: 700 28px Fredoka, sans-serif; color: #57764e; }
.chapter-action h3 { font-size: 20px; color: #3f613f; }
.chapter-action p { font-size: 15px; }
.chapter-challenge { background: #eeebf8; border-radius: 18px; padding: 25px; }
.chapter-challenge-label { color: #605393; font: 700 18px Fredoka, sans-serif; }
.chapter-challenge h3 { font: 700 20px/1.45 Nunito, sans-serif; margin: 10px 0 19px; }
.chapter-challenge .lesson-options button { min-height: 48px; font-size: 15px; line-height: 1.5; padding: 13px 15px; }
.chapter-challenge .lesson-feedback { font-size: 15px; line-height: 1.65; margin-bottom: 0; }
.chapter-source { margin: 25px 0; padding-left: 15px; border-left: 3px solid var(--trail-color); }
.chapter-source > span, .chapter-source small { display: block; font-size: 12px; line-height: 1.5; color: #5d7164; }
.chapter-source a { font-size: 15px; font-weight: 700; display: inline-block; padding: 7px 0; }
.chapter-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 20px; border-top: 1px solid #dce2d0; font-size: 12px; }
.library-passport { margin-top: 30px; }
.library-passport-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.library-passport-heading h3 { font: 700 24px Fredoka, sans-serif; margin: 0; }
.library-passport .stamp { width: 100%; min-height: 155px; background-color: transparent; }
.library-passport .stamp.collected { background-color: #edf2dd; }
@media (max-width: 650px) {
  .library-invitation { padding: 18px 16px; gap: 14px; grid-template-columns: 47px 1fr; }
  .library-invitation h3 { font-size: 24px; }
  .field-book { width: 42px; height: 59px; font-size: 27px; border-left-width: 4px; }
  .library-invitation p { font-size: 14px; }
  .library-entry-actions { grid-column: 1 / -1; gap: 8px 16px; }
  .library-books { grid-template-columns: 1fr; }
  .library-trail-heading { gap: 8px; }
  .library-trail-heading h3 { font-size: 21px; }
  .library-progress { align-items: flex-start; }
  .library-progress progress { margin-top: 5px; }
  .library-filters { gap: 7px; }
  .library-filters button { font-size: 11px; padding: 9px 11px; }
  .chapter-lead { gap: 14px; align-items: flex-start; }
  .chapter-lead p { font-size: 16px; }
  .chapter-emblem { width: 43px; height: 57px; font-size: 24px; border-left-width: 4px; }
  .chapter-reading { padding-left: 16px; }
  .chapter-reading h3 { font-size: 22px; }
  .chapter-action { padding: 18px 16px; gap: 10px; }
  .chapter-challenge { padding: 19px 15px; }
  .chapter-challenge h3 { font-size: 18px; }
  .chapter-footer .primary-button { width: 100%; }
}
.passport-heading { display: flex; gap: 20px; align-items: center; margin-bottom: 22px; }
.passport-heading .big-stamp { width: 68px; height: 49px; font-size: 60px; color: #6e8961; line-height: 1; }
.passport-heading h3 { font: 700 25px Fredoka, sans-serif; margin: 0; }
.passport-heading p { font-size: 12px; color: var(--muted); margin: 6px 0; }
.stamp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.stamp { text-align: center; border: 2px dashed #d9ddc7; border-radius: 50%; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px; color: #8b9781; }
.stamp.collected { border: 2px solid #6a8c6c; color: #4b7658; background: #edf2df; transform: rotate(-6deg); }
.stamp:nth-child(even).collected { transform: rotate(5deg); }
.stamp > span { font-size: 35px; line-height: 1.2; }
.stamp strong { font: 700 12px Fredoka, sans-serif; margin-top: 4px; }
.stamp small { font-size: 9px; margin-top: 4px; }
.map-layout { display: grid; grid-template-columns: 1fr 250px; gap: 20px; align-items: center; }
#large-map { width: 100%; height: auto; background: #bee0d4; border-radius: 18px; }
.map-destinations { display: grid; gap: 6px; }
.map-destinations button { font-size: 12px; background: #edf0e1; border-radius: 8px; padding: 10px 13px; text-align: left; }
.settings-dialog { width: min(540px, calc(100% - 30px)); }
.settings-body { padding: 15px 28px 28px; overflow: auto; max-height: calc(86dvh - 115px); }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 0; border-bottom: 1px solid #e8e9db; font-size: 13px; }
input[type='range'] { width: 140px; accent-color: var(--indigo); }
.volume-setting { display: block; }
.volume-setting label { display: block; font-weight: 800; }
.volume-setting small { display: block; margin-top: 3px; font-size: 11px; font-weight: 400; }
.volume-control { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.volume-control input { flex: 1; min-width: 0; width: 100%; margin: 0; }
.volume-control output { min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; }
.volume-setting p { margin: 8px 0 0; font-size: 11px; }
input[type='checkbox'] { accent-color: var(--indigo); width: 19px; height: 19px; }
.segmented { display: flex; gap: 5px; }
.segmented button { padding: 6px 11px; border-radius: 8px; background: #eeefdf; font-size: 12px; }
.segmented button[aria-pressed='true'] { background: #d8dfbb; }
select { background: #eeefdf; border: 0; padding: 7px; border-radius: 8px; font-size: 12px; }
#edit-avatar { margin-top: 18px; }
.settings-body h3 { font: 700 20px Fredoka, sans-serif; margin-bottom: 12px; }
.controls-list { margin: 0; }
.controls-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 11px; }
.controls-list dt { color: #768368; }
.controls-list dd { margin: 0; text-align: right; }
.small-print { font-size: 10px; color: #7e886f; line-height: 1.7; margin-top: 24px; }
.toast { position: fixed; top: 101px; left: 50%; transform: translate(-50%, -15px); z-index: 20; background: var(--paper); box-shadow: var(--shadow); padding: 12px 22px; border-radius: 25px; font-size: 12px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; text-align: center; max-width: calc(100% - 30px); }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
#joystick, .touch-interact { display: none; }
.loading-cover { position: fixed; inset: 0; background: #dcebc9; z-index: 40; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 13px; }
.loading-flower { width: 68px; height: 49px; font-size: 60px; color: var(--indigo); animation: island-pulse 2s ease-in-out infinite; }
.loading-cover strong { font: 700 24px Fredoka, sans-serif; }
.loading-cover > span:last-child { font-size: 12px; color: #6c836b; }
.no-script { position: fixed; z-index: 90; inset: 0; display: grid; place-content: center; background: var(--paper); padding: 30px; }
@keyframes island-pulse { 50% { transform: translateY(-5px); opacity: .65; } }
@media (min-width: 1500px) { .arrival { left: 7%; width: 470px; } .outfitter { grid-template-columns: 155px 1fr; padding: 22px 24px 20px 12px; } #avatar-preview { height: 213px; } .avatar-options { padding-top: 4px; } fieldset { margin-top: 13px; } }
@media (max-width: 1050px) { .island-weather { display: none; } .arrival { left: 4%; width: 380px; } h1 { font-size: 53px; } .outfitter { grid-template-columns: 120px 1fr; padding-right: 14px; } .postcard-note strong { font-size: 17px; } .title-flower { font-size: 32px; } }
@media (max-height: 780px) and (min-width: 701px) { .arrival { transform: translateY(-40%); width: 390px; } h1 { font-size: 50px; margin: 10px 0; } .travel-tag { font-size: 10px; padding-top: 3px; padding-bottom: 3px; } .arrival-copy > p { font-size: 12px; max-width: 340px; margin-bottom: 12px; } .outfitter { padding-top: 11px; padding-bottom: 12px; grid-template-columns: 115px 1fr; } #avatar-preview { height: 183px; } .enter-button { padding: 12px 20px; font-size: 17px; } .arrival-foot { margin-top: 13px; font-size: 9px; } }
@media (max-width: 700px) {
  .topbar { left: 17px; right: 17px; top: max(17px, env(safe-area-inset-top)); gap: 14px; }
  .wordmark { font-size: 24px; gap: 6px; } .brand-icon { width: 35px; height: 26px; } .wordmark-small { font-size: 15px; letter-spacing: 2.8px; margin-top: 4px; }
  .round-button { width: 38px; height: 38px; } .round-button svg { width: 18px; height: 18px; }
  .top-actions { gap: 7px; } .pill-button { padding: 10px 12px; } .directory-button span:last-child { display: none; } .pill-button svg { width: 18px; height: 18px; }
  .arrival { top: auto; bottom: max(23px, env(safe-area-inset-bottom)); left: 17px; right: 17px; width: auto; transform: none; max-width: 440px; margin: 0 auto; }
  .arrival-copy { background: linear-gradient(0deg, #d8ead0c7, #d8ead000); border-radius: 20px; }
  h1 { font-size: clamp(38px, 10vw, 48px); line-height: .98; margin: 9px 0 11px; letter-spacing: -1px; } h1 br { display: none; } .title-flower { font-size: 28px; }
  .travel-tag { font-size: 10px; padding: 3px 10px; } .travel-tag > span { font-size: 18px; }
  .arrival-copy > p { font-size: 12px; max-width: 340px; margin-bottom: 14px; line-height: 1.4; }
  .outfitter { grid-template-columns: 115px 1fr; padding: 12px 15px 12px 8px; gap: 11px; border-radius: 17px 17px 6px 6px; }
  #avatar-preview { height: 183px; } .avatar-caption { font-size: 9px; } fieldset { margin-top: 8px; }
  .enter-button { font-size: 17px; padding: 12px 19px; } .arrival-foot { font-size: 9px; margin-top: 13px; }
  .postcard-note { display: none; }
  .passport-chip { top: 79px; left: 16px; padding: 9px; gap: 8px; border-radius: 12px; } .passport-icon { width: 30px; height: 35px; } .passport-chip strong { font-size: 10px; } .passport-chip span span { font-size: 8px; } .chip-chevron { display: none; }
  .quest-card { top: 78px; right: 15px; width: 160px; padding: 10px 24px 10px 11px; gap: 0; } .quest-spark { display: none; } .quest-card strong { font-size: 10px; } .quest-card div > span { font-size: 9px; }
  .movement-hint { display: none; } .minimap-button { width: 112px; right: 15px; bottom: max(26px, env(safe-area-inset-bottom)); padding: 5px 5px 9px; border-radius: 50% 50% 13px 13px; } #minimap { width: 102px; height: 89px; } .minimap-button > span { font-size: 9px; gap: 4px; } .minimap-button kbd { display: none; } .minimap-button svg { width: 12px; height: 12px; }
  .camera-buttons { right: 17px; bottom: 180px; gap: 8px; } .camera-buttons .round-button { width: 34px; height: 34px; }
  .interact-prompt { bottom: 174px; min-width: 210px; padding: 10px; gap: 11px; } .interact-prompt kbd { display: none; } .interact-prompt strong { font-size: 16px; } .interact-prompt small { font-size: 9px; }
  .journal { width: calc(100% - 20px); max-height: 90dvh; border-radius: 19px; } .journal-header { padding: 20px 20px 16px; } .journal-header h2 { font-size: 26px; } .journal-body { padding: 18px 20px 25px; max-height: calc(90dvh - 113px); } .journal-kicker { font-size: 10px; }
  .guide-grid, .project-grid, .service-grid, .learning-list { grid-template-columns: 1fr; } .destination-card { padding: 12px; } .destination-card strong { font-size: 17px; } .destination-symbol { width: 39px; height: 39px; }
  .project-card:only-child { display: block; } .project-card:only-child img { height: auto; min-height: 0; }
  .stamp-grid { grid-template-columns: repeat(3, 1fr); gap: 9px; } .stamp strong { font-size: 10px; } .stamp > span { font-size: 27px; } .stamp small { font-size: 8px; } .stamp { padding: 6px; }
  .resident-dialogue { padding: 14px; gap: 10px; } .resident-face { width: 37px; height: 37px; font-size: 25px; } .resident-dialogue p { font-size: 12px; } .map-layout { grid-template-columns: 1fr; } .map-destinations { grid-template-columns: 1fr 1fr; } .map-destinations button { font-size: 10px; }
  .lesson-box { padding: 17px; } .lesson-box h3 { font-size: 21px; } .service-note { padding: 15px; }
  .toast { top: 145px; border-radius: 14px; min-width: 220px; font-size: 11px; }
}
@media (pointer: coarse) {
  #joystick { position: absolute; bottom: max(40px, env(safe-area-inset-bottom)); left: 28px; display: grid; place-items: center; width: 108px; height: 108px; border-radius: 50%; background: #fffdf238; border: 2px solid #fffdf28c; box-shadow: inset 0 3px 12px #38655016; touch-action: none; }
  .joystick-knob { width: 45px; height: 45px; border-radius: 50%; background: #fffdf2cf; box-shadow: 0 3px 0 #c4d6af78; pointer-events: none; }
  .touch-interact { display: grid; place-items: center; position: absolute; right: 146px; bottom: 60px; width: 57px; height: 57px; border-radius: 50%; background: #fffdf2e6; color: var(--indigo); font-size: 26px; box-shadow: 0 4px 0 #c8d7b7; }
  .touch-interact:disabled { opacity: .4; cursor: default; }
  .movement-hint { display: none; }
  .swatch { width: 26px; height: 26px; }
}
@media (max-height: 680px) and (max-width: 700px) { .arrival { bottom: 13px; } .travel-tag { display: none; } h1 { font-size: 33px; margin-bottom: 7px; } .arrival-copy > p { font-size: 11px; margin-bottom: 10px; } .arrival-foot { margin-top: 11px; } }
@media (max-height: 540px) and (max-width: 950px) {
  .arrival { width: 360px; left: 20px; right: auto; top: auto; bottom: 16px; transform: none; }
  .arrival-copy { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .arrival-copy > p, .travel-tag, .arrival-foot, .avatar-caption { display: none; }
  .arrival h1 { font-size: 30px; margin: 0 0 12px; } .arrival h1 br { display: none; } .title-flower { font-size: 21px; }
  .outfitter { padding: 9px 13px 10px 8px; grid-template-columns: 103px 1fr; }
  #avatar-preview { height: 173px; } .name-label, legend { font-size: 9px; } fieldset { margin-top: 6px; }
  .enter-button { padding: 9px 16px; font-size: 16px; } .postcard-note { display: none; }
  .passport-chip, .quest-card { top: 72px; } .minimap-button { width: 112px; right: 16px; bottom: 16px; }
  #minimap { width: 92px; height: 80px; } .minimap-button > span { font-size: 9px; } .minimap-button kbd { display: none; }
  .camera-buttons { right: 18px; bottom: 153px; } .movement-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* A small conversation card leaves the actual 3D Fiona in view. */
.fiona-dialog { position: fixed; inset: auto auto 28px 32px; margin: 0; width: 370px; max-width: calc(100% - 32px); max-height: calc(100dvh - 56px); padding: 26px; overflow: auto; border: 1px solid #fffae8; background: #fff8e9; }
.fiona-dialog::backdrop { background: #3453540a; backdrop-filter: none; }
.fiona-heading { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.fiona-heading h2 { font: 700 46px/1 Fredoka, sans-serif; margin: 8px 0 12px; letter-spacing: -1px; }
.fiona-heading .journal-kicker { font-size: 10px; color: #837187; }
.fiona-dialog > p { font-size: 13px; line-height: 1.6; margin: 0 0 16px; }
.fiona-dialog .fiona-response { background: #f0e8ec; padding: 12px 14px; color: #80637b; border-radius: 12px; min-height: 66px; font-weight: 700; font-size: 12px; }
.fiona-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.fiona-actions button { background: #f5efdc; border: 1px solid #e6dec5; border-radius: 12px; min-height: 67px; font-size: 11px; font-weight: 800; color: #50654e; padding: 10px 3px; transition: background .2s, transform .2s; }
.fiona-actions button:hover { background: #e8ddc4; transform: translateY(-2px); }
.fiona-actions button span { display: block; font: 24px/1.1 Fredoka, sans-serif; margin-bottom: 5px; color: #a17a8d; }
.fiona-actions button:disabled { opacity: .5; cursor: wait; transform: none; }
.fiona-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; }
.fiona-footer .text-link { font-size: 11px; }
.fiona-dialog button.text-link { border: 0; background: transparent; color: #6e667e; padding: 8px 0; font-family: inherit; }
.fiona-sound { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #e0dec9; border-radius: 50%; background: transparent; color: #6e7966; }
.fiona-sound svg { width: 17px; height: 17px; }
.visiting-fiona .game-hud { opacity: 0; pointer-events: none; }
.visiting-fiona .island-weather { opacity: 0; }
@media (max-width: 699px) {
  .fiona-dialog { inset: auto 16px 16px; width: auto; padding: 20px; max-height: 48dvh; }
  .fiona-heading h2 { font-size: 36px; margin: 5px 0 10px; }
  .fiona-dialog > p { font-size: 12px; margin-bottom: 10px; }
  .fiona-dialog .fiona-response { padding: 9px 12px; min-height: 52px; font-size: 11px; }
  .fiona-actions button { min-height: 60px; font-size: 10px; }
  .fiona-footer { margin-top: 12px; }
}
@media (max-height: 540px) and (min-width: 700px) {
  .fiona-dialog { inset: auto auto 16px 20px; width: 330px; padding: 18px; max-height: calc(100dvh - 32px); }
  .fiona-heading h2 { font-size: 32px; }
  .fiona-dialog > p { margin-bottom: 10px; font-size: 12px; }
  .fiona-footer { margin-top: 12px; }
}

/* The pirate mast is an earned island landmark and a permanent passport reward. */
#flag-progress { display: block; width: 100%; height: 5px; margin: 10px 0 5px; }
#flag-progress-label { font-size: 9px; color: #7164aa; font-weight: 800; }
progress { appearance: none; border: 0; overflow: hidden; border-radius: 20px; background: #dce0cc; accent-color: #5c5cde; }
progress::-webkit-progress-bar { background: #dce0cc; }
progress::-webkit-progress-value { background: #5c5cde; border-radius: 20px; }
progress::-moz-progress-bar { background: #5c5cde; border-radius: 20px; }
.flag-reward { display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 24px; padding: 23px; border-radius: 18px; background: #edeafb; border: 1px solid #dcd5f1; margin: 20px 0; }
.flag-reward > img { width: 140px; height: auto; transform: rotate(-5deg); filter: drop-shadow(0 8px 0 #5c5cde15); }
.flag-reward h3 { font: 700 24px/1.15 Fredoka, sans-serif; margin: 6px 0 9px; color: #4d4a97; }
.flag-reward p { font-size: 12px; line-height: 1.6; margin: 0 0 12px; color: #62647e; }
.flag-reward progress { width: 100%; height: 6px; display: block; }
.flag-reward-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 9px; font-size: 11px; }
.flag-reward button.text-link { border: 0; background: none; padding: 7px 0; color: #5353bc; font-family: inherit; font-size: 11px; }
.flag-reward.earned { background: #ecefdc; border-color: #d9dfc3; }
.completion-notice { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px; margin-bottom: 20px; background: #eae6fa; border-radius: 14px; color: #5353b0; }
.completion-notice strong { font: 700 18px/1.2 Fredoka, sans-serif; display: block; }
.completion-notice span { display: block; font-size: 11px; margin-top: 5px; }
.completion-notice button { flex-shrink: 0; }
.flag-ceremony { position: fixed; inset: auto auto 28px 32px; margin: 0; width: 420px; max-width: calc(100% - 32px); padding: 26px; background: #fff8e9; border: 1px solid #fffdf4; }
.flag-ceremony::backdrop { background: #34465a06; backdrop-filter: none; }
.flag-ceremony .journal-kicker { color: #7061ae; letter-spacing: 1px; font-size: 10px; }
.flag-ceremony h2 { font: 700 36px/1.04 Fredoka, sans-serif; letter-spacing: -.6px; margin: 10px 0 12px; overflow-wrap: anywhere; }
.flag-ceremony p { font-size: 13px; line-height: 1.5; margin: 0 0 18px; }
.ceremony-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
#ceremony-badge { font-size: 10px; color: #7061ae; font-weight: 800; }
.ceremony-footer .primary-button { font-size: 11px; }
.raising-flag .game-hud, .raising-flag .island-weather { opacity: 0; pointer-events: none; }
@media (max-width: 699px) {
  .flag-reward { grid-template-columns: 72px 1fr; gap: 14px; padding: 17px; }
  .flag-reward > img { width: 72px; height: auto; }
  .flag-reward h3 { font-size: 21px; }
  .flag-reward p { font-size: 11px; }
  .flag-reward-foot { flex-wrap: wrap; }
  .completion-notice { align-items: flex-start; flex-direction: column; }
  .flag-ceremony { inset: auto 16px 16px; width: auto; padding: 20px; max-height: 34dvh; }
  .flag-ceremony h2 { font-size: 29px; }
  .flag-ceremony p { font-size: 12px; margin-bottom: 13px; }
  .ceremony-footer { gap: 10px; }
}
@media (max-height: 540px) and (min-width: 700px) {
  .flag-ceremony { inset: auto auto 16px 20px; width: 300px; padding: 20px; }
  .flag-ceremony h2 { font-size: 27px; }
}
