/* ============================================================

Field Story Builder — Core

Base tokens, reset, layout spine, typography.

============================================================ */

:root {

--bg-primary:    #0a0e14;

--bg-secondary:  #111722;

--bg-card:       #161e2b;

--bg-elevated:   #1c2536;

--text-main:     #f1f5f9;

--text-muted:    #a8b3c2;

--text-faint:    #6b7688;

--border-color:  rgba(255, 255, 255, 0.12);

--border-strong: rgba(255, 255, 255, 0.24);

--amber:   #f59e0b;

--cyan:    #06b6d4;

--emerald: #10b981;

--violet:  #8b5cf6;

--rose:    #f43f5e;

--blue:    #3b82f6;

--orange:  #fb923c;

--slate:   #94a3b8;

--accent:      var(--amber);

--accent-glow: rgba(245, 158, 11, 0.28);

--accent-soft: rgba(245, 158, 11, 0.14);

--radius-sm: 6px;

--radius-md: 10px;

--radius-lg: 14px;

--radius-xl: 20px;

--space-xs: 0.25rem;

--space-sm: 0.5rem;

--space-md: 0.9rem;

--space-lg: 1.4rem;

--space-xl: 2rem;

--header-h: 88px;

--nav-h:    64px;

--font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

--font-mono:  ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

--fs-xs: 0.72rem;

--fs-sm: 0.82rem;

--fs-md: 0.95rem;

--fs-lg: 1.1rem;

--fs-xl: 1.35rem;

--fs-2xl: 1.7rem;

}

*, *::before, *::after {

box-sizing: border-box;

margin: 0;

padding: 0;

}

html, body {

height: 100%;

width: 100%;

max-width: 100vw;

overflow-x: hidden;

scrollbar-width: none;

-ms-overflow-style: none;

}

html::-webkit-scrollbar,

body::-webkit-scrollbar {

display: none;

}

body {

background: var(--bg-primary);

color: var(--text-main);

font-family: var(--font-stack);

font-size: var(--fs-md);

line-height: 1.5;

-webkit-font-smoothing: antialiased;

-webkit-tap-highlight-color: transparent;

min-height: 100vh;

display: flex;

flex-direction: column;

padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));

padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));

}

input, textarea, [contenteditable] {

user-select: text;

-webkit-user-select: text;

}

button, .nav-button, .icon-button {

user-select: none;

-webkit-user-select: none;

-webkit-tap-highlight-color: transparent;

}

a { color: var(--accent); text-decoration: none; }

img, svg, video, canvas {

max-width: 100%;

display: block;

}

.app-header {

position: fixed;

top: 0; left: 0; right: 0;

height: calc(var(--header-h) + env(safe-area-inset-top, 0px));

padding-top: env(safe-area-inset-top, 0px);

display: flex;

align-items: center;

justify-content: space-between;

padding-left: var(--space-md);

padding-right: var(--space-md);

background: var(--bg-secondary);

border-bottom: 2px solid var(--accent);

z-index: 1000;

}

.brand-block {

display: flex;

flex-direction: column;

cursor: pointer;

line-height: 1.15;

}

.brand-block h1 {

font-size: var(--fs-lg);

font-weight: 900;

letter-spacing: 0.08em;

text-transform: uppercase;

}

.sub-brand {

font-size: var(--fs-xs);

color: var(--accent);

font-family: var(--font-mono);

letter-spacing: 0.06em;

font-weight: 700;

margin-top: 2px;

}

.header-actions {

display: flex;

align-items: center;

gap: var(--space-sm);

}

.dev-pill {

display: inline-flex;

align-items: center;

justify-content: center;

font-family: var(--font-mono);

font-size: 0.6rem;

font-weight: 900;

letter-spacing: 0.12em;

padding: 0.2rem 0.5rem;

border-radius: var(--radius-sm);

color: var(--amber);

background: rgba(245, 158, 11, 0.14);

border: 1px solid var(--amber);

cursor: pointer;

}

.view-section {

display: none;

flex: 1;

flex-direction: column;

padding: 12px var(--space-md) var(--space-md);

max-width: 720px;

width: 100%;

margin: 0 auto;

gap: var(--space-md);

}

.view-section.active { display: flex; }

#view-studio.active {

height: calc(100dvh - var(--header-h) - var(--nav-h) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));

max-height: calc(100dvh - var(--header-h) - var(--nav-h) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));

overflow: hidden;

padding-top: 8px;

padding-bottom: 6px;

}

#view-recorder.active {

height: calc(100dvh - var(--header-h) - var(--nav-h) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));

max-height: calc(100dvh - var(--header-h) - var(--nav-h) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));

padding: 0 !important;

overflow: hidden;

}

.bottom-nav {

position: fixed;

bottom: 0; left: 0; right: 0;

height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));

padding-bottom: env(safe-area-inset-bottom, 0px);

display: flex;

align-items: stretch;

background: var(--bg-secondary);

border-top: 1px solid var(--border-color);

z-index: 1000;

}

.nav-button {

flex: 1;

background: none;

border: none;

color: var(--text-muted);

font-family: inherit;

font-size: var(--fs-sm);

font-weight: 900;

letter-spacing: 0.08em;

text-transform: uppercase;

cursor: pointer;

transition: color 0.15s ease;

position: relative;

min-height: 44px;

}

.nav-button.active { color: var(--accent); }

.nav-button.active::after {

content: '';

position: absolute;

bottom: 6px; left: 25%; right: 25%;

height: 2px;

background: var(--accent);

border-radius: 2px;

}

.muted { color: var(--text-muted); }

.faint { color: var(--text-faint); }

.mono  { font-family: var(--font-mono); }

.center { text-align: center; }

/* ── v11g: kill the "book-spine" right-edge gradient once and for all ──
   The Journal paper mockup's right-edge gradient drifted into every page via
   the compilers. Even after per-page removals, a stale service-worker cache
   could re-inject it. This rule nullifies ANY full-viewport pseudo-element
   on body/html/#app that uses a right-anchored gradient — a hard ceiling so
   the "dropped phone" look can never return, regardless of source. */
html::after, body::after,
#app::after, .app-shell::after, .recorder-shell::after,
.nightvision-overlay::after, .fsb-stage::after {
    content: none !important;
    background: none !important;
    background-image: none !important;
    display: none !important;
    position: static !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}
/* Any full-viewport element explicitly trying a right-edge linear fade gets
   neutralized. Scoped to position:fixed/absolute + right so we don't touch
   legitimate gradients inside gauges/cards. */
body > [style*="linear-gradient"][style*="right: 0"],
body > [style*="linear-gradient"][style*="right:0"],
html > [style*="linear-gradient"][style*="right: 0"],
html > [style*="linear-gradient"][style*="right:0"] {
    background-image: none !important;
    display: none !important;
}


