/* Pandit Karun Vastu app (kd 2026-10-25). This file OWNS all tokens; see DESIGN_SYSTEM.md.
   Vastu layout: square, sharp shapes (Earth), one 2px radius everywhere except circles for faces and markers. One accent: saffron. */
:root {
  --bg: #0e1220; --bg-2: #131a2b; --card: #192136; --card-2: #1f2840; --line: rgba(234, 214, 170, .14); --line-2: rgba(234, 214, 170, .26);
  --text: #f2ead9; --text-2: #b8b1a2; --text-3: #8d8778;
  --accent: #e9963a; --accent-2: #f3b465; --accent-ink: #1b1206; --accent-text: #f0a54f; --accent-soft: rgba(233, 150, 58, .14);
  --ok: #62b87d; --warn: #e2b54c; --bad: #e57a62; --neutral: #9aa3b8;
  --el-water: #4f86d6; --el-air: #52aa70; --el-fire: #e2684d; --el-earth: #d3a83c; --el-space: #b8bcc8;
  --shadow: 0 18px 50px rgba(3, 5, 14, .45);
  --font-d: 'Cormorant Garamond', Georgia, serif; --font-b: 'Manrope', system-ui, -apple-system, sans-serif;
  --r: 2px; --r-card: var(--r); --r-in: var(--r); --tab-h: 74px; --top-h: 58px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2f1ee; --bg-2: #e9e7e2; --card: #ffffff; --card-2: #f6f5f2; --line: rgba(28, 32, 48, .12); --line-2: rgba(28, 32, 48, .22);
    --text: #1c2030; --text-2: #4a4f60; --text-3: #6c7080; --accent-text: #9a520b; --accent-soft: rgba(233, 150, 58, .16);
    --ok: #2f8a4f; --warn: #9a6f08; --bad: #b8432c; --shadow: 0 14px 40px rgba(28, 32, 48, .12); color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f2f1ee; --bg-2: #e9e7e2; --card: #ffffff; --card-2: #f6f5f2; --line: rgba(28, 32, 48, .12); --line-2: rgba(28, 32, 48, .22);
  --text: #1c2030; --text-2: #4a4f60; --text-3: #6c7080; --accent-text: #9a520b; --accent-soft: rgba(233, 150, 58, .16);
  --ok: #2f8a4f; --warn: #9a6f08; --bad: #b8432c; --shadow: 0 14px 40px rgba(28, 32, 48, .12); color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font-b); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { min-height: 100dvh; overflow-x: hidden; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-text); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3 { font-family: var(--font-d); font-weight: 600; line-height: 1.12; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(34px, 9vw, 54px); }
h2 { font-size: clamp(26px, 6.4vw, 36px); }
h3 { font-size: 22px; }
p { margin: 0 0 .8em; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; }

/* Shell */
.top { position: sticky; top: 0; z-index: 20; height: calc(var(--top-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0; display: flex; align-items: center; gap: 10px;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; margin-right: 6px; }
.top .ne-open { margin-left: auto; } /* North East (top right) stays open and light */
.brand img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-2); }
.brand b { font: 600 21px/1 var(--font-d); display: block; }
.brand small { font-size: 11.5px; color: var(--text-3); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.icon-btn { width: 42px; height: 42px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; font-size: 20px; color: var(--text); flex: none; }
.icon-btn:active { transform: scale(.95); }
main { max-width: 1280px; margin: 0 auto; padding: 18px 16px calc(var(--tab-h) + 34px + env(safe-area-inset-bottom)); }
.view { animation: rise .45s cubic-bezier(.16, 1, .3, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.tabs { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding: 0 8px env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: color-mix(in srgb, var(--bg-2) 92%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tabs a { display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: var(--text-3); font-size: 12px; font-weight: 600; padding: 8px 0; }
.tabs a i { font-size: 24px; }
.tabs a.on { color: var(--accent-text); }
.tabs .z { position: relative; top: -10px; }
.tabs .z img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); box-shadow: 0 8px 24px rgba(233, 150, 58, .35); }
.tabs .z span { margin-top: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: var(--r); border: 1px solid transparent; font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap; transition: transform .15s, background .2s; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn i { font-size: 20px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); }
.btn.ghost { background: var(--card); border-color: var(--line-2); color: var(--text); }
.btn.block { width: 100%; }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 14.5px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > .btn { flex: 1 1 auto; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; margin: 0 0 14px; }
.card.soft { background: var(--card-2); }
.card h3 { margin-bottom: .3em; }
.section { margin: 30px 0 12px; }
.section h2 { margin: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 600; }

/* Immersive home stage: full bleed scenes behind a transparent header. Text on the stage is always ivory (it sits on photography). */
body.immersive .top { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transition: background .3s; }
body.immersive.scrolled .top { background: color-mix(in srgb, var(--bg) 86%, transparent); border-bottom-color: var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
body.immersive:not(.scrolled) .brand, body.immersive:not(.scrolled) .brand small { color: #f6efe0; text-shadow: 0 1px 10px rgba(0, 0, 0, .55); }
body.immersive:not(.scrolled) .top .icon-btn { background: rgba(10, 12, 20, .35); border-color: rgba(255, 255, 255, .22); color: #f6efe0; }
body.immersive main { padding-top: 0; }
.stage { position: relative; height: 100dvh; min-height: 560px; margin: calc(-1 * (var(--top-h) + env(safe-area-inset-top))) calc(50% - 50vw) 0; width: 100vw; overflow: hidden; background: #0b0d16; color: #f6efe0; isolation: isolate; }
.scene { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; }
.scene.on { opacity: 1; }
.scene img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transform: scale(1.01); transform-origin: 50% 30%; transition: transform 9s linear; }
.scene.on img { transform: scale(1.07); }
.scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 10, 18, .5) 0%, rgba(8, 10, 18, 0) 15%, rgba(8, 10, 18, 0) 32%, rgba(8, 10, 18, .8) 54%, rgba(8, 10, 18, .96) 100%); }
.halo { position: absolute; z-index: 1; width: 150vw; max-width: 900px; aspect-ratio: 1; left: 50%; bottom: -46%; transform: translateX(-50%); opacity: .16; pointer-events: none; animation: turn 120s linear infinite; }
.halo svg { width: 100%; height: 100%; }
@keyframes turn { to { transform: translateX(-50%) rotate(360deg); } }
.stage-in { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 0 20px calc(var(--tab-h) + 22px + env(safe-area-inset-bottom)); max-width: 640px; }
.stage-in .kicker { font-size: 13px; font-weight: 700; letter-spacing: .02em; color: #f3c27f; margin: 0 0 10px; }
.stage-in h1 { color: #fbf5e8; font-size: clamp(36px, 10vw, 64px); line-height: 1.02; margin-bottom: 12px; text-shadow: 0 2px 24px rgba(0, 0, 0, .45); }
.stage-in .lede { font-size: 16.5px; color: #e6dcc8; max-width: 34ch; margin-bottom: 18px; }
.stage-in .btn.ghost { background: rgba(10, 12, 20, .42); border-color: rgba(255, 255, 255, .28); color: #f6efe0; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.stage-in .row { flex-wrap: nowrap; }
.stage-in .row .btn.primary { flex: 1 1 auto; }
.stage-in .row .btn.ghost { flex: none; }
.scene-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.scene-nav button { background: none; border: 0; padding: 8px 0 0; text-align: left; color: rgba(246, 239, 224, .62); font-size: 13.5px; font-weight: 700; position: relative; }
.scene-nav button::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .22); }
.scene-nav button i { position: absolute; left: 0; top: 0; height: 2px; width: 0; border-radius: 2px; background: var(--accent); }
.scene-nav button.on { color: #fbf5e8; }
.scene-nav button.on i { animation: fill var(--dur, 7s) linear forwards; }
.scene-nav button.done i { width: 100%; }
@keyframes fill { to { width: 100%; } }
.scene-tip { min-height: 44px; margin: 10px 0 0; font-size: 14.5px; color: #e6dcc8; }
.scene-tip a { color: #f3c27f; font-weight: 700; text-decoration: none; white-space: nowrap; }
.below { padding-top: 6px; }
/* Portrait: the lede gives way so the heavy headline sits below the Brahmasthan (South), and a square Ask button
   pushes the main button into the South door padas (S3 Vitatha / S4 Gruhakshat) instead of S5 Yama at dead centre. */
@media (max-aspect-ratio: 1/1) {
  .halo { display: none; }
  .stage-in .lede { display: none; }
  .stage-in .row .btn.ghost { width: 50px; padding: 0; font-size: 0; gap: 0; }
  .stage-in .row .btn.ghost i { font-size: 22px; }
}
@media (min-aspect-ratio: 1/1) {
  .scrim { background: linear-gradient(90deg, rgba(8, 10, 18, .9) 0%, rgba(8, 10, 18, .62) 34%, rgba(8, 10, 18, 0) 62%), linear-gradient(180deg, rgba(8, 10, 18, .5) 0%, rgba(8, 10, 18, 0) 20%, rgba(8, 10, 18, 0) 70%, rgba(8, 10, 18, .6) 100%); }
  /* Landscape: the headline is anchored on the centre line (West, gains) and the main button leads the row so it lands in pada W3 Sugreev. */
  .stage-in { top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: flex-start; padding: calc(50dvh - 75px) 0 0 max(32px, calc(50vw - 600px)); max-width: none; width: min(560px, 44vw); box-sizing: content-box; }
  .scene img { object-position: 72% 20%; }
  .stage-in .lede { display: none; }
  .stage-in .row .btn.primary { order: -1; flex: none; }
  .halo { left: 22%; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: 70vh; }
  @keyframes turn { to { transform: translate(-50%, -50%) rotate(360deg); } }
}
@media (prefers-reduced-motion: reduce) { .scene img, .scene.on img { transform: none; transition: none; } .halo { animation: none; } }

/* Quick tools grid */
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tool { display: flex; flex-direction: column; gap: 6px; padding: 16px; min-height: 120px; border-radius: var(--r-card); background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--text); position: relative; overflow: hidden; }
.tool i { font-size: 28px; color: var(--accent-text); }
.tool b { font-size: 15.5px; line-height: 1.25; }
.tool span { font-size: 13px; color: var(--text-2); line-height: 1.35; }
.tool.wide { grid-column: span 2; flex-direction: row; align-items: center; gap: 14px; min-height: 96px; }
.tool.wide img { width: 84px; height: 84px; border-radius: var(--r); object-fit: cover; flex: none; }
.tool.feature { background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--card); border-color: var(--line-2); }
.tool:active { transform: scale(.985); }

/* Steps / wizard */
.steps { display: flex; gap: 6px; margin: 4px 0 18px; }
.steps span { flex: 1; height: 4px; border-radius: var(--r); background: var(--line-2); }
.steps span.on { background: var(--accent); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice button { text-align: left; padding: 16px; border-radius: var(--r-card); border: 1.5px solid var(--line); background: var(--card); min-height: 92px; display: flex; flex-direction: column; gap: 4px; }
.choice button i { font-size: 26px; color: var(--accent-text); }
.choice button.on { border-color: var(--accent); background: var(--accent-soft); }

/* Forms */
label.f { display: block; margin: 0 0 14px; }
label.f > span { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
label.f > small { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 5px; }
input[type=text], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--r-in); border: 1px solid var(--line-2); background: var(--card-2); color: var(--text); font-size: 16px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 34px; }

/* Verdict pills and severity */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--r); font-size: 12.5px; font-weight: 700; background: var(--card-2); border: 1px solid var(--line); }
.v-best { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.v-good { color: var(--ok); }
.v-neutral { color: var(--warn); }
.v-avoid { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.el-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* Compass */
.compass-wrap { position: relative; width: min(84vw, 380px); aspect-ratio: 1; margin: 6px auto 12px; }
.compass-wrap svg { width: 100%; height: 100%; display: block; }
.dial { transition: transform .12s linear; transform-origin: 50% 50%; }
.needle { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-top: 22px solid var(--accent); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .4)); }
.readout { text-align: center; }
.readout .deg { font: 600 56px/1 var(--font-d); }
.readout .z { font-weight: 700; font-size: 18px; color: var(--accent-text); }

/* Plan studio */
.plan-stage { position: relative; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); background: #fff; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.plan-stage img { width: 100%; height: auto; }
.plan-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.toggles { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.toggles::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--card); font-size: 14px; font-weight: 600; white-space: nowrap; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip i { font-size: 17px; }

/* Bars */
.bars { display: grid; gap: 7px; }
.bar { display: grid; grid-template-columns: 42px 1fr 58px; align-items: center; gap: 10px; font-size: 13.5px; }
.bar b { font-weight: 700; }
.bar .t { position: relative; height: 16px; }
.bar .t i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r); }
.bar .t .avg { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text-3); }
.bar .s { text-align: right; font-weight: 700; font-size: 12.5px; }

/* Lists of findings */
.finding { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.finding:first-child { border-top: 0; }
.finding .ic { width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center; background: var(--card-2); font-size: 20px; }
.finding ul { margin: 8px 0 0; padding-left: 18px; color: var(--text-2); font-size: 14.5px; }
.finding li { margin-bottom: 4px; }

/* Ayadi / tables */
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric { padding: 14px; border-radius: var(--r); background: var(--card-2); border: 1px solid var(--line); }
.metric small { display: block; color: var(--text-3); font-size: 12.5px; }
.metric b { display: block; font: 600 26px/1.1 var(--font-d); margin: 2px 0; }
.metric span { font-size: 13px; }
.score-ring { width: 120px; height: 120px; flex: none; }
.loshu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 260px; }
.loshu div { aspect-ratio: 1; border-radius: var(--r); background: var(--card-2); border: 1px solid var(--line); display: grid; place-items: center; text-align: center; font-size: 12px; color: var(--text-3); }
.loshu div b { display: block; font: 600 26px/1 var(--font-d); color: var(--text); }
.loshu div.miss { border-style: dashed; opacity: .6; }

/* Mandala */
.mandala { display: grid; grid-template-columns: repeat(9, 1fr); gap: 2px; font-size: 8.5px; text-align: center; }
.mandala div { aspect-ratio: 1; display: grid; place-items: center; border-radius: var(--r); background: var(--card-2); line-height: 1.05; padding: 1px; overflow: hidden; word-break: break-word; }
.mandala div.br { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.mandala div.in { background: color-mix(in srgb, var(--el-earth) 16%, var(--card-2)); }
.mandala div.out { background: color-mix(in srgb, var(--el-water) 12%, var(--card-2)); }

/* Accordion */
details.acc { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); margin-bottom: 8px; }
details.acc summary { list-style: none; padding: 14px 16px; display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary .ar { margin-left: auto; transition: transform .2s; }
details.acc[open] summary .ar { transform: rotate(180deg); }
details.acc .in { padding: 0 16px 16px; color: var(--text-2); font-size: 15px; }

/* Chat */
.chat { display: flex; flex-direction: column; min-height: calc(100dvh - var(--top-h) - var(--tab-h) - 60px); }
.chat-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.chat-head img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.msgs { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 8px 0 12px; }
.msg { max-width: 88%; padding: 12px 15px; border-radius: var(--r); font-size: 15.5px; line-height: 1.5; white-space: pre-wrap; }
.msg.z { background: var(--card); border: 1px solid var(--line);  align-self: flex-start; }
.msg.u { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);  align-self: flex-end; }
.msg img { border-radius: var(--r); margin-bottom: 8px; max-height: 220px; }
.msg .tool-link { margin-top: 10px; }
.typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.composer { position: sticky; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 8px); display: flex; gap: 8px; align-items: flex-end; padding: 8px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.composer textarea { min-height: 44px; max-height: 140px; border: 0; background: transparent; resize: none; padding: 10px 6px; outline: none; }
.composer .icon-btn { width: 44px; height: 44px; }
.composer .send { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.composer .rec { background: var(--bad); color: #fff; }
.attach-prev { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin: 0 0 6px 6px; }
.attach-prev img { width: 44px; height: 44px; border-radius: var(--r); object-fit: cover; }

/* Camera walkthrough */
.cam { position: relative; border-radius: var(--r-card); overflow: hidden; background: #05070d; aspect-ratio: 3 / 4; }
.cam video, .cam canvas, .cam img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam .hud { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; justify-content: space-between; gap: 8px; }
.cam .hud .pill { background: rgba(5, 7, 13, .7); color: #f2ead9; border-color: rgba(255, 255, 255, .2); }
.cam .ring { position: absolute; left: 50%; bottom: 14px; width: 120px; height: 120px; transform: translateX(-50%); opacity: .92; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; border: 2px solid #fff; box-shadow: 0 0 0 6px rgba(226, 104, 77, .3); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(226, 104, 77, 0); } }

/* Map */
#map { height: 62dvh; border-radius: var(--r-card); border: 1px solid var(--line); z-index: 1; }

/* Toast */
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tab-h) + 24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: var(--r); font-weight: 600; font-size: 14.5px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }

/* Skeleton */
.skel { border-radius: var(--r); background: linear-gradient(90deg, var(--card-2), var(--line), var(--card-2)); background-size: 200% 100%; animation: sh 1.4s infinite; height: 16px; margin: 8px 0; }
@keyframes sh { to { background-position: -200% 0; } }

/* Report */
.report-head { display: flex; gap: 16px; align-items: center; }
.report-head img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: var(--r); vertical-align: -3px; border: 1px solid var(--line-2); margin-right: 6px; }

@media (min-width: 720px) {
  .tools { grid-template-columns: repeat(4, 1fr); }
  .tool.wide { grid-column: span 4; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  .top, .tabs, .no-print, .composer { display: none !important; }
  html, body { background: #fff; color: #111; }
  main { padding: 0; max-width: none; }
  .card { break-inside: avoid; border-color: #ddd; background: #fff; }
  :root { --text: #111; --text-2: #333; --text-3: #555; --card: #fff; --card-2: #f6f6f6; --line: #ddd; --line-2: #ccc; --accent-text: #9a520b; }
}

/* Full width, square tiled layout (kd 2026-10-25 Vastu pass) */
.tools { gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tool { border: 0; border-radius: 0; }
@media (max-width: 719px) {
  .card, details.acc, .tools, .plan-stage, .cam, #map, .composer { margin-left: -16px; margin-right: -16px; border-left: 0; border-right: 0; }
  .card, details.acc { border-radius: 0; }
}
@media (min-width: 720px) {
  main { padding-left: 32px; padding-right: 32px; }
  .view > .card, .view > details.acc { max-width: none; }
}

/* Page Vastu overlay */
.vz-btn { margin-top: 14px; background: none; border: 0; padding: 0; color: #f3c27f; font-weight: 700; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.vz-overlay { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.vz-overlay svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.vz-sheet { position: fixed; z-index: 81; left: 0; right: 0; bottom: 0; max-height: 58dvh; overflow: auto; background: var(--bg-2); color: var(--text); border-top: 2px solid var(--accent); padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 50px rgba(0, 0, 0, .4); }
.vz-sheet h3 { margin-bottom: 4px; }
.vz-sheet .row { justify-content: space-between; }
@media (min-width: 900px) { .vz-sheet { left: auto; top: 0; width: 420px; max-height: none; border-top: 0; border-left: 2px solid var(--accent); padding-top: 24px; } }

/* Hero tip: Karun's live line */
.scene-tip { display: flex; gap: 10px; align-items: flex-start; }
.scene-tip img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; border: 1.5px solid #e9963a; }
.scene-tip span { font-style: italic; }

/* Live walkthrough HUD. Text here sits on camera video, so it is always ivory on dark glass. */
body.fullcam .top, body.fullcam .tabs { display: none; }
body.fullcam main { padding: 0; max-width: none; }
.walk { position: fixed; inset: 0; z-index: 40; background: #05070d; color: #f6efe0; overflow: hidden; }
.walk video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.walk-intro { position: absolute; inset: 0; z-index: 3; }
.walk-intro > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.walk-intro::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 10, 18, .35) 0%, rgba(8, 10, 18, 0) 25%, rgba(8, 10, 18, .85) 58%, rgba(8, 10, 18, .97) 100%); }
.walk-intro-in { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 0 20px calc(26px + env(safe-area-inset-bottom)); max-width: 620px; }
.walk-intro-in .kicker { font-size: 13px; font-weight: 700; color: #f3c27f; margin: 0 0 8px; }
.walk-intro-in h1 { color: #fbf5e8; font-size: clamp(36px, 10vw, 60px); }
.walk-intro-in .lede { color: #e6dcc8; max-width: 36ch; }
.walk-perms { list-style: none; display: flex; gap: 16px; padding: 0; margin: 4px 0 18px; font-size: 14px; font-weight: 700; color: #e6dcc8; }
.walk-perms i { color: #f3c27f; font-size: 18px; vertical-align: -3px; margin-right: 4px; }
.walk-intro-in .row { flex-wrap: nowrap; }
.walk-intro-in .btn.ghost { width: 50px; padding: 0; flex: none; background: rgba(10, 12, 20, .45); border-color: rgba(255, 255, 255, .28); color: #f6efe0; }
.walk-intro-in .btn.primary { flex: 1 1 auto; }
.hud { position: absolute; inset: 0; z-index: 2; }
.hud-top { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 12px; display: flex; gap: 8px; align-items: center; } /* top right (NE) stays empty */
.hud-btn { width: 48px; height: 48px; border-radius: var(--r); border: 1px solid rgba(255, 255, 255, .22); background: rgba(8, 10, 18, .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #f6efe0; display: grid; place-items: center; font-size: 22px; position: relative; }
.hud-btn em { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #e9963a; color: #1b1206; font: 800 12px/20px var(--font-b); font-style: normal; }
.hud-btn.rec { background: #c8452f; border-color: #c8452f; }
.hud-pill { height: 34px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: var(--r); background: rgba(8, 10, 18, .55); border: 1px solid rgba(255, 255, 255, .2); font-weight: 800; font-size: 13.5px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hud-status { position: absolute; left: 50%; top: calc(70px + env(safe-area-inset-top)); transform: translateX(-50%); padding: 7px 14px; border-radius: var(--r); background: rgba(233, 150, 58, .92); color: #1b1206; font-weight: 800; font-size: 13px; opacity: 0; transition: opacity .3s; pointer-events: none; }
.hud-status.on { opacity: 1; animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .6; } }
.reticle { position: absolute; left: 50%; top: 44%; width: 120px; height: 120px; transform: translate(-50%, -50%); pointer-events: none; }
.reticle i { position: absolute; width: 22px; height: 22px; border: 2px solid rgba(246, 239, 224, .75); }
.reticle i:nth-child(1) { left: 0; top: 0; border-right: 0; border-bottom: 0; } .reticle i:nth-child(2) { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.reticle i:nth-child(3) { left: 0; bottom: 0; border-right: 0; border-top: 0; } .reticle i:nth-child(4) { right: 0; bottom: 0; border-left: 0; border-top: 0; }
#pins { position: absolute; inset: 0; pointer-events: none; }
.apin { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 6px; transition: opacity .25s; will-change: transform; }
.apin span { width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; border: 2px solid #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; box-shadow: 0 0 0 0 var(--c); flex: none; }
.apin em { font-style: normal; font-size: 12.5px; font-weight: 800; background: rgba(8, 10, 18, .7); padding: 3px 8px; border-radius: var(--r); white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.apin.flip { flex-direction: row-reverse; }
.apin.on span { animation: ping 1.1s ease-out infinite; transform: scale(1.18); }
.apin.on em { background: #e9963a; color: #1b1206; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 var(--c); } 100% { box-shadow: 0 0 0 16px rgba(0, 0, 0, 0); } }
.karun-pip { position: absolute; left: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); width: 84px; text-align: center; }
.karun-pip img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--r); border: 2px solid rgba(255, 255, 255, .5); box-shadow: 0 10px 28px rgba(0, 0, 0, .5); transition: border-color .3s; }
.karun-pip b { display: block; font-size: 12px; margin-top: 4px; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.karun-pip.talk img { border-color: #e9963a; }
.karun-pip .bars { position: absolute; left: 6px; bottom: 26px; display: flex; gap: 2px; align-items: flex-end; height: 16px; padding: 2px 4px; background: rgba(8, 10, 18, .7); border-radius: var(--r); opacity: 0; transition: opacity .2s; }
.karun-pip.talk .bars { opacity: 1; }
.karun-pip .bars i { width: 3px; height: 4px; background: #e9963a; animation: eq .9s ease-in-out infinite; }
.karun-pip .bars i:nth-child(2) { animation-delay: .15s; } .karun-pip .bars i:nth-child(3) { animation-delay: .3s; } .karun-pip .bars i:nth-child(4) { animation-delay: .45s; }
@keyframes eq { 50% { height: 12px; } }
.caption { position: absolute; left: 12px; right: 72px; bottom: calc(126px + env(safe-area-inset-bottom)); max-width: 520px; padding: 10px 13px; border-radius: var(--r); background: rgba(8, 10, 18, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-left: 3px solid #e9963a; font-size: 15.5px; line-height: 1.45; min-height: 0; }
.caption:empty { display: none; }
.caption b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e9963a; color: #1b1206; font-size: 12px; margin-right: 4px; }
.shutter { position: absolute; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); height: 56px; padding: 0 18px; border-radius: var(--r); border: 2px solid #fff; background: rgba(233, 150, 58, .95); color: #1b1206; font-weight: 800; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.shutter i { font-size: 22px; }
.shutter:active { transform: translateX(-50%) scale(.97); }
.hud-ctrl { position: absolute; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.walk-sheet { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; max-height: 72dvh; overflow: auto; background: var(--bg-2); color: var(--text); border-top: 2px solid #e9963a; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
@media (min-aspect-ratio: 1/1) { .walk-intro > img { object-position: 50% 30%; } .walk-intro-in { left: max(32px, calc(50vw - 600px)); bottom: 40px; padding: 0; } .walk-sheet { left: auto; top: 0; width: 420px; max-height: none; border-top: 0; border-left: 2px solid #e9963a; } }
@media (prefers-reduced-motion: reduce) { .apin.on span, .karun-pip .bars i, .hud-status.on { animation: none; } }

/* Home bands after the hero (full width, square tiles) */
.band { margin: 34px 0 0; }
.band h2 { margin-bottom: 10px; }
.plan-band { display: grid; gap: 18px; align-items: center; }
.band-copy p { color: var(--text-2); max-width: 46ch; font-size: 17px; }
.band-art { margin: 0; }
.band-art img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); }
.link-btn { background: none; border: 0; padding: 12px 0 0; color: var(--accent-text); font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.plan-now { display: flex; gap: 12px; align-items: center; padding: 10px; margin: 0 0 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.plan-now img { width: 76px; height: 60px; object-fit: contain; background: #fff; border-radius: var(--r); flex: none; }
.plan-now b, .plan-now span { display: block; }
.duo { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.duo-tile { display: block; position: relative; background: var(--card); color: var(--text); text-decoration: none; }
.duo-tile img, .duo-tile video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #0b0d16; }
.duo-tile div { padding: 14px 16px 18px; }
.duo-tile b { display: block; font-size: 17px; margin-bottom: 4px; }
.duo-tile span { color: var(--text-2); font-size: 14.5px; }
@media (min-width: 820px) { .plan-band { grid-template-columns: 1.05fr 1fr; gap: 40px; } .duo { grid-template-columns: 1fr 1fr; } }
@media (max-width: 719px) { .band-art, .duo { margin-left: -16px; margin-right: -16px; } .duo { border-left: 0; border-right: 0; } }

/* 3D and video studio */
.next-step { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--text); border-color: var(--accent); }
.next-step img { width: 96px; height: 64px; object-fit: cover; border-radius: var(--r); flex: none; }
.next-step b, .next-step span { display: block; } .next-step span { color: var(--text-2); font-size: 14px; } .next-step > i { margin-left: auto; font-size: 22px; color: var(--accent-text); }
.refs { display: flex; gap: 8px; flex-wrap: wrap; }
.ref { position: relative; width: 78px; height: 78px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line-2); background: var(--card-2); }
.ref img { width: 100%; height: 100%; object-fit: cover; }
.ref button { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; border: 0; border-radius: var(--r); background: rgba(8, 10, 18, .7); color: #fff; display: grid; place-items: center; }
.ref.add { display: grid; place-items: center; align-content: center; gap: 2px; color: var(--accent-text); font-weight: 700; font-size: 12px; cursor: pointer; }
.ref.add i { font-size: 22px; }
.space-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 14px; }
@media (min-width: 640px) { .space-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .space-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 719px) { .space-grid { margin-left: -16px; margin-right: -16px; border-left: 0; border-right: 0; } }
.space { background: var(--card); }
.space-img { position: relative; aspect-ratio: 16 / 9; background: #fff; overflow: hidden; }
.space-img canvas, .space-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.space-img .busy { position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: var(--r); background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 12.5px; }
.pad { padding: 12px 14px 14px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .render { width: 100%; display: block; }
.tour { margin: 0 0 12px; padding-left: 22px; }
.tour li { padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tour label { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.tour input { width: 20px; height: 20px; accent-color: var(--accent); }
.player { position: relative; margin-top: 14px; background: #000; }
.player video { width: 100%; aspect-ratio: 16 / 9; display: block; background: #000; }
.pcap { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--card-2); border-top: 2px solid var(--accent); font-size: 14px; }
.pcap img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.pcap b { display: block; }
@media (max-width: 719px) { .player { margin-left: -16px; margin-right: -16px; } }

/* 10 tiles: 2 rows of 5 on wide screens, 5 rows of 2 on phones, never an empty cell */
@media (min-width: 720px) { .tools.five { grid-template-columns: repeat(5, 1fr); } }

/* Walkthrough v2: permissions, compass tape, sensors, recording, visualise it, AR overlay */
.perm-list { list-style: none; margin: 4px 0 16px; padding: 0; display: grid; gap: 6px; }
.perm-list li { display: grid; grid-template-columns: 28px 1fr 24px; gap: 10px; align-items: center; padding: 9px 12px; background: rgba(8, 10, 18, .55); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--r); }
.perm-list li > i { font-size: 20px; color: #f3c27f; }
.perm-list li span { font-size: 12.5px; color: #cfc6b4; line-height: 1.35; }
.perm-list li b { display: block; color: #f6efe0; font-size: 14px; }
.perm-list li em { font-style: normal; font-size: 20px; }
.perm-list li.ok em { color: #62b87d; } .perm-list li.no em { color: #e57a62; } .perm-list li.no { border-color: rgba(229, 122, 98, .5); }
.perm-list li.wait em i { display: inline-block; animation: spin 1s linear infinite; color: #f3c27f; }
@keyframes spin { to { transform: rotate(360deg); } }
.tape { position: absolute; top: calc(66px + env(safe-area-inset-top)); left: 12px; width: min(62vw, 420px); height: 40px; overflow: hidden; border-radius: var(--r); background: rgba(8, 10, 18, .55); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.tape-in { position: absolute; left: 50%; top: 0; bottom: 0; width: 4320px; will-change: transform; }
.tape-in i { position: absolute; bottom: 0; width: 1px; height: 7px; background: rgba(246, 239, 224, .5); }
.tape-in i.big { height: 12px; background: rgba(246, 239, 224, .85); }
.tape-in b { position: absolute; top: 5px; transform: translateX(-50%); font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.tape-in b.card { font-size: 14px; color: #fbf5e8 !important; top: 3px; }
.tape-mark { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #e9963a; }
.tape-deg { position: absolute; left: 50%; bottom: 1px; transform: translateX(-50%); font-size: 10px; font-weight: 800; color: #e9963a; background: rgba(8, 10, 18, .85); padding: 0 4px; }
.sensors { position: absolute; top: calc(112px + env(safe-area-inset-top)); left: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 9px; border: 0; border-radius: var(--r); background: rgba(8, 10, 18, .5); color: #e6dcc8; font: 600 11px/1.35 var(--font-b); font-variant-numeric: tabular-nums; text-align: left; max-width: 62vw; }
.sensors span:not(:first-child) { display: none; }
.sensors.open span { display: block; }
.hud-pill.rec { background: rgba(200, 69, 47, .9); border-color: transparent; gap: 6px; }
.hud-pill.rec i { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: breathe 1s infinite; }
.hud-btn.rec { background: #c8452f; border-color: #c8452f; }
.hud-btn.sm { width: 36px; height: 36px; font-size: 18px; }
.hud-more { position: absolute; right: 72px; bottom: calc(14px + env(safe-area-inset-bottom)); display: grid; gap: 8px; padding: 12px; background: rgba(8, 10, 18, .85); border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--r); font-size: 13.5px; font-weight: 600; max-width: 240px; }
.hud-more label { display: flex; gap: 8px; align-items: center; }
.hud-more input { width: 18px; height: 18px; accent-color: #e9963a; flex: none; }
.apin { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.apin.old span { box-shadow: none; border-style: dashed; }
.arimg { position: absolute; z-index: 1; object-fit: cover; pointer-events: none; transition: opacity .2s; }
.ar-bar { position: absolute; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 10px; align-items: center; padding: 6px 8px 6px 14px; background: rgba(8, 10, 18, .8); border-radius: var(--r); font-size: 12.5px; font-weight: 800; z-index: 3; }
.ar-bar input { width: 110px; accent-color: #e9963a; }
.flash { position: absolute; inset: 0; z-index: 9; background: #fff; animation: flash .4s ease-out forwards; pointer-events: none; }
@keyframes flash { from { opacity: .85; } to { opacity: 0; } }
.viz { position: absolute; inset: 0; z-index: 6; background: rgba(5, 7, 13, .96); overflow: auto; padding: calc(12px + env(safe-area-inset-top)) 12px calc(20px + env(safe-area-inset-bottom)); }
.viz-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 16px; }
.viz-cmp { position: relative; overflow: hidden; border-radius: var(--r); background: #000; aspect-ratio: 3 / 4; max-height: 62dvh; margin: 0 auto; }
.viz-cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.viz-cmp .after { clip-path: inset(0 0 0 55%); }
.viz-cmp input { position: absolute; left: 0; right: 0; bottom: 12px; width: 92%; margin: 0 4%; accent-color: #e9963a; z-index: 2; }
.viz-cmp .lbl { position: absolute; top: 10px; padding: 3px 8px; font-size: 12px; font-weight: 800; background: rgba(8, 10, 18, .7); border-radius: var(--r); }
.viz-cmp .lbl.l { left: 10px; } .viz-cmp .lbl.r { right: 10px; background: #e9963a; color: #1b1206; }
.viz-wait { position: absolute; inset: auto 16px 16px; display: grid; gap: 6px; font-size: 13.5px; color: #e6dcc8; }
.viz-note { color: #e6dcc8; margin: 10px 0; }
.viz-edit { display: flex; gap: 8px; margin-bottom: 10px; }
.viz-edit input { flex: 1; min-height: 44px; padding: 10px 12px; border-radius: var(--r); border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); color: #f6efe0; }
.pnum { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font: 800 13px var(--font-b); vertical-align: 2px; }
.gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); margin: 10px -16px; }
.gal a { position: relative; display: block; aspect-ratio: 1; background: #000; }
.gal img { width: 100%; height: 100%; object-fit: cover; }
.gal span { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 5px; font-size: 10.5px; font-weight: 700; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gal a.visual::after { content: 'Visual'; position: absolute; top: 4px; left: 4px; padding: 1px 6px; font-size: 10px; font-weight: 800; background: #e9963a; color: #1b1206; border-radius: var(--r); }
@media (prefers-reduced-motion: reduce) { .perm-list li.wait em i, .hud-pill.rec i, .flash { animation: none; } }
