/* Broker console — Kukan dark palette, mirrored from the iOS app
   (DesignSystem/KukanTheme.swift) so the web console reads as the same
   product, not a generic dashboard template. */
:root {
  --ink: #0c0f0d;
  --surface: #151a17;
  --surface-high: #1d2420;
  --border: #232b26;
  --border-high: #2a332d;
  --text-title: #f4f7f2;
  --text-primary: #eef2ec;
  --text-secondary: #8fa096;
  --text-tertiary: #6d7f74;
  --lime: #c8f169;
  --teal: #3ddad0;
  --ember: #ffb26b;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(61, 218, 208, 0.07), transparent 60%),
    radial-gradient(900px 480px at -10% 0%, rgba(200, 241, 105, 0.06), transparent 55%),
    var(--ink);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  min-height: 100vh;
}

.hidden { display: none !important; }

/* ---- brand ---- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand h1 { font-size: 20px; font-weight: 800; color: var(--text-title); letter-spacing: 0.01em; }
.brand-sub { font-size: 11.5px; color: var(--text-tertiary); margin-top: 2px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, rgba(200, 241, 105, 0.9), rgba(61, 218, 208, 0.85));
  clip-path: polygon(50% 8%, 92% 45%, 78% 45%, 78% 92%, 22% 92%, 22% 45%, 8% 45%);
}
.brand-mark.small { width: 30px; height: 30px; }

/* ---- login ---- */
#login-view { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card {
  width: min(400px, 100%); background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px; padding: 28px;
  display: flex; flex-direction: column; gap: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
#login-form { display: flex; flex-direction: column; gap: 14px; }
label { font-size: 12px; color: var(--text-secondary); display: flex; flex-direction: column; gap: 6px; }
input {
  background: var(--surface-high); border: 1px solid var(--border-high);
  border-radius: 10px; padding: 11px 12px; color: var(--text-primary);
  font-size: 15px; outline: none;
}
input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(200, 241, 105, 0.15); }
button {
  border: none; border-radius: 999px; padding: 12px 18px; cursor: pointer;
  font-size: 14px; font-weight: 700; color: #10140f;
  background: linear-gradient(90deg, var(--lime), var(--teal));
  transition: transform 0.12s ease, filter 0.12s ease;
}
button:hover { filter: brightness(1.06); transform: translateY(-1px); }
button:disabled { opacity: 0.55; cursor: default; transform: none; }
button.ghost {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border-high); font-weight: 600;
}
.error { color: var(--ember); font-size: 12.5px; }
.footnote { font-size: 11px; color: var(--text-tertiary); line-height: 1.6; }

/* ---- dashboard ---- */
#dashboard-view { max-width: 1080px; margin: 0 auto; padding: 26px 20px 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 12px; flex-wrap: wrap; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.broker-code {
  font-family: ui-monospace, Menlo, monospace; font-size: 13px; font-weight: 700;
  color: var(--lime); background: rgba(200, 241, 105, 0.1);
  border: 1px solid rgba(200, 241, 105, 0.35); border-radius: 999px; padding: 7px 14px;
}
.empty { color: var(--text-secondary); font-size: 14px; line-height: 1.9; padding: 60px 0; text-align: center; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; text-align: left; padding: 0; color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease; font-weight: 400;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-high); filter: none; }
.card .thumb {
  aspect-ratio: 16 / 10; background: var(--surface-high); width: 100%;
  object-fit: cover; display: block; color: var(--text-tertiary);
}
.card .thumb.placeholder { display: grid; place-items: center; font-size: 12px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.card-body h2 { font-size: 16px; color: var(--text-title); font-weight: 700; }
.card-body .addr { font-size: 12px; color: var(--text-secondary); }
.card-meta { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.chip {
  font-size: 10.5px; font-weight: 600; color: var(--text-secondary);
  border: 1px solid var(--border-high); border-radius: 999px; padding: 3px 9px;
}
.chip.lime { color: var(--lime); border-color: rgba(200, 241, 105, 0.35); }

/* ---- detail dialog ---- */
dialog {
  background: var(--surface); color: var(--text-primary);
  border: 1px solid var(--border-high); border-radius: 18px;
  width: min(680px, calc(100vw - 32px)); max-height: 86vh; overflow-y: auto;
  padding: 24px;
}
dialog::backdrop { background: rgba(5, 7, 6, 0.72); backdrop-filter: blur(3px); }
.detail-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 6px; }
.detail-head h2 { font-size: 20px; color: var(--text-title); }
.detail-section { margin-top: 18px; }
.detail-section h3 {
  font-size: 11px; letter-spacing: 0.12em; color: var(--text-tertiary);
  text-transform: uppercase; margin-bottom: 10px;
}
.note {
  border-left: 2px solid var(--teal); padding: 6px 12px; margin-bottom: 10px;
  font-size: 13.5px; line-height: 1.6;
}
.note time { display: block; font-size: 10.5px; color: var(--text-tertiary); margin-top: 2px; }
.note img { max-width: 220px; border-radius: 10px; margin-top: 8px; display: block; }
.scan-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface-high); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 8px; font-size: 13px;
}
.scan-row a {
  color: var(--lime); font-weight: 700; text-decoration: none; font-size: 12.5px;
  border: 1px solid rgba(200, 241, 105, 0.35); border-radius: 999px; padding: 6px 12px;
}
.scan-row a:hover { background: rgba(200, 241, 105, 0.12); }
.map-link { color: var(--teal); font-size: 12.5px; text-decoration: none; }
.map-link:hover { text-decoration: underline; }
.fact-list { font-size: 12.5px; color: var(--text-secondary); line-height: 1.8; }

/* ================= property workspace (3D / plan / notes tabs) ========= */
dialog.workspace {
  width: min(960px, calc(100vw - 24px));
  max-height: 92vh;
  padding: 22px 24px 20px;
}
.scan-picker { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 2px; }
.scan-chip {
  background: var(--surface-high); color: var(--text-secondary);
  border: 1px solid var(--border-high); font-size: 12px; font-weight: 600;
  padding: 6px 13px;
}
.scan-chip.active { background: rgba(200, 241, 105, 0.14); color: var(--lime); border-color: rgba(200, 241, 105, 0.4); }
.tabbar { display: flex; gap: 4px; margin: 14px 0 12px; border-bottom: 1px solid var(--border); }
.tab {
  background: transparent; color: var(--text-tertiary); font-size: 13px; font-weight: 700;
  border: none; border-radius: 0; padding: 9px 14px 11px; position: relative;
}
.tab:hover { color: var(--text-secondary); transform: none; filter: none; }
.tab.active { color: var(--lime); }
.tab.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--lime), var(--teal)); border-radius: 2px;
}
.pane { display: none; }
.pane.active { display: block; }
.viewer {
  height: min(52vh, 460px); border-radius: 14px; overflow: hidden;
  background:
    radial-gradient(600px 300px at 70% 10%, rgba(61, 218, 208, 0.06), transparent 60%),
    var(--surface-high);
  border: 1px solid var(--border);
  display: grid; place-items: center;
}
.viewer canvas { display: block; width: 100%; height: 100%; }
.viewer.plan { padding: 18px; }
.viewer-empty { color: var(--text-tertiary); font-size: 13px; padding: 24px; text-align: center; line-height: 1.8; }
.viewer-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 10px; flex-wrap: wrap;
}
.hint { font-size: 11.5px; color: var(--text-tertiary); }
#usdz-links a {
  color: var(--lime); font-weight: 700; text-decoration: none; font-size: 12px;
  border: 1px solid rgba(200, 241, 105, 0.35); border-radius: 999px; padding: 6px 12px;
}
.legend { font-size: 11.5px; color: var(--text-tertiary); display: flex; align-items: center; gap: 8px; }
.legend .sw { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.sw.wall { background: #e8e6df; }
.sw.door { background: var(--ember); }
.sw.win { background: var(--teal); }
.sw.open { background: var(--text-tertiary); }

/* ============================ landing page ============================= */
.landing { overflow-x: hidden; }
.landing-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px;
  background: rgba(12, 15, 13, 0.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(35, 43, 38, 0.6);
}
.brand-word { font-size: 16px; font-weight: 800; color: var(--text-title); letter-spacing: 0.02em; }
.brand-word em { font-style: normal; color: var(--lime); }
.nav-cta {
  color: var(--text-secondary); text-decoration: none; font-size: 13px; font-weight: 700;
  border: 1px solid var(--border-high); border-radius: 999px; padding: 8px 16px;
  transition: color 0.15s, border-color 0.15s;
}
.nav-cta:hover { color: var(--lime); border-color: rgba(200, 241, 105, 0.4); }

.hero { position: relative; min-height: 88vh; display: grid; align-items: center; }
.hero-media {
  position: absolute; inset: 0;
  background: url("./assets/hero-skytree.png") center 30% / cover no-repeat;
  opacity: 0.5;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0.55) 60%, transparent 96%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0.55) 60%, transparent 96%);
}
.hero-inner { position: relative; max-width: 1080px; margin: 0 auto; padding: 90px 24px 60px; }
.kicker {
  font-size: 11px; letter-spacing: 0.34em; color: var(--teal); font-weight: 700;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: "Shippori Mincho", serif; font-weight: 800;
  font-size: clamp(44px, 7.5vw, 84px); line-height: 1.22; color: var(--text-title);
  letter-spacing: 0.02em;
}
.accent {
  background: linear-gradient(90deg, var(--lime), var(--teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede {
  margin-top: 26px; max-width: 620px; font-size: 15.5px; line-height: 2.05;
  color: var(--text-secondary);
}
.lede strong { color: var(--text-primary); font-weight: 700; }
.wide-only { display: none; }
@media (min-width: 760px) { .wide-only { display: inline; } }
.hero-actions { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.cta {
  display: inline-block; text-decoration: none; color: #10140f;
  background: linear-gradient(90deg, var(--lime), var(--teal));
  font-weight: 800; font-size: 14px; border-radius: 999px; padding: 14px 26px;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.cta:hover { transform: translateY(-2px); filter: brightness(1.06); }
.ghost-cta { background: transparent; color: var(--text-primary); border: 1px solid var(--border-high); }
.hero-chips { list-style: none; display: flex; gap: 10px; margin-top: 44px; flex-wrap: wrap; }
.hero-chips li {
  font-size: 12px; color: var(--text-secondary);
  background: rgba(21, 26, 23, 0.8); backdrop-filter: blur(8px);
  border: 1px solid var(--border-high); border-radius: 999px; padding: 9px 16px;
}
.hero-chips b { color: var(--text-title); margin-right: 8px; }

.features { max-width: 1080px; margin: 0 auto; padding: 30px 24px 10px; }
.feature {
  display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center;
  padding: 54px 0; border-top: 1px solid rgba(35, 43, 38, 0.55);
}
.feature:first-child { border-top: none; }
@media (min-width: 860px) {
  .feature { grid-template-columns: 1.05fr 1fr; }
  .feature.reverse .feature-copy { order: 2; }
  .feature.reverse .feature-visual { order: 1; }
}
.feature-index {
  font-family: "Shippori Mincho", serif; font-size: 13px; letter-spacing: 0.3em;
  color: var(--teal); margin-bottom: 14px;
}
.feature h2 {
  font-family: "Shippori Mincho", serif; font-weight: 700;
  font-size: clamp(26px, 3.4vw, 36px); line-height: 1.5; color: var(--text-title);
}
.feature p { margin-top: 16px; font-size: 14px; line-height: 2; color: var(--text-secondary); max-width: 460px; }
.feature-visual {
  border-radius: 20px; border: 1px solid var(--border); min-height: 260px;
  background: var(--surface); overflow: hidden; position: relative;
}
.feature-visual.photo.city {
  background: url("./assets/city-top.png") center / cover no-repeat;
  min-height: 300px;
}
.plan-visual { display: grid; place-items: center; padding: 26px; }
.plan-visual svg { width: min(340px, 90%); }

/* CSS-art dollhouse for feature 01 (kept lightweight — no 3D lib on landing) */
.doll { display: grid; place-items: center; perspective: 700px; }
.doll-room {
  position: relative; width: 220px; height: 150px;
  transform-style: preserve-3d;
  animation: doll-turn 14s ease-in-out infinite;
}
@keyframes doll-turn {
  0%, 100% { transform: rotateX(58deg) rotateZ(-24deg); }
  50% { transform: rotateX(58deg) rotateZ(-52deg); }
}
.doll-floor {
  position: absolute; inset: 0; background: rgba(61, 218, 208, 0.06);
  border: 2px solid rgba(232, 230, 223, 0.7); border-radius: 4px;
}
.doll-wall { position: absolute; background: rgba(232, 230, 223, 0.16); border: 1px solid rgba(232, 230, 223, 0.5); }
.doll-wall.w1 { left: 0; top: 0; width: 100%; height: 44px; transform-origin: top; transform: rotateX(-90deg); }
.doll-wall.w2 { left: 0; top: 0; height: 100%; width: 44px; transform-origin: left; transform: rotateY(90deg); }
.doll-window {
  position: absolute; top: 0; left: 55%; width: 34%; height: 44px;
  background: rgba(61, 218, 208, 0.35); border: 1px solid var(--teal);
  transform-origin: top; transform: rotateX(-90deg) translateZ(0.5px);
}
.doll-door {
  position: absolute; top: 30%; left: 0; height: 34%; width: 44px;
  background: rgba(255, 178, 107, 0.4); border: 1px solid var(--ember);
  transform-origin: left; transform: rotateY(90deg) translateZ(0.5px);
}

.steps { max-width: 1080px; margin: 0 auto; padding: 60px 24px; }
.steps-title {
  font-family: "Shippori Mincho", serif; font-size: clamp(24px, 3vw, 32px);
  color: var(--text-title); margin-bottom: 34px;
}
.steps-list { list-style: none; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .steps-list { grid-template-columns: repeat(3, 1fr); } }
.steps-list li {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 24px 22px;
}
.step-number {
  font-family: "Shippori Mincho", serif; display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; font-weight: 700;
  color: #10140f; background: linear-gradient(135deg, var(--lime), var(--teal));
  margin-bottom: 14px;
}
.steps-list h3 { font-size: 16px; color: var(--text-title); margin-bottom: 8px; }
.steps-list p { font-size: 13px; line-height: 1.9; color: var(--text-secondary); }

.broker-cta { padding: 30px 24px 80px; }
.broker-cta-inner {
  max-width: 1080px; margin: 0 auto; text-align: center;
  background:
    radial-gradient(600px 260px at 50% 0%, rgba(200, 241, 105, 0.07), transparent 70%),
    var(--surface);
  border: 1px solid var(--border-high); border-radius: 26px; padding: 60px 30px;
}
.broker-cta h2 {
  font-family: "Shippori Mincho", serif; font-size: clamp(26px, 4vw, 40px);
  color: var(--text-title); margin-bottom: 34px;
}
.broker-points {
  display: grid; gap: 14px; grid-template-columns: 1fr; text-align: left;
  max-width: 860px; margin: 0 auto 36px;
}
@media (min-width: 720px) { .broker-points { grid-template-columns: repeat(2, 1fr); } }
.broker-points p {
  font-size: 13px; line-height: 1.9; color: var(--text-secondary);
  background: rgba(21, 26, 23, 0.7); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 18px;
}
.broker-points b { color: var(--text-title); font-size: 14px; }
.broker-cta .footnote { margin-top: 18px; }

.landing-footer {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  max-width: 1080px; margin: 0 auto; padding: 26px 24px 40px;
  font-size: 11px; color: var(--text-tertiary);
  border-top: 1px solid rgba(35, 43, 38, 0.55);
}
