:root {
  --paper:#f8f1e3; --ink:#263a2f; --muted:#625748; --line:#d6c6a8;
  --rust:#99522f; --green:#294b3b; --page-progress:0;
  --serif:"Hiragino Mincho ProN","Yu Mincho","Noto Serif CJK JP",serif;
  --sans:system-ui,-apple-system,"Hiragino Sans","Yu Gothic",sans-serif;
  color-scheme:light;
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; scroll-padding-top:88px; }
body { margin:0; background:var(--paper); color:var(--ink); font:16px/1.8 var(--sans); }
body:has(dialog[open]) { overflow:hidden; }
img { display:block; width:100%; }
a { color:inherit; text-decoration:none; }
button { font:inherit; color:inherit; }
button,summary { cursor:pointer; }
a,button,summary { touch-action:manipulation; }
[hidden] { display:none !important; }
:focus-visible { outline:3px solid #bb653c; outline-offset:4px; }
h1,h2,h3,p,figure { margin:0; }
h1,h2 { font-family:var(--serif); font-weight:800; }
h2 { font-size:clamp(2.25rem,4.5vw,3.75rem); line-height:1.22; letter-spacing:.025em; }
h3 { font-size:1.2rem; line-height:1.45; }
.skip { position:fixed; z-index:10; top:6px; left:10px; transform:translateY(-180%); padding:10px 18px; background:white; }
.skip:focus { transform:none; }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.wrap { width:min(1180px, calc(100% - 100px)); margin-inline:auto; }

.header { position:sticky; top:0; z-index:5; background:#20382d; color:#fff6e5; border-bottom:1px solid #bba37570; }
.header::after { content:""; position:absolute; inset:auto 0 -1px; height:2px; background:#e4ba77; transform:scaleX(var(--page-progress)); transform-origin:left; pointer-events:none; }
.header-inner { display:flex; align-items:center; justify-content:space-between; gap:18px; height:68px; width:min(1280px,calc(100% - 80px)); margin:auto; }
.brand { display:inline-flex; gap:11px; align-items:center; font-family:var(--serif); font-size:1.24rem; font-weight:750; letter-spacing:.045em; white-space:nowrap; }
.brand-seal { display:grid; place-items:center; width:34px; height:34px; flex:none; border:1px solid #bea877; outline:1px solid #aa92574a; outline-offset:3px; border-radius:50%; }
.brand-seal .acorn { scale:.69; background:#f1d398; }
.brand-seal .acorn::before,.brand-seal .acorn::after { background:#ca9a5f; }
.nav { display:flex; align-items:center; gap:clamp(18px,3.2vw,46px); font-size:.94rem; font-weight:650; }
.nav a,.menu { min-height:44px; display:inline-flex; align-items:center; }
.nav a { text-underline-offset:.45em; }
.nav a:hover,.nav a:focus-visible { color:#f7d799; text-decoration:underline; }
.text-link:hover { color:var(--rust); }
.header-game { display:inline-flex; flex:none; gap:10px; align-items:center; min-height:44px; padding:4px 16px; border:1px solid #dbba84; border-radius:5px; background:#ead0a0; color:#263d2f; font-size:.94rem; font-weight:750; white-space:nowrap; }
.header-game:hover { background:#f7deb0; }
.sprout { display:inline-block; position:relative; width:14px; height:12px; border-bottom:1px solid currentColor; transform:rotate(-4deg); }
.sprout::before,.sprout::after { content:""; position:absolute; background:currentColor; width:8px; height:6px; border-radius:1px 8px 1px 8px; }
.sprout::before { top:4px; left:0; }.sprout::after { top:1px; left:6px; transform:rotate(-70deg); }
.header :focus-visible { outline-color:#ffe2a6; }
.header-inner .nav { margin-left:auto; }
.motion-toggle { display:inline-flex; gap:8px; align-items:center; min-height:44px; padding:4px 8px; background:transparent; border:0; color:#eee0c7; font-size:.87rem; white-space:nowrap; }
.motion-toggle::before { content:""; width:9px; height:9px; border:1px solid #e6ca98; border-radius:50%; }
.motion-toggle[aria-pressed="true"]::before { background:#e6ca98; box-shadow:inset 0 0 0 2px #263b2e; }
.motion-toggle:disabled { cursor:default; }
.farm-feature { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr); gap:clamp(24px,5vw,72px); align-items:center; margin-bottom:clamp(58px,8vw,108px); padding:clamp(14px,2.5vw,34px); border-block:1px solid var(--line); background:#f1e8d9; }
.farm-feature img { height:auto; border-radius:7px 18px 8px 14px; }
.farm-invitation { padding:3px clamp(2px,1.4vw,20px) 8px 0; }
.farm-invitation h2 { font-size:clamp(1.9rem,4.8vw,3.75rem); }
.farm-invitation h2 small { display:block; margin-bottom:.35em; color:var(--rust); font:700 1rem/1.4 var(--sans); }
.farm-invitation p { margin:16px 0 20px; color:var(--muted); }
.menu { display:none; border:1px solid var(--line); background:transparent; border-radius:8px; padding:6px 11px; gap:8px; font-size:.83rem; }
.acorn { position:relative; display:inline-block; flex:0 0 auto; width:19px; height:21px; border-radius:40% 40% 55% 55%; background:#b87946; transform:rotate(-21deg); }
.acorn::before { content:""; position:absolute; inset:-1px -2px auto; height:9px; border-radius:55% 55% 28% 28%; background:#684835; }
.acorn::after { content:""; position:absolute; width:3px; height:6px; border-radius:2px; background:#684835; top:-4px; left:9px; }

.hero { display:grid; grid-template-columns:.93fr 1.07fr; width:min(1180px,calc(100% - 100px)); margin:clamp(64px,8vw,110px) auto 0; border-block:1px solid var(--line); }
.hero-copy { align-self:center; padding:58px clamp(30px,5.3vw,84px); padding-right:clamp(22px,3vw,48px); }
.greeting { margin-bottom:15px; color:var(--rust); font-weight:750; font-size:clamp(.93rem,1.35vw,1.15rem); letter-spacing:.045em; }
.hero h2 { font-size:clamp(2.2rem,4vw,3.7rem); line-height:1.36; letter-spacing:.04em; }
.intro { color:var(--muted); margin-top:23px; line-height:1.95; font-size:clamp(.95rem,1.24vw,1.11rem); }
.hero-actions { display:flex; gap:10px 22px; flex-wrap:wrap; align-items:center; margin-top:26px; }
.button { display:inline-flex; justify-content:center; align-items:center; gap:12px; border-radius:8px; min-height:51px; padding:8px 17px; font-weight:750; font-size:.94rem; }
.primary { background:var(--green); color:#fff9ed; }
.primary:hover { background:#426557; }
.button span { font-size:.76em; }
.text-link { display:inline-flex; align-items:center; gap:8px; min-height:44px; font-weight:720; font-size:.94rem; }
.text-link span { color:var(--rust); }
.hero-scene { position:relative; min-height:395px; overflow:hidden; isolation:isolate; background:#8c5b37; }
.hero-photo { position:absolute; height:100%; object-fit:cover; object-position:48% 55%; }
.hero-scene::after { content:""; position:absolute; inset:50% 0 0; pointer-events:none; background:linear-gradient(transparent,#2a170c48); }
.pouch { position:absolute; z-index:2; right:clamp(13px,3vw,43px); bottom:24px; display:grid; justify-items:end; width:min(289px,calc(100% - 26px)); }
.pouch-button { display:inline-flex; align-items:center; gap:12px; min-height:50px; padding:9px 15px; border:1px solid #fff9ea; border-radius:10px; background:#fff6e8; box-shadow:0 4px 20px #311a1240; font-weight:760; }
.pouch-button:hover { background:#fffaf1; }
.pouch-button span { color:var(--rust); transition:transform .2s; }
.pouch-button[aria-expanded="true"] span { transform:rotate(45deg); }
.pouch-note { position:absolute; right:0; bottom:60px; display:flex; gap:14px; align-items:flex-start; width:100%; border:1px solid #ecddca; border-radius:13px; background:#fff9ee; padding:16px 18px 10px; box-shadow:0 5px 30px #25160e38; animation:note-in .32s ease-out both; }
.pouch-note .acorn { margin-top:8px; animation:acorn-roll .6s ease-out both; }
.pouch-note p { color:var(--rust); font:800 1.18rem/1.6 var(--serif); }
.pouch-note a { display:block; min-height:44px; align-content:center; font-size:.9rem; font-weight:650; text-decoration:underline; text-underline-offset:4px; }
.falling-leaves { pointer-events:none; position:absolute; inset:0; overflow:hidden; }
.falling-leaves i { position:absolute; top:-6%; left:15%; width:11px; height:17px; border-radius:85% 0 80% 5%; background:#f1b453; opacity:0; animation:leaf 13s linear infinite; }
.falling-leaves i:nth-child(2) { left:74%; animation-delay:4s; background:#db7741; }
.falling-leaves i:nth-child(3) { left:53%; width:7px; height:11px; animation-delay:7s; }
.falling-leaves i:nth-child(4) { left:89%; animation-delay:10s; background:#ad5332; }
@keyframes leaf { 0% { transform:translate(0,0) rotate(12deg); opacity:0; } 14% { opacity:.8; } 74% { opacity:.62; } 100% { transform:translate(-57px,680px) rotate(316deg); opacity:0; } }
@keyframes note-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
@keyframes acorn-roll { from { transform:translate(-12px,-10px) rotate(-145deg); } to { transform:rotate(-21deg); } }

.world { padding-block:clamp(55px,9vw,121px); display:grid; grid-template-columns:1.03fr .97fr; gap:clamp(28px,7vw,100px); align-items:center; }
.world-photo { position:relative; aspect-ratio:1.10; overflow:hidden; border-radius:11px; background:#a17c55; }
.world-photo img { position:absolute; inset:0; height:100%; object-fit:cover; object-position:50% 51%; opacity:0; visibility:hidden; transition:opacity .4s,visibility .4s; }
.world-photo .scene-garden { opacity:1; visibility:visible; }
.world:has(#place-porch[open]) .scene-porch,.world:has(#place-kitchen[open]) .scene-kitchen { opacity:1; visibility:visible; }
.world:has(#place-porch[open],#place-kitchen[open]) .scene-garden { opacity:0; visibility:hidden; }
.world-copy > p { color:var(--muted); margin:14px 0 23px; }
.places { border-top:1px solid var(--line); }
.places details { border-bottom:1px solid var(--line); padding-inline:4px; }
summary { list-style:none; }
summary::-webkit-details-marker { display:none; }
.places summary { display:flex; min-height:53px; justify-content:space-between; gap:16px; align-items:center; font-weight:750; }
.places summary::after { content:"＋"; color:var(--rust); }
.places details[open] summary::after { content:"−"; }
.places details[open] summary { color:var(--rust); }
.places p { color:var(--muted); padding-bottom:13px; font-size:.93rem; }
.places a { margin-top:-10px; }

.friends { background:#e9dfc9; padding-block:clamp(56px,8vw,101px); border-block:1px solid #d7c6a9; }
.section-title { margin-bottom:28px; }
.section-title p { margin-top:12px; color:var(--muted); }
.friend-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); align-items:start; gap:clamp(12px,2vw,26px); }
.friend { padding:7px 7px 0; border-radius:3px; background:#fff8e8; border:1px solid #d5c3a4; box-shadow:0 4px 0 -2px #c3b397,0 5px 16px #70533712; overflow:clip; }
.friend summary:focus-visible { outline-offset:-4px; }
.portrait { display:block; aspect-ratio:.87; overflow:hidden; background:#c29c72; }
.portrait img { height:100%; object-fit:cover; object-position:50% 39%; transition:transform .35s; }
#person-emoc .portrait img { object-position:50% 36%; }
#person-odeo .portrait img { object-position:50% 27%; }
#person-nuta .portrait { background:var(--paper); }
#person-nuta .portrait img { object-fit:contain; object-position:center; transform-origin:50% 78%; }
.friend summary:hover img { transform:scale(1.035); }
.friend.is-reacting img { animation:portrait-reaction .65s ease-out; }
@keyframes portrait-reaction { 35% { transform:scale(1.06) rotate(-1deg); } 70% { transform:scale(1.025); } }
.friend-name { min-height:56px; display:flex; align-items:center; justify-content:space-between; gap:6px; padding:6px 14px; font-weight:800; }
.friend-name span { color:var(--rust); font-weight:500; transition:transform .2s; }
.friend[open] .friend-name span { transform:rotate(45deg); }
.friend-copy { padding:0 14px 11px; color:var(--muted); font-size:.9rem; }
.friend-copy .text-link { margin-top:3px; font-size:.84rem; color:var(--ink); }

.footer { background:var(--green); color:#fff4df; padding-block:34px; }
.footer-inner { display:flex; align-items:center; justify-content:space-between; gap:15px 30px; flex-wrap:wrap; }
.footer-name { font:750 1.5rem/1.45 var(--serif); }
.footer-inner p + p { color:#e2d2b8; font-size:.87rem; }
.footer a { min-height:44px; display:inline-flex; align-items:center; gap:6px; font-size:.92rem; }

dialog { border:0; border-radius:14px; padding:0; background:#fff9ed; color:var(--ink); width:min(468px,calc(100% - 24px)); max-height:calc(100% - 24px); }
dialog::backdrop { background:#1b211bd9; }
.motion-ready [data-reveal] { opacity:0; transform:translateY(18px); transition:opacity .55s ease-out,transform .55s ease-out; }
.motion-ready [data-reveal].is-visible,.motion-ready [data-reveal]:focus-within { opacity:1; transform:none; }
.motion-ready [data-reveal]:target { opacity:1; transform:none; transition:none; }

@media (max-width:1000px) {
  .wrap { width:calc(100% - 64px); }
  .header-inner { width:calc(100% - 54px); }
  .hero { width:calc(100% - 64px); }
  .hero-scene { min-height:360px; }
  .desktop-break { display:none; }
}
@media (max-width:760px) {
  html { scroll-padding-top:73px; }
  .wrap { width:calc(100% - 36px); }
  .header-inner { height:59px; width:calc(100% - 34px); }
  .brand { font-size:1.03rem; gap:9px; }
  .brand-seal { width:26px; height:26px; }
  .brand-seal .acorn { scale:.56; }
  .header-inner { gap:6px; }
  .header-game { order:1; margin-left:auto; padding-inline:11px; font-size:.88rem; }
  .header-inner .menu { order:2; flex:none; min-width:44px; justify-content:center; white-space:nowrap; }
  .farm-feature { grid-template-columns:1fr; gap:14px; }
  .farm-invitation { padding:0 4px 6px; }
  .farm-invitation p { margin:10px 0 15px; }
  .menu { display:inline-flex; }
  .nav { position:absolute; top:100%; inset-inline:0; display:flex; gap:5px; flex-wrap:wrap; background:#243e31; border-bottom:1px solid #b59c72; padding:8px 15px; }
  .nav a { padding-inline:11px; }
  .hero { grid-template-columns:1fr; min-height:0; width:calc(100% - 36px); }
  .hero-copy { padding:26px 0 23px; }
  .greeting { margin-bottom:8px; }
  .hero h2 { font-size:clamp(2rem,7.5vw,3rem); }
  .intro { margin-top:13px; font-size:.91rem; }
  .hero-actions { margin-top:13px; gap:2px 16px; }
  .button { min-height:47px; padding-inline:12px; font-size:.86rem; }
  .hero-actions .text-link { font-size:.84rem; }
  .hero-scene { min-height:0; height:clamp(285px,91vw,560px); }
  .hero-photo { object-position:47% 67%; }
  .pouch { bottom:13px; }
  .pouch-button { min-height:47px; font-size:.89rem; }
  .world { grid-template-columns:1fr; gap:22px; }
  .world-copy { display:contents; }
  .world-copy > p { margin:0; order:1; }
  .world-photo { aspect-ratio:1.32; order:2; }
  .places { order:3; }
  .friend-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .friend-name { min-height:49px; padding-inline:11px; }
  .friend-copy { padding-inline:11px; font-size:.83rem; }
  .section-title { margin-bottom:21px; }
}
@media (max-width:530px) {
  .header .menu-word { display:none; }
  .menu { width:44px; padding-inline:0; font-size:1.12rem; }
}
@media (min-width:761px) and (max-width:880px) {
  .header-game { order:1; margin-left:auto; }
  .header .menu { display:inline-flex; order:2; }
  .nav { position:absolute; top:100%; inset-inline:0; justify-content:center; background:#243e31; border-bottom:1px solid #b59c72; padding:6px 16px; }
}
@media (max-width:375px) {
  .header-inner { width:calc(100% - 22px); }
  .header-inner .brand { font-size:.9rem; gap:6px; }
  .menu-word { display:none; }
  .header-game .sprout { display:none; }
}

a.button, .header-game, .pouch-button, .room-links a, .menu, .friend summary { transition:transform .15s,background-color .18s; }
a.button:active, .header-game:active, .pouch-button:active, .room-links a:active, .menu:active { transform:translateY(2px); }
html.quiet-motion { scroll-behavior:auto; }
.quiet-motion *, .quiet-motion *::before, .quiet-motion *::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
.quiet-motion .trail-leaves,.quiet-motion .journey-hint,.quiet-motion .falling-leaves { display:none; }
.quiet-motion .trail-bottom { justify-content:flex-end; }
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
  .falling-leaves { display:none; }
  .motion-ready [data-reveal] { opacity:1; transform:none; }
}
