/* Madori Fit marketing site — colors follow the app's light theme (src/theme.ts). */
:root {
  color-scheme: light;
  --bg: #F4EFE6;
  --surface: #FFFDF9;
  --surface-alt: #EDE6D9;
  --border: #DDD4C4;
  --text: #3B3A36;
  --text-dim: #6B6458;      /* darker than the app's #8A8275 so body copy passes contrast */
  --text-faint: #8A8275;
  --accent: #6E8B74;
  --accent-strong: #4F6B55; /* for text, links and filled buttons */
  --accent-soft: #DCE6DC;
  --wood: #C9A77C;
  --wood-line: #A68258;
  --danger: #D1493F;
  --danger-text: #A8352D;
  --warn: #E0A100;
  --warn-text: #7A5A00;
  --canvas: #E9E3D7;
  --wall: #4A443C;
  --floor: #F8F2E6;
  --water: #D5E6EA;
  --window: #BFD9E6;
  --door-line: #7A7265;
  --shadow: 0 14px 40px rgba(74, 68, 60, .10);
  --shadow-sm: 0 4px 14px rgba(74, 68, 60, .07);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; color: var(--text); background: var(--bg); line-height: 1.6; overflow-x: hidden; }
a { color: var(--accent-strong); text-underline-offset: 4px; }
a:hover { color: #3E5844; }
:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 3px; border-radius: 6px; }
img, video { max-width: 100%; }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--border); background: rgba(244, 239, 230, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.nav { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 0 0 1px var(--border); }
.nav-links { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; justify-content: flex-end; font-size: 14px; }
.nav-links a { color: var(--text-dim); text-decoration: none; font-weight: 700; white-space: nowrap; }
.nav-links a:hover { color: var(--text); }
.nav-links .nav-web { padding: 8px 13px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); }
.nav-links .nav-web:hover { border-color: var(--accent); }
.nav-links .nav-cta { padding: 9px 15px; border-radius: 999px; color: #fff; background: var(--accent-strong); }
.nav-links .nav-cta:hover { color: #fff; background: #3E5844; }
.short { display: none; }

/* Shared type */
.eyebrow, .section-kicker { margin: 0 0 12px; color: var(--accent-strong); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; color: var(--text); font-size: clamp(40px, 7vw, 68px); line-height: 1.12; letter-spacing: -.03em; font-weight: 800; }
.section h2, .article h1 { margin: 0; color: var(--text); font-size: clamp(28px, 4.4vw, 44px); line-height: 1.25; letter-spacing: -.02em; font-weight: 800; }
.section-intro { max-width: 720px; margin: 18px 0 0; color: var(--text-dim); font-size: 17px; line-height: 1.85; }
.mark { background: linear-gradient(transparent 62%, var(--accent-soft) 62%); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 64px 0 72px; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 32px 32px; -webkit-mask-image: linear-gradient(to right, #000, transparent 70%); mask-image: linear-gradient(to right, #000, transparent 70%); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-lead { max-width: 620px; margin: 22px 0 0; color: var(--text-dim); font-size: clamp(17px, 2.2vw, 20px); line-height: 1.8; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.hero-points li { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13px; font-weight: 700; }
.store-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.store-badge { display: block; height: 50px; width: auto; }
.apple-badge { height: 50px; }
.play-badge { height: 58px; margin: -4px 0; }
.store-note { width: 100%; margin: 4px 0 0; color: var(--text-dim); font-size: 13px; line-height: 1.7; }
.web-try { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 14px; }
.web-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 15px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 700; text-decoration: none; }
.web-link:hover { color: var(--text); border-color: var(--accent); background: #fff; }
.web-link svg { width: 16px; height: 16px; flex: none; }
.web-note { margin: 0; color: var(--text-dim); font-size: 12.5px; line-height: 1.6; }

/* Hero plan illustration (app floor-plan colors) */
.hero-stage { position: relative; padding: 18px 10px 26px 18px; }
.plan-card { position: relative; aspect-ratio: 1 / .92; overflow: hidden; border: 1px solid var(--border); border-radius: 24px; background: var(--canvas); box-shadow: var(--shadow); }
.plan-grid { position: absolute; inset: 0; opacity: .7; background-image: linear-gradient(#DED6C8 1px, transparent 1px), linear-gradient(90deg, #DED6C8 1px, transparent 1px); background-size: 24px 24px; }
.room { position: absolute; left: 11%; top: 13%; width: 78%; height: 68%; border: 9px solid var(--wall); border-radius: 2px; background: var(--floor); }
.window { position: absolute; top: -9px; left: 22%; width: 40%; height: 9px; background: var(--window); border-left: 2px solid var(--wall); border-right: 2px solid var(--wall); }
.door { position: absolute; right: -9px; bottom: 10%; width: 9px; height: 22%; background: var(--floor); }
.door-arc { position: absolute; right: 0; bottom: 10%; height: 22%; aspect-ratio: 1; border-top: 2px solid var(--door-line); border-left: 1.5px dashed var(--door-line); border-bottom: 1.5px dashed var(--door-line); border-bottom-left-radius: 100%; }
.furniture { position: absolute; display: grid; place-items: center; border: 2px solid; border-radius: 8px; font-size: 12px; font-weight: 800; color: var(--text); text-align: center; line-height: 1.2; }
.rug { position: absolute; left: 30%; top: 38%; width: 44%; height: 34%; border-radius: 6px; background: var(--accent-soft); }
.bed { left: 5%; top: 6%; width: 34%; height: 42%; background: #EFE6D6; border-color: #B7A58A; }
.bed::before { content: ""; position: absolute; left: 12%; right: 12%; top: 7%; height: 15%; border-radius: 5px; background: #FFFDF9; border: 1.5px solid #CDBEA6; }
.sofa { left: 5%; bottom: 6%; width: 22%; height: 36%; background: #B7C7B9; border-color: var(--accent); color: #2F3B32; }
.table { left: 48%; top: 44%; width: 20%; height: 18%; background: var(--wood); border-color: var(--wood-line); color: #3E2F1D; }
.shelf { right: 4%; top: 6%; width: 30%; height: 12%; background: #DCC6A6; border-color: var(--wood-line); border-radius: 4px; font-size: 11px; }
.plant { position: absolute; left: 45%; top: 7%; width: 7%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #8FAE93 40%, var(--accent) 41%); }
.desk { right: 0; top: 26%; width: 14%; height: 38%; background: #DCC6A6; border-color: var(--wood-line); border-radius: 4px; font-size: 11px; writing-mode: vertical-rl; }
.walkway { position: absolute; left: 68%; top: 44%; width: 18%; height: 18%; border-top: 1.5px solid var(--warn); border-bottom: 1.5px solid var(--warn); background: repeating-linear-gradient(135deg, rgba(224,161,0,.28) 0 6px, rgba(224,161,0,.08) 6px 12px); }
.walkway span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 2px 7px; border-radius: 6px; background: #FFF7DE; border: 1px solid var(--warn); color: var(--warn-text); font-size: 11px; font-weight: 800; white-space: nowrap; }
.room-label { position: absolute; left: 50%; top: 24%; transform: translateX(-50%); color: #9A917F; font-size: 12px; font-weight: 700; white-space: nowrap; }
.dimension { position: absolute; left: 11%; right: 11%; bottom: 7%; display: flex; align-items: center; gap: 8px; color: var(--text-dim); font-size: 11px; font-weight: 800; }
.dimension::before, .dimension::after { content: ""; flex: 1; border-top: 1px solid var(--text-faint); }
.check-chips { position: absolute; left: 4%; top: 3.2%; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid; border-radius: 999px; background: var(--surface); font-size: 11px; font-weight: 800; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.warn { color: var(--warn-text); border-color: var(--warn); }
.chip.danger { color: var(--danger-text); border-color: var(--danger); }
.chip.ok { color: var(--accent-strong); border-color: var(--accent); }
.app-float { position: absolute; right: -2px; top: -4px; width: 92px; height: auto; border-radius: 22px; box-shadow: 0 12px 30px rgba(74, 68, 60, .18); transform: rotate(4deg); }
.mini-tag { position: absolute; left: 0; bottom: 0; padding: 10px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); font-size: 12px; font-weight: 800; box-shadow: var(--shadow-sm); }

/* Stats */
.trust-strip { padding: 0 0 8px; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.trust-item { padding: 18px 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.trust-item strong { display: block; color: var(--accent-strong); font-size: 28px; line-height: 1.2; font-weight: 800; }
.trust-item span { color: var(--text-dim); font-size: 13px; font-weight: 700; }

/* Sections */
.section { padding: 84px 0; }
.section-white { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.definition { display: grid; grid-template-columns: .72fr 1.28fr; gap: 48px; align-items: start; }
.answer-card { padding: 28px 30px; border-radius: 22px; background: var(--accent-soft); font-size: 17px; line-height: 1.9; }

/* Feature showcase with screenshots */
.showcase { display: grid; gap: 28px; margin-top: 44px; }
.show-row { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: center; padding: 28px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); }
.show-row.reverse { grid-template-columns: 1fr 300px; }
.show-row.reverse .shot { order: 2; }
.shot { margin: 0; overflow: hidden; border-radius: 20px; background: linear-gradient(#F4EFE6, #E7DCC9); }
.shot img { display: block; width: 100%; height: auto; }
.show-num { display: inline-block; margin-bottom: 12px; color: var(--accent-strong); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.show-text h3 { margin: 0 0 12px; font-size: clamp(22px, 2.8vw, 30px); line-height: 1.35; letter-spacing: -.01em; font-weight: 800; }
.show-text p { margin: 0; color: var(--text-dim); font-size: 16px; line-height: 1.9; }
.show-text p + p { margin-top: 10px; }
.fine { font-size: 13.5px !important; line-height: 1.75 !important; }
.tag { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 12px; font-weight: 800; letter-spacing: .04em; vertical-align: middle; }
.legend { display: grid; gap: 10px; margin: 18px 0 14px; padding: 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 700; line-height: 1.5; }
.swatch { flex: none; width: 34px; height: 22px; border-radius: 6px; border: 2px solid; }
.swatch.red { background: rgba(209,73,63,.22); border-color: var(--danger); }
.swatch.yellow { background: repeating-linear-gradient(135deg, rgba(224,161,0,.45) 0 4px, rgba(224,161,0,.12) 4px 8px); border-color: var(--warn); }
.swatch.blocked { background: var(--floor); border-color: var(--danger); border-style: dashed; border-radius: 0 18px 0 0; }

/* More features grid */
.more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.more-card { padding: 24px 22px; border: 1px solid var(--border); border-radius: 20px; background: var(--bg); }
.section-white .more-card { background: var(--bg); }
.icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-strong); }
.icon svg { width: 24px; height: 24px; }
.more-card h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.4; font-weight: 800; }
.more-card p { margin: 0; color: var(--text-dim); font-size: 14.5px; line-height: 1.8; }

/* Video */
.video-wrap { display: grid; grid-template-columns: .7fr 1.3fr; gap: 44px; align-items: center; }
.video-frame { overflow: hidden; border: 1px solid var(--border); border-radius: 22px; background: #000; box-shadow: var(--shadow); }
.video-frame video { display: block; width: 100%; }

/* Plans */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 34px; }
.plan { position: relative; padding: 30px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); }
.plan.pro { border: 2px solid var(--accent); box-shadow: var(--shadow-sm); }
.plan-label { margin: 0 0 8px; color: var(--accent-strong); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.plan h3 { margin: 0 0 6px; font-size: 26px; font-weight: 800; }
.plan-price { margin: 0 0 18px; color: var(--text-dim); font-weight: 700; line-height: 1.7; }
.plan-price strong { display: block; color: var(--text); font-size: 34px; line-height: 1.3; }
.plan ul { margin: 0; padding: 0; list-style: none; }
.plan li { position: relative; padding: 10px 0 10px 28px; border-bottom: 1px solid var(--border); line-height: 1.55; }
.plan li:last-child { border-bottom: 0; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 12px; height: 7px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }
.plan li.ad::before { width: 9px; height: 9px; top: 16px; border: 0; border-radius: 50%; background: var(--text-faint); transform: none; }
.plan-foot { margin: 18px 0 0; color: var(--text-dim); font-size: 13.5px; line-height: 1.75; }

.boundary { padding: 24px 26px; border: 1px solid #EBD9A6; border-left: 6px solid var(--warn); border-radius: 18px; background: #FBF4DF; color: #5A4A20; line-height: 1.85; }

/* FAQ */
.faq-layout { display: grid; grid-template-columns: .66fr 1.34fr; gap: 54px; align-items: start; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.faq-list summary { position: relative; padding: 18px 48px 18px 20px; color: var(--text); font-weight: 800; cursor: pointer; list-style: none; border-radius: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--accent-strong); font-size: 22px; font-weight: 700; line-height: 1; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { margin: -4px 0 0; padding: 0 20px 20px; color: var(--text-dim); line-height: 1.85; }

/* Final CTA */
.final-cta { padding: 0 0 84px; }
.final-grid { display: grid; grid-template-columns: 1fr auto; gap: 34px; align-items: center; padding: 44px 48px; border-radius: 28px; background: var(--accent-soft); }
.final-grid h2 { margin: 0 0 10px; color: var(--text); font-size: clamp(26px, 4vw, 40px); line-height: 1.3; font-weight: 800; }
.final-grid p { margin: 0; color: #4A5A4D; line-height: 1.75; }
.final-grid .store-row { margin-top: 0; }
.final-grid .web-try { justify-content: flex-start; }
.final-grid .web-note { color: #4A5A4D; }

/* Footer */
.site-footer { padding: 36px 0 44px; border-top: 1px solid var(--border); color: var(--text-dim); background: var(--surface-alt); font-size: 13px; }
.footer-row { display: flex; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 8px 16px; flex-wrap: wrap; }
.site-footer a { color: var(--accent-strong); }
.company-line { width: 100%; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); line-height: 1.7; }

/* Article pages (privacy / terms / support / tokushoho) */
.article { width: min(820px, calc(100% - 32px)); margin: 44px auto 88px; }
.breadcrumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; color: var(--text-dim); font-size: 13px; }
.breadcrumbs a { color: var(--text-dim); }
.article-header { margin-bottom: 26px; }
.article-header .lead { color: var(--text-dim); font-size: 17px; line-height: 1.85; }
.meta { color: var(--text-dim); font-size: 13px; }
.article-body { padding: 36px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-sm); overflow-wrap: anywhere; }
.article-body h2 { margin: 40px 0 12px; color: var(--text); font-size: 22px; font-weight: 800; }
.article-body h2:first-child { margin-top: 0; }
.article-body p, .article-body li { line-height: 1.9; }
.article-body li + li { margin-top: 8px; }
.info-box { margin: 22px 0; padding: 20px; border-radius: 16px; background: var(--accent-soft); line-height: 1.8; }
.legal-table { width: 100%; border-collapse: collapse; }
.legal-table th, .legal-table td { padding: 14px; border: 1px solid var(--border); text-align: left; vertical-align: top; line-height: 1.7; }
.legal-table th { width: 31%; color: var(--text); background: var(--surface-alt); }
.contact-button { display: inline-flex; margin-top: 12px; padding: 13px 18px; border-radius: 14px; color: #fff; background: var(--accent-strong); text-decoration: none; font-weight: 800; }
.contact-button:hover { color: #fff; background: #3E5844; }
.not-found { min-height: 65vh; display: grid; place-items: center; padding: 0 16px; text-align: center; }
.not-found h1 { font-size: clamp(34px, 7vw, 60px); }

@media (max-width: 960px) {
  .more-grid { grid-template-columns: 1fr 1fr; }
  .show-row, .show-row.reverse { grid-template-columns: 240px 1fr; gap: 32px; }
  .show-row.reverse { grid-template-columns: 1fr 240px; }
}

@media (max-width: 820px) {
  .nav { padding: 10px 0; min-height: 60px; }
  .nav-links { gap: 8px; }
  .nav-links a:not(.nav-cta):not(.nav-web) { display: none; }
  .hero { padding: 40px 0 52px; }
  .hero-grid, .definition, .video-wrap, .faq-layout, .final-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 36px; }
  .hero-stage { max-width: 520px; width: 100%; margin: 0 auto; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .show-row, .show-row.reverse { grid-template-columns: 1fr; gap: 22px; padding: 24px 20px; }
  .show-row .shot, .show-row.reverse .shot { order: 2; width: min(280px, 100%); margin: 0 auto; }
  .plans { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .definition, .faq-layout { gap: 24px; }
  .final-cta { padding-bottom: 60px; }
  .final-grid { padding: 32px 24px; gap: 24px; }
  .article-body { padding: 26px 20px; }
}

@media (max-width: 520px) {
  .long { display: none; }
  .short { display: inline; }
  .brand { gap: 8px; }
  .brand img { width: 34px; height: 34px; border-radius: 9px; }
  .brand span { font-size: 15px; }
  .nav { gap: 8px; }
  .nav-links { font-size: 13px; gap: 6px; flex-wrap: nowrap; flex: none; }
  .nav-links .nav-web { padding: 7px 10px; }
  .nav-links .nav-cta { padding: 8px 11px; }
  .hero-stage { padding: 12px 4px 22px 8px; }
  .app-float { width: 64px; border-radius: 15px; right: -2px; top: -2px; }
  .room { left: 7%; width: 86%; top: 17%; height: 65%; border-width: 7px; }
  .window { top: -7px; height: 7px; }
  .door { right: -7px; width: 7px; }
  .furniture { font-size: 10.5px; border-width: 1.5px; }
  .shelf, .desk { font-size: 9.5px; }
  .walkway span, .room-label, .chip { font-size: 10px; }
  .check-chips { gap: 4px; }
  .dimension { left: 7%; right: 7%; bottom: 6%; }
  .mini-tag { font-size: 11px; padding: 8px 11px; }
  .trust-item { padding: 14px 14px; border-radius: 16px; }
  .trust-item strong { font-size: 24px; }
  .more-grid { grid-template-columns: 1fr; gap: 12px; }
  .more-card { padding: 20px 18px; }
  .answer-card { padding: 22px 20px; font-size: 16px; }
  .plan { padding: 24px 20px; }
  .store-badge, .apple-badge { height: 44px; }
  .play-badge { height: 51px; }
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table th, .legal-table td { display: block; width: 100%; }
}

@media (max-width: 374px) {
  .nav-links .nav-cta[href="#download"] { display: none; }
}
