* { box-sizing: border-box }
:root { color-scheme: light; --ink: #1c3638; --paper: #f5f6f1; --rule: #cbd4cc; font-family: "Hedvig Letters Sans", system-ui, sans-serif; color: var(--ink); background: var(--paper) }
body { margin: 0 }
a { color: inherit; text-decoration: none }
button, input, select { font: inherit; color: inherit }
button, select { cursor: pointer }
[hidden] { display: none !important }
:focus-visible { outline: 3px solid #106e75; outline-offset: 4px }
.mast, .shore, .room-inner, .about-inner { width: min(100% - clamp(2rem,7vw,8rem), 104rem); margin-inline: auto }
.mast { min-height: 5.1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem }
.brand { display: inline-flex; gap: .55rem; align-items: center; font: 500 2.05rem/1 Georgia, serif; letter-spacing: -.07em }
.mark { width: 1.03em; height: .98em; position: relative; overflow: hidden; display: inline-block }
.mark::before { content: ''; position: absolute; width: .9em; height: .9em; top: .05em; border-radius: 50%; background: linear-gradient(to bottom, currentColor 0 53%, transparent 53% 59%, currentColor 59% 67%, transparent 67% 74%, currentColor 74% 80%, transparent 80% 87%, currentColor 87%) }
.menu, .dial, .controls { display: flex; align-items: center }
.menu { gap: clamp(.65rem,2.6vw,3rem); font-size: .93rem }
.menu a:hover { text-decoration: underline; text-underline-offset: .25em }
.language-picker { border: 0; border-left: 1px solid var(--rule); border-radius: 0; padding: .55rem 1.15rem .55rem clamp(.5rem,1.7vw,1.5rem); appearance: none; background: linear-gradient(45deg,transparent 50%,currentColor 51%) right .65rem center/.27rem .27rem no-repeat,linear-gradient(135deg,currentColor 50%,transparent 51%) right .4rem center/.27rem .27rem no-repeat }
.print { position: relative; height: clamp(29rem,72svh,58rem); overflow: hidden; isolation: isolate; background: linear-gradient(#efdbc5,#f1d9ad 58%,#789897 59%,#466b72) }
.landscape, .water canvas { display: block; width: 100%; height: 100% }
.water { position: absolute; inset: 62% 0 0; border: 0; padding: 0; width: 100%; background: transparent; touch-action: pan-y pinch-zoom; cursor: grab; user-select: none; -webkit-tap-highlight-color: transparent }
.water:active { cursor: grabbing }
.water:focus-visible { outline-offset: -5px; outline-color: white }
.invitation { position: absolute; top: 22%; left: 6.2%; max-width: 48%; pointer-events: none; color: #263f40 }
h1, h2 { margin: 0; font-family: Georgia, "Songti SC", "Noto Serif CJK JP", "Noto Serif CJK SC", serif; font-weight: 400 }
h1 { font-size: clamp(1.85rem,3.4vw,3.8rem); letter-spacing: -.035em; line-height: 1.22; text-wrap: balance }
.invitation p { font-size: clamp(.94rem,1.08vw,1.1rem); line-height: 1.65; margin: .8rem 0 0; max-width: 31ch }
.shore.dark .invitation { color: #fff1d7 }
.controls { justify-content: space-between; gap: 1rem; padding: 1rem clamp(.5rem,1.2vw,1rem); border-bottom: 1px solid var(--rule); font-size: .94rem }
.dial { gap: clamp(.5rem,1.4vw,1.5rem) }
.slider { position: relative; display: flex; align-items: center }
.slider::before { content: ""; position: absolute; inset: auto 7px 4px; height: 3px; pointer-events: none; background: repeating-linear-gradient(90deg, #788e86 0 1px, transparent 1px 8.3%) }
#light { cursor: pointer; width: clamp(5rem,13vw,13rem); height: 30px; margin: 0; background: transparent; appearance: none }
#light::-webkit-slider-runnable-track { height: 4px; background: linear-gradient(90deg,#d5ac76,#a9c6bd,#ba8c7f,#394966); border-radius: 3px }
#light::-webkit-slider-thumb { appearance: none; margin-top: -6px; width: 16px; height: 16px; border: 2px solid var(--paper); background: var(--ink); border-radius: 50%; box-shadow: 0 0 0 1px var(--ink) }
#light::-moz-range-track { height: 4px; background: linear-gradient(90deg,#d5ac76,#a9c6bd,#ba8c7f,#394966) }
#light::-moz-range-thumb { width: 13px; height: 13px; background: var(--ink); border: 2px solid var(--paper); border-radius: 50% }
#phase { color: #4a6562 }
.quiet { display: inline-flex; align-items: center; gap: .65rem; border: 1px solid #aebdb4; background: var(--paper); padding: .55rem 1rem; border-radius: 3rem; min-height: 42px }
.quiet:hover { background: #e5eae2 }
.quiet i { width: 15px; height: 15px; background: linear-gradient(currentColor,currentColor) left top/6px 1px,linear-gradient(currentColor,currentColor) left top/1px 6px,linear-gradient(currentColor,currentColor) right bottom/6px 1px,linear-gradient(currentColor,currentColor) right bottom/1px 6px; background-repeat: no-repeat }
body.resting :is(.mast,.shelf,.about,.invitation) { display: none }
body.resting .shore { width: 100% }
body.resting .water { touch-action: none }
.shore.dark { --paper: #2a3a4c; --ink: #f3ebd9; --rule: #607481 }
.shore.dark .controls { background: var(--paper); color: var(--ink) }
.shore.dark #phase { color: #cbd8df }
.shore.dark .quiet:hover { background: #405568 }
.quiet[aria-pressed="true"] i { transform: rotate(180deg) }
body.resting .shore { display: flex; flex-direction: column; height: 100vh; height: 100svh }
body.resting .print { flex: 1; min-height: 0 }
body.resting .controls { padding-inline: max(1rem,3.5vw) }
@media (max-width: 700px) {
 .mast { min-height: 4.1rem; flex-wrap: wrap; padding-block: .5rem }
 .brand { font-size: 1.7rem }
 .menu { gap: .8rem; font-size: .875rem }
 .print { height: clamp(25rem,68svh,40rem) }
 .invitation { max-width: 88%; top: 12%; left: 7% }
 .invitation p { max-width: 26ch; margin-top: .43rem }
 .controls { gap: .5rem; flex-wrap: wrap; padding-block: .75rem }
 .quiet { padding-inline: .75rem }
}

/* Keep the work index and the windowsill together on wide screens. */
.shelf { color: #243f3d; background: #e4e8dc; position: relative; isolation: isolate; scroll-margin-top: 0 }
.room-inner { padding-block: clamp(2.6rem,5.5vw,6rem); }
.room-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: clamp(1.5rem,2.4vw,2.8rem) }
.room-heading span { display: flex; align-items: center; gap: .7rem; font-size: .91rem; color: var(--secondary-ink,#51665a); margin-bottom: .5rem }
.room-heading span::before { content: ''; height: 1px; width: 2.1rem; background: currentColor }
.room-heading h2 { line-height: 1.2; font-size: clamp(2.1rem,3.7vw,4rem); letter-spacing: -.035em }
.room-heading p { color: var(--secondary-ink,#485e55); margin: 0 0 .2rem; max-width: 33ch; line-height: 1.65; text-wrap: pretty }
.room-layout { display: grid; grid-template-columns: minmax(0,1.85fr) minmax(16rem,1fr); align-items: center; gap: clamp(1.6rem,4vw,5rem) }
.collection { border-top: 1px solid #81978a88; }
.collection a { border-bottom: 1px solid #81978a66; display: flex; align-items: center; justify-content: space-between; padding: clamp(.65rem,1.45vw,1.5rem) .35rem clamp(.65rem,1.45vw,1.5rem) .15rem; gap: clamp(.65rem,1.25vw,1.3rem) }
.entry-copy { flex: 1; min-width: 0; display: grid; gap: .35rem }
.collection strong { font: 400 clamp(1.22rem,1.8vw,2rem)/1.26 Georgia,"Songti SC","Noto Serif CJK SC",serif; color: var(--entry-ink,#263f3c) }
.collection small { font-size: .92rem; line-height: 1.5; color: var(--secondary-ink,#475d54) }
.entry-go { flex: 0 0 1.65rem; height: 1.65rem; border: 1px solid #83978a; border-radius: 50%; display: grid; place-items: center; color: #365750 }
.entry-go::after { content: ''; width: 6px; height: 6px; border-top: 1px solid; border-right: 1px solid; rotate: 45deg; margin-left: -3px }
.collection a:is(.is-lit,:focus-visible,:hover) .entry-go { background: #30564f; color: #f5efd9; border-color: #30564f }
.collection a:is(.is-lit,:focus-visible,:hover) strong { color: var(--selected-ink,#155e53) }
.collection a:focus-visible { outline-color: #286159 }
.footprint { color: #6d5035; font-size: .8rem }
.about { position: relative; overflow: hidden; isolation: isolate; background: #e9e5d6; color: #293f3a }
.about-inner { display: grid; grid-template-columns: .85fr 1.15fr; gap: 3rem; align-items: start; padding-block: clamp(3rem,6vw,7rem) }
.signature { display: flex; align-items: center; gap: .75rem }
.signature .mark { font-size: 2.2rem }
.signature h2 { font-size: clamp(1.4rem,2.15vw,2.5rem) }
.letter { max-width: 51ch; }
.letter p { margin: 0; font: 400 clamp(1.15rem,1.6vw,1.65rem)/1.85 Georgia,"Songti SC","Noto Serif CJK SC",serif; text-wrap: pretty }
.back { display: inline-block; margin-top: 1.5rem; padding: .4rem 0; border-bottom: 1px solid #7f9084; font-size: .92rem }
.about::before { content: ''; pointer-events: none; position: absolute; z-index: -1; left: -12rem; bottom: -9rem; width: min(60vw,52rem); height: 16rem; border-radius: 50%; background: repeating-radial-gradient(ellipse,transparent 0 6%, #4d6c5e26 6.2% 6.5%, transparent 6.8% 10%) }
@media (prefers-reduced-motion: no-preference) {
 .entry-go { transition: background-color .18s, outline-offset .18s, opacity .18s }
}
@media (max-width: 780px) {
 .room-layout { grid-template-columns: 1fr; gap: .5rem }
 .room-heading { align-items: start; flex-direction: column; gap: .65rem }
 .room-heading p { max-width: 44ch }
 .collection a { padding: .9rem .15rem }
 .collection { border-top: 0 }
 .about-inner { grid-template-columns: 1fr; gap: 1.1rem }
 .letter { margin-left: 0 }
 .about::before { left: auto; right: -7rem; bottom: -11rem; width: 27rem }
}

/* The five small cut-paper silhouettes form a visual key between index and sill. */
.work-sign { position: relative; flex: 0 0 1.8rem; height: 2.25rem; color: #57756b }
.work-sign::before,.work-sign::after { content: ''; position: absolute; display: block }
[data-object="wind"] .work-sign::before { inset: 18% 16% 39%; border: 1.5px solid currentColor; border-bottom-width: 2px; border-radius: 65% 65% 24% 24% }
[data-object="wind"] .work-sign::after { top: 62%; left: 49%; width: 1px; height: 11%; background: currentColor; box-shadow: 1px 5px 0 1px #af936d; rotate: -10deg }
[data-object="rain"] .work-sign::before { inset: 13% 4%; border-radius: 50%; background: radial-gradient(circle,#3e5c56 0 5%,#c5ad7c 6% 22%,transparent 23%),repeating-radial-gradient(circle,#536f65 0 12%,#8b9b87 14% 16%,#536f65 18% 24%) }
[data-object="moon"] .work-sign::before { inset: 29% 19% 10%; border: 1px solid #958768; background: #d1c9ac; border-radius: 34% 34% 15% 15% }
[data-object="moon"] .work-sign::after { top: 11%; left: 36%; width: 28%; height: 21%; border-block: 2px solid #998461; background: #c2b695 }
[data-object="closet"] .work-sign::before { inset: 23% 7% 16%; background: radial-gradient(circle at 34% 52%,#62694f 0 5%,transparent 7%),radial-gradient(circle at 69% 52%,#62694f 0 5%,transparent 7%),#c1a979; clip-path: polygon(0 12%,4% 0,28% 18%,67% 17%,88% 0,96% 3%,93% 37%,100% 60%,93% 84%,67% 99%,31% 100%,8% 85%,0 60%,6% 35%) }
[data-object="closet"] .work-sign::after { inset: 75% 25% 17%; background: #aa7963; rotate: 5deg }
[data-object="trail"] .work-sign::before { inset: 15% 20% 48%; border: 1.5px solid currentColor; border-radius: 55% }
[data-object="trail"] .work-sign::after { inset: 36% 15% 12%; border-inline: 2px solid currentColor; border-block: 4px solid currentColor; border-radius: 23% 23% 29% 29%; background: linear-gradient(58deg,transparent 45%,#939981 47% 52%,transparent 54%),#dfcf9e }
.entry-go { border: 0; border-radius: 0; width: 1.65rem; position: relative }
.entry-go::after { rotate: 0deg; border-right: 1px solid; border-top: 1px solid; width: .53rem; height: .53rem; margin-left: .15rem }
.entry-go::before { content: ''; position: absolute; width: .75rem; height: 1px; background: currentColor; transform: translate(-.02rem,.02rem) rotate(-45deg) }
.collection a:is(.is-lit,:focus-visible,:hover) .entry-go { background: transparent; color: var(--selected-ink,#155e53); transform: translate(.1rem,-.1rem) }
.shelf { background: linear-gradient(157deg,#edf0e5 0%,#e2e6d8 49%,#dae1d4 100%) }
.collection a { position: relative }
.collection a::after { content: ''; position: absolute; inset: auto auto -1px 0; width: 2rem; height: 1px; background: currentColor; opacity: 0 }
.collection a:is(.is-lit,:focus-visible,:hover)::after { opacity: .65 }
.back::before { content: '↟'; margin-right: .45em }
.night { --paper: #253440; --ink: #e7e6d7; --rule: #52636a; color: var(--ink); background: var(--paper) }
.night .shelf { --entry-ink: #f0e4c9; --secondary-ink: #bdc9bf; --selected-ink: #ffda99; color: var(--entry-ink); background: linear-gradient(160deg,#293e42,#263a36) }
.night .work-sign,.night .entry-go { color: #b0bca6 }
.night .footprint { color: #dbc191 }
.night .about { color: #e4deca; background: #303e3b }
.night .about::before { opacity: .65; filter: brightness(2) }
.night .language-picker option { background: #283a40; color: #ece7d8 }
@media (prefers-reduced-motion: no-preference) {
 .entry-go,.collection a::after { transition: color .2s, opacity .2s, transform .2s }
}
