:root {
  --ys-forest: #2f5d50;
  --ys-leaf: #79a85a;
  --ys-earth: #6b4d3a;
  --ys-cream: #f7f2e8;
  --ys-sky: #6d9dc5;
  --ys-sun: #e9b85d;
  --ys-ink: #1e3a33;
  --ys-muted: #61766d;
  --ys-line: rgba(47, 93, 80, 0.17);
  --shadow-soft: 0 12px 28px rgba(47, 93, 80, 0.12);
  --font: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { margin: 0; background: var(--ys-cream); color: var(--ys-ink); font-family: var(--font); }
button, a { font: inherit; }
button { cursor: pointer; }

.page-shell { display: grid; grid-template-rows: auto 1fr auto; height: 100dvh; overflow: hidden; }
.site-header { align-items: center; display: flex; justify-content: space-between; margin: 0 auto; max-width: 1200px; padding: 22px 32px; position: relative; z-index: 4; }
.brand { align-items: center; color: var(--ys-forest); display: inline-flex; font-size: 14px; font-weight: 700; gap: 10px; letter-spacing: .02em; text-decoration: none; }
.brand-mark { align-items: center; background: var(--ys-forest); clip-path: polygon(25% 6.7%,75% 6.7%,100% 50%,75% 93.3%,25% 93.3%,0 50%); color: white; display: inline-flex; font-size: 10px; height: 33px; justify-content: center; letter-spacing: -.06em; width: 38px; }
.header-nav { display: flex; gap: 20px; margin-left: 2rem;}
.header-nav button { background: transparent; border: 0; color: var(--ys-muted); font-size: 13px; padding: 0; }
.header-nav button:hover, .header-nav button:focus-visible { color: var(--ys-forest); }

.hero { align-items: center; display: flex; flex-direction: column; height: 100%; justify-content: center; overflow: hidden; padding: clamp(16px, 3vh, 42px) 24px; position: relative; text-align: center; }
.hero::before { background: radial-gradient(circle, rgba(121,168,90,.17) 0%, rgba(247,242,232,0) 67%); content: ""; height: min(85vh, 790px); left: 50%; pointer-events: none; position: absolute; top: 50%; transform: translate(-50%, -50%); width: min(85vh, 790px); }
.network { border: 1px solid rgba(109,157,197,.19); border-radius: 47% 53% 43% 57%; pointer-events: none; position: absolute; }
.network::before, .network::after { border: 1px solid rgba(121,168,90,.14); border-radius: inherit; content: ""; inset: 16%; position: absolute; }
.network-a { height: 520px; right: -230px; top: 120px; transform: rotate(-18deg); width: 520px; }
.network-b { bottom: -240px; height: 500px; left: -230px; transform: rotate(35deg); width: 500px; }
.eyebrow { color: var(--ys-leaf); font-size: 11px; font-weight: 700; letter-spacing: .16em; margin: 0 0 12px; text-transform: uppercase; }
h1, h2, h3, p { position: relative; }
.title-stage { align-items: center; display: flex; height: clamp(112px, 16vh, 152px); justify-content: center; margin: -5px 0; position: relative; width: min(680px, 100%); z-index: 1; }
.title-stage::before { background: linear-gradient(90deg, transparent, rgba(121,168,90,.28) 12% 88%, transparent); content: ""; height: 1px; left: 3%; position: absolute; right: 3%; top: 50%; }
.title-cursor { background: radial-gradient(circle at 28% 23%, #fff8d8 0 7%, var(--ys-sun) 22%, #d99338 78%, #9c5c24 100%); clip-path: polygon(25% 6.7%,75% 6.7%,100% 50%,75% 93.3%,25% 93.3%,0 50%); filter: drop-shadow(0 5px 4px rgba(107,77,58,.27)); height: 34px; left: 2%; opacity: 0; position: absolute; top: calc(50% - 17px); width: 39px; z-index: 3; }
h1 { color: var(--ys-forest); font-size: clamp(29px, 4.7vw, 60px); letter-spacing: .03em; line-height: 1.32; margin: 0; position: relative; z-index: 1; }
h1 span { display: block; }
body.intro-pending h1 span, body.intro-running h1 span { clip-path: inset(0 100% 0 0); }
body.intro-running h1 span { animation: title-reveal 1.8s linear .18s forwards; }
body.intro-running .title-cursor { animation: cursor-roll 1.8s linear forwards; opacity: 1; }
.hero-copy { color: var(--ys-muted); font-size: 15px; line-height: 1.9; margin: 18px 0 0; }
.hero-hint { color: var(--ys-muted); font-size: 12px; margin: 27px 0 0; }

.explore-map { height: clamp(230px, 34vh, 290px); margin: clamp(14px, 2.6vh, 27px) auto 0; max-width: 760px; position: relative; width: 100%; z-index: 1; }
.explore-map::before, .explore-map::after { background: var(--ys-line); content: ""; height: 1px; left: 50%; position: absolute; top: 51%; transform-origin: left center; width: 246px; transition: width .2s ease; }
.explore-map::before { transform: rotate(24deg); }
.explore-map::after { transform: rotate(-24deg); }
.hex-node, .core-node { align-items: center; border: 0; clip-path: polygon(25% 6.7%,75% 6.7%,100% 50%,75% 93.3%,25% 93.3%,0 50%); display: flex; flex-direction: column; justify-content: center; position: absolute; transition: transform .22s ease, filter .22s ease, background .22s ease; }
.hex-node { background: radial-gradient(circle at 29% 23%, rgba(255,255,255,.98) 0 4%, rgba(255,255,255,.55) 8%, rgba(226,242,214,.9) 28%, rgba(121,168,90,.82) 67%, rgba(47,93,80,.96) 100%); color: #fff; filter: drop-shadow(0 17px 13px rgba(47,93,80,.21)); font-size: 12px; font-weight: 700; gap: 4px; height: 100px; isolation: isolate; text-decoration: none; text-shadow: 0 1px 2px rgba(27,58,50,.35); width: 115px; animation: planet-float 5.4s ease-in-out infinite; }
.hex-node::before { background: radial-gradient(ellipse at 65% 81%, rgba(14,51,43,.37), transparent 58%); content: ""; inset: 0; opacity: .7; position: absolute; z-index: -1; }
.hex-node::after { background: linear-gradient(145deg, rgba(255,255,255,.52), transparent 33%); content: ""; inset: 0; mix-blend-mode: screen; position: absolute; z-index: -1; }
.hex-node > span { position: relative; z-index: 1; }
.hex-node:hover, .hex-node:focus-visible { filter: brightness(1.08) drop-shadow(0 22px 18px rgba(47,93,80,.28)); outline: none; animation-play-state: paused; transform: translateY(-9px) scale(1.07); }
.hex-node.is-expanding { animation: node-expand .52s cubic-bezier(.2,.82,.22,1) forwards; pointer-events: none; z-index: 5; }
.hex-node:focus-visible, .core-node:focus-visible, .dialog-close:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--ys-sun); outline-offset: 4px; }
.node-icon { color: var(--ys-leaf); font-size: 24px; font-weight: 400; line-height: 1; }
.core-node { background: radial-gradient(circle at 31% 22%, rgba(207,238,173,.57), rgba(47,93,80,.86) 37%, #163f36 100%); color: var(--ys-cream); filter: drop-shadow(0 24px 19px rgba(28,69,57,.32)); font-size: 11px; height: 150px; letter-spacing: .14em; line-height: 1.35; width: 173px; z-index: 1; animation: planet-float-core 6.8s ease-in-out infinite; }
.core-node strong { color: var(--ys-sun); font-size: 24px; letter-spacing: .03em; }
.core-node:hover { filter: brightness(1.08); transform: scale(1.03); }
.node-music { left: calc(50% - 194px); top: 0; }
.node-sho { left: calc(50% + 78px); top: 0; }
.node-journal { left: calc(50% - 325px); top: 32%; }
.node-picture { left: calc(50% + 210px); top: 32%; }
.node-community { left: calc(50% - 194px); top: 65%; }
.node-lab { left: calc(50% + 78px); top: 65%; }
.core-node { left: calc(50% - 86px); top: 24%; }
.node-music { animation-delay: -1.1s; }
.node-sho { animation-delay: -3.9s; }
.node-journal { animation-delay: -2.4s; }
.node-picture { animation-delay: -.5s; }
.node-community { animation-delay: -4.7s; }
.node-lab { animation-delay: -3.1s; }
.site-footer { color: var(--ys-muted); display: flex; font-size: 11px; justify-content: space-between; margin: 0 auto; max-width: 1200px; padding: 25px 32px; }

.app-page { align-items: center; background: var(--ys-cream); color: var(--ys-ink); display: flex; flex-direction: column; height: 100dvh; inset: 0; justify-content: center; opacity: 0; overflow: hidden; padding: 80px 24px 55px; pointer-events: none; position: fixed; transform: scale(.72); transform-origin: center; transition: opacity .24s ease, transform .52s cubic-bezier(.2,.82,.22,1); visibility: hidden; z-index: 20; }
.app-page.has-sections { justify-content: flex-start; }
.app-page.has-sections .app-page-content { max-height: 100%; overflow-y: auto; padding: 0 4px 8px; scrollbar-color: rgba(47,93,80,.3) transparent; scrollbar-width: thin; }
.app-page.is-ready { visibility: visible; }
.app-page.is-open { opacity: 1; pointer-events: auto; transform: scale(1); visibility: visible; }
.app-page.is-closing { opacity: 0; transform: scale(1.12); }
.app-page.is-switching .app-page-content { animation: page-content-switch .46s cubic-bezier(.2,.82,.22,1); }
.app-page::before { background: radial-gradient(circle, rgba(121,168,90,.17) 0%, rgba(247,242,232,0) 65%); content: ""; height: min(78vh, 700px); left: 50%; position: absolute; top: 50%; transform: translate(-50%,-50%); width: min(78vh, 700px); }
.app-page-header, .app-page-footer { align-items: center; display: flex; justify-content: space-between; left: 0; padding: 20px 32px; position: absolute; right: 0; z-index: 2; }
.app-page-header { top: 0; }
.app-page-footer { bottom: 0; color: var(--ys-muted); font-size: 11px; justify-content: center; }
.back-button { align-items: center; background: transparent; border: 0; color: var(--ys-forest); display: inline-flex; font-size: 13px; font-weight: 700; gap: 7px; padding: 8px 0; }
.back-button:hover span { text-decoration: underline; text-underline-offset: 4px; }
.app-page-brand { color: var(--ys-muted); font-size: 12px; font-weight: 700; }
.app-page-content { max-width: 560px; position: relative; text-align: center; z-index: 1; }
.page-icon { align-items: center; background: var(--ys-leaf); clip-path: polygon(25% 6.7%,75% 6.7%,100% 50%,75% 93.3%,25% 93.3%,0 50%); color: white; display: flex; font-size: 28px; height: 68px; justify-content: center; margin: 0 auto 20px; width: 78px; }
.app-page h2 { color: var(--ys-forest); font-size: clamp(28px, 3.7vw, 43px); line-height: 1.35; margin: 0 0 13px; }
.page-description { color: var(--ys-muted); font-size: 15px; line-height: 1.85; margin: 0; }
.page-sections { display: flex; flex-direction: column; gap: 26px; margin-top: 30px; text-align: left; }
.page-section h3 { color: var(--ys-forest); font-size: 16px; letter-spacing: .02em; margin: 0 0 10px; }
.page-section p { color: var(--ys-muted); font-size: 14px; line-height: 1.9; margin: 0 0 10px; }
.page-section p:last-child { margin-bottom: 0; }
.page-value-list { display: flex; flex-direction: column; gap: 8px; list-style: none; margin: 0; padding: 0; }
.page-value-list li { color: var(--ys-muted); font-size: 14px; line-height: 1.7; padding-left: 20px; position: relative; }
.page-value-list li::before { color: var(--ys-leaf); content: "✿"; font-size: 11px; left: 0; position: absolute; top: 3px; }
.page-quote { background: rgba(121,168,90,.09); border-left: 3px solid var(--ys-leaf); border-radius: 0 10px 10px 0; color: var(--ys-forest) !important; font-size: 14px !important; line-height: 1.95 !important; margin: 0 !important; padding: 16px 18px !important; }
.page-divider { border-top: 1px solid var(--ys-line); margin: 28px 0 18px; }
.page-label { color: var(--ys-earth); font-size: 12px; font-weight: 700; margin: 0 0 11px; }
.related-list { display: flex; flex-wrap: wrap; gap: 9px; }
.related-list button { background: var(--ys-cream); border: 1px solid rgba(47,93,80,.15); border-radius: 99px; color: var(--ys-forest); font-size: 13px; padding: 9px 12px; }
.related-list button:hover { background: #ecf3e5; }

@media (max-width: 720px) {
  .site-header { padding: 18px 20px; }
  .header-nav { gap: 12px; }
  .header-nav a { font-size: 12px; }
  .hero { padding: 18px 16px; }
  .hero-copy { font-size: 14px; }
  .explore-map { height: 260px; margin: 12px auto 0; max-width: none; width: 100%; }
  .explore-map::before, .explore-map::after { width: 150px; }
  .hex-node { width: 96px; height: 84px; font-size: 11px; gap: 3px; }
  .node-icon { font-size: 21px; }
  .core-node { width: 140px; height: 120px; font-size: 10px; }
  .core-node strong { font-size: 21px; }
  .node-music, .node-community { left: calc(50% - 102px); }
  .node-sho, .node-lab { left: calc(50% + 6px); }
  .node-journal { left: calc(50% - 170px); }
  .node-picture { left: calc(50% + 74px); }
  .core-node { left: calc(50% - 45px); top: 24%; }
  .hero-hint { margin-top: -7px; }
  .site-footer { flex-direction: column; gap: 6px; padding: 22px 20px; }
  .site-footer p { margin: 0; }
  .app-page { padding: 75px 21px 45px; }
  .app-page-header { padding: 16px 20px; }
  .app-page h2 { font-size: 28px; }
  .page-description { font-size: 14px; }
  .page-sections { gap: 20px; margin-top: 22px; }
  .page-section h3 { font-size: 14px; }
  .page-section p, .page-value-list li, .page-quote { font-size: 13px !important; }
}

@media (max-width: 390px) {
  .brand { font-size: 12px; }
  .header-nav { gap: 9px; }
  .hero { padding-left: 12px; padding-right: 12px; }
  .explore-map { height: 215px; }
  .explore-map::before, .explore-map::after { width: 108px; }
  .hex-node { width: 78px; height: 68px; font-size: 9.5px; gap: 2px; }
  .node-icon { font-size: 17px; }
  .core-node { width: 116px; height: 100px; font-size: 8.5px; }
  .core-node strong { font-size: 17px; }
  .node-music, .node-community { left: calc(50% - 82px); }
  .node-sho, .node-lab { left: calc(50% + 4px); }
  .node-journal { left: calc(50% - 138px); }
  .node-picture { left: calc(50% + 60px); }
  .core-node { left: calc(50% - 36px); }
}

@media (max-height: 690px) and (min-width: 721px) {
  .hero-copy { font-size: 13px; line-height: 1.65; margin-top: 9px; }
  .explore-map { transform: scale(.86); transform-origin: center center; margin: 3px auto -18px; }
  .hero-hint { margin-top: 6px; }
}

@media (max-height: 700px) and (max-width: 720px) {
  .site-header { padding-top: 12px; padding-bottom: 12px; }
  .eyebrow { margin-bottom: 5px; }
  .hero-copy { font-size: 12px; line-height: 1.55; margin-top: 7px; }
  .explore-map { transform: scale(.92); transform-origin: center center; margin: -14px auto -22px; }
  .hero-hint { font-size: 10px; margin-top: 0; }
  .site-footer { font-size: 10px; padding-top: 12px; padding-bottom: 12px; }
  .page-icon { height: 57px; margin-bottom: 12px; width: 66px; }
  .app-page h2 { font-size: 24px; margin-bottom: 7px; }
  .page-description { font-size: 12px; line-height: 1.65; }
  .page-divider { margin: 17px 0 12px; }
  .related-list { justify-content: center; }
  .related-list button { font-size: 11px; padding: 7px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .title-cursor { display: none; }
  body.intro-pending h1 span, body.intro-running h1 span { animation: none; clip-path: none; }
}

@keyframes node-expand {
  0% { opacity: 1; transform: translateY(-5px) scale(1.04); }
  100% { opacity: 0; transform: translateY(-5px) scale(5.2); }
}

@keyframes page-content-switch {
  0% { opacity: .18; transform: scale(.86); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes title-reveal {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@keyframes cursor-roll {
  0% { left: 2%; opacity: 1; transform: rotate(0deg) scale(.72); }
  8% { opacity: 1; transform: rotate(48deg) scale(1); }
  90% { opacity: 1; transform: rotate(650deg) scale(1); }
  100% { left: calc(98% - 39px); opacity: 0; transform: rotate(720deg) scale(.9); }
}

@keyframes planet-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1.2deg); }
  50% { transform: translate3d(0, -11px, 0) rotate(1.4deg); }
}

@keyframes planet-float-core {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -13px, 0) scale(1.018); }
}
