:root {
  color-scheme: dark;
  font: 15px/1.5 system-ui, "Microsoft YaHei UI", sans-serif;
  --ink: #f2e8d7;
  --gold: #e9c896;
  --muted: #c3b9bc;
  --edge: #e2c49942;
  --glass: #141a27db;
  --deep: #1a2030;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  background: #1a2338;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .52; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #f1cf9a; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--serif); }
#garden { width: 100%; height: 100vh; height: 100dvh; overflow: hidden; position: relative; isolation: isolate; background: #1e2942 url('/assets/garden-reference.webp') center/cover; }
#stage, #plotLabels, .frame-shade { position: absolute; inset: 0; }
.views button[aria-busy=true]::after {
  content: ''; display: inline-block; width: .7em; height: .7em; margin-left: .4em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  vertical-align: -.05em; animation: gardener-loading .9s linear infinite;
}
@keyframes gardener-loading { to { transform: rotate(360deg); } }
#stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#stage canvas:active { cursor: grabbing; }
#stage canvas:focus { outline: none; }
#plotLabels, .frame-shade { pointer-events: none; }
.frame-shade { background: linear-gradient(#0c101f83, transparent 22%, transparent 75%, #0a102184), radial-gradient(ellipse at 50% 43%, transparent 52%, #10102037); }
.garden-header { position: absolute; inset: 25px 28px auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 14px; z-index: 3; pointer-events: none; }
.garden-header > * { pointer-events: auto; }
.identity, .views, .glass-button { border: 1px solid var(--edge); background: var(--glass); backdrop-filter: blur(12px); box-shadow: 0 5px 22px #080f244b; }
.identity { width: max-content; padding: 6px 14px 6px 6px; border-radius: 14px; display: flex; align-items: center; gap: 11px; }
.identity-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; font-size: 31px; line-height: 1; color: var(--gold); background: #ead7bc14; }
.identity h1 { font-size: 19px; letter-spacing: .09em; color: #fae9cd; }
.views { display: flex; gap: 3px; padding: 5px; border-radius: 13px; }
.views button { background: transparent; border: 0; border-radius: 8px; min-width: 69px; padding: 8px 12px; }
.views [aria-pressed=true] { color: #30261f; background: #e9cca3; box-shadow: inset 0 1px #fff0d0; font-weight: 650; }
.settings { display: flex; gap: 7px; align-items: center; justify-self: end; }
.glass-button { display: inline-flex; gap: 7px; min-height: 41px; align-items: center; justify-content: center; padding: 8px 12px; border-radius: 10px; color: #f5e5cd; white-space: nowrap; }
.audio-button { width: 41px; font-size: 20px; }
.audio-button[aria-pressed=false] span { opacity: .58; }
.glass-button:not(:disabled):hover, .views button:not(:disabled):hover, .identity:hover { background-color: #443747; }
.views [aria-pressed=true]:not(:disabled):hover { background: #efd4ad; }
.dock { display: flex; gap: 9px; align-items: center; position: absolute; z-index: 2; bottom: max(26px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #ffe9bc; background: linear-gradient(165deg,#f6e4c2,#dbb889); border-radius: 11px; padding: 9px 18px; color: #30231d; font-weight: 750; white-space: nowrap; box-shadow: inset 0 1px #fff3dc, 0 4px 20px #241a1d3a; }
.primary:not(:disabled):hover { background: #fae6c3; }
.dock .primary { min-height: 52px; min-width: 171px; }
.dock .glass-button { min-height: 47px; }
.help { position: absolute; z-index: 3; left: 28px; bottom: max(26px, env(safe-area-inset-bottom)); display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 9px; }
.help-icon { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; }
.garden-panel { color: var(--ink); background: #181e2de8; border: 1px solid var(--edge); box-shadow: 0 14px 54px #05091366; border-radius: 15px; backdrop-filter: blur(14px); }
.help-panel { padding: 13px 17px; }
.help-panel dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 13px; margin: 0; }
.help-panel dt { color: #f6dfb6; font-weight: 600; }
.help-panel dd { margin: 0; color: var(--muted); }
.help-panel p { margin-top: 9px; border-top: 1px solid var(--edge); padding-top: 8px; color: var(--muted); font-size: .81rem; }
.map-toggle { position: absolute; z-index: 3; right: 28px; bottom: max(26px, env(safe-area-inset-bottom)); }
.map-toggle span { font-size: 22px; line-height: 1; color: #ebca9d; }
.map-panel { position: absolute; top: 102px; right: 28px; width: 350px; padding: 15px; max-height: calc(100% - 184px); overflow: auto; z-index: 3; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.panel-heading h2 { color: #f9e6ca; font-size: 22px; }
.panel-heading p { color: var(--muted); font-size: .88rem; margin-top: 3px; }
.close-icon { flex: none; border: 1px solid var(--edge); background: #f9dbac12; width: 32px; height: 32px; padding: 0; display: grid; place-items: center; border-radius: 8px; font: 25px/1 system-ui; }
.close-icon:hover, .secondary:hover { background: #f7d8b327; }
.map { height: 235px; position: relative; border-radius: 10px; border: 1px solid #f2ce9b38; background: radial-gradient(ellipse at 44% 29%,#494361,#303b4f 53%,#25323b); overflow: hidden; }
.map > svg, #mapPins { position: absolute; inset: 0; width: 100%; height: 100%; }
.map > svg path { stroke: #d9c29870; stroke-width: 2; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.map > svg circle { fill: #ad9eaf58; stroke: #eacdbb76; stroke-width: .6; }
.map .north { color: #e0c299; position: absolute; right: 7px; top: 5px; font-size: 12px; pointer-events: none; }
.map-pin, .plot-label { position: absolute; transform: translate(-50%,-50%); border: 1px solid #f2ce9b91; background: #282639eb; border-radius: 14px; color: #ffe0ab; padding: 2px 7px; white-space: nowrap; font-size: .8rem; }
.map-pin:hover, .plot-label:hover, .map-pin[aria-pressed=true], .plot-label[aria-pressed=true] { color: #2c2425; background: #ffdfaa; z-index: 1; }
.map-pin.dot { width: 14px; height: 14px; border-radius: 50%; padding: 0; background: #d6ad71; }
.map-pin.dot:hover, .map-pin.dot[aria-pressed=true] { background: #ffdda7; outline: 2px solid #f6c88a; outline-offset: 2px; }
.map-pin.occupied { background: #81738d; opacity: .7; }
.map-pin.vacant { z-index: 2; width: 16px; height: 16px; padding: 0; border: 0; background: transparent; }
.map-pin.vacant::after { content: ''; display: block; width: 7px; height: 7px; border: 1.5px solid #ecd1a4; border-radius: 50%; margin: auto; background: #413e50; }
.map-pin.vacant:is(:hover,:focus-visible)::after { background: #ffdfaa; }
.map-pin:not(.vacant):not(.dot) { z-index: 1; max-width: 4.3em; overflow: hidden; text-overflow: ellipsis; }
.plot-label { pointer-events: auto; box-shadow: 0 2px 9px #16111b67; }
.vacant-label { min-width: 23px; padding: 2px 5px; background: #233a36ed; border-color: #c6d4b6a1; color: #e5eedb; font-variant-numeric: tabular-nums; }
.gardener-marker { position:absolute; z-index:4; transform:translate(-50%,-50%); display:grid; justify-items:center; pointer-events:none; color:#fff3c4; text-shadow:0 1px 5px #17151f; }
.gardener-marker span { display:grid; place-items:center; border:2px solid #fff0ad; background:#88713c; box-shadow:0 0 0 5px #ffe6a430; width:25px; height:25px; border-radius:50%; transform:rotate(var(--heading)); }
.gardener-marker b { font-size:.85rem; background:#242b36ed; border-radius:5px; margin-top:6px; padding:2px 6px; }
.preview-return { position:absolute; right:24px; bottom:90px; z-index:4; }
.overview-filter { position:absolute; right:24px; bottom:24px; z-index:4; }
.overview-filter[aria-pressed=true] { background:#e9cca3; color:#30261f; border-color:#f4d99d; }
.pagination { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; margin-top:18px; }
.feedback-time { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-bottom:7px; }
.feedback-time time { margin-bottom:0; }
.feedback-list { display:grid; gap:12px; }
.feedback-entry { padding:14px; border:1px solid var(--edge); border-radius:10px; background:#e7cfaa08; }
.feedback-entry time { display:block; color:var(--muted); font-size:.85rem; margin-bottom:7px; }
.feedback-entry p { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.7; }
@media(max-width:760px){.overview-filter{right:10px;bottom:125px;} .dock{max-width:calc(100% - 20px);flex-wrap:wrap;justify-content:center;}}
.creation-progress { position:absolute; inset:0; z-index:6; display:grid; place-items:center; background:#131b29bb; backdrop-filter:blur(3px); }
.creation-progress>div { width:min(360px,85vw); padding:24px; border:1px solid var(--edge); border-radius:15px; background:var(--deep); }
.creation-progress progress { width:100%; margin-top:15px; accent-color:var(--gold); }
#garden[data-minimal] :is(.gardener-marker,.preview-return,.overview-filter) { display:none; }
.map-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 11px; max-height: 94px; overflow: auto; }
.map-list button, .secondary { background: #f9dbac12; border: 1px solid var(--edge); border-radius: 8px; padding: 5px 9px; }
.plot-field { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.plot-field select { max-width: 58%; }
#plotHint { margin: 7px 0; color: var(--muted); font-size: .88rem; }
#place { width: 100%; }
#garden[data-mode=plot] .map-panel { display: flex; flex-direction: column; top: clamp(72px,12dvh,102px); max-height: calc(100% - clamp(72px,12dvh,102px) - 82px); overflow: hidden; }
#garden[data-mode=plot] .map-panel .panel-heading { flex: none; margin-bottom: 8px; }
#garden[data-mode=plot] .map { min-height: 62px; flex: 1 1 235px; }
#placement { flex: none; }
#garden[data-mode=plot] .dock { display: none; }
#garden[data-minimal] :is(.garden-header,.map-panel,.map-toggle,.dock,.nearby,.touch-controls,#plotLabels),body:has(#garden[data-minimal]) #toast { display: none; }
.nearby { position: absolute; z-index: 2; bottom: 95px; left: 50%; transform: translateX(-50%); }
kbd { padding: 1px 6px; border-radius: 5px; background: #e9cba2; color: #30241f; font: 600 .76rem system-ui; }
.touch-controls { position: absolute; right: 15px; bottom: 118px; display: grid; grid-template-columns: repeat(3, 43px); gap: 3px; z-index: 2; }
.touch-controls button { min-height: 43px; border: 1px solid var(--edge); background: var(--glass); border-radius: 8px; touch-action: none; }
.touch-controls button:first-child { grid-area: 1/2; }
.touch-controls button:nth-child(2) { grid-area: 2/1; }
.toast { position: fixed; z-index: 5; left: 50%; bottom: 146px; transform: translateX(-50%); width: max-content; max-width: 88vw; padding: 8px 14px; border-radius: 10px; background: #252334ef; border: 1px solid var(--edge); color: #f9e6ca; }
.loading { position: absolute; z-index: 4; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; background: #11182ac7; text-align: center; transition: opacity .45s; }
.loading[data-ready] { opacity: 0; pointer-events: none; }
.loading[data-failed] { inset: auto auto 115px 50%; transform: translateX(-50%); width: max-content; max-width: 86vw; border: 1px solid var(--edge); border-radius: 10px; padding: 9px 12px; }
.loading[data-failed] .loading-moon { display: none; }
.loading-moon { font: 64px/1 Georgia, serif; color: #f1d8ab; animation: glow 2.1s ease-in-out infinite alternate; }
@keyframes glow { from { opacity: .44; text-shadow: 0 0 8px #ffd28d; } to { opacity: 1; text-shadow: 0 0 34px #ffd28daa; } }
.dialog { --glass: #1a2030; width: min(540px, calc(100vw - 24px)); max-height: min(92dvh, 790px); padding: 20px; border: 1px solid #e5c89e55; border-radius: 16px; background: var(--deep); color: var(--ink); box-shadow: 0 18px 80px #080c19b2; }
.dialog::backdrop { background: #0b101c91; backdrop-filter: blur(2px); }
.dialog.small { width: min(380px, calc(100vw - 24px)); }
.dialog.welcome {
  width: min(608px, calc(100vw - 28px));
  padding: clamp(20px, 4vw, 36px);
  border-color: #e5c89e80;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, #554258 0%, transparent 58%), var(--deep);
}
.welcome-moon { display: block; color: var(--gold); font: 52px/.95 Georgia,serif; text-shadow: 0 0 23px #f1bc7590; }
.welcome h2 { margin: 12px 0 18px; color: #ffe8bd; font: 650 clamp(1.45rem, 4vw, 1.95rem)/1.35 Georgia,"Songti SC",serif; }
.welcome h2:focus { outline: none; }
.welcome-copy { container-type: inline-size; font-size: 1rem; line-height: 1.65; overflow-wrap: anywhere; }
.welcome-copy p { margin: 0 0 .85rem; text-wrap: balance; }
.welcome-copy strong { color: #f9dfb4; }
.welcome-photo-description { display: block; }
.welcome-memorial { display: inline-block; white-space: nowrap; font-size: min(1rem, 5.65cqi); }
.welcome-copy .welcome-invitation { margin: 1.1rem 0 1.2rem; }
.welcome-actions { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 12px; border-top: 1px solid var(--edge); padding-top: 16px; }
.welcome-actions > label { display: flex; align-items: center; text-align: start; gap: 9px; color: var(--muted); cursor: pointer; }
.welcome-actions input { width: 17px; height: 17px; margin: 0; padding: 0; accent-color: #e4bd84; flex: none; }
.welcome-actions .primary { min-width: 92px; margin-inline-start: auto; }
.dialog.detail { inset: 0 0 0 auto; margin: 0; min-height: 100%; max-height: 100dvh; max-width: 100%; width: min(423px, 100%); border-radius: 14px 0 0 14px; }
.detail::backdrop { background: #0b101c38; backdrop-filter: none; }
.detail img { display: block; width: 100%; max-height: 320px; object-fit: contain; border-radius: 10px; background: #131a26; }
.story { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.85; margin: 16px 0; }
.directory-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.memory { display: flex; align-items: center; text-align: left; gap: 10px; padding: 8px; min-width: 0; background: #f5e0bb09; border: 1px solid #f0cf9d26; border-radius: 10px; }
.memory:hover { background: #f8d4a01c; }
.memory span:last-child { min-width: 0; }
.memory strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.memory small { display: block; color: var(--muted); }
.memory-thumb { display: grid; flex: none; place-items: center; width: 43px; height: 43px; overflow: hidden; border-radius: 7px; background: #e1c39733; color: #f1d5ab; }
.memory-thumb img { width: 100%; height: 100%; object-fit: cover; }
form, form > label, .years > label { display: grid; gap: 5px; }
form { gap: 10px; }
form .panel-heading { margin-bottom: 2px; }
input:not([type=file],[type=radio]), textarea, select { border: 1px solid #dac29c42; background: #111824; border-radius: 8px; min-width: 0; padding: 8px 10px; }
textarea { resize: vertical; }
.years { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.upload { position: relative; display: grid; place-items: center; height: 86px; border: 1px dashed #d5b98b9c; border-radius: 8px; background: #d3b88b0c; text-align: center; overflow: hidden; }
.upload input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.upload:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.upload img { max-width: 100%; height: 86px; object-fit: contain; }
.upload small { display: block; color: var(--muted); }
fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
legend { margin-bottom: 5px; }
.styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.style-option { position: relative; display: flex; align-items: stretch; border: 1px solid #dcc4a138; border-radius: 8px; overflow: hidden; }
.style-option:has(:checked) { border-color: var(--gold); background: #e8c48b20; }
.style-option:focus-within { outline: 2px solid var(--gold); }
.style-option { flex-direction: column; gap: 0; padding: 2px 3px 6px; background: radial-gradient(ellipse at 50% 60%,#51475a,#242638 75%); }
.style-option label { display: flex; justify-content: center; align-items: center; gap: 5px; padding: 5px 0 0; cursor: pointer; }
.style-option input { margin: 0; accent-color: #e4bd84; }
.style-image-button { position: relative; display: block; width: 100%; border: 0; background: transparent; padding: 3px; color: var(--gold); }
.style-image-button span { position: absolute; inset-inline-end: 3px; bottom: 1px; display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--edge); border-radius: 50%; background: #1a2030dd; font-size: 23px; line-height: 1; }
.style-image-button:hover { background: #f1d7aa15; }
.style-option img { width: 100%; height: clamp(50px,8vh,75px); object-fit: contain; }
.style-option strong { font: 600 .88rem var(--serif); color: #f0ddbd; }
.dialog.style-preview { width: min(700px, calc(100vw - 24px)); padding: 18px; }
.style-preview-image { display: grid; place-items: center; min-height: 120px; }
.style-preview-image img { display: block; max-width: 100%; width: auto; height: auto; max-height: min(64dvh, 780px); object-fit: contain; border-radius: 9px; background: #eee8df; }
.style-preview-image [role=status] { margin: 8px 0; color: var(--muted); text-align: center; }
.style-preview-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.style-preview-actions button { font-size: .9rem; }
.form-note { color: var(--muted); font-size: .88rem; }
.form-error { color: #ffc3b1; font-size: .9rem; }
.visitor-table { overflow-x: auto; margin-bottom: 9px; }
table { text-align: left; width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { border-bottom: 1px solid #d9bf9c33; padding: 7px 6px; }
th { color: var(--gold); }
#moreVisitors { margin-top: 9px; }
@media (max-width: 760px) {
  .garden-header { inset: 10px 10px auto; grid-template-columns: auto 1fr; gap: 7px; }
  .identity { gap: 5px; padding: 4px 7px 4px 4px; }
  .identity-mark { width: 28px; height: 28px; font-size: 24px; }
  .identity h1 { font-size: 14px; letter-spacing: .015em; }
  .settings { grid-area: 1/2; gap: 4px; }
  .glass-button { min-height: 36px; padding: 6px 8px; font-size: .85rem; }
  .audio-button { width: 34px; }
  .views { grid-area: 2/1/3/3; justify-self: start; padding: 3px; }
  .views button { min-width: 52px; padding: 5px 7px; font-size: .88rem; }
  .dock { bottom: max(14px, env(safe-area-inset-bottom)); gap: 5px; }
  .dock .primary { min-width: 0; min-height: 45px; padding: 7px 11px; }
  .dock .glass-button { min-height: 40px; }
  .help, .map-toggle { bottom: 70px; }
  .help { left: 10px; }.map-toggle { right: 10px; }
  .map-panel { right: 10px; top: 96px; width: min(350px, calc(100vw - 20px)); max-height: calc(100% - 220px); }
  .map { height: clamp(144px,30dvh,220px); }
  .nearby { bottom: 71px; }
  .toast { bottom: 178px; }
}
@media (pointer: coarse) { kbd { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.dialog.detail {
  inset: 0 0 0 auto; width: min(390px,100%); height: 100dvh; min-height: 0; padding: 0;
  border: 1px solid #dcc2987a; border-radius: 18px 0 0 18px;
  background: radial-gradient(ellipse at 12% 70%,#45314d88,transparent 59%),#211e35;
  color: #f3e7df; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #8e786c #242033;
}
.dialog.detail[open] { display: flex; flex-direction: column; }
.remembrance-hero {
  flex: none; position: relative; isolation: isolate; text-align: center; padding: 49px 22px 12px;
  background: radial-gradient(ellipse at 50% 44%,#85654b60,transparent 50%),
    linear-gradient(0deg,#211e35 1%,#25223adc 44%,#14192ce6),url('/assets/garden-reference.webp') 52% 18%/cover;
}
.return-garden { position: absolute; right: 15px; top: 13px; border: 1px solid #eacfa650; color: #f8e7cb; background: #262338bc; padding: 5px 11px; border-radius: 20px; font-size: .86rem; }
.return-garden kbd { background: none; color: inherit; padding: 0 3px 0 0; }
.portrait-orbit {
  position: relative; width: clamp(126px,24dvh,180px); aspect-ratio: 1; margin: 0 auto 19px;
  border: 1px solid #e7c59083; border-radius: 50%; padding: 5px; transform: rotate(-8deg);
}
.portrait-orbit::before, .portrait-orbit::after { content: '✦'; position: absolute; z-index: 2; color: #f4d9a5; font: 1rem/1 Georgia,serif; text-shadow: 0 0 8px #e9bb79; }
.portrait-orbit::before { left: 10%; top: 8%; }.portrait-orbit::after { right: 8%; bottom: 10%; font-size: .8rem; }
.portrait-medal {
  width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; position: relative; transform: rotate(8deg);
  border: 2px solid #e7c489; border-radius: 50%; background: radial-gradient(#5f566f,#352d45);
  box-shadow: 0 0 24px #e5b27536; font: 3.8rem var(--serif); color: #ffe1a5;
}
.portrait-medal[data-animal=dog],.portrait-medal[data-animal=cat],.portrait-medal[data-animal=rabbit],.portrait-medal[data-animal=bird] { background-image: url('/assets/portraits.webp'); background-size: 200% 200%; }
.portrait-medal[data-animal=cat] { background-position: 100% 0; }
.portrait-medal[data-animal=rabbit] { background-position: 0 100%; }
.portrait-medal[data-animal=bird] { background-position: 100% 100%; }
.detail .portrait-medal img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
#detailTitle { color: #ffedcc; font-size: clamp(27px,5dvh,38px); line-height: 1.3; letter-spacing: .12em; padding-left: .12em; overflow-wrap: anywhere; }
#detailYears { margin-top: 4px; color: #eacb96; font: 1.07rem/1.6 Georgia,serif; letter-spacing: .12em; }
#detailKind { color: #cfc2cc; font-size: .9rem; margin-top: 2px; }
.remembrance-story { flex: 1 0 auto; padding: 0 clamp(20px,6vw,34px); }
.remember-rule { display: flex; align-items: center; gap: 9px; justify-content: center; color: #d8bd93; font: 1rem/1.2 Georgia,serif; }
.remember-rule::before,.remember-rule::after { content:''; height: 1px; flex: 1; background: linear-gradient(90deg,transparent,#d9bd937a); }
.remember-rule::after { transform: scaleX(-1); }
.remembrance-story .story { margin: 17px 0 27px; font: 1.08rem/2.05 var(--serif); color: #f0e7e6; }
.remembrance-footer { margin: 0 clamp(20px,6vw,34px); padding: 15px 0 max(19px,env(safe-area-inset-bottom)); border-top: 1px solid #e5c99c40; text-align: center; }
.candle-offering { width: 100%; min-height: 45px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #fae2af; border-radius: 32px; background: linear-gradient(120deg,#f8e3af,#e3bd84); color: #382733; font-weight: 700; }
.candle-offering svg { width: 22px; height: 22px; }
.candle-offering:hover { filter: brightness(1.05); }
.candle-lit .candle-offering:disabled { opacity: 1; background: #3b3040; color: #f3d399; border-color: #d5b78077; }
.candle-lit .candle-offering svg { filter: drop-shadow(0 0 4px #f9ab4a); fill: #e0a65544; }
.candle-lit .portrait-medal { box-shadow: 0 0 30px #efc68466; }
.light-reading, .detail-actions { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.light-reading { color: #efddc0; font-size: .94rem; }
.light-reading strong { font: 600 1.2rem Georgia,serif; color: #ffe0a0; }
#lightTier { color: #d2c0bd; font-size: .88rem; }
#lightProgress { display: block; width: 100%; height: 5px; margin: 5px 0 12px; border: none; border-radius: 9px; appearance: none; overflow: hidden; background: #514457; color: #e5be80; }
#lightProgress::-webkit-progress-bar { background: #514457; }
#lightProgress::-webkit-progress-value { background: linear-gradient(90deg,#b88962,#ffe5a2); }
#lightProgress::-moz-progress-bar { background: #e5be80; }
.detail-actions { justify-content: center; margin-top: 10px; }
.language-control { position: relative; display: inline-flex; flex: none; padding: 0 9px; gap: 4px; }
#languageCode { font-size: .78rem; font-weight: 650; letter-spacing: .035em; }
.language-control svg { width: 21px; height: 21px; }
.language-control select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.language-control:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
#translateStory { margin-bottom: 16px; }
#translationError { margin-bottom: 16px; }
.views,.touch-controls,.map { direction: ltr; }
[dir=rtl] .views button { direction: rtl; }
[dir=rtl] .memory { text-align: right; }
[dir=rtl] .settings { direction: rtl; }
[dir=rtl] .garden-header { direction: ltr; }
[dir=rtl] .detail { text-align: right; }
.garden-header .identity h1 { line-height: 1.24; }
@media(max-width:760px){
  .language-control { padding: 0 6px; }
  .language-control svg { width: 18px; }
  #garden[data-mode=plot] .map-panel { top: 93px; max-height: calc(100% - 110px); }
  #garden[data-mode=plot] :is(.map-toggle,.help) { bottom: 12px; }
  #garden[data-mode=plot] .map-toggle { display: none; }
  .garden-header { grid-template-columns: minmax(0,1fr) auto; }
  .identity { max-width: 100%; }
  .identity-mark { flex: none; }
  .identity h1 { overflow-wrap: anywhere; }
  .views { max-width: 100%; }
  .views button { min-width: 0; }
  .dock { max-width: calc(100% - 14px); width: max-content; }
  .dock button { white-space: normal; }
}
@media(max-height:500px) {
  #garden[data-mode=plot] .map-panel { top: 67px; max-height: calc(100% - 75px); }
  #garden[data-mode=plot] .map-panel .panel-heading p { margin: 0; }
  #garden[data-mode=plot] .map-panel .panel-heading h2 { font-size: 1.06rem; }
}
@media (max-height: 540px) {
  .remembrance-hero { padding-top: 26px; }.portrait-orbit { width: 100px; margin-bottom: 8px; }
}
