@charset "UTF-8";

@font-face {
  font-family: "Shore Hand";
  src: url("./vendor/NanumPenScript-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #344d4c;
  --muted: #657a73;
  --paper: #faf7ee;
  --serif: "Iowan Old Style", "AppleMyungjo", "Batang", "Noto Serif KR", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; }
body { overflow: hidden; color: var(--ink); font-family: var(--sans); background: #d9decd; -webkit-font-smoothing: antialiased; }
button, select, textarea { font: inherit; }
button, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, a, select, textarea { outline-offset: 5px; }
:focus-visible { outline: 2px solid #496e66; }
button { color: inherit; }
button:disabled { cursor: default; opacity: .48; }
button svg { flex-shrink: 0; }
button, select, a { touch-action: manipulation; }
button[hidden], [hidden] { display: none !important; }

#shore { position: relative; width: 100%; height: 100%; min-height: 400px; isolation: isolate; }
#shore-canvas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; background: linear-gradient(#cbdac8 0%, #e2e8d9 26%, #81b7b2 41%, #b3d8c9 53%, #dec9a8 68%, #e9d8bb 100%); }
.scene-vignette { position: absolute; pointer-events: none; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(238, 237, 213, .1), transparent 42%); transition: opacity 1.6s; }
.site-header { position: absolute; z-index: 2; top: max(31px, env(safe-area-inset-top)); left: 40px; right: 40px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; transition: opacity .5s; }
.brand-mark { width: 35px; height: 35px; opacity: .8; }
.brand-copy { display: flex; flex-direction: column; gap: 5px; }
.brand-name { font-family: var(--serif); font-size: 24px; line-height: 1; letter-spacing: -.025em; font-weight: 400; }
.brand-tagline { font-size: 8px; letter-spacing: .13em; opacity: .68; white-space: nowrap; }
.quiet-controls { display: flex; align-items: center; gap: 8px; }
.icon-button { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; padding: 7px; border-radius: 50%; background: transparent; transition: background .2s, transform .2s, opacity .2s; }
.icon-button:hover { background: rgba(248, 248, 236, .3); transform: translateY(-1px); }
.icon-button svg { width: 22px; height: 22px; }
.control-divider { height: 14px; width: 1px; background: currentColor; opacity: .2; margin: 0 4px; }
.play-icon, .sound-wave { display: none; }
#pause-button[aria-pressed="true"] .pause-icon { display: none; }
#pause-button[aria-pressed="true"] .play-icon { display: block; }
#sound-button[aria-pressed="true"] .sound-off { display: none; }
#sound-button[aria-pressed="true"] .sound-wave { display: block; }

.welcome { position: absolute; z-index: 2; top: 137px; left: 42px; pointer-events: none; transition: opacity .5s, transform .5s; }
.eyebrow { font-size: 10px; letter-spacing: .14em; opacity: .73; display: flex; align-items: center; gap: 8px; }
.eyebrow > span { width: 18px; height: 1px; background: currentColor; display: block; opacity: .55; }
.welcome h1 { font-family: var(--serif); font-size: clamp(34px, 3.4vw, 49px); font-weight: 400; line-height: 1.38; letter-spacing: -.065em; margin: 19px 0 18px; }
.welcome p { margin: 0; font-size: 12px; font-weight: 400; line-height: 1.9; letter-spacing: .01em; opacity: .76; }
.scene-loading { position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .04em; background: rgba(249, 248, 234, .7); border-radius: 30px; padding: 11px 18px; color: #46675f; transition: opacity .5s; }
.scene-loading span { display: block; height: 12px; width: 12px; border: 1px solid rgba(52, 77, 76, .25); border-top-color: #557d75; border-radius: 50%; animation: turn 1.2s linear infinite; }
.scene-loading.is-ready { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes turn { to { transform: rotate(360deg); } }

.composer-shell { position: absolute; z-index: 2; width: min(580px, calc(100% - 64px)); bottom: 86px; left: 50%; transform: translateX(-50%); transition: opacity .5s; }
.composer { padding: 20px 23px 17px; border-radius: 17px; background: rgba(253, 250, 240, .88); box-shadow: 0 8px 45px rgba(102, 83, 49, .07), inset 0 1px rgba(255, 255, 255, .65); color: #42534a; transition: background .25s, box-shadow .25s; }
.composer:focus-within { background: rgba(253, 250, 240, .93); box-shadow: 0 10px 48px rgba(102, 83, 49, .1), inset 0 1px rgba(255, 255, 255, .8); }
.composer-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.composer-heading label { font-size: 10px; letter-spacing: .045em; color: #596c5c; }
.character-count { color: #7d856f; font-size: 9px; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
#message-input { display: block; width: 100%; padding: 1px 0 0; border: 0; resize: none; background: transparent; color: #374b43; min-height: 62px; height: 62px; max-height: 120px; font-family: var(--serif); font-size: 19px; font-weight: 400; line-height: 1.65; letter-spacing: -.015em; outline: none; scrollbar-width: thin; }
#message-input::placeholder { color: #788570; opacity: 1; }
.composer-actions { margin-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sample-button { display: flex; gap: 5px; align-items: center; padding: 5px 0; border: 0; background: none; font-size: 10px; color: #5f755f; transition: color .2s; }
.sample-button svg { width: 12px; height: 12px; }
.sample-button:hover { color: #4b695a; }
.cancel-writing-button { display: none; align-items: center; gap: 5px; padding: 5px 0; border: 0; background: none; color: #637762; font-size: 10px; white-space: nowrap; }
.cancel-writing-button svg { width: 13px; height: 13px; }
.leave-button { display: flex; align-items: center; justify-content: center; gap: 17px; margin-left: auto; padding: 11px 16px 11px 19px; color: #f9f6e9; background: #476c5e; border: 0; border-radius: 8px; font-size: 11px; line-height: 1.4; letter-spacing: .015em; box-shadow: inset 0 1px rgba(255, 255, 255, .06); transition: background .2s, transform .2s; }
.leave-button:hover:not(:disabled) { background: #365c4d; transform: translateY(-1px); }
.leave-button:active { transform: translateY(0); }
.leave-button svg { width: 17px; height: 17px; }
.composer-hint { margin: 12px 0 0; text-align: center; color: #495e50; font-size: 10px; letter-spacing: .04em; opacity: .85; text-shadow: 0 1px 7px rgba(255, 248, 228, .75); }

.shore-footer { position: absolute; z-index: 2; bottom: max(27px, env(safe-area-inset-bottom)); left: 40px; right: 40px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; color: #3b5748; font-size: 10px; transition: opacity .5s; text-shadow: 0 1px 7px rgba(255, 248, 228, .6); }
.shore-footer > .wash-button { justify-self: end; }
.environment-switch { display: inline-flex; align-items: center; padding: 3px; gap: 2px; border: 1px solid rgba(71, 98, 77, .15); background: rgba(251, 245, 230, .35); border-radius: 30px; box-shadow: inset 0 1px rgba(255, 255, 255, .2); }
.environment-switch button { display: flex; align-items: center; gap: 6px; padding: 7px 13px; border: 0; border-radius: 24px; background: transparent; font-size: 10px; letter-spacing: .035em; transition: background .3s, color .3s; }
.environment-switch button svg { width: 15px; height: 15px; opacity: .85; }
.environment-switch button[aria-pressed="true"] { background: rgba(251, 249, 239, .85); color: #3d6250; box-shadow: 0 1px 7px rgba(55, 70, 43, .05); }
.environment-switch button:hover:not(:disabled) { background: rgba(251, 249, 239, .65); }
.footer-meta { display: flex; align-items: center; gap: 12px; min-width: 0; }
.day-label { color: inherit; opacity: .75; letter-spacing: .04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.footer-separator { display: inline-block; width: 1px; height: 12px; background: currentColor; opacity: .22; }
.select-wrap { display: inline-flex; align-items: center; position: relative; color: inherit; gap: 6px; padding: 7px 8px; border-radius: 30px; transition: background .2s; }
.select-wrap:hover { background: rgba(255, 255, 240, .2); }
.setting-icon { width: 16px; height: 16px; opacity: .75; flex-shrink: 0; }
.select-wrap select { appearance: none; -webkit-appearance: none; background: none; color: inherit; border: 0; padding: 0 12px 0 0; cursor: pointer; font-size: 10px; line-height: 1.6; letter-spacing: .015em; opacity: .84; }
.select-wrap select option { background: #f8f4e9; color: #3d594d; }
.select-chevron { width: 10px; height: 10px; pointer-events: none; position: absolute; right: 6px; opacity: .65; }
.note-count { opacity: .72; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-count:empty { display: none; }
.wash-button { background: rgba(252, 246, 230, .32); border: 1px solid rgba(68, 91, 67, .16); border-radius: 30px; min-height: 36px; font-size: 10px; display: flex; align-items: center; gap: 9px; padding: 8px 13px; letter-spacing: .015em; transition: background .2s, transform .2s, opacity .2s; white-space: nowrap; flex-shrink: 0; }
.wash-button svg { width: 14px; height: 14px; }
.wash-button:hover:not(:disabled) { background: rgba(252, 246, 230, .65); transform: translateY(-1px); }
.wash-button:disabled { opacity: .45; transform: none; }

.help-dialog { width: min(420px, calc(100% - 40px)); max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; padding: 40px 35px 29px; border: 0; border-radius: 18px; color: #40594d; background: #f8f5ec; box-shadow: 0 15px 90px #153c3b33; }
.help-dialog::backdrop { background: rgba(26, 50, 46, .25); }
.help-close { position: absolute; top: 11px; right: 11px; color: #6c8173; }
.help-dialog h2 { font-family: var(--serif); font-size: 29px; line-height: 1.5; letter-spacing: -.055em; font-weight: 400; margin: 24px 0 17px; }
.help-dialog p { font-size: 12px; line-height: 1.95; margin: 0; opacity: .83; }
.help-dialog .wash-explanation { margin-top: 14px; }
.help-dialog .privacy-note { margin-top: 22px; color: #7b8576; font-size: 11px; }
.scenery-settings { margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(85, 110, 89, .12); font-size: 11px; color: #61745f; }
.scenery-settings summary { display: flex; justify-content: space-between; align-items: center; cursor: pointer; list-style: none; line-height: 1.8; }
.scenery-settings summary::-webkit-details-marker { display: none; }
.scenery-settings summary::after { content: "+"; font-size: 16px; line-height: 1; font-weight: 300; opacity: .65; }
.scenery-settings[open] summary::after { content: "−"; }
.scenery-options { padding-top: 13px; }
.scenery-setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.setting-name { display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; }
.scenery-setting .select-wrap { min-width: 132px; padding: 7px 10px; border-radius: 7px; background: rgba(227, 232, 212, .65); }
.scenery-setting .select-wrap select { width: 100%; padding-right: 17px; font-size: 11px; opacity: 1; }
.scenery-setting .select-chevron { right: 8px; }
.help-dialog .sky-setting-hint { margin-top: 13px; font-size: 10px; color: #7b8576; line-height: 1.9; }
.message-transcript { font-size: 11px; margin-top: 15px; color: #7b8576; line-height: 1.8; }
.message-transcript summary { cursor: pointer; }
#message-list { padding-left: 19px; max-height: 160px; overflow-y: auto; }
#message-list li { margin-top: 7px; white-space: pre-wrap; overflow-wrap: anywhere; }
.dialog-signature { display: block; margin-top: 29px; font-size: 8px; letter-spacing: .25em; opacity: .4; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

body[data-theme="night"] { --ink: #e3e8dc; --muted: #bbc6b8; }
body[data-theme="night"] .scene-vignette { opacity: .15; }
body[data-theme="night"] .welcome p { color: #304551; opacity: .95; }
body[data-theme="night"] .composer-hint { color: #354d3b; text-shadow: 0 1px 7px rgba(248, 241, 212, .9); }
body[data-theme="night"] .shore-footer { color: #304c39; text-shadow: 0 1px 7px rgba(248, 241, 212, .85); }
body[data-theme="night"] .wash-button { background: rgba(252, 246, 230, .25); border-color: rgba(48, 76, 57, .25); }
body[data-theme="night"] .wash-button:hover:not(:disabled) { background: rgba(252, 246, 230, .45); }
body[data-focus="true"] .welcome { opacity: 0; transform: translateY(-8px); }
body[data-focus="true"] .brand,
body[data-focus="true"] .quiet-controls > :not(#focus-button),
body[data-focus="true"] .composer-shell,
body[data-focus="true"] .shore-footer { opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .5s, visibility 0s .5s; }
body[data-focus="true"] #focus-button { background: rgba(246, 247, 232, .25); box-shadow: 0 1px 8px rgba(25, 47, 37, .05); }
body[data-editor="writing"] .welcome,
body[data-editor="inscribing"] .welcome,
body[data-editor="returning"] .welcome,
body[data-turning="true"] .welcome,
body[data-environment="fire"][data-washing="true"] .welcome { opacity: 0; transform: translateY(-8px); }
body[data-turning="true"] .composer-shell { opacity: .2; pointer-events: none; }
body[data-turning="true"] .environment-switch { opacity: .6; }
body[data-editor="writing"] .cancel-writing-button { display: flex; }
body[data-editor="writing"] .sample-button { display: none; }
body[data-editor="inscribing"] .composer-shell,
body[data-editor="returning"] .composer-shell { opacity: .5; pointer-events: none; }
body[data-editor="writing"] .environment-switch,
body[data-editor="inscribing"] .environment-switch,
body[data-editor="returning"] .environment-switch { opacity: .45; pointer-events: none; }
body[data-environment="fire"] { --ink: #534737; --muted: #81745f; }
body[data-environment="fire"] .composer { background: rgba(251, 243, 226, .92); color: #65543d; box-shadow: 0 8px 45px rgba(57, 36, 14, .1), inset 0 1px rgba(255, 251, 236, .8); }
body[data-environment="fire"] #message-input { color: #594634; }
body[data-environment="fire"] .composer-heading label,
body[data-environment="fire"] .cancel-writing-button,
body[data-environment="fire"] .sample-button { color: #887153; }
body[data-environment="fire"] .leave-button { background: #886147; color: #fcf3e0; }
body[data-environment="fire"] .leave-button:hover:not(:disabled) { background: #765037; }
body[data-environment="fire"] .composer-hint,
body[data-environment="fire"] .shore-footer { color: #715940; text-shadow: 0 1px 6px rgba(255, 249, 231, .7); }
body[data-environment="fire"] .wash-button { background: rgba(252, 246, 230, .28); border-color: rgba(105, 76, 45, .27); }
body[data-environment="fire"] .wash-button:hover:not(:disabled) { background: rgba(163, 111, 61, .36); }
body[data-environment="fire"] .environment-switch { background: rgba(65, 53, 37, .23); border-color: rgba(239, 216, 174, .3); }
body[data-environment="fire"] .environment-switch button[aria-pressed="true"] { color: #775039; background: rgba(251, 240, 220, .91); }
body[data-environment="fire"] #pace-setting { display: none; }
body[data-environment="fire"][data-theme="night"] { --ink: #efe4cf; }
body[data-environment="fire"][data-theme="night"] .welcome p { color: #ded4bb; }
body[data-environment="fire"][data-theme="night"] .composer-hint,
body[data-environment="fire"][data-theme="night"] .shore-footer { color: #e6d2ad; text-shadow: 0 1px 6px rgba(30, 26, 17, .45); }
body[data-environment="fire"][data-theme="night"] .wash-button { background: rgba(142, 99, 54, .22); border-color: rgba(239, 216, 174, .32); }

@media (min-width: 1600px) {
  .site-header, .shore-footer { left: 52px; right: 52px; }
  .welcome { left: 54px; }
  .composer-shell { bottom: 95px; }
}

@media (max-width: 900px) {
  .site-header, .shore-footer { left: 26px; right: 26px; }
  .welcome { left: 28px; top: 119px; }
  .welcome h1 { font-size: 39px; }
  .shore-footer { gap: 12px; }
  .footer-meta { gap: 9px; }
  .day-label { font-size: 9px; }
}

@media (max-width: 640px) {
  #shore { min-height: 320px; height: var(--viewport-height, 100dvh); }
  .site-header { top: max(22px, env(safe-area-inset-top)); left: 22px; right: 18px; }
  .brand { gap: 9px; }
  .brand-mark { width: 27px; height: 27px; }
  .brand-name { font-size: 20px; }
  .brand-copy { gap: 4px; }
  .brand-tagline { font-size: 7px; letter-spacing: .1em; }
  .quiet-controls { gap: 1px; }
  .icon-button { width: 32px; height: 32px; padding: 7px; }
  .icon-button svg { width: 18px; height: 18px; }
  .control-divider { margin: 0 3px; height: 11px; }
  .welcome { top: 107px; left: 24px; }
  .eyebrow { font-size: 8px; gap: 6px; letter-spacing: .08em; }
  .eyebrow > span { width: 13px; }
  .welcome h1 { font-size: 34px; line-height: 1.42; margin: 14px 0 13px; letter-spacing: -.075em; }
  .welcome p { font-size: 10px; line-height: 1.85; }
  .composer-shell { width: calc(100% - 36px); bottom: max(115px, calc(env(safe-area-inset-bottom) + 96px)); }
  .composer { border-radius: 14px; padding: 16px 17px 13px; background: rgba(253, 250, 240, .88); }
  .composer-heading { margin-bottom: 9px; }
  .composer-heading label { font-size: 9px; }
  .character-count { font-size: 8px; }
  #message-input { font-size: 17px; line-height: 1.6; height: 56px; min-height: 56px; }
  .composer-actions { margin-top: 10px; }
  .sample-button { font-size: 9px; }
  .sample-button svg { width: 10px; height: 10px; }
  .leave-button { font-size: 10px; gap: 10px; padding: 10px 13px 10px 14px; border-radius: 7px; }
  .leave-button svg { width: 14px; height: 14px; }
  .composer-hint { font-size: 9px; margin-top: 10px; }
  .shore-footer { bottom: max(18px, env(safe-area-inset-bottom)); left: 20px; right: 20px; grid-template-columns: 1fr auto; align-items: end; gap: 9px 12px; }
  .environment-switch { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .environment-switch button { padding: 6px 12px; font-size: 9px; }
  .footer-meta { grid-row: 2; }
  .shore-footer > .wash-button { grid-row: 2; }
  .cancel-writing-button { font-size: 9px; }
  body[data-editor="writing"] .composer-shell { bottom: max(22px, env(safe-area-inset-bottom)); }
  body[data-editor="writing"] .composer { padding: 12px 17px; }
  body[data-editor="writing"] #message-input { height: 45px; min-height: 45px; }
  body[data-editor="writing"] .composer-actions { margin-top: 8px; }
  body[data-editor="writing"] .shore-footer { opacity: 0; visibility: hidden; pointer-events: none; }
  .footer-meta { flex: 1; flex-direction: column; align-items: flex-start; gap: 5px; }
  .footer-separator { display: none; }
  .day-label { font-size: 9px; padding-left: 3px; }
  .note-count { display: block; max-width: 100%; padding-left: 3px; font-size: 9px; }
  .setting-icon { width: 14px; height: 14px; }
  .wash-button { min-height: 34px; font-size: 10px; padding: 7px 10px; gap: 7px; letter-spacing: 0; }
  .wash-button svg { width: 12px; height: 12px; }
  .help-dialog { padding: 33px 25px 27px; }
  .help-dialog h2 { font-size: 27px; }
  .scene-loading { white-space: nowrap; top: 45%; font-size: 10px; }
}

@media (max-height: 650px) and (max-width: 640px) {
  .welcome { top: 84px; }
  .welcome .eyebrow { display: none; }
  .welcome h1 { font-size: 27px; line-height: 1.36; margin: 0 0 10px; }
  .welcome p span { display: none; }
  .composer-shell { bottom: max(106px, calc(env(safe-area-inset-bottom) + 88px)); }
  .composer { padding-top: 13px; }
  #message-input { height: 44px; min-height: 44px; font-size: 15px; }
  .composer-actions { margin-top: 7px; }
  .shore-footer { bottom: max(15px, env(safe-area-inset-bottom)); }
}

@media (max-height: 450px) {
  .welcome { opacity: 0; visibility: hidden; }
  .site-header { top: 12px; }
  .composer-shell { bottom: 59px; max-width: 500px; }
  .composer { padding: 12px 18px; }
  #message-input { height: 38px; min-height: 38px; }
  .composer-actions { margin-top: 5px; }
  .composer-hint { display: none; }
  .shore-footer { bottom: 12px; }
  .environment-switch { display: none; }
  .day-label { display: none; }
}

body[data-empty="false"]:not([data-writing="true"]) .composer:not(:focus-within) { padding: 10px 18px; }
body[data-empty="false"]:not([data-writing="true"]) .composer:not(:focus-within) .composer-heading { margin-bottom: 4px; }
body[data-empty="false"]:not([data-writing="true"]) .composer:not(:focus-within) #message-input { height: 28px; min-height: 28px; font-size: 17px; line-height: 1.6; }
body[data-empty="false"]:not([data-writing="true"]) .composer:not(:focus-within) .composer-actions { margin-top: 4px; }
body[data-empty="false"]:not([data-writing="true"]) .composer:not(:focus-within) .leave-button { padding: 7px 13px; font-size: 10px; }
body[data-empty="false"]:not([data-writing="true"]) .composer-shell:not(:focus-within) .composer-hint { margin-top: 9px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
