/* kmage / shared studio, operations and field-notes shell. Local assets only. */
:root { --cyber-cyan: #69edff; --cyber-pink: #df9cff; --cyber-edge: #7ce8ff29; --cyber-mono: ui-monospace, SFMono-Regular, Consolas, monospace; }
body { background-color: #05080e; background-image: radial-gradient(ellipse at 95% 5%, #13495038, transparent 48%), radial-gradient(ellipse at 5% 75%, #49246a1c, transparent 45%), linear-gradient(#77c9ed04 1px, transparent 1px), linear-gradient(90deg, #77c9ed04 1px, transparent 1px); background-size: auto, auto, 64px 64px, 64px 64px; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--cyber-cyan); outline-offset: 4px; }
.topbar { border-bottom-color: #8cdef52b; }
.brand-name { font-size: 30px; font-weight: 800; letter-spacing: -.07em; }
.brand-mark { border: 1px solid #69edff55; padding: 6px; width: 38px; height: 38px; background: #69edff08; }
.brand-label { color: #a6b9cb; letter-spacing: .15em; font-size: 9px; border-color: #7ce8ff29; }
.cyber-deck { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; color: #8fa6bc; font: 10px var(--cyber-mono); letter-spacing: .12em; border-bottom: 1px solid #7ce8ff18; }
.cyber-deck span:first-child { color: var(--cyber-cyan); }
.cyber-deck span:last-child { color: #d6b8ef; }
.console-ribbon { display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 0; padding-bottom: 0; font-size: 9px; opacity: .8; }
.studio { padding-top: 30px; gap: clamp(28px, 4vw, 64px); }
.studio-intro { position: relative; padding-left: 20px; border-left: 2px solid #69edff80; }
.studio-intro::after { content: 'K / 01'; position: absolute; right: 0; top: 0; color: #69edff55; font: 10px var(--cyber-mono); letter-spacing: .2em; }
.studio-intro h1 { font-size: clamp(38px, 3.4vw, 52px); line-height: 1.18; }
.studio-intro h1 em { color: #a7f4ff; text-shadow: 0 0 35px #69edff24; }
.form-card { border-radius: 3px 18px 3px 18px; background: linear-gradient(150deg, #122233d9, #080e18fa 65%); border-color: #7ce8ff33; border-top-color: #69edff85; box-shadow: 0 25px 70px #0004; }
.form-section + .form-section { border-color: #7ce8ff1a; }
.mode-switch { border: 1px solid #7ce8ff22; padding: 5px; background: #070d16; }
.mode-button { position: relative; isolation: isolate; min-height: 43px; }
.mode-button > * { position: relative; z-index: 1; }
.mode-button::before, .mode-button::after { z-index: 0; pointer-events: none; }
.mode-button.is-active { color: #79edff; background: linear-gradient(120deg, #69edff21, #69edff05); }
.mode-button.is-active svg { color: inherit; fill: none; stroke: currentColor; }
textarea { line-height: 1.9; background: #060c14; }
.generate-button, .auth-submit, .refresh-button, .checkin-claim { position: relative; overflow: hidden; transition: box-shadow .2s, border-color .2s, translate .15s; }
.generate-button { border: 1px solid #b4f6ff88; border-radius: 4px 12px 4px 12px; background: linear-gradient(110deg, #7befff, #70efc3); letter-spacing: .08em; }
.generate-button::before, .auth-submit::before, .refresh-button::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 30%, #ffffff60 50%, transparent 70%); transform: translateX(-130%); }
.generate-button:hover::before, .auth-submit:hover::before, .refresh-button:hover::before { animation: kmage-energy .75s ease-out; }
.generate-button:hover { box-shadow: 0 0 32px #69edff40; }
.canvas-heading { padding-top: 6px; }
.gallery-title-row h2 { font-size: 25px; }
.canvas { position: relative; }
.empty-state { min-height: 550px; border-radius: 3px 20px 3px 20px; border: 1px solid #7ce8ff35; background: radial-gradient(ellipse at 50% 38%, #15445555, transparent 55%), linear-gradient(145deg, #0c1926, #060b13 75%); }
.empty-state::after { content: ''; position: absolute; inset: 12px; border: 1px solid #69edff22; clip-path: polygon(0 0, 20% 0, 20% 1%, 1% 1%, 1% 20%, 0 20%, 0 0, 100% 100%, 80% 100%, 80% 99%, 99% 99%, 99% 80%, 100% 80%, 100% 100%); pointer-events: none; }
.empty-art { width: 245px; height: 195px; }
.empty-frame { border-color: #9bf2ff99; box-shadow: 14px 14px 0 -1px #0a1420, 14px 14px 0 0 #df9cff55, 0 0 60px #69edff13; }
.empty-orb { animation: kmage-ring 5s ease-in-out infinite; }
.orb-two { animation-delay: -2.5s; }
.empty-eyebrow { color: #83dbe9; font-size: 9px; letter-spacing: .24em; }
.empty-state h3 { font-size: 28px; }
.empty-state > p:not(.empty-eyebrow) { max-width: 350px; color: #9daec1; line-height: 1.9; }
.gallery { position: relative; }
.gallery::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(180deg, transparent 45%, #69edff18 50%, transparent 55%); background-size: 100% 200%; }
.cyber-generating .gallery::after { opacity: 1; animation: kmage-scan 3s linear infinite; }
.cyber-signal .canvas-heading { animation: kmage-signal .24s steps(2) 1; }
.image-card, .task-card { border-radius: 3px 14px 3px 14px; border-color: #7ce8ff29; background: #0a1320; }
:is(.image-card, .task-card, .overview-kpi, .overview-card):hover { border-color: #69edff70; box-shadow: 0 8px 30px #0003, 0 0 24px #69edff0a; }
dialog:not(.lightbox) { border-radius: 4px 20px 4px 20px; border-color: #7ce8ff60; background: radial-gradient(ellipse at 100% 0, #15455545, transparent 60%), #0a111d; }
.auth-dialog[open] { animation: kmage-auth .32s steps(3) 1; }
.auth-dialog { border-left: 2px solid #69edff; border-right: 2px solid #df9cff; }
.auth-kicker { color: #99eaf6; }
.site-footer { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 44px; padding-top: 25px; }
.footer-brand { width: 100%; font-size: 27px; letter-spacing: -.06em; color: #eaf7ff; }
.footer-brand small { margin-left: 15px; color: #8fa6bc; font: 9px var(--cyber-mono); letter-spacing: .15em; }
.site-footer p { flex: 1; color: #8fa0b5; }
/* All operations views share the same panel, navigation and data surface rules. */
.admin-sidebar { background: linear-gradient(180deg, #0e202c 0, #080e18 25%, #070c14); }
.admin-brand-copy strong { font-size: 29px; letter-spacing: -.06em; }
.admin-brand-copy small { font-size: 8px; }
.admin-workspace { background: transparent; }
.admin-shell > .cyber-deck { margin-bottom: 30px; padding-top: 0; }
.admin-nav-item { position: relative; margin-bottom: 4px; min-height: 42px; }
.admin-nav-item.is-active { background: linear-gradient(90deg, #69edff25, #69edff04); border-color: #69edff44; }
.admin-nav-item.is-active::after, .admin-secure-label > span, .console-ribbon i { animation: kmage-breathe 3s ease-in-out infinite; }
.admin-topbar { gap: 12px; }
.admin-topbar-actions { flex-wrap: wrap; }
.admin-shell :is(.overview-card, .overview-kpi, .system-monitor-card, [class$='-panel'], .settings-grid > section) { border-radius: 3px 16px 3px 16px; background: linear-gradient(135deg, #112130e8, #090f1af5 75%); border-color: #7ce8ff29; }
.overview-kpi { position: relative; overflow: hidden; border-top-color: #69edff88 !important; }
.overview-kpi.is-primary { background: radial-gradient(ellipse at 100% 0, #197d7f40, transparent 75%), #0c1c29; }
.overview-kpi > strong { text-shadow: 0 0 25px #69edff22; }
.admin-shell table { background: #080f19; }
.admin-shell th { letter-spacing: .05em; background: #102230; }
.admin-shell tbody tr:hover { background-image: linear-gradient(90deg, #69edff16, transparent 80%); }
.admin-shell td { border-bottom-color: #7ce8ff12; }
.admin-view:not([hidden]) { animation: kmage-enter .25s ease-out; }
/* Shared controls and accessible command dialog. */
.cyber-tools { display: flex; gap: 6px; align-items: center; }
.cyber-tool { border: 1px solid #7ce8ff35; border-radius: 5px; padding: 7px 9px; min-height: 32px; color: #b5d7e4; background: #0b1824; white-space: nowrap; font: 10px var(--cyber-mono); cursor: pointer; }
.cyber-tool:hover { color: #bcf5ff; border-color: #69edff88; background: #153343; }
dialog.cyber-palette { width: min(560px, calc(100vw - 32px)); max-height: 80vh; padding: 25px; color: #ecf7ff; box-shadow: 0 25px 100px #000b; }
.cyber-palette h2 { font: 12px var(--cyber-mono); color: #9beeff; letter-spacing: .1em; margin: 0 85px 22px 0; }
.cyber-palette-close { position: absolute; top: 19px; right: 20px; border: 0; background: transparent; color: #9cb1c7; font-size: 11px; cursor: pointer; }
.cyber-search { width: 100%; padding: 14px; background: #040a12; color: #edf8ff; border: 1px solid #69edff55; border-radius: 5px; font: inherit; }
.cyber-command-list { display: grid; gap: 5px; max-height: 43vh; overflow: auto; padding-top: 15px; }
.cyber-command-list button { text-align: left; border: 1px solid transparent; padding: 13px; color: #c6d8e7; background: #10202e; border-radius: 4px; cursor: pointer; }
.cyber-command-list button:hover, .cyber-command-list button:focus { color: #beF7ff; background: #173b49; border-color: #69edff60; }
.cyber-command-hint, .cyber-no-results { color: #93a9c0; font: 10px var(--cyber-mono); margin: 18px 0 0; }
.cyber-boot { position: fixed; bottom: 24px; left: 24px; z-index: 50; padding: 18px 100px 15px 22px; max-width: calc(100vw - 32px); border: 1px solid #69edff70; border-left: 3px solid #69edff; background: #08121bf5; box-shadow: 0 10px 40px #0006; color: #b8d4e3; font: 10px var(--cyber-mono); animation: kmage-enter .3s ease-out; }
.cyber-boot strong { color: #a4f3ff; letter-spacing: .15em; }
.cyber-boot p { margin: 10px 0 0; }
.cyber-boot button { position: absolute; right: 14px; top: 14px; color: #acbcd0; background: none; border: 0; cursor: pointer; }
.policy-page, .api-docs-page { max-width: 960px; padding: 48px 40px; margin: 40px auto; border: 1px solid #7ce8ff29; border-top: 2px solid #69edff80; border-radius: 3px 22px 3px 22px; background: linear-gradient(140deg, #102331d9, #080e18f5 65%); box-shadow: 0 30px 90px #0004; }
.policy-brand { display: flex; gap: 18px; align-items: baseline; margin-bottom: 30px; color: #edf8ff; text-decoration: none; font-size: 35px; font-weight: 800; letter-spacing: -.06em; }
.policy-brand small { color: #8da8bf; font: 9px var(--cyber-mono); letter-spacing: .12em; }
:is(.policy-page, .api-docs-page) .cyber-tools { margin-top: 35px; }
/* Ambient particles run by default; reduced motion hides them and hidden tabs pause them. */
.cyber-dust, .cyber-cursor { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.app-shell, .admin-app, .policy-page, .api-docs-page { position: relative; z-index: 1; }
.cyber-dust { display: none; overflow: hidden; }
.cyber-particles .cyber-dust { display: block; }
.cyber-dust i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #86edff80; box-shadow: 0 0 8px #69edff55; animation: kmage-drift 18s linear infinite; left: 8%; top: 20%; }
.cyber-dust i:nth-child(2n) { left: 27%; top: 70%; animation-delay: -5s; }
.cyber-dust i:nth-child(3n) { left: 55%; top: 40%; animation-delay: -10s; }
.cyber-dust i:nth-child(4n) { left: 77%; top: 90%; animation-delay: -14s; }
.cyber-dust i:nth-child(5n) { left: 94%; top: 50%; animation-delay: -3s; }
.cyber-dust i:nth-child(7n) { left: 42%; top: 85%; animation-delay: -8s; }
.cyber-cursor { inset: -200px auto auto -200px; width: 400px; height: 400px; border-radius: 50%; background: radial-gradient(circle, #69edff0b, transparent 65%); opacity: 0; }
@media (pointer: fine) { body:hover .cyber-cursor { opacity: 1; } }
.cyber-paused *, .cyber-paused *::before, .cyber-paused *::after { animation-play-state: paused !important; }
@keyframes kmage-energy { to { transform: translateX(130%); } }
@keyframes kmage-ring { 50% { opacity: .35; scale: 1.08; } }
@keyframes kmage-breathe { 50% { opacity: .45; box-shadow: 0 0 12px #69edff70; } }
@keyframes kmage-scan { from { background-position: 0 100%; } to { background-position: 0 -100%; } }
@keyframes kmage-signal { 50% { transform: translateX(1px); text-shadow: -2px 0 #df9cff77; } }
@keyframes kmage-auth { 33% { border-color: #df9cff; box-shadow: 3px 0 #69edff55, -3px 0 #df9cff55; } 66% { border-color: #69edff; } }
@keyframes kmage-enter { from { opacity: .5; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes kmage-drift { to { transform: translate3d(16px, -160px, 0); opacity: 0; } }
@media (max-width: 900px) { .topbar-right { flex-wrap: wrap; gap: 12px; } .admin-secure-label { display: none; } .cyber-deck span:nth-child(2) { display: none; } }
@media (max-width: 720px) {
 .console-ribbon { flex-wrap: wrap; gap: 8px 16px; }
 .console-ribbon > span { min-width: 0; overflow-wrap: anywhere; }
 .console-ribbon > span:nth-child(2) { display: none; }
 .console-ribbon > span:last-child { margin-left: auto; text-align: right; }
}
@media (max-width: 600px) {
 .brand-name { font-size: 27px; } .topbar-right { justify-content: space-between; } .topbar .account-area { flex: initial; } .topbar-divider { display: none; }
 .cyber-tools { flex-wrap: wrap; } .cyber-tool { font-size: 9px; padding: 6px 8px; }
 .studio-intro { padding-left: 15px; } .studio-intro h1 { font-size: 38px; } .empty-state { min-height: 450px; }
 .cyber-deck { font-size: 8px; padding: 16px 0; } .admin-topbar-actions { gap: 8px; } .admin-topbar-actions .back-link { display: none; }
 .cyber-boot { left: 16px; bottom: 16px; padding-left: 15px; font-size: 9px; } .policy-page, .api-docs-page { margin: 16px; padding: 28px 20px; }
 .site-footer p { flex-basis: 100%; } .site-footer nav { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
 *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; translate: none !important; }
 .cyber-dust, .cyber-cursor, .cyber-boot, .gallery::after { display: none !important; }
}

.cyber-horizon { position: fixed; inset: -12px; pointer-events: none; z-index: 0; background: linear-gradient(115deg, transparent 65%, #69edff06 65.1%, transparent 65.3%); }
@media (prefers-reduced-motion: reduce) { .cyber-horizon { display: none; } }
