:root {
  color-scheme: light;
  font-family: Inter, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --ink: #111;
  --muted: #747474;
  --line: #dedede;
  --soft: #f5f5f3;
  --surface: #fff;
  --nav-height: 68px;
  --app-vertical-inset: 0px;
}
* { box-sizing: border-box; }
html { width: 100%; height: 100%; min-width: 320px; overflow: hidden; background: #eeede9; color: var(--ink); }
body { width: 100%; height: 100%; min-width: 320px; margin: 0; overflow: hidden; background: #eeede9; }
body.is-sheet-open { overflow: hidden; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid #111; outline-offset: 3px; }
[hidden] { display: none !important; }
.app-shell { position: relative; width: min(100%, 430px); height: 100svh; min-height: 0; margin: 0 auto; overflow: hidden; background: #fff; box-shadow: 0 0 60px rgba(0,0,0,.08); }
.app-screen { position: relative; height: 100%; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; background: #fff; -webkit-overflow-scrolling: touch; }
.app-screen:not(.home-screen):not(.generating-screen):not(.result-screen) { padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom)); }
.app-header { position: relative; z-index: 12; display: grid; grid-template-columns: 1fr auto; align-items: center; min-height: 72px; padding: 14px 20px 10px; background: rgba(255,255,255,.96); }
.app-header--plain { display: flex; justify-content: flex-start; gap: 9px; background: transparent; }
.brand-logo { display: block; width: 132px; height: auto; color: #111; }
.brand-logo--center { position: absolute; left: 50%; transform: translateX(-50%); }
.brand-logo--light { filter: invert(1); }
.demo-badge { display: inline-grid; place-items: center; min-width: 42px; min-height: 21px; padding: 2px 7px; border: 1px solid currentColor; border-radius: 999px; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.icon-button { display: grid; place-items: center; justify-self: end; width: 44px; height: 44px; padding: 0; border: 1px solid #ececec; border-radius: 50%; background: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.05); }
.icon-button svg { width: 23px; height: 23px; }
.icon-button--back { justify-self: start; }
.screen-body { padding: 10px 20px 44px; }
.screen-body h1, .capture-copy h1 { margin: 12px 0 10px; font-size: 30px; font-weight: 650; letter-spacing: -.045em; line-height: 1.18; }
.eyebrow { margin: 0; font-size: 10px; font-weight: 650; letter-spacing: .16em; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 54px; padding: 12px 20px; border: 0; border-radius: 999px; background: #111; color: #fff; font-size: 14px; font-weight: 650; letter-spacing: .02em; box-shadow: 0 10px 28px rgba(0,0,0,.12); }
.primary-button svg { width: 19px; height: 19px; }
.text-button { min-height: 44px; padding: 8px 12px; border: 0; background: transparent; font-size: 12px; font-weight: 600; }
.home-screen { display: flex; flex-direction: column; }
.home-content { display: flex; flex: 1; flex-direction: column; padding: 18px 24px calc(18px + env(safe-area-inset-bottom)); }
.home-copy { text-align: center; }
.home-copy h1 { margin: 16px 0 12px; font-size: clamp(34px, 10.4vw, 44px); font-weight: 650; letter-spacing: -.065em; line-height: 1.12; }
.home-copy > p:last-child { margin: 0; color: #5f5f5f; font-size: 13px; line-height: 1.75; }
.room-triptych { display: grid; grid-template-columns: .9fr 1.15fr .9fr; gap: 8px; align-items: center; height: clamp(285px, 42svh, 390px); margin: 16px -2px 12px; }
.room-triptych figure { height: 75%; margin: 0; overflow: hidden; border-radius: 12px; background: #f2f2f0; }
.room-triptych .is-main { height: 88%; }
.room-triptych img { width: 100%; height: 100%; object-fit: cover; }
.room-triptych figure:first-child img { object-position: 54% center; }
.room-triptych figure:nth-child(2) img { object-position: 54% center; }
.room-triptych figure:last-child img { object-position: 45% center; }
.home-actions { display: grid; gap: 0; margin-top: auto; }
.section-kicker { display: flex; align-items: end; justify-content: space-between; margin-top: 2px; }
.section-kicker span:first-child { font-size: 10px; font-weight: 650; letter-spacing: .16em; }
.section-kicker span:last-child { color: #575757; font-size: 10px; line-height: 1.35; text-align: right; }
.search-control { display: grid; grid-template-columns: auto 1fr auto; align-items: center; width: 100%; min-height: 48px; margin: 8px 0 16px; padding: 0 14px; border: 1px solid #d8d8d8; border-radius: 999px; background: #fff; color: #747474; text-align: left; }
.search-control svg { width: 20px; height: 20px; }
.search-control span:nth-child(2) { padding: 0 10px; font-size: 13px; }
.category-rail { display: flex; gap: 8px; margin: 0 -20px; padding: 0 20px 8px; overflow-x: auto; scrollbar-width: none; }
.category-rail::-webkit-scrollbar { display: none; }
.category-rail button { flex: 0 0 auto; min-width: 78px; min-height: 44px; padding: 8px 16px; border: 1px solid #dcdcdc; border-radius: 999px; background: #fff; font-size: 12px; }
.category-rail button.is-active { border-color: #111; background: #111; color: #fff; }
.catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 20px 0 10px; }
.catalog-heading h2 { max-width: 280px; margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catalog-heading span { color: #666; font-size: 9px; line-height: 1.15; text-align: right; }
.room-note { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 8px; padding: 5px 9px; border-radius: 999px; background: #f5f5f3; font-size: 9px; font-weight: 600; }
.room-note svg { width: 14px; height: 14px; }
.product-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.product-card { min-width: 0; overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.product-photo { position: relative; display: block; width: 100%; aspect-ratio: .94; border: 0; background-color: #f7f7f5; background-image: url("./furniture-grid.avif"); background-repeat: no-repeat; background-size: 200% 200%; }
.sprite-chair { background-position: 0 0; }
.sprite-table { background-position: 100% 0; }
.sprite-lamp { background-position: 0 100%; }
.sprite-sofa { background-position: 100% 100%; }
.stock-label { position: absolute; top: 10px; left: 9px; padding: 4px 7px; border-radius: 999px; background: #edf7ee; color: #247b35; font-size: 8px; font-weight: 700; }
.product-copy { padding: 10px 10px 4px; }
.product-copy strong { display: block; font-size: 9px; letter-spacing: .04em; }
.product-copy small { display: inline-block; margin-top: 5px; padding: 2px 5px; border-radius: 999px; background: #f3f3f1; font-size: 8px; }
.product-copy h3 { margin: 5px 0 4px; overflow: hidden; font-size: 12px; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; }
.product-copy p { margin: 0; font-size: 13px; font-weight: 650; }
.product-actions { display: grid; grid-template-columns: minmax(0,1fr) 44px; gap: 5px; padding: 6px 8px 10px; }
.try-button, .heart-button { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 0; border-radius: 999px; background: #111; color: #fff; font-size: 10px; font-weight: 650; }
.try-button svg { width: 16px; height: 16px; margin-right: 4px; }
.heart-button { padding: 0; border: 1px solid #ddd; background: #fff; color: #111; }
.heart-button svg { width: 20px; height: 20px; }
.heart-button.is-saved { border-color: #111; background: #111; color: #fff; }
.demo-note { display: flex; align-items: flex-start; gap: 7px; margin: 22px 8px 0; color: #777; font-size: 10px; line-height: 1.5; }
.demo-note svg { flex: 0 0 auto; width: 15px; height: 15px; }
.capture-content { display: flex; flex-direction: column; min-height: calc(100svh - var(--nav-height) - 72px - var(--app-vertical-inset)); padding: 8px 20px 20px; }
.capture-copy { text-align: center; }
.capture-copy p { margin: 0 0 12px; color: #666; font-size: 11px; }
.capture-frame { position: relative; width: min(76vw, 300px); height: min(44svh, 355px); margin: 0 auto 14px; overflow: hidden; padding: 8px; border: 2px dashed #9c9c9c; border-radius: 25px; background: #f5f5f3; }
.capture-frame img { width: 100%; height: 100%; border-radius: 17px; object-fit: cover; filter: grayscale(1) contrast(.75) brightness(1.2); opacity: .42; }
.capture-camera { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; transform: translate(-50%,-50%); background: #111; color: #fff; }
.capture-camera svg { width: 32px; height: 32px; }
.capture-label { position: absolute; bottom: 18px; left: 50%; padding: 8px 15px; border-radius: 999px; transform: translateX(-50%); background: rgba(17,17,17,.78); color: #fff; font-size: 10px; white-space: nowrap; }
.step-list { display: grid; grid-template-columns: repeat(3,1fr); margin: 0 0 18px; padding: 10px 7px; border: 1px solid #e1e1e1; border-radius: 18px; list-style: none; }
.step-list li { position: relative; display: grid; place-items: center; gap: 4px; font-size: 8px; }
.step-list li:not(:last-child)::after { position: absolute; top: 12px; right: -13px; width: 26px; border-top: 1px solid #ccc; content: ""; }
.step-list b { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #f3f3f1; font-size: 9px; }
.capture-content > .primary-button { margin-top: auto; }
.capture-note { margin: 8px 0 0; color: #777; font-size: 9px; text-align: center; }
.generating-screen, .result-screen { padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom)); background: #f2f1ee; }
.result-header { position: absolute; z-index: 5; top: 0; right: 0; left: 0; display: flex; align-items: center; justify-content: space-between; height: 72px; padding: 16px 20px; color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.35); }
.result-header span { font-size: 14px; font-weight: 650; }
.generation-visual { position: relative; height: 57svh; min-height: 430px; overflow: hidden; background: #aaa; }
.generation-rail { display: grid; grid-template-columns: 76% 76% 76%; gap: 10px; align-items: center; height: 100%; transform: translateX(-64%); }
.generation-rail figure { height: 75%; margin: 0; overflow: hidden; border: 2px solid rgba(255,255,255,.82); border-radius: 24px; opacity: .72; }
.generation-rail figure.is-current { height: 82%; opacity: 1; }
.generation-rail img { width: 100%; height: 100%; object-fit: cover; }
.progress-pill { position: absolute; right: 50%; bottom: 24px; display: flex; align-items: center; justify-content: space-between; width: min(73%, 300px); padding: 16px 22px; border-radius: 999px; transform: translateX(50%); background: rgba(255,255,255,.94); box-shadow: 0 8px 30px rgba(0,0,0,.12); backdrop-filter: blur(14px); }
.progress-pill span { font-size: 12px; font-weight: 600; }
.progress-pill strong { font-size: 24px; font-weight: 600; }
.generation-status { padding: 24px 20px 10px; background: #fff; text-align: center; }
.generation-status ol { display: grid; grid-template-columns: repeat(3,1fr); margin: 0; padding: 0; list-style: none; }
.generation-status li { display: grid; place-items: center; gap: 8px; color: #777; font-size: 10px; }
.generation-status li > span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; }
.generation-status li.is-done > span { background: #111; color: #fff; }
.generation-status li.is-current { color: #111; }
.progress-ring { border: 4px solid #ddd; border-right-color: #111 !important; animation: spin 1s linear infinite; }
.empty-ring { border: 3px solid #ccc; }
.generation-status b { font-size: 10px; font-weight: 600; }
.generation-status small { font-size: 10px; }
.generation-status p { margin: 20px 0 4px; color: #777; font-size: 11px; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-stage { position: relative; height: calc(100svh - var(--nav-height) - 42px); min-height: 650px; overflow: hidden; background: #bbb; }
.result-slides, .result-slides figure { position: absolute; inset: 0; margin: 0; }
.result-slides figure { opacity: 0; transition: opacity .35s ease; }
.result-slides figure.is-current { opacity: 1; }
.result-slides img { width: 100%; height: 100%; object-fit: cover; }
.ai-label { position: absolute; z-index: 4; top: 84px; left: 18px; display: flex; align-items: center; gap: 6px; padding: 9px 13px; border: 1px solid rgba(255,255,255,.8); border-radius: 999px; background: rgba(255,255,255,.82); font-size: 10px; font-weight: 650; backdrop-filter: blur(12px); }
.ai-label svg { width: 15px; height: 15px; }
.slide-arrow { position: absolute; z-index: 4; top: 48%; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255,255,255,.6); border-radius: 50%; background: rgba(255,255,255,.8); backdrop-filter: blur(12px); }
.slide-arrow svg { width: 20px; height: 20px; }
.slide-arrow--prev { left: 14px; }
.slide-arrow--next { right: 14px; }
.result-dock { position: absolute; z-index: 4; right: 14px; bottom: 14px; left: 14px; display: grid; grid-template-columns: 1fr 72px; gap: 10px 8px; padding: 16px; border-radius: 25px; background: rgba(255,255,255,.94); box-shadow: 0 18px 46px rgba(0,0,0,.16); backdrop-filter: blur(18px); }
.result-dock > div { min-width: 0; align-self: center; }
.result-dock p { margin: 0 0 7px; overflow: hidden; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-overflow: ellipsis; white-space: nowrap; }
.result-dock strong { font-size: 20px; font-weight: 650; }
.result-dock .primary-button { grid-column: 1 / -1; min-height: 50px; }
.heart-button--large { display: grid; place-items: center; align-content: center; border-radius: 18px; }
.heart-button--large small { margin-top: 4px; font-size: 9px; }
.swipe-note { height: 42px; margin: 0; padding: 12px; background: #fff; color: #555; font-size: 10px; text-align: center; }
.swipe-note span { margin: 0 12px; }
.saved-room { overflow: hidden; margin-top: 28px; border: 1px solid #e2e2e2; border-radius: 22px; }
.saved-room img { display: block; width: 100%; height: 330px; object-fit: cover; }
.saved-room div { padding: 16px; }
.saved-room small { color: #777; font-size: 9px; letter-spacing: .08em; }
.saved-room h2 { margin: 7px 0 5px; font-size: 18px; font-weight: 650; }
.saved-room p { margin: 0; color: #666; font-size: 11px; }
.saved-room button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 46px; margin-top: 14px; padding: 0; border: 0; border-top: 1px solid #eee; background: transparent; font-size: 11px; font-weight: 650; }
.saved-room button svg { width: 17px; height: 17px; }
.profile-card { display: flex; align-items: center; gap: 14px; margin: 28px 0 22px; padding: 18px; border-radius: 20px; background: #f5f5f3; }
.profile-mark { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: #111; color: #fff; }
.profile-mark svg { width: 25px; height: 25px; }
.profile-card strong { font-size: 14px; }
.profile-card p { margin: 4px 0 0; color: #777; font-size: 10px; }
.settings-list { border-top: 1px solid #e6e6e6; }
.settings-list button { display: grid; grid-template-columns: 28px 1fr 20px; align-items: center; width: 100%; min-height: 58px; padding: 0; border: 0; border-bottom: 1px solid #e6e6e6; background: transparent; text-align: left; }
.settings-list svg { width: 18px; height: 18px; }
.settings-list span:nth-child(2) { font-size: 12px; font-weight: 600; }
.bottom-nav { position: fixed; z-index: 20; right: max(calc((100vw - 430px) / 2), 0px); bottom: 0; left: max(calc((100vw - 430px) / 2), 0px); display: grid; grid-template-columns: repeat(4,1fr); height: calc(var(--nav-height) + env(safe-area-inset-bottom)); padding: 0 0 env(safe-area-inset-bottom); border-top: 1px solid #dedede; background: rgba(255,255,255,.96); backdrop-filter: blur(18px); }
.bottom-nav button { display: grid; place-items: center; align-content: center; gap: 3px; min-width: 0; min-height: 58px; padding: 0; border: 0; background: transparent; color: #393939; }
.bottom-nav button.is-active { color: #111; }
.bottom-nav svg { width: 27px; height: 27px; }
.bottom-nav small { font-size: 10px; font-weight: 600; }
.product-sheet { position: fixed; z-index: 40; inset: 0; display: grid; align-items: end; width: min(100%, 430px); margin: 0 auto; }
.sheet-scrim { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: rgba(17,17,17,.48); backdrop-filter: blur(3px); }
.sheet-panel { position: relative; max-height: min(82svh, 720px); overflow: auto; padding: 8px 20px calc(24px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: #fff; box-shadow: 0 -24px 60px rgba(0,0,0,.2); }
.sheet-handle { display: block; width: 42px; height: 4px; margin: 0 auto 15px; border-radius: 999px; background: #d0d0d0; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sheet-header p { margin: 0 0 5px; color: #6d6d6d; font-size: 9px; font-weight: 650; letter-spacing: .16em; }
.sheet-header h2 { margin: 0; font-size: 22px; font-weight: 650; letter-spacing: -.04em; }
.sheet-close { display: grid; flex: 0 0 44px; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #e1e1e1; border-radius: 50%; background: #fff; }
.sheet-close svg { width: 20px; height: 20px; }
.sheet-summary { display: grid; grid-template-columns: 92px 1fr; gap: 13px; align-items: center; margin: 20px 0 12px; padding: 10px; border-radius: 18px; background: #f5f5f3; }
.sheet-summary img { display: block; width: 92px; height: 76px; border-radius: 12px; object-fit: cover; }
.sheet-summary div { display: grid; gap: 4px; min-width: 0; }
.sheet-summary small, .sheet-summary span { color: #6f6f6f; font-size: 9px; }
.sheet-summary strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sheet-products { border-top: 1px solid #e6e6e6; }
.sheet-product { display: grid; grid-template-columns: 94px minmax(0,1fr); gap: 14px; align-items: center; min-height: 118px; padding: 12px 0; border-bottom: 1px solid #e6e6e6; }
.sheet-product-photo { display: block; width: 94px; height: 94px; border-radius: 15px; background-color: #f7f7f5; background-image: url("./furniture-grid.avif"); background-repeat: no-repeat; background-size: 200% 200%; }
.sheet-product div { display: grid; gap: 4px; min-width: 0; }
.sheet-product small { color: #6f6f6f; font-size: 9px; letter-spacing: .03em; }
.sheet-product h3 { margin: 0; font-size: 13px; font-weight: 650; }
.sheet-product strong { font-size: 15px; font-weight: 650; }
.sheet-product div > span { width: fit-content; margin-top: 3px; padding: 4px 7px; border-radius: 999px; background: #f1f1ef; color: #666; font-size: 8px; }
.sheet-note { display: flex; align-items: flex-start; gap: 7px; margin: 15px 2px 0; color: #777; font-size: 9px; line-height: 1.55; }
.sheet-note svg { flex: 0 0 auto; width: 15px; height: 15px; }
.toast { position: fixed; z-index: 50; right: 50%; bottom: calc(var(--nav-height) + 16px); width: min(calc(100% - 40px), 390px); padding: 13px 16px; border-radius: 14px; transform: translateX(50%); background: #111; color: #fff; font-size: 11px; text-align: center; box-shadow: 0 14px 40px rgba(0,0,0,.22); }
@media (max-width: 359px) {
  .home-content { padding-inline: 18px; }
  .home-copy h1 { font-size: 34px; }
  .room-triptych { height: 285px; }
  .screen-body { padding-inline: 16px; }
  .product-grid { gap: 7px; }
  .try-button { font-size: 9px; }
  .result-stage { min-height: 590px; }
}
@media (min-width: 760px) {
  :root { --app-vertical-inset: 56px; }
  body { padding: 28px 0; }
  .app-shell { height: calc(100svh - 56px); min-height: 0; border-radius: 28px; }
  .app-screen { height: 100%; min-height: 0; }
  .bottom-nav { right: calc((100vw - 430px) / 2); bottom: 28px; left: calc((100vw - 430px) / 2); border-radius: 0 0 28px 28px; }
  .product-sheet { top: 28px; bottom: 28px; height: auto; overflow: hidden; border-radius: 28px; }
  .sheet-panel { padding-bottom: 24px; }
  .toast { bottom: calc(var(--nav-height) + 44px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
