:root {
    --steel-deep: #000000;
    --steel-base: #000000;
    --steel-surface: rgba(8, 10, 12, 0.88);
    --hairline: rgba(215, 224, 234, 0.11);
    --hairline-warm: rgba(229, 169, 82, 0.26);

    --copper: #d46a37;
    --amber: #e5a952;
    --amber-light: #f4d79b;
    --cyan: #5cc8ff;

    /* Brushed Metallic Silver System + Moving Internal Light Sweep */
    --silver-grad: linear-gradient(180deg, #ffffff 0%, #e1e7ee 36%, #99a3b0 74%, #edf2f7 100%);
    --silver-sweep: linear-gradient(
        112deg,
        #8f9aa6 0%,
        #c5cfd9 32%,
        #ffffff 47%,
        #e6f4ff 52%,
        #c5cfd9 67%,
        #8f9aa6 100%
    );
    --silver-bright: #e4eaf0;
    --text-primary: #d8dfe6;
    --text-secondary: #9aa4b0;
    --text-muted: #66707c;

    --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    --radius-pill: 999px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    overflow: hidden;
    background: var(--steel-deep);
    color: var(--text-primary);
    font-family: var(--font-display);
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    -webkit-font-smoothing: antialiased;
}

input, textarea {
    -webkit-user-select: text;
    user-select: text;
}

button, a, #emblem-stage {
    touch-action: manipulation;
    font-family: inherit;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
}

.rmg-frame {
    position: relative;
    width: 100%;
    max-width: 440px;
    height: 100dvh;
    max-height: 920px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #000000;
    padding: env(safe-area-inset-top, 0px) 18px env(safe-area-inset-bottom, 0px);
}

@media (min-width: 480px) {
    .rmg-frame {
        height: min(94dvh, 880px);
        border-radius: 28px;
        border: 1px solid rgba(215, 224, 234, 0.11);
        box-shadow: 0 32px 96px rgba(0, 0, 0, 0.96);
    }
}

/* ================= FLOATING TRANSPARENT TOP CONTROLS (NO NOTCH / NO CLIP) ================= */
.top-telemetry-bar {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 12px);
    left: 16px;
    right: 16px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    background: transparent;
}

.top-left-slot,
.lang-switcher {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 10px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(17, 20, 23, 0.42);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: rgba(243, 245, 247, 0.86);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.top-pill-btn svg {
    width: 12.5px;
    height: 12.5px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.top-pill-btn:hover,
.top-pill-btn:active {
    border-color: rgba(229, 169, 82, 0.48);
    color: var(--amber-light);
    background: rgba(17, 20, 23, 0.72);
}

/* STRICT CLIENT VS. OWNER SEPARATION */
body:not(.is-owner) .btn-owner-only { display: none; }
body.is-owner .btn-owner-only { display: inline-flex; }
body.is-owner .btn-public-share { display: none; }

/* 5-Language Globe Selector */
.lang-switcher {
    position: relative;
    z-index: 35;
    overflow: visible;
}

.lang-switcher.laser-done {
    clip-path: none !important;
    overflow: visible;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 146px;
    padding: 5px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(14, 17, 21, 0.96);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(16px);
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 60;
}

.lang-dropdown.open {
    display: flex;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.lang-option:hover,
.lang-option.active {
    background: rgba(229, 169, 82, 0.14);
    color: var(--amber-light);
}

/* ================= MAIN STAGE & CHAMBERS ================= */
.chamber-viewport {
    position: relative;
    z-index: 5;
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chamber {
    display: none;
    flex: 1 1 0%;
    min-height: 0;
    flex-direction: column;
    animation: chamberReveal 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.chamber.active {
    display: flex;
}

@keyframes chamberReveal {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================= HERO RING (AUTO-RESPONSIVE LARGE CENTERPIECE, ZERO OVERLAP) ================= */
.emblem-stage {
    position: relative;
    width: min(74vw, 33.5dvh, 304px);
    height: min(74vw, 33.5dvh, 304px);
    margin: clamp(46px, 6.2dvh, 56px) auto clamp(8px, 1.3dvh, 14px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}

.emblem-stage.compact {
    width: min(68vw, 29.5dvh, 272px);
    height: min(68vw, 29.5dvh, 272px);
    margin: clamp(46px, 6.2dvh, 56px) auto clamp(8px, 1.2dvh, 14px);
}

.ring-video-wrap {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    overflow: hidden;
    -webkit-mask-image: radial-gradient(circle at center, #000 52%, rgba(0, 0, 0, 0.84) 63%, transparent 74%);
    mask-image: radial-gradient(circle at center, #000 52%, rgba(0, 0, 0, 0.84) 63%, transparent 74%);
    pointer-events: none;
}

.ring-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: brightness(0.92) contrast(1.26) saturate(1.12);
    mix-blend-mode: lighten;
}

.emblem-core {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

@keyframes silverLightSweep {
    0% { background-position: 135% 50%; }
    100% { background-position: -35% 50%; }
}

.emblem-core-rmg {
    font-family: var(--font-display);
    font-size: clamp(32px, 4.6dvh, 44px);
    font-weight: 700;
    letter-spacing: 0.16em;
    padding-left: 0.16em;
    background: var(--silver-sweep);
    background-size: 260% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 12px rgba(226, 238, 255, 0.24));
    animation: silverLightSweep 4.8s ease-in-out infinite;
    line-height: 1;
}

.emblem-stage.compact .emblem-core-rmg {
    font-size: clamp(28px, 4dvh, 36px);
}

.emblem-core-sub {
    margin-top: 5px;
    font-family: var(--font-mono);
    font-size: clamp(8.5px, 1.15dvh, 10px);
    font-weight: 600;
    letter-spacing: 0.24em;
    padding-left: 0.24em;
    color: #b7c2ce;
}

/* ================= EDITORIAL IDENTITY ================= */
.identity-block {
    text-align: center;
    max-width: 100%;
    flex-shrink: 0;
    margin-bottom: clamp(6px, 1.1dvh, 12px);
}

.person-name {
    max-width: 100%;
    font-size: clamp(19px, 2.8dvh, 25px);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.18;
    background: var(--silver-sweep);
    background-size: 260% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 10px rgba(220, 234, 248, 0.18));
    animation: silverLightSweep 5.6s ease-in-out infinite;
}

.person-role {
    margin-top: 5px;
    font-size: clamp(12.5px, 1.65dvh, 14px);
    font-weight: 500;
    color: var(--amber-light);
    letter-spacing: 0.02em;
}

.person-role-mono {
    margin-top: 7px;
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.26em;
    padding-left: 0.26em;
    color: var(--amber);
}

.slogan-sub {
    margin-top: 3px;
    font-size: clamp(11.5px, 1.5dvh, 13px);
    color: var(--text-secondary);
}

/* ================= EDITORIAL CAPABILITIES (NO NUMBERS, NO BOXES) ================= */
.editorial-list {
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4px 4px;
}

.editorial-item {
    padding: clamp(7px, 1.1dvh, 11px) 0;
    border-top: 1px solid var(--hairline);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.editorial-item:last-child {
    border-bottom: 1px solid var(--hairline);
}

.editorial-title {
    font-size: clamp(13.5px, 1.8dvh, 15px);
    font-weight: 600;
    letter-spacing: 0.01em;
    background: var(--silver-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.editorial-desc {
    font-size: clamp(11.5px, 1.45dvh, 12.5px);
    color: var(--text-secondary);
    line-height: 1.35;
}

/* Minimal Architectural Footer Bar (ZERO EMOJIS) */
.legal-footer {
    flex-shrink: 0;
    margin-top: clamp(8px, 1.2dvh, 14px);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legal-line {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    line-height: 1.55;
}

.legal-line-sub {
    display: block;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: #8b95a1;
}

.legal-line strong {
    color: var(--text-secondary);
    font-weight: 600;
}

.hairline-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}

.hairline-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.hairline-action + .hairline-action::before {
    content: '';
    position: absolute;
    left: 0;
    top: 22%;
    bottom: 22%;
    width: 1px;
    background: var(--hairline);
}

.hairline-action svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hairline-action:hover,
.hairline-action:active {
    color: var(--amber-light);
}

/* ================= TAB 2: VERTICAL 3D ROLODEX TEAM DECK ================= */
.team-deck-stage {
    position: relative;
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: clamp(50px, 7dvh, 64px) 0 4px;
    overflow: hidden;
}

.team-ambient-wrap {
    position: absolute;
    inset: -12% -24%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.team-ambient-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.14;
    transform: scale(1.22);
    filter: blur(26px) saturate(1.2) contrast(1.2);
}

.team-ambient-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.94) 70%, #000000 100%);
}

.team-heading {
    position: relative;
    z-index: 4;
    text-align: center;
    flex-shrink: 0;
    margin-bottom: 4px;
}

.team-heading-title {
    font-size: clamp(18px, 2.4dvh, 21px);
    font-weight: 700;
    letter-spacing: 0.06em;
    background: var(--silver-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.team-heading-sub {
    margin-top: 3px;
    font-size: 11.5px;
    color: #828c98;
}

/* 3D Vertical Perspective Deck (Pure Black + Spectrum Under-Card Glows) */
.m-deck-wrap {
    position: relative;
    z-index: 3;
    flex: 1 1 0%;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1050px;
    touch-action: none;
    overflow: hidden;
}

.m-deck {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.m-unit {
    --glow-rgb: 34, 197, 94;
    --glow-hex: #22c55e;
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(88%, 346px);
    height: clamp(192px, 28.5dvh, 236px);
    margin-left: calc(min(88%, 346px) / -2);
    margin-top: calc(clamp(192px, 28.5dvh, 236px) / -2);
    transform-style: preserve-3d;
    transition: transform 0.46s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.44s ease;
    cursor: pointer;
    will-change: transform, opacity;
}

/* Individual Spectrum Under-Card Glow Colors */
.m-unit.glow-green  { --glow-rgb: 34, 197, 94;   --glow-hex: #4ade80; }
.m-unit.glow-cyan   { --glow-rgb: 56, 189, 248;  --glow-hex: #38bdf8; }
.m-unit.glow-yellow { --glow-rgb: 234, 179, 8;   --glow-hex: #facc15; }
.m-unit.glow-violet { --glow-rgb: 168, 85, 247;  --glow-hex: #c084fc; }
.m-unit.glow-red    { --glow-rgb: 239, 68, 68;   --glow-hex: #f87171; }

/* Radiant Spectrum Underglow Bar beneath each 3D Card */
.m-under-glow {
    position: absolute;
    left: 8%;
    right: 8%;
    bottom: -14px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(var(--glow-rgb), 0.72) 0%, rgba(var(--glow-rgb), 0.24) 48%, transparent 78%);
    filter: blur(14px);
    opacity: 0.35;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.m-unit.active .m-under-glow {
    opacity: 0.95;
    transform: scaleX(1.06);
}

.m-plate {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: 20px 22px;
    border-radius: 16px;
    border: 1px solid rgba(var(--glow-rgb), 0.28);
    background:
        radial-gradient(240px 95px at 50% 108%, rgba(var(--glow-rgb), 0.16), transparent 72%),
        linear-gradient(170deg, #0b0d10 0%, #030405 100%);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.96),
        0 10px 30px -8px rgba(var(--glow-rgb), 0.42),
        inset 0 1px 0 rgba(226, 232, 240, 0.14),
        inset 0 -1px 0 rgba(var(--glow-rgb), 0.45);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.m-unit:not(.active) .m-plate {
    border-color: rgba(215, 224, 234, 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.95);
}

/* Precision Corner Ticks tinted subtly by the card's spectrum color */
.m-ticks::before,
.m-ticks::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 1px solid rgba(var(--glow-rgb), 0.55);
    pointer-events: none;
}

.m-ticks::before {
    top: 9px;
    left: 9px;
    border-right: 0;
    border-bottom: 0;
}

.m-ticks::after {
    right: 9px;
    bottom: 9px;
    border-left: 0;
    border-top: 0;
}

.m-plate-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    color: #7c8794;
}

.m-plate-brand {
    font-weight: 700;
    background: var(--silver-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.m-plate-mid {
    margin: auto 0;
}

.m-plate-name {
    font-size: clamp(21px, 3.1dvh, 25px);
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -0.01em;
    background: var(--silver-sweep);
    background-size: 260% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 10px rgba(220, 234, 248, 0.18));
    animation: silverLightSweep 5.6s ease-in-out infinite;
}

.m-plate-role {
    margin-top: 6px;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--glow-hex);
}

.m-plate-contact {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: #b4bec9;
}

.m-controls {
    position: relative;
    z-index: 4;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 10px;
    height: 40px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(215, 224, 234, 0.12);
    background: rgba(6, 7, 9, 0.94);
    backdrop-filter: blur(10px);
}

.m-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(24, 30, 36, 0.9);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.12s ease;
}

.m-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.m-btn:active {
    transform: scale(0.94);
    border-color: var(--amber);
    color: var(--amber-light);
}

.m-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.m-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.24);
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.m-dot.on {
    background: var(--amber-light);
    transform: scale(1.45);
    box-shadow: 0 0 10px rgba(229, 169, 82, 0.75);
}

.staff-chevron {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    stroke: rgba(243, 245, 247, 0.45);
    fill: none;
    stroke-width: 1.6;
}

/* ================= INDIVIDUAL CARD ACTION ROWS ================= */
.cards-stack {
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: clamp(6.5px, 1.05dvh, 10px) 4px;
    border-top: 1px solid var(--hairline);
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.18s ease, padding-left 0.18s ease;
}

.action-row:last-child {
    border-bottom: 1px solid var(--hairline);
}

.action-row:active {
    padding-left: 8px;
}

.action-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(229, 169, 82, 0.26);
    background: rgba(229, 169, 82, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--amber-light);
}

.action-icon svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.row-body {
    flex: 1 1 auto;
    min-width: 0;
}

.row-label {
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.row-title {
    margin-top: 2px;
    font-size: clamp(13.5px, 1.8dvh, 15px);
    font-weight: 600;
    background: var(--silver-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Primary CTA Button */
.primary-cta {
    flex-shrink: 0;
    margin-top: clamp(10px, 1.5dvh, 16px);
    width: 100%;
    height: clamp(44px, 6dvh, 50px);
    border: none;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, #d46a37 0%, #e5a952 60%, #f4d79b 100%);
    color: #0b0e11;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(212, 106, 55, 0.24);
    transition: transform 0.15s ease, filter 0.2s ease;
}

.primary-cta:active {
    transform: scale(0.985);
    filter: brightness(1.06);
}

.primary-cta svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* ================= CORPORATE DETAILS (INDIVIDUAL TAB 2) ================= */
.corp-stage {
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(50px, 7.5dvh, 66px) 2px 6px;
}

.corp-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 12px;
    padding: 14px 0;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
}

.corp-field-full {
    grid-column: 1 / -1;
}

.corp-field-label {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.corp-field-val {
    margin-top: 3px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ================= OWNER QR CHAMBER ================= */
.qr-forge-card {
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    gap: 8px;
    overflow-y: auto;
    padding: 48px 4px 6px;
}

.qr-mode-pills {
    display: inline-flex;
    padding: 3px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(17, 21, 26, 0.9);
    gap: 3px;
}

.qr-mode-btn {
    border: none;
    border-radius: var(--radius-pill);
    padding: 6px 13px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.qr-mode-btn.active {
    background: linear-gradient(135deg, var(--copper), var(--amber));
    color: #0b0e11;
}

.qr-canvas-stage {
    width: clamp(124px, 19.5dvh, 184px);
    height: clamp(124px, 19.5dvh, 184px);
    padding: 10px;
    border-radius: 16px;
    background: #ffffff;
    border: 2px solid var(--amber);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-canvas-stage canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.qr-caption {
    text-align: center;
    font-size: 11.5px;
    color: var(--text-secondary);
    max-width: 260px;
}

.owner-tools-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.owner-tool-btn {
    height: 38px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(215, 224, 234, 0.22);
    background: rgba(10, 12, 15, 0.94);
    color: var(--silver-bright);
    font-size: 11.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.owner-tool-btn:active {
    border-color: var(--amber);
    color: var(--amber-light);
}

.owner-tool-wide {
    width: 100%;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(229, 169, 82, 0.36);
    background: linear-gradient(135deg, rgba(24, 20, 16, 0.96), rgba(10, 12, 15, 0.96));
    color: var(--amber-light);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.btn-exit-owner {
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--hairline);
    background: transparent;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
}

/* ================= SOVEREIGN DRAWERS (GPS, HANDSHAKE, PWA INSTALL) ================= */
.sovereign-drawer {
    width: 100%;
    max-width: 380px;
    padding: 20px 18px;
    border-radius: 22px;
    border: 1px solid rgba(215, 224, 234, 0.16);
    background: #07090b;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.92);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.drawer-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: var(--silver-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.btn-close-drawer {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--hairline);
    background: rgba(18, 22, 27, 0.9);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
}

.drawer-desc {
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-secondary);
}

.drawer-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-action-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--hairline);
    background: rgba(14, 17, 21, 0.94);
    color: var(--silver-bright);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.18s ease;
}

.drawer-action-item:active {
    border-color: var(--amber);
}

.drawer-action-sub {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.handshake-input {
    width: 100%;
    height: 42px;
    padding: 0 13px;
    border-radius: 10px;
    border: 1px solid rgba(215, 224, 234, 0.16);
    background: #0d1014;
    color: var(--silver-bright);
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.handshake-input:focus {
    border-color: var(--amber);
}

.install-step-box {
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid var(--hairline);
    background: rgba(14, 17, 21, 0.9);
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--text-secondary);
}

.install-step-box strong {
    color: var(--silver-bright);
}

/* ================= BOTTOM NAVIGATION ================= */
.bottom-nav {
    position: relative;
    z-index: 15;
    flex-shrink: 0;
    margin: clamp(8px, 1.2dvh, 12px) 0 clamp(12px, 1.8dvh, 16px);
    padding: 3px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(215, 224, 234, 0.12);
    background: rgba(6, 7, 9, 0.96);
    display: flex;
    gap: 3px;
}

.nav-tab {
    flex: 1;
    height: 36px;
    border: none;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-tab.active {
    background: linear-gradient(135deg, var(--copper), var(--amber));
    color: #0b0e11;
}

/* ================= OWNER PIN MODAL (4 DIGITS: 2005) ================= */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(5, 7, 9, 0.84);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.drawer-backdrop.active {
    display: flex;
}

.pin-modal {
    width: 100%;
    max-width: 300px;
    padding: 22px 18px;
    border-radius: 22px;
    border: 1px solid rgba(229, 169, 82, 0.3);
    background: #111519;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
    text-align: center;
}

.pin-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--amber-light);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pin-sub {
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--text-secondary);
}

.pin-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 18px 0 20px;
}

.pin-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1.5px solid rgba(229, 169, 82, 0.55);
    background: transparent;
    transition: background 0.15s ease, transform 0.15s ease;
}

.pin-dot.filled {
    background: var(--amber);
    border-color: var(--amber-light);
    transform: scale(1.12);
}

.pin-dot.error {
    background: #ef4444;
    border-color: #ef4444;
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.pin-key {
    height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(24, 30, 36, 0.88);
    color: var(--text-primary);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
}

.pin-key:active {
    background: rgba(229, 169, 82, 0.2);
    border-color: var(--amber);
}

.pin-key-util {
    font-size: 14px;
    color: var(--amber-light);
}

/* ================= TOAST ================= */
.rmg-toast {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(-16px);
    z-index: 120;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(229, 169, 82, 0.4);
    background: rgba(14, 17, 21, 0.96);
    color: var(--amber-light);
    font-size: 12px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.rmg-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
