:root {
  --cream: #f6efe4;
  --paper: #fffaf3;
  --ink: #3c3229;
  --muted: #74685c;
  --brown: #6a4b32;
  --title: #3f2c1e;
  --line: rgba(90, 64, 40, 0.12);
  --gold: #e4b15a;
  --sage: #6f9070;
  --moss: #4f7358;
  --blush: #f4d7c3;
  --shadow: 0 18px 50px rgba(92, 64, 36, 0.12);
  --radius: 28px;
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(244, 215, 195, 0.7), transparent 60%),
    radial-gradient(800px 480px at 110% 8%, rgba(196, 214, 184, 0.55), transparent 55%),
    var(--cream);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
}
img { max-width: 100%; display: block; }
button, a { font-family: inherit; }
a { color: inherit; }

.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.eyebrow {
  margin: 0 0 12px;
  letter-spacing: 0.14em;
  text-transform: none;
  color: var(--brown);
  font-size: 13px;
  font-weight: 700;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: 0.01em; color: var(--title); }
h1 { font-size: clamp(46px, 7vw, 84px); line-height: 1.05; margin: 0; }
h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.2; margin: 0 0 12px; }
h3 { font-size: 22px; margin: 0 0 8px; }
.lead { font-size: clamp(20px, 2.4vw, 28px); margin: 16px 0 10px; color: var(--brown); }
.intro { max-width: 38em; color: var(--muted); margin: 0; }
.section { padding: 88px 0; }
.kicker { color: var(--sage); font-weight: 700; font-size: 14px; letter-spacing: 0.08em; margin: 0 0 8px; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(246, 239, 228, 0.82);
  border-bottom: 1px solid transparent;
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--brown); font-size: 15px; }
.nav-links a:hover { color: var(--title); }
.nav-toggle { display: none; border: 0; background: transparent; font-size: 15px; color: var(--brown); }

.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; padding: 36px 0 20px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 12px; }
.btn {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-width: 190px; min-height: 64px; padding: 10px 18px;
  border-radius: 18px; text-decoration: none; color: #fffaf3;
  background: var(--brown); box-shadow: 0 10px 24px rgba(106, 75, 50, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn strong { font-size: 16px; font-weight: 700; }
.btn small { font-size: 12px; opacity: 0.85; }
.btn.alt { background: var(--moss); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 28px rgba(106, 75, 50, 0.22); }
.fine { color: var(--muted); font-size: 13px; max-width: 40em; }

.stage {
  position: relative; min-height: 520px; border-radius: 36px; overflow: hidden;
  background: #efe4d2; box-shadow: var(--shadow);
}
.stage .window-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center bottom;
}
.stage .pet {
  position: absolute; width: min(250px, 52%); left: 7%; bottom: 42px;
  filter: drop-shadow(0 16px 12px rgba(70, 46, 24, 0.18));
}
.poster {
  position: absolute; right: 22px; top: 22px; width: 42%;
  border-radius: 16px; border: 6px solid #fffaf3; box-shadow: var(--shadow);
  transform: rotate(3deg);
}
.client-card {
  position: absolute; right: 16px; bottom: 22px; width: min(230px, 46%);
  border-radius: 16px; background: #fff; box-shadow: var(--shadow);
}
.prop.plant {
  position: absolute; width: 92px; right: 8%; bottom: 96px; z-index: 2;
  filter: drop-shadow(0 10px 8px rgba(70, 46, 24, 0.16));
}
.stage-actions {
  position: absolute; left: 18px; top: 16px; display: flex; gap: 8px; flex-wrap: wrap; z-index: 3;
}
.chip, .stage-actions button, .ghost {
  border: 0; border-radius: 999px; background: rgba(255, 250, 243, 0.92);
  color: var(--brown); padding: 7px 12px; font-size: 13px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(70, 46, 24, 0.08);
}
.stage-actions button.on, .ghost.on { background: var(--brown); color: #fffaf3; }
.pat-btn {
  position: absolute; left: 17%; bottom: 16px; z-index: 3;
}

.panel {
  background: rgba(255, 250, 243, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 36px; align-items: center; }
.split.reverse { grid-template-columns: 1.1fr 0.9fr; }
.prose p { color: var(--muted); }
.points { display: grid; gap: 14px; margin-top: 22px; }
.point { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; }
.point img { width: 88px; height: 88px; object-fit: contain; }
.note {
  margin-top: 16px; padding: 12px 14px; border-radius: 16px;
  background: rgba(111, 144, 112, 0.12); color: var(--moss); font-size: 14px;
}

.demo { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 28px; padding: 22px; }
.demo-visual { position: relative; min-height: 360px; border-radius: 24px; background: linear-gradient(#f7f1e7, #efe2cf); overflow: hidden; }
.demo-visual img { width: 230px; margin: 36px auto 0; animation: floaty 4.2s ease-in-out infinite; }
.status-pill {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  background: #fffaf3; border-radius: 18px; padding: 12px 14px;
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center;
  box-shadow: var(--shadow);
}
.badge { font-weight: 700; font-size: 14px; }
.badge[data-tone="ok"] { color: var(--moss); }
.badge[data-tone="warn"] { color: #a56b24; }
.badge[data-tone="bad"] { color: #b85a32; }
.badge[data-tone="recover"] { color: #3e6f86; }
.clock { font-family: var(--serif); font-size: 28px; }
.meter { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: #efe4d4; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--sage); transition: width 0.45s ease; }
.meter span[data-tone="warn"] { background: #e0a04a; }
.meter span[data-tone="bad"] { background: #d9784e; }
.meter span[data-tone="recover"] { background: #6aa0b8; }
.demo-copy { padding: 12px 8px; }
.demo-nav { display: flex; gap: 8px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.dots { display: flex; gap: 6px; }
.dots button, .demo-nav > button {
  border: 0; background: #f3e6d4; color: var(--brown); border-radius: 999px; cursor: pointer;
}
.dots button { width: 32px; height: 32px; }
.dots button.on { background: var(--brown); color: white; }
.demo-nav > button { padding: 8px 14px; }

.study-shell { padding: 16px; }
.study {
  position: relative; aspect-ratio: 1280 / 720; border-radius: 22px; overflow: hidden; background: #d9c7aa;
}
.study .layer, .study .actor { position: absolute; }
.study .layer { inset: 0; width: 100%; height: 100%; object-fit: fill; }
.study .actor { width: 29%; height: 51.6%; top: 26.3%; object-fit: contain; }
.study .actor.l { left: 15.5%; }
.study .actor.r { left: 55.5%; }
.study-ui { position: absolute; z-index: 3; color: white; font-size: 13px; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.name-tag {
  position: absolute; top: 18%; transform: translateX(-50%);
  background: rgba(62, 48, 36, 0.72); color: white; border-radius: 999px; padding: 4px 10px; font-size: 13px;
}
.name-tag.l { left: 30%; }
.name-tag.r { left: 70%; }
.time-tag {
  position: absolute; bottom: 12%; transform: translateX(-50%);
  background: rgba(255,250,243,.92); color: var(--ink); border-radius: 999px; padding: 4px 10px; font-size: 12px;
}
.time-tag.l { left: 30%; }
.time-tag.r { left: 70%; }
.time-tag[data-tone="bad"] { background: #c9654a; color: white; }
.scene-row, .study-modes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.scene-row button {
  border: 0; padding: 0; background: transparent; cursor: pointer; border-radius: 12px;
}
.scene-row img { width: 108px; height: 62px; object-fit: cover; border-radius: 12px; border: 2px solid transparent; }
.scene-row button.on img { border-color: var(--brown); }
.scene-row span { display: block; font-size: 12px; color: var(--muted); text-align: center; }

.shop-showcase { min-width: 0; }
.item-gallery { display: flex; align-items: center; gap: 6px; }
.food-gallery { max-width: 870px; margin: 22px 0; }
.furniture-gallery { margin-top: 12px; }
.item-row {
  display: flex; flex: 1; min-width: 0; gap: 10px; overflow-x: auto;
  margin: 0; padding: 0 0 6px; list-style: none;
  scrollbar-width: thin; scrollbar-color: #bca892 transparent;
}
.js .item-row { cursor: grab; user-select: none; }
.js .item-row.dragging { cursor: grabbing; }
.gallery-arrow {
  flex: 0 0 26px; height: 36px; padding: 0; border: 1px solid var(--line);
  border-radius: 999px; background: var(--paper); color: var(--brown);
  font-size: 20px; line-height: 1; cursor: pointer;
}
.gallery-arrow[aria-disabled="true"] { opacity: .45; cursor: default; }
.gallery-arrow:focus-visible, .item-row:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }
.item {
  flex: 0 0 108px; height: 126px; text-align: center; background: rgba(255,250,243,.8);
  border-radius: 18px; padding: 10px 8px 12px; border: 1px solid var(--line);
}
.item img { width: 72px; height: 72px; margin: 0 auto 6px; object-fit: contain; }
.item span { display: block; font-size: 13px; color: var(--brown); }
.shot { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); background: white; }
.shot img { width: 100%; height: auto; }
.shot figcaption { padding: 12px 14px 14px; color: var(--muted); font-size: 14px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.filters button {
  border: 1px solid var(--line); background: rgba(255,250,243,.7); color: var(--brown);
  border-radius: 999px; padding: 8px 14px; cursor: pointer;
}
.filters button.on { background: var(--brown); color: white; border-color: var(--brown); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 32%); gap: 16px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.rail article { scroll-snap-align: start; }
.rail button.frame {
  display: block; width: 100%; padding: 0; border: 0; background: white; border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow); cursor: zoom-in; text-align: left; color: inherit;
}
.rail img { width: 100%; height: 180px; object-fit: cover; object-position: top; background: #f7f1e7; }
.rail p { margin: 0; padding: 12px 14px 14px; font-size: 14px; }

.themes { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.swatch { width: 42px; height: 42px; border-radius: 50%; border: 3px solid white; box-shadow: 0 6px 14px rgba(70,46,24,.12); }

.download-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dl { padding: 26px; }
.dl .status { display: inline-block; margin: 8px 0 12px; padding: 4px 10px; border-radius: 999px; background: #f3e0c4; color: #8a5a22; font-size: 13px; font-weight: 700; }
.dl .status[data-ready="yes"] { background: #dcead9; color: var(--moss); }
.dl ul { padding-left: 18px; color: var(--muted); }
.dl .btn { margin-top: 8px; }

.footer { padding: 28px 0 48px; color: var(--muted); font-size: 14px; }
.footer .wrap { border-top: 1px solid var(--line); padding-top: 22px; display: grid; gap: 8px; }
.footer strong { color: var(--title); }

dialog {
  width: min(980px, calc(100% - 28px)); border: 0; border-radius: 20px; padding: 12px; background: #1d1814;
}
dialog::backdrop { background: rgba(40, 28, 18, 0.72); }
dialog img { width: 100%; height: auto; border-radius: 12px; background: white; }
dialog p { color: #f6efe4; margin: 8px 4px 4px; }
dialog button { position: absolute; right: 18px; top: 18px; }

.js .reveal.in { animation: rise 0.7s ease; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .stage .pet, .demo-visual img { animation: none; opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .hero, .split, .split.reverse, .demo, .download-grid { grid-template-columns: 1fr; }
  .stage { min-height: 460px; }
  .poster { width: 38%; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; right: 16px; top: 64px;
    flex-direction: column; align-items: flex-start; gap: 12px;
    background: #fffaf3; padding: 14px 16px; border-radius: 16px; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .section { padding: 64px 0; }
  .rail { grid-auto-columns: 78%; }
}
@media (max-width: 640px) {
  .wrap { width: min(1120px, calc(100% - 28px)); }
  .stage .pet { width: 54%; }
  .prop.plant { width: min(92px, 18%); bottom: calc(22px + min(58px, 13vw)); }
  .point { grid-template-columns: 72px 1fr; }
}
@media (max-width: 520px) {
  .poster { top: 58px; }
  .pat-btn { left: 10%; }
}
