@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(fonts/lexend-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(fonts/lexend-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #F5F7F7;
  --surface: #FFFFFF;
  --surface-2: #EEF1F2;
  --surface-3: #E6E9EA;
  --border: #E6E9EA;
  --border-strong: rgba(31, 35, 42, 0.16);
  --text: #1F232A;
  --muted: #6B7178;
  --faint: #7A8088;
  --accent: #393E50;
  --accent-hover: #2B2F3D;
  --accent-soft: rgba(57, 62, 80, 0.08);
  --gold: #8A6A2F;
  --gold-soft: rgba(197, 160, 89, 0.16);
  --gold-mark: #C5A059;
  --danger: #B0413E;
  --brand-mark-bg: #393E50;
  --brand-mark-fg: #C5A059;
  --wm-leda: #1F232A;
  --wm-studio: #393E50;
  --code-bg: #1F232A;
  --shadow: 0 1px 2px rgba(31, 35, 42, 0.04), 0 6px 18px rgba(31, 35, 42, 0.05);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15171E;
  --surface: #1B1E26;
  --surface-2: #22262F;
  --surface-3: #2A2E38;
  --border: rgba(230, 233, 234, 0.08);
  --border-strong: rgba(230, 233, 234, 0.16);
  --text: #EDEFF1;
  --muted: #A9AEB4;
  --faint: #7A8088;
  --accent: #C5A059;
  --accent-hover: #D4B47A;
  --accent-soft: rgba(197, 160, 89, 0.12);
  --gold: #C5A059;
  --gold-soft: rgba(197, 160, 89, 0.14);
  --gold-mark: #C5A059;
  --danger: #E57B77;
  --brand-mark-bg: #393E50;
  --brand-mark-fg: #C5A059;
  --wm-leda: #FFFFFF;
  --wm-studio: #A9AEB4;
  --code-bg: #0F1116;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.25);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "neulis-sans", "Lexend", system-ui, sans-serif;
  font-size: 15px; line-height: 1.6;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
kbd { font-family: inherit; font-size: 11px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border-strong); color: var(--faint); margin-left: auto; }

.app { display: grid; grid-template-columns: 264px 1fr; height: 100dvh; overflow: hidden; }

/* Sidebar */
.sidebar { background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 14px 12px; gap: 6px; min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 12px; }
.logo { width: 30px; height: 30px; stroke: none; }
.brand-name { font-family: "neulis-sans", "Lexend", system-ui, sans-serif; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.new-chat { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border-strong); font-weight: 500; transition: background .15s, border-color .15s; }
.new-chat:hover { background: var(--surface-2); }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 9px; color: var(--muted); transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.tag { margin-left: auto; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; padding: 1px 7px; border-radius: 99px; background: var(--gold-soft); color: var(--gold); }
.history-head { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 16px 12px 6px; }
.history { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; min-height: 0; }
.history .item { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 8px; color: var(--muted); font-size: 13.5px; position: relative; }
.history .item span.t { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history .item:hover { background: var(--surface-2); color: var(--text); }
.history .item.active { background: var(--surface-2); color: var(--text); }
.history .item .mode-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.history .item .mode-dot.research { background: var(--gold); }
.history .item .mode-dot.code { background: var(--accent); }
.history .item .del { opacity: 0; border: 0; background: none; padding: 2px; cursor: pointer; color: var(--faint); border-radius: 5px; }
.history .item:hover .del { opacity: 1; }
.history .item .del:hover { color: var(--danger); }
.history .item .del svg { width: 14px; height: 14px; }
.history .empty { color: var(--faint); font-size: 13px; padding: 6px 12px; }
.plan-chip { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; background: linear-gradient(135deg, var(--gold-soft), transparent 70%); }

/* Main */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.topbar-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; font-size: 14px; color: var(--muted); }
.topbar-actions { display: flex; gap: 6px; }
.icon-btn { border: 0; background: none; padding: 7px; border-radius: 8px; cursor: pointer; color: var(--muted); display: inline-flex; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.only-mobile { display: none; }
.view { flex: 1; overflow-y: auto; min-height: 0; position: relative; }

/* Home */
.home { max-width: 760px; margin: 0 auto; padding: 12vh 20px 40px; }
.home h1 { font-family: "neulis-sans", "Lexend", system-ui, sans-serif; font-weight: 400; font-size: 30px; letter-spacing: -0.015em; line-height: 1.2; margin: 0 0 6px; text-align: center; }
.home:not(.landing) h1 { margin-bottom: 26px; }
.home .sub { text-align: center; color: var(--muted); margin: 0 0 28px; }
.suggestions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.suggestion { text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, transform .15s; display: flex; gap: 10px; align-items: flex-start; }
.suggestion:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.suggestion .k { font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); display: block; margin-bottom: 2px; }
.suggestion .ic { color: var(--accent); margin-top: 3px; }
.suggestion .s { font-size: 14px; }

/* Composer */
.composer { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow); padding: 10px 10px 8px 14px; transition: border-color .15s; }
.composer:focus-within { border-color: var(--accent); }
.composer textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; min-height: 26px; max-height: 220px; padding: 4px 0; line-height: 1.55; font-size: 15.5px; }
.composer textarea::placeholder { color: var(--faint); }
.composer-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 2px; }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: 7px; font-size: 13px; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.seg button svg { width: 15px; height: 15px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg.mode button.on { color: var(--accent); }
.spacer { flex: 1; }
.send { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--accent); color: var(--surface); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, opacity .15s; }
[data-theme="dark"] .send { color: #15171E; }
.send:hover { background: var(--accent-hover); }
.send:disabled { opacity: .35; cursor: default; }
.send svg { stroke-width: 2.2; }
.send.stop { background: var(--text); }

/* Thread */
.thread { max-width: 780px; margin: 0 auto; padding: 28px 20px 40px; min-height: calc(100% - 118px); }
.dock { position: sticky; bottom: 0; padding: 0 20px 18px; background: linear-gradient(to top, var(--bg) 70%, transparent); }
.dock-inner { max-width: 780px; margin: 0 auto; }
.dock .hint { text-align: center; font-size: 11.5px; color: var(--faint); margin-top: 7px; }
.msg { margin-bottom: 28px; animation: rise .25s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.msg.user .bubble { font-family: "neulis-sans", "Lexend", system-ui, sans-serif; font-size: 22px; line-height: 1.35; font-weight: 400; letter-spacing: -0.01em; white-space: pre-wrap; word-wrap: break-word; }
.msg.user.code .bubble, .msg.user.chat .bubble { font-family: inherit; font-size: 16px; font-weight: 500; background: var(--surface-2); padding: 10px 14px; border-radius: 14px 14px 4px 14px; width: fit-content; max-width: 85%; margin-left: auto; line-height: 1.5; letter-spacing: 0; }
.meta-line { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); margin-bottom: 8px; }
.meta-line .pill { padding: 1px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-weight: 500; }
.meta-line .pill.research { background: var(--gold-soft); color: var(--gold); }
.meta-line .pill.code { background: var(--accent-soft); color: var(--accent); }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 4px 0 14px; }
.source { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; transition: border-color .15s; animation: rise .25s ease-out; min-width: 0; }
.source:hover { border-color: var(--border-strong); }
.source .dom { display: flex; align-items: center; gap: 6px; color: var(--faint); font-size: 11.5px; }
.source .dom img { width: 14px; height: 14px; border-radius: 3px; }
.source .dom .n { margin-left: auto; font-weight: 600; }
.source .ttl { color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.section-label { font-size: 12px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; margin: 2px 0 8px; }
.section-label svg { width: 15px; height: 15px; }

/* Markdown */
.md { overflow-wrap: anywhere; }
.md > *:first-child { margin-top: 0; }
.md p { margin: 0 0 12px; }
.md h1, .md h2, .md h3 { font-size: 17px; font-weight: 600; margin: 20px 0 8px; line-height: 1.35; }
.md h3 { font-size: 15.5px; }
.md ul, .md ol { padding-left: 22px; margin: 0 0 12px; }
.md li { margin: 3px 0; }
.md a { color: var(--accent); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 2px; }
.md blockquote { margin: 0 0 12px; padding: 2px 14px; border-left: 3px solid var(--border-strong); color: var(--muted); }
.md table { border-collapse: collapse; width: 100%; margin: 0 0 14px; font-size: 14px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.md th { background: var(--surface-2); font-weight: 600; }
.md code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .88em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.codeblock { margin: 0 0 14px; border-radius: 12px; overflow: hidden; background: var(--code-bg); border: 1px solid var(--border); }
.codeblock .bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px; font-size: 12px; color: #9AA0A8; border-bottom: 1px solid rgba(255,255,255,.06); }
.codeblock .bar button { border: 0; background: none; color: #A9AEB4; cursor: pointer; display: inline-flex; gap: 5px; align-items: center; padding: 3px 7px; border-radius: 6px; font-size: 12px; }
.codeblock .bar button:hover { background: rgba(255,255,255,.07); color: #fff; }
.codeblock .bar button svg { width: 14px; height: 14px; }
.codeblock pre { margin: 0; padding: 12px 14px; overflow-x: auto; }
.codeblock pre code { background: none; padding: 0; font-size: 13px; line-height: 1.55; color: #E6E9EA; }
.msg-actions { display: flex; gap: 2px; margin-top: 6px; }
.msg-actions button { border: 0; background: none; color: var(--faint); padding: 5px 7px; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.msg-actions button:hover { background: var(--surface-2); color: var(--text); }
.msg-actions svg { width: 15px; height: 15px; }
.err { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.md.caret > :last-child:not(ul):not(ol):not(.codeblock)::after, .md.caret > ul:last-child > li:last-child::after, .md.caret > ol:last-child > li:last-child::after, .md.caret:empty::after { content: ""; display: inline-block; width: 7px; height: 15px; background: var(--accent); margin-left: 2px; vertical-align: -2px; animation: blink 1s infinite; border-radius: 1px; }

/* Pages */
.page { max-width: 980px; margin: 0 auto; padding: 32px 24px 60px; }
.page h2 { font-size: 20px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.01em; }
.page .lead { color: var(--muted); margin: 0 0 24px; max-width: 62ch; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }

/* Image studio */
.img-composer { display: flex; flex-direction: column; gap: 10px; }
.img-composer textarea { min-height: 60px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 22px; align-items: start; }
.tile { position: relative; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); aspect-ratio: 1; animation: rise .3s ease-out; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.tile .cap { position: absolute; inset: auto 0 0 0; padding: 26px 10px 8px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.72)); opacity: 0; transition: opacity .2s; display: flex; gap: 6px; align-items: flex-end; }
.tile:hover .cap, .tile:focus-within .cap { opacity: 1; }
.tile .cap span { flex: 1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile .cap button, .tile .cap a { border: 0; background: rgba(255,255,255,.16); color: #fff; padding: 5px; border-radius: 7px; cursor: pointer; display: inline-flex; }
.tile .cap svg { width: 15px; height: 15px; }
.tile.pending { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 13px; text-align: center; padding: 16px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.5s ease-in-out infinite; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.empty-state { text-align: center; color: var(--muted); padding: 48px 20px; border: 1px dashed var(--border-strong); border-radius: 14px; margin-top: 22px; }
.empty-state svg { width: 34px; height: 34px; color: var(--faint); margin-bottom: 8px; }
.lightbox { position: fixed; inset: 0; background: rgba(10, 11, 15, .86); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 24px; flex-direction: column; gap: 12px; animation: fade .2s; }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 10px; }
.lightbox p { color: #E6E9EA; max-width: 70ch; text-align: center; margin: 0; font-size: 14px; }
@keyframes fade { from { opacity: 0; } }

/* Plan */
.price { font-family: "neulis-sans", "Lexend", system-ui, sans-serif; font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.price small { font-family: "neulis-sans", "Lexend", sans-serif; font-size: 14px; color: var(--muted); font-weight: 400; }
.checks { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 7px; font-size: 14px; }
.checks li { display: flex; gap: 8px; align-items: flex-start; }
.checks li svg { color: var(--accent); margin-top: 3px; width: 16px; height: 16px; }
.checks li.off { color: var(--faint); } .checks li.off svg { color: var(--faint); }
.plan-card.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); margin-left: 6px; vertical-align: 3px; }
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.stat { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: 10px 0 6px; position: relative; }
.meter > div { height: 100%; background: var(--accent); border-radius: 99px; transition: width .6s; }
.meter .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--gold); }
.limit-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.limit-row:last-child { border-bottom: 0; }
.btn { border: 1px solid var(--border-strong); background: var(--surface); padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 500; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--surface); }
[data-theme="dark"] .btn.primary { color: #15171E; }
.btn.primary:hover { background: var(--accent-hover); }
.video-hero { border-radius: 16px; padding: 28px; background: radial-gradient(120% 140% at 0% 0%, var(--gold-soft), transparent 60%), var(--surface); border: 1px solid var(--border); }

/* Settings */
.route-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.route-table th, .route-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.route-table th { font-size: 12px; color: var(--faint); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.route-table td .sub { color: var(--faint); font-size: 12.5px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-size: 13px; font-weight: 500; }
.field input { border: 1px solid var(--border-strong); background: var(--surface-2); border-radius: 9px; padding: 8px 10px; outline: 0; }
.field input:disabled { opacity: .7; }
.note { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.scrim { display: none; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 40; transform: translateX(-100%); transition: transform .25s ease; }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 30; }
  .only-mobile { display: inline-flex; }
  .brand .only-mobile { margin-left: auto; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .suggestions { grid-template-columns: 1fr; }
  .home { padding-top: 6vh; }
  .home h1 { font-size: 25px; }
  .msg.user .bubble { font-size: 19px; }
  .page { padding: 22px 16px 50px; }
  .thread { padding: 20px 16px 30px; min-height: calc(100% - 128px); }
  .dock { padding: 0 12px 12px; }
  .seg button .lbl { display: none; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .route-table .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.md a.cite { text-decoration: none; font-size: 11.5px; font-weight: 500; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; vertical-align: 1px; transition: background .15s, color .15s; }
.md a.cite:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- Leda Computer ---------- */
.tag.new { background: var(--accent-soft); color: var(--accent); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.sm svg { width: 15px; height: 15px; }
.btn:disabled { opacity: .5; cursor: default; }
.badge.pulse { animation: blink 1.6s infinite; }
.computer-home { max-width: 860px; }
.c-hero { text-align: center; padding: 6vh 0 22px; }
.c-hero h1 { font-family: "neulis-sans", "Lexend", system-ui, sans-serif; font-weight: 400; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 auto 10px; max-width: 18ch; }
.c-hero .lead { margin: 0 auto; max-width: 58ch; }
.c-ex { margin-bottom: 36px; }
.c-section-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.c-section-head h2 { font-size: 17px; margin: 0; }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.proj-card { position: relative; display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; transition: border-color .15s, transform .15s; min-height: 128px; }
.proj-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.pc-top { display: flex; align-items: center; gap: 2px; }
.pc-top .badge { margin-left: 6px; vertical-align: 0; }
.pc-ic { width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; margin-right: 4px; }
.pc-title { font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-meta { margin-top: auto; }
.pc-del { position: absolute; top: 10px; right: 10px; border: 0; background: none; color: var(--faint); padding: 5px; border-radius: 7px; cursor: pointer; opacity: 0; display: inline-flex; }
.proj-card:hover .pc-del, .pc-del:focus-visible { opacity: 1; }
.pc-del:hover { color: var(--danger); background: var(--surface-2); }
.pc-del svg { width: 15px; height: 15px; }

/* workspace */
.cws { display: grid; grid-template-columns: minmax(320px, 400px) 1fr; height: 100%; min-height: 0; }
.cws-steps { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border); background: var(--bg); }
.cws-steps-scroll { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.cws-follow { padding: 8px 12px 12px; }
.cws-follow .composer { padding: 8px 8px 6px 12px; border-radius: 14px; }
.cws-follow .composer textarea { font-size: 14.5px; }
.cws-follow .composer-row .small { flex: 1; min-width: 0; }
.step { font-size: 13.5px; animation: rise .25s ease-out; }
.step.user-step { background: var(--surface-2); padding: 10px 13px; border-radius: 14px 14px 4px 14px; font-weight: 500; font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; align-self: flex-end; max-width: 92%; margin: 6px 0 4px; }
.step.note { color: var(--text); font-size: 14px; padding: 0 2px; }
.step.note p { margin: 0 0 6px; }
.step.tool, .step.file, .step.err { display: flex; align-items: flex-start; gap: 9px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.step .st-ic { color: var(--accent); display: inline-flex; margin-top: 2px; }
.step .st-ic svg { width: 15px; height: 15px; }
.step .st-l { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.step.file .st-ic { color: var(--gold); }
.step .fname { border: 0; background: none; padding: 0; font: inherit; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; color: var(--text); cursor: pointer; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px; }
.step .fname:hover { color: var(--accent); }
.step.srcs { display: flex; flex-wrap: wrap; gap: 5px; padding-left: 4px; }
.step.srcs a { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 2px 8px 2px 5px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.step.srcs a:hover { color: var(--accent); background: var(--accent-soft); }
.step.srcs img { border-radius: 3px; }
.step.thumb img { width: 100%; max-height: 180px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); display: block; }
.step.final { border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); background: linear-gradient(160deg, var(--accent-soft), var(--surface) 55%); border-radius: 14px; padding: 12px 14px; font-size: 14px; margin-top: 4px; }
.step.final .fmeta { margin-top: 6px; }
.step.err { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.step.err .st-ic { color: var(--danger); }
.step.working { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 6px 4px; }

.cws-preview { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface-2); }
.pv-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; min-height: 50px; }
.pv-bar .seg button { padding: 4px 9px; }
.pv-body { flex: 1; min-height: 0; overflow: auto; display: flex; }
.pv-device { flex: 1; display: flex; justify-content: center; padding: 14px; min-height: 0; }
.pv-device iframe { width: 100%; height: 100%; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; box-shadow: var(--shadow); transition: width .25s ease; }
.pv-device[data-dev="tablet"] iframe { width: 820px; max-width: 100%; }
.pv-device[data-dev="phone"] iframe { width: 390px; max-width: 100%; border-radius: 22px; border-width: 6px; border-color: var(--text); }
.pv-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 14px; text-align: center; padding: 24px; }
.pv-doc { max-width: 760px; margin: 0 auto; padding: 32px 28px 60px; background: var(--surface); min-height: 100%; width: 100%; font-size: 15px; }
.pv-doc h1 { font-family: "neulis-sans", "Lexend", system-ui, sans-serif; font-weight: 400; font-size: 28px; letter-spacing: -0.015em; }
.code-view { flex: 1; display: grid; grid-template-columns: 200px 1fr; min-height: 0; min-width: 0; }
.ftree { border-right: 1px solid var(--border); background: var(--surface); overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 1px; }
.ftree button { display: flex; align-items: center; gap: 7px; border: 0; background: none; text-align: left; padding: 6px 8px; border-radius: 7px; font-size: 12.5px; font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--muted); cursor: pointer; min-width: 0; }
.ftree button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ftree button svg { width: 14px; height: 14px; }
.ftree button:hover { background: var(--surface-2); color: var(--text); }
.ftree button.on { background: var(--accent-soft); color: var(--accent); }
.fpane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--code-bg); }
.fbar { display: flex; align-items: center; gap: 8px; padding: 7px 10px 7px 14px; font-size: 12.5px; color: #A9AEB4; border-bottom: 1px solid rgba(255,255,255,.07); font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.fbar .btn { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #E6E9EA; font-family: "neulis-sans", "Lexend", system-ui, sans-serif; }
.fbar .btn:hover { background: rgba(255,255,255,.12); }
.fbar .muted { color: #7A8088; }
.fcode { margin: 0; padding: 14px 16px; overflow: auto; flex: 1; font-size: 12.5px; line-height: 1.6; }
.fcode code { color: #E6E9EA; background: none !important; padding: 0 !important; }
.fimg { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; }
.fimg img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.host-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border: 1px solid var(--border-strong); border-radius: 10px; font-size: 13px; max-width: 100%; }
.host-chip > a:first-of-type { font-weight: 500; color: var(--accent); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.host-chip .icon-btn { padding: 5px; }
.host-chip .icon-btn svg { width: 15px; height: 15px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #2fb37a; box-shadow: 0 0 0 3px rgba(47,179,122,.18); flex-shrink: 0; display: inline-block; margin-right: 4px; }
.cws-switch { display: none; }

/* hosting */
.host-list { padding: 4px 16px; }
.host-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.host-row:last-child { border-bottom: 0; }
.hr-main { flex: 1; min-width: 200px; }
.hr-title { font-weight: 500; display: flex; align-items: center; gap: 4px; }
.hr-url { color: var(--accent); overflow-wrap: anywhere; }
.hr-actions { display: flex; align-items: center; gap: 4px; }

@media (max-width: 860px) {
  .hide-sm { display: none !important; }
  .cws { grid-template-columns: 1fr; position: relative; }
  .cws[data-pane="steps"] .cws-preview, .cws[data-pane="preview"] .cws-steps { display: none; }
  .cws-steps { border-right: 0; padding-bottom: 46px; }
  .cws-preview { padding-bottom: 46px; }
  .cws-switch { display: inline-flex; position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 5; box-shadow: var(--shadow); }
  .cws[data-pane="steps"] .cws-follow { padding-bottom: 6px; }
  .code-view { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .ftree { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .ftree button { flex-shrink: 0; }
  .pv-device { padding: 8px; }
  .devices { display: none; }
  .c-hero { padding-top: 2vh; }
  .host-chip > a:first-of-type { max-width: 110px; }
}

/* Ask → live preview */
.codeblock .bar-btns { display: inline-flex; gap: 2px; }
.msg-actions .build-live { color: var(--accent); font-weight: 600; }
.msg-actions .build-live:hover { color: var(--accent); }
.pv-modal { position: fixed; inset: 0; z-index: 80; background: rgba(10,11,15,.55); display: grid; place-items: center; padding: 24px; }
.pv-card { width: min(1100px, 100%); height: min(760px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.pv-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.pv-head .spacer { flex: 1; }
.pv-card iframe { flex: 1; width: 100%; border: 0; background: #fff; }
@media (max-width: 640px) { .pv-modal { padding: 0; } .pv-card { border-radius: 0; height: 100%; } .pv-head .muted { display: none; } }
.run-card { height: min(820px, 100%); }
.run-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.run-files span { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); border-radius: 6px; padding: 2px 8px; }
.run-files[hidden] { display: none; }

/* Run on Leda — prominent */
.run-live { display: inline-flex; align-items: center; gap: 6px; background: var(--accent) !important; color: #fff !important; border: 0; border-radius: 8px; padding: 7px 14px !important; font-weight: 600; font-size: 13px; cursor: pointer; }
.run-live svg { width: 14px; height: 14px; fill: currentColor; }
.run-live:hover { filter: brightness(1.08); }
[data-theme="dark"] .run-live { color: #15171E !important; }
.run-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; margin: 4px 0 14px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 12px; }
.run-banner strong { display: block; font-size: 14px; }
.run-banner span { font-size: 13px; opacity: .75; }
.codeblock .bar button[data-runpy] { background: var(--accent); color: #fff; font-weight: 600; }
@media (max-width: 560px) { .run-banner { flex-direction: column; align-items: stretch; } .run-banner .run-live { justify-content: center; } }

/* ---------- Deliverable chips ---------- */
.pv-chips:empty { display: none; }
.pv-chips { display: flex; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface); overflow-x: auto; flex: none; }
.pv-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; white-space: nowrap; max-width: 260px; }
.pv-chip .k { font-weight: 600; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pv-chip .n { overflow: hidden; text-overflow: ellipsis; }
.pv-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pv-chip.on .k { color: rgba(255,255,255,.75); }
.pv-dls { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* ---------- Deck viewer ---------- */
.dk-viewer, .dc-viewer { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.dk-bar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; flex: none; }
.dk-bar strong { font-size: 14px; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-bar .spacer { flex: 1; }
.dk-dl { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.dk-dl svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.dk-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 18px; overflow: auto; }
.dk-main { width: min(100%, calc((100vh - 290px) * 16 / 9)); min-width: 280px; }
.dk-main .dk-slide { box-shadow: 0 2px 6px rgba(0,0,0,.08), 0 18px 40px rgba(0,0,0,.12); border-radius: 6px; }
.dk-thumbs { display: flex; gap: 10px; padding: 10px 14px; overflow-x: auto; background: var(--surface); border-top: 1px solid var(--border); flex: none; }
.dk-thumb { flex: 0 0 150px; padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; cursor: pointer; position: relative; overflow: hidden; }
.dk-thumb .dk-slide { pointer-events: none; }
.dk-thumb > span { position: absolute; left: 4px; bottom: 3px; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; border-radius: 4px; padding: 0 5px; }
.dk-thumb.on { border-color: var(--accent); }
.dk-notes { padding: 0 16px 10px; background: var(--surface); }
.dk-notes:empty { display: none; }
.dk-slide { position: relative; width: 100%; aspect-ratio: 16 / 9; container-type: inline-size; overflow: hidden; font-family: "Lato", "Satoshi", system-ui, sans-serif; line-height: 1.25; text-align: left; }
.dk-pad { position: absolute; inset: 4.5cqw 4.5cqw 5.6cqw; display: flex; flex-direction: column; }
.dk-kick { font-size: 1.15cqw; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .6cqw; }
.dk-title { font-family: Georgia, "Caladea", serif; line-height: 1.12; }
.dk-rule { width: 6cqw; height: .3cqw; margin: 1.2cqw 0 1.8cqw; }
.dk-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.dk-ul { list-style: none; margin: 0; padding: 0; }
.dk-ul li { position: relative; padding-left: 1.6cqw; margin: 0 0 .9cqw; }
.dk-ul li::before { content: ""; position: absolute; left: 0; top: .5em; width: .55cqw; height: .55cqw; border-radius: 50%; background: var(--acc); }
.dk-ul li.sub { margin-left: 2.2cqw; font-size: .85em; }
.dk-ul li.sub::before { background: transparent; border: .12cqw solid var(--acc); }
.dk-foot { position: absolute; left: 4.5cqw; right: 4.5cqw; bottom: 2cqw; display: flex; justify-content: space-between; font-size: 1cqw; }
.dk-src { position: absolute; left: 4.5cqw; right: 20cqw; bottom: 3.6cqw; font-size: .95cqw; font-style: italic; }
.dk-cover { position: absolute; left: 5.5cqw; top: 50%; transform: translateY(-50%); color: #F3F0E9; }
.dk-ctitle { font-family: Georgia, "Caladea", serif; color: #F3F0E9; line-height: 1.08; }
.dk-csub { color: #C9D3D0; font-size: 1.9cqw; margin-top: .4cqw; line-height: 1.3; }
.dk-cmeta { position: absolute; left: 5.5cqw; bottom: 4cqw; color: #A7B3B0; font-size: 1.2cqw; }
.dk-cover-img { position: absolute; right: 0; top: 0; width: 47%; height: 100%; object-fit: cover; }
.dk-sec { position: absolute; left: 7cqw; right: 7cqw; top: 50%; transform: translateY(-50%); }
.dk-secn { font-family: Georgia, serif; font-size: 7cqw; line-height: 1; margin-bottom: 1cqw; }
.dk-quote { position: absolute; left: 9cqw; right: 9cqw; top: 50%; transform: translateY(-50%); border-left: .45cqw solid; padding-left: 3cqw; font-family: Georgia, "Caladea", serif; line-height: 1.3; }
.dk-attr { font-family: "Lato", system-ui, sans-serif; font-size: 1.5cqw; margin-top: 1.6cqw; }
.dk-full { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dk-band { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.2cqw 5cqw; }
.dk-stats { display: grid; gap: 1.8cqw; }
.dk-card { border: .1cqw solid; border-left-width: .5cqw; border-radius: .6cqw; padding: 1.8cqw; min-width: 0; }
.dk-sv { font-family: Georgia, "Caladea", serif; line-height: 1.05; }
.dk-sl { font-size: 1.55cqw; font-weight: 700; margin-top: .6cqw; }
.dk-sd { font-size: 1.25cqw; margin-top: .4cqw; line-height: 1.3; }
.dk-take { margin-top: auto; font-size: 1.6cqw; font-weight: 700; padding-top: 1.4cqw; }
.dk-chartrow { flex: 1; min-height: 0; display: flex; gap: 2.4cqw; align-items: stretch; }
.dk-chart { min-width: 0; display: flex; }
.dk-chart svg { width: 100%; height: 100%; }
.dk-takeside { flex: 1; border-left: .3cqw solid; padding-left: 1.8cqw; align-self: center; }
.dk-table { width: 100%; border-collapse: collapse; }
.dk-table th { color: #fff; text-align: left; padding: .7cqw 1cqw; font-weight: 700; }
.dk-table td { padding: .6cqw 1cqw; border-bottom: .08cqw solid; }
.dk-table td.num, .dk-table th:not(:first-child) { text-align: right; }
.dk-table td.num { font-variant-numeric: tabular-nums; }
.dk-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.2cqw; flex: 1; min-height: 0; }
.dk-cols .dk-card { border-left-width: .1cqw; }
.dk-h { font-weight: 700; font-size: 1.75cqw; margin-bottom: 1cqw; }
.dk-tl { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 1.6cqw; margin-top: 2cqw; }
.dk-tline { position: absolute; left: 0; right: 0; top: 3.3cqw; height: .2cqw; }
.dk-step { position: relative; }
.dk-tlab { font-size: 1.3cqw; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; height: 2.4cqw; }
.dk-dot { width: 1.5cqw; height: 1.5cqw; border-radius: 50%; margin: .15cqw 0 1.4cqw; position: relative; }
.dk-brow { display: flex; gap: 3cqw; flex: 1; min-height: 0; }
.dk-bcol { flex: 1; min-width: 0; }
.dk-side { width: 42%; height: 100%; object-fit: cover; border-radius: .6cqw; }
.dk-lead { font-size: 1.8cqw; margin-bottom: 1.4cqw; line-height: 1.35; }

/* ---------- Document and sheet previews ---------- */
.dc-scroll { flex: 1; min-height: 0; overflow: auto; padding: 24px 16px 48px; }
.dc-page { max-width: 794px; margin: 0 auto; background: #fff; color: #1F232A; padding: 64px 72px 72px; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 14px 36px rgba(0,0,0,.1); border-radius: 3px; font-family: "Lato", system-ui, sans-serif; font-size: 14.5px; line-height: 1.6; --acc: #17605c; }
.dc-head { border-bottom: 2px solid var(--acc); padding-bottom: 14px; margin-bottom: 22px; }
.dc-page .dc-head h1 { font-family: Georgia, "Caladea", serif; font-weight: 700; font-size: 30px; margin: 0 0 6px; color: #1F232A; }
.dc-sub { font-size: 16px; color: #4A505C; margin: 0; }
.dc-meta { font-size: 12.5px; color: #7A8088; margin: 6px 0 0; }
.dc-page h1, .dc-page h2, .dc-page h3 { font-family: Georgia, "Caladea", serif; color: #1F232A; }
.dc-page h2 { font-size: 21px; margin: 26px 0 8px; color: var(--acc); }
.dc-page h3 { font-size: 17px; margin: 20px 0 6px; }
.dc-page a { color: var(--acc); }
.dc-page table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: 13px; }
.dc-page th { background: var(--acc); color: #fff; text-align: left; padding: 6px 9px; }
.dc-page td { padding: 6px 9px; border-bottom: 1px solid #E6E9EA; }
.dc-page tr:nth-child(even) td { background: #F5F7F7; }
.dc-page blockquote { border-left: 3px solid var(--acc); margin: 14px 0; padding: 2px 0 2px 16px; color: #393E50; font-style: italic; }
.dc-page img { max-width: 100%; border-radius: 4px; }
.dc-page pre { background: #F5F7F7; color: #1F232A; padding: 12px; border-radius: 6px; overflow: auto; font-size: 12.5px; }
.dc-chart { margin: 16px 0 20px; }
.dc-chart figcaption { font-weight: 700; font-size: 13.5px; margin-bottom: 6px; color: #1F232A; }
.dc-chart svg { width: 100%; height: auto; max-height: 340px; }
.dc-src { font-size: 11.5px; font-style: italic; color: #7A8088; margin-top: 4px; }
.dc-pb { border: 0; border-top: 1px dashed #D5D9DD; margin: 30px -72px; }
.sh-scroll { background: var(--surface); padding: 16px; }
.sh-title { margin: 0 0 4px; font-family: Georgia, serif; }
.sh-wrap { overflow: auto; border: 1px solid var(--border-strong); border-radius: 6px; background: #fff; margin-top: 10px; }
.sh-table { border-collapse: collapse; font-size: 12.5px; color: #1F232A; min-width: 100%; }
.sh-table th { background: var(--acc); color: #fff; padding: 6px 10px; text-align: left; white-space: nowrap; position: sticky; top: 0; }
.sh-table td { padding: 5px 10px; border-bottom: 1px solid #E6E9EA; border-right: 1px solid #EEF1F2; white-space: nowrap; }
.sh-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sh-table .sh-rn { background: #F5F7F7; color: #7A8088; text-align: center; font-size: 11px; width: 34px; }
.sh-table th.sh-rn { background: color-mix(in srgb, var(--acc) 85%, #000); }
.sh-table tbody tr:nth-child(even) td:not(.sh-rn) { background: #FAFBFB; }
.sh-tot td { font-weight: 700; border-top: 2px solid var(--acc); background: #F5F7F7 !important; }
.sh-f { color: #7A8088; font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; }
.sh-chart { max-width: 760px; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 12px; }
.sh-notes { margin: 10px 0 0; padding-left: 18px; }
.sh-hint { margin-top: 12px; }
.sh-tabs { display: flex; gap: 2px; padding: 0 12px; background: var(--surface-2); border-top: 1px solid var(--border); overflow-x: auto; flex: none; }
.sh-tabs button { border: 0; background: none; padding: 8px 14px; font-size: 12.5px; color: var(--muted); cursor: pointer; border-top: 2px solid transparent; white-space: nowrap; }
.sh-tabs button.on { background: var(--surface); color: var(--text); border-top-color: var(--accent); font-weight: 600; }
@media (max-width: 700px) {
  .dc-page { padding: 32px 22px 40px; font-size: 14px; }
  .dc-pb { margin: 24px -22px; }
  .dk-thumb { flex-basis: 110px; }
  .dk-bar strong { max-width: 100%; flex: 1 1 100%; }
  .dk-bar > .small.muted { display: none; }
}
.dc-page h1 { font-size: 25px; margin: 26px 0 10px; }
.sh-chart svg { max-height: 300px; }
.dc-chart svg text { font-size: 19px; }

/* ---------- Auto routing ---------- */
.auto-hint { font-size: 12px; color: var(--faint); display: inline-flex; align-items: center; gap: 6px; padding-left: 4px; }
.auto-hint::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .7; }
.meta-line .pill.image { background: rgba(122, 90, 160, .12); color: #7a5aa0; }
.meta-line .pill.video, .meta-line .pill.build { background: var(--accent-soft); color: var(--accent); }
.history .item .mode-dot.image { background: #7a5aa0; }
.history .item .mode-dot.video { background: var(--danger); }
.chat-img { margin: 6px 0 4px; max-width: min(520px, 100%); border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.chat-img img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.chat-img-cap { margin: 2px 0 6px; max-width: 520px; }
.msg-actions a.btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.msg-actions a.btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
@media (max-width: 560px) { .auto-hint { display: none; } }

/* ---------- Brand wordmark ---------- */
.brand-logo { display: inline-flex; color: var(--text); padding: 2px 2px; border-radius: 6px; }
.brand-logo .wordmark { height: 24px; width: auto; display: block; }
.brand-logo:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.brand { padding: 8px 8px 16px; }
.wordmark path { stroke: none !important; }
.wordmark .wm-leda { fill: var(--wm-leda) !important; }
.wordmark .wm-studio { fill: var(--wm-studio) !important; }
.wordmark .wm-dot { fill: var(--gold-mark) !important; }

/* ===== v3: accounts, landing, Option A canvas ===== */
.guest-brand { display: none; color: var(--text); }
.guest-brand .wordmark { height: 24px; width: auto; display: block; }

.guest-only { display: none; }
body.guest .sidebar, body.guest .scrim, body.guest #openSidebar { display: none !important; }
body.guest .app { grid-template-columns: 1fr; }
body.guest .guest-brand { display: inline-flex; }
body.guest .guest-only { display: inline-flex; }
body.guest .topbar { border-bottom: 0; height: 64px; padding: 0 clamp(16px, 4vw, 40px); }
.landing { padding-top: 14vh; }
.landing h1 { font-size: 40px; }
.land-auth { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 26px; min-height: 48px; }
.gbtn { min-height: 44px; display: flex; justify-content: center; }
.g-fallback { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--border-strong); border-radius: 999px; padding: 10px 22px; color: var(--muted); font-size: 14px; background: var(--surface); }
.land-pts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 30px; color: var(--muted); font-size: 13.5px; }
.land-pts span { display: inline-flex; align-items: center; gap: 7px; }
.land-pts svg { width: 16px; height: 16px; color: var(--accent); }
.auth-modal { position: fixed; inset: 0; z-index: 90; background: rgba(10, 11, 15, .5); display: grid; place-items: center; padding: 20px; animation: rise .2s ease-out; }
.auth-card { position: relative; width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 34px 30px 24px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,.3); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.auth-card h2 { font-family: "neulis-sans", "Lexend", system-ui, sans-serif; font-weight: 400; font-size: 26px; margin: 6px 0 0; }
.auth-card p { margin: 0; }
.auth-card .tiny { font-size: 11.5px; margin-top: 6px; }
.auth-logo .wordmark { height: 26px; width: auto; }

.auth-x { position: absolute; top: 10px; right: 10px; }
.user-row { position: relative; }
.user-btn { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 6px; border-radius: 10px; cursor: pointer; text-align: left; }
.user-btn:hover { background: var(--surface-2); }
.user-btn img, .user-btn .av { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.user-btn .av { display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 600; font-size: 13px; }
.user-btn .un { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; font-size: 13.5px; font-weight: 500; }
.user-btn .un span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 20; display: flex; flex-direction: column; }
.user-menu[hidden] { display: none; }
.user-menu a, .user-menu button { text-align: left; padding: 8px 10px; border-radius: 8px; border: 0; background: none; cursor: pointer; font-size: 14px; }
.user-menu a:hover, .user-menu button:hover { background: var(--surface-2); }

/* Option A: main area splits into chat + canvas */
.main-body { flex: 1; display: flex; min-height: 0; min-width: 0; }
.main-body .view { flex: 1; min-width: 0; }
.canvas { display: none; }
.app.has-canvas .view { flex: 0 0 440px; border-right: 1px solid var(--border); }
.app.has-canvas .canvas { display: flex; flex-direction: column; flex: 1; min-width: 0; background: var(--surface-2); }
.app.has-canvas .thread { padding: 22px 22px 30px; }
.app.has-canvas .msg.user .bubble { font-size: 18px; }
.app.has-canvas .dock { padding: 0 14px 14px; }
.app.has-canvas .chat-img { max-width: 220px; cursor: zoom-in; }
.cv-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--border); min-height: 52px; }
.cv-bar .spacer { flex: 1; }
.cv-tabs { display: flex; gap: 4px; overflow-x: auto; min-width: 0; }
.cv-tab { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 6px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.cv-tab svg { width: 16px; height: 16px; }
.cv-tab.on { background: var(--surface-2); color: var(--text); }
.cv-stage { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; align-items: center; padding: 28px 24px; }
.cv-img { margin: 0; max-width: min(100%, 860px); }
.cv-img img { display: block; max-width: 100%; max-height: calc(100dvh - 230px); border-radius: 10px; box-shadow: 0 14px 40px -14px rgba(0,0,0,.35); cursor: zoom-in; }
.cv-cap { color: var(--muted); font-size: 13.5px; max-width: 720px; text-align: center; margin: 14px 0 2px; }
.cv-tip { color: var(--faint); font-size: 12.5px; margin: 0; }
.cv-frame { flex: 1; width: 100%; display: flex; }
.cv-frame iframe { flex: 1; border: 0; background: #fff; border-radius: 10px; box-shadow: 0 10px 30px -12px rgba(0,0,0,.3); min-height: 480px; }
@media (max-width: 1100px) { .app.has-canvas .view { flex-basis: 380px; } }
@media (max-width: 860px) {
  .app.has-canvas .view { flex: 1; border-right: 0; }
  .app.has-canvas .canvas { position: fixed; inset: 0; z-index: 60; }
  .landing { padding-top: 8vh; }
  .landing h1 { font-size: 30px; }
}

/* Option A styling for Computer tasks */
.cws { grid-template-columns: minmax(340px, 440px) 1fr; }
.cws-steps-scroll { padding: 22px 22px 10px; gap: 10px; }
.step.user-step { font-family: "neulis-sans", "Lexend", system-ui, sans-serif; font-weight: 400; font-size: 17px; line-height: 1.4; padding: 11px 15px; }
.step.tool, .step.file { border: 0; background: none; padding: 2px 4px; color: var(--muted); }
.step.file .st-ic, .step .st-ic { color: var(--accent); }
.cws-follow { padding: 10px 16px 16px; }
.cws-follow .composer { border-radius: 16px; }
.pv-chips { background: var(--surface); gap: 4px; padding: 6px 12px; }
.pv-chip { border: 0; border-radius: 8px; padding: 6px 12px; font-size: 13.5px; font-weight: 500; color: var(--muted); background: none; }
.pv-chip .k { font-size: 10.5px; }
.pv-chip.on { background: var(--surface-2); color: var(--text); border: 0; }
.pv-chip.on .k { color: var(--accent); }
.lib-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 30px; }
.lib-imgs figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.lib-imgs img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; cursor: zoom-in; }
.lib-imgs figcaption { font-size: 12px; color: var(--muted); padding: 7px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.library .c-section-head { margin-top: 22px; }
.library h3 { margin: 0; }
.app.has-canvas .chat-img-cap, .app.has-canvas .chat-img ~ .msg-actions { display: none; }
/* landing: top-left logo, slightly larger */
body.guest .topbar { height: 76px; }
body.guest .guest-brand .wordmark { height: 30px; }
body.guest #signInTop { margin-left: auto; }
@media (max-width: 860px) { body.guest .topbar { height: 64px; } body.guest .guest-brand .wordmark { height: 24px; } }
/* calmer landing */
.landing { padding-top: 18vh; max-width: 680px; }
.landing .sub { font-size: 16px; margin-top: 10px; }
.landing .composer { margin-top: 30px; }
.landing .auto-hint { display: none; }
.landing .land-auth { margin-top: 22px; }
@media (max-width: 860px) { .landing { padding-top: 12vh; } }

/* ---- attachments ---- */
.att-btn { width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; margin-left: -6px; transition: background .15s, color .15s; flex: none; }
.att-btn:hover { background: var(--surface-2); color: var(--text); }
.att-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.composer.dragging { border-color: var(--accent); border-style: dashed; background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.att-tray { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 8px; }
.att-tray[hidden] { display: none; }
.att-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin: 0 0 8px auto; max-width: 85%; }
.att-chip { position: relative; display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 12px; color: var(--text); text-decoration: none; max-width: 240px; }
.att-chip.file { padding: 7px 30px 7px 8px; min-height: 48px; }
.att-list .att-chip.file { padding-right: 12px; background: var(--surface); }
.att-list a.att-chip.file:hover { border-color: var(--border-strong); }
.att-chip.img { width: 60px; height: 60px; overflow: hidden; padding: 0; }
.att-list .att-chip.img { width: auto; height: 120px; max-width: 220px; }
.att-chip.img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-list .att-chip.img img { width: auto; max-width: 220px; cursor: zoom-in; }
.att-chip.busy img { opacity: .55; }
.att-ic { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: var(--surface); display: inline-flex; align-items: center; justify-content: center; flex: none; }
[data-theme="dark"] .att-ic { color: #15171E; }
.att-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.att-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.att-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-sub { font-size: 11.5px; color: var(--muted); }
.att-rm { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.att-chip.file .att-rm { top: 50%; transform: translateY(-50%); background: transparent; color: var(--muted); }
.att-chip.file .att-rm:hover { color: var(--text); background: var(--surface); }
.att-rm svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.att-spin { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: attspin .8s linear infinite; }
.att-chip.img .att-spin { position: absolute; top: 50%; left: 50%; margin: -9px 0 0 -9px; border-color: rgba(0,0,0,.2); border-top-color: var(--accent); }
@keyframes attspin { to { transform: rotate(360deg); } }
.cws-steps .att-list { max-width: 92%; margin: 6px 0 0 auto; }
.cws-steps .att-list .att-chip.img { height: 84px; }
@media (max-width: 640px) { .att-list .att-chip.img { height: 96px; } .att-chip { max-width: 200px; } }
.msg.user.vision .bubble { font-family: inherit; font-size: 16px; font-weight: 500; background: var(--surface-2); padding: 10px 14px; border-radius: 14px 14px 4px 14px; width: fit-content; max-width: 85%; margin-left: auto; line-height: 1.5; letter-spacing: 0; }

/* ---------- Pro mode ---------- */
.pro-only { display: none !important; }
body.pro .nav a.pro-only { display: flex !important; }
body.guest .user-only { display: none !important; }
.ui-toggle { display: inline-flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 2px; margin-right: 4px; }
.ui-toggle button { border: 0; background: none; font: inherit; font-size: 12.5px; padding: 4px 12px; border-radius: 999px; color: var(--muted); cursor: pointer; }
.ui-toggle button.on { background: var(--accent); color: #fff; font-weight: 500; }
[data-theme="dark"] .ui-toggle button.on { color: #15171E; }
.send { flex: none; }
.chips { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; padding: 3px 6px 3px 8px; font: inherit; font-size: 12px; cursor: pointer; }
.chip .ck { color: var(--muted); }
.chip svg { width: 13px; height: 13px; fill: none; stroke: var(--muted); stroke-width: 2; }
.chip:hover { border-color: var(--border-strong); }
.chip.on { border-color: color-mix(in srgb, var(--gold-mark) 55%, var(--border)); background: var(--gold-soft); }
.chip.on .ck { color: var(--gold); }
.chip-menu { position: fixed; z-index: 80; min-width: 220px; max-width: 320px; max-height: 340px; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(21,23,30,.16); padding: 5px; }
.chip-menu button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; border: 0; background: none; font: inherit; color: var(--text); padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.chip-menu button:hover { background: var(--surface-2); }
.chip-menu button.on { background: var(--accent-soft); }
.chip-menu button.on .cl::after { content: " ✓"; color: var(--gold); }
.chip-menu .cl { font-size: 13.5px; font-weight: 500; }
.chip-menu .cs { font-size: 12px; color: var(--muted); line-height: 1.35; }
.chip-menu button.link { border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; margin-top: 4px; }
.chip-menu button.link .cl { color: var(--gold); font-weight: 500; }
.home.pro-home { max-width: 860px; padding-top: 9vh; }
.pro-home h1 { margin-bottom: 22px; }
.pro-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.pcard { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pch { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; }
.pch a { color: var(--gold); font-size: 12.5px; font-weight: 500; }
.pa { display: flex; flex-direction: column; text-align: left; border: 0; background: none; padding: 4px 6px; margin: 0 -6px; border-radius: 8px; font: inherit; color: var(--text); cursor: pointer; }
.pa:hover { background: var(--surface-2); }
.pa-n { font-size: 13.5px; font-weight: 500; }
.pa-s, .pfoot, .pempty { font-size: 12px; color: var(--muted); line-height: 1.4; margin: 0; }
.pfoot { margin-top: auto; }
.pchips { display: flex; flex-wrap: wrap; gap: 5px; }
.pchip { border: 1px solid var(--border); background: var(--bg); border-radius: 7px; padding: 3px 8px; font: inherit; font-size: 12px; color: var(--text); cursor: pointer; }
.pchip:hover { border-color: var(--gold-mark); }
.pr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 4px 0; color: var(--text); font-size: 13px; }
.pr-t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-m { font-size: 12px; color: var(--muted); }
.pr-m .badge { margin: 0; vertical-align: 0; }
.pr-bar { grid-column: 1 / -1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.pr-bar i { display: block; height: 100%; width: 40%; background: var(--gold-mark); border-radius: 2px; animation: prslide 1.6s ease-in-out infinite; }
@keyframes prslide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@media (max-width: 860px) { .pro-cards { grid-template-columns: 1fr; } .home.pro-home { padding-top: 4vh; } }
.ui-seg { margin-top: 4px; }

/* skills */
.sk-group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: -2px 0 -2px; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sk-card { display: flex; flex-direction: column; gap: 8px; }
.sk-top { display: flex; gap: 10px; align-items: flex-start; }
.sk-ic { flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--gold-soft); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; }
.sk-ic svg, .step .st-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.sk-h { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sk-h strong { font-size: 14.5px; }
.pin { flex: none; border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 3px 10px; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; }
.pin.on { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="dark"] .pin.on { color: #15171E; }
.sk-d { margin: 0; color: var(--text); line-height: 1.45; }
.sk-ex { display: flex; gap: 7px; align-items: flex-start; text-align: left; border: 1px dashed var(--border-strong); background: none; border-radius: 9px; padding: 6px 9px; font: inherit; font-size: 12.5px; color: var(--text); cursor: pointer; }
.sk-ex svg { flex: none; width: 14px; height: 14px; margin-top: 2px; fill: none; stroke: var(--gold); stroke-width: 1.7; }
.sk-ex:hover { border-color: var(--gold-mark); background: var(--gold-soft); }
.sk-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); margin-top: auto; }

/* agents + brand forms */
.ag-wrap { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; margin-top: 18px; align-items: start; }
.ag-list { display: flex; flex-direction: column; gap: 8px; }
.ag-item { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; color: var(--text); }
.ag-item.on { border-color: var(--gold-mark); box-shadow: 0 0 0 1px var(--gold-mark) inset; }
.ag-form, .bk-form { display: flex; flex-direction: column; gap: 14px; }
.ag-form label, .bk-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; }
.ag-form input[type=text], .ag-form input:not([type]), .ag-form textarea, .bk-form input:not([type=color]):not([type=checkbox]), .bk-form textarea, .bk-form select { font: inherit; font-weight: 400; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; width: 100%; box-sizing: border-box; }
.ag-form textarea, .bk-form textarea { resize: vertical; }
.ag-form input:focus, .ag-form textarea:focus, .bk-form input:focus, .bk-form textarea:focus, .bk-form select:focus { outline: 2px solid color-mix(in srgb, var(--gold-mark) 50%, transparent); outline-offset: 0; }
.ag-form fieldset { border: 0; padding: 0; margin: 0; }
.ag-form legend { font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.ag-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.ag-sk { flex-direction: row !important; align-items: center; gap: 6px !important; border: 1px solid var(--border); border-radius: 8px; padding: 5px 9px; font-weight: 400 !important; cursor: pointer; }
.ag-sk:has(input:checked) { border-color: var(--gold-mark); background: var(--gold-soft); }
.ag-actions { display: flex; gap: 8px; align-items: center; }
.ag-hint { min-height: 120px; justify-content: center; align-items: center; }
@media (max-width: 860px) { .ag-wrap, .bk-wrap { grid-template-columns: 1fr !important; } }
.bk-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; align-items: start; }
.bk-colors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bk-cin { display: flex; gap: 6px; align-items: center; }
.bk-cin input[type=color] { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; padding: 2px; background: var(--surface); flex: none; cursor: pointer; }
.bk-cin input[type=text] { font-family: ui-monospace, monospace !important; font-size: 12.5px !important; min-width: 0; }
@media (max-width: 600px) { .bk-colors { grid-template-columns: 1fr 1fr; } }
.bk-toggle { flex-direction: row !important; align-items: center; gap: 8px !important; align-self: end; padding-bottom: 8px; font-weight: 400 !important; }
.bk-up { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
.bk-up-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bk { display: flex; flex-direction: column; gap: 8px; }
.bk-logo { height: 64px; border: 1px solid var(--border); border-radius: 10px; background: repeating-conic-gradient(var(--bg) 0 25%, var(--surface) 0 50%) 0 0 / 14px 14px; display: flex; align-items: center; justify-content: center; padding: 8px; }
.bk-logo.sm { width: 96px; height: 48px; }
.bk.compact .bk-logo { height: 48px; }
.bk-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bk-meta { display: flex; flex-direction: column; }
.bk-sw { display: flex; gap: 6px; }
.bk-sw span { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); }
.bk-tone { display: flex; flex-wrap: wrap; gap: 4px; }
.bk-tone span { font-size: 11.5px; background: var(--surface-2); border-radius: 99px; padding: 2px 8px; color: var(--muted); }

/* computer steps for skills */
.step.skills { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 2px 2px; }
.sk-chip { font-size: 11.5px; padding: 2px 9px; border-radius: 99px; background: var(--gold-soft); color: var(--gold); font-weight: 500; }
.st-sk { margin-left: 6px; font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 99px; padding: 0 6px; }
.st-d { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.step.tool.err .st-d { color: var(--danger); }
.step.thumb.svg img { object-fit: contain; background: #fff; padding: 6px; box-sizing: border-box; }
.step.thumb video { width: 100%; max-height: 180px; border-radius: 10px; border: 1px solid var(--border); display: block; background: #000; }

/* result viewer */
.vw-body { max-width: 980px; margin: 0 auto; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.vw-media { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; justify-content: center; }
.vw-media a { display: block; width: 100%; }
.vw-media img { display: block; width: 100%; height: auto; max-height: 62vh; object-fit: contain; }
.vw-media.drawing img { padding: 10px; box-sizing: border-box; }
.vw-media video { width: 100%; max-height: 62vh; background: #000; display: block; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.kv { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; border-top: 3px solid var(--gold-mark); }
.kv-l { font-size: 12px; color: var(--muted); }
.kv-v { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kv-s { font-size: 12px; color: var(--muted); }
.vw-sec h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.sh-table.sens th, .sh-table.sens td { text-align: center; }
.sh-table.sens tbody th { background: var(--surface-2); color: var(--text); font-weight: 600; position: static; }
.sh-table.sens td.base { background: var(--gold-soft); font-weight: 600; }
.vw-layers { display: flex; flex-wrap: wrap; gap: 5px; }
.vw-layers span { font-size: 12px; border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; }
.vw-note { font-size: 13px; color: var(--muted); margin: 0; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; }
.vw-dls { display: flex; gap: 6px; flex-wrap: wrap; }

/* creator panel */
.cr-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 8px 14px; border-bottom: 1px solid var(--border); flex: none; scrollbar-width: thin; }
.cr-tabs button { flex: none; white-space: nowrap; border: 1px solid var(--border); background: var(--surface); border-radius: 99px; padding: 5px 12px; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; position: relative; }
.cr-tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="dark"] .cr-tabs button.on { color: #15171E; }
.cr-dot { position: absolute; top: 3px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-mark); }
.cr-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 18px; padding: 18px; max-width: 1080px; margin: 0 auto; align-items: start; }
.cr-stage { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cr-feed { width: min(100%, 400px); background: #fff; color: #1F232A; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.cr-fh { display: flex; align-items: center; gap: 9px; padding: 9px 12px; }
.cr-av { width: 30px; height: 30px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex: none; }
.cr-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; font-size: 13px; }
.cr-who span { color: #6B7178; font-size: 12px; }
.cr-net { font-size: 11px; font-weight: 700; color: #393E50; border: 1px solid #E6E9EA; border-radius: 6px; padding: 2px 6px; }
.cr-media { aspect-ratio: var(--r); background: #F5F7F7; max-height: 64vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cr-media img, .cr-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cr-noimg { color: #6B7178; font-size: 13px; padding: 30px; }
.cr-cap { padding: 10px 12px 12px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.cr-more { color: #6B7178; }
.cr-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cr-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.cr-bh { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; }
.cr-bh a { color: var(--gold); }
.cr-count { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--muted); }
.cr-count.bad, .cr-tags em.bad { color: var(--danger); font-weight: 600; }
.cr-meter { position: relative; height: 6px; background: var(--border); border-radius: 3px; }
.cr-meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 3px; }
.cr-meter b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--gold-mark); border-radius: 1px; }
.cr-text { font: inherit; font-size: 13px; line-height: 1.45; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; resize: vertical; width: 100%; box-sizing: border-box; }
.cr-tags { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cr-tags span { font-size: 12px; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 1px 7px; }
.cr-tags em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: auto; }
.cr-warn { margin: 0; padding: 8px 10px 8px 26px; background: var(--gold-soft); border-radius: 9px; font-size: 12.5px; color: var(--text); }
.cr-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-vars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cr-vars a { border-radius: 8px; overflow: hidden; border: 2px solid transparent; aspect-ratio: 4 / 5; }
.cr-vars a.on { border-color: var(--gold-mark); }
.cr-vars img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 1100px) { .cr-main { grid-template-columns: 1fr; } }

.cr-nocap { padding: 12px; border: 1px dashed var(--line); border-radius: 10px; margin: 6px 0 10px; }

/* ---- quick fixes: chips note, always-on skills, schedules ---- */
.chip-menu button.note { cursor: default; border-top: 1px solid var(--border); border-radius: 0; margin-top: 4px; }
.chip-menu button.note:hover { background: none; }
.chip-menu button.note .cl { font-size: 12px; color: var(--muted); font-weight: 400; }
.sk-always { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.sk-always strong { color: var(--text); font-weight: 600; }
.sk-always input { accent-color: var(--gold-mark); width: 15px; height: 15px; margin: 0; }
.pchip.always { border-color: var(--gold-mark); background: var(--accent-soft); color: var(--text); }
.sc-form { margin-bottom: 16px; }
.sc-row { display: flex; gap: 12px; flex-wrap: wrap; }
.sc-row .fl { flex: 1 1 150px; }
.sc-acts { display: flex; justify-content: flex-end; gap: 8px; }
#scList { display: flex; flex-direction: column; gap: 10px; }
.sc-item { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; padding: 14px 16px; }
.sc-item.off { opacity: .65; }
.sc-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.sc-p { color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-top: 2px; }
.sc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); margin-top: 4px; }
.sc-meta b { color: var(--text); font-weight: 600; }
.sc-meta a { color: var(--gold); }
.sc-side { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.sc-side .btn.ghost { border-color: transparent; background: none; }
.sc-empty { padding: 22px; text-align: center; }
.sc-empty p { margin: 6px 0 0; }
.sw { position: relative; display: inline-block; width: 34px; height: 20px; margin-right: 4px; cursor: pointer; }
.sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.sw i { position: absolute; inset: 0; background: var(--border); border-radius: 99px; transition: background .15s; }
.sw i::after { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.sw input:checked + i { background: var(--gold-mark); }
.sw input:checked + i::after { transform: translateX(14px); }
.sw input:focus-visible + i { outline: 2px solid var(--gold-mark); outline-offset: 2px; }
@media (max-width: 640px) {
  .sc-item { flex-direction: column; }
  .sc-side { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}

/* ---- Landing capability icons ---- */
body.guest .view { position: relative; overflow-x: hidden; }
.landing { position: relative; z-index: 1; }
.land-orbit { position: relative; z-index: 1; display: flex; justify-content: center; gap: clamp(8px, 1.4vw, 18px); margin: 9vh auto 40px; padding: 0 16px; max-width: 980px; }
.orb { position: relative; flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line, #E6E9EA); background: var(--card, #FFFFFF); color: #393E50; display: grid; place-items: center; cursor: pointer;
  transform: translateY(calc(var(--i) * var(--i) * 7px)); box-shadow: 0 10px 26px rgba(31,35,42,.08); transition: box-shadow .2s, border-color .2s; }
.orb svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.orb.g { background: #C5A059; border-color: #C5A059; color: #15171E; box-shadow: 0 12px 30px rgba(197,160,89,.35); }
.orb span { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); font-size: 12px; color: #6B7178; white-space: nowrap; opacity: 0; transition: opacity .2s; pointer-events: none; }
.orb:hover, .orb:focus-visible { border-color: #C5A059; box-shadow: 0 14px 32px rgba(197,160,89,.25); outline: none; }
.orb:hover span, .orb:focus-visible span { opacity: 1; }
[data-theme="dark"] .orb { background: #1F232A; border-color: #393E50; color: #E6E9EA; box-shadow: 0 10px 26px rgba(0,0,0,.35); }
[data-theme="dark"] .orb.g { background: #C5A059; color: #15171E; }
[data-theme="dark"] .orb span { color: #A9AEB4; }
@keyframes orbIn { from { opacity: 0; translate: 0 40px; scale: .6; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes orbFloat { 0%, 100% { margin-top: 0; } 50% { margin-top: -8px; } }
@media (max-width: 860px) { .land-orbit { flex-wrap: wrap; max-width: 380px; margin-top: 6vh; row-gap: 26px; } .orb { width: 56px; height: 56px; transform: none; order: 1; } .orb:nth-child(-n+2), .orb.g { order: 0; } }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } }

/* ---- Landing background artwork ---- */
.land-bg { position: absolute; left: 0; top: 0; right: 0; height: max(100%, calc(100vh - 76px)); min-height: 640px; z-index: 0; overflow: hidden; pointer-events: none; }
.land-bg i { position: absolute; inset: 0; background: url("bg-contours-light.svg") center 78% / cover no-repeat; }
.land-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(245,247,247,.85) 0%, rgba(245,247,247,.35) 38%, rgba(245,247,247,0) 60%); }
[data-theme="dark"] .land-bg i { background-image: url("bg-contours-dark.svg"); }
[data-theme="dark"] .land-bg::after { background: linear-gradient(180deg, rgba(21,23,30,.75) 0%, rgba(21,23,30,.25) 40%, rgba(21,23,30,0) 62%); }
@keyframes bgDrift { from { transform: scale(1.02); } to { transform: scale(1.08); } }
@media (max-width: 860px) { .land-bg i { background-position: 42% 100%; background-size: auto 78%; } [data-theme="dark"] .land-bg { background: #15171E; } .land-bg { background: #F5F7F7; } }
@media (prefers-reduced-motion: reduce) { .land-bg i { animation: none; } }
.land-bg i { opacity: 1; } [data-theme="dark"] .land-bg i { opacity: 1; }

/* ---- Signed-in background artwork (matches landing) ---- */
.main-body { position: relative; }
.main-body > .view, .main-body > .canvas { position: relative; z-index: 1; }
.app-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; display: none; }
body.bg-hero:not(.guest) .app-bg, body.bg-soft:not(.guest) .app-bg { display: block; }
.app-bg i { position: absolute; inset: 0; background: url("bg-contours-light.svg") center 78% / cover no-repeat; opacity: 1; }
[data-theme="dark"] .app-bg i { background-image: url("bg-contours-dark.svg"); opacity: 1; }
.app-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(245,247,247,.85) 0%, rgba(245,247,247,.35) 38%, rgba(245,247,247,0) 60%); }
[data-theme="dark"] .app-bg::after { background: linear-gradient(180deg, rgba(21,23,30,.75) 0%, rgba(21,23,30,.25) 40%, rgba(21,23,30,0) 62%); }
body.bg-soft .app-bg i { background-position: center bottom; background-size: 100% auto; opacity: .3; }
[data-theme="dark"] body.bg-soft .app-bg i, body.bg-soft[data-theme="dark"] .app-bg i { opacity: .45; }
body.bg-soft .app-bg::after { background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 45%, rgba(0,0,0,0) 85%); }
.home + .land-orbit { margin-top: 7vh; }
@media (max-width: 860px) { .app-bg i { background-position: 42% 100%; background-size: auto 78%; } body.bg-soft .app-bg i { background-size: auto 45%; } }

/* ---- Sign-in, new design (artwork band, frosted backdrop, phone sheet) ---- */
.auth-modal { background: rgba(245,247,247,.55); -webkit-backdrop-filter: blur(14px) saturate(1.1); backdrop-filter: blur(14px) saturate(1.1); }
[data-theme="dark"] .auth-modal { background: rgba(15,17,23,.62); }
.auth-card { overflow: hidden; border-radius: 24px; padding: 30px 32px 22px; gap: 12px; box-shadow: 0 30px 80px rgba(31,35,42,.18), 0 2px 6px rgba(31,35,42,.06); isolation: isolate; }
[data-theme="dark"] .auth-card { box-shadow: 0 30px 80px rgba(0,0,0,.5); border-color: #2A2E38; }
.auth-card::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 150px; z-index: -1; background: url("bg-contours-light.svg") center 100% / 190% auto no-repeat; opacity: .6;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 70%); mask-image: linear-gradient(180deg, transparent 0%, #000 70%); }
[data-theme="dark"] .auth-card::before { background-image: url("bg-contours-dark.svg"); opacity: .55; }
.auth-logo { margin-top: 4px; }
.auth-logo .wordmark { height: 28px; }
.auth-card h2 { font-size: 28px; letter-spacing: -0.015em; margin-top: 10px; }
.auth-card > p.muted:not(.tiny) { max-width: 300px; line-height: 1.5; }
.auth-card .gbtn { margin-top: 10px; min-height: 44px; display: flex; justify-content: center; }
.auth-card .tiny { margin-top: 26px; position: relative; }
@media (max-width: 560px) {
  .auth-modal { place-items: end center; padding: 0; }
  .auth-card { width: 100%; border-radius: 26px 26px 0 0; border-bottom: 0; padding: 30px 24px calc(22px + env(safe-area-inset-bottom)); animation: sheetUp .28s cubic-bezier(.2,.8,.2,1); }
  .auth-card::after { content: ""; position: absolute; top: 9px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 2px; background: var(--border); }
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .auth-card { animation: none; } }

/* ---- Legal pages ---- */
.legal { max-width: 760px; }
.legal-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); margin-bottom: 26px; }
.legal-tabs a { padding: 6px 14px; border-radius: 999px; font-size: 13px; color: var(--muted); text-decoration: none; }
.legal-tabs a.on { background: var(--text, #1F232A); color: var(--bg); }
[data-theme="dark"] .legal-tabs a.on { background: #E6E9EA; color: #15171E; }
.legal h1 { font-family: "neulis-sans", "Lexend", system-ui, sans-serif; font-weight: 400; font-size: 34px; letter-spacing: -0.015em; margin: 0 0 6px; }
.legal-date { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.legal-draft { border: 1px solid rgba(197,160,89,.45); background: rgba(197,160,89,.1); color: #8A6A2F; border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 22px; }
[data-theme="dark"] .legal-draft { color: #DEC08A; }
.legal-body { font-size: 15px; line-height: 1.7; }
.legal-body h3 { font-size: 17px; font-weight: 600; margin: 30px 0 8px; }
.legal-body p { margin: 0 0 12px; }
.legal-body ul { margin: 0 0 12px; padding-left: 20px; }
.legal-body li { margin: 4px 0; }
.legal-body a, .auth-card .tiny a, .page .lead a, .page .small a { color: inherit; text-decoration: underline; text-decoration-color: #C5A059; text-underline-offset: 3px; }
.legal-body table { margin: 6px 0 14px; width: 100%; }
.todo { background: rgba(197,160,89,.22); border-radius: 4px; padding: 0 4px; font-weight: 500; }
.legal-foot, .land-foot { display: flex; gap: 18px; justify-content: center; padding: 28px 0 8px; font-size: 13px; }
.legal-foot a, .land-foot a { color: var(--muted); text-decoration: none; }
.legal-foot a:hover, .land-foot a:hover { color: var(--text, #1F232A); text-decoration: underline; }
.land-foot { position: relative; z-index: 1; padding: 8px 0 22px; margin-top: 170px; }
@media (max-width: 860px) { .land-foot { margin-top: 24px; } }
body.guest .legal { padding-top: 8px; }

/* ---- Plan page fair-use bars ---- */
.fu-row { margin: 12px 0; }
.fu-top { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 6px; }
.fu-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.fu-bar > div { height: 100%; background: #393E50; border-radius: 3px; }
[data-theme="dark"] .fu-bar > div { background: #A9AEB4; }
.fu-bar.hi > div { background: #C5A059; }
.fu-table { margin-bottom: 10px; }

/* Hybrid plan card */
.hybrid-card { margin-top: 14px; }
.hy-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.hy-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.hy-cols h4 { margin: 0; font-size: 13px; font-weight: 600; color: var(--text); }
.hy-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); line-height: 1.5; }
@media (max-width: 760px) { .hy-cols { grid-template-columns: 1fr; } }
/* Google's button iframe draws a white backdrop when the page is in dark color-scheme; match its scheme so it stays transparent */
.gbtn, .gbtn iframe { color-scheme: light; }
.gbtn iframe { background: transparent !important; }

/* ===== Studios ===== */
.my-studios .history-head { padding-top: 14px; }
.my-studio { display: flex; align-items: center; gap: 9px; padding: 6px 12px; border-radius: 8px; color: var(--text); font-size: 13.5px; }
.my-studio:hover { background: var(--surface-2); }
.my-studio .ms-ic { width: 20px; height: 20px; border-radius: 6px; background: #15171E; color: var(--gold-mark); display: grid; place-items: center; flex: none; }
.my-studio .ms-ic svg { width: 11px; height: 11px; }
.my-studio .ms-t { margin-left: auto; font-size: 10.5px; color: var(--gold); background: var(--gold-soft); border-radius: 99px; padding: 1px 7px; }
[data-theme="dark"] .my-studio .ms-ic { background: rgba(197,160,89,.16); }

.stu { position: relative; max-width: 980px; margin: 0 auto; padding: 56px 28px 40px; }
.stu-kick { text-align: center; font-size: 11px; letter-spacing: .16em; color: var(--gold); font-weight: 600; }
.stu-h1 { font-weight: 500; font-size: 36px; letter-spacing: -.02em; text-align: center; margin: 10px 0; }
.stu-sub { text-align: center; color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0 auto 26px; max-width: 600px; }
.stu-comp { max-width: 760px; margin: 0 auto; border-radius: 18px; padding: 14px 14px 10px 16px; transition: border-color .3s; }
.stu-comp:focus-within { border-color: var(--slate, #393E50); }
[data-theme="dark"] .stu-comp:focus-within { border-color: rgba(197,160,89,.5); }
.stu-hint { font-size: 12px; color: var(--muted); }
.stu-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 16px auto 0; max-width: 760px; transition: opacity .3s; }
.stu-chips button { font: inherit; font-size: 12.5px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 7px 13px; cursor: pointer; transition: border-color .15s; }
.stu-chips button:hover { border-color: rgba(197,160,89,.7); }
.stu-sec { display: flex; align-items: baseline; gap: 10px; margin: 30px 2px 12px; font-size: 11px; letter-spacing: .14em; font-weight: 600; color: var(--muted); }
.stu-sec .n { letter-spacing: 0; font-weight: 400; font-size: 12.5px; }
.stu-sec.sug { color: var(--gold); display: none; margin-top: 26px; }
.stu-sec.oth { display: none; }
.stu.q .stu-sec.sug, .stu.q .stu-sec.oth { display: flex; }
.stu.q .stu-sec.all { display: none; }
.stu-none { text-align: center; color: var(--muted); font-size: 13.5px; margin: 22px 0 0; }
.stu-sugs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stc { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 14px 12px; display: flex; flex-direction: column; min-height: 132px; box-shadow: 0 1px 2px rgba(31,35,42,.03); color: var(--text);
  transition: transform .7s cubic-bezier(.22,.8,.24,1), opacity .45s, border-color .4s, box-shadow .4s; will-change: transform; }
.stc-h { display: flex; align-items: center; gap: 10px; }
.stc-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--text); display: grid; place-items: center; flex: none; transition: background .4s, color .4s; }
.stc-ic svg { width: 17px; height: 17px; }
.stc b { font-size: 14px; font-weight: 600; }
.stc-tg { margin-left: auto; font-size: 10.5px; font-weight: 500; border-radius: 99px; padding: 3px 8px; background: var(--surface-2); color: var(--text); white-space: nowrap; display: none; }
.stc-tg.best { background: #15171E; color: var(--gold-mark); }
[data-theme="dark"] .stc-tg.best { background: var(--gold-mark); color: #15171E; }
.stc p { margin: 9px 0 10px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.stc .stc-why { display: none; color: var(--text); opacity: .85; }
.stc-why q { opacity: 1; font-weight: 500; quotes: "\201C" "\201D"; }
.stc-ft { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); min-height: 28px; }
.stc-own { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); font-weight: 500; }
.stc-own svg { width: 13px; height: 13px; }
.stc-used { margin-left: auto; font-size: 11.5px; }
.stc-try { margin-left: auto; padding: 6px 11px; font-size: 12px; border-radius: 9px; background: var(--gold-mark); border-color: var(--gold-mark); color: #15171E; opacity: 0; transition: opacity .2s; }
.stc-try:hover { background: #d1ae6a; }
.stc:hover .stc-try, .stc.hit .stc-try, .stc-try:focus-visible { opacity: 1; }
.stc.own .stc-ic { background: #15171E; color: var(--gold-mark); }
[data-theme="dark"] .stc.own .stc-ic { background: rgba(197,160,89,.16); }
.stc.cre { border-style: dashed; border-color: rgba(197,160,89,.7); background: transparent; }
.stc.cre .stc-ic { background: var(--gold-soft); color: var(--gold); }
.stu.q .stc { opacity: .5; }
.stu.q .stc.hit, .stu.q .stc:hover { opacity: 1; }
.stc.hit { border-color: rgba(197,160,89,.75); box-shadow: 0 0 0 4px rgba(197,160,89,.10), 0 14px 32px rgba(31,35,42,.08); min-height: 150px; }
.stc.hit .stc-ic { background: var(--gold-soft); color: var(--gold); }
.stc.hit.own .stc-ic { background: #15171E; color: var(--gold-mark); }
.stc.hit .stc-tg { display: inline-block; }
.stc.hit .stc-d { display: none; }
.stc.hit .stc-why { display: block; }
.stu-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 26px; font-size: 13px; margin: 28px 0 10px; }
.stu-links a, .stu-links button { display: inline-flex; align-items: center; gap: 7px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.stu-links svg { width: 15px; height: 15px; color: var(--gold-mark); }
.stu-links a:hover, .stu-links button:hover { color: var(--gold); }
@media (max-width: 980px) { .stu-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .stu { padding: 32px 16px; } .stu-h1 { font-size: 28px; } .stu-grid, .stu-sugs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stu-grid, .stu-sugs { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .stc { transition: none; } }

/* composer Studio dock */
.composer { position: relative; }
.sdock { display: flex; align-items: center; gap: 3px; padding: 0 8px 0 10px; margin-right: 2px; border-left: 1px solid var(--border); min-height: 28px; }
.sdock:empty { display: none; }
.sd-i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--faint); transition: color .2s, background .2s; opacity: .75; }
.sd-i:hover { color: var(--text); background: var(--surface-2); opacity: 1; }
.sd-i svg { width: 15px; height: 15px; }
.sd-i.on { color: var(--gold); opacity: 1; }
.sd-pill { display: inline-flex; align-items: center; gap: 7px; height: 30px; border-radius: 99px; padding: 0 5px 0 4px; background: #FBF7EE; border: 1px solid rgba(197,160,89,.6); color: var(--gold); font: inherit; font-size: 12.5px; font-weight: 500; white-space: nowrap; box-shadow: 0 0 0 5px rgba(197,160,89,.1); cursor: pointer; animation: sdIn .4s cubic-bezier(.22,.8,.24,1); }
.sd-pic { width: 22px; height: 22px; border-radius: 50%; background: var(--gold-mark); color: #15171E; display: grid; place-items: center; }
.sd-pic svg { width: 12px; height: 12px; }
.sd-t { font-size: 11.5px; background: var(--surface); border: 1px solid rgba(197,160,89,.5); border-radius: 99px; padding: 2px 8px; }
.sd-pill:hover .sd-t { background: var(--gold-mark); color: #15171E; }
.sd-using { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 8px; border-radius: 99px; background: var(--gold-soft); color: var(--gold); font-size: 12px; font-weight: 500; white-space: nowrap; }
.sd-using svg { width: 13px; height: 13px; }
[data-theme="dark"] .sd-pill { background: rgba(197,160,89,.12); }
@keyframes sdIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
.stip { position: absolute; right: 54px; top: calc(100% + 10px); z-index: 30; background: #15171E; color: #E9EBED; font-size: 12.5px; line-height: 1.45; border-radius: 10px; padding: 10px 12px; width: 320px; max-width: calc(100% - 20px); box-shadow: 0 14px 30px rgba(21,23,30,.25); text-align: left; animation: stipIn .3s ease; }
.stip:before { content: ""; position: absolute; right: 60px; top: -5px; width: 10px; height: 10px; background: inherit; transform: rotate(45deg); }
.stip.up { top: auto; bottom: calc(100% + 10px); }
.stip.up:before { top: auto; bottom: -5px; }
.stip b { color: var(--gold-mark); font-weight: 500; }
.stip q { quotes: "\201C" "\201D"; color: #fff; }
.stip-x { display: block; margin-top: 6px; background: none; border: 0; padding: 0; color: #A9AEB4; font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.stip-x:hover { color: #fff; }
[data-theme="dark"] .stip { background: #2A2E38; border: 1px solid rgba(230,233,234,.1); }
@keyframes stipIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .sd-i { display: none; } .sdock { border-left: 0; padding: 0; } .sd-n { display: none; } }

/* after-answer offer */
.s-after { margin-top: 18px; display: flex; gap: 14px; align-items: center; border: 1px solid rgba(197,160,89,.45); background: linear-gradient(135deg, #FBF7EE, var(--surface) 70%); border-radius: 14px; padding: 14px 16px; animation: stipIn .5s ease; transition: opacity .3s, transform .3s; }
[data-theme="dark"] .s-after { background: linear-gradient(135deg, rgba(197,160,89,.12), var(--surface) 70%); }
.s-after.gone { opacity: 0; transform: translateY(6px); }
.sa-ic { width: 36px; height: 36px; border-radius: 50%; background: var(--gold-mark); color: #15171E; display: grid; place-items: center; flex: none; }
.sa-ic svg { width: 17px; height: 17px; }
.sa-tx { font-size: 13px; line-height: 1.5; color: var(--muted); }
.sa-tx b { color: var(--text); font-weight: 600; display: block; font-size: 13.5px; }
.sa-tx q { color: var(--text); quotes: "\201C" "\201D"; }
.sa-k { font-size: 10.5px; color: var(--gold); letter-spacing: .1em; font-weight: 600; display: block; margin-bottom: 2px; }
.sa-act { margin-left: auto; display: flex; gap: 12px; align-items: center; flex: none; }
.sa-no { background: none; border: 0; font: inherit; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.sa-no:hover { color: var(--text); }
.sa-go { padding: 8px 13px; font-size: 12.5px; background: var(--gold-mark); border-color: var(--gold-mark); color: #15171E; }
.sa-go:hover { background: #d1ae6a; }
.sa-on { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-size: 12.5px; font-weight: 500; }
.sa-on svg { width: 13px; height: 13px; }
@media (max-width: 640px) { .s-after { flex-wrap: wrap; } .sa-act { margin-left: 50px; } }
.meta-line .pill.studio { background: var(--gold-soft); color: var(--gold); }
.stc-ft > span:first-child { white-space: nowrap; }
.stc:not(.hit) .stc-try { display: none; }
.stc:not(.hit):hover .stc-try, .stc:not(.hit):focus-within .stc-try { display: inline-flex; }
@media (max-width: 640px) { .stip { left: 8px; right: 8px; width: auto; max-width: none; } .stip:before { right: 90px; } }
.sdock { border-left: 0; padding: 0 6px 0 0; }
.sd-pill { padding: 0 4px 0 12px; }
.sd-using { padding: 0 12px; }
@media (max-width: 640px) { .sd-n { display: inline; } }

/* ---- Phones: raster contour lines (some phone browsers drop the large vector background) ---- */
@media (max-width: 860px) {
  .land-bg i, .app-bg i { background-image: url("bg-contours-light-m.jpg"); background-position: 42% 100%; background-size: auto 33%; background-repeat: no-repeat; }
  [data-theme="dark"] .land-bg i, [data-theme="dark"] .app-bg i { background-image: url("bg-contours-dark-m.jpg"); }
  body.bg-soft .app-bg i { background-size: auto 24%; opacity: .55; }
  [data-theme="dark"] body.bg-soft .app-bg i, body.bg-soft[data-theme="dark"] .app-bg i { opacity: .7; }
  body.bg-soft .app-bg::after { background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 55%, rgba(0,0,0,0) 78%); }
}
/* Landing without shortcut icons: keep the legal links at the bottom of the screen */
@media (max-width: 860px) { body.guest .land-foot { position: absolute; left: 0; right: 0; bottom: 0; margin-top: 0; } }

/* ---- Single Studio page ---- */
.stc-n { color: inherit; text-decoration: none; font-weight: 600; }
.stc-n:hover { text-decoration: underline; text-underline-offset: 3px; }
.sp { position: relative; max-width: 900px; margin: 0 auto; padding: 28px 28px 56px; }
.sp-back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 13px; margin-bottom: 18px; }
.sp-back svg { width: 16px; height: 16px; }
.sp-back:hover { color: var(--text); }
.sp-head { display: flex; align-items: center; gap: 16px; }
.sp-ic { width: 56px; height: 56px; border-radius: 16px; background: #1F232A; color: #C5A059; display: grid; place-items: center; flex: none; }
.sp-ic svg { width: 28px; height: 28px; }
[data-theme="dark"] .sp-ic { background: #262A34; }
.sp-ht { flex: 1; min-width: 0; }
.sp-ht h1 { font-family: "neulis-sans", "Lexend", system-ui, sans-serif; font-weight: 500; font-size: 30px; letter-spacing: -.02em; margin: 0 0 4px; }
.sp-st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.sp-st.on { color: #8A6A2F; } [data-theme="dark"] .sp-st.on { color: #C5A059; }
.sp-st svg { width: 14px; height: 14px; }
.sp-try { background: #C5A059; color: #1F232A; border-color: #C5A059; font-weight: 600; }
.sp-try:hover { background: #B8934E; }
.sp-blurb { font-size: 17px; margin: 18px 0 4px; color: var(--text); }
.sp-auto { font-size: 14px; color: var(--muted); margin: 0 0 18px; }
.sp .composer { max-width: none; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 30px; }
.sp-chips button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 13px; cursor: pointer; }
.sp-chips button:hover { border-color: #C5A059; }
.sp-sec { display: flex; align-items: baseline; gap: 12px; font-size: 11.5px; letter-spacing: .12em; font-weight: 600; color: #8A6A2F; margin: 0 0 12px; }
[data-theme="dark"] .sp-sec { color: #C5A059; }
.sp-n { letter-spacing: 0; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.sp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 30px; }
.sp-card { text-align: left; display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; font: inherit; color: var(--text); cursor: pointer; transition: border-color .15s, transform .15s; }
.sp-card:hover { border-color: #C5A059; transform: translateY(-1px); }
.sp-k { font-size: 11px; color: #8A6A2F; font-weight: 600; letter-spacing: .08em; }
[data-theme="dark"] .sp-k { color: #C5A059; }
.sp-card b { font-weight: 600; font-size: 15px; }
.sp-ex { font-size: 13px; color: var(--muted); line-height: 1.4; }
.sp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sp-box { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; }
.sp-n2 { margin: -4px 0 10px; font-size: 13px; color: var(--muted); }
.sp-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.sp-checks li { display: flex; gap: 9px; font-size: 14px; line-height: 1.4; }
.sp-checks svg { width: 15px; height: 15px; color: #C5A059; flex: none; margin-top: 2px; }
.sp-rel { display: grid; gap: 8px; }
.sp-rel a { display: flex; gap: 10px; align-items: flex-start; text-decoration: none; color: var(--text); padding: 8px; margin: 0 -8px; border-radius: 10px; }
.sp-rel a:hover { background: var(--bg); }
.sp-ric { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--border); display: grid; place-items: center; flex: none; }
.sp-ric svg { width: 16px; height: 16px; }
.sp-rel b { display: block; font-weight: 600; font-size: 14px; }
.sp-rel span span { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .sp { padding: 18px 16px 40px; } .sp-head { flex-wrap: wrap; } .sp-try { width: 100%; justify-content: center; text-align: center; } .sp-chips button { text-align: left; border-radius: 14px; } .sp-sec { flex-wrap: wrap; gap: 4px 10px; } .sp-ht h1 { font-size: 24px; } .sp-two { grid-template-columns: 1fr; } .sp-grid { grid-template-columns: 1fr 1fr; } }

/* ---- Real Estate Studio: map workspace ---- */
.view.view-map { overflow: hidden; }
.rem { position: absolute; inset: 0; }
.rem-map { position: absolute; left: 0; top: 0; bottom: 0; right: 388px; background: #EEF0EC; z-index: 0; }
.rem-map.crosshair, .rem-map.crosshair .leaflet-interactive { cursor: crosshair; }
.rem .leaflet-control-zoom { border: 1px solid var(--border) !important; border-radius: 12px !important; overflow: hidden; box-shadow: 0 2px 4px rgba(31,35,42,.06), 0 10px 26px rgba(31,35,42,.10) !important; margin: 16px 16px 0 0 !important; }
.rem .leaflet-control-zoom a { width: 36px !important; height: 36px !important; line-height: 36px !important; color: #3a3f48 !important; font: 400 18px/36px system-ui !important; }
.rem .leaflet-control-attribution { font: 10px 'Lexend', system-ui; background: rgba(255,255,255,.75) !important; }
.rem .leaflet-control-attribution .rem-mblogo { display: inline-block; width: 66px; height: 17px; margin: 0 6px -4px 0; background-size: contain; background-repeat: no-repeat; vertical-align: baseline; }
.rem .leaflet-gl-layer { pointer-events: none; }
.rem-top { position: absolute; left: 16px; top: 16px; z-index: 520; }
.rem-search { position: relative; width: 380px; display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; height: 44px; box-shadow: 0 2px 4px rgba(31,35,42,.06), 0 10px 26px rgba(31,35,42,.10); }
.rem-search .rs-i svg { width: 16px; height: 16px; color: var(--muted); display: block; }
.rem-search input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--text); min-width: 0; }
.rem-res { position: absolute; left: 0; right: 0; top: 50px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 26px rgba(31,35,42,.14); padding: 6px; max-height: 360px; overflow: auto; }
.rem-res button { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; border: 0; background: none; padding: 8px; border-radius: 8px; font: inherit; color: var(--text); cursor: pointer; }
.rem-res button:hover { background: var(--bg); }
.rem-res .rr-i svg { width: 16px; height: 16px; color: #8A6A2F; margin-top: 2px; }
.rem-res b { display: block; font-weight: 500; font-size: 13.5px; } .rem-res small { display: block; font-size: 12px; color: var(--muted); }
.rr-none { margin: 8px; font-size: 13px; color: var(--muted); }
.rem-tools { position: absolute; left: 16px; top: 72px; z-index: 500; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 2px 4px rgba(31,35,42,.06), 0 10px 26px rgba(31,35,42,.10); }
.rem-tools button { width: 38px; height: 38px; border-radius: 9px; border: 0; background: none; display: grid; place-items: center; color: #3a3f48; cursor: pointer; }
.rem-tools button:hover { background: var(--bg); }
.rem-tools button.on { background: #1F232A; color: #C5A059; }
.rem-tools svg { width: 18px; height: 18px; }
.rem-tools hr { border: 0; border-top: 1px solid var(--border); margin: 3px 4px; }
.rem-tip { position: absolute; left: 70px; top: 76px; z-index: 500; font-size: 12px; background: rgba(255,255,255,.95); border: 1px solid var(--border); border-radius: 7px; padding: 5px 9px; font-weight: 500; color: #1F232A; pointer-events: none; max-width: 300px; }
.rem-layers { position: absolute; left: 70px; top: 240px; z-index: 600; width: 240px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px; font-size: 12.5px; box-shadow: 0 10px 26px rgba(31,35,42,.14); }
.rem-layers h4 { margin: 0 0 8px; font-size: 10.5px; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.rl-base { display: flex; gap: 6px; margin-bottom: 8px; }
.rl-base button { flex: 1; padding: 5px 0; border-radius: 7px; border: 1px solid var(--border); background: none; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.rl-base button.on { border-color: #393E50; color: var(--text); font-weight: 500; }
.rl-row { display: flex; align-items: center; gap: 9px; padding: 6px 0; cursor: pointer; }
.rl-row input { display: none; }
.rl-sw { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid #8E959C; }
.rl-sw.g { background: #C5A059; border-color: #C5A059; border-radius: 50%; }
.rl-tg { margin-left: auto; width: 28px; height: 16px; border-radius: 99px; background: #D7DBDD; position: relative; flex: none; transition: background .15s; }
.rl-tg:after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: left .15s; }
.rl-row input:checked + .rl-tg { background: #393E50; } .rl-row input:checked + .rl-tg:after { left: 14px; }
.rl-note { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.rem-cov { position: absolute; left: 16px; bottom: 132px; z-index: 500; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: #3a3f48; background: rgba(255,255,255,.92); border: 1px solid var(--border); border-radius: 99px; padding: 4px 10px; }
.rem-cov svg { width: 12px; height: 12px; color: #8A6A2F; }
.rem-dock { position: absolute; left: 16px; right: 404px; bottom: 16px; z-index: 500; }
.rem-dock .composer { max-width: none; margin: 0; box-shadow: 0 2px 4px rgba(31,35,42,.06), 0 10px 26px rgba(31,35,42,.12); }
.rem-ctx { margin: 0 0 8px; }
.rc-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; background: #FBF7EE; border: 1px solid rgba(197,160,89,.55); color: #8A6A2F; border-radius: 8px; padding: 4px 6px 4px 9px; font-weight: 500; box-shadow: 0 2px 8px rgba(31,35,42,.08); }
.rc-chip svg { width: 12px; height: 12px; }
.rc-chip button { border: 0; background: none; color: #B7A27A; cursor: pointer; display: grid; place-items: center; padding: 2px; }
.rem-pin { background: none; border: 0; }
.rem-pin .rp-m { position: absolute; left: 0; top: 0; width: 26px; height: 32px; }
.rem-pin .rp-m:before { content: ""; position: absolute; left: 1px; top: 0; width: 24px; height: 24px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #1F232A; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.rem-pin .rp-m i { position: absolute; left: 9px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: #C5A059; }
.rem-pin .rp-l { position: absolute; left: 30px; top: 2px; white-space: nowrap; font: 500 11px 'Lexend', system-ui; color: #1F232A; background: #fff; border: 1px solid #E6E9EA; border-radius: 6px; padding: 3px 7px; }
.rem-dim { background: none; border: 0; }
.rem-dim span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; background: #1F232A; color: #fff; font: 500 10px 'Lexend', system-ui; border-radius: 4px; padding: 2px 6px; }
.rem-panel { position: absolute; top: 0; right: 0; bottom: 0; width: 388px; background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; z-index: 700; }
.rp-scroll { flex: 1; overflow-y: auto; padding: 18px 20px 20px; }
.rp-hero { display: flex; gap: 12px; align-items: flex-start; }
.rp-ic { width: 44px; height: 44px; border-radius: 12px; background: #1F232A; color: #C5A059; display: grid; place-items: center; flex: none; }
.rp-ic svg { width: 22px; height: 22px; }
.rp-hero h2, .rp-tt h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.rp-hero p, .rp-tt p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.rp-steps { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.rp-steps li { display: flex; gap: 10px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.rp-steps li svg { width: 16px; height: 16px; color: #8A6A2F; flex: none; margin-top: 2px; }
.rp-steps b { display: block; color: var(--text); font-weight: 600; font-size: 13px; }
.rp-sec { margin: 18px 0 8px; display: flex; align-items: baseline; gap: 8px; font-size: 10.5px; letter-spacing: .12em; font-weight: 600; color: #8A6A2F; }
.rp-sec span { letter-spacing: 0; font-weight: 400; color: var(--muted); font-size: 11.5px; }
.rp-saved { display: grid; gap: 6px; }
.rp-saved button { display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--border); background: none; border-radius: 10px; padding: 8px 10px; font: inherit; color: var(--text); cursor: pointer; }
.rp-saved button:hover { border-color: #C5A059; }
.rp-dot { width: 22px; height: 22px; border-radius: 7px; background: #1F232A; position: relative; flex: none; } .rp-dot:after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #C5A059; }
.rp-saved b { display: block; font-size: 13px; font-weight: 500; } .rp-saved small { display: block; font-size: 11.5px; color: var(--muted); }
.rs-svc { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 9px 10px; border: 1px solid var(--border); background: none; border-radius: 11px; margin-bottom: 7px; font: inherit; color: var(--text); cursor: pointer; transition: border-color .15s; }
.rs-svc:hover { border-color: #C5A059; }
.rs-svc[data-need] { opacity: .62; }
.rs-t { width: 32px; height: 32px; border-radius: 9px; background: #EEF0F1; color: #393E50; display: grid; place-items: center; flex: none; }
.rs-t svg { width: 16px; height: 16px; }
.rs-tx b { display: block; font-size: 13px; font-weight: 600; } .rs-tx small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.rs-ft { margin-left: auto; font-size: 10px; font-weight: 600; letter-spacing: .04em; border-radius: 5px; padding: 3px 6px; flex: none; }
.rs-ft.x { background: #E6F2EA; color: #2F7A4B; } .rs-ft.p { background: #F7E7E4; color: #A8432F; } .rs-ft.w { background: #E5ECF7; color: #2F5A9E; } .rs-ft.s { background: #F8EDDD; color: #9A5E1C; } .rs-ft.m { background: #EEF0F1; color: #4B5160; }
.rs-svc.pri { border-color: #C5A059; background: #FFFCF6; } .rs-svc.pri .rs-t { background: #1F232A; color: #C5A059; }
.rp-more { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 12.5px; color: #8A6A2F; text-decoration: none; font-weight: 500; }
.rp-more svg { width: 14px; height: 14px; }
.rp-tt { display: flex; gap: 10px; align-items: flex-start; }
.rp-tt > div { flex: 1; min-width: 0; }
.rp-ib { width: 30px; height: 30px; border: 1px solid var(--border); background: none; border-radius: 8px; display: grid; place-items: center; color: #3a3f48; cursor: pointer; flex: none; }
.rp-ib svg { width: 14px; height: 14px; }
.rp-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.rp-tag { font-size: 11px; border-radius: 99px; padding: 3px 9px; background: #EEF0F1; color: #3a3f48; display: inline-flex; gap: 5px; align-items: center; }
.rp-tag svg { width: 11px; height: 11px; }
.rp-tag.warn { background: #FBEFD9; color: #8A5A12; }
.rp-facts { margin-top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.rp-facts div { padding: 10px 11px; border-right: 1px solid var(--border); min-width: 0; }
.rp-facts div:nth-child(3n) { border-right: 0; } .rp-facts div:nth-child(n+4) { border-top: 1px solid var(--border); }
.rp-facts small { display: block; font-size: 10.5px; color: var(--muted); }
.rp-facts b { display: block; font-size: 15px; font-weight: 600; margin-top: 2px; white-space: nowrap; }
.rp-facts b em { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.rp-zone { margin-top: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px; font-size: 12.5px; }
.rp-zone.muted { color: var(--muted); line-height: 1.45; }
.rz-h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.rz-h small { margin-left: auto; font-weight: 400; font-size: 11px; color: var(--muted); }
.rz-sw { width: 12px; height: 12px; border-radius: 3px; background: #E8C9A0; border: 1px solid #C99A5B; flex: none; }
.rp-zone ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 12px; }
.rp-zone ul li.w { grid-column: 1 / -1; }
.rp-zone ul li span { color: var(--muted); }
.rz-cav { margin-top: 8px; font-size: 11px; color: var(--muted); line-height: 1.45; }
.rz-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: #8A6A2F; font-weight: 500; text-decoration: none; }
.rz-link svg { width: 12px; height: 12px; }
.rp-foot { padding: 12px 20px 16px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
.rp-foot .btn { flex: 1; justify-content: center; padding: 10px 12px; display: inline-flex; align-items: center; gap: 7px; }
.rp-foot .btn svg { width: 15px; height: 15px; }
.rp-foot .btn.gold { background: #C5A059; border-color: #C5A059; color: #1F232A; font-weight: 600; }
[data-theme="dark"] .rem-tools button.on, [data-theme="dark"] .rp-ic { background: #262A34; }
[data-theme="dark"] .rem-tip, [data-theme="dark"] .rem-cov { background: rgba(28,31,40,.92); color: var(--text); }
[data-theme="dark"] .rs-t, [data-theme="dark"] .rp-tag { background: #262A34; color: var(--text); }
[data-theme="dark"] .rs-svc.pri { background: rgba(197,160,89,.08); }
[data-theme="dark"] .rc-chip { background: rgba(197,160,89,.12); color: #C5A059; }
[data-theme="dark"] .rem-tools button, [data-theme="dark"] .rp-ib { color: var(--text); }
@media (max-width: 860px) {
  .rem-map { right: 0; bottom: 46%; }
  .rem-panel { top: auto; height: 46%; width: auto; left: 0; border-left: 0; border-top: 1px solid var(--border); border-radius: 18px 18px 0 0; }
  .rem-dock { right: 16px; bottom: calc(46% + 12px); }
  .rem-search { width: calc(100vw - 32px); }
  .rem-cov, .rem-tip { display: none; }
}
.rem .leaflet-pane svg, .rem .leaflet-zoom-animated svg { width: auto; height: auto; fill: initial; stroke: initial; flex-shrink: initial; }
.rem .leaflet-overlay-pane svg { max-width: none !important; }
.rem-cov { bottom: auto; top: 22px; left: 410px; }

/* Real Estate map: phone layout (follows studio-re-map-phone mockup) */
.rem-mb.rem-menu, .rem-sb, .rem-fabs, .rem-tools .tl, .rp-grab, .rp-mempty, .rp-peek, .rp-col, .rem-ichip { display: none; }
@media (max-width: 860px) {
  .app.re-map .topbar { display: none; }
  .rem-map { right: 0; bottom: 0; }
  .rem .leaflet-control-zoom { display: none; }
  .rem .leaflet-bottom.leaflet-right { bottom: var(--rsh, 0px); transition: bottom .2s; }
  .rem-top { left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top)); display: flex; gap: 8px; align-items: center; }
  .rem-mb { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: var(--text); box-shadow: 0 2px 4px rgba(31,35,42,.06), 0 8px 20px rgba(31,35,42,.10); cursor: pointer; padding: 0; }
  .rem-mb svg { width: 19px; height: 19px; }
  .rem-mb.rem-menu, .rem-sb { display: grid; }
  .rem-sb { background: #1F232A; border-color: #1F232A; color: #C5A059; }
  .rem-search { width: auto; flex: 1; min-width: 0; height: 44px; }
  .rem-search input { font-size: 15px; }
  .rem-res { position: fixed; left: 12px; right: 12px; top: calc(62px + env(safe-area-inset-top)); }
  .rem-tools { top: calc(66px + env(safe-area-inset-top)); left: 12px; right: 12px; flex-direction: row; background: none; border: 0; box-shadow: none; padding: 0 0 4px; gap: 5px; overflow-x: auto; scrollbar-width: none; }
  .rem-tools::-webkit-scrollbar { display: none; }
  .rem-tools button { width: auto; height: 36px; padding: 0 11px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 2px 6px rgba(31,35,42,.08); display: inline-flex; align-items: center; gap: 6px; flex: none; font: 500 13px 'Lexend', system-ui; color: var(--text); }
  .rem-tools button svg { width: 15px; height: 15px; }
  .rem-tools button.on { background: #1F232A; border-color: #1F232A; color: #fff; }
  .rem-tools button.on svg { color: #C5A059; }
  .rem-tools .tl { display: inline; }
  [data-theme="dark"] .rem-tools button.on { background: #C5A059; border-color: #C5A059; color: #1F232A; }
  [data-theme="dark"] .rem-tools button.on svg { color: #1F232A; }
  .rem.sheet-open .rem-tools, .rem.sheet-open .rem-fabs, .rem.sheet-open .rem-layers, .rem.sheet-open .rem-tip, .rem.sheet-open .leaflet-control-attribution { display: none !important; }
  .rem-tools hr, .rem-tools .rt-layers { display: none; }
  .rem-tip { left: 12px; top: calc(112px + env(safe-area-inset-top)) !important; max-width: calc(100vw - 80px); }
  .rem-tip:not(:empty) { display: block; }
  .rem-tip:not([data-t]), .rem-tip[data-t="select"] { display: none !important; }
  .rem-tip { font-size: 12.5px; }
  .rem-fabs { display: flex; flex-direction: column; gap: 8px; position: absolute; right: 12px; top: calc(112px + env(safe-area-inset-top)); z-index: 500; }
  .rem-layers { left: 12px; top: calc(156px + env(safe-area-inset-top)); }
  .rem-cov, .rem-ctx { display: none !important; }
  .rem-dock { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 800; }
  .rem-dock .composer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-radius: 14px; }
  .rem-dock .composer .att-tray { flex-basis: 100%; }
  .rem-dock .composer textarea { flex: 1; width: auto; min-width: 0; font-size: 15px; min-height: 24px; padding: 6px 0; }
  .rem-dock .composer-row { margin: 0; flex: none; flex-wrap: nowrap; gap: 4px; }
  .rem-dock .composer-row .spacer { display: none; }
  .rem-ichip:not([hidden]) { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: 12px; font-weight: 500; color: #8A6A2F; background: #FBF7EE; border: 1px solid rgba(197,160,89,.55); border-radius: 8px; padding: 4px 8px; }
  .rem-ichip svg { width: 12px; height: 12px; }
  .rem-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: auto; max-height: calc(100% - 150px); border-left: 0; border-top: 1px solid var(--border); border-radius: 20px 20px 0 0; box-shadow: 0 -8px 30px rgba(31,35,42,.12); padding-bottom: calc(76px + env(safe-area-inset-bottom)); transition: max-height .25s; }
  .rem-panel.open { height: calc(100% - 150px); }
  .rp-grab { display: block; width: 100%; height: 20px; border: 0; background: none; cursor: grab; flex: none; padding: 0; touch-action: none; }
  .rp-grab i { display: block; width: 40px; height: 4px; border-radius: 99px; background: #D3D7DA; margin: 8px auto 0; }
  .rp-scroll { padding: 4px 18px 10px; }
  .rp-foot { display: none; }
  /* empty sheet */
  .rem-panel:not(.has-sel):not(.open) .rp-scroll > :not(.rp-mempty) { display: none; }
  .rem-panel:not(.has-sel):not(.open) .rp-mempty { display: block; }
  .rp-mempty h3 { margin: 2px 0 4px; font-size: 16px; font-weight: 600; }
  .rp-mempty p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
  .rp-mrow { display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; padding-bottom: 2px; scrollbar-width: none; }
  .rp-mrow button { display: flex; align-items: center; gap: 9px; flex: none; border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 8px 12px 8px 9px; font: inherit; color: var(--text); text-align: left; max-width: 220px; cursor: pointer; }
  .rp-mrow b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
  .rp-mrow small { display: block; font-size: 11.5px; color: var(--muted); }
  /* selected sheet, collapsed */
  .rem-panel.has-sel:not(.open) .rp-zone, .rem-panel.has-sel:not(.open) .rp-sec, .rem-panel.has-sel:not(.open) .rs-svc, .rem-panel.has-sel:not(.open) .rp-facts > div:not(.pk) { display: none; }
  .rem-panel.has-sel:not(.open) .rp-facts > div.pk { border-top: 0; border-right: 1px solid var(--border); }
  .rem-panel.has-sel:not(.open) .rp-facts > div.pk:last-child { border-right: 0; }
  .rem-panel.has-sel:not(.open) .rp-peek { display: block; }
  .rp-pb { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
  .rp-pb .btn { justify-content: center; display: inline-flex; align-items: center; gap: 7px; height: 44px; font-weight: 500; }
  .rp-pb .btn svg { width: 15px; height: 15px; }
  .rp-pb .btn.gold { background: #C5A059; border-color: #C5A059; color: #1F232A; font-weight: 600; }
  .rp-sug { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
  .rp-sug button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 99px; padding: 6px 11px; font: inherit; font-size: 12.5px; cursor: pointer; }
  .rp-sug svg { width: 12px; height: 12px; color: #C5A059; }
  /* expanded */
  .rem-panel.open .rp-col { display: grid; }
  .rem-panel.open .rp-x { display: none; }
  .rem-panel.open:not(.has-sel) .rp-mempty { display: none; }
}
.rem .leaflet-gl-layer .mapboxgl-ctrl-logo, .rem .leaflet-gl-layer .mapboxgl-ctrl-attrib { display: none !important; }
[data-theme="dark"] .rem-tools button.on { background: rgba(197,160,89,.18); color: #C5A059; }
[data-theme="dark"] .rem .leaflet-control-zoom { border-color: #2A2E3A !important; }
[data-theme="dark"] .rem .leaflet-control-zoom a { background: #1B1E26 !important; color: #C3C8D2 !important; border-bottom-color: #2A2E3A !important; }
[data-theme="dark"] .rem .leaflet-control-attribution { background: rgba(21,23,30,.75) !important; color: #9BA1AD; }
[data-theme="dark"] .rem .leaflet-control-attribution a { color: #C3C8D2; }
[data-theme="dark"] .rem .leaflet-container { background: #171A21; }
.rem .leaflet-container { background: #F4F6F6; }

/* ===== Real Estate Studio: full site study ===== */
.rem { --sy-bld: #DADDE0; }
[data-theme="dark"] .rem { --sy-bld: #2A2E39; }
@media (min-width: 861px) {
  .rem.sy-on .rem-panel { width: 432px; }
  .rem.sy-on .rem-map, .rem.sy-on .sy-3d { right: 432px; }
  .rem.sy-on .rem-dock { right: 448px; }
}
.sy-tabs { display: flex; margin: 14px 0 6px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.sy-tabs > * { flex: 1; text-align: center; font: inherit; font-size: 11.5px; padding: 7px 0; color: var(--muted); background: none; border: 0; border-right: 1px solid var(--border); display: flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; cursor: pointer; }
.sy-tabs > *:last-child { border-right: 0; }
.sy-tabs .ok { color: #2F7A4B; }
.sy-tabs .ok:before { content: "✓"; font-weight: 700; }
.sy-tabs .on { background: #1F232A; color: #fff; font-weight: 500; }
[data-theme="dark"] .sy-tabs .on { background: #E6E9EA; color: #15171E; }
.sy-tabs .on:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #C5A059; }
.sy-sec { margin: 16px 0 8px; display: flex; align-items: baseline; gap: 8px; font-size: 10.5px; letter-spacing: .12em; font-weight: 600; color: #8A6A2F; }
[data-theme="dark"] .sy-sec { color: #C5A059; }
.sy-sec span { letter-spacing: 0; font-weight: 400; color: var(--muted); font-size: 11.5px; margin-left: auto; }
.sy-cf { font-size: 9.5px; font-weight: 600; letter-spacing: .03em; border-radius: 5px; padding: 2px 6px; white-space: nowrap; flex: none; display: inline-block; }
.sy-cf.o { background: #E6F2EA; color: #2F7A4B; } .sy-cf.d { background: #E5ECF7; color: #2F5A9E; } .sy-cf.e { background: #F8EDDD; color: #9A5E1C; } .sy-cf.u { background: #EFE8F7; color: #6A4A9A; }
[data-theme="dark"] .sy-cf.o { background: rgba(47,122,75,.22); color: #8FD0A6; } [data-theme="dark"] .sy-cf.d { background: rgba(47,90,158,.25); color: #9DBBEA; }
[data-theme="dark"] .sy-cf.e { background: rgba(154,94,28,.25); color: #E2B57A; } [data-theme="dark"] .sy-cf.u { background: rgba(106,74,154,.28); color: #C5AEEA; }
.sy-lim { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.sy-lim:last-child { border-bottom: 0; }
.sy-lim .sv { width: 4px; align-self: stretch; border-radius: 2px; flex: none; }
.sy-lim > div { flex: 1; min-width: 0; }
.sy-lim b { display: block; font-size: 12.5px; font-weight: 600; }
.sy-lim small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.sy-lim .sy-cf { margin-top: 1px; }
.sy-near { margin: 0; padding-left: 18px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.sy-env { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-top: 4px; }
.sy-env > div { padding: 9px 11px; border-right: 1px solid var(--border); }
.sy-env > div:nth-child(3n) { border-right: 0; }
.sy-env > div:nth-child(n+4) { border-top: 1px solid var(--border); }
.sy-env small { display: block; font-size: 10.5px; color: var(--muted); }
.sy-env b { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; margin: 2px 0 5px; white-space: nowrap; }
.sy-env b.ed button { width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; line-height: 1; cursor: pointer; padding: 0; display: grid; place-items: center; }
.sy-env b.ed button:hover { border-color: #C5A059; }
.sy-hint { font-size: 11.5px; color: var(--muted); line-height: 1.45; margin: 8px 0 0; }
.sy-hint a { color: inherit; }
.sy-opt { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.sy-opt:hover { border-color: var(--border-strong); }
.sy-opt.best { border-color: #C5A059; background: #FFFCF6; }
[data-theme="dark"] .sy-opt.best { background: rgba(197,160,89,.08); }
.sy-opt.sel:not(.best) { border-color: #393E50; }
.sy-opt .oh { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.sy-opt .bt { font-size: 9.5px; letter-spacing: .06em; background: #1F232A; color: #C5A059; border-radius: 5px; padding: 2px 6px; }
.sy-opt .v { margin-left: auto; font-size: 15px; }
.sy-opt .bar { display: block; height: 6px; background: #EEF0F1; border-radius: 99px; margin: 7px 0 6px; overflow: hidden; }
[data-theme="dark"] .sy-opt .bar { background: #2A2E39; }
.sy-opt .bar i { display: block; height: 100%; border-radius: 99px; background: #393E50; }
[data-theme="dark"] .sy-opt .bar i { background: #8E959C; }
.sy-opt.best .bar i { background: #C5A059; }
.sy-opt small { font-size: 11.5px; color: var(--muted); line-height: 1.4; display: block; }
table.sy-as { width: 100%; border-collapse: collapse; font-size: 12px; }
table.sy-as td { padding: 6px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
table.sy-as td:nth-child(2) { text-align: right; font-weight: 600; white-space: nowrap; padding-right: 8px; }
table.sy-as td:nth-child(3) { width: 1%; text-align: right; }
table.sy-as td small { display: block; color: var(--muted); font-size: 10.5px; font-weight: 400; white-space: normal; }
.sy-edit { font: inherit; font-weight: 600; color: var(--text); background: none; border: 0; border-bottom: 1.5px dashed #9A7FC7; padding: 0 0 1px; cursor: pointer; }
.sy-in { width: 110px; font: inherit; font-size: 12px; text-align: right; padding: 3px 6px; border: 1px solid #C5A059; border-radius: 6px; background: var(--surface); color: var(--text); outline: none; }
.sy-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 4px; }
.sy-kpis.two { grid-template-columns: repeat(3, 1fr); margin-top: 6px; }
.sy-kpis > div { border: 1px solid var(--border); border-radius: 10px; padding: 8px 9px; min-width: 0; }
.sy-kpis > div.pk { border-color: #C5A059; }
.sy-kpis small { display: block; font-size: 10px; color: var(--muted); }
.sy-kpis b { display: block; font-size: 14px; font-weight: 600; margin-top: 2px; white-space: nowrap; }
.sy-head { font-size: 13px; line-height: 1.5; margin: 8px 0 0; }
.sy-swot { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sy-swot > div { border-radius: 10px; padding: 8px 10px; font-size: 11.5px; line-height: 1.4; color: #3a3f48; }
.sy-swot > div > div + div { margin-top: 4px; }
.sy-swot h5 { margin: 0 0 4px; font-size: 10px; letter-spacing: .1em; }
.sy-swot .s { background: #EEF5F0; } .sy-swot .s h5 { color: #2F7A4B; }
.sy-swot .w { background: #F8F0E8; } .sy-swot .w h5 { color: #9A5E1C; }
.sy-swot .o { background: #EEF2F8; } .sy-swot .o h5 { color: #2F5A9E; }
.sy-swot .t { background: #F7EEEC; } .sy-swot .t h5 { color: #A8432F; }
[data-theme="dark"] .sy-swot > div { color: #D5D9DD; }
[data-theme="dark"] .sy-swot .s { background: rgba(47,122,75,.16); } [data-theme="dark"] .sy-swot .w { background: rgba(154,94,28,.18); }
[data-theme="dark"] .sy-swot .o { background: rgba(47,90,158,.18); } [data-theme="dark"] .sy-swot .t { background: rgba(168,67,47,.18); }
[data-theme="dark"] .sy-swot .s h5 { color: #8FD0A6; } [data-theme="dark"] .sy-swot .w h5 { color: #E2B57A; } [data-theme="dark"] .sy-swot .o h5 { color: #9DBBEA; } [data-theme="dark"] .sy-swot .t h5 { color: #E8A090; }
.sy-exp { display: flex; gap: 6px; }
.sy-exp button { flex: 1; font: inherit; border: 1px solid var(--border); background: var(--surface); border-radius: 9px; padding: 7px 0; text-align: center; font-size: 11.5px; color: var(--text); cursor: pointer; }
.sy-exp button:hover { border-color: #C5A059; }
.sy-exp b { display: block; font-weight: 600; }
.sy-exp small { display: block; color: var(--muted); font-size: 10px; }
.sy-exp button.busy, .rp-foot .btn.busy { opacity: .55; cursor: progress; }
.sy-illus { font-size: 10.5px; color: #9A5E1C; background: #FBF4E8; border-radius: 7px; padding: 6px 9px; margin-top: 14px; line-height: 1.4; }
[data-theme="dark"] .sy-illus { color: #E2B57A; background: rgba(154,94,28,.16); }
.sy-load { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); padding: 22px 2px; }
.sy-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #C5A059; border-top-color: transparent; animation: sy-rot .8s linear infinite; flex: none; }
@keyframes sy-rot { to { transform: rotate(360deg); } }
/* progress card on the map */
.sy-prog { position: absolute; left: 16px; top: 72px; width: 360px; max-width: calc(100% - 32px); z-index: 640; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 2px 4px rgba(31,35,42,.06), 0 10px 26px rgba(31,35,42,.10); padding: 12px 14px; font-size: 12.5px; }
.sy-px { position: absolute; right: 8px; top: 8px; width: 22px; height: 22px; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 3px; }
.sy-px svg { width: 16px; height: 16px; }
.sy-q { background: var(--bg); border-radius: 10px 10px 3px 10px; padding: 8px 11px; margin: 0 22px 0 40px; font-size: 13px; line-height: 1.4; }
.sy-und { margin-top: 10px; display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.sy-und b { font-weight: 600; }
.sy-lm { width: 20px; height: 20px; border-radius: 6px; background: #1F232A; color: #C5A059; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 12px; line-height: 1; }
.sy-steps { margin: 9px 0 0 28px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.sy-steps > div { display: flex; align-items: center; gap: 7px; }
.sy-steps .d { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #C8CDD1; flex: none; display: grid; place-items: center; box-sizing: border-box; }
.sy-steps .ok { color: var(--text); }
.sy-steps .ok .d { background: #2F7A4B; border-color: #2F7A4B; }
.sy-steps .ok .d:after { content: ""; width: 5px; height: 3px; border: 1.6px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.sy-steps .run { color: var(--text); font-weight: 500; }
.sy-steps .run .d { border-color: #C5A059; border-top-color: transparent; animation: sy-rot .8s linear infinite; }
/* 3D massing */
.sy-3d { position: absolute; left: 0; top: 0; bottom: 0; right: 388px; z-index: 450; background: #EEF0EC; }
.sy-3d > div:first-child { position: absolute; inset: 0; }
.sy-2d { position: absolute; right: 64px; top: 72px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; font-weight: 500; padding: 7px 11px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; box-shadow: 0 4px 14px rgba(31,35,42,.12); }
.sy-2d svg { width: 15px; height: 15px; }
.sy-leg { position: absolute; left: 16px; bottom: 118px; z-index: 3; padding: 10px 12px; min-width: 200px; font-size: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 6px 18px rgba(31,35,42,.10); }
.sy-leg:empty { display: none; }
.sy-leg h4 { margin: 0 0 7px; font-size: 10.5px; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.sy-leg .lg { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.sy-leg .sw { width: 13px; height: 13px; border-radius: 3px; flex: none; }
.sy-3db { font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.sy-3db.on { background: #1F232A; color: #C5A059; }
.sy-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.sy-chips button { font: inherit; font-size: 12px; border: 1px solid var(--border); border-radius: 99px; padding: 5px 11px; color: var(--text); background: var(--surface); white-space: nowrap; cursor: pointer; box-shadow: 0 2px 8px rgba(31,35,42,.06); }
.sy-chips button:hover { border-color: #C5A059; }
@media (max-width: 860px) {
  .sy-3d { right: 0; bottom: 0; }
  .sy-prog { top: 64px; left: 10px; width: auto; right: 10px; }
  .sy-leg { bottom: auto; top: 120px; left: 10px; }
  .sy-2d { top: auto; bottom: 50%; right: 10px; }
  .sy-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .rem-panel.has-sel:not(.open) .sy-env, .rem-panel.has-sel:not(.open) table.sy-as, .rem-panel.has-sel:not(.open) .sy-swot { display: none; }
}
@media (min-width: 861px) { .sy-prog { left: 72px; top: 72px; } .sy-leg { left: 72px; } }
.rem-tools .sy-3db { font-size: 12px; color: #3a3f48; }
.rem-tools .sy-3db.on { color: #C5A059; }
[hidden].sy-3db { display: none !important; }
@media (min-width: 861px) { .sy-leg { left: auto; right: 16px; top: 124px; bottom: auto; } }
@media (max-width: 860px) { .rem.sheet-open .sy-prog { display: none; } }

/* Real Estate studio, desktop: matches the study-flow mockups */
.re-crumb { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--muted); flex: none; }
.re-crumb a { color: var(--muted); text-decoration: none; } .re-crumb a:hover { color: var(--text); }
.re-crumb .sep { opacity: .6; }
.re-crumb .ic { width: 22px; height: 22px; border-radius: 6px; background: #1F232A; color: #C5A059; display: grid; place-items: center; }
.re-crumb .ic svg { width: 13px; height: 13px; }
.re-crumb b { color: var(--text); font-weight: 600; }
@media (min-width: 861px) {
  #topTitle:has(.re-crumb) { display: flex; align-items: center; gap: 18px; overflow: visible; color: var(--text); }
  .rem-search.re-tsearch { width: 340px; height: 34px; border-radius: 10px; box-shadow: none; background: var(--bg); padding: 0 8px 0 11px; font-weight: 400; z-index: 900; }
  .rem-search.re-tsearch input { font-size: 13px; }
  .rem-search.re-tsearch .rs-i svg { width: 14px; height: 14px; }
  .rs-k { font: 500 11px 'Lexend', system-ui; color: var(--muted); border: 1px solid var(--border-strong); border-radius: 5px; padding: 1px 6px; background: var(--surface); }
  .rem-search.re-tsearch .rem-res { top: 40px; z-index: 900; }
  .rem-top { display: none; }
  .rem-tools { top: 16px; }
  .rem-tip { top: 20px; }
  .rem-cov { top: 22px; left: auto; right: 448px; }
  .rem-layers { top: 184px; }
  /* study mode */
  .rem.sy-on .rem-tools, .rem.sy-on .rem-cov, .rem.sy-on .rem-tip, .rem.sy-on .rem-layers { display: none !important; }
  .rem.sy-on .sy-prog { left: 16px; top: 16px; }
  .rem-ctx { display: none !important; }
  .rem-dock .composer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 7px 7px 7px 10px; border-radius: 14px; }
  .rem-dock .composer .att-tray { flex-basis: 100%; }
  .rem-dock .composer textarea { flex: 1; width: auto; min-width: 0; font-size: 14px; min-height: 22px; padding: 6px 2px; }
  .rem-dock .composer-row { margin: 0; flex: none; flex-wrap: nowrap; gap: 4px; }
  .rem-dock .composer-row .spacer { display: none; }
  .rem-ichip:not([hidden]) { display: inline-flex; align-items: center; gap: 5px; flex: none; font-size: 12px; font-weight: 500; color: #8A6A2F; background: #FBF7EE; border: 1px solid rgba(197,160,89,.55); border-radius: 8px; padding: 4px 8px; }
  .rem-ichip svg { width: 12px; height: 12px; }
  .sy-leg { left: 16px !important; right: auto !important; top: auto !important; bottom: calc(var(--dockh, 100px) + 28px) !important; }
  .sy-2d { top: 16px; right: 16px; }
}
.sy-leg { z-index: 645; }
.sy-lm i { width: 7px; height: 7px; border-radius: 50%; background: #C5A059; display: block; }
.sy-tag { transform: translateY(-4px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 7px 11px; box-shadow: 0 6px 18px rgba(31,35,42,.16); font-size: 12px; line-height: 1.35; white-space: nowrap; pointer-events: none; }
.sy-tag b { display: block; font-weight: 600; color: var(--text); }
.sy-tag span { color: var(--muted); }
.sy-tag:after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 10px; height: 10px; background: var(--surface); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); transform: translateX(-50%) rotate(45deg); }
.sy-env.sy-ro b { font-size: 14px; }
.sy-env b.ed { display: inline-flex; align-items: center; gap: 6px; }
.sy-env b.ed button { width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: 13px; line-height: 1; padding: 0; }
.sy-kpis.two { grid-template-columns: repeat(3, 1fr); margin-top: 8px; }
:root { --sy-bld: #DADDE0; } [data-theme="dark"] { --sy-bld: #2A2E39; }
.sy-leg { max-width: 320px; }
.sy-leg .lg bdi, .sy-leg .lg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rem .sy-fab { position: static; margin: 16px 16px 0 0; float: none; display: flex; }
.rem .leaflet-top.leaflet-right:has(.sy-fab) { display: flex; flex-direction: column; align-items: flex-end; }
.rem .leaflet-top.leaflet-right:has(.sy-fab) .leaflet-control-zoom { margin-top: 8px !important; }
/* 3D label and send button, as in the best-use mockup */
.sy-tag { background: #1F232A; border-color: #1F232A; color: #fff; border-radius: 7px; padding: 6px 10px; }
.sy-tag b { color: #C5A059; }
.sy-tag span { color: #fff; }
.sy-tag:after { background: #1F232A; border-color: #1F232A; }
.rem-dock .composer .send, .rem-dock .composer #send { background: #393E50; color: #fff; opacity: 1; }
[data-theme="dark"] .rem-dock .composer .send, [data-theme="dark"] .rem-dock .composer #send { background: #C5A059; color: #1F232A; }
.sy-as td a { color: inherit; text-decoration: underline dotted; }
/* conversations started on the Real Estate map */
.re-backbar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: flex-start; padding: 6px 0 10px; margin-bottom: 6px; background: linear-gradient(var(--bg) 70%, transparent); }
.re-backbar button { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 13px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; padding: 7px 12px; cursor: pointer; box-shadow: 0 2px 8px rgba(31,35,42,.06); }
.re-backbar button:hover { border-color: #C5A059; }
.re-backbar svg { width: 14px; height: 14px; color: #8A6A2F; }
.re-backbar b { font-weight: 500; color: var(--muted); border-left: 1px solid var(--border); padding-left: 8px; }
.re-backchip { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font: inherit; font-size: 12px; font-weight: 500; color: #8A6A2F; background: #FBF7EE; border: 1px solid rgba(197,160,89,.55); border-radius: 8px; padding: 4px 9px; cursor: pointer; align-self: flex-end; }
.re-backchip svg { width: 12px; height: 12px; }
.re-backchip span { color: var(--muted); font-weight: 400; border-left: 1px solid rgba(197,160,89,.4); padding-left: 6px; }
[data-theme="dark"] .re-backchip { background: rgba(197,160,89,.12); color: #E2C27E; }
.msg.user:has(.re-backchip) { display: flex; flex-direction: column; align-items: flex-end; }
