:root {
  color-scheme: dark;
  --bg: #101a1b;
  --panel: #172324;
  --panel-2: #1b2a2b;
  --line: rgba(232, 226, 207, .13);
  --text: #f2eee5;
  --muted: #a8b2ac;
  --muted-2: #778781;
  --teal: #55b8aa;
  --teal-2: #2d8f86;
  --gold: #d7bd81;
  --gold-dim: #947e52;
  --danger: #e18e79;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(ellipse at 70% 3%, rgba(52, 119, 108, .13), transparent 36%), var(--bg); }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { max-width: 1440px; margin: 0 auto; padding: 0 42px; }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand-mark { position: relative; display: grid; grid-template-columns: 8px 8px; gap: 3px; transform: rotate(45deg); width: 25px; height: 25px; align-content: center; justify-content: center; }
.brand-mark span { width: 8px; height: 8px; border: 1.5px solid var(--gold); border-radius: 2px; }
.brand-mark span:nth-child(2), .brand-mark span:nth-child(3) { background: var(--teal); border-color: var(--teal); }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 14px; letter-spacing: .17em; font-weight: 750; }
.brand-copy strong i { color: var(--teal); font-style: normal; }
.brand-copy small { color: var(--muted-2); text-transform: uppercase; font-size: 9px; letter-spacing: .17em; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.session-badge, .sensor-pill { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); border: 1px solid var(--line); border-radius: 30px; padding: 8px 12px; font-size: 11px; letter-spacing: .02em; }
.pulse-dot, .live-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(215,189,129,.10); }
.icon-button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: transparent; border-radius: 50%; cursor: pointer; transition: .2s; }
.icon-button:hover:not(:disabled) { border-color: var(--teal); color: var(--teal); }
.icon-button:disabled { opacity: .35; cursor: not-allowed; }
.icon-button svg, .subtle-button svg, .privacy-note svg, .primary-button svg, .camera-fallback svg, .expand-button svg, .tool-icon svg, .secondary-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
main { min-height: calc(100vh - 142px); }
.welcome-panel { min-height: 690px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 55px; padding: 70px 4.5% 78px; }
.intro-copy { max-width: 590px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--gold); font-size: 10px; letter-spacing: .2em; font-weight: 750; }
.eyebrow span { width: 22px; height: 1px; background: var(--gold); }
h1 { margin: 22px 0 18px; font-size: clamp(40px, 5vw, 65px); line-height: 1.08; letter-spacing: -.045em; font-weight: 520; }
h1 em { color: var(--teal); font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.035em; }
.intro-text { max-width: 480px; color: #b1bcb5; font-size: 15px; line-height: 1.75; margin: 0; }
.steps-line { display: grid; gap: 20px; margin: 34px 0 34px; }
.step-item { display: flex; align-items: center; gap: 15px; }
.step-item > span { width: 33px; height: 33px; border: 1px solid rgba(215,189,129,.35); border-radius: 50%; display: grid; place-items: center; color: var(--gold); font-size: 10px; font-weight: 700; }
.step-item div { display: grid; gap: 4px; }
.step-item b { font-size: 13px; font-weight: 600; }
.step-item small { color: var(--muted-2); font-size: 11px; }
.primary-button { width: min(100%, 390px); min-height: 72px; display: flex; align-items: center; gap: 15px; padding: 12px 18px; text-align: left; border: 1px solid rgba(85,184,170,.65); border-radius: 8px; background: linear-gradient(105deg, rgba(49,135,125,.27), rgba(33,65,62,.32)); cursor: pointer; box-shadow: 0 12px 35px rgba(0,0,0,.14); transition: transform .2s, border-color .2s, background .2s; }
.primary-button:hover { transform: translateY(-2px); border-color: var(--teal); background: rgba(49,135,125,.30); }
.primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 50%; background: rgba(85,184,170,.13); color: var(--teal); }
.button-icon svg { width: 22px; height: 22px; }
.primary-button span:nth-child(2) { flex: 1; display: grid; gap: 4px; }
.primary-button b { font-size: 13px; letter-spacing: .02em; }
.primary-button small { color: #9aaaa3; font-size: 10px; }
.button-arrow { color: var(--gold); }
.privacy-note { display: flex; gap: 8px; align-items: center; color: var(--muted-2); font-size: 10px; margin-top: 18px; }
.privacy-note svg { width: 14px; height: 14px; color: var(--teal); }
.intro-visual { position: relative; width: min(100%, 510px); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.visual-orbit { position: absolute; border: 1px solid rgba(215,189,129,.13); border-radius: 50%; }
.orbit-one { width: 100%; height: 100%; border-style: dashed; }
.orbit-two { width: 78%; height: 78%; border-color: rgba(85,184,170,.18); }
.visual-compass { position: relative; width: 69%; aspect-ratio: 1; border: 1px solid rgba(215,189,129,.3); border-radius: 50%; background: radial-gradient(circle, rgba(37,72,68,.55) 0%, rgba(21,39,39,.86) 65%, rgba(16,26,27,.1) 66%); box-shadow: 0 0 65px rgba(43,139,127,.10), inset 0 0 40px rgba(0,0,0,.3); }
.visual-compass:before, .visual-compass:after { content: ""; position: absolute; background: rgba(215,189,129,.26); left: 50%; top: 7%; transform: translateX(-50%); width: 1px; height: 86%; }
.visual-compass:after { transform: translateX(-50%) rotate(90deg); }
.visual-dir { position: absolute; color: var(--gold); font-size: 11px; letter-spacing: .1em; font-weight: 750; }
.dir-n { top: -9%; left: 50%; transform: translateX(-50%); }.dir-ne { right: 9%; top: 10%; }.dir-e { right: -10%; top: 50%; transform: translateY(-50%); }.dir-se { right: 9%; bottom: 10%; }.dir-s { bottom: -9%; left: 50%; transform: translateX(-50%); }.dir-sw { left: 9%; bottom: 10%; }.dir-w { left: -10%; top: 50%; transform: translateY(-50%); }.dir-nw { left: 9%; top: 10%; }
.visual-center { position: absolute; z-index: 2; inset: 50% auto auto 50%; transform: translate(-50%,-50%); display: grid; justify-items: center; gap: 9px; }
.visual-center small { color: #b8c4bc; font-size: 9px; letter-spacing: .22em; }
.yin-yang { width: 76px; height: 76px; border-radius: 50%; display: block; position: relative; overflow: hidden; background: #e8e5da; border: 1px solid rgba(255,255,255,.55); }
.yin-yang:before { content: ""; position: absolute; inset: 0 0 0 50%; background: #202827; }
.yin-yang:after { content: ""; position: absolute; width: 38px; height: 38px; border-radius: 50%; background: #e8e5da; top: 0; left: 19px; box-shadow: 0 38px 0 #202827; }
.yin-yang i, .yin-yang b { position: absolute; z-index: 2; width: 9px; height: 9px; border-radius: 50%; left: 33px; background: #202827; top: 14px; }
.yin-yang b { background: #e8e5da; top: 52px; }
.visual-tick { position: absolute; z-index: 1; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); }
.tick-n { top: 7%; left: calc(50% - 3px); }.tick-e { top: calc(50% - 3px); right: 7%; }.tick-s { bottom: 7%; left: calc(50% - 3px); }.tick-w { top: calc(50% - 3px); left: 7%; }
.visual-caption { position: absolute; bottom: 1%; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; align-items: center; width: max-content; font-size: 9px; letter-spacing: .17em; color: var(--muted-2); }
.caption-line { width: 24px; height: 1px; background: var(--teal); }
.footer { border-top: 1px solid var(--line); min-height: 60px; display: flex; align-items: center; justify-content: space-between; color: var(--muted-2); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.footer i { color: var(--teal); font-style: normal; }
.hidden { display: none !important; }
.experience { padding: 38px 0 26px; }
.workspace-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 25px; }
.workspace-head h1 { font-size: 34px; margin: 9px 0 0; letter-spacing: -.035em; }
.subtle-button { display: inline-flex; align-items: center; gap: 9px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; color: #c5cec7; background: rgba(255,255,255,.025); cursor: pointer; font-size: 11px; }
.subtle-button:hover { border-color: var(--gold-dim); color: var(--gold); }
.subtle-button svg { width: 16px; height: 16px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(315px, .85fr); gap: 20px; }
.camera-stage { height: clamp(390px, 53vw, 590px); position: relative; overflow: hidden; border-radius: 10px; border: 1px solid rgba(215,189,129,.20); background: radial-gradient(circle at 50% 48%, #253c3a, #142020 58%, #0c1516); isolation: isolate; }
#cameraVideo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(1); opacity: 0; transition: opacity .5s; }
.camera-stage.has-camera #cameraVideo { opacity: .83; }
.camera-fallback { position: absolute; z-index: -1; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; color: rgba(233,239,230,.6); text-align: center; background: radial-gradient(circle at 50% 45%, rgba(55,117,107,.22), transparent 37%), linear-gradient(135deg, #1d3331, #10191a); }
.fallback-symbol { display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid rgba(85,184,170,.35); border-radius: 50%; color: var(--teal); }
.fallback-symbol svg { width: 27px; height: 27px; }
.camera-fallback b { color: #d4ddd4; font-size: 13px; font-weight: 600; }
.camera-fallback span { color: #879a91; font-size: 11px; }
.camera-stage.has-camera .camera-fallback { opacity: 0; }
.camera-vignette { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,12,12,.40), transparent 24%, transparent 62%, rgba(5,12,12,.7)); pointer-events: none; }
.stage-topline { position: absolute; top: 18px; left: 18px; right: 18px; display: flex; align-items: center; justify-content: space-between; }
.live-pill { display: inline-flex; gap: 9px; align-items: center; color: #e7eee8; padding: 8px 11px; border: 1px solid rgba(255,255,255,.19); border-radius: 20px; background: rgba(10,19,19,.48); font-size: 9px; letter-spacing: .12em; backdrop-filter: blur(12px); }
.live-pill i { background: #72d2a6; box-shadow: 0 0 0 4px rgba(114,210,166,.12); }
.sensor-pill { background: rgba(10,19,19,.43); border-color: rgba(255,255,255,.16); backdrop-filter: blur(12px); font-size: 9px; padding: 8px 10px; }
.viewfinder { position: absolute; width: 124px; height: 124px; top: 50%; left: 50%; transform: translate(-50%,-50%); opacity: .45; }
.viewfinder:before, .viewfinder:after { content: ""; position: absolute; background: rgba(235,229,205,.45); }
.viewfinder:before { width: 1px; height: 100%; left: 50%; }.viewfinder:after { height: 1px; width: 100%; top: 50%; }
.viewfinder span, .viewfinder i { position: absolute; width: 20px; height: 20px; border: 1px solid var(--gold); }
.viewfinder span { top: 0; left: 0; border-right: 0; border-bottom: 0; }.viewfinder i { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.heading-overlay { position: absolute; top: 19%; left: 50%; transform: translateX(-50%); text-align: center; display: grid; gap: 4px; text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.heading-label { color: #d9cda8; font-size: 8px; letter-spacing: .18em; }
.heading-overlay strong { font-size: 29px; font-weight: 550; letter-spacing: -.04em; }
.heading-overlay small { color: #d4d7c9; font-size: 10px; }
.stage-bottomline { position: absolute; left: 20px; right: 20px; bottom: 20px; display: flex; justify-content: space-between; align-items: end; }
.metric { display: grid; gap: 6px; }.metric span { color: #bac7bd; font-size: 8px; letter-spacing: .15em; }.metric strong { color: #fff; font-size: 31px; line-height: 1; font-weight: 550; letter-spacing: -.04em; text-shadow: 0 2px 10px rgba(0,0,0,.7); }.metric strong small { font-size: 13px; color: var(--gold); }
.metric-right { text-align: right; }.metric-right strong { font-size: 25px; }
.center-marker { position: absolute; bottom: 85px; left: 50%; transform: translateX(-50%); white-space: nowrap; display: none; align-items: center; gap: 8px; border: 1px solid rgba(215,189,129,.5); background: rgba(18,31,30,.72); color: #e7d5a4; border-radius: 20px; padding: 7px 11px; font-size: 8px; letter-spacing: .13em; backdrop-filter: blur(10px); }
.center-marker.visible { display: flex; }.center-marker span { width: 5px; height: 5px; background: var(--gold); border-radius: 50%; box-shadow: 0 0 0 4px rgba(215,189,129,.15); }
.camera-footnote { display: flex; align-items: center; gap: 8px; padding: 12px 3px; color: var(--muted-2); font-size: 10px; min-height: 42px; }
.status-led { width: 6px; height: 6px; flex: 0 0 auto; background: var(--teal); border-radius: 50%; box-shadow: 0 0 0 4px rgba(85,184,170,.1); }
.camera-footnote > span:nth-child(2) { flex: 1; }
.text-button { padding: 2px 4px; border: 0; background: transparent; color: var(--gold); cursor: pointer; font-size: 10px; }
.text-button:hover { text-decoration: underline; }
.info-column { display: flex; flex-direction: column; gap: 15px; }
.current-card, .rose-card, .tool-card { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(31,48,47,.88), rgba(21,34,34,.93)); border-radius: 9px; }
.current-card { padding: 20px 20px 14px; }
.card-topline, .theme-row { display: flex; align-items: center; justify-content: space-between; color: var(--muted-2); font-size: 8px; letter-spacing: .16em; }
.sector-code { color: var(--teal); border: 1px solid rgba(85,184,170,.28); border-radius: 3px; padding: 5px 7px; font-size: 8px; }
.current-title-row { display: flex; align-items: center; justify-content: space-between; margin-top: 17px; }
.direction-kicker { color: var(--gold); font-size: 9px; letter-spacing: .15em; margin-bottom: 4px; }
.current-title-row h2 { margin: 0; font-size: 36px; line-height: 1; font-weight: 540; letter-spacing: -.04em; }
.trigram-symbol { width: 48px; height: 48px; display: grid; place-items: center; color: var(--teal); font-size: 40px; border: 1px solid rgba(85,184,170,.22); border-radius: 50%; background: rgba(85,184,170,.06); }
.element-label { margin-top: 9px; font-family: Georgia, serif; font-size: 14px; color: #b3c5b9; }
.card-divider { height: 1px; background: var(--line); margin: 18px 0 13px; }
.theme-row { align-items: start; gap: 10px; }.theme-row strong { color: #e5d9be; font-size: 11px; font-weight: 550; letter-spacing: .01em; text-align: right; }
.expand-button { margin-top: 17px; width: 100%; border: 0; padding: 12px 0 2px; border-top: 1px solid var(--line); background: transparent; color: var(--teal); display: flex; align-items: center; justify-content: space-between; cursor: pointer; text-align: left; font-size: 11px; }
.expand-button svg { width: 16px; height: 16px; transition: transform .2s; }.expand-button[aria-expanded="true"] svg { transform: rotate(180deg); }
.description-panel { padding-top: 12px; color: #aebbb1; font-size: 11px; line-height: 1.65; }.description-panel p { margin: 0 0 10px; }.description-tags { display: flex; flex-wrap: wrap; gap: 6px; }.description-tags span { padding: 5px 7px; border-radius: 20px; color: #d1c5a3; background: rgba(215,189,129,.08); border: 1px solid rgba(215,189,129,.13); font-size: 9px; }
.rose-card { padding: 17px 20px 14px; flex: 1; }.rose-header { display: flex; justify-content: space-between; align-items: center; }.rose-header > div { display: grid; gap: 4px; }.small-label { color: var(--muted-2); font-size: 8px; letter-spacing: .16em; }.rose-header b { font-size: 13px; font-weight: 550; }.north-indicator { color: var(--gold); font-size: 8px; letter-spacing: .1em; }
.rose-grid { margin: 17px auto 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; width: min(100%, 290px); aspect-ratio: 1; }
.rose-cell, .rose-center { border: 1px solid rgba(232,226,207,.10); border-radius: 5px; background: rgba(255,255,255,.025); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; transition: .2s; }
.rose-cell span { color: #82958c; font-size: 8px; letter-spacing: .12em; }.rose-cell b { color: #c3cec4; font-size: 10px; font-weight: 550; }
.rose-cell.active { border-color: var(--teal); background: rgba(64,160,146,.17); box-shadow: inset 0 0 20px rgba(85,184,170,.08), 0 0 12px rgba(85,184,170,.07); }.rose-cell.active span, .rose-cell.active b { color: #8de0d2; }
.rose-center { background: rgba(215,189,129,.07); border-color: rgba(215,189,129,.20); }.mini-yin { color: var(--gold); font-size: 27px; line-height: 1; }.rose-center small { color: #b7a77e; font-size: 7px; letter-spacing: .17em; }
.rose-hint { margin: 0; color: var(--muted-2); font-size: 9px; line-height: 1.5; text-align: center; }
.bottom-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 15px; }.tool-card { min-height: 78px; display: flex; align-items: center; padding: 14px 16px; gap: 12px; }.tool-icon { width: 35px; height: 35px; border-radius: 50%; display: grid; place-items: center; color: var(--teal); background: rgba(85,184,170,.10); }.tool-icon svg { width: 18px; }.tool-copy { display: grid; gap: 4px; flex: 1; }.tool-copy b { font-size: 11px; font-weight: 550; }.tool-copy small, .settings-card > small { font-size: 9px; color: var(--muted-2); }.saved-check { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 50%; color: var(--teal); border: 1px solid rgba(85,184,170,.35); font-size: 11px; }
.settings-card { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; align-content: center; }.settings-card label { color: #d9e0d7; font-size: 10px; }.stride-control { display: flex; align-items: center; gap: 9px; }.stride-control input { width: 125px; accent-color: var(--teal); }.stride-control output { min-width: 45px; color: var(--gold); font-size: 10px; }.settings-card > small { grid-column: 1 / -1; }
.disclaimer { color: #778780; font-size: 9px; line-height: 1.65; margin: 14px 2px 0; }.disclaimer strong { color: #a5b1a8; font-weight: 600; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 28px; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; padding: 12px 16px; color: #e8eee5; border: 1px solid rgba(85,184,170,.35); background: rgba(16,31,30,.95); border-radius: 7px; box-shadow: 0 12px 35px rgba(0,0,0,.35); font-size: 11px; max-width: calc(100vw - 30px); text-align: center; transition: .25s; }.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.permission-dialog { width: min(420px, calc(100% - 32px)); padding: 30px; border: 1px solid rgba(85,184,170,.3); border-radius: 12px; color: var(--text); background: #172625; box-shadow: 0 20px 80px rgba(0,0,0,.55); text-align: center; }.permission-dialog::backdrop { background: rgba(3,10,10,.72); backdrop-filter: blur(5px); }.dialog-mark { width: 54px; height: 54px; display: grid; place-items: center; border: 1px solid rgba(85,184,170,.3); color: var(--teal); border-radius: 50%; margin: 0 auto 15px; }.dialog-mark svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.6; }.permission-dialog h2 { margin: 0 0 8px; font-size: 20px; font-weight: 600; }.permission-dialog p { color: #aab8af; font-size: 12px; line-height: 1.65; margin: 0; }.permission-progress { margin: 18px 0; color: var(--gold); font-size: 11px; }.secondary-button { border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.04); padding: 10px 18px; font-size: 11px; cursor: pointer; }.secondary-button:hover { border-color: var(--teal); }
@media (max-width: 980px) {
  .app-shell { padding: 0 25px; }.welcome-panel { padding-left: 1%; padding-right: 1%; gap: 25px; }.dashboard-grid { grid-template-columns: minmax(0, 1.25fr) minmax(290px, .9fr); gap: 14px; }.current-card { padding: 16px; }.rose-card { padding: 15px; }
}
@media (max-width: 760px) {
  .app-shell { padding: 0 16px; }.topbar { height: 70px; }.session-badge { font-size: 9px; padding: 7px 9px; }.welcome-panel { min-height: auto; grid-template-columns: 1fr; padding: 56px 0 50px; gap: 45px; }.intro-copy { max-width: none; }.intro-text { font-size: 14px; }.intro-visual { width: min(82vw, 390px); order: -1; margin-top: 3px; }.visual-compass { width: 65%; }.yin-yang { width: 62px; height: 62px; }.yin-yang:after { width: 31px; height: 31px; left: 15px; box-shadow: 0 31px 0 #202827; }.yin-yang i, .yin-yang b { left: 27px; top: 11px; width: 7px; height: 7px; }.yin-yang b { top: 43px; }.visual-center small { font-size: 7px; }.visual-caption { font-size: 7px; }
  .experience { padding-top: 28px; }.workspace-head { align-items: end; margin-bottom: 17px; }.workspace-head h1 { font-size: 28px; }.subtle-button { font-size: 10px; padding: 9px 10px; }.dashboard-grid { grid-template-columns: 1fr; }.camera-stage { height: min(118vw, 520px); min-height: 390px; }.info-column { display: grid; grid-template-columns: 1fr; }.rose-card { order: 2; }.current-card { order: 1; }.rose-grid { width: min(77vw, 280px); }.bottom-tools { grid-template-columns: 1fr; gap: 10px; }.tool-card { min-height: 70px; }.footer { gap: 12px; font-size: 8px; }.footer span:last-child { text-align: right; }
}
@media (max-width: 390px) {
  .app-shell { padding: 0 12px; }.brand-copy strong { font-size: 12px; }.brand-copy small { font-size: 8px; }.session-badge { display: none; }.workspace-head h1 { font-size: 24px; }.camera-stage { min-height: 365px; }.heading-overlay { top: 21%; }.metric strong { font-size: 27px; }.metric-right strong { font-size: 22px; }
}

/* Full-screen camera AR experience (v0.2). */
body.is-ar { overflow: hidden; background: #050a0a; }
body.is-ar .app-shell { width: 100%; max-width: none; margin: 0; padding: 0; }
body.is-ar .topbar, body.is-ar .footer { display: none; }
body.is-ar main { min-height: 0; }
.ar-experience { position: fixed; inset: 0; z-index: 50; padding: 0; margin: 0; }
.ar-experience.hidden { display: none !important; }
.camera-stage {
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh;
  min-height: 0; border: 0; border-radius: 0; overflow: hidden;
  background: #101a1b; isolation: isolate;
}
#cameraVideo { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: none; }
.camera-stage.has-camera #cameraVideo { opacity: 1; }
.camera-fallback { z-index: 0; background: radial-gradient(circle at 50% 40%, rgba(55,117,107,.28), transparent 40%), #101a1b; }
.camera-stage.has-camera .camera-fallback { opacity: 0; }
.camera-vignette { position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(4,10,10,.62), transparent 24%, transparent 55%, rgba(4,10,10,.72)); }
.ar-topline { position: absolute; z-index: 8; top: max(12px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left)); right: max(14px, env(safe-area-inset-right)); display: flex; align-items: center; justify-content: space-between; gap: 12px; pointer-events: none; }
.ar-top-left { display: flex; align-items: center; gap: 9px; min-width: 0; pointer-events: auto; }
.ar-icon-button { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: rgba(7,16,16,.48); color: #fff; backdrop-filter: blur(16px); cursor: pointer; }
.ar-icon-button:disabled { opacity: .45; }
.ar-icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ar-session-stack { min-width: 0; display: grid; gap: 4px; }
.ar-session-badge { display: flex; align-items: center; gap: 7px; color: #fff; font-size: 10px; font-weight: 650; letter-spacing: .03em; text-shadow: 0 1px 8px #000; }
.ar-session-badge i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #68d6b8; box-shadow: 0 0 0 4px rgba(104,214,184,.16); }
.ar-sensor-status { color: rgba(255,255,255,.72); font-size: 9px; text-shadow: 0 1px 7px #000; }
.ar-heading-chip { min-width: 74px; display: grid; justify-items: end; gap: 1px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; background: rgba(7,16,16,.46); backdrop-filter: blur(16px); text-shadow: 0 1px 8px #000; }
.ar-heading-chip span { font-size: 7px; letter-spacing: .16em; color: rgba(255,255,255,.68); }
.ar-heading-chip strong { color: #fff; font-size: 17px; font-weight: 650; line-height: 1.1; }
.ar-heading-chip small { color: rgba(255,255,255,.72); font-size: 8px; }
.ar-reticle { position: absolute; z-index: 2; left: 50%; top: 48%; width: 18px; height: 18px; transform: translate(-50%,-50%); border: 1px solid rgba(255,255,255,.52); border-radius: 50%; opacity: .58; pointer-events: none; }
.ar-reticle:before, .ar-reticle:after { content: ""; position: absolute; left: 50%; top: 50%; background: rgba(255,255,255,.6); transform: translate(-50%,-50%); }
.ar-reticle:before { width: 30px; height: 1px; }.ar-reticle:after { width: 1px; height: 30px; }
.ar-reticle span { position: absolute; inset: 6px; border-radius: 50%; background: rgba(255,255,255,.85); }
.ar-center-marker { --marker-x: 50%; position: absolute; z-index: 5; left: var(--marker-x); top: 47%; transform: translate(-50%,-50%); display: flex; flex-direction: column; align-items: center; gap: 7px; max-width: 170px; pointer-events: none; filter: drop-shadow(0 3px 9px rgba(0,0,0,.75)); transition: left .18s ease; }
.center-marker-ring { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255,226,164,.95); border-radius: 50%; background: rgba(25,33,28,.28); box-shadow: 0 0 0 5px rgba(255,226,164,.10), 0 0 28px rgba(255,207,116,.28); }
.center-marker-ring:before, .center-marker-ring:after { content: ""; position: absolute; background: #ffe2a4; }
.center-marker-ring:before { width: 1px; height: 58px; }.center-marker-ring:after { height: 1px; width: 58px; }
.center-marker-ring i { z-index: 1; width: 8px; height: 8px; border-radius: 50%; background: #ffe2a4; box-shadow: 0 0 12px #ffe2a4; }
.center-marker-copy { display: grid; justify-items: center; gap: 3px; padding: 6px 9px; border-radius: 8px; border: 1px solid rgba(255,226,164,.32); background: rgba(8,15,14,.68); backdrop-filter: blur(12px); white-space: nowrap; }
.center-marker-copy b { color: #ffe6b2; font-size: 8px; letter-spacing: .12em; }
.center-marker-copy small { color: rgba(255,255,255,.86); font-size: 9px; }
.ar-center-marker.in-center { left: 50%; top: 48%; }
.ar-center-marker.in-center .center-marker-ring { width: 76px; height: 76px; border: 1px dashed rgba(255,226,164,.95); background: rgba(255,226,164,.08); box-shadow: 0 0 0 8px rgba(255,226,164,.08), 0 0 35px rgba(255,207,116,.30); }
.ar-center-marker.in-center .center-marker-ring:before { height: 92px; }.ar-center-marker.in-center .center-marker-ring:after { width: 92px; }
.ar-center-marker.edge .center-marker-ring { width: 38px; height: 38px; border-radius: 13px; }
.ar-center-marker.behind .center-marker-ring { border-color: #f4b08e; box-shadow: 0 0 0 5px rgba(244,176,142,.10); }
.ar-center-marker.behind .center-marker-ring i { background: #f4b08e; }
.ar-center-marker.no-heading { left: 50%; }
.ar-bottom-hud { position: absolute; z-index: 7; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; pointer-events: none; }
.ar-current-card, .ar-vastu-wheel { pointer-events: auto; background: rgba(7,17,17,.64); border: 1px solid rgba(255,255,255,.19); box-shadow: 0 10px 35px rgba(0,0,0,.22); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.ar-current-card { width: min(48vw, 245px); min-width: 0; padding: 10px 11px 8px; border-radius: 14px; }
.ar-current-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #e9d29b; font-size: 8px; letter-spacing: .12em; }
.ar-current-top span:last-child { color: rgba(255,255,255,.95); font-size: 12px; font-weight: 650; letter-spacing: 0; }
.ar-current-top small { font-size: 8px; color: #e9d29b; }
.ar-current-main { display: flex; justify-content: space-between; align-items: center; gap: 5px; margin-top: 6px; }
.ar-current-copy { min-width: 0; display: grid; gap: 2px; }
.ar-current-copy small { color: rgba(255,255,255,.72); font-size: 7px; letter-spacing: .13em; }
.ar-current-copy b { color: #fff; font-size: clamp(21px, 5vw, 29px); line-height: 1; font-weight: 620; letter-spacing: -.04em; }
.ar-current-copy span { color: #d8e0d9; font-size: 8px; }
.ar-trigram-symbol { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(98,208,190,.35); border-radius: 11px; color: #83ddcb; background: rgba(85,184,170,.10); font-size: 29px; }
.ar-current-footer { display: flex; justify-content: space-between; align-items: center; gap: 4px; margin-top: 7px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.75); font-size: 8px; }
.ar-current-footer span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-action-row { display: flex; align-items: center; gap: 13px; margin-top: 6px; }
.ar-text-action { border: 0; padding: 2px 0; color: #8ee0d0; background: transparent; font-size: 9px; cursor: pointer; }
.ar-text-action span { margin-left: 3px; color: #e3cf9e; }
.ar-text-action[aria-expanded="true"] { color: #ffe2a4; }
.ar-vastu-wheel { position: relative; width: clamp(132px, 26vw, 190px); height: clamp(132px, 26vw, 190px); flex: 0 0 auto; border-radius: 50%; padding: 4px; }
.ar-vastu-wheel svg { display: block; width: 100%; height: 100%; overflow: visible; }
.wheel-outline { fill: rgba(10,22,21,.14); stroke: rgba(255,255,255,.36); stroke-width: 1.2; }
.ar-sector { fill: rgba(19,35,33,.72); stroke: rgba(255,255,255,.27); stroke-width: 1; transition: fill .2s, stroke .2s; }
.ar-sector:nth-of-type(even) { fill: rgba(54,83,76,.55); }
.ar-sector.active { fill: rgba(52,181,159,.84); stroke: #c5fff0; stroke-width: 2.5; filter: drop-shadow(0 0 5px rgba(91,229,203,.75)); }
.ar-sector-label { pointer-events: none; }
.wheel-direction { fill: #e7eadf; font-size: 13px; font-weight: 700; }
.wheel-trigram { fill: #e1c88e; font-size: 9px; font-weight: 650; }
.ar-sector-label.active .wheel-direction, .ar-sector-label.active .wheel-trigram { fill: #062d27; }
.wheel-center { fill: rgba(9,19,18,.95); stroke: rgba(234,210,153,.72); stroke-width: 1.4; }
.wheel-yin { fill: #efe4c9; font-size: 29px; }
.wheel-center-label { fill: #d7bd81; font-size: 7px; letter-spacing: 1.5px; }
.wheel-north { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); color: #ffe2a4; font-size: 7px; font-weight: 800; text-shadow: 0 1px 7px #000; }
.ar-bottom-caption { position: absolute; z-index: 6; left: 50%; bottom: max(5px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; justify-content: center; gap: 6px; width: max-content; max-width: 92vw; color: rgba(255,255,255,.65); font-size: 7px; letter-spacing: .12em; text-shadow: 0 1px 6px #000; pointer-events: none; }
.ar-bottom-caption .status-led { width: 5px; height: 5px; background: #74d9bc; }
.ar-bottom-caption span:last-child { color: #f1d69b; }
.ar-bottom-sheet { position: absolute; z-index: 12; left: 10px; right: 10px; bottom: max(12px, env(safe-area-inset-bottom)); max-height: min(46dvh, 390px); overflow-y: auto; padding: 10px 17px 18px; border: 1px solid rgba(255,255,255,.18); border-radius: 19px; background: rgba(9,20,19,.92); color: #f2eee5; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: 0 12px 45px rgba(0,0,0,.42); }
.ar-bottom-sheet[hidden] { display: none; }
.sheet-handle { width: 34px; height: 3px; margin: 0 auto 13px; border-radius: 5px; background: rgba(255,255,255,.35); }
.sheet-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-heading small { color: #d7bd81; font-size: 8px; letter-spacing: .17em; }
.sheet-heading h2 { margin: 4px 0 0; color: #fff; font-size: 22px; font-weight: 550; }
.sheet-close { width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; color: #fff; background: rgba(255,255,255,.06); font-size: 20px; cursor: pointer; }
.ar-bottom-sheet > p { margin: 13px 0 12px; color: #c7d0c8; font-size: 12px; line-height: 1.65; }
.description-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.description-tags span { padding: 5px 8px; border-radius: 30px; border: 1px solid rgba(215,189,129,.20); background: rgba(215,189,129,.08); color: #e6d4ac; font-size: 9px; }
.settings-row { display: flex; justify-content: space-between; margin-top: 13px; color: #e6ece5; font-size: 11px; }
.settings-row output { color: #e5cb91; }
.stride-slider { width: 100%; margin: 12px 0 2px; accent-color: #55b8aa; }
.settings-help { margin: 10px 0 !important; font-size: 10px !important; }
.settings-stats { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid rgba(255,255,255,.11); color: #aab9b0; font-size: 9px; }
.settings-buttons { display: flex; align-items: center; gap: 12px; margin-top: 7px; }
.sheet-primary-action { border: 1px solid rgba(85,184,170,.55); border-radius: 8px; padding: 9px 15px; background: rgba(57,139,127,.22); color: #a7f0de; font-size: 10px; cursor: pointer; }
.settings-time { color: #80938a; font-size: 9px; }
body.is-ar .toast { z-index: 30; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 8px); width: max-content; max-width: calc(100vw - 30px); background: rgba(6,15,15,.93); backdrop-filter: blur(14px); }
body.is-ar .ar-bottom-hud:has(+ .ar-bottom-sheet:not([hidden])) { opacity: .25; pointer-events: none; }
@media (max-width: 380px) {
  .ar-current-card { width: 47vw; padding: 8px 9px 7px; }
  .ar-vastu-wheel { width: 39vw; height: 39vw; max-width: 148px; max-height: 148px; }
  .ar-current-copy b { font-size: 21px; }
  .ar-trigram-symbol { width: 32px; height: 32px; font-size: 24px; }
  .ar-bottom-caption { font-size: 6px; }
}
@media (min-width: 760px) {
  .ar-current-card { width: 255px; padding: 13px 14px 10px; }
  .ar-vastu-wheel { width: 205px; height: 205px; }
  .ar-bottom-hud { left: 24px; right: 24px; bottom: 26px; }
}
@media (max-height: 620px) {
  .ar-vastu-wheel { width: 128px; height: 128px; }
  .ar-current-card { padding: 7px 9px 6px; }
  .ar-current-main { margin-top: 3px; }
  .ar-current-copy b { font-size: 20px; }
  .ar-current-footer, .ar-action-row { margin-top: 4px; }
  .ar-bottom-caption { display: none; }
}

/* The compass map follows the estimated projection of the room origin in the camera view. */
.ar-vastu-wheel {
  position: absolute; z-index: 4; left: var(--marker-x, 50%); top: 47%;
  width: clamp(154px, 39vw, 218px); height: clamp(154px, 39vw, 218px);
  transform: translate(-50%, -50%) rotate(var(--wheel-rotation, 0deg));
  transition: left .18s ease, transform .16s ease, opacity .2s ease;
  background: rgba(7,17,17,.28); border-color: rgba(255,255,255,.30);
}
.ar-vastu-wheel.offscreen { opacity: 0; pointer-events: none; }
.ar-vastu-wheel.behind { opacity: 0; pointer-events: none; }
.ar-vastu-wheel .wheel-north { top: 2px; }
.ar-center-marker { top: calc(47% - 128px); }
.center-marker-ring { display: none; }
.center-marker-copy { padding: 5px 9px; }
.ar-center-marker.in-center { top: calc(48% - 128px); }
.ar-center-marker.in-center .center-marker-ring { display: none; }
.ar-center-marker.edge .center-marker-copy, .ar-center-marker.behind .center-marker-copy { border-color: rgba(244,176,142,.45); }
@media (max-width: 380px) {
  .ar-vastu-wheel { width: 42vw; height: 42vw; max-width: 160px; max-height: 160px; }
  .ar-center-marker { top: calc(47% - 100px); }
}
@media (min-width: 760px) {
  .ar-vastu-wheel { width: 230px; height: 230px; }
  .ar-center-marker { top: calc(47% - 142px); }
}
@media (min-width: 381px) and (max-width: 759px) {
  .ar-vastu-wheel { width: 45vw; height: 45vw; }
}
.wheel-direction { font-size: 17px; }
.wheel-trigram { font-size: 13px; }
