@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,300,0,0&display=swap');

:root {
    --ink: #f5f7f4;
    --muted: #8e9b97;
    --muted-2: #64706d;
    --lime: #a7f36b;
    --lime-2: #6fd84f;
    --blue: #5aa7ff;
    --mint: #69e1b1;
    --amber: #f7c96a;
    --bg: #050a09;
    --bg-soft: #08100e;
    --panel: #0d1514;
    --panel-2: #111a19;
    --line: rgba(216, 245, 233, .1);
    --line-strong: rgba(216, 245, 233, .17);
    --shadow: 0 26px 80px rgba(0, 0, 0, .34);
    --radius: 22px;
    --font-body: 'DM Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Manrope', var(--font-body);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--bg); font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
p { color: var(--muted); line-height: 1.7; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-display); }
img, canvas { max-width: 100%; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.skip-link { position: fixed; z-index: 999; left: 12px; top: 12px; transform: translateY(-150%); padding: 10px 14px; background: var(--lime); color: #07100f; border-radius: 8px; font-weight: 700; }
.skip-link:focus { transform: none; }

.brand-mark { position: relative; display: inline-block; width: 32px; height: 30px; flex: 0 0 32px; }
.brand-mark i { position: absolute; width: 8px; height: 10px; border-radius: 50%; background: var(--lime); transform: rotate(var(--r)); box-shadow: 0 0 14px rgba(167, 243, 107, .2); }
.brand-mark i:nth-child(1) { left: 1px; top: 4px; --r: -25deg; }
.brand-mark i:nth-child(2) { left: 9px; top: 0; --r: -8deg; }
.brand-mark i:nth-child(3) { left: 18px; top: 1px; --r: 10deg; }
.brand-mark i:nth-child(4) { right: 0; top: 6px; --r: 28deg; }
.brand-mark b { position: absolute; left: 7px; bottom: 0; width: 20px; height: 17px; border-radius: 48% 48% 42% 42%; background: var(--lime); transform: rotate(-2deg); }

.button { min-height: 50px; padding: 0 22px; border: 1px solid var(--lime); border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; gap: 16px; background: var(--lime); color: #0a120f; font-weight: 800; cursor: pointer; box-shadow: 0 10px 30px rgba(141, 228, 88, .12); transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); background: #b7ff82; border-color: #b7ff82; }
.button:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid rgba(90, 167, 255, .5); outline-offset: 3px; }
.button-small { min-height: 40px; padding: 0 17px; font-size: 14px; border-radius: 9px; }
.button-compact { min-height: 40px; padding: 0 15px; font-size: 13px; }
.button-wide { width: 100%; }
.button-ghost { color: var(--ink); background: rgba(255, 255, 255, .02); border-color: var(--line-strong); box-shadow: none; }
.button-ghost:hover { color: var(--lime); background: rgba(167, 243, 107, .05); border-color: rgba(167, 243, 107, .32); }
.button-blue { color: white; background: #1e65d7; border-color: #387ee9; box-shadow: 0 10px 26px rgba(34, 107, 225, .25); }
.button-blue:hover { background: #2f78e9; border-color: #4f93f4; }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--lime); font-size: 12px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow > i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); }

/* Marketing */
.marketing-page { overflow-x: hidden; background: radial-gradient(circle at 75% -15%, rgba(69, 148, 91, .13), transparent 28%), var(--bg); }
.site-header { position: fixed; z-index: 50; top: 0; left: 0; right: 0; height: 76px; padding: 0 max(28px, calc((100vw - 1320px) / 2)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid transparent; transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease; }
.site-header.is-scrolled { background: rgba(5, 10, 9, .84); border-color: var(--line); backdrop-filter: blur(18px); }
.site-brand, .app-brand, .auth-brand { display: inline-flex; align-items: center; gap: 12px; width: max-content; font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -.03em; }
.site-brand strong, .app-brand strong, .auth-brand strong { color: var(--lime); font-weight: 800; }
.site-nav { display: flex; align-items: center; gap: 32px; color: #a4afac; font-size: 13px; font-weight: 600; }
.site-nav a, .login-link { transition: color .2s ease; }
.site-nav a:hover, .login-link:hover { color: var(--lime); }
.auth-help-link { margin-top: -6px; justify-self: end; color: var(--lime); font-size: .88rem; }
.contact-shell { padding-top: 40px; padding-bottom: 40px; }
.contact-card { width: min(100%, 620px); }
.contact-card textarea { resize: vertical; min-height: 150px; }
.contact-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.site-actions { display: flex; justify-content: flex-end; align-items: center; gap: 22px; font-size: 14px; font-weight: 600; }
.nav-toggle { display: none; }

.hero { position: relative; min-height: 770px; max-width: 1440px; margin: auto; padding: 148px 60px 80px; display: grid; grid-template-columns: minmax(440px, .88fr) minmax(560px, 1.12fr); align-items: center; gap: 50px; }
.hero-copy { position: relative; z-index: 3; max-width: 650px; }
.hero h1 { margin: 24px 0 26px; font-size: clamp(58px, 6.5vw, 96px); line-height: .98; letter-spacing: -.065em; }
.hero h1 em, .section-heading h2 em { color: var(--lime); font-style: normal; }
.hero-copy > p { max-width: 600px; font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 32px; color: #899590; font-size: 12px; }
.trust-row span { display: flex; align-items: center; gap: 7px; }
.trust-row i { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid rgba(167, 243, 107, .35); border-radius: 50%; color: var(--lime); font-style: normal; font-size: 10px; }
.hero-glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .2; pointer-events: none; }
.hero-glow-one { right: 6%; top: 12%; width: 520px; height: 520px; background: #1d7a4c; }
.hero-glow-two { left: 36%; bottom: 10%; width: 260px; height: 260px; background: #1e6e90; opacity: .1; }

.hero-product { position: relative; height: 570px; min-width: 0; transition: filter .35s ease; }
.product-orbit { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(167, 243, 107, .13); border-radius: 50%; transform: translate(-50%, -50%); transition: border-color .45s ease; }
.orbit-one { width: 420px; height: 420px; animation: orbit-breathe 6s infinite ease-in-out; }
.orbit-two { width: 610px; height: 610px; border-color: rgba(90, 167, 255, .08); }
.energy-hub { position: absolute; z-index: 4; left: 50%; top: 50%; width: 126px; height: 126px; transform: translate(-50%, -50%); display: grid; place-items: center; border: 1px solid rgba(167, 243, 107, .42); border-radius: 50%; background: rgba(9, 16, 27, .94); box-shadow: 0 0 70px rgba(112, 225, 95, .15), inset 0 0 32px rgba(90, 167, 255, .05); transition: border-color .45s ease, box-shadow .45s ease; }
.energy-hub .brand-mark { transform: scale(1.4); }
.energy-hub > b { position: absolute; bottom: 14px; color: var(--lime); font-size: 10px; letter-spacing: .12em; transition: color .35s ease; }
.hub-pulse { position: absolute; inset: -14px; border: 1px solid rgba(167, 243, 107, .16); border-radius: inherit; animation: hub-pulse 2.6s infinite ease-out; }
@keyframes hub-pulse { 0% { transform: scale(.9); opacity: 0; } 25% { opacity: 1; } 100% { transform: scale(1.32); opacity: 0; } }
@keyframes orbit-breathe { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.025); } }
.float-card { position: absolute; z-index: 5; width: 174px; min-height: 132px; padding: 17px 18px; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto auto; column-gap: 12px; align-items: center; border: 1px solid rgba(126, 151, 174, .22); border-radius: 17px; background: linear-gradient(145deg, rgba(24, 34, 48, .97), rgba(15, 23, 35, .97)); box-shadow: 0 18px 45px rgba(0, 0, 0, .3), inset 0 1px rgba(255, 255, 255, .025); backdrop-filter: blur(18px); transition: opacity .18s ease, transform .18s ease, border-color .4s ease, background .4s ease; }
.float-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(120deg, rgba(255,255,255,.035), transparent 40%); pointer-events: none; }
.float-card small { color: #c8d0cd; font-size: 12px; }
.float-card strong { grid-column: 2; font-family: var(--font-display); font-size: 24px; letter-spacing: -.04em; }
.float-card strong em { color: var(--muted); font-size: 12px; font-style: normal; font-weight: 600; }
.float-card > i { grid-column: 2; color: var(--lime); font-size: 10px; font-style: normal; }
.mini-icon { grid-row: 1 / span 3; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 12px; font-size: 9px; font-weight: 800; }
.mini-icon i { font-size: 21px; }
.mini-icon.lime, .feature-icon.lime { color: var(--lime); background: rgba(167, 243, 107, .06); }
.mini-icon.blue, .feature-icon.blue { color: var(--blue); background: rgba(90, 167, 255, .07); }
.mini-icon.mint, .feature-icon.mint { color: var(--mint); background: rgba(105, 225, 177, .07); }
.solar-card { left: 4%; top: 12%; }
.house-card { right: 0; top: 17%; }
.battery-card { left: 11%; bottom: 8%; }
.ev-card { left: 50%; bottom: -3%; transform: translateX(-50%); }
.house-card > i, .ev-card > i { color: var(--blue); }
.grid-card { right: 6%; bottom: 10%; }
.mini-progress { grid-column: 2; width: 100%; height: 3px; background: rgba(255,255,255,.08); border-radius: 4px; overflow: hidden; }
.mini-progress i { display: block; height: 100%; background: var(--mint); transition: width .65s ease, background .35s ease; }
.hero-product.is-updating .float-card { opacity: .48; transform: translateY(5px) scale(.985); }
.hero-product.is-updating .ev-card { transform: translate(-50%, 5px) scale(.985); }
.hero-product.is-night .orbit-one { border-color: rgba(90, 167, 255, .13); }
.hero-product.is-night .energy-hub { border-color: rgba(90, 167, 255, .35); box-shadow: 0 0 70px rgba(40, 112, 190, .13), inset 0 0 32px rgba(90, 167, 255, .05); }
.hero-product.is-night .energy-hub > b { color: var(--blue); }
.hero-product.is-night .solar-card { border-color: rgba(126, 151, 174, .14); background: linear-gradient(145deg, rgba(20, 29, 42, .92), rgba(12, 19, 29, .97)); }
.hero-product.is-night .solar-card .mini-icon, .hero-product.is-night .solar-card > i { color: #6f7b77; }
.hero-product.battery-discharging .mini-progress i { background: var(--blue); }

.proof-strip { max-width: 1320px; margin: 0 auto; padding: 30px 40px; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.proof-strip div { padding: 0 28px; display: flex; align-items: center; gap: 15px; border-right: 1px solid var(--line); }
.proof-strip div:last-child { border: 0; }
.proof-strip strong { font: 800 27px var(--font-display); color: var(--lime); }
.proof-strip span { max-width: 140px; color: var(--muted); font-size: 12px; line-height: 1.4; }

.section { max-width: 1320px; margin: 0 auto; padding: 130px 40px; }
.section-heading { max-width: 700px; }
.section-heading.centered { margin: 0 auto 62px; text-align: center; }
.section-heading h2, .cta-section h2 { margin: 18px 0 22px; font-size: clamp(38px, 5vw, 64px); line-height: 1.06; letter-spacing: -.055em; }
.section-heading > p { max-width: 590px; font-size: 17px; }
.section-heading.centered > p { margin-left: auto; margin-right: auto; }
.feature-grid { margin-top: 62px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card { position: relative; min-height: 318px; padding: 34px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(15, 24, 22, .88), rgba(8, 14, 13, .74)); transition: border-color .25s ease, transform .25s ease; }
.feature-card:hover { transform: translateY(-4px); border-color: rgba(167, 243, 107, .24); }
.feature-index { position: absolute; top: 24px; right: 26px; color: var(--muted-2); font: 700 11px var(--font-display); }
.feature-icon { width: 50px; height: 50px; margin-bottom: 38px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 15px; font: 800 11px var(--font-display); }
.feature-icon i { font-size: 27px; }
.feature-card h3 { margin-bottom: 12px; font-size: 21px; }
.feature-card p { min-height: 75px; margin-bottom: 22px; font-size: 14px; }
.feature-link { color: var(--lime); font-size: 12px; font-weight: 700; }

.steps-section { border-top: 1px solid var(--line); }
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.steps li { position: relative; padding: 0 28px; }
.steps li:not(:last-child)::after { content: ''; position: absolute; top: 25px; right: -25%; width: 50%; height: 1px; background: linear-gradient(90deg, rgba(167,243,107,.3), rgba(167,243,107,.05)); }
.steps li > span { width: 50px; height: 50px; margin-bottom: 28px; display: grid; place-items: center; border: 1px solid rgba(167, 243, 107, .35); border-radius: 50%; background: #09110f; color: var(--lime); font: 800 14px var(--font-display); }
.steps h3 { font-size: 18px; }
.steps p { font-size: 13px; }

.system-section { max-width: 1440px; border-top: 1px solid var(--line); }
.system-section > .section-heading { max-width: 780px; }
.system-showcase { position: relative; display: grid; grid-template-columns: minmax(220px, .78fr) minmax(480px, 1.55fr) minmax(220px, .78fr); gap: 20px; align-items: center; }
.system-showcase::before { content: ''; position: absolute; z-index: 0; left: 13%; right: 13%; top: 39%; height: 1px; background: linear-gradient(90deg, transparent, rgba(167,243,107,.34) 18%, rgba(90,167,255,.35) 50%, rgba(167,243,107,.34) 82%, transparent); box-shadow: 0 0 20px rgba(167,243,107,.12); }
.system-piece { position: relative; z-index: 1; min-width: 0; }
.system-product-visual, .touch-product-visual { position: relative; overflow: hidden; border: 1px solid rgba(216,245,233,.16); background: #0b1110; box-shadow: 0 24px 65px rgba(0,0,0,.34), inset 0 1px rgba(255,255,255,.04); }
.system-product-visual { height: auto; aspect-ratio: 4 / 5; border-radius: 24px; }
.system-product-visual::after, .touch-product-visual::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.system-product-visual::after { background: linear-gradient(180deg, transparent 42%, rgba(3,8,8,.55)), linear-gradient(120deg, rgba(255,255,255,.035), transparent 42%); }
.system-product-visual > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.touch-product-visual > img { width: 100%; height: 100%; display: block; object-fit: cover; }
.meter-product-visual > img { object-position: 50% center; }
.hub-product-visual > img { object-position: 50% center; }
.touch-piece { margin-top: -24px; }
.touch-product-visual { aspect-ratio: 1.34; border-color: rgba(167,243,107,.26); border-radius: 28px; box-shadow: 0 34px 90px rgba(0,0,0,.48), 0 0 70px rgba(101,208,91,.08), inset 0 1px rgba(255,255,255,.05); }
.touch-product-visual::after { background: linear-gradient(180deg, rgba(4,8,8,.04) 45%, rgba(3,7,7,.5)), linear-gradient(110deg, transparent 52%, rgba(167,243,107,.05)); }
.system-part-number { position: absolute; z-index: 3; left: 18px; top: 18px; width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(5,10,9,.72); color: #dce6e1; font: 800 10px var(--font-display); backdrop-filter: blur(12px); }
.puppy-device-label { position: absolute; z-index: 3; left: 7%; top: 32%; padding: 5px 8px; display: flex; align-items: center; gap: 2px; border: 1px solid rgba(10,18,15,.15); border-radius: 7px; background: rgba(246,249,247,.92); color: #0c1713; box-shadow: 0 5px 16px rgba(0,0,0,.12); font: 800 8px var(--font-display); }
.puppy-device-label .brand-mark { margin: -7px -8px -7px -7px; transform: scale(.37); }
.hub-status-label { position: absolute; z-index: 3; right: 15px; bottom: 15px; padding: 8px 10px; display: flex; align-items: center; gap: 7px; border: 1px solid rgba(167,243,107,.22); border-radius: 9px; background: rgba(5,10,9,.76); color: #dbe6e0; font-size: 9px; font-weight: 800; backdrop-filter: blur(12px); }
.hub-status-label i, .touch-live-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px rgba(167,243,107,.8); }
.touch-live-pill { position: absolute; z-index: 3; right: 18px; top: 18px; padding: 8px 11px; display: flex; align-items: center; gap: 7px; border: 1px solid rgba(167,243,107,.23); border-radius: 40px; background: rgba(5,10,9,.72); color: #e6eee9; font-size: 9px; font-weight: 700; backdrop-filter: blur(12px); }
.touch-companion { position: absolute; z-index: 3; right: 18px; bottom: 18px; padding: 9px 12px; display: flex; align-items: center; gap: 7px; border: 1px solid rgba(90,167,255,.28); border-radius: 11px; background: rgba(5,12,18,.8); color: #e8f1fb; font-size: 9px; backdrop-filter: blur(14px); }
.touch-companion i { color: var(--blue); font-size: 18px; }
.system-piece-copy { padding: 23px 8px 0; }
.touch-piece .system-piece-copy { padding: 26px 18px 0; text-align: center; }
.system-piece-copy > span { color: var(--lime); font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.system-piece-copy h3 { margin: 7px 0 10px; font-size: 23px; letter-spacing: -.035em; }
.touch-piece .system-piece-copy h3 { font-size: 32px; }
.system-piece-copy p { margin-bottom: 13px; font-size: 13px; line-height: 1.6; }
.touch-piece .system-piece-copy p { max-width: 580px; margin-left: auto; margin-right: auto; font-size: 15px; }
.system-piece-copy small { color: #b7c2bd; font-size: 9px; font-weight: 700; letter-spacing: .05em; }
.system-safety-note { max-width: 820px; margin: 66px auto 0; padding: 17px 21px; display: flex; align-items: center; gap: 14px; border: 1px solid rgba(167,243,107,.15); border-radius: 14px; background: rgba(167,243,107,.035); font-size: 12px; }
.system-safety-note > i { flex: 0 0 auto; color: var(--lime); font-size: 25px; }
.system-safety-note strong { color: var(--ink); }

.cta-section { max-width: 1240px; margin: 0 auto 80px; padding: 68px; display: flex; justify-content: space-between; align-items: flex-end; gap: 50px; border: 1px solid rgba(167,243,107,.16); border-radius: 28px; background: radial-gradient(circle at 88% 16%, rgba(134, 230, 93, .13), transparent 27%), linear-gradient(135deg, #0d1714, #08100e); }
.cta-section h2 { margin-bottom: 12px; }
.cta-section p { margin-bottom: 0; }
.cta-actions { min-width: 290px; display: grid; gap: 17px; text-align: center; }
.cta-actions > a:last-child { color: var(--muted); font-size: 12px; }
.cta-actions > a:last-child:hover { color: var(--lime); }
.site-footer { max-width: 1320px; margin: auto; padding: 48px 40px 38px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; border-top: 1px solid var(--line); }
.site-footer p { grid-row: 2; margin: 0; font-size: 12px; }
.site-footer > div { display: flex; gap: 24px; color: var(--muted); font-size: 12px; }
.site-footer small { grid-column: 2; grid-row: 2; color: var(--muted-2); }
.legal-consent a { color: var(--lime); text-decoration: underline; text-decoration-color: rgba(167,243,107,.45); text-underline-offset: 3px; }
.legal-consent a:hover { text-decoration-color: var(--lime); }
.legal-header { position: sticky; z-index: 30; top: 0; min-height: 74px; padding: 0 max(28px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 28px; border-bottom: 1px solid var(--line); background: rgba(7,16,15,.9); backdrop-filter: blur(18px); }
.legal-header nav { display: flex; align-items: center; gap: 26px; color: var(--muted); font-size: 13px; font-weight: 700; }
.legal-header nav a:hover, .legal-header nav a.is-active { color: var(--lime); }
.legal-shell { width: min(100% - 40px, 980px); margin: 0 auto; padding: 80px 0 100px; }
.legal-document { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 28px; background: linear-gradient(145deg, rgba(14,25,22,.94), rgba(8,15,14,.92)); box-shadow: var(--shadow); }
.legal-title { padding: 52px 58px 45px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; border-bottom: 1px solid var(--line); background: radial-gradient(circle at 88% 12%, rgba(167,243,107,.1), transparent 34%); }
.legal-title h1 { margin: 15px 0 9px; font-size: clamp(38px, 6vw, 60px); letter-spacing: -.055em; }
.legal-title p { color: var(--muted-2); font-size: 12px; }
.legal-print { flex: 0 0 auto; }
.legal-document > section { padding: 34px 58px; border-bottom: 1px solid var(--line); }
.legal-document h2 { margin-bottom: 14px; font-size: 22px; letter-spacing: -.025em; }
.legal-document p, .legal-document li { color: #aebbb5; font-size: 15px; line-height: 1.75; }
.legal-document p + p { margin-top: 13px; }
.legal-document ul { margin: 12px 0 0; padding-left: 21px; display: grid; gap: 8px; }
.legal-document a { color: var(--lime); text-decoration: underline; text-decoration-color: rgba(167,243,107,.35); text-underline-offset: 3px; }
.legal-details { margin-top: 19px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.legal-details > div { padding: 14px 17px; display: grid; gap: 4px; border-bottom: 1px solid var(--line); }
.legal-details > div:nth-child(odd) { border-right: 1px solid var(--line); }
.legal-details > div:nth-last-child(-n+2) { border-bottom: 0; }
.legal-details dt { color: var(--muted-2); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.legal-details dd { margin: 0; color: var(--ink); font-size: 14px; }
.legal-table { margin-top: 19px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.legal-table > div { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(180px, .8fr); }
.legal-table > div + div { border-top: 1px solid var(--line); }
.legal-table span, .legal-table strong { padding: 13px 16px; color: #aebbb5; font-size: 13px; }
.legal-table span + span, .legal-table strong + strong { border-left: 1px solid var(--line); }
.legal-table > div:first-child { background: rgba(167,243,107,.045); }
.legal-table strong { color: var(--ink); }
.legal-note { margin: 42px 58px 52px; padding: 21px 23px; border: 1px solid rgba(167,243,107,.18); border-radius: 15px; background: rgba(167,243,107,.045); }
.legal-note strong { color: var(--lime); font-size: 13px; }
.legal-note p { margin-top: 6px; }
.legal-footer { max-width: 980px; margin: 0 auto; padding: 0 0 45px; display: flex; justify-content: space-between; gap: 24px; color: var(--muted-2); font-size: 12px; }
.legal-footer div { display: flex; flex-wrap: wrap; gap: 22px; }
.legal-footer a:hover { color: var(--lime); }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* Authentication */
.auth-page { min-height: 100vh; background: radial-gradient(circle at 50% -10%, rgba(80, 185, 102, .15), transparent 34%), var(--bg); }
.auth-shell { min-height: 100vh; padding: 42px 20px; display: flex; flex-direction: column; align-items: center; }
.auth-brand { margin-bottom: 38px; }
.auth-card { width: min(100%, 470px); padding: 42px; border: 1px solid var(--line-strong); border-radius: 24px; background: rgba(12, 21, 18, .9); box-shadow: var(--shadow); }
.auth-card h1 { margin: 14px 0 8px; font-size: 34px; letter-spacing: -.04em; }
.auth-card > p { margin-bottom: 27px; font-size: 14px; }
.auth-form { display: grid; gap: 18px; }
.auth-form label, .field-grid label { display: grid; gap: 8px; color: #c5ceca; font-size: 12px; font-weight: 700; }
.auth-form input:not([type="checkbox"]), .auth-form textarea, .field-grid input, .field-grid select { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: #08100e; color: var(--ink); outline: none; }
.auth-form textarea { height: auto; padding-top: 12px; padding-bottom: 12px; }
.auth-form input:focus, .auth-form textarea:focus, .field-grid input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(167,243,107,.08); }
.auth-form label > small { color: var(--muted-2); font-weight: 400; }
.check-label { grid-template-columns: 18px 1fr !important; align-items: start; font-weight: 400 !important; line-height: 1.5; }
.check-label input { accent-color: var(--lime); }
.auth-separator { height: 36px; display: flex; align-items: center; gap: 13px; color: var(--muted-2); font-size: 11px; }
.auth-separator::before, .auth-separator::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-switch { margin: 25px 0 0 !important; text-align: center; }
.auth-switch a { color: var(--lime); font-weight: 700; }
.back-link { margin-top: 28px; color: var(--muted); font-size: 12px; }
.flash { max-width: 1180px; margin: 0 auto 18px; padding: 13px 16px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); color: #d8e1dd; font-size: 13px; }
.flash-success { border-color: rgba(105,225,177,.3); background: rgba(105,225,177,.08); }
.flash-error { border-color: rgba(239,102,102,.35); background: rgba(239,102,102,.08); color: #ffc1c1; }
.flash-info { border-color: rgba(90,167,255,.3); background: rgba(90,167,255,.07); }

/* App shell */
.dashboard-page { --panel: #141e2b; --panel-2: #182332; --line: rgba(166, 189, 215, .12); --line-strong: rgba(166, 189, 215, .2); --muted: #929eac; --muted-2: #697583; min-height: 100vh; padding-bottom: 40px; background: radial-gradient(circle at 50% -18%, rgba(42, 72, 102, .16), transparent 33%), #07101a; }
.app-header { position: sticky; z-index: 40; top: 0; height: 70px; padding: 0 max(28px, calc((100vw - 1440px) / 2)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); background: rgba(7, 14, 24, .9); box-shadow: 0 8px 30px rgba(0, 0, 0, .12); backdrop-filter: blur(18px); }
.app-brand { font-size: 18px; }
.app-brand .brand-mark { transform: scale(.82); transform-origin: left center; margin-right: -3px; }
.app-nav { display: flex; align-self: stretch; gap: 30px; }
.app-nav a { position: relative; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
.app-nav a i { font-size: 17px; }
.app-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--lime); transform: scaleX(0); }
.app-nav a.is-active { color: var(--ink); }
.app-nav a.is-active::after { transform: none; }
.user-menu { justify-self: end; display: flex; align-items: center; gap: 22px; }
.status-dot { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.status-dot i, .live-dot, .online-label i, .live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px rgba(167,243,107,.65); }
.user-menu details { position: relative; }
.user-menu summary { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--panel); color: var(--lime); font-size: 12px; font-weight: 800; cursor: pointer; list-style: none; }
.user-menu summary::-webkit-details-marker { display: none; }
.account-popover { position: absolute; right: 0; top: 45px; width: 210px; padding: 16px; display: grid; gap: 8px; border: 1px solid var(--line-strong); border-radius: 13px; background: #151f2d; box-shadow: var(--shadow); }
.account-popover strong { font-size: 13px; }
.account-popover small { margin-bottom: 8px; color: var(--muted); font-size: 10px; }
.account-popover a { padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.account-popover a:hover { color: var(--lime); }
.dashboard-shell { width: min(1440px, calc(100% - 56px)); margin: 0 auto; padding: 35px 0 0; }
.dashboard-title-row { margin-bottom: 25px; display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; }
.dashboard-title-row h1 { margin: 7px 0 5px; font-size: 30px; letter-spacing: -.04em; }
.dashboard-title-row p { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.dashboard-actions { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.demo-clock { min-height: 44px; padding: 5px 7px 5px 11px; display: flex; align-items: center; gap: 9px; border: 1px solid rgba(90, 167, 255, .25); border-radius: 12px; background: linear-gradient(145deg, rgba(29, 45, 64, .9), rgba(17, 28, 42, .9)); box-shadow: inset 0 1px rgba(255, 255, 255, .025), 0 0 24px rgba(36, 111, 185, .08); }
.demo-clock-icon { color: var(--blue); font-size: 23px; }
.demo-clock > span { min-width: 57px; display: grid; line-height: 1.05; }
.demo-clock small { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.demo-clock strong { color: var(--ink); font: 800 18px var(--font-display); letter-spacing: .02em; }
.demo-clock em { padding: 5px 7px; border-radius: 6px; background: rgba(90, 167, 255, .08); color: #8ebeff; font-size: 8px; font-style: normal; font-weight: 700; white-space: nowrap; }
.demo-clock button { width: 31px; height: 31px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .025); color: var(--ink); cursor: pointer; }
.demo-clock button:hover { color: var(--lime); border-color: rgba(167, 243, 107, .25); }
.demo-clock button i { font-size: 17px; }
.icon-button { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel); color: var(--ink); cursor: pointer; }
.icon-button i { font-size: 19px; }

.metric-grid { margin-bottom: 14px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.metric-card { min-height: 120px; padding: 20px; display: flex; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, #182331, #121b27); box-shadow: inset 0 1px rgba(255, 255, 255, .025), 0 12px 26px rgba(0, 0, 0, .08); }
.metric-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 12px; font: 800 9px var(--font-display); }
.metric-icon i { font-size: 25px; }
.metric-card > div { min-width: 0; display: grid; gap: 3px; }
.metric-card small { color: #c3ccd2; font-size: 12px; }
.metric-card strong { white-space: nowrap; font: 700 27px var(--font-display); letter-spacing: -.035em; }
.metric-card strong em { color: var(--muted); font-size: 12px; font-style: normal; }
.metric-card div > span { color: var(--muted); font-size: 11px; }
.metric-solar .metric-icon, .metric-grid-power .metric-icon { color: var(--lime); background: rgba(167,243,107,.05); }
.metric-home .metric-icon, .metric-ev .metric-icon { color: var(--blue); background: rgba(90,167,255,.05); }
.metric-battery .metric-icon { color: var(--mint); background: rgba(105,225,177,.05); }
.metric-solar div > span, .metric-grid-power div > span { color: var(--lime-2); }
.metric-home div > span, .metric-ev div > span { color: var(--blue); }
.metric-battery div > span { color: var(--mint); }
.battery-bar { width: 85px; height: 3px; margin-top: 3px; overflow: hidden; border-radius: 5px; background: rgba(255,255,255,.09); }
.battery-bar b { display: block; height: 100%; background: var(--mint); }
.ev-charge-bar b { background: var(--blue); }

.dashboard-grid { display: grid; gap: 14px; margin-bottom: 14px; }
.dashboard-grid-top { grid-template-columns: minmax(0, 1.7fr) minmax(330px, .8fr); }
.dashboard-grid-bottom { grid-template-columns: 1fr; }
.panel { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, #151f2c, #111925); box-shadow: inset 0 1px rgba(255, 255, 255, .022), 0 14px 30px rgba(0, 0, 0, .08); }
.panel-heading { min-height: 46px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.panel-kicker { color: var(--muted-2); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.panel-heading h2 { margin: 4px 0 0; font-size: 18px; letter-spacing: -.025em; }
.panel-heading > a { color: var(--lime); font-size: 11px; font-weight: 700; }
.live-pill { padding: 6px 10px; display: flex; align-items: center; gap: 6px; border: 1px solid rgba(167,243,107,.14); border-radius: 50px; color: var(--muted); font-size: 10px; }
.live-pill i { width: 5px; height: 5px; }
.live-pill.is-stale { border-color: rgba(255, 190, 92, .2); color: #efc47f; }
.live-pill.is-stale i { background: #efb75f; box-shadow: 0 0 9px rgba(239, 183, 95, .55); }

.energy-flow-panel { overflow: hidden; background: radial-gradient(circle at 52% 43%, rgba(54, 123, 175, .08), transparent 31%), linear-gradient(145deg, #151f2c, #111925); }
.energy-flow { position: relative; height: 270px; margin: 2px 4px 0; }
.material-symbols-rounded { font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal; line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap; word-wrap: normal; direction: ltr; -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga'; -webkit-font-smoothing: antialiased; }
.flow-node { position: absolute; z-index: 3; color: var(--blue); }
.flow-icon { position: relative; width: 68px; height: 68px; display: grid; place-items: center; border: 2px solid currentColor; border-radius: 50%; background: radial-gradient(circle, rgba(24, 35, 49, .98) 45%, rgba(12, 20, 31, .98)); box-shadow: 0 0 0 7px rgba(90, 167, 255, .035), 0 0 27px color-mix(in srgb, currentColor 18%, transparent), inset 0 0 18px color-mix(in srgb, currentColor 8%, transparent); }
.flow-icon::after { content: ''; position: absolute; inset: -7px; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); border-radius: inherit; }
.flow-icon i { color: currentColor; font-size: 35px; }
.flow-copy { position: absolute; display: grid; gap: 2px; white-space: nowrap; }
.flow-copy small { color: #d9e0e4; font-size: 12px; }
.flow-copy strong { color: #f6faf8; font: 700 15px var(--font-display); letter-spacing: -.02em; }
.flow-copy strong em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 600; }
.flow-copy b { color: currentColor; font-size: 10px; font-weight: 600; }
.flow-solar { left: 3%; top: 60px; color: var(--lime); }
.flow-solar .flow-copy, .flow-grid .flow-copy { top: 77px; left: 50%; transform: translateX(-50%); text-align: center; }
.flow-home { left: calc(50% - 34px); top: 60px; color: var(--blue); }
.flow-home .flow-copy { left: 80px; top: 9px; }
.flow-battery { left: 31%; bottom: 4px; color: var(--mint); }
.flow-battery .flow-copy, .flow-ev .flow-copy { left: 80px; top: 9px; }
.flow-ev { left: 62%; bottom: 4px; color: var(--blue); }
.flow-grid { right: 3%; top: 60px; color: var(--lime); }
.flow-network { position: absolute; z-index: 1; inset: 0; }
.energy-route { position: absolute; display: block; color: var(--lime); }
.energy-route::before { content: ''; position: absolute; background: currentColor; box-shadow: 0 0 9px color-mix(in srgb, currentColor 32%, transparent); opacity: .78; }
.energy-route > i { position: absolute; z-index: 2; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.route-solar-home { left: calc(3% + 76px); right: calc(50% + 39px); top: 93px; height: 2px; color: var(--lime); }
.route-solar-home::before, .route-home-grid::before, .route-branch::before { inset: 0; height: 2px; }
.route-solar-home::after, .route-home-grid::after { content: ''; position: absolute; right: -1px; top: -4px; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid currentColor; }
.route-solar-home > i { top: -2px; animation: energy-dot-horizontal 2.7s infinite linear; }
.route-home-grid { left: calc(50% + 39px); right: calc(3% + 76px); top: 93px; height: 2px; color: var(--lime); }
.route-home-grid > i { top: -2px; animation: energy-dot-horizontal 3s .5s infinite linear; }
.route-home-down { left: 50%; top: 130px; width: 2px; height: 73px; color: #65cec5; }
.route-home-down::before, .route-battery::before, .route-ev::before { inset: 0; width: 2px; }
.route-home-down > i { left: -2px; animation: energy-dot-vertical 2.4s .2s infinite linear; }
.route-branch { left: calc(31% + 34px); right: calc(31% - 2px); top: 201px; height: 2px; color: #65cec5; }
.route-branch > i { top: -2px; animation: energy-dot-branch 3s infinite linear; }
.route-battery { left: calc(31% + 34px); top: 201px; width: 2px; height: 31px; color: var(--mint); }
.route-battery > i { left: -2px; animation: energy-dot-vertical 2.2s .6s infinite linear; }
.route-ev { left: calc(62% + 34px); top: 201px; width: 2px; height: 31px; color: var(--blue); }
.route-ev > i { left: -2px; animation: energy-dot-vertical 2.6s 1s infinite linear; }
@keyframes energy-dot-horizontal { from { left: 0; } to { left: calc(100% - 6px); } }
@keyframes energy-dot-vertical { from { top: 0; } to { top: calc(100% - 6px); } }
@keyframes energy-dot-branch { 0% { left: 50%; } 49% { left: 0; } 50% { left: 50%; } 100% { left: calc(100% - 6px); } }
@keyframes energy-dot-to-center { from { left: 0; } to { left: calc(50% - 3px); } }
.energy-flow .flow-node, .energy-flow .energy-route { transition: opacity .45s ease, filter .45s ease; }
.energy-flow .energy-route.is-inactive { opacity: .12 !important; filter: saturate(.35); }
.energy-flow .energy-route.is-inactive > i { opacity: 0; animation-play-state: paused; }
.energy-flow.is-night .flow-solar, .energy-flow.is-night .route-solar-home { opacity: .18; filter: saturate(.45); }
.energy-flow.ev-idle .route-ev { opacity: .14; }
.energy-flow.ev-idle .flow-ev { opacity: .58; }
.energy-flow.battery-discharging .route-battery > i, .energy-flow.battery-discharging .route-home-down > i { animation-direction: reverse; }
.energy-flow.battery-discharging .route-branch > i { animation-name: energy-dot-to-center; animation-duration: 1.8s; }
.energy-flow.is-importing .route-home-grid > i { animation-direction: reverse; }
.energy-flow.is-importing .route-home-grid::after { left: -1px; right: auto; transform: rotate(180deg); }
.energy-flow:not(.is-exporting):not(.is-importing) .route-home-grid { opacity: .18; }
.energy-flow.battery-idle .route-battery { opacity: .16; }
.flow-legend, .chart-legend { display: flex; gap: 20px; color: var(--muted); font-size: 10px; font-weight: 600; }
.flow-legend span::before, .chart-legend span::before { content: ''; width: 16px; height: 2px; margin-right: 7px; display: inline-block; vertical-align: middle; background: currentColor; }
.lime-line { color: var(--lime); }
.blue-line { color: var(--blue); }
.mint-line { color: var(--mint); }
.return-line { color: #84d95a; }

.wave-symbol { color: var(--blue); }
.wave-symbol i { font-size: 23px; }
.phase-row { height: 66px; padding: 0 12px; margin-top: 10px; display: grid; grid-template-columns: 31px 54px 1fr 58px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; background: linear-gradient(145deg, rgba(31, 44, 60, .72), rgba(22, 32, 46, .72)); box-shadow: inset 0 1px rgba(255, 255, 255, .018); }
.phase-row > b { font-size: 13px; }
.phase-row > span { color: var(--muted); font-size: 11px; }
.phase-row > strong { text-align: right; font: 600 12px var(--font-display); }
.phase-bars { height: 25px; display: flex; align-items: flex-end; gap: 2px; }
.phase-bars b { flex: 1; height: var(--h); min-width: 2px; border-radius: 2px 2px 0 0; background: linear-gradient(#5aa7ff, #2a6bb5); opacity: .88; }
.phase-footer { margin-top: 15px; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.phase-footer strong { color: var(--lime); }

.history-panel { min-height: 325px; }
.segmented { padding: 2px; display: flex; border: 1px solid var(--line); border-radius: 7px; }
.segmented button { padding: 6px 10px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.segmented button.is-active { background: rgba(255,255,255,.07); color: var(--ink); }
.chart-legend { margin-top: 14px; }
.chart-wrap { position: relative; height: 220px; margin-top: 6px; }
.chart-wrap canvas { width: 100%; height: 100%; }
.automations-panel { margin-bottom: 30px; }
.automation-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.automation-card { min-height: 67px; padding: 11px 14px; display: grid; grid-template-columns: 36px 1fr auto; gap: 11px; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: rgba(30, 43, 59, .68); box-shadow: inset 0 1px rgba(255, 255, 255, .016); }
.automation-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: rgba(90,167,255,.07); color: var(--blue); font-size: 13px; }
.automation-icon i { font-size: 18px; }
.automation-card strong { display: block; font-size: 12px; }
.automation-card small { color: var(--lime); font-size: 10px; }
.switch { position: relative; width: 38px; height: 22px; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: #28332f; cursor: pointer; transition: .2s ease; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; transition: transform .2s ease; }
.switch input:checked + span { background: var(--lime-2); }
.switch input:checked + span::after { transform: translateX(16px); }
.mobile-nav { display: none; }

/* Settings */
.settings-shell { max-width: 1180px; }
.settings-onboarding-intro { margin-bottom: 18px; padding: 24px; display: grid; grid-template-columns: minmax(260px, .78fr) minmax(500px, 1.22fr); gap: 30px; align-items: center; background: radial-gradient(circle at 8% 15%, rgba(167,243,107,.08), transparent 34%), var(--panel); }
.settings-onboarding-intro h2 { margin: 6px 0 7px; font-size: 22px; }
.settings-onboarding-intro p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.settings-onboarding-intro ol { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; list-style: none; }
.settings-onboarding-intro li { min-width: 0; padding: 13px; display: grid; grid-template-columns: 25px 1fr; gap: 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(8,17,24,.38); }
.settings-onboarding-intro li > b { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: rgba(167,243,107,.1); color: var(--lime); font-size: 10px; }
.settings-onboarding-intro li span { min-width: 0; display: grid; gap: 3px; }
.settings-onboarding-intro li strong { font-size: 10px; }
.settings-onboarding-intro li small { color: var(--muted); font-size: 8px; line-height: 1.4; }
.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 18px; align-items: start; }
.hub-setup { padding: 0; overflow: hidden; }
.hub-steps { margin: 0; padding: 20px 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; list-style: none; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.012); }
.hub-steps li { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.hub-steps b { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); }
.hub-steps li.is-active { color: var(--text); }
.hub-steps li.is-active b { border-color: var(--lime); color: #07100f; background: var(--lime); }
.hub-steps li.is-done b { border-color: rgba(167,243,107,.45); color: var(--lime); }
.hub-setup-grid { min-height: 440px; display: grid; grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr); }
.hub-setup-copy, .hub-setup-actions { padding: clamp(26px, 5vw, 56px); }
.hub-setup-copy { border-right: 1px solid var(--line); background: radial-gradient(circle at 20% 25%, rgba(167,243,107,.08), transparent 36%); }
.hub-setup-copy .controller-visual { width: 72px; height: 72px; margin-bottom: 24px; }
.hub-setup-copy h2 { margin: 0 0 12px; font-size: clamp(24px, 4vw, 34px); }
.hub-setup-copy > p { max-width: 520px; color: var(--muted); line-height: 1.7; }
.hub-security-note { margin-top: 28px; padding: 14px; display: flex; gap: 12px; border: 1px solid rgba(90,167,255,.18); border-radius: 12px; color: #aab9c7; background: rgba(90,167,255,.045); font-size: 12px; line-height: 1.55; }
.hub-security-note i { color: var(--blue); }
.hub-setup-actions form { display: grid; gap: 17px; }
.hub-setup-actions label { display: grid; gap: 8px; color: #d7e1df; font-size: 12px; font-weight: 700; }
.hub-setup-actions input, .hub-setup-actions select { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: rgba(8,16,24,.82); font: inherit; }
.hub-setup-actions input:focus, .hub-setup-actions select:focus { outline: 2px solid rgba(167,243,107,.2); border-color: var(--lime); }
.hub-hidden { display: none !important; }
.hub-found-device { margin-bottom: 20px; padding: 16px; display: flex; align-items: center; gap: 13px; border: 1px solid rgba(167,243,107,.2); border-radius: 12px; background: rgba(167,243,107,.045); }
.hub-found-device > i { color: var(--lime); font-size: 31px; }
.hub-found-device small, .hub-found-device strong { display: block; }
.hub-found-device small { margin-bottom: 3px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.hub-browser-warning { margin-top: 16px; padding: 13px; border: 1px solid rgba(255,186,73,.25); border-radius: 10px; color: #ffd694; background: rgba(255,186,73,.05); font-size: 12px; line-height: 1.55; }
.hub-setup-status { min-height: 24px; margin: 18px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.hub-setup-status.is-error { color: #ff9999; }
.hub-setup-status.is-success { color: var(--lime); }
.hub-online-panel { text-align: center; }
.hub-success { width: 74px; height: 74px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; color: var(--lime); background: rgba(167,243,107,.08); }
.hub-success i { font-size: 44px; }
.hub-online-panel h3 { margin: 0 0 8px; font-size: 24px; }
.hub-online-panel p { margin: 0 0 24px; color: var(--muted); line-height: 1.6; }
.ios-hub-guide { padding: clamp(26px, 4vw, 44px); background: radial-gradient(circle at 85% 8%, rgba(167,243,107,.09), transparent 28%), var(--panel); }
.ios-hub-guide > header { max-width: 790px; }
.ios-device-badge { width: max-content; padding: 6px 10px; display: flex; align-items: center; gap: 6px; border: 1px solid rgba(167,243,107,.24); border-radius: 999px; background: rgba(167,243,107,.06); color: var(--lime); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.ios-device-badge i { font-size: 15px; }
.ios-hub-guide > header h2 { margin: 14px 0 8px; font-size: clamp(25px, 4vw, 36px); }
.ios-hub-guide > header p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.ios-pairing-steps { margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; list-style: none; counter-reset: none; }
.ios-pairing-steps > li { min-width: 0; padding: 19px; display: grid; grid-template-columns: 32px 1fr; gap: 13px; border: 1px solid var(--line); border-radius: 13px; background: rgba(8,17,24,.42); }
.ios-pairing-steps > li > b { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(167,243,107,.1); color: var(--lime); font-size: 11px; }
.ios-pairing-steps > li > div { min-width: 0; display: grid; grid-template-columns: 29px 1fr; gap: 10px; align-items: start; }
.ios-pairing-steps > li > div > i { color: var(--lime); font-size: 24px; }
.ios-pairing-steps span { min-width: 0; display: grid; gap: 5px; }
.ios-pairing-steps strong { font-size: 13px; }
.ios-pairing-steps small { color: var(--muted); font-size: 10px; line-height: 1.55; }
.ios-pairing-result { margin-top: 18px; padding: 18px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 13px; align-items: center; border: 1px solid rgba(90,167,255,.19); border-radius: 13px; background: rgba(90,167,255,.045); }
.ios-pairing-result > i { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(90,167,255,.08); color: var(--blue); font-size: 23px; }
.ios-pairing-result strong { font-size: 12px; }
.ios-pairing-result p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.online-label.is-offline { color: var(--muted); }
.online-label.is-offline i { background: var(--muted); box-shadow: none; }
@media (max-width: 760px) {
    .hub-steps { padding: 14px; gap: 4px; }
    .hub-steps li { justify-content: center; }
    .hub-steps li span { display: none; }
    .hub-setup-grid { grid-template-columns: 1fr; }
    .hub-setup-copy { padding: 26px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
    .hub-setup-copy .controller-visual { width: 58px; height: 58px; margin-bottom: 16px; }
    .hub-security-note { display: none; }
    .hub-setup-actions { padding: 26px 20px 32px; }
}
.settings-main { display: grid; gap: 16px; }
.settings-panel { padding: 24px; }
.hub-onboarding-card { margin-top: 18px; padding: 20px; border: 1px solid rgba(167,243,107,.2); border-radius: 13px; background: linear-gradient(145deg, rgba(167,243,107,.045), rgba(12,22,30,.2)); }
.hub-onboarding-heading { display: grid; grid-template-columns: 44px 1fr; gap: 13px; align-items: center; }
.hub-onboarding-heading > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(167,243,107,.08); color: var(--lime); }
.hub-onboarding-heading > span i { font-size: 25px; }
.hub-onboarding-heading h3 { margin: 0 0 4px; font-size: 15px; }
.hub-onboarding-heading p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.hub-onboarding-card ol { margin: 18px 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; list-style: none; }
.hub-onboarding-card li { min-width: 0; padding: 12px; display: grid; grid-template-columns: 24px 1fr; gap: 9px; border: 1px solid var(--line); border-radius: 9px; background: rgba(8,17,24,.34); }
.hub-onboarding-card li > b { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid rgba(167,243,107,.28); border-radius: 50%; color: var(--lime); font-size: 9px; }
.hub-onboarding-card li span { min-width: 0; display: grid; gap: 3px; }
.hub-onboarding-card li strong { font-size: 10px; }
.hub-onboarding-card li small { color: var(--muted); font-size: 8px; line-height: 1.48; }
.settings-section-intro { max-width: 680px; margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.settings-field-title { margin-bottom: 7px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.settings-field-title b { color: var(--ink); font-size: 11px; }
.settings-field-title em { padding: 3px 7px; border: 1px solid rgba(167,243,107,.2); border-radius: 999px; background: rgba(167,243,107,.05); color: var(--lime); font-size: 7px; font-style: normal; font-weight: 700; white-space: nowrap; }
.solar-surplus-explainer { margin-top: 18px; padding: 15px; display: grid; grid-template-columns: 31px 1fr; gap: 11px; border: 1px solid rgba(247,201,106,.22); border-radius: 11px; background: rgba(247,201,106,.045); }
.solar-surplus-explainer > i { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: rgba(247,201,106,.09); color: var(--amber); font-size: 18px; }
.solar-surplus-explainer strong { font-size: 11px; }
.solar-surplus-explainer p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.controller-card { margin-top: 18px; padding: 16px; display: grid; grid-template-columns: 54px 1fr auto; gap: 15px; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: rgba(30, 43, 59, .68); box-shadow: inset 0 1px rgba(255, 255, 255, .016); }
.controller-visual { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid rgba(167,243,107,.22); border-radius: 14px; background: rgba(167,243,107,.04); }
.controller-visual .brand-mark { transform: scale(.7); }
.controller-card strong { display: block; font-size: 14px; }
.controller-card small { display: block; margin: 4px 0; color: var(--muted); font-size: 11px; }
.online-label { display: flex; align-items: center; gap: 6px; color: var(--lime); font-size: 11px; }
.online-label i { width: 5px; height: 5px; }
.empty-state { margin-top: 18px; padding: 22px; display: grid; grid-template-columns: 40px 1fr auto; gap: 15px; align-items: center; border: 1px dashed var(--line-strong); border-radius: 12px; }
.empty-state > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(167,243,107,.07); color: var(--lime); }
.empty-state h3 { margin: 0 0 4px; font-size: 14px; }
.empty-state p { margin: 0; font-size: 11px; }
.field-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field-grid label > span { position: relative; }
.field-grid input { padding-right: 38px; }
.field-grid label > small { color: var(--muted-2); font-weight: 400; line-height: 1.5; }
.helper-text { color: var(--muted); font-size: 11px; }
.button > i { font-size: 18px; }
.empty-state > span i { font-size: 21px; }
.settings-sidebar { position: sticky; top: 88px; display: grid; gap: 13px; }
.setup-progress { padding: 25px; text-align: center; }
.setup-progress h2 { margin: 6px 0 20px; font-size: 17px; }
.progress-ring { width: 116px; height: 116px; margin: 0 auto 22px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--lime) calc(var(--progress) * 1%), rgba(255,255,255,.07) 0); }
.progress-ring::before { content: ''; position: absolute; width: 96px; height: 96px; border-radius: 50%; background: #151f2c; }
.progress-ring span { position: relative; z-index: 1; font: 700 27px var(--font-display); }
.progress-ring small { color: var(--muted); font-size: 10px; }
.setup-progress ol { margin: 0; padding: 0; display: grid; gap: 11px; text-align: left; list-style: none; counter-reset: setup; }
.setup-progress li { position: relative; padding-left: 27px; color: var(--muted); font-size: 11px; }
.setup-progress li::before { counter-increment: setup; content: counter(setup); position: absolute; left: 0; top: -2px; width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 7px; }
.setup-progress li.done { color: #dce4e1; }
.setup-progress li.done::before { content: '✓'; color: #07100f; border-color: var(--lime); background: var(--lime); }
.save-note { margin: 0; text-align: center; font-size: 11px; }
@media (max-width: 980px) {
    .settings-onboarding-intro { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 760px) {
    .settings-onboarding-intro { padding: 20px; }
    .settings-onboarding-intro ol, .hub-onboarding-card ol, .ios-pairing-steps { grid-template-columns: 1fr; }
    .hub-onboarding-card { padding: 16px; }
    .hub-onboarding-heading { grid-template-columns: 1fr; }
    .ios-hub-guide { padding: 22px 18px; }
    .ios-pairing-result { grid-template-columns: 38px 1fr; }
    .ios-pairing-result .button { grid-column: 1 / -1; width: 100%; }
}
.provisioning-card { padding: 22px; border-color: rgba(167,243,107,.3); background: linear-gradient(145deg, rgba(32,52,53,.92), rgba(19,33,44,.96)); }
.provisioning-card > p { margin: 12px 0 17px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.provisioning-card > p code { color: var(--ink); }
.credential-row { padding: 10px 0; display: grid; grid-template-columns: 75px minmax(0, 1fr) auto; gap: 12px; align-items: center; border-top: 1px solid var(--line); }
.credential-row > span { color: var(--muted); font-size: 11px; }
.credential-row > code { padding: 8px 10px; overflow-x: auto; border-radius: 7px; background: rgba(5,12,17,.45); color: var(--lime); font-size: 11px; white-space: nowrap; }

/* Chiyano Touch editor */
.touch-shell { max-width: 1440px; }
.touch-title-row { gap: 30px; }
.touch-provision-form { display: flex; align-items: center; gap: 9px; }
.touch-provision-form input { width: 180px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: rgba(19,30,42,.8); color: var(--ink); font-size: 12px; }
.touch-credentials { max-width: 860px; margin-bottom: 18px; }
.touch-device-overview { margin-bottom: 18px; display: grid; grid-template-columns: minmax(230px, auto) minmax(460px, 1fr); gap: 16px; align-items: stretch; }
.touch-device-tabs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: thin; }
.touch-device-tabs a { min-width: 230px; padding: 13px 15px; display: grid; grid-template-columns: 33px 1fr auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 12px; background: rgba(20,30,43,.7); color: var(--muted); }
.touch-device-tabs a > i { font-size: 25px; }
.touch-device-tabs a span { display: grid; color: var(--ink); font-size: 12px; font-weight: 700; }
.touch-device-tabs a small { margin-top: 2px; color: var(--muted); font-size: 8px; font-weight: 500; }
.touch-device-tabs a b { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.touch-device-tabs a.is-active { border-color: rgba(167,243,107,.38); background: rgba(167,243,107,.06); }
.touch-device-tabs a.is-active > i, .touch-device-tabs a.is-active > b { color: var(--lime); }
.touch-editor-guide { padding: 16px 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(135deg, rgba(20,30,43,.72), rgba(14,23,34,.62)); }
.touch-editor-guide > div { min-width: 0; display: grid; grid-template-columns: 30px 1fr; gap: 11px; align-items: start; }
.touch-editor-guide > div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.touch-editor-guide i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: rgba(167,243,107,.07); color: var(--lime); font-size: 18px; }
.touch-editor-guide span { min-width: 0; display: grid; gap: 2px; }
.touch-editor-guide strong { color: var(--ink); font-size: 10px; }
.touch-editor-guide small { color: var(--muted); font-size: 10px; line-height: 1.58; }
.touch-editor { display: grid; grid-template-columns: 275px minmax(0, 1fr); gap: 18px; align-items: start; }
.touch-widget-library { position: sticky; top: 88px; max-height: calc(100vh - 105px); padding: 22px; overflow-y: auto; }
.touch-widget-library h2 { margin: 5px 0 7px; font-size: 20px; }
.touch-widget-library > div > p { margin: 0 0 18px; font-size: 11px; line-height: 1.55; }
.touch-widget-library section + section { margin-top: 19px; }
.touch-widget-library h3 { margin: 0 0 7px; color: var(--muted); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.touch-widget-buttons { display: grid; gap: 6px; }
.touch-widget-buttons button { width: 100%; min-height: 50px; padding: 8px 9px; display: grid; grid-template-columns: 30px 1fr 22px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; background: rgba(29,42,58,.68); color: var(--ink); text-align: left; cursor: pointer; }
.touch-widget-buttons button:hover { border-color: rgba(167,243,107,.3); background: rgba(167,243,107,.05); }
.touch-widget-buttons button:disabled { opacity: .34; cursor: not-allowed; }
.touch-widget-buttons button > i { color: var(--lime); font-size: 20px; }
.touch-widget-buttons button > span { display: grid; font-size: 10px; font-weight: 700; }
.touch-widget-buttons button small { margin-top: 2px; color: var(--muted); font-size: 8px; font-weight: 500; }
.touch-widget-buttons button > b { color: var(--muted); font-size: 17px; }
.touch-preview-panel { min-width: 0; padding: 22px; overflow-x: auto; }
.touch-preview-heading { min-width: 720px; }
.touch-preview-heading h2 { margin: 0; }
.touch-editor-actions { display: flex; align-items: center; gap: 12px; }
.touch-editor-actions > span { color: var(--muted); font-size: 9px; }
.touch-editor-hint { min-width: 720px; margin: 8px 0 12px; color: var(--muted); font-size: 10px; }
.touch-device-frame { --touch-background: none; position: relative; isolation: isolate; width: 100%; min-width: 720px; aspect-ratio: 1.6; overflow: hidden; border: 7px solid #050708; border-radius: 19px; background: #07101a var(--touch-background) center / cover no-repeat; box-shadow: 0 22px 55px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.12); }
.touch-device-frame::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(3,8,12,.36), rgba(4,10,14,.16)), linear-gradient(0deg, rgba(3,8,12,.32), transparent 45%); pointer-events: none; }
.touch-screen-nav { height: 12%; padding: 0 3.2%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid rgba(255,255,255,.11); background: rgba(5,12,17,.32); backdrop-filter: blur(10px); }
.touch-screen-brand { display: flex; align-items: center; gap: 5px; font: 700 clamp(8px, 1vw, 14px) var(--font-display); }
.touch-screen-brand .brand-mark { width: 20px; height: 18px; transform: scale(.55); transform-origin: left center; margin-right: -8px; }
.touch-screen-brand b { color: var(--lime); }
.touch-screen-nav nav { display: flex; align-items: stretch; align-self: stretch; gap: clamp(8px, 1.5vw, 24px); }
.touch-screen-nav nav button { position: relative; padding: 0; display: flex; align-items: center; border: 0; background: transparent; color: rgba(236,243,241,.66); font-family: inherit; font-size: clamp(6px, .72vw, 10px); font-weight: 600; text-transform: uppercase; cursor: pointer; }
.touch-screen-nav nav button:hover, .touch-screen-nav nav button:focus-visible { color: var(--lime); outline: none; }
.touch-screen-nav nav button.is-active { color: white; }
.touch-screen-nav nav button.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--lime); }
.touch-screen-nav time { justify-self: end; color: white; font-size: clamp(7px, .8vw, 11px); font-weight: 700; }
.touch-screen-grid { position: relative; height: 88%; padding: 4.5% 6% 5%; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr); gap: 2.8%; }
.touch-grid-cell { z-index: 1; min-width: 0; min-height: 0; border: 1px dashed rgba(255,255,255,.08); border-radius: 10px; background: rgba(255,255,255,.008); cursor: default; }
.touch-grid-cell.is-drop-target, .touch-grid-cell:hover { border-color: rgba(167,243,107,.48); background: rgba(167,243,107,.08); }
.touch-preview-widget { position: relative; z-index: 2; min-width: 0; min-height: 0; padding: clamp(8px, 1.3vw, 18px); overflow: hidden; border: 1px solid rgba(221,244,237,.2); border-radius: clamp(9px, 1.2vw, 16px); background: linear-gradient(145deg, rgba(20,31,39,.73), rgba(10,19,26,.57)); color: white; box-shadow: 0 14px 32px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.09); backdrop-filter: blur(17px) saturate(1.1); cursor: grab; }
.touch-preview-widget:active { cursor: grabbing; }
.touch-preview-widget.is-selected { border-color: rgba(167,243,107,.8); box-shadow: 0 0 0 2px rgba(167,243,107,.18), 0 14px 32px rgba(0,0,0,.3); }
.touch-preview-widget.is-dragging { opacity: .46; }
.touch-widget-top { display: flex; align-items: center; gap: clamp(4px, .7vw, 9px); }
.touch-widget-top > i { width: clamp(18px, 2.3vw, 34px); height: clamp(18px, 2.3vw, 34px); display: grid; place-items: center; border-radius: 50%; background: rgba(167,243,107,.1); color: var(--lime); font-size: clamp(11px, 1.55vw, 22px); }
.touch-widget-top small { color: rgba(238,245,243,.78); font-size: clamp(6px, .72vw, 10px); font-weight: 600; }
.touch-preview-widget > strong { margin-top: clamp(3px, .6vw, 9px); display: block; font: 700 clamp(9px, 1.35vw, 20px) var(--font-display); letter-spacing: -.035em; }
.touch-widget-remove { position: absolute; z-index: 4; top: 5px; right: 5px; width: clamp(18px, 1.8vw, 26px); height: clamp(18px, 1.8vw, 26px); padding: 0; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; background: rgba(3,8,12,.48); color: rgba(255,255,255,.72); cursor: pointer; }
.touch-widget-remove i { font-size: clamp(10px, 1.15vw, 16px); }
.touch-preview-widget-energy_flow { background: linear-gradient(145deg, rgba(12,25,31,.8), rgba(8,17,24,.61)); }
.touch-mini-energy-flow { position: absolute; left: 10%; right: 10%; top: 35%; bottom: 9%; }
.touch-mini-node { position: absolute; z-index: 2; width: clamp(20px, 3.2vw, 47px); aspect-ratio: 1; display: grid; place-items: center; border: 1.5px solid currentColor; border-radius: 50%; background: rgba(7,16,22,.9); box-shadow: 0 0 15px color-mix(in srgb, currentColor 20%, transparent); }
.touch-mini-node i { font-size: clamp(12px, 1.8vw, 26px); }
.touch-mini-node.is-solar { left: 0; top: 0; color: var(--lime); }
.touch-mini-node.is-home { left: calc(50% - clamp(10px, 1.6vw, 23px)); top: 13%; color: var(--blue); }
.touch-mini-node.is-grid { right: 0; top: 0; color: var(--lime); }
.touch-mini-node.is-battery { left: 21%; bottom: 0; color: var(--mint); }
.touch-mini-node.is-ev { right: 21%; bottom: 0; color: var(--blue); }
.touch-mini-routes { position: absolute; z-index: 1; left: 7%; right: 7%; top: 28%; height: 33%; border-top: 1px solid rgba(167,243,107,.8); border-bottom: 1px solid rgba(105,225,177,.7); }
.touch-mini-routes::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px solid rgba(90,167,255,.8); }
.touch-demo-screen { position: relative; height: 88%; padding: 3.2% 4.5% 4%; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 3%; color: white; overflow: hidden; }
.touch-demo-screen[hidden] { display: none; }
.touch-device-frame [data-touch-screen][hidden] { display: none !important; }
.touch-demo-screen-energy { background: radial-gradient(circle at 50% 100%, rgba(167,243,107,.09), transparent 52%); }
.touch-demo-screen-climate { background: radial-gradient(circle at 22% 52%, rgba(255,178,92,.12), transparent 42%); }
.touch-demo-screen-devices { background: radial-gradient(circle at 43% 55%, rgba(90,167,255,.12), transparent 48%); }
.touch-demo-screen-security { background: radial-gradient(circle at 18% 55%, rgba(105,225,177,.12), transparent 43%); }
.touch-demo-screen-settings { background: linear-gradient(90deg, rgba(18,28,39,.5), rgba(8,16,23,.14)); }
.touch-demo-screen-climate .touch-demo-title span, .touch-demo-screen-climate .touch-demo-live { color: #ffc477; }
.touch-demo-screen-devices .touch-demo-title span, .touch-demo-screen-devices .touch-demo-live { color: #77b9ff; }
.touch-demo-screen-security .touch-demo-title span, .touch-demo-screen-security .touch-demo-live { color: var(--mint); }
.touch-demo-screen-settings .touch-demo-title span, .touch-demo-screen-settings .touch-demo-live { color: #c5b7ff; }
.touch-demo-title { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.touch-demo-title > div { display: grid; gap: 3px; }
.touch-demo-title span { display: flex; align-items: center; gap: 5px; color: var(--lime); font-size: clamp(6px, .66vw, 9px); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.touch-demo-title span i { font-size: clamp(10px, 1vw, 15px); }
.touch-demo-title h3 { margin: 0; color: white; font: 700 clamp(13px, 1.7vw, 24px) var(--font-display); letter-spacing: -.035em; }
.touch-demo-live { padding: 4px 8px; border: 1px solid rgba(167,243,107,.25); border-radius: 999px; background: rgba(7,16,22,.48); color: var(--lime); font-size: clamp(5px, .55vw, 8px); letter-spacing: .06em; text-transform: uppercase; backdrop-filter: blur(10px); }
.touch-demo-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5%; }
.touch-demo-stats article { min-width: 0; padding: clamp(6px, 1vw, 13px); display: grid; grid-template-columns: auto 1fr; gap: clamp(5px, .7vw, 10px); align-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: clamp(7px, .8vw, 11px); background: rgba(8,18,25,.55); backdrop-filter: blur(15px); }
.touch-demo-stats article > i { color: var(--lime); font-size: clamp(12px, 1.65vw, 23px); }
.touch-demo-stats article span { min-width: 0; display: grid; color: rgba(255,255,255,.68); font-size: clamp(5px, .55vw, 8px); }
.touch-demo-stats article strong { margin-top: 2px; color: white; font: 700 clamp(9px, 1.05vw, 15px) var(--font-display); }
.touch-demo-stats article small { margin-top: 1px; overflow: hidden; color: rgba(255,255,255,.5); font-size: clamp(4px, .48vw, 7px); text-overflow: ellipsis; white-space: nowrap; }
.touch-demo-dashboard { min-height: 0; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, .85fr); gap: 2%; }
.touch-demo-card { min-width: 0; min-height: 0; padding: clamp(8px, 1.25vw, 17px); overflow: hidden; border: 1px solid rgba(255,255,255,.15); border-radius: clamp(8px, 1vw, 14px); background: linear-gradient(145deg, rgba(13,28,35,.72), rgba(7,16,23,.57)); box-shadow: 0 14px 30px rgba(0,0,0,.18); backdrop-filter: blur(17px); }
.touch-demo-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.touch-demo-card > header span { font-size: clamp(6px, .72vw, 10px); font-weight: 700; }
.touch-demo-card > header small { color: rgba(255,255,255,.48); font-size: clamp(4px, .5vw, 7px); }
.touch-demo-flow { display: grid; grid-template-rows: auto 1fr; }
.touch-demo-flow > div { min-height: 0; display: flex; align-items: center; justify-content: center; }
.touch-demo-flow > div span { display: grid; place-items: center; gap: 3px; }
.touch-demo-flow > div span i { width: clamp(28px, 4.2vw, 58px); aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--lime); border-radius: 50%; background: rgba(6,15,20,.78); color: var(--lime); font-size: clamp(13px, 2vw, 28px); }
.touch-demo-flow > div span b { color: rgba(255,255,255,.74); font-size: clamp(5px, .62vw, 9px); }
.touch-demo-flow > div em { width: 12%; height: 1px; margin: 0 3%; display: block; background: linear-gradient(90deg, rgba(167,243,107,.15), var(--lime), rgba(167,243,107,.15)); box-shadow: 0 0 8px rgba(167,243,107,.3); }
.touch-spark-bars { height: 68%; margin-top: 5%; padding: 0 2%; display: flex; align-items: end; gap: 4%; border-bottom: 1px solid rgba(255,255,255,.14); }
.touch-spark-bars i { flex: 1; min-height: 4px; border-radius: 3px 3px 0 0; background: linear-gradient(0deg, rgba(167,243,107,.18), var(--lime)); box-shadow: 0 0 8px rgba(167,243,107,.12); }
.touch-demo-card > footer { margin-top: 4%; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: rgba(255,255,255,.55); font-size: clamp(4px, .52vw, 7px); }
.touch-demo-card > footer b { color: white; font-size: clamp(6px, .74vw, 10px); }
.touch-climate-room { display: grid; grid-template-rows: auto 1fr auto; }
.touch-climate-room > div { display: flex; align-items: center; justify-content: center; gap: 8%; }
.touch-climate-room > div strong { font: 700 clamp(22px, 4.2vw, 58px) var(--font-display); letter-spacing: -.06em; }
.touch-climate-room > div sup { color: var(--lime); font-size: .45em; }
.touch-climate-room > div button { width: clamp(23px, 3.1vw, 42px); aspect-ratio: 1; border: 1px solid rgba(167,243,107,.35); border-radius: 50%; background: rgba(167,243,107,.07); color: var(--lime); font-size: clamp(12px, 1.6vw, 22px); cursor: default; }
.touch-demo-list { display: grid; grid-template-rows: auto repeat(3, 1fr); }
.touch-demo-list > p { min-width: 0; margin: 0; display: grid; grid-template-columns: auto 1fr; gap: clamp(5px, .7vw, 9px); align-items: center; border-top: 1px solid rgba(255,255,255,.09); }
.touch-demo-list > p > i { color: var(--lime); font-size: clamp(10px, 1.35vw, 19px); }
.touch-demo-list > p span { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 5px; color: rgba(255,255,255,.65); font-size: clamp(5px, .58vw, 8px); }
.touch-demo-list > p b { color: white; font-size: inherit; }
.touch-device-demo-grid, .touch-settings-demo-grid { min-height: 0; grid-row: 2 / 4; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 2%; }
.touch-device-demo-grid article, .touch-settings-demo-grid article { min-width: 0; padding: clamp(8px, 1.3vw, 18px); display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; gap: 5px clamp(6px, .9vw, 12px); align-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: clamp(8px, 1vw, 14px); background: rgba(8,18,25,.58); backdrop-filter: blur(16px); }
.touch-device-demo-grid article > i, .touch-settings-demo-grid article > i { grid-row: 1 / 3; width: clamp(25px, 3vw, 42px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: rgba(167,243,107,.09); color: var(--lime); font-size: clamp(12px, 1.55vw, 22px); }
.touch-device-demo-grid article span, .touch-settings-demo-grid article span { min-width: 0; display: grid; }
.touch-device-demo-grid article strong, .touch-settings-demo-grid article strong { color: white; font-size: clamp(6px, .72vw, 10px); }
.touch-device-demo-grid article small, .touch-settings-demo-grid article small { margin-top: 2px; overflow: hidden; color: rgba(255,255,255,.52); font-size: clamp(4px, .5vw, 7px); text-overflow: ellipsis; white-space: nowrap; }
.touch-device-demo-grid article > b, .touch-settings-demo-grid article > b { width: max-content; padding: 3px 6px; border-radius: 999px; background: rgba(167,243,107,.08); color: var(--lime); font-size: clamp(4px, .48vw, 7px); text-transform: uppercase; }
.touch-security-overview { min-height: 0; grid-row: 2 / 4; display: grid; grid-template-columns: minmax(0, .8fr) repeat(2, minmax(0, 1fr)); gap: 2%; }
.touch-security-status { padding: 10%; display: grid; place-items: center; align-content: center; gap: 7%; border: 1px solid rgba(167,243,107,.23); border-radius: clamp(8px, 1vw, 14px); background: radial-gradient(circle at 50% 38%, rgba(167,243,107,.15), rgba(7,17,23,.62) 55%); text-align: center; backdrop-filter: blur(17px); }
.touch-security-status > i { width: clamp(40px, 6vw, 82px); aspect-ratio: 1; display: grid; place-items: center; border: 1px solid rgba(167,243,107,.35); border-radius: 50%; color: var(--lime); font-size: clamp(21px, 3.2vw, 45px); box-shadow: 0 0 28px rgba(167,243,107,.12); }
.touch-security-status span { display: grid; gap: 3px; }
.touch-security-status strong { font: 700 clamp(10px, 1.35vw, 19px) var(--font-display); }
.touch-security-status small { color: rgba(255,255,255,.56); font-size: clamp(4px, .5vw, 7px); line-height: 1.4; }

/* Function-specific Chiyano Touch demo screens */
.touch-climate-layout { min-height: 0; grid-row: 2 / 4; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 2.2%; }
.touch-climate-controller { min-height: 0; padding: clamp(9px, 1.3vw, 18px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; border: 1px solid rgba(255,196,119,.28); border-radius: clamp(9px, 1.1vw, 15px); background: linear-gradient(145deg, rgba(45,31,24,.69), rgba(11,20,27,.62)); box-shadow: inset 0 1px rgba(255,255,255,.08); backdrop-filter: blur(18px); }
.touch-climate-controller > header { display: flex; justify-content: space-between; gap: 10px; }
.touch-climate-controller > header span { font-size: clamp(6px, .76vw, 11px); font-weight: 700; }
.touch-climate-controller > header small { color: rgba(255,196,119,.72); font-size: clamp(4px, .52vw, 7px); }
.touch-climate-dial { min-height: 0; display: grid; place-items: center; }
.touch-climate-dial::before { content: ''; width: min(47%, 150px); aspect-ratio: 1; grid-area: 1 / 1; border-radius: 50%; background: conic-gradient(from 225deg, #ffc477 0 68%, rgba(255,255,255,.08) 68% 87%, transparent 87%); filter: drop-shadow(0 0 13px rgba(255,196,119,.16)); -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%); mask: radial-gradient(circle, transparent 60%, #000 62%); }
.touch-climate-dial > span { grid-area: 1 / 1; display: grid; place-items: center; }
.touch-climate-dial small, .touch-climate-dial b { color: rgba(255,255,255,.55); font-size: clamp(4px, .48vw, 7px); font-weight: 500; }
.touch-climate-dial strong { color: white; font: 700 clamp(23px, 3.8vw, 53px) var(--font-display); letter-spacing: -.065em; line-height: .95; }
.touch-climate-dial sup { color: #ffc477; font-size: .43em; }
.touch-climate-controls { display: grid; grid-template-columns: auto 1fr auto; gap: 7%; align-items: center; }
.touch-climate-controls button { width: clamp(24px, 3vw, 42px); aspect-ratio: 1; border: 1px solid rgba(255,196,119,.35); border-radius: 50%; background: rgba(255,196,119,.08); color: #ffc477; font-size: clamp(12px, 1.6vw, 22px); }
.touch-climate-controls span { display: flex; align-items: center; justify-content: center; gap: 4px; color: rgba(255,255,255,.62); font-size: clamp(4px, .52vw, 7px); }
.touch-climate-controls span i { color: #ffc477; font-size: clamp(8px, 1vw, 14px); }
.touch-climate-zones { min-height: 0; display: grid; grid-template-rows: repeat(3, 1fr) auto; gap: 2.5%; }
.touch-climate-zones > article { min-width: 0; padding: 0 clamp(8px, 1vw, 14px); display: grid; grid-template-columns: auto 1fr auto; gap: clamp(6px, .8vw, 11px); align-items: center; border: 1px solid rgba(255,255,255,.13); border-radius: clamp(7px, .85vw, 12px); background: rgba(8,18,25,.58); backdrop-filter: blur(14px); }
.touch-climate-zones > article.is-active { border-color: rgba(255,196,119,.35); background: rgba(255,196,119,.08); }
.touch-climate-zones > article > i { color: #ffc477; font-size: clamp(12px, 1.55vw, 22px); }
.touch-climate-zones article span { min-width: 0; display: grid; }
.touch-climate-zones article strong { font-size: clamp(6px, .7vw, 10px); }
.touch-climate-zones article small { color: rgba(255,255,255,.5); font-size: clamp(4px, .48vw, 7px); }
.touch-climate-zones article > b { color: white; font: 700 clamp(8px, .9vw, 13px) var(--font-display); }
.touch-climate-zones > footer { display: flex; justify-content: space-between; gap: 8px; color: rgba(255,255,255,.57); font-size: clamp(4px, .48vw, 7px); }
.touch-climate-zones > footer span { display: flex; align-items: center; gap: 3px; }
.touch-climate-zones > footer i { color: #ffc477; font-size: clamp(8px, .9vw, 13px); }

.touch-devices-layout { min-height: 0; grid-row: 2 / 4; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .62fr); gap: 2.2%; }
.touch-network-map { position: relative; min-height: 0; overflow: hidden; border: 1px solid rgba(119,185,255,.23); border-radius: clamp(9px, 1.1vw, 15px); background: radial-gradient(circle at 50% 50%, rgba(62,135,210,.18), rgba(7,17,24,.62) 52%); backdrop-filter: blur(17px); }
.touch-network-hub { position: absolute; z-index: 3; left: 50%; top: 50%; width: clamp(72px, 9vw, 125px); aspect-ratio: 1; display: grid; place-items: center; align-content: center; gap: 2px; border: 1px solid rgba(119,185,255,.55); border-radius: 50%; background: #0b1925; box-shadow: 0 0 32px rgba(90,167,255,.21); transform: translate(-50%, -50%); }
.touch-network-hub > i { color: #77b9ff; font-size: clamp(18px, 2.4vw, 34px); }
.touch-network-hub strong { font-size: clamp(6px, .72vw, 10px); }
.touch-network-hub small { color: rgba(255,255,255,.48); font-size: clamp(4px, .46vw, 6px); }
.touch-network-route { position: absolute; z-index: 1; left: 50%; top: 50%; height: 1px; background: linear-gradient(90deg, rgba(119,185,255,.75), rgba(119,185,255,.12)); transform-origin: left center; }
.touch-network-route::after { content: ''; position: absolute; right: 12%; top: -2px; width: 4px; height: 4px; border-radius: 50%; background: #77b9ff; box-shadow: 0 0 7px #77b9ff; }
.touch-network-route.route-one { width: 38%; transform: rotate(-145deg); }
.touch-network-route.route-two { width: 35%; transform: rotate(-35deg); }
.touch-network-route.route-three { width: 38%; transform: rotate(145deg); }
.touch-network-route.route-four { width: 35%; transform: rotate(35deg); }
.touch-network-node { position: absolute; z-index: 2; min-width: clamp(74px, 9.5vw, 132px); padding: clamp(5px, .65vw, 9px); display: grid; grid-template-columns: auto 1fr; gap: 5px; align-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: clamp(6px, .75vw, 10px); background: rgba(7,17,24,.8); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.touch-network-node > i { color: #77b9ff; font-size: clamp(11px, 1.35vw, 19px); }
.touch-network-node span { display: grid; color: rgba(255,255,255,.58); font-size: clamp(4px, .48vw, 7px); }
.touch-network-node b { color: white; font-size: clamp(4px, .5vw, 7px); }
.touch-network-node.node-meter { left: 5%; top: 10%; }
.touch-network-node.node-battery { right: 5%; top: 10%; }
.touch-network-node.node-ev { left: 5%; bottom: 10%; }
.touch-network-node.node-heat { right: 5%; bottom: 10%; }
.touch-network-node.node-touch { left: 50%; bottom: 5%; transform: translateX(-50%); }
.touch-device-health { min-height: 0; padding: clamp(8px, 1.15vw, 16px); display: grid; grid-template-rows: auto repeat(4, 1fr) auto; border: 1px solid rgba(255,255,255,.14); border-radius: clamp(9px, 1.1vw, 15px); background: rgba(8,18,25,.64); backdrop-filter: blur(16px); }
.touch-device-health > header { display: flex; justify-content: space-between; gap: 6px; padding-bottom: 4%; }
.touch-device-health > header span { font-size: clamp(6px, .7vw, 10px); font-weight: 700; }
.touch-device-health > header b { color: #77b9ff; font-size: clamp(4px, .5vw, 7px); text-transform: uppercase; }
.touch-device-health > p { margin: 0; display: flex; justify-content: space-between; gap: 5px; align-items: center; border-top: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.5); font-size: clamp(4px, .5vw, 7px); }
.touch-device-health > p b { color: white; }
.touch-device-health > footer { padding-top: 4%; display: flex; align-items: center; gap: 4px; color: #77b9ff; font-size: clamp(4px, .48vw, 7px); line-height: 1.3; }
.touch-device-health > footer i { font-size: clamp(9px, 1vw, 14px); }

.touch-security-layout { min-height: 0; grid-row: 2 / 4; display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, .78fr)); gap: 2%; }
.touch-security-arm, .touch-security-camera, .touch-security-activity { min-height: 0; overflow: hidden; border: 1px solid rgba(105,225,177,.22); border-radius: clamp(9px, 1.1vw, 15px); background: rgba(7,18,23,.63); backdrop-filter: blur(17px); }
.touch-security-arm { padding: clamp(9px, 1.3vw, 18px); display: grid; grid-template-rows: 1fr auto auto; gap: 6%; }
.touch-security-arm > div { display: grid; place-items: center; align-content: center; text-align: center; }
.touch-security-arm > div > i { width: clamp(40px, 5.2vw, 72px); aspect-ratio: 1; display: grid; place-items: center; border: 1px solid rgba(105,225,177,.42); border-radius: 50%; background: rgba(105,225,177,.08); color: var(--mint); font-size: clamp(20px, 2.7vw, 38px); box-shadow: 0 0 24px rgba(105,225,177,.12); }
.touch-security-arm > div span { margin-top: 4%; display: grid; }
.touch-security-arm > div strong { font: 700 clamp(10px, 1.25vw, 18px) var(--font-display); }
.touch-security-arm > div small { color: rgba(255,255,255,.5); font-size: clamp(4px, .48vw, 7px); }
.touch-security-arm > button { padding: clamp(5px, .65vw, 9px); display: flex; align-items: center; justify-content: center; gap: 4px; border: 1px solid rgba(105,225,177,.3); border-radius: 999px; background: rgba(105,225,177,.1); color: var(--mint); font-size: clamp(5px, .56vw, 8px); font-weight: 700; }
.touch-security-arm > button i { font-size: clamp(9px, 1vw, 14px); }
.touch-security-arm > footer { display: flex; justify-content: space-between; gap: 4px; color: rgba(255,255,255,.52); font-size: clamp(3px, .4vw, 6px); }
.touch-security-arm > footer span { display: grid; place-items: center; gap: 2px; text-align: center; }
.touch-security-arm > footer i { color: var(--mint); font-size: clamp(8px, 1vw, 14px); }
.touch-security-camera { display: grid; grid-template-rows: auto 1fr; }
.touch-security-camera > header, .touch-security-activity > header { padding: clamp(7px, .9vw, 12px); display: flex; justify-content: space-between; align-items: center; }
.touch-security-camera > header span, .touch-security-activity > header span { font-size: clamp(6px, .68vw, 9px); font-weight: 700; }
.touch-security-camera > header b { display: flex; align-items: center; gap: 3px; color: var(--mint); font-size: clamp(4px, .46vw, 6px); text-transform: uppercase; }
.touch-security-camera > header b i { width: 4px; height: 4px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 6px var(--mint); }
.touch-security-camera > div { position: relative; display: grid; place-items: center; align-content: center; background: linear-gradient(145deg, rgba(20,34,39,.5), rgba(2,8,11,.82)), repeating-linear-gradient(90deg, transparent 0 14px, rgba(255,255,255,.02) 15px); }
.touch-security-camera > div > i { color: rgba(255,255,255,.22); font-size: clamp(27px, 4vw, 56px); }
.touch-security-camera > div span { color: rgba(255,255,255,.5); font-size: clamp(4px, .48vw, 7px); }
.touch-security-camera > div time { position: absolute; right: 6%; bottom: 5%; color: white; font-size: clamp(4px, .48vw, 7px); }
.touch-security-activity { padding: 0 clamp(7px, .9vw, 12px); display: grid; grid-template-rows: auto repeat(3, 1fr); }
.touch-security-activity > header { padding-left: 0; padding-right: 0; }
.touch-security-activity > header small { color: rgba(255,255,255,.45); font-size: clamp(4px, .46vw, 6px); }
.touch-security-activity > p { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 5px; align-items: center; border-top: 1px solid rgba(255,255,255,.08); }
.touch-security-activity > p > i { color: var(--mint); font-size: clamp(9px, 1.15vw, 16px); }
.touch-security-activity > p span { display: grid; color: rgba(255,255,255,.66); font-size: clamp(4px, .48vw, 7px); }
.touch-security-activity > p small { color: rgba(255,255,255,.4); font-size: clamp(3px, .4vw, 6px); }

.touch-settings-layout { min-height: 0; grid-row: 2 / 4; display: grid; grid-template-columns: minmax(135px, .52fr) minmax(0, 1.48fr); gap: 2.2%; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: clamp(9px, 1.1vw, 15px); background: rgba(8,17,24,.68); backdrop-filter: blur(18px); }
.touch-settings-layout > nav { padding: clamp(8px, 1.1vw, 15px); display: grid; align-content: start; gap: 3%; border-right: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.025); }
.touch-settings-layout > nav button { min-width: 0; padding: clamp(5px, .65vw, 9px); display: flex; align-items: center; gap: 6px; border: 0; border-radius: 7px; background: transparent; color: rgba(255,255,255,.55); font-family: inherit; font-size: clamp(5px, .58vw, 8px); text-align: left; }
.touch-settings-layout > nav button.is-active { background: rgba(197,183,255,.11); color: #d5caff; }
.touch-settings-layout > nav i { font-size: clamp(10px, 1.25vw, 17px); }
.touch-settings-layout > article { min-width: 0; padding: clamp(10px, 1.5vw, 20px); display: grid; grid-template-rows: auto 1.1fr repeat(3, 1fr); }
.touch-settings-layout > article > header { display: flex; justify-content: space-between; align-items: start; }
.touch-settings-layout > article > header span { display: grid; }
.touch-settings-layout > article > header strong { font: 700 clamp(8px, 1vw, 14px) var(--font-display); }
.touch-settings-layout > article > header small { color: rgba(255,255,255,.47); font-size: clamp(4px, .48vw, 7px); }
.touch-settings-layout > article > header > i { color: #c5b7ff; font-size: clamp(16px, 2vw, 28px); }
.touch-settings-layout label { display: grid; align-content: center; border-bottom: 1px solid rgba(255,255,255,.08); color: rgba(255,255,255,.72); font-size: clamp(5px, .56vw, 8px); }
.touch-settings-layout label > span { display: flex; justify-content: space-between; }
.touch-settings-layout label b { color: #d5caff; }
.touch-settings-layout input[type="range"] { width: 100%; height: 3px; margin-top: 5%; accent-color: #b8a7ff; }
.touch-settings-layout article > p { margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.touch-settings-layout article > p span { display: grid; }
.touch-settings-layout article > p strong { font-size: clamp(5px, .57vw, 8px); }
.touch-settings-layout article > p small { color: rgba(255,255,255,.45); font-size: clamp(4px, .45vw, 6px); }
.touch-settings-layout article > p > b { color: #d5caff; font-size: clamp(5px, .55vw, 8px); }
.touch-demo-switch { position: relative; width: clamp(22px, 2.8vw, 39px); height: clamp(12px, 1.45vw, 20px); border-radius: 999px; background: rgba(255,255,255,.12); }
.touch-demo-switch::after { content: ''; position: absolute; top: 2px; left: 2px; height: calc(100% - 4px); aspect-ratio: 1; border-radius: 50%; background: white; }
.touch-demo-switch.is-on { background: #8c78e8; }
.touch-demo-switch.is-on::after { left: auto; right: 2px; }
.touch-device-frame:not(.is-home-screen) .touch-gallery-credit { display: none; }
.touch-preview-footer { min-width: 720px; margin-top: 11px; display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 9px; }
.touch-preview-footer span { display: flex; align-items: center; gap: 5px; }
.touch-preview-footer i { color: var(--lime); font-size: 14px; }
.touch-empty-state { padding: 36px; display: flex; align-items: center; gap: 20px; }
.touch-empty-state > span { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 18px; background: rgba(167,243,107,.07); color: var(--lime); }
.touch-empty-state > span i { font-size: 33px; }
.touch-empty-state h2 { margin-bottom: 5px; font-size: 20px; }
.touch-empty-state p { margin: 0; }

.toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 12px 17px; border: 1px solid rgba(167,243,107,.25); border-radius: 10px; background: #182432; color: #e3e9ed; box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transition: .25s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) {
    .site-header { grid-template-columns: 1fr auto; padding: 0 28px; }
    .site-nav { display: none; }
    .hero { grid-template-columns: .9fr 1.1fr; padding-left: 36px; padding-right: 36px; }
    .hero h1 { font-size: 62px; }
    .orbit-two { width: 500px; height: 500px; }
    .hero-product { height: 620px; }
    .float-card { width: 158px; }
    .battery-card, .grid-card { bottom: 24%; }
    .ev-card { bottom: 0; }
    .metric-grid { grid-template-columns: repeat(3, 1fr); }
    .dashboard-grid-bottom { grid-template-columns: 1fr 1fr; }
    .history-panel { grid-column: 1 / -1; }
    .system-showcase { grid-template-columns: minmax(190px, .72fr) minmax(430px, 1.45fr) minmax(190px, .72fr); gap: 14px; }
    .system-product-visual { height: auto; }
}

@media (max-width: 820px) {
    .site-header { height: 66px; }
    .site-actions .login-link { display: none; }
    .nav-toggle { display: block; justify-self: end; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: transparent; color: var(--ink); font-size: 11px; }
    .site-actions { display: none; }
    .site-header:has(.nav-toggle[aria-expanded="true"]) .site-nav { position: absolute; left: 16px; right: 16px; top: 72px; padding: 18px; display: grid; gap: 17px; border: 1px solid var(--line-strong); border-radius: 14px; background: #0b1412; box-shadow: var(--shadow); }
    .hero { min-height: auto; padding: 122px 28px 70px; display: block; }
    .hero-copy { text-align: center; margin: auto; }
    .hero-copy .eyebrow, .hero-actions, .trust-row { justify-content: center; }
    .hero h1 { font-size: clamp(50px, 12vw, 78px); }
    .hero-product { max-width: 620px; height: 620px; margin: 35px auto 0; }
    .proof-strip { grid-template-columns: repeat(2, 1fr); gap: 22px 0; }
    .proof-strip div:nth-child(2) { border-right: 0; }
    .section { padding: 90px 28px; }
    .feature-grid { grid-template-columns: 1fr; }
    .feature-card { min-height: 250px; }
    .steps { grid-template-columns: 1fr 1fr; gap: 42px 0; }
    .steps li:nth-child(2)::after { display: none; }
    .system-showcase { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
    .system-showcase::before { display: none; }
    .touch-piece { grid-column: 1 / -1; grid-row: 1; width: min(100%, 680px); margin: 0 auto 12px; }
    .meter-piece { grid-column: 1; grid-row: 2; }
    .hub-piece { grid-column: 2; grid-row: 2; }
    .cta-section { margin: 0 22px 60px; padding: 45px 34px; display: grid; }
    .cta-actions { min-width: 0; }
    .site-footer { margin: 0 22px; padding-left: 0; padding-right: 0; }
    .app-header { grid-template-columns: 1fr auto; padding: 0 20px; }
    .app-nav, .status-dot { display: none; }
    .dashboard-shell { width: calc(100% - 32px); padding-top: 24px; }
    .dashboard-grid-top { grid-template-columns: 1fr; }
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-sidebar { position: static; }
    .touch-device-overview { grid-template-columns: 1fr; }
    .touch-editor { grid-template-columns: 1fr; }
    .touch-widget-library { position: static; max-height: none; }
    .touch-widget-library > section { margin-top: 18px; }
    .touch-widget-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .setup-progress { display: grid; grid-template-columns: 1fr 120px 1.2fr; align-items: center; text-align: left; }
    .setup-progress h2 { margin-bottom: 0; }
    .progress-ring { margin: 0; }
    .settings-sidebar > .button, .settings-sidebar > .save-note { order: -1; }
}

@media (max-width: 560px) {
    .site-header { padding: 0 18px; }
    .site-brand, .auth-brand { font-size: 18px; }
    .hero { padding: 110px 20px 55px; }
    .hero h1 { font-size: 49px; }
    .hero-copy > p { font-size: 15px; }
    .hero-actions .button { width: 100%; }
    .trust-row { gap: 11px; }
    .hero-product { height: 560px; margin-top: 28px; }
    .orbit-one { width: 280px; height: 280px; }
    .orbit-two { width: 390px; height: 390px; }
    .energy-hub { width: 92px; height: 92px; }
    .float-card { width: 142px; min-height: 105px; padding: 12px; grid-template-columns: 30px 1fr; column-gap: 8px; }
    .mini-icon { width: 30px; height: 30px; }
    .float-card strong { font-size: 20px; }
    .solar-card { left: 0; top: 4%; }
    .house-card { right: 0; top: 10%; }
    .battery-card { left: 1%; bottom: 27%; }
    .grid-card { right: 0; bottom: 27%; }
    .ev-card { bottom: 0; }
    .proof-strip { padding: 26px 16px; }
    .proof-strip div { padding: 0 12px; }
    .proof-strip strong { font-size: 22px; }
    .section { padding: 72px 20px; }
    .section-heading h2, .cta-section h2 { font-size: 38px; }
    .steps { grid-template-columns: 1fr; gap: 32px; }
    .steps li:not(:last-child)::after { left: 52px; right: auto; top: 52px; width: 1px; height: 30px; background: linear-gradient(rgba(167,243,107,.3), rgba(167,243,107,.05)); }
    .steps li { display: grid; grid-template-columns: 50px 1fr; gap: 17px; padding: 0 5px; }
    .system-section > .section-heading { margin-bottom: 42px; }
    .system-showcase { grid-template-columns: 1fr; gap: 38px; }
    .touch-piece, .meter-piece, .hub-piece { grid-column: 1; width: 100%; }
    .touch-piece { grid-row: 1; }
    .meter-piece { grid-row: 2; }
    .hub-piece { grid-row: 3; }
    .touch-product-visual { aspect-ratio: 1.08; border-radius: 20px; }
    .touch-product-visual > img { object-position: 58% center; }
    .meter-piece, .hub-piece { max-width: 390px; margin-left: auto; margin-right: auto; }
    .system-product-visual { height: auto; }
    .puppy-device-label { left: 7%; top: 32%; }
    .system-piece-copy, .touch-piece .system-piece-copy { padding: 19px 4px 0; text-align: left; }
    .touch-piece .system-piece-copy h3 { font-size: 26px; }
    .touch-piece .system-piece-copy p { font-size: 13px; }
    .touch-companion { left: 14px; right: auto; bottom: 14px; }
    .touch-live-pill { right: 14px; top: 14px; }
    .system-safety-note { margin-top: 48px; align-items: flex-start; }
    .cta-section { margin: 0 14px 50px; padding: 36px 24px; }
    .site-footer { grid-template-columns: 1fr; margin: 0 20px; }
    .site-footer p, .site-footer small { grid-column: 1; grid-row: auto; }
    .site-footer > div { flex-wrap: wrap; }
    .auth-shell { padding: 28px 14px; }
    .auth-card { padding: 30px 20px; border-radius: 18px; }
    .legal-header { min-height: 64px; padding: 0 18px; }
    .legal-header nav { gap: 13px; font-size: 11px; }
    .legal-header nav a:last-child { display: none; }
    .legal-shell { width: min(100% - 24px, 980px); padding: 35px 0 55px; }
    .legal-document { border-radius: 19px; }
    .legal-title { padding: 31px 22px 27px; display: grid; }
    .legal-title h1 { font-size: 37px; }
    .legal-print { width: 100%; }
    .legal-document > section { padding: 27px 22px; }
    .legal-document h2 { font-size: 19px; }
    .legal-document p, .legal-document li { font-size: 14px; }
    .legal-details { grid-template-columns: 1fr; }
    .legal-details > div:nth-child(odd) { border-right: 0; }
    .legal-details > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
    .legal-details > div:last-child { border-bottom: 0; }
    .legal-table { overflow-x: auto; }
    .legal-table > div { min-width: 540px; }
    .legal-note { margin: 28px 22px 32px; }
    .legal-footer { width: calc(100% - 40px); padding-bottom: 32px; flex-direction: column; }
    .dashboard-page { padding-bottom: 76px; }
    .app-header { height: 60px; padding: 0 16px; }
    .app-brand { font-size: 16px; }
    .user-menu { gap: 8px; }
    .dashboard-shell { width: calc(100% - 22px); padding-top: 19px; }
    .dashboard-title-row { align-items: flex-start; flex-wrap: wrap; }
    .dashboard-title-row h1 { font-size: 25px; }
    .dashboard-actions { width: 100%; justify-content: flex-end; }
    .dashboard-actions time { display: none; }
    .demo-clock { flex: 1; min-width: 0; }
    .demo-clock em { display: none; }
    .metric-grid { display: flex; margin-right: -11px; padding-right: 11px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .metric-grid::-webkit-scrollbar { display: none; }
    .metric-card { min-width: 176px; min-height: 104px; padding: 15px; scroll-snap-align: start; }
    .metric-card strong { font-size: 21px; }
    .panel { padding: 15px; border-radius: 14px; }
    .energy-flow { height: 254px; margin-left: 0; margin-right: 0; }
    .flow-icon { width: 54px; height: 54px; }
    .flow-icon i { font-size: 28px; }
    .flow-solar { left: 0; top: 58px; }
    .flow-home { left: calc(50% - 27px); top: 58px; }
    .flow-grid { right: 0; top: 58px; }
    .flow-solar .flow-copy, .flow-grid .flow-copy { top: 62px; }
    .flow-home .flow-copy { left: 50%; top: 62px; transform: translateX(-50%); text-align: center; }
    .flow-battery { left: 18%; bottom: 0; }
    .flow-ev { left: auto; right: 18%; bottom: 0; }
    .flow-battery .flow-copy, .flow-ev .flow-copy { left: 50%; top: 62px; transform: translateX(-50%); text-align: center; }
    .flow-copy small { font-size: 10px; }
    .flow-copy strong { font-size: 12px; }
    .flow-copy b { font-size: 9px; }
    .route-solar-home { left: 59px; right: calc(50% + 31px); top: 84px; }
    .route-home-grid { left: calc(50% + 31px); right: 59px; top: 84px; }
    .route-home-down { top: 113px; height: 65px; }
    .route-branch { left: calc(18% + 27px); right: calc(18% + 27px); top: 176px; }
    .route-battery { left: calc(18% + 27px); top: 176px; height: 25px; }
    .route-ev { left: auto; right: calc(18% + 27px); top: 176px; height: 25px; }
    .flow-legend { flex-wrap: wrap; gap: 7px 13px; }
    .dashboard-grid-bottom { grid-template-columns: 1fr; }
    .history-panel { grid-column: auto; }
    .automation-grid { grid-template-columns: 1fr; }
    .phase-row { grid-template-columns: 25px 44px 1fr 45px; padding: 0 7px; }
    .mobile-nav { position: fixed; z-index: 45; left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); height: 58px; padding: 5px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line-strong); border-radius: 15px; background: rgba(19, 29, 42, .95); box-shadow: 0 15px 40px rgba(0,0,0,.45); backdrop-filter: blur(18px); }
    .mobile-nav a { display: grid; place-items: center; gap: 1px; border-radius: 10px; color: var(--muted); font-size: 8px; }
    .mobile-nav a span { font-size: 18px; }
    .mobile-nav a.is-active { color: var(--lime); background: rgba(167,243,107,.06); }
    .settings-page .dashboard-title-row { display: grid; }
    .settings-page .dashboard-title-row > .button { width: max-content; }
    .settings-panel { padding: 18px; }
    .controller-card, .empty-state { grid-template-columns: 45px 1fr; }
    .controller-card .button, .empty-state .button { grid-column: 1 / -1; }
    .field-grid { grid-template-columns: 1fr; }
    .credential-row { grid-template-columns: 1fr; }
    .credential-row .button { width: 100%; }
    .setup-progress { display: block; text-align: center; }
    .setup-progress h2 { margin-bottom: 20px; }
    .progress-ring { margin: 0 auto 22px; }
    .touch-title-row { display: grid; }
    .touch-provision-form { width: 100%; align-items: stretch; flex-direction: column; }
    .touch-provision-form input { width: 100%; }
    .touch-editor-guide { grid-template-columns: 1fr; gap: 11px; }
    .touch-editor-guide > div + div { padding: 11px 0 0; border-left: 0; border-top: 1px solid var(--line); }
    .touch-widget-buttons { grid-template-columns: 1fr; }
}

@media print {
    .legal-page { background: #fff !important; color: #111 !important; }
    .legal-header, .legal-print, .legal-footer, .skip-link { display: none !important; }
    .legal-shell { width: 100%; padding: 0; }
    .legal-document { border: 0; border-radius: 0; background: #fff; box-shadow: none; }
    .legal-title, .legal-document > section { padding: 18px 0; border-color: #ccc; background: none; }
    .legal-title h1, .legal-document h2, .legal-document p, .legal-document li, .legal-details dd, .legal-table span, .legal-table strong { color: #111 !important; }
    .legal-document a { color: #111 !important; text-decoration: underline; }
    .legal-note { margin: 22px 0; border-color: #aaa; background: #f5f5f5; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
}

/* Chiyano Gallery */
select, textarea { font: inherit; }
.button:disabled, button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.gallery-shell { max-width: 1240px; }
.gallery-hero-row { align-items: end; }
.gallery-hero-row > div:first-child { max-width: 760px; }
.gallery-schedule { display: flex; gap: 10px; }
.gallery-schedule span { min-width: 145px; padding: 13px 16px; display: grid; grid-template-columns: auto 1fr; gap: 0 9px; align-items: center; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--panel); color: var(--muted); font-size: 10px; letter-spacing: .1em; }
.gallery-schedule i { grid-row: 1 / 3; color: var(--lime); }
.gallery-schedule b { color: var(--ink); font: 700 18px var(--font-display); letter-spacing: 0; }
.gallery-submit-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 18px; align-items: start; }
.gallery-form { display: grid; gap: 20px; }
.gallery-form > label, .gallery-field-grid > label, .gallery-approve-form label, .gallery-reject-form label { display: grid; gap: 7px; color: #dfe7e4; font-size: 12px; font-weight: 700; }
.gallery-form label > small, .gallery-field-grid label > small { color: var(--muted); font-weight: 400; }
.gallery-form input:not([type="checkbox"]):not([type="file"]), .gallery-form select, .gallery-form textarea, .gallery-approve-form input, .gallery-approve-form select, .gallery-reject-form input { width: 100%; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 10px; background: #0b1420; color: var(--ink); outline: none; }
.gallery-form input:not([type="checkbox"]):not([type="file"]), .gallery-form select, .gallery-approve-form input, .gallery-approve-form select, .gallery-reject-form input { height: 46px; }
.gallery-form textarea { min-height: 130px; padding-top: 12px; resize: vertical; }
.gallery-form input:focus, .gallery-form select:focus, .gallery-form textarea:focus { border-color: rgba(167,243,107,.5); }
.gallery-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.gallery-upload-field { min-height: 155px; padding: 26px; place-items: center; align-content: center; text-align: center; border: 1px dashed rgba(167,243,107,.36); border-radius: 14px; background: rgba(167,243,107,.035); cursor: pointer; }
.gallery-upload-field > span { color: var(--lime); font-size: 32px; }
.gallery-upload-field > input { width: min(100%, 330px); margin-top: 8px; color: var(--muted); font-size: 11px; }
.gallery-rights { margin: 0; padding: 16px; display: grid; gap: 11px; border: 1px solid var(--line); border-radius: 12px; }
.gallery-rights legend { padding: 0 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.gallery-rights label { display: grid; grid-template-columns: 18px 1fr; gap: 9px; align-items: start; color: #cad4d0; font-size: 12px; line-height: 1.5; }
.gallery-rights input { margin-top: 3px; accent-color: var(--lime-2); }
.gallery-explainer { position: sticky; top: 88px; padding: 28px; background: radial-gradient(circle at 90% 5%, rgba(167,243,107,.09), transparent 32%), linear-gradient(145deg, #151f2c, #111925); }
.gallery-explainer h2 { margin: 8px 0 25px; font-size: 27px; }
.gallery-explainer ol { margin: 0; padding: 0; display: grid; gap: 20px; list-style: none; }
.gallery-explainer li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; }
.gallery-explainer li > b { color: var(--lime); font: 700 11px var(--font-display); }
.gallery-explainer li strong, .gallery-explainer li small { display: block; }
.gallery-explainer li strong { font-size: 13px; }
.gallery-explainer li small { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.gallery-explainer blockquote { margin: 28px 0 12px; padding: 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 11px; background: rgba(0,0,0,.22); font-size: 12px; }
.gallery-explainer > p { margin-bottom: 0; font-size: 11px; }
.gallery-submissions, .gallery-admin-section { margin-top: 38px; }
.gallery-submissions > .panel-heading, .gallery-admin-section > .panel-heading { margin-bottom: 14px; }
.gallery-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gallery-card { padding: 0; overflow: hidden; }
.gallery-card-image { position: relative; width: 100%; aspect-ratio: 8 / 5; padding: 0; display: block; overflow: hidden; border: 0; background: #0b131c; cursor: pointer; }
.gallery-card-image img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .35s ease; }
.gallery-card-image:hover img { transform: scale(1.025); }
.gallery-status { padding: 5px 8px; display: inline-flex; border: 1px solid rgba(167,243,107,.24); border-radius: 999px; background: rgba(7,15,20,.8); color: var(--lime); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.gallery-card-image > .gallery-status { position: absolute; left: 12px; top: 12px; }
.gallery-status.status-pending { color: var(--amber); border-color: rgba(247,201,106,.28); }
.gallery-status.status-rejected { color: #ff9b9b; border-color: rgba(255,120,120,.3); }
.gallery-card-copy { padding: 17px; }
.gallery-card-copy > span { color: var(--lime); font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.gallery-card-copy h3 { margin: 6px 0 5px; font-size: 16px; }
.gallery-card-copy p, .gallery-card-copy small { margin: 0; display: block; font-size: 10px; }
.gallery-card-copy small { margin-top: 9px; color: var(--muted); }
.gallery-card-copy .gallery-rejection { color: #ffb0b0; }
.gallery-admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery-admin-stats article { padding: 17px 20px; display: flex; justify-content: space-between; align-items: center; }
.gallery-admin-stats span { color: var(--muted); font-size: 11px; }
.gallery-admin-stats strong { font: 700 23px var(--font-display); }
.gallery-admin-stats .ready { color: var(--lime); font-size: 14px; }
.gallery-admin-stats .not-ready { color: #ff9b9b; font-size: 14px; }
.gallery-rotation-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gallery-rotation-card { min-height: 190px; display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: center; }
.gallery-rotation-card > .panel-kicker { grid-column: 1 / -1; }
.gallery-rotation-card > img { width: 100%; aspect-ratio: 8 / 5; border-radius: 10px; object-fit: cover; }
.gallery-rotation-card h2 { margin: 8px 0 4px; font-size: 17px; }
.gallery-rotation-card p { margin: 0 0 8px; font-size: 10px; }
.gallery-rotation-card time { color: var(--muted); font-size: 10px; }
.gallery-moderation-list { display: grid; gap: 16px; }
.gallery-moderation-card { padding: 0; display: grid; grid-template-columns: minmax(290px, .8fr) minmax(0, 1.35fr); overflow: hidden; }
.gallery-moderation-card > .gallery-card-image { height: 100%; aspect-ratio: auto; min-height: 440px; }
.gallery-preview-action { position: absolute; left: 50%; top: 50%; padding: 9px 13px; display: flex; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(8,14,18,.72); color: white; font-size: 11px; transform: translate(-50%, -50%); backdrop-filter: blur(12px); }
.gallery-preview-action i { font-size: 16px; }
.gallery-moderation-copy { padding: 24px; }
.gallery-moderation-copy > span { color: var(--lime); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.gallery-moderation-copy h3 { margin: 6px 0 8px; font-size: 21px; }
.gallery-moderation-copy > p { max-height: 105px; overflow: auto; font-size: 11px; }
.gallery-moderation-copy dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 15px; }
.gallery-moderation-copy dl div { padding-top: 8px; border-top: 1px solid var(--line); }
.gallery-moderation-copy dt { color: var(--muted); font-size: 9px; }
.gallery-moderation-copy dd { margin: 3px 0 0; font-size: 11px; }
.gallery-approve-form { display: grid; grid-template-columns: 150px 1fr auto; gap: 10px; align-items: end; }
.gallery-reject-form { margin-top: 10px; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.gallery-pools-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.gallery-pool h2 { display: flex; align-items: center; gap: 8px; }
.gallery-pool h2 i { color: var(--lime); font-size: 20px; }
.gallery-queue { margin: 12px 0 0; padding: 0; display: grid; list-style: none; }
.gallery-queue li { min-width: 0; padding: 10px 0; display: grid; grid-template-columns: 24px 66px minmax(0, 1fr) auto; gap: 10px; align-items: center; border-top: 1px solid var(--line); }
.gallery-queue-number { color: var(--muted); font: 700 11px var(--font-display); }
.gallery-queue img { width: 66px; height: 44px; border-radius: 6px; object-fit: cover; }
.gallery-queue strong, .gallery-queue small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-queue strong { font-size: 11px; }
.gallery-queue small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.gallery-queue-actions { display: flex; gap: 4px; }
.gallery-queue-actions button, .gallery-dialog-close { width: 30px; height: 30px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.025); color: var(--ink); cursor: pointer; }
.gallery-queue-actions i { font-size: 15px; }
.gallery-dialog { width: min(1000px, calc(100vw - 40px)); max-height: calc(100vh - 40px); padding: 0; overflow: auto; border: 1px solid var(--line-strong); border-radius: 18px; background: #111b27; color: var(--ink); box-shadow: 0 40px 120px rgba(0,0,0,.65); }
.gallery-dialog::backdrop { background: rgba(2,7,10,.78); backdrop-filter: blur(7px); }
.gallery-dialog > img { width: 100%; max-height: 68vh; display: block; object-fit: contain; background: #05090d; }
.gallery-dialog > div { padding: 22px 25px; }
.gallery-dialog h2 { margin: 6px 0; }
.gallery-dialog p { margin: 5px 0; font-size: 12px; }
.gallery-dialog-close { position: fixed; z-index: 2; margin: 12px; right: max(20px, calc((100vw - min(1000px, calc(100vw - 40px))) / 2 + 12px)); background: rgba(8,14,18,.8); }
.touch-gallery-credit { position: absolute; z-index: 8; left: 3.2%; bottom: 2.1%; max-width: 58%; padding: 5px 9px; overflow: hidden; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; background: rgba(4,10,14,.48); color: rgba(255,255,255,.92); font-size: clamp(6px, .66vw, 9px); text-overflow: ellipsis; white-space: nowrap; cursor: pointer; backdrop-filter: blur(10px); }
.touch-gallery-credit:hover { border-color: rgba(167,243,107,.45); }
.touch-gallery-fade-layer { position: absolute; z-index: 0; inset: 0; background-position: center; background-size: cover; opacity: 0; pointer-events: none; transition: opacity .9s ease; }
.touch-gallery-fade-layer.is-visible { opacity: 1; }
.touch-device-frame::after { z-index: 1; }
.touch-device-frame > .touch-screen-nav, .touch-device-frame > .touch-screen-grid, .touch-device-frame > .touch-demo-screen { position: relative; z-index: 2; }
.touch-gallery-details { margin: 16px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.touch-gallery-details div { padding-top: 9px; border-top: 1px solid var(--line); }
.touch-gallery-details dt { color: var(--muted); font-size: 10px; }
.touch-gallery-details dd { margin: 4px 0 0; font-size: 12px; }

@media (max-width: 980px) {
    .gallery-submit-layout, .gallery-pools-grid { grid-template-columns: 1fr; }
    .gallery-explainer { position: static; }
    .gallery-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gallery-rotation-card { grid-template-columns: 150px 1fr; }
    .gallery-moderation-card { grid-template-columns: 240px 1fr; }
    .gallery-moderation-card > .gallery-card-image { min-height: 520px; }
}

@media (max-width: 700px) {
    .gallery-hero-row { display: grid; }
    .gallery-schedule { width: 100%; }
    .gallery-schedule span { flex: 1; min-width: 0; }
    .gallery-field-grid, .gallery-card-grid, .gallery-admin-stats, .gallery-rotation-grid { grid-template-columns: 1fr; }
    .gallery-admin-stats { grid-template-columns: repeat(2, 1fr); }
    .gallery-moderation-card { grid-template-columns: 1fr; }
    .gallery-moderation-card > .gallery-card-image { min-height: 260px; aspect-ratio: 8 / 5; }
    .gallery-approve-form, .gallery-reject-form { grid-template-columns: 1fr; }
    .gallery-rotation-card { grid-template-columns: 110px 1fr; }
}
