:root {
  color-scheme: dark;
  --bg: #0b1513;
  --surface: #15231f;
  --border: #596957;
  --text: #f1eee2;
  --muted: #c1cabc;
  --gold: #e6c88f;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, sans-serif;
  font: 16px/1.55 var(--sans);
  color: var(--text);
  background: var(--bg);
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 50% 10%, #1c2b24, transparent 64%); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1, h2 { line-height: 1.12; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .68; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
[hidden] { display: none !important; }
.skip { position: fixed; z-index: 5; left: 1rem; top: -6rem; padding: .6rem; background: var(--bg); }
.skip:focus { top: 1rem; }
.topbar, main { width: min(100% - 3rem, 1140px); margin: auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 5.4rem; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; font: 1.4rem/1.08 var(--serif); white-space: nowrap; }
.brand small { display: block; margin-top: .35rem; color: var(--muted); font: 650 .54rem/1.2 var(--sans); letter-spacing: .14em; }
.brand img { filter: saturate(.6); }
.header-actions, .actions { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.connection { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .75rem; }
.connection i { width: .4rem; height: .4rem; border-radius: 50%; background: var(--gold); }
.connection[data-state="live"] i { background: #a2c891; box-shadow: 0 0 12px #a2c89180; }
.text-button { min-height: 44px; background: none; border: 0; color: var(--gold); padding: .45rem .65rem; }
.text-button:hover { text-decoration: underline; }
.eyebrow { color: var(--gold); font-size: .65rem; font-weight: 650; letter-spacing: .2em; }
.eyebrow span { display: inline-block; width: 1.45rem; height: 1px; vertical-align: middle; margin-right: .5rem; background: #caa775; }
.intro { position: relative; overflow: hidden; min-height: 475px; border-radius: 1.1rem; border: 1px solid #6b735b88; isolation: isolate; background: #1c2a24; box-shadow: 0 20px 70px #040d0980; }
.hero-photo { position: absolute; inset: 0; z-index: -2; background: url('/assets/forest.png') center 52% / cover; }
.intro::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #0a1714eb 0%, #10231da8 40%, #12221c14 85%), linear-gradient(0deg, #0c1916c9, transparent 25%); }
.intro-copy { position: relative; z-index: 1; padding: 3.2rem 3.2rem 4.7rem; width: min(100%, 44rem); }
h1 { margin-top: 1.1rem; font-size: clamp(2.7rem, 5.5vw, 4.8rem); letter-spacing: -.035em; line-height: 1.03; text-shadow: 0 2px 28px #02110d80; }
.intro-copy > p:nth-of-type(2) { color: #d4d8c9; max-width: 36ch; margin: 1.4rem 0 1.6rem; line-height: 1.7; font-size: .98rem; }
.button { border: 1px solid transparent; border-radius: .45rem; min-height: 46px; padding: .62rem 1.05rem; font-size: .88rem; font-weight: 650; transition: background .2s, border-color .2s; }
.button.primary { background: linear-gradient(135deg, #f1d5a1, #d9b978); color: #27271a; border-color: #f6ddb3; box-shadow: 0 3px 16px #060e0a30; }
.button.primary:hover { background: #ffe1a9; }
.button.secondary { background: #13231eb8; border-color: #81937a; color: var(--text); }
.button.secondary:hover { background: #30473c; }
.button.danger { color: #f3b4a2; background: none; border-color: #91655a; }
.walk-link { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; padding: .4rem .2rem; font-size: .85rem; text-underline-offset: .25rem; color: #e5dcc1; }
.hero-caption { position: absolute; bottom: 1.4rem; left: 3.2rem; right: 1rem; font-size: .58rem; letter-spacing: .21em; color: #d8cfaf; }
.hero-caption span { font-size: 1.1rem; margin-right: .4rem; vertical-align: middle; color: var(--gold); }
.hero-mist { position: absolute; width: 130%; height: 170px; bottom: 0; left: -15%; opacity: .28; pointer-events: none; background: radial-gradient(ellipse, #c2d2c14d, transparent 65%); animation: hero-drift 24s ease-in-out infinite alternate; }
@keyframes hero-drift { to { transform: translateX(9%) translateY(-18px); } }

.cemetery { margin-top: 2.65rem; scroll-margin-top: 1rem; }
.map-header { display: flex; align-items: end; justify-content: space-between; gap: .8rem 1rem; flex-wrap: wrap; padding: 0 .1rem 1.3rem; }
.map-header h2 { margin-top: .5rem; font-size: clamp(1.9rem, 3vw, 2.7rem); }
.map-header > p { color: var(--muted); font-size: .8rem; max-width: 35ch; }
.garden-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem .1rem 1rem; flex-wrap: wrap; }
.grove-nav { display: flex; gap: .4rem; flex-wrap: wrap; }
.grove-nav a { border: 1px solid #5a6b5394; border-radius: 10rem; padding: .48rem .85rem; font-size: .77rem; min-height: 42px; display: flex; align-items: center; text-decoration: none; color: #d6d9c8; background: #17251e99; }
.grove-nav a:hover { background: #2c3e31; border-color: var(--gold); }
.grove-nav span { color: var(--gold); margin-right: .5rem; }
.motion-toggle { border: 0; min-height: 44px; background: transparent; color: var(--muted); padding: .5rem .6rem; font-size: .74rem; text-underline-offset: .2rem; text-decoration: underline; }
#map { position: relative; overflow: hidden; border: 1px solid #65765b80; border-radius: .9rem; background: #1c3024; box-shadow: inset 0 0 100px #07110c; }
.map-section { position: relative; isolation: isolate; overflow: hidden; scroll-margin-top: 1rem; background: linear-gradient(0deg, #19291e40, #10221966), url('/assets/floor.png') center / 780px 520px; }
.map-section::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, #06140bc9, transparent 25%, transparent 75%, #07160cc9), linear-gradient(0deg, #101d16b8, transparent 15%, transparent 85%, #101d1660); }
.map-section + .map-section { border-top: 1px solid #a1a27a2b; }
.map-section.biome-1 { background-image: linear-gradient(0deg, #0a1d2288, #0a1d2255), url('/assets/floor.png'); }
.map-section.biome-2 { background-image: linear-gradient(0deg, #18353d80, #162c3480), url('/assets/floor.png'); }
.landscape { position: absolute; width: 100%; height: 100%; inset: 0; z-index: -1; pointer-events: none; overflow: visible; }
.path-edge { fill: none; stroke: #3e4b38b8; stroke-width: 70; filter: blur(1px); }
.path-earth { fill: none; stroke-width: 64; opacity: .65; }
.path-footprints { fill: none; stroke: #bdad872e; stroke-width: 5; stroke-dasharray: 1 22; stroke-linecap: round; }
.woodland-branches { stroke: #0c1b15c9; stroke-width: 7; stroke-linecap: round; opacity: .75; }
.grove-heading { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 2rem 1rem 1.1rem; background: linear-gradient(#101f17e0, #101f1700); text-shadow: 0 2px 10px #06110a; }
.grove-number { font: .62rem/1.4 var(--sans); color: var(--gold); letter-spacing: .12em; border-bottom: 1px solid #b29a5e80; padding-bottom: .3rem; max-width: 8rem; }
.grove-heading h3 { font-size: 1.8rem; color: #ecead7; }
.grove-heading p { font-size: .76rem; color: #ced5c1; margin-top: .2rem; }
.plot-row { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 19% minmax(0, 1fr); align-items: stretch; max-width: 820px; margin: auto; min-height: 230px; pointer-events: none; }
.plot-row > :nth-child(2) { grid-column: 3; }
.plot { position: relative; display: grid; place-items: center; min-width: 0; min-height: 230px; padding: .7rem .3rem; }
.row-1 .plot:first-child, .row-3 .plot:first-child { transform: translateX(3%); }
.row-0 .plot:last-child, .row-2 .plot:last-child { transform: translateX(-3%); }
.stone { pointer-events: auto; position: relative; display: grid; justify-items: center; align-content: end; text-align: center; width: min(100%, 205px); min-height: 198px; padding: 1.1rem .2rem .2rem; color: var(--text); background: none; border: 0; border-radius: .6rem; isolation: isolate; }
.stone::before { content: ''; position: absolute; z-index: -1; width: 80%; height: 35%; bottom: 2rem; border-radius: 50%; background: #14251c69; box-shadow: 0 0 35px 9px #101d167d; }
.stone-sculpture { display: block; width: 166px; height: 166px; background: url('/assets/stones.png') 0 0 / 200% 200% no-repeat; filter: drop-shadow(5px 8px 5px #031008a6) saturate(.73) brightness(.88); transition: filter .25s, transform .25s; }
.material-limestone { background-position: 100% 0; }
.material-slate { background-position: 0 100%; }
.material-boulder { background-position: 100% 100%; }
.stone:hover .stone-sculpture, .stone:focus-visible .stone-sculpture { filter: drop-shadow(0 0 11px #c7d1ad40) saturate(.85) brightness(1.08); transform: translateY(-2px); }
.stone-label { position: relative; display: grid; grid-template-columns: 1fr auto; min-width: 6rem; max-width: 100%; border: 1px solid #b1b48a66; border-radius: .35rem; background: linear-gradient(135deg, #14261ef0, #1c2c23d9); padding: .3rem .65rem .35rem; box-shadow: 0 4px 10px #07150b66; line-height: 1.3; text-shadow: 0 1px 4px #07130b; }
.stone-pet-name { font-family: var(--serif); font-size: 1.2rem; overflow-wrap: anywhere; min-width: 0; }
.stone-years { display: block; grid-column: 1; color: #bec7af; font: .6rem/1.5 var(--sans); letter-spacing: .06em; }
.stone-count { grid-column: 2; grid-row: 1 / 3; align-self: center; margin-left: .45rem; color: #f3d99f; font: .7rem/1.2 var(--sans); }
.stone-count::before { content: '✧'; display: block; font-size: .85rem; }
.candle-group {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: end;
  justify-content: center;
  left: 57%;
  bottom: 50px;
  transform: translateX(-50%);
  pointer-events: none;
}
.flame {
  width: 24px;
  height: 24px;
  background: url('/assets/candles.png') 0 0 / 200% 200% no-repeat;
  margin-inline: -5px;
  animation: candle-light 4s ease-in-out infinite;
}
.flame-owner { filter: drop-shadow(0 0 6px #ffcb7d) drop-shadow(0 2px 10px #ffa94e7a); }
.flame-guest {
  background-position: 100% 0;
  filter: drop-shadow(0 0 5px #b3e6cf9c);
  animation-delay: -.8s;
}
@keyframes candle-light { 0%, 100% { opacity: .92; } 24%, 65% { opacity: 1; } 38% { opacity: .83; } }
.ghost { position: absolute; pointer-events: none; z-index: 1; display: grid; place-items: center; width: 110px; height: 110px; filter: drop-shadow(0 0 7px #caefd96b); }
.ghost img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; opacity: .65; }
.ghost img:not(:first-child) { opacity: 0; }
.ghost .ghost-frame.active { opacity: .7; }
.ghost .ghost-frame.inactive { opacity: 0; }
.ghost-frame { transition: opacity 1.6s ease; }
.stone .ghost { top: 2px; left: 48%; }
.spirit-body, .spirit-image { display: block; width: 100%; height: 100%; }
.spirit-image { background: url('/assets/spirits.png') 0 0 / 200% 200% no-repeat; opacity: .72; }
.species-dog .spirit-image { background-position: 100% 0; }
.species-rabbit .spirit-image { background-position: 0 100%; }
.species-small-dog .spirit-image { background-position: 100% 100%; }
.spirit-trail { position: absolute; width: 80%; height: 14%; left: 10%; bottom: 5%; border-radius: 50%; background: radial-gradient(ellipse, #cde1c939, transparent 70%); animation: spirit-trail 7s ease-in-out infinite; }
.spirit-gaze { position: absolute; width: 30%; height: 24%; top: 16%; right: 4%; border-radius: 50%; background: radial-gradient(ellipse, #dcefe30d, transparent 75%); animation: attentive 13s ease-in-out infinite; }
.ghost.listen { animation: listening 13s ease-in-out infinite; }
.ghost.rest { animation: resting 8s ease-in-out infinite; }
.ghost.wander { animation: wandering 19s ease-in-out infinite; }
.species-cat .spirit-body { transform-origin: 50% 80%; animation: cat-breathe 7s ease-in-out infinite; }
.species-dog .spirit-body { transform-origin: 50% 83%; animation: dog-breathe 6s ease-in-out infinite; }
.species-rabbit .spirit-body { transform-origin: 50% 85%; animation: rabbit-hop 16s ease-in-out infinite; }
.species-small-dog .spirit-body { transform-origin: 50% 82%; animation: dog-listen 14s ease-in-out infinite; }
@keyframes listening { 0%, 65%, 100% { transform: rotate(0); } 73%, 82% { transform: rotate(5deg) translateY(-2px); } }
@keyframes resting { 0%, 100% { transform: translateY(1px); } 50% { transform: translateY(-2px); } }
@keyframes wandering { 0%, 18%, 100% { transform: translateX(-9px); } 40%, 66% { transform: translateX(15px) translateY(-3px); } }
@keyframes cat-breathe { 0%, 100% { transform: scaleY(.975); opacity: .88; } 50% { transform: scaleY(1.02); opacity: 1; } }
@keyframes dog-breathe { 0%, 100% { transform: scaleY(.985); } 50% { transform: scaleY(1.02) rotate(-.7deg); } }
@keyframes rabbit-hop { 0%, 52%, 75%, 100% { transform: translateY(0) scaleY(1); } 57% { transform: scaleY(.95); } 60%, 67% { transform: translateY(-7px) scaleY(1.025); } 63%, 70% { transform: translateY(0) scaleY(.97); } }
@keyframes dog-listen { 0%, 65%, 100% { transform: rotate(0) scaleY(.99); } 75%, 82% { transform: rotate(-3deg) scaleY(1.02); } }
@keyframes spirit-trail { 0%, 100% { transform: scaleX(.85); opacity: .5; } 50% { transform: scaleX(1.15); opacity: .9; } }
@keyframes attentive { 0%, 60%, 100% { opacity: .2; } 72%, 78% { opacity: .8; } }

.scenery { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ground-mist { position: absolute; width: 145%; left: -25%; height: 150px; background: radial-gradient(ellipse, #c8d6c731, #c8d6c708 45%, transparent 70%); opacity: .7; animation: mist-flow 25s ease-in-out infinite alternate; }
.mist-a { top: 33%; }
.mist-b { top: 72%; animation-delay: -14s; opacity: .48; }
@keyframes mist-flow { to { transform: translateX(12%) translateY(-20px); } }
.firefly { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #e8db9e; box-shadow: 0 0 8px 2px #e0d08759; animation: firefly-wander 14s ease-in-out infinite; }
.firefly-a { top: 22%; left: 18%; animation-delay: -1s; }
.firefly-b { top: 54%; right: 12%; animation-delay: -8s; }
.firefly-c { top: 82%; left: 32%; animation-delay: -5s; }
.firefly-d { top: 38%; right: 36%; animation-delay: -11s; }
@keyframes firefly-wander { 0%, 100% { transform: translate(0, 0); opacity: .1; } 40% { transform: translate(13px, -20px); opacity: .75; } 75% { transform: translate(-8px, -9px); opacity: .25; } }
.lantern { position: absolute; width: 12px; height: 21px; border: 2px solid #6b6950; border-radius: 2px; background: radial-gradient(ellipse, #ffe3a9 5%, #cf9558 32%, #594b2f 64%); box-shadow: 0 0 21px 8px #ffcb5a2e; }
.lantern::before { content: ''; position: absolute; inset: -6px 0 auto; width: 5px; height: 4px; border: 1px solid #a5a082; border-radius: 5px 5px 0 0; margin: auto; }
.lantern-a { top: 31%; left: 40%; transform: rotate(-4deg); }
.lantern-b { top: 78%; right: 40%; transform: rotate(5deg); }
.fern { position: absolute; width: 66px; height: 70px; background: repeating-conic-gradient(from -20deg at 50% 100%, transparent 0deg 6deg, #677c4330 6deg 10deg, transparent 10deg 15deg); border-radius: 80% 70% 10% 10%; }
.fern-a { top: 8%; left: 2%; transform: rotate(-30deg); }
.fern-b { top: 64%; right: 2%; transform: rotate(40deg); }
.woodland-flowers { width: 52px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 20% 40%, #d6dbc185 0 1px, transparent 2px), radial-gradient(circle at 48% 70%, #b8c8aa73 0 1.4px, transparent 2px), radial-gradient(circle at 70% 31%, #ccdbbe8a 0 1px, transparent 2px), radial-gradient(ellipse, #48654640, transparent 75%); transform: rotate(-15deg); }
.pond { position: absolute; bottom: 4%; right: 3%; width: 24%; height: 14%; border-radius: 43% 53% 41% 58%; border: 5px solid #263e34; background: radial-gradient(ellipse at 56% 30%, #b2c1b326, transparent 20%), repeating-radial-gradient(ellipse at 56% 40%, #5f7f7c20 1px, transparent 3px 16px), linear-gradient(145deg, #152d2b, #345457 60%, #122d2b); box-shadow: 0 0 2px 4px #394b384d, inset 0 10px 18px #061718a6; transform: rotate(-17deg); }
.pond::after { content: ''; position: absolute; left: 28%; right: 21%; top: 20%; bottom: 23%; border-radius: 50%; border-top: 1px solid #bdcdb640; border-bottom: 1px solid #bdcdb61c; animation: water-ripple 13s ease-in-out infinite; }
@keyframes water-ripple { 0%, 100% { transform: scale(.8); opacity: .3; } 50% { transform: scale(1.15); opacity: .9; } }
.pond-reeds { position: absolute; bottom: 7%; right: 2%; width: 40px; height: 48px; background: repeating-linear-gradient(81deg, transparent 0 7px, #71816a70 8px 9px, transparent 10px 15px); border-radius: 60% 60% 0 0; }
.garden-bench { position: absolute; top: 71%; left: 3%; width: 63px; height: 23px; transform: rotate(24deg); background: repeating-linear-gradient(0deg, #74654a 0 4px, #263c2b 5px 6px); border: 2px solid #273c2c; border-radius: 3px; box-shadow: 3px 7px 5px #06120caa; }
.garden-bench::before, .garden-bench::after { content: ''; position: absolute; top: -6px; bottom: -5px; width: 4px; background: #394b3e; }
.garden-bench::before { left: 7px; }
.garden-bench::after { right: 7px; }
.grove-end { position: relative; z-index: 2; color: #d9d7be; font: italic .83rem var(--serif); text-align: center; min-height: 65px; padding: 1rem; text-shadow: 0 2px 5px #101c14; }
.map-note { position: absolute; top: 14%; left: 10%; right: 10%; text-align: center; color: #f0e6ca; background: #0c1a12dc; padding: 1rem; border-radius: .5rem; z-index: 3; }
.garden-afterword { text-align: center; color: #c8ccb7; font: italic 1rem/1.6 var(--serif); padding: 2rem 1rem .4rem; }
.urn-entrance { display: grid; grid-template-columns: 1fr .9fr; align-items: center; gap: 1rem; margin: 0 0 1rem; padding: clamp(1rem, 4vw, 2rem); border: 1px solid #a2ac804d; border-radius: .85rem; background: radial-gradient(ellipse at 82% 80%, #40524485, transparent 55%), #1b2d25; }
.urn-entrance h2 { font-size: clamp(1.85rem, 5vw, 2.5rem); }
.urn-entrance p { color: var(--muted); margin: .4rem 0 .8rem; }
.urn-entrance img { width: 100%; height: auto; filter: drop-shadow(0 12px 13px #09140daa); }
#urn-dialog { width: min(42rem, calc(100% - 1.25rem)); }
.urn-rock { position: relative; min-height: clamp(12rem, 59vw, 20rem); display: grid; place-items: center; padding: 2.25rem 12%; isolation: isolate; }
.urn-rock::before { content: ''; position: absolute; z-index: -1; inset: 0; background: url('/assets/urn-boulder.webp') center / 100% 100% no-repeat; filter: drop-shadow(0 11px 10px #090e0aa0); }
.urn-plaques { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; width: 100%; margin: 0; padding: 0; list-style: none; }
.urn-plaques li { min-width: 0; }
.urn-plaque { display: grid; align-content: center; gap: .08rem; width: 100%; height: 100%; min-height: 4rem; padding: .35rem .45rem; text-align: center; overflow-wrap: anywhere; color: #fff0c8; background: linear-gradient(155deg, #5b472b, #32291e 80%); border: 1px solid #b99a61; border-radius: .19rem; box-shadow: inset 0 0 0 2px #332820, 0 3px 5px #1119; }
button.urn-plaque:hover { background: linear-gradient(155deg, #755a35, #422f1e 80%); }
.urn-plaque strong { font: 600 clamp(.95rem, 2.7vw, 1.22rem)/1.13 var(--serif); }
.urn-plaque span { font-size: .73rem; line-height: 1.24; }
.urn-pages { display: flex; justify-content: space-between; gap: .45rem; align-items: center; margin-top: .45rem; color: var(--muted); }
.urn-actions { margin-top: .85rem; }
#plaque-form .checkbox { margin-top: .65rem; }
@media (max-width: 560px) {
  .urn-entrance { grid-template-columns: 1fr; gap: .4rem; }
  .urn-entrance img { width: min(78%, 20rem); justify-self: center; grid-row: 1; }
  .urn-rock { padding: 2.15rem 7%; }
}
footer { display: flex; justify-content: space-between; gap: 1rem; color: #a7b39f; padding: 1.6rem .1rem 2rem; font-size: .78rem; }
footer small { font-size: .65rem; opacity: .8; }

dialog { width: min(35rem, calc(100% - 1.25rem)); max-height: calc(100% - 1.25rem); color: var(--text); background: linear-gradient(145deg, #1e3029, #101f19); border: 1px solid #83937291; border-radius: .95rem; padding: clamp(1.1rem, 5vw, 1.8rem); box-shadow: 0 20px 65px #050c0ad1; }
dialog::backdrop { background: #07100bdc; backdrop-filter: blur(5px); }
.dialog-heading { display: flex; gap: .8rem; justify-content: space-between; align-items: start; margin-bottom: 1rem; }
.dialog-heading h2 { margin-top: .4rem; overflow-wrap: anywhere; font-size: 2rem; }
.close { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #8393728c; border-radius: 50%; background: #23372b; color: var(--text); font-size: 1.4rem; line-height: 1; }
label { display: grid; gap: .32rem; font-size: .85rem; font-weight: 600; }
input:not([type="checkbox"], [type="radio"]), textarea, select { width: 100%; min-width: 0; padding: .6rem .68rem; border-radius: .4rem; background: #101f18; color: var(--text); border: 1px solid #72856d; font-size: 1rem; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #a2b2a3; opacity: 1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.wide { grid-column: 1 / -1; }
fieldset { margin: 1rem 0; border: 1px solid #66765c80; border-radius: .6rem; padding: .8rem .85rem .9rem; min-width: 0; }
fieldset p, fieldset small { color: var(--muted); font-size: .78rem; }
fieldset legend { padding: 0 .35rem; }
fieldset legend small { margin-left: .25rem; }
fieldset label, #photo-options p { margin-top: .65rem; }
.file-picker span { display: none; }
.checkbox { display: flex; align-items: start; gap: .65rem; padding: .6rem 0 1rem; }
.checkbox input { flex: none; width: 1.2rem; height: 1.2rem; margin: .12rem 0 0; accent-color: #cdd9a5; }
.checkbox small { display: block; font-weight: 400; color: var(--muted); }
.error { color: #ffd1c3; font-size: .87rem; padding: .45rem 0 .7rem; }
.appearance-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .3rem; }
.appearance-options label { display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; position: relative; padding: .5rem .1rem; border: 1px solid transparent; border-radius: .4rem; font-size: .6rem; cursor: pointer; }
.appearance-options label:has(input:checked) { border-color: #d7bf88; background: #c7b47f14; }
.appearance-options input { width: 15px; height: 15px; margin: 0; accent-color: var(--gold); }
.style-swatch { width: 30px; height: 32px; border: 1px solid #a6ac95; border-radius: 48% 48% 5% 5%; background: linear-gradient(135deg, #787e73, #344239); box-shadow: inset 2px 2px 4px #e0e2be1f; }
.style-swatch.auto { background: linear-gradient(125deg, #8c9b82 50%, #374e3e 50%); border-radius: 41% 55% 12% 12%; }
.style-swatch.limestone { background: linear-gradient(135deg, #d1bea0, #8f866c); border-radius: 55% 34% 10% 5%; }
.style-swatch.slate { background: linear-gradient(145deg, #607470, #1e3532); border-radius: 40% 30% 5% 5%; height: 25px; margin-top: 7px; }
.style-swatch.boulder { background: linear-gradient(145deg, #a2ad96, #576a53); border-radius: 48% 55% 32% 25%; }
.stone-preview { display: grid; place-items: center; min-height: 130px; margin-top: .5rem; background: radial-gradient(ellipse at 50% 80%, #60825420, transparent 65%); }
.stone-preview .stone-sculpture { width: 130px; height: 130px; }
.ghost-preview, .detail-visual { display: grid; place-items: center; position: relative; min-height: 135px; margin-top: .7rem; border-radius: .6rem; background: radial-gradient(ellipse at center, #46614b66, #14291e99 70%); overflow: hidden; }
.ghost-preview .ghost { width: 125px; height: 125px; }
.detail-visual { min-height: 245px; background: linear-gradient(0deg, #0c1b1580, #0a181243), url('/assets/floor.png') center / cover; border: 1px solid #87946c30; }
.detail-visual .stone-sculpture { width: 205px; height: 205px; align-self: end; }
.detail-visual .ghost { width: 160px; height: 160px; top: 5px; left: 48%; }
.detail-visual .candle-group { left: 58%; bottom: 15px; }
.detail-visual .flame { width: 43px; height: 43px; margin-inline: -8px; }
.detail-meta { margin: 1.1rem 0 .6rem; color: #c6cbb4; font-size: .82rem; letter-spacing: .06em; }
.detail-memory { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 1.2rem; font: 1.16rem/1.7 var(--serif); color: #e4e2cf; }
.detail-candles { color: var(--gold); font-size: .83rem; }
.detail-actions { margin: 1rem 0 .35rem; }
#mine-list { display: grid; gap: .6rem; }
.mine-link { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: .5rem; overflow-wrap: anywhere; }
.mine-link small { color: var(--muted); flex-shrink: 0; font-size: .67rem; }
#account-help { margin-bottom: .7rem; color: var(--muted); }
#restore-form, #new-key { display: grid; justify-items: start; gap: .65rem; margin: 1rem 0 0; }
#restore-form label, #new-key label { width: 100%; }
#new-key input { font: .78rem/1.4 ui-monospace, monospace; }
#key-renew { margin-top: .6rem; }
.notice { position: fixed; z-index: 5; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100% - 1rem); width: max-content; padding: .75rem 1.1rem; border: 1px solid #879b73; border-radius: .55rem; background: #233c2e; color: var(--text); box-shadow: 0 12px 30px #0a1514b8; font-size: .86rem; }
@media (max-width: 670px) {
  .topbar, main { width: calc(100% - 1.2rem); }
  .topbar { min-height: 4.4rem; gap: .4rem; }
  .brand { font-size: 1.13rem; gap: .5rem; }
  .brand small { font-size: .45rem; }
  .header-actions { gap: 0; }
  .connection { font-size: 0; padding: .4rem; }
  .header-actions .text-button { padding: .4rem; font-size: .78rem; }
  .intro { min-height: 420px; }
  .intro-copy { padding: 2rem 1.35rem 4.1rem; }
  .hero-photo { background-position: 61% center; }
  .intro::before { background: linear-gradient(90deg, #0b1913e0, #0e1c16a3 58%, #12221c40), linear-gradient(0deg, #0c1916c9, transparent 35%); }
  h1 { font-size: clamp(2.8rem, 10.3vw, 3.6rem); margin-top: 1.2rem; }
  .intro-copy > p:nth-of-type(2) { max-width: 32ch; font-size: .89rem; margin: 1.2rem 0 1.4rem; }
  .intro .actions { gap: .6rem; }
  .intro .button { padding: .6rem .85rem; font-size: .8rem; }
  .walk-link { font-size: .78rem; }
  .hero-caption { bottom: 1.25rem; left: 1.35rem; font-size: .48rem; letter-spacing: .13em; }
  .cemetery { margin-top: 1.8rem; }
  .map-header h2 { font-size: 1.9rem; }
  .map-header { padding-bottom: .7rem; }
  .map-header .eyebrow { font-size: .55rem; }
  .garden-toolbar { padding-bottom: .8rem; }
  .grove-nav { gap: .25rem; width: 100%; justify-content: space-between; }
  .grove-nav a { padding: .4rem .55rem; font-size: .65rem; min-height: 42px; }
  .grove-nav span { margin-right: .3rem; }
  .motion-toggle { margin-left: auto; min-height: 35px; padding: .2rem .3rem; font-size: .7rem; }
  .grove-heading { padding: 1.5rem .7rem .7rem; gap: .7rem; }
  .grove-heading h3 { font-size: 1.55rem; }
  .grove-heading p { font-size: .67rem; }
  .grove-number { font-size: .5rem; max-width: 5rem; }
  .map-section { background-size: auto, 520px 347px; }
  .plot-row { min-height: 194px; grid-template-columns: minmax(0, 1fr) 16% minmax(0, 1fr); }
  .plot { min-height: 194px; padding: .4rem .15rem; }
  .stone { min-height: 175px; width: min(100%, 160px); }
  .stone-sculpture { width: 123px; height: 123px; }
  .stone .ghost { width: 89px; height: 89px; left: 41%; top: 3px; }
  .stone-pet-name { font-size: 1.06rem; }
  .stone-label { min-width: 5.3rem; padding: .25rem .45rem; }
  .stone-years { font-size: .54rem; }
  .stone-count { margin-left: .35rem; font-size: .64rem; }
  .candle-group { bottom: 43px; }
  .stone .flame { width: 20px; height: 20px; margin-inline: -4px; }
  .pond { right: 0; width: 28%; }
  .lantern-a { left: 37%; }
  .lantern-b { right: 37%; }
  .grove-end { min-height: 54px; }
  .detail-visual .ghost { width: 130px; height: 130px; top: 18px; left: 48%; }
  .appearance-options { gap: .1rem; }
  .appearance-options label { font-size: .55rem; }
  .garden-afterword { font-size: .94rem; }
}
@media (max-width: 360px) {
  .grove-nav a { font-size: .6rem; padding: .4rem .42rem; }
  .brand small { letter-spacing: .06em; }
  .stone .ghost { width: 77px; height: 77px; left: 33%; }
  .stone-sculpture { width: 110px; height: 110px; }
  .appearance-options label { font-size: .5rem; }
}
.map-section:not(.in-view) .ghost, .map-section:not(.in-view) .ghost *,
.map-section:not(.in-view) .scenery *, .map-section:not(.in-view) .flame {
  animation-play-state: paused;
}
.calm *, .calm *::before, .calm *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  :root { scroll-behavior: auto; }
}
