:root { color-scheme: light; --paper: #f5efdf; --ink: #443d31; --muted: #807460; --line: #dedbcf; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 2px solid #617d69; outline-offset: 5px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
::selection { color: #2a453a; background: #dde4ce; }
.page { min-height: 100svh; position: relative; isolation: isolate; background: #b9a98f; }
.skip-link { position: fixed; top: 12px; left: 20px; z-index: 10; padding: 12px 18px; background: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.site-header { position: absolute; z-index: 3; inset: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 30px 4vw; color: #fff3dd; text-shadow: 0 1px 14px #35291370; }
.wordmark { font: 700 36px/.95 Georgia, serif; letter-spacing: -.045em; }
.site-header nav { display: flex; gap: 30px; }
.site-header nav a { min-height: 44px; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.site-header nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.resident-marker { position: absolute; z-index: 1; transform: translate(-50%, -100%); margin-top: -3px; color: #fff9e9; background: #45695ce8; border: 1px solid #fff5d966; border-radius: 20px; font-size: 10px; padding: 3px 7px; pointer-events: none; }
.ferry-marker { position: absolute; z-index: 2; transform: translate(-50%, 8px); min-height: 36px; padding: 7px 12px; border: 1px solid #ffffff91; border-radius: 20px; color: #375a51; background: #f4f0dfed; font-size: 10px; box-shadow: 0 3px 15px #294a3820; }
.ferry-marker:disabled { cursor: default; opacity: .85; }
.ferry-panel { position: absolute; z-index: 3; bottom: 125px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 13px; width: max-content; max-width: calc(100% - 40px); padding: 12px 16px; border: 1px solid #fffc; border-radius: 16px; background: #f5f0e5ee; color: #375a51; box-shadow: 0 6px 25px #234a3524; }
.ferry-panel p { font-size: 11px; }
.ferry-panel button { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 24px; background: #476d60; color: #fff8e8; font-size: 12px; white-space: nowrap; }
.ferry-panel button:disabled { opacity: .6; cursor: default; }
.ferry-key-hint { font-size: 10px; opacity: .65; }
.room-stage:not([data-renderer="ready"]) :is(.ferry-marker, .ferry-panel), .room-stage[data-show-apps="true"] :is(.ferry-marker, .ferry-panel) { display: none; }
.room-stage[data-ferry="boarding"] .walk-controls, .room-stage[data-ferry="sailing"] .walk-controls, .room-stage[data-ferry="arrived"] .walk-controls, .room-stage[data-ferry="landing"] .walk-controls { visibility: hidden; }
@media (max-width: 700px) { .ferry-panel { bottom: 167px; flex-direction: column; gap: 7px; padding: 12px 18px; } .ferry-key-hint { display: none; } }
.walk-controls { display: none; position: absolute; left: 24px; bottom: 150px; z-index: 3; flex-direction: column; align-items: center; gap: 7px; }
.room-stage[data-show-apps="true"] .walk-controls { visibility: hidden; pointer-events: none; }
#walk-joystick { position: relative; display: grid; place-items: center; width: 94px; height: 94px; padding: 0; background: #f3efdf59; border: 1px solid #f7f1dfad; border-radius: 50%; touch-action: none; user-select: none; -webkit-user-select: none; }
.joystick-knob { width: 38px; height: 38px; display: block; background: #f5efdfeb; border: 1px solid #789c88; border-radius: 50%; pointer-events: none; box-shadow: 0 3px 12px #3c614326; }
#walk-joystick.is-active { background: #e8efcf82; border-color: #476d60; }
.joystick-caption { font-size: 10px; letter-spacing: .15em; color: #fff5df; pointer-events: none; }
.room-stage:not([data-renderer="ready"]) .resident-marker { display: none; }
@media (max-width: 700px), (pointer: coarse) { .walk-controls { display: flex; } }
.ui-icon { display: block; width: 14px; height: 14px; opacity: .7; }
.site-header .ui-icon { filter: invert(1); }
.main { min-height: 100svh; }
.intro { position: absolute; z-index: 2; left: 4vw; top: 101px; pointer-events: none; color: #fff3dd; text-shadow: 0 1px 18px #35291370; }
.intro .eyebrow { margin: 0 0 9px; font-size: 9px; letter-spacing: .22em; color: #e5d5bb; }
.intro h1 { font-family: "Songti SC", "STSong", Georgia, serif; font-size: 28px; font-weight: 500; letter-spacing: .055em; line-height: 1.4; }
.intro p { margin-top: 12px; font-size: 12px; color: #efe1ca; line-height: 1.9; letter-spacing: .03em; }
.intro p:not(.eyebrow) { display: none; }
.intro p span { display: block; }
.room-stage { position: relative; width: 100%; height: 100svh; overflow: hidden; }
.room-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: 0; cursor: grab; transition: opacity .65s; touch-action: none; }
.room-canvas.is-dragging { cursor: grabbing !important; }
.room-stage[data-renderer="ready"] .room-canvas { opacity: 1; }
.room-stage:not([data-renderer="ready"]) .room-canvas { pointer-events: none; visibility: hidden; }
.room-stage:not([data-renderer="ready"]) { height: auto; min-height: 100svh; }
.page:has(.room-stage:not([data-renderer="ready"])) { background: var(--paper); }
.page:has(.room-stage:not([data-renderer="ready"])) :is(.site-header, .intro, .intro p, .site-footer) { color: var(--ink); text-shadow: none; }
.page:has(.room-stage:not([data-renderer="ready"])) .site-header .ui-icon { filter: none; }
.objects { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 570px; margin: 0 auto; padding: 260px 24px 130px; gap: 8px 16px; position: relative; z-index: 2; }
.objects-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.objects-heading p { color: #8a8979; font-size: 10px; letter-spacing: .1em; margin-bottom: 7px; }
.objects-heading h2 { font: 500 22px/1.4 "Songti SC", "STSong", Georgia, serif; color: #4e594b; }
#close-objects { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: transparent; border-radius: 50%; }
.shelf-filters { grid-column: 1 / -1; display: flex; gap: 6px; padding: 4px; margin-bottom: 10px; border-radius: 12px; background: #e8e7dc; }
.shelf-filters button { flex: 1; min-height: 44px; padding: 10px 8px; border: 0; border-radius: 9px; background: transparent; color: #727669; font-size: 12px; }
.shelf-filters button[aria-pressed="true"] { color: #3d594b; background: #fffdf5; box-shadow: 0 2px 7px #3146340b; }
.shelf-filters span { margin-left: 5px; font-size: 10px; opacity: .65; }
.shelf-collection { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.shelf-note { grid-column: 1 / -1; color: #7c796e; font-size: 12px; line-height: 1.9; padding: 4px 2px 14px; }
.shelf-ended .room-object { grid-column: 1 / -1; padding: 14px 12px; border: 1px solid #dcd8cb; background: #ebe7db80; }
.shelf-ended .object-copy small { color: #8b7160; }
.room-object { display: flex; align-items: center; gap: 11px; min-width: 0; min-height: 62px; padding: 8px 4px; border-radius: 7px; color: #4c5c50; }
.room-object:hover, .room-object:focus-visible { background: #e5e7dc; }
.room-object img { flex: none; width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.object-copy { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.object-name { font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.object-copy small { font-size: 9px; color: #8a907f; }
.page:has(.room-stage:not([data-renderer="ready"])) .skip-link { display: none; }
.room-stage[data-renderer="ready"][data-show-apps="true"] .objects { position: absolute; right: 4vw; bottom: 118px; display: grid; width: min(460px, calc(100% - 48px)); max-height: calc(100svh - 230px); margin: 0; padding: 25px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #fff9; border-radius: 16px; background: #f2efe5f7; box-shadow: 0 12px 55px #263d3826; backdrop-filter: blur(18px); scrollbar-width: thin; }
.room-stage[data-renderer="ready"][data-show-apps="true"] #close-objects { display: flex; }
.bookcase-marker { pointer-events: none; position: absolute; z-index: 1; transform: translate(-50%, -100%); min-width: 72px; min-height: 36px; padding: 8px 10px; opacity: 0; border: 1px solid #fff7; border-radius: 20px; background: #f2ebdfe8; color: #65725d; font-size: 10px; transition: opacity .16s; }
.bookcase-marker:is(:hover, :focus-visible, .is-hovered) { opacity: 1; }
.room-stage[data-show-apps="true"] .bookcase-marker { visibility: hidden; }
.room-tools { position: absolute; z-index: 3; left: 4vw; right: 4vw; bottom: 51px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.room-hint { color: #fff3dd; font-size: 11px; line-height: 1.85; text-shadow: 0 1px 10px #45331d; }
.room-hint span { display: block; }
.room-buttons { display: flex; align-items: center; gap: 12px; }
.room-tools button { padding: 12px 20px; min-height: 44px; border: 1px solid #6f583632; border-radius: 30px; background: #f2e9dcd9; font-size: 11px; color: #574b38; backdrop-filter: blur(10px); }
.room-tools button:hover { background: #fbf1e4; }
#reset-view { background: #efe0cb78; }
.site-footer { position: absolute; z-index: 2; inset: auto 4vw 21px; display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 10px; color: #fff0d7; text-shadow: 0 1px 10px #45331d; }
.site-footer a:hover { color: var(--ink); }
.paper-panel { padding: 0; color: var(--ink); background: var(--paper); border: 1px solid #e4dfd2; border-radius: 12px; width: min(440px, calc(100% - 36px)); max-height: calc(100svh - 48px); margin: auto; box-shadow: 0 18px 70px #3c473721; overscroll-behavior: contain; }
.paper-panel::backdrop { background: #38483728; backdrop-filter: blur(5px); }
.panel-inner { position: relative; padding: 38px 34px 32px; }
.panel-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center; }
.panel-close .ui-icon { width: 23px; height: 23px; }
.app-detail-icon { width: 64px; height: 64px; object-fit: cover; border-radius: 15px; margin-bottom: 22px; }
.panel-kicker { color: var(--muted); font-size: 11px; letter-spacing: .05em; margin-bottom: 10px; }
.paper-panel h2 { font-family: "Songti SC", "STSong", Georgia, serif; font-size: 28px; font-weight: 500; line-height: 1.5; }
/* Dialogs initially focus their title; interactive controls retain keyboard outlines. */
.paper-panel h2[tabindex="-1"]:focus { outline: none; }
.panel-description { margin-top: 15px; color: #727769; font-size: 14px; line-height: 1.9; }
.preview-link { display: inline-flex; align-items: center; gap: 13px; padding: 12px 0 6px; margin-top: 23px; border-bottom: 1px solid #8e9b83; font-size: 13px; }
.preview-link:hover .ui-icon { transform: translate(2px, -2px); }
.about-panel h2 { margin-bottom: 18px; }
.about-panel p:not(.panel-kicker) { font-size: 14px; line-height: 1.9; color: #6c7568; margin-bottom: 12px; }
.about-email { display: inline-block; font-size: 13px; line-height: 1.8; margin-top: 8px; border-bottom: 1px solid #aab19d; }
.panel-legal { display: flex; flex-wrap: wrap; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); gap: 14px; font-size: 10px; color: var(--muted); }
.panel-legal span { margin-left: auto; }
.paper-panel:target:not([open]) { display: block; position: fixed; inset: 0; z-index: 8; }
@media (max-width: 700px) {
    .site-header { padding: 22px 24px; }
    .wordmark { font-size: 32px; }
    .site-header nav { gap: 23px; }
    .site-header nav a { font-size: 12px; }
    .intro { left: 26px; top: 116px; }
    .intro .eyebrow { font-size: 9px; margin-bottom: 12px; }
    .intro h1 { font-size: 29px; }
    .intro p { margin-top: 10px; font-size: 11px; }
    .intro p:not(.eyebrow) { display: block; }
    .room-tools { left: 24px; right: 24px; bottom: 52px; flex-direction: column; gap: 17px; }
    .room-hint { text-align: center; font-size: 10px; }
    .room-hint span { display: inline; margin-left: .3em; }
    .room-tools button { padding: 12px 21px; }
    .site-footer { inset: auto 24px 19px; font-size: 9px; gap: 10px; }
    .site-footer p { white-space: nowrap; }
    .objects { padding-top: 270px; gap: 8px 12px; }
    .room-stage[data-renderer="ready"][data-show-apps="true"] .objects { right: 18px; bottom: 145px; width: calc(100% - 36px); padding: 20px 16px; max-height: calc(100svh - 240px); gap: 5px 10px; }
    .room-object img { width: 30px; height: 30px; border-radius: 7px; }
    .room-object { gap: 8px; }
    .room-object { font-size: 11px; }
    .panel-inner { padding: 35px 28px 29px; }
}
@media (max-height: 650px) and (min-width: 701px) {
    .site-header { padding: 15px 4vw; }
    .wordmark { font-size: 29px; }
    .intro { top: 82px; }
    .intro .eyebrow { display: none; }
    .intro h1 { font-size: 23px; }
    .room-tools { bottom: 36px; }
    .site-footer { bottom: 12px; }
}
@media (max-height: 680px) and (max-width: 700px) {
    .intro { top: 91px; }
    .intro h1 { font-size: 25px; }
    .intro p { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* The ocean is the page background in the default orthographic island view. */
.page { background: #bed8cf; }
.site-header, .intro, .intro p, .room-hint, .site-footer { color: #fff5df; text-shadow: 0 1px 10px #083b5266; }
.intro .eyebrow { color: #e4eee0; }
.site-header .ui-icon { filter: none; }
.room-tools button { border-color: #56766930; background: #f6f1e5ed; color: #435d51; }
#toggle-view { background: #476d60; color: #fff8e8; border-color: #476d60; }
#toggle-view:hover { background: #365a4e; }
#reset-view { background: #edf3e6aa; }
.page:has(.room-stage[data-view="room"][data-renderer="ready"]) .intro { display: none; }
.page:has(.room-stage[data-following="true"]) .intro { display: none; }
.page:has(.room-stage[data-view="room"][data-renderer="ready"]) .site-header { padding-top: 15px; color: #375a51; text-shadow: none; }
.page:has(.room-stage[data-view="room"][data-renderer="ready"]) .wordmark { font-size: 30px; }
.page:has(.room-stage[data-view="room"][data-renderer="ready"]) .room-hint { color: #fff6e5; text-shadow: 0 1px 9px #4a3d27; }
@media (max-width: 700px) {
    .room-buttons { gap: 7px; }
    .room-tools button { padding: 12px 13px; font-size: 10px; }
    .intro h1 { font-size: 27px; }
    .intro p:not(.eyebrow) { display: none; }
}

/* The character marker also provides an accessible greeting action. */
button.resident-marker { pointer-events: auto; cursor: pointer; font-family: inherit; line-height: 1.3; }
button.resident-marker:hover { background: #365a4e; }

/* A compact weather clock expands only when the visitor wants to change the scene. */
.island-weather { position: absolute; z-index: 4; right: 4vw; top: 100px; color: #3d5b53; font-size: 11px; }
.island-weather summary { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 0 15px; border: 1px solid #f5f5e875; border-radius: 24px; background: #f5f1e3db; backdrop-filter: blur(14px); cursor: pointer; list-style: none; box-shadow: 0 4px 22px #214c3810; }
.island-weather summary::-webkit-details-marker { display: none; }
.island-weather summary:focus-visible, .weather-settings input:focus-visible { outline: 2px solid #617d69; outline-offset: 5px; }
.weather-symbol { font-size: 18px; line-height: 1; }
.weather-divider { height: 13px; width: 1px; background: #708c6b40; }
#island-clock, #island-time-label { font-variant-numeric: tabular-nums; letter-spacing: .035em; }
.weather-chevron { color: #7e8d7d; font-size: 15px; }
.island-weather[open] .weather-chevron { transform: rotate(180deg); }
.weather-settings { position: absolute; right: 0; margin-top: 10px; width: 272px; padding: 20px; border-radius: 17px; background: #f4f1e7f5; box-shadow: 0 12px 42px #183b3626; border: 1px solid #fffc; backdrop-filter: blur(18px); }
.weather-caption { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.weather-caption span { color: #849084; font-size: 10px; }
.weather-options { display: flex; padding: 4px; margin: 13px 0 24px; gap: 3px; border-radius: 10px; background: #e4e8dc; }
.weather-options button { flex: 1; min-height: 40px; padding: 8px 5px; border: 0; border-radius: 7px; background: transparent; font-size: 11px; }
.weather-options button[aria-pressed="true"] { background: #fffdf5; box-shadow: 0 2px 7px #314e3812; color: #365c4d; }
.time-label { display: flex; justify-content: space-between; font-size: 12px; }
#island-time { display: block; width: 100%; margin: 15px 0 4px; height: 24px; accent-color: #567965; cursor: pointer; }
.time-ticks { display: flex; justify-content: space-between; color: #839082; font-size: 9px; }
.time-actions { display: flex; align-items: center; justify-content: space-between; min-height: 34px; margin-top: 12px; color: #7b887c; font-size: 10px; }
.time-actions button { border: 0; border-bottom: 1px solid #a5b4a3; background: transparent; padding: 10px 0; color: #3f6b56; font-size: 10px; }
.page:has(.room-stage[data-night="true"][data-renderer="ready"]) :is(.site-header, .intro, .intro .eyebrow, .room-hint, .site-footer, .joystick-caption) { color: #e1e8df; }
.page:has(.island-weather[open]) .walk-controls { visibility: hidden; }
@media (max-width: 700px) {
    .island-weather { top: 78px; right: 24px; font-size: 10px; }
    .island-weather summary { min-height: 34px; gap: 8px; padding: 0 12px; }
    .weather-symbol { font-size: 16px; }
    .weather-settings { width: min(272px, calc(100vw - 48px)); }
    .page:has(.room-stage[data-view="room"]) .island-weather { top: 67px; }
}
@media (max-height: 600px) {
    .island-weather { top: 65px; }
    .weather-settings { max-height: calc(100svh - 125px); overflow-y: auto; }
}

@media (max-height: 650px) {
    .room-stage[data-renderer="ready"][data-show-apps="true"] .objects { bottom: 105px; max-height: calc(100svh - 180px); }
}

.app-hover-label { position: absolute; z-index: 2; transform: translate(-50%, -100%); padding: 7px 11px; border-radius: 16px; background: #f4efdfed; color: #53604f; box-shadow: 0 3px 15px #243d2a14; font-size: 10px; white-space: nowrap; pointer-events: none; }

/* The catalogue is available only after the scene is ready and explicitly opened. */
.scene-loading-message, .scene-failure-message, .scene-slow-message { display: none; }
html[data-scene-boot="loading"] .room-stage:not([data-renderer]):not([data-show-apps="true"]) { height: 100svh; }
html[data-scene-boot="loading"] .page:has(.room-stage:not([data-renderer]):not([data-show-apps="true"])) { background: #bed8cf; }
html[data-scene-boot="loading"] .room-stage:not([data-renderer]):not([data-show-apps="true"]) .scene-loading-message { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px; pointer-events: none; color: #48685d; font-size: 12px; letter-spacing: .08em; }
.scene-loading-dot { width: 8px; height: 8px; border-radius: 50%; background: #648777; box-shadow: -18px 0 #64877755, 18px 0 #64877755; animation: scene-loading-pulse 1.4s ease-in-out infinite; }
@keyframes scene-loading-pulse { 50% { opacity: .3; } }
.room-stage[data-renderer="fallback"] .scene-failure-message,
html[data-scene-boot="slow"] .room-stage:not([data-renderer]) .scene-slow-message,
.scene-noscript-message { display: flex; position: absolute; inset: 0 24px; align-items: center; justify-content: center; flex-direction: column; gap: 16px; text-align: center; font-size: 12px; line-height: 1.7; color: #748073; }
.scene-retry { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 22px; border: 1px solid var(--line); border-radius: 24px; color: var(--ink); }
.scene-retry:hover { background: #e5e7dc; }
@media (prefers-reduced-motion: reduce) { .scene-loading-dot { animation: none; } }
