:root {
  --ink: #16202a;
  --ink-soft: #4a5663;
  --paper: #faf7f2;
  --card: #ffffff;
  --line: #e7e1d8;
  --accent: #d9623b;
  --accent-ink: #ffffff;
  --accent-soft: #fbe9e2;
  --good: #2f7d5b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 32, 42, .06), 0 8px 24px rgba(22, 32, 42, .06);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
header.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 19px; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand svg { width: 30px; height: 30px; }
nav a { color: var(--ink-soft); text-decoration: none; margin-left: 18px; font-size: 15px; }
nav a:hover { color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 13px 22px; font: inherit; font-weight: 650; font-size: 16px; cursor: pointer; text-decoration: none; transition: transform .08s ease, box-shadow .15s ease, background .15s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(217, 98, 59, .28); }
.btn.primary:hover { background: #c5552f; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--ink-soft); }
.btn.small { padding: 9px 15px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: default; box-shadow: none; }
h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.04; letter-spacing: -.025em; margin: 0 0 18px; }
h2 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -.02em; line-height: 1.15; margin: 0 0 14px; }
h3 { font-size: 18px; margin: 0 0 6px; }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-soft); max-width: 36ch; }
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding: 34px 0 64px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.fine { font-size: 14px; color: var(--ink-soft); }
.house { position: relative; aspect-ratio: 1 / 1; }
.house svg { width: 100%; height: 100%; }
section { padding: 56px 0; }
section.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
section.alt .step { background: var(--paper); box-shadow: none; }
.step .n { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 750; margin-bottom: 12px; }
.step p { margin: 0; color: var(--ink-soft); }
.who { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.who div { padding: 4px 0; }
.who p { color: var(--ink-soft); margin: 0; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; max-width: 760px; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.plan.best { border: 2px solid var(--accent); }
.plan .price { font-size: 36px; font-weight: 780; letter-spacing: -.02em; margin: 6px 0 12px; }
.plan .price small { font-size: 15px; font-weight: 500; color: var(--ink-soft); }
.plan ul { padding-left: 18px; margin: 0 0 18px; color: var(--ink-soft); }
.plan li { margin: 4px 0; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 4px 9px; border-radius: 999px; }
.tips { columns: 2; column-gap: 34px; color: var(--ink-soft); padding-left: 18px; }
.tips li { margin: 0 0 10px; break-inside: avoid; }
footer { padding: 36px 0 48px; color: var(--ink-soft); font-size: 14px; }
footer a { color: var(--ink-soft); margin-right: 16px; }

/* Forms */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
input[type=text], input[type=url], select { width: 100%; font: inherit; font-size: 16px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus { outline: none; border-color: var(--accent); }
.row { display: grid; grid-template-columns: 1fr 110px; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 14px; color: var(--ink-soft); margin-top: 14px; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 40px 20px; text-align: center; background: var(--card); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { display: block; font-size: 18px; margin-bottom: 6px; }
.bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.status { margin: 12px 0 0; font-size: 14px; color: var(--ink-soft); min-height: 1.4em; }
.status.bad { color: #b3261e; }
.create { display: grid; grid-template-columns: 1.45fr 1fr; gap: 20px; padding-bottom: 40px; }
.stage { position: relative; border-radius: var(--radius); overflow: hidden; background: #101418; min-height: 420px; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.done { text-align: center; padding: 30px 22px; }
.linkbox { display: flex; gap: 8px; margin: 12px 0; }
.linkbox input { flex: 1; font-size: 14px; }
.warn { background: #fff7e0; border: 1px solid #f1dfa6; border-radius: 10px; padding: 12px 14px; font-size: 14px; text-align: left; }
.hidden { display: none !important; }

/* Tour page */
body.tour { background: #101418; overflow: hidden; }
.tour canvas#view { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; }
.chip { position: fixed; z-index: 5; background: rgba(16, 20, 24, .72); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 14px; padding: 10px 14px; }
.tour .info { top: 14px; left: 14px; max-width: min(460px, calc(100vw - 28px)); }
.tour .info b { display: block; font-size: 17px; }
.tour .info span { font-size: 13px; opacity: .8; }
.tour .actions { top: 14px; right: 14px; display: flex; gap: 8px; padding: 6px; }
.tour .actions a, .tour .actions button { color: #fff; background: rgba(255, 255, 255, .12); border: 0; border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; }
.tour .badge { right: 14px; bottom: 14px; font-size: 13px; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.tour .badge svg { width: 18px; height: 18px; }
.tour .help { left: 50%; bottom: 18px; transform: translateX(-50%); font-size: 13px; text-align: center; transition: opacity .6s; white-space: nowrap; }
.tour .walk { right: 14px; bottom: 64px; display: grid; grid-template-columns: repeat(3, 44px); grid-template-rows: repeat(2, 44px); gap: 6px; padding: 8px; }
.tour .walk button { background: rgba(255, 255, 255, .14); border: 0; border-radius: 10px; color: #fff; font-size: 18px; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.tour .walk .up { grid-column: 2; }
.tour .walk .l { grid-column: 1; grid-row: 2; }
.tour .walk .dn { grid-column: 2; grid-row: 2; }
.tour .walk .r { grid-column: 3; grid-row: 2; }
.loader { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: #101418; color: #fff; text-align: center; padding: 24px; }
.loader .bar { width: min(320px, 70vw); margin: 16px auto 0; background: rgba(255, 255, 255, .15); }
.owner { left: 14px; bottom: 14px; font-size: 13px; max-width: min(420px, calc(100vw - 28px)); }
.owner button { background: rgba(255, 255, 255, .14); color: #fff; border: 0; border-radius: 8px; padding: 6px 10px; margin: 6px 6px 0 0; font: inherit; font-size: 13px; cursor: pointer; }

@media (max-width: 820px) {
  .hero, .create { grid-template-columns: 1fr; }
  .house { max-width: 380px; margin: 0 auto; }
  .steps, .who, .plans { grid-template-columns: 1fr; }
  .tips { columns: 1; }
  nav a.hide-sm { display: none; }
  .stage { min-height: 340px; }
  .tour .walk { display: none; }
}
