.forest-world { --forest-aura-x:8%; --forest-aura-y:8%; --forest-stick:128px; --forest-knob:48px; --forest-deflection:44px; --forest-floor:var(--g600); --forest-clear:transparent; --forest-bottom:96px; --forest-min-map:220px; --forest-top:0px; --forest-card-photo:100px; --forest-sheet-max:560px; --forest-direction-max:150px; display:flex; flex-direction:column; height:calc(100svh - var(--forest-top) - var(--forest-bottom) - env(safe-area-inset-bottom)); min-height:calc(var(--forest-min-map) + var(--forest-stick)*2); position:relative; color:var(--ink); background:var(--paper); font:var(--fs-body)/1.6 var(--sans); border-radius:var(--r); overflow:hidden; }
.forest-world * { box-sizing:border-box; }
/* 라운드411 — 버튼은 앱 .btn.btn-out 규격(700·1.15·1.5px 선·--r-s·44px·:active), 초점은 2px --brand. 새 활자 조합 없음. */
.forest-world button { font:inherit; font-size:var(--fs-body); font-weight:700; line-height:1.15; color:var(--brand); background:var(--card); border:1.5px solid var(--line); border-radius:var(--r-s); padding:11px 16px; min-height:44px; cursor:pointer; }
.forest-world button:active { background:var(--g-tint); border-color:var(--g600); }
.forest-world select { font:inherit; color:var(--ink); background:var(--card); border:1.5px solid var(--line); border-radius:var(--r-s); padding:11px 16px; min-height:44px; cursor:pointer; }
.forest-world button:focus-visible,.forest-world select:focus-visible,.forest-stage:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }
.forest-toolbar,.forest-footer,.forest-options,.forest-selection,.forest-holding,.forest-confirm { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:16px; }
.forest-toolbar { justify-content:space-between; border-bottom:1px solid var(--line); }
.forest-toolbar strong { color:var(--heading); font-size:var(--fs-head); flex:1; min-width:0; overflow-wrap:anywhere; }
.forest-controls { display:flex; flex-wrap:wrap; gap:10px; }
.forest-badge { display:inline-flex; align-items:center; padding:2px 10px; border-radius:999px; background:var(--gold-soft); color:var(--gold-text); font-size:var(--fs-sub); font-weight:700; line-height:1.45; }
.forest-stage { position:relative; width:100%; flex:1; height:auto; min-height:var(--forest-min-map); overflow:hidden; touch-action:none; isolation:isolate; }
.forest-stage canvas { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.forest-stage canvas[data-layer="background"] { z-index:0; }
.forest-stage canvas[data-layer="environment"] { z-index:1; }
.forest-stage canvas[data-layer="objects"] { z-index:2; }
.forest-stage canvas[data-layer="avatar"] { z-index:3; }
.forest-stage canvas[data-layer="rain"] { z-index:4; }
.forest-target { position:absolute; z-index:5; opacity:0; pointer-events:none; padding:0 !important; border:0; min-height:0; }
.forest-target:focus-visible { opacity:1; color:var(--forest-clear); background:var(--forest-clear); pointer-events:auto; }
.forest-world .forest-joystick { position:absolute; left:16px; bottom:16px; z-index:7; border:0; width:var(--forest-stick); height:var(--forest-stick); min-height:var(--forest-stick); padding:0; border-radius:50%; background:var(--card); opacity:.85; touch-action:none; display:flex; align-items:center; justify-content:center; }
.forest-knob { width:var(--forest-knob); height:var(--forest-knob); border-radius:50%; background:var(--brand); pointer-events:none; }
.forest-veil { position:absolute; inset:0; z-index:9; background:var(--g800); pointer-events:auto; }
.forest-footer,.forest-options,.forest-selection,.forest-holding { border-top:1px solid var(--line); }
.forest-selection strong { flex-basis:100%; font-size:var(--fs-body); }
.forest-status,.forest-capacity { margin:0; padding:0 16px 16px; color:var(--ink-2); font-size:var(--fs-sub); line-height:1.6; }
.forest-status { min-height:calc(var(--fs-sub)*2); }
.forest-capacity:empty { display:none; }
.forest-options label { display:flex; align-items:center; gap:10px; }
.forest-world [hidden] { display:none !important; }
.forest-world .forest-primary { color:var(--ivory); background:var(--g700); border-color:transparent; }
.forest-world .forest-primary:active { background:var(--g800); border-color:transparent; }
.forest-world button:disabled { opacity:.5; cursor:default; }
.forest-holding .sub { color:var(--ink-2); font-size:var(--fs-sub); }
.forest-list { padding:16px; min-height:0; overflow:auto; flex:1; }
.forest-neighbors { display:grid; gap:12px; margin-top:12px; }
.forest-neighbor { display:grid; grid-template-columns:var(--forest-card-photo) 1fr; grid-template-rows:auto auto; column-gap:10px; padding:16px; border:0; border-radius:var(--r); box-shadow:var(--shadow-card); font-weight:600; line-height:1.45; color:var(--heading); text-align:left; overflow-wrap:anywhere; }
.forest-neighbor img { grid-row:1/3; width:100%; height:auto; aspect-ratio:4/3; object-fit:contain; border-radius:var(--r-s); }

.forest-toolbar { flex-shrink:0; padding:10px; gap:10px; }
.forest-toolbar strong { font-size:var(--fs-body); }
.forest-dock { flex-shrink:0; max-height:50%; overflow:auto; }
.forest-selection,.forest-holding,.forest-footer { padding:10px; gap:10px; }
.forest-selection strong { flex-basis:auto; flex-grow:1; }
.forest-hold-name { order:-1; width:100%; font-size:var(--fs-body); }
.forest-holding .sub { width:100%; }
.forest-status,.forest-capacity { padding:0 10px 10px; }
/* 라운드411 — 메뉴·확인창은 앱 .modal 해부: 아래 시트(위 모서리 18px·--shadow-modal·--card), 480px부터 가운데(--r). 배경막은 --scrim(다크에서 같이 바뀜). */
.forest-menu,.forest-confirm { color:var(--ink); background:var(--card); font:inherit; border:0; border-radius:18px 18px 0 0; width:100%; max-width:480px; max-height:78vh; margin:auto auto 0; padding:20px 20px 28px; overflow:auto; box-shadow:var(--shadow-modal); }
.forest-menu::backdrop,.forest-confirm::backdrop { background:var(--scrim); }
@media (min-width:480px) { .forest-menu,.forest-confirm { margin:auto; border-radius:var(--r); } }
.forest-menu[open] { display:flex; flex-direction:column; gap:10px; }
.forest-confirm:not([open]) { display:none; }
.forest-confirm[open] { padding:20px; }
.forest-confirm strong { width:100%; font-size:var(--fs-head); font-weight:700; line-height:1.15; color:var(--heading); }
.forest-menu .h2 { color:var(--heading); font-size:var(--fs-head); font-weight:700; line-height:1.15; margin:0; }
.forest-directions { position:absolute; inset:0; z-index:6; pointer-events:none; }
.forest-direction { pointer-events:auto; position:absolute; max-width:var(--forest-direction-max); padding:4px 10px; color:var(--heading); background:var(--card); border:0; border-radius:999px; box-shadow:var(--shadow-card); font-size:var(--fs-sub); font-weight:700; line-height:1.45; overflow-wrap:anywhere; }
.forest-direction[data-direction="left"] { left:0; top:calc(var(--fs-body)*4); }
.forest-direction[data-direction="right"] { right:0; top:calc(var(--fs-body)*4); }
.forest-direction[data-direction="up"] { left:50%; top:0; transform:translateX(-50%); }
.forest-direction[data-direction="down"] { right:0; bottom:10px; }
.forest-direction[data-visible="true"] { left:clamp(var(--forest-direction-max),var(--door-x),calc(100% - var(--forest-direction-max))); top:clamp(0px,var(--door-y),calc(100% - var(--forest-knob))); right:auto; bottom:auto; transform:translateX(-50%); }

.forest-social-sheet { display:flex; flex-direction:column; gap:12px; overflow-wrap:anywhere; }
.modal-head .h2 { color:var(--heading); font-family:var(--sans); font-size:var(--fs-head); font-weight:700; line-height:1.15; margin:0; }
.forest-social-sheet .setrow { padding:16px 14px; }
.forest-social-sheet .sub { margin:0; }
.forest-social-sheet .swrow { white-space:normal; }
.forest-social-sheet .btn { white-space:normal; height:auto; }

.forest-world[data-world="portrait"] { --forest-portrait-height:2000px; }
.forest-world[data-world="portrait"] .forest-stage { max-height:var(--forest-portrait-height); }
.forest-world[data-world="portrait"] .forest-direction { font-size:var(--fs-sub); max-width:calc(var(--forest-direction-max)*.8); padding:4px 10px; }
.forest-photo-preview { width:100%; height:auto; aspect-ratio:4/3; object-fit:contain; }

.forest-world[data-world="portrait"] { --forest-portrait-door-half:60px; }
.forest-world[data-world="portrait"] .forest-direction[data-visible="true"] { left:clamp(var(--forest-portrait-door-half),var(--door-x),calc(100% - var(--forest-portrait-door-half))); }
.forest-world[data-world="portrait"] .forest-direction { width:calc(var(--forest-portrait-door-half)*2); }
.forest-world[data-world="portrait"] .forest-direction[data-visible="true"][data-direction="left"],
.forest-world[data-world="portrait"] .forest-direction[data-visible="true"][data-direction="right"] { transform:translate(-50%,-100%); }

.forest-world[data-world="portrait"] .forest-status:empty { display:none; }
.forest-reading .sub { margin:0; overflow-wrap:anywhere; }
.forest-reading .muted { color:var(--ink-2); }

.forest-reading { margin:auto; width:calc(100% - 32px); }

.forest-avatar-editor { margin:auto; width:calc(100% - 32px); }
.forest-avatar-editor .sub { font-size:var(--fs-sub); overflow-wrap:anywhere; margin:0; }
.forest-avatar-preview { display:block; width:calc(var(--forest-card-photo)*2); max-width:100%; height:auto; margin:auto; }
.forest-avatar-choices { min-width:0; border:0; padding:0; margin:0; }
.forest-avatar-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,calc(var(--fs-sub)*7)),1fr)); gap:10px; }
.forest-avatar-choice { position:relative; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:10px; border:1.5px solid var(--line); border-radius:var(--r-s); padding:10px; cursor:pointer; min-width:0; }
.forest-avatar-choice:has(input:checked) { border-color:var(--brand); background:var(--g-tint); }
.forest-avatar-choice:focus-within { outline:2px solid var(--brand); outline-offset:2px; }
.forest-avatar-choice input { accent-color:var(--brand); width:var(--fs-body); height:var(--fs-body); flex-shrink:0; }
.forest-avatar-thumb { width:var(--forest-card-photo); max-width:100%; height:auto; }
.forest-avatar-choice .sub { width:100%; text-align:center; }
.forest-avatar-swatch { width:var(--fs-head); height:var(--fs-head); border:1px solid var(--line); border-radius:var(--r-s); }

/* 정식 숲 모드만 전체 화면. 기존 지도와 사진 구도는 유지한다. */
.forest-world[data-navigation="village"] { height:100%; min-height:0; border-radius:0; }
.forest-world[data-navigation="village"] .forest-stage { min-height:0; max-height:none; background:var(--g-tint); }
.forest-world[data-navigation="village"] .forest-dock { max-height:none; overflow:visible; }
.forest-world[data-navigation="village"] .forest-toolbar { padding:0 10px; }
.forest-world[data-navigation="village"] button { min-width:var(--forest-deflection); min-height:var(--forest-deflection); }
.forest-world[data-navigation="village"] .forest-entry { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; padding:0 10px 10px; }
.forest-world[data-navigation="village"] .forest-entry strong { font-size:var(--fs-sub); }
.forest-world[data-navigation="village"] .forest-target { pointer-events:auto; }
.forest-world[data-navigation="village"] .forest-target:is([data-building="sign"],[data-building="mail"]) { z-index:6; }
.forest-world[data-navigation="village"] .forest-direction { width:var(--forest-deflection); max-width:var(--forest-deflection); padding:0; }
.forest-world[data-navigation="village"] .forest-direction[data-visible="true"] { left:clamp(calc(var(--forest-deflection)/2),var(--door-x),calc(100% - var(--forest-deflection)/2)); top:clamp(0px,var(--door-y),calc(100% - var(--forest-deflection))); transform:translateX(-50%); }
.forest-world[data-navigation="village"] .forest-status { padding-bottom:0; }
.forest-world[data-navigation="village"] .forest-target[data-callout] { width:auto !important; height:auto !important; opacity:1; padding:0 10px !important; border-radius:999px; font-size:var(--fs-sub); font-weight:700; line-height:1.45; color:var(--ink); background:var(--card); }

.forest-week-note { display:flex; flex-direction:column; gap:10px; }
.forest-week-note .h3 { font-size:var(--fs-body); font-weight:700; line-height:1.45; color:var(--brand); margin:0; overflow-wrap:anywhere; }
.forest-week-note .sub { font-size:var(--fs-sub); line-height:1.6; color:var(--ink-2); margin:0; overflow-wrap:anywhere; }

/* 라운드415 — 지도는 고정하고 안내만 지도 위에 겹친다. */
.forest-world[data-navigation="village"] .forest-toolbar { position:absolute; width:100%; z-index:6; border:0; pointer-events:none; }
.forest-world[data-navigation="village"] .forest-toolbar strong { position:absolute; width:var(--fs-sub); height:var(--fs-sub); overflow:hidden; clip-path:inset(100%); }
.forest-world[data-navigation="village"] .forest-stage { flex:none; height:100%; }
.forest-world[data-navigation="village"] .forest-dock { position:absolute; inset:0; z-index:8; pointer-events:none; }
.forest-world[data-navigation="village"] .forest-dock > :is(.forest-selection,.forest-entry,.forest-holding) { position:absolute; max-width:calc(100% - 20px); width:max-content; max-height:calc(100% - 20px); overflow:auto; padding:16px; border:0; border-radius:var(--r); box-shadow:var(--shadow-card); background:var(--card); pointer-events:auto; margin:0; gap:10px; }
.forest-world[data-navigation="village"] .forest-dock .forest-selection strong { flex-basis:auto; }
.forest-world[data-navigation="village"] .forest-dock :is(.forest-status,.forest-capacity) { position:absolute; bottom:10px; left:10px; right:10px; margin:0; padding:0; background:var(--card); font-size:var(--fs-sub); }
.forest-world[data-navigation="village"] .forest-capacity { bottom:calc(var(--fs-sub)*4); }
.forest-world[data-navigation="village"] .forest-stop { pointer-events:auto; }
.forest-world[data-navigation="village"] .forest-dock > .forest-stop { position:absolute; bottom:calc(var(--fs-sub)*4); left:10px; }
.forest-world[data-navigation="village"] .forest-target[data-selected="true"] { opacity:1; color:transparent; background:transparent; outline:2px solid var(--brand); outline-offset:2px; border-radius:var(--r-s); }

/* 라운드417 — 건물 내부는 상단 바 아래 세계와 같은 영역의 독립 화면이다. */
.forest-world[data-navigation="village"][data-interior] > :is(.forest-stage,.forest-toolbar,.forest-list,.forest-dock) { visibility:hidden; }
/* 라운드408-2 — 앱의 건물 안 화면(.forest-interior-screen)과 같은 열·같은 머리: 돌아가기 버튼(.btn-out 규격)·제목(.h2 규격)·본문이 --shell-max 열의 왼쪽 선에 선다. */
.forest-world[data-navigation="village"] .forest-interior[open] { position:absolute; inset:0; width:100%; height:100%; max-width:none; max-height:none; margin:0; border:0; border-radius:0; padding:0; box-sizing:border-box; overflow:hidden; display:flex; flex-direction:column; overscroll-behavior:contain; background:var(--paper); z-index:10; gap:0; }
.forest-world[data-navigation="village"] .forest-interior > * { flex-shrink:0; width:100%; max-width:none; align-self:stretch; box-sizing:border-box; }
.forest-world[data-navigation="village"] .forest-interior > .forest-interior-content > .h2 { padding:0; margin:16px 0; color:var(--heading); font-size:var(--fs-head); font-weight:700; line-height:1.15; }
.forest-world[data-navigation="village"] .forest-interior > .forest-interior-content > .sub { font-size:var(--fs-sub); }
/* 라운드414 — 사무소·팻말·스티커 행은 앱 설정 화면의 .card.setmenu > .setrow 해부 그대로(꺾쇠는 앱과 같은 SVG, 이동 행만). 기본 버튼 규격이 특정도로 이기므로 행 값으로 되돌린다. */
.forest-world .forest-interior .setrow { display:flex; align-items:center; justify-content:space-between; width:100%; min-width:0; min-height:44px; margin:0; padding:16px 14px; font-size:var(--fs-value); font-weight:600; line-height:1.15; color:var(--heading); background:none; border:0; border-bottom:1px solid var(--line-2); border-radius:0; box-shadow:none; }
.forest-world .forest-interior .setmenu .setrow:last-child { border-bottom:0; }
.forest-world .forest-interior .setrow:active { color:var(--brand); background:none; border-color:var(--line-2); }
.forest-world .forest-interior .setrow:disabled { opacity:.5; cursor:default; }
.forest-world .forest-interior .setrow-danger,.forest-world .forest-interior .setrow-danger:active { color:var(--neg); }
.forest-world .forest-interior .setrow-chev { width:18px; height:18px; color:var(--ink-3); flex-shrink:0; }
.forest-world .forest-interior .card > .sub + .setmenu { margin-top:10px; }
.forest-world[data-navigation="village"] .forest-interior > .forest-interior-content > .forest-interior-status { margin:-8px 0 12px; line-height:1.6; color:var(--ink-2); }
.forest-world[data-navigation="village"] .forest-interior > .forest-interior-content > .forest-interior-status[hidden] { display:none; }
.forest-bag-label { display:flex; align-items:center; gap:10px; min-width:0; }
.forest-bag-thumb { width:28px; height:28px; object-fit:contain; flex-shrink:0; }
.forest-world .forest-interior .btn-primary,.forest-world .forest-scale-notice .btn-primary { color:var(--ivory); background:var(--g700); border-color:transparent; }
.forest-world .forest-interior .btn-primary:active { background:var(--g800); border-color:transparent; }
.forest-world .forest-interior .forest-avatar-card .sub { text-align:center; }
.forest-world .forest-interior .forest-avatar-choices > legend.h3 { padding:0; margin:0 0 10px; font-size:var(--fs-body); font-weight:700; line-height:1.45; color:var(--brand); }
/* 라운드414 — 데모(모듈 CSS만 싣는 페이지)에서도 같은 모양이 나도록 카드·스위치의 값을 모듈 안에 둔다. 값은 앱 규칙과 같다(전환 효과는 모듈 규칙상 없음). */
.forest-world .forest-interior .card,.forest-world .forest-scale-notice.card { background:var(--card); border-radius:var(--r); padding:20px; box-shadow:var(--shadow-card); margin:0 0 12px; }
.forest-world .forest-interior .card.setmenu { padding:0; }
.forest-world .forest-interior .card > h3 { margin:0 0 10px; font-size:var(--fs-body); font-weight:700; line-height:1.45; color:var(--brand); }
.forest-world .forest-interior .card > .sub,.forest-world .forest-scale-notice.card > .sub { margin:8px 0 0; font-size:var(--fs-sub); line-height:1.6; color:var(--ink-2); }
.forest-world .forest-interior .card > .muted { margin:0; font-size:var(--fs-body); line-height:1.6; color:var(--ink-2); }
.forest-world .forest-interior .swrow { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; }
.forest-world .forest-interior .swrow > span { font-size:var(--fs-body); line-height:1.45; color:var(--ink); }
.forest-world .forest-interior .switch { position:relative; flex:0 0 auto; width:44px; height:26px; }
.forest-world .forest-interior .switch input { position:absolute; opacity:0; width:0; height:0; margin:0; }
.forest-world .forest-interior .sw-track { display:block; width:44px; height:26px; border-radius:999px; background:var(--line); }
.forest-world .forest-interior .sw-track::after { content:""; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%; background:var(--card); box-shadow:var(--shadow-card); }
.forest-world .forest-interior .switch input:checked + .sw-track { background:var(--brand); }
.forest-world .forest-interior .switch input:checked + .sw-track::after { transform:translateX(18px); }
.forest-world .forest-interior .switch input:focus-visible + .sw-track { outline:2px solid var(--brand); outline-offset:2px; }

/* 라운드417 — 이름표 재선택과 건물 실루엣의 정적 밝기. */
.forest-world[data-navigation="village"] .forest-dock > .forest-entry { padding:0; background:transparent; border:0; box-shadow:none; }
.forest-world[data-navigation="village"] .forest-entry > strong,
.forest-world[data-navigation="village"] .forest-entry .forest-stop { display:none; }
.forest-world[data-navigation="village"] .forest-entry > button:disabled { opacity:1; }
.forest-world[data-navigation="village"] .forest-target[data-selected="true"] { outline:none; border-color:var(--forest-clear); box-shadow:none; }
.forest-world[data-navigation="village"] .forest-target:focus-visible { outline:2px solid var(--brand); }
.forest-world[data-navigation="village"][data-dragging] .forest-target { pointer-events:none; }
.forest-interior-veil { position:fixed; z-index:1000; background:var(--g800); pointer-events:auto; }

.forest-world[data-navigation="village"] .forest-entry > .forest-primary { background:var(--card); color:var(--heading); font-size:var(--fs-sub); }

/* 라운드417 검토 — 접촉 영역과 작은 시각 면을 분리한다. */
.forest-world[data-navigation="village"] .forest-entry > .forest-primary,
.forest-world[data-navigation="village"] .forest-direction {
  position:relative; isolation:isolate; color:var(--heading); background:transparent;
  border:0; border-radius:999px; box-shadow:none;
  font-family:var(--sans); font-size:var(--fs-body); font-weight:700; line-height:1.45;
  min-height:var(--forest-deflection); min-width:var(--forest-deflection);
  padding:0 4px;
}
.forest-world[data-navigation="village"] .forest-entry > .forest-primary::before {
  content:""; position:absolute; z-index:-1; pointer-events:none;
  inset-inline:0; top:50%; height:calc(1.45em + 4px); transform:translateY(-50%);
  border-radius:999px; background:var(--card); box-shadow:var(--shadow-card);
}
.forest-world[data-navigation="village"] .forest-entry > .forest-primary:active::before { background:var(--g-tint); }
.forest-world[data-navigation="village"] .forest-direction { position:absolute; padding:0; background:transparent; box-shadow:none; }

.forest-world[data-navigation="village"] .forest-entry > .forest-primary { min-height:max(var(--forest-deflection),calc(1.45em + 8px)); }

.forest-world[data-navigation="village"] .forest-return-band { position:absolute; inset:auto 0 0; min-height:var(--forest-deflection); display:flex; align-items:center; justify-content:center; background:var(--card); box-shadow:var(--shadow-card); color:var(--ink); font-size:var(--fs-sub); z-index:8; pointer-events:none; }
.forest-return-band[hidden] { display:none !important; }

/* 주인에게만 보이는 합계. 지도 레이아웃·입력을 소비하지 않는다. */
.forest-totals { --forest-wood-base:color-mix(in srgb,var(--gold-soft) 85%,var(--paper)); --forest-wood-grain:color-mix(in srgb,var(--gold-text) 7%,transparent); --forest-wood-edge:color-mix(in srgb,var(--gold-text) 75%,var(--ink)); --forest-wood-face:color-mix(in srgb,var(--gold) 15%,var(--paper)); position:absolute; left:50%; top:max(calc(var(--fs-sub)/2),env(safe-area-inset-top,0px)); transform:translateX(-50%); z-index:5; pointer-events:none; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:10px; padding:10px 16px; box-sizing:border-box; width:max-content; max-width:calc(100% - var(--fs-sub) - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px)); border:calc(var(--fs-sub)/5) solid var(--forest-wood-edge); border-radius:var(--r-s) var(--r) var(--r-s) var(--r); background:repeating-radial-gradient(ellipse at 15% -80%,transparent 0 calc(var(--fs-sub)*1.6),var(--forest-wood-grain) calc(var(--fs-sub)*1.65) calc(var(--fs-sub)*1.7),transparent calc(var(--fs-sub)*1.8) calc(var(--fs-sub)*3)),linear-gradient(var(--forest-wood-face),var(--forest-wood-base)); background-color:var(--paper); color:var(--ink-2); font-family:var(--sans); line-height:1.6; box-shadow:inset 0 0 0 calc(var(--fs-sub)/12) var(--gold),0 calc(var(--fs-sub)/5) 0 var(--forest-wood-edge),var(--shadow-card); }
.forest-totals::before,.forest-totals::after { content:""; position:absolute; top:calc(var(--fs-sub)/2); width:calc(var(--fs-sub)/3); height:calc(var(--fs-sub)/3); border-radius:50%; background:var(--forest-wood-edge); }
.forest-totals::before { left:calc(var(--fs-sub)/2); }
.forest-totals::after { right:calc(var(--fs-sub)/2); }
.forest-totals-label { font-family:var(--sans); font-size:var(--fs-value); font-weight:700; color:var(--heading); }
.forest-totals-rate { font-family:var(--sans); font-size:var(--fs-title); font-weight:800; line-height:1.15; font-variant-numeric:tabular-nums; }
.forest-totals-rate[data-sign="positive"] { color:var(--pos); }
.forest-totals-rate[data-sign="negative"] { color:var(--neg); }
.forest-totals-amount { font-size:var(--fs-sub); font-weight:400; font-variant-numeric:tabular-nums; }
.forest-totals > * { max-width:100%; overflow-wrap:anywhere; }

/* 라운드443: 문구·조작은 지도 안에만, 내부 문서의 선택·복사는 유지한다. */
.forest-world[data-navigation="village"] .forest-stage { user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.forest-world[data-navigation="village"] .forest-dock > .forest-status { left:auto; right:auto; bottom:auto; width:max-content; max-width:calc(100% - 20px); min-height:0; margin:0; padding:4px 10px; border:0; border-radius:999px; background:var(--card); box-shadow:var(--shadow-card); pointer-events:none; }
.forest-totals-summary { display:grid; gap:4px; min-width:0; }
.forest-totals-table { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:4px 6px; min-width:0; max-width:100%; font-size:var(--fs-sub); }
.forest-totals-caption,.forest-totals-unit { white-space:nowrap; }
.forest-totals-amount { text-align:right; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
:root[data-theme="dark"] .forest-totals,.forest-world[data-theme="dark"] .forest-totals { --forest-wood-face:var(--paper); --forest-wood-base:var(--paper); --forest-wood-grain:color-mix(in srgb,var(--gold-text) 3%,transparent); }

/* 배경은 끝까지, 조작은 운영체제 안전 영역 안에 둔다. */
.forest-world[data-navigation="village"] { --forest-safe-top:env(safe-area-inset-top,0px); --forest-safe-right:env(safe-area-inset-right,0px); --forest-safe-bottom:env(safe-area-inset-bottom,0px); --forest-safe-left:env(safe-area-inset-left,0px); }
body.forest-game-active .forest-world[data-navigation="village"] { --forest-safe-top:0px; }

/* 라운드470 — 사무소와 같은 카드/행, 큰 글자는 행 안에서 줄바꿈. */
.forest-world .forest-village .forest-village-row { cursor:default; flex-wrap:wrap; gap:12px; }
.forest-world .forest-village-row > div { flex:1; min-width:150px; }
.forest-world .forest-village-row .h3 { margin:0; font-size:var(--fs-body); line-height:1.45; }
.forest-world .forest-village-row .sub { margin:8px 0 0; line-height:1.6; font-weight:400; color:var(--ink-2); }
.forest-world .forest-village-credit { display:flex; align-items:center; gap:10px; }

/* 라운드475 — 글꼴 대신 고정 나뭇잎 윤곽 */
.forest-credit-leaf { width: 24px; height: 24px; flex: 0 0 24px; color: var(--brand); vertical-align: middle; }

/* 라운드490 — 상단 바 아래 두 행을 위한 공간을 먼저 확보하고 지도를 배치한다. */
.forest-world[data-navigation="village"] > .forest-stage { flex:1 1 0; height:0; min-height:0; }
.forest-world[data-navigation="village"] > .forest-totals { position:absolute; left:0; top:0; transform:none; width:100%; max-width:100%; }
.forest-world[data-navigation="village"] .forest-dock > .forest-selection[data-kind="tree"] { padding:4px 8px; background:transparent; border:0; border-radius:0; box-shadow:none; max-width:min(180px,calc(100% - 20px)); overflow:hidden; }
.forest-world[data-navigation="village"] .forest-selection[data-kind="tree"] strong { display:block; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:var(--fs-sub); line-height:1.45; }

/* 글자 외곽선만 두고 접촉 영역·선택 동작은 유지한다. */
.forest-world[data-navigation="village"] :is(.forest-selection[data-kind="tree"] strong,.forest-entry > .forest-primary,.forest-target[data-callout]) { color:var(--ink); -webkit-text-stroke:1px var(--paper); paint-order:stroke fill; }
.forest-world[data-navigation="village"] .forest-entry > .forest-primary::before { content:none; }
.forest-world[data-navigation="village"] .forest-target[data-callout] { background:transparent; border:0; box-shadow:none; }

/* 라운드498 — 이름표는 상태줄과 같은 글자, 외곽선은 얇게. */
.forest-world[data-navigation="village"] :is(.forest-target[data-callout],.forest-entry > .forest-primary) { font-family:var(--sans); font-size:var(--fs-sub); font-weight:700; }

/* 라운드508 — 건물 안 돌아가기 버튼과 같은 규격. 부모 화면 복원은 애니메이션 없이 같은 프레임. */
.forest-game-active [data-social-back] [data-social-return] { white-space:nowrap; }

/* 라운드508 — 상단 바와 본문을 분리해 내용이 돌아가기 버튼 아래로 흐르지 않는다. */
.forest-return-bar { position:sticky; top:0; z-index:1; flex:0 0 auto; width:100%; padding:16px max(14px, calc((100% - var(--shell-max)) / 2 + 14px)); box-sizing:border-box; background:var(--paper); border-bottom:1px solid var(--line-2); }
.forest-return-bar > button { position:static; min-height:44px; white-space:nowrap; }
.forest-interior-content { flex:1 1 auto; min-height:0; min-width:0; overflow:auto; overscroll-behavior:contain; padding:0 max(14px, calc((100% - var(--shell-max)) / 2 + 14px)) 16px; box-sizing:border-box; }
.forest-world[data-navigation="village"] .forest-interior > .forest-interior-content { flex:1 1 auto; flex-shrink:1; }

/* 라운드519 — 팻말의 주인 프로필과 최근 인사. */
.forest-profile-head,.forest-profile-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.forest-profile-head .h2 { flex:1; min-width:0; overflow-wrap:anywhere; }
.forest-profile-head .badge { margin-left:10px; flex:none; white-space:nowrap; }
.forest-profile-avatar { width:80px; height:80px; flex:none; }
.forest-world .forest-profile-pill { border-radius:999px; }
/* 라운드520 — 세 칸은 같은 활자·너비, 동작만 분리한다. */
.forest-profile-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:10px -10px; }
.forest-profile-stat { display:flex; flex-direction:column; align-items:center; min-width:0; text-align:center; }
.forest-stat-reaction { grid-column:1; }
.forest-stat-remembered { grid-column:2; }
.forest-stat-greetings { grid-column:3; }
.forest-stat-top { display:flex; align-items:center; justify-content:center; min-height:44px; }
.forest-world .forest-stat-top > .forest-stat-number,.forest-world .forest-stat-top > .forest-stat-heart { display:flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; padding:0; border:0; background:transparent; color:var(--brand); }
.forest-world .forest-stat-top > button:active { background:var(--g-tint); }
.forest-stat-value { font-size:var(--fs-body); font-weight:700; line-height:1.75; }
.forest-profile-stat > .sub { margin:0; font-weight:400; }
.forest-reaction-heart { width:24px; height:24px; flex:0 0 24px; color:var(--brand); vertical-align:middle; }

.forest-profile-comment { border-top:1px solid var(--line-2); }
.forest-profile-comment p { overflow-wrap:anywhere; white-space:pre-wrap; }
.forest-world .forest-profile-comment .setrow { display:flex; justify-content:flex-start; gap:10px; padding-inline:0; }
.forest-profile-comment > p { margin-left:42px; }
.forest-comment-avatar { width:32px; height:32px; flex:none; }

.forest-profile-meta { display:flex; align-items:center; flex-wrap:wrap; gap:10px; min-width:0; }

.forest-world[data-navigation="village"] .forest-scale-notice { position:absolute; z-index:40; left:10px; right:10px; bottom:calc(10px + env(safe-area-inset-bottom)); margin:0; }

.forest-scale-notice .copybtns { display:flex; gap:3px; margin-top:14px; flex-wrap:wrap; }

/* 스티커는 알파 윤곽만 잡고 짧은 탭은 땅으로 보낸다. */
.forest-world[data-navigation="village"] .forest-target[data-building="decor"] { min-width:0; min-height:0; border-radius:0; }

/* Existing forest tokens and type; delay is controlled by the loader. */
.forest-loading { position:absolute; inset:0; z-index:90; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; background:var(--paper); color:var(--ink); padding:24px; }
.forest-loading[hidden] { display:none; }
.forest-loading > svg { width:48px; height:48px; color:var(--brand); }
.forest-loading > p { margin:0; font-size:var(--fs-body); }
.forest-loading progress { width:min(240px,80%); height:10px; accent-color:var(--brand); border:0; border-radius:10px; overflow:hidden; background:var(--line-2); }
.forest-loading progress::-webkit-progress-bar { background:var(--line-2); }
.forest-loading progress::-webkit-progress-value { background:var(--brand); }
