/* ============================================================
   Custom presentation theme — professional / data-engineering
   Self-contained professional Shower theme.
   Keeps the Shower engine's structural contract intact.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

.shower {
    --slide-width: 1280px;
    --slide-height: 720px;          /* 16:9 */
    --slide-ratio: calc(16 / 9);
    --slide-scale: 0.5;
    --shower-list-scale: 1;
    --shower-full-scale: 1;

    /* palette */
    --ink:        #16202e;          /* primary text */
    --ink-soft:   #33475f;          /* body text */
    --muted:      #6b7c93;          /* captions */
    --line:       #e4e9f0;          /* hairlines */
    --bg:         #ffffff;
    --bg-soft:    #f6f8fb;
    --primary:    #2f6df0;          /* brand blue */
    --primary-dk: #1d4ed8;
    --teal:       #0e9f8e;          /* SQL / positive */
    --warn:       #e2563a;          /* emphasis / risk */
    --navy:       #0d1b2e;          /* dark slides */

    margin: 0;
    color: var(--ink);
    counter-reset: slide;
    background-color: #1c2533;
    font-family: -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
                 "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-size-adjust: none;
}

/* ---------- LIST (overview) MODE ---------- */
.shower.list {
    --slide-scale: 0.25;
    position: absolute;
    clip: rect(0, auto, auto, 0);
    box-sizing: border-box;
    width: 100%;
    display: grid;
    grid-gap: calc(80px * var(--slide-scale));
    grid-auto-rows: calc(var(--slide-height) * var(--slide-scale));
    grid-template-columns: repeat(
        auto-fill,
        calc(var(--slide-width) * var(--slide-scale))
    );
    padding: calc(80px * var(--slide-scale));
    background-color: #1c2533;
}

@media (min-width: 1174px) {
    .shower.list { --slide-scale: 0.5; }
}

.shower.list .slide {
    position: relative;
    cursor: pointer;
    transform: scale(var(--slide-scale));
    transform-origin: 0 0;
    box-shadow: 0 18px 48px rgb(0 0 0 / 38%);
    border-radius: 12px;
}
.shower.list .slide * { pointer-events: none; }
.shower.list .slide:hover { box-shadow: 0 0 0 4px var(--primary), 0 20px 52px rgb(0 0 0 / 45%); }
.shower.list .slide.active { box-shadow: 0 0 0 5px var(--primary), 0 20px 52px rgb(0 0 0 / 45%); }
.shower.list .slide::after {
    content: attr(data-num);
    position: absolute;
    right: 28px; bottom: 20px;
    font-size: 18px; font-weight: 600;
    color: var(--muted);
}
.shower.list .progress,
.shower.list .region { display: none; }

/* ---------- FULL (presentation) MODE ---------- */
.shower.full {
    position: absolute;
    top: 50%; left: 50%;
    overflow: hidden;
    margin-top: calc(var(--slide-height) / 2 * -1);
    margin-left: calc(var(--slide-width) / 2 * -1);
    width: var(--slide-width);
    height: var(--slide-height);
    background-color: #000;
    transform: scale(var(--shower-full-scale));
}
.shower.full .slide {
    display: none !important;
    position: absolute !important;
    top: 0; left: 0;
    clip: auto;
    visibility: hidden;
    transform: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
.shower.full .slide.active {
    display: block !important;
    visibility: visible;
}

/* ---------- SLIDE CANVAS ---------- */
.slide {
    position: relative;
    z-index: 0;
    overflow: hidden;
    box-sizing: border-box;
    width: var(--slide-width);
    height: var(--slide-height);
    padding: 52px 68px 64px;
    background-color: var(--bg);
    color: var(--ink);
    font-size: 21px;
    line-height: 1.45;
}

/* accent rail — disabled */
.slide::before {
    content: "";
    display: block;
    position: absolute;
    left: 40px; bottom: 26px;
    width: 92px; height: 20px;
    background-image: url(../../../images/databend-horizontal-light.svg);
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: contain;
    opacity: 0.5;
    z-index: 5;
}
.slide.dark::before {
    background-image: url(../../../images/databend-horizontal-dark.svg);
    opacity: 0.65;
}
.slide::after {
    content: attr(data-num);
    position: absolute;
    right: 40px; bottom: 28px;
    font-size: 16px; font-weight: 600;
    color: #c4cedb;
    letter-spacing: 0.5px;
}
/* ---------- TYPOGRAPHY ---------- */
.slide h2 {
    margin: 0 0 22px;
    padding: 0 0 13px;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--ink);
    letter-spacing: -0.01em;
    border-bottom: 2px solid var(--line);
}
.slide h2 .sub {
    display: block;
    margin-top: 8px;
    font-size: 20px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0;
}
.slide p {
    margin: 0 0 10px;
    color: var(--ink-soft);
}
.slide b { color: var(--ink); font-weight: 650; }
.slide a { color: var(--primary); text-decoration: none; }

/* accent helpers (used inline in the deck) */
.accent  { color: var(--primary); font-weight: 650; }
.green   { color: var(--teal);    font-weight: 650; }
.orange  { color: var(--warn);    font-weight: 650; }
.key-point { color: var(--warn);  font-weight: 700; }

/* a callout band */
.callout {
    margin-top: 18px;
    padding: 13px 18px;
    background: var(--bg-soft);
    border-left: 4px solid var(--primary);
    border-radius: 0 8px 8px 0;
    font-size: 21px;
    color: var(--ink);
}
.callout.warn { border-left-color: var(--warn); }
.callout.teal { border-left-color: var(--teal); }

/* ---------- MONO / FLOW DIAGRAMS ---------- */
.flow-diagram {
    font-family: "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
    font-size: 15px;
    line-height: 1.45;
    color: var(--ink);
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 13px 16px;
    white-space: pre;
    overflow-x: auto;
}
/* ---------- CODE BLOCKS ---------- */
.slide code {
    display: block;
    white-space: pre;
    overflow-x: auto;
    font-family: "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
    font-size: 15px;
    line-height: 1.35;
    color: #e8edf4;
    background: #0f1b2d;
    border: 1px solid #1e3050;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 8px 24px rgb(13 27 46 / 25%);
}
.slide code b { color: #6ee7d4; font-weight: 600; }      /* keywords / identifiers */
.slide code .cm { color: #7a90ad; }                       /* comments */
.slide p > code { box-shadow: none; }

/* ---------- TABLES ---------- */
.slide table {
    width: 100%;
    border-collapse: collapse;
    font-size: 19px;
    margin-top: 6px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 18px rgb(22 32 46 / 8%);
}
.slide table th {
    background: var(--navy);
    color: #fff;
    font-weight: 600;
    text-align: left;
    padding: 11px 16px;
    font-size: 18px;
}
.slide table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    background: #fff;
    vertical-align: top;
}
.slide table tr:nth-child(even) td { background: var(--bg-soft); }
.slide table tr:last-child td { border-bottom: none; }
/* comparison tables: first col muted label, last col positive */
.slide table td:first-child { color: var(--muted); font-weight: 600; }
.slide table td:last-child  { color: var(--ink); }
.capability-table {
    table-layout: fixed;
}
.capability-table th:first-child,
.capability-table td:first-child {
    width: 220px;
    white-space: nowrap;
}
.capability-table th:nth-child(2),
.capability-table td:nth-child(2) {
    width: auto;
}

/* ---------- PROGRESS BAR ---------- */
.progress {
    position: absolute;
    left: 0; bottom: 0;
    width: 0; height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--teal));
    transition: width 0.2s linear;
    z-index: 5;
}
.shower.list .progress { display: none; }
.shower.full .progress { display: block; }

/* ---------- COVER / DARK SLIDE MODIFIERS ---------- */
.slide.dark {
    background: radial-gradient(circle at 78% 18%, #1b3a6b 0%, var(--navy) 55%, #081019 100%);
    color: #eef3fa;
}
.slide.dark::after { color: #5b7088; }
.slide.dark h2 { color: #fff; border-bottom-color: rgb(255 255 255 / 14%); }
.slide.dark p  { color: #c2d0e2; }
.slide.dark b  { color: #fff; }
.slide.dark .flow-diagram {
    background: rgb(255 255 255 / 6%);
    border-color: rgb(255 255 255 / 14%);
    color: #e4ecf7;
}
.slide.cover::before { display: none; }
.slide.cover::after  { display: none; }

/* footer badge */
.badge {
    position: absolute;
    left: 0; bottom: 0;
    z-index: 6;
    margin: 0;
}
.badge a {
    display: none;   /* hidden by default; cover carries branding */
}


/* ---------- UTILITY LAYOUTS ---------- */
.muted { color: var(--muted) !important; }
.kicker {
    margin: 0 0 10px;
    color: var(--primary);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
}
.card {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 8px 24px rgb(22 32 46 / 7%);
}
.card h3 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.2;
    color: var(--ink);
}
.card p { margin-bottom: 6px; }
.metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 22px 0;
}
.metric {
    background: linear-gradient(180deg, #fff, var(--bg-soft));
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
}
.metric strong {
    display: block;
    color: var(--primary);
    font-size: 34px;
    line-height: 1;
    letter-spacing: -0.03em;
}
.metric span {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 18px;
}
.pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgb(47 109 240 / 10%);
    color: var(--primary);
    font-size: 18px;
    font-weight: 650;
}
.timeline {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}
.timeline .step {
    position: relative;
    padding: 10px 14px 10px 46px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink-soft);
}
.timeline .step::before {
    content: attr(data-n);
    position: absolute;
    left: 14px;
    top: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}
.slide.dark .timeline .step {
    background: rgb(255 255 255 / 7%);
    border-color: rgb(255 255 255 / 14%);
    color: #c2d0e2;
}
.slide.dark .timeline .step::before {
    background: linear-gradient(135deg, var(--primary), var(--teal));
}
.slide.dark .card {
    background: rgb(255 255 255 / 7%);
    border-color: rgb(255 255 255 / 14%);
    box-shadow: none;
}
.slide.dark .card h3 { color: #fff; }
.slide.dark .callout {
    background: rgb(255 255 255 / 7%);
    color: #e4ecf7;
    border-left-color: #6ee7d4;
}

@media print {
    .progress { display: none !important; }
}

.cover-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding-left: 16px;
}
.slide.cover h1 {
    font-size: 62px;
    line-height: 1.08;
    font-weight: 760;
    color: #fff;
    margin: 0;
    letter-spacing: -0.04em;
}
.slide.cover .subtitle {
    font-size: 29px;
    color: #9fb4cf;
    margin: 20px 0 0;
    font-weight: 400;
}
.cover-rule {
    width: 76px;
    height: 4px;
    background: linear-gradient(90deg,#2f6df0,#0e9f8e);
    margin: 40px 0 26px;
    border-radius: 2px;
}
.slide.cover .speaker {
    font-size: 21px;
    color: #c2d0e2;
    margin: 0;
}
.slide.cover .speaker span { color: #5b7088; }
.cover-x-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    margin-left: 10px;
    border-radius: 50%;
    color: #0d1b2e;
    background: #9fb4cf;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    vertical-align: 1px;
    opacity: 0.86;
}
.cover-x-link:hover { opacity: 1; }
.cover-brandbar {
    position: absolute;
    top: 44px;
    left: 64px;
    display: flex;
    align-items: center;
    gap: 18px;
    z-index: 6;
}
.brandbar-logo {
    height: 30px;
    width: auto;
    opacity: 0.92;
}
.brandbar-sep {
    width: 1px;
    height: 30px;
    background: rgb(255 255 255 / 22%);
}
.cta-logo {
    display: block;
    height: 40px;
    width: auto;
    margin: 30px auto 0;
}
.cta-contact-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
    margin-top: 22px;
}
.cta-links {
    margin: 0;
    color: #9fb4cf;
    font-size: 22px;
    line-height: 1.8;
    text-align: left;
}
.cta-links a {
    color: #9fb4cf;
    text-decoration: none;
}
.cta-links a:hover { color: #c2d0e2; }
.github-stars {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 9px;
    border-radius: 999px;
    color: #f9c74f;
    background: rgba(249, 199, 79, 0.12);
    border: 1px solid rgba(249, 199, 79, 0.28);
    font-size: 15px;
    font-weight: 700;
    vertical-align: 2px;
}
.demo-link {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--teal);
    background: rgba(14, 159, 142, 0.10);
    border: 1px solid rgba(14, 159, 142, 0.28);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}
.demo-link:hover {
    color: #04756b;
    background: rgba(14, 159, 142, 0.16);
}
.demo-link.inline {
    margin-top: 0;
    margin-left: 12px;
    vertical-align: 1px;
}
.wechat-qr-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 10px 10px 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}
.wechat-qr-card img {
    display: block;
    width: 118px;
    height: 118px;
    border-radius: 6px;
}
.wechat-qr-card span {
    color: #33475f;
    font-size: 13px;
    font-weight: 600;
}
.sponsor-chip {
    background: #fff;
    border-radius: 9px;
    padding: 6px 8px;
    line-height: 0;
    box-shadow: 0 3px 12px rgb(0 0 0 / 20%);
}
.sponsor-chip img {
    display: block;
    height: 38px;
    width: auto;
}
.mt-md { margin-top: 18px !important; }
.mt-lg { margin-top: 24px !important; }
.question-card {
    font-size: 25px;
    line-height: 1.55;
}
.compact .timeline { gap: 8px; }
.compact .timeline .step { padding-top: 9px; padding-bottom: 9px; }
.compact p { margin-bottom: 8px; }

/* Defensive isolation for Shower mode transitions. */
body.shower.full { display: block !important; padding: 0 !important; }
body.shower.full > .slide { display: none !important; opacity: 0 !important; pointer-events: none !important; }
body.shower.full > .slide.active {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    transform: none !important;
}
body.shower.full > .slide:not(.active) * { display: none !important; }

/* Shower accessibility live region: keep it available to screen readers but invisible. */
.region {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    padding: 0 !important;
    margin: -1px !important;
}

/* ---------- FLOW DIAGRAM ---------- */
.animated-flow {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
}

.animated-flow .flow-node {
    display: inline-block;
    padding: 4px 8px;
    background: var(--bg-soft, #f6f8fb);
    border: 2px solid var(--primary);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8em;
    white-space: nowrap;
}

.animated-flow .flow-arrow {
    display: inline-block;
    padding: 0 3px;
    font-weight: 700;
    color: var(--teal);
    font-size: 1em;
    white-space: nowrap;
}

/* Dark slides */
.slide.dark .animated-flow .flow-node {
    background: rgba(255,255,255,0.08);
    border-color: var(--teal);
    color: #fff;
}
.slide.dark .animated-flow .flow-arrow {
    color: #6ee7d4;
}

/* ---------- ARCHITECTURE DIAGRAM ---------- */
.arch-pipeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 0;
}
.arch-box {
    width: 130px;
    height: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    color: #fff;
}
.arch-box.agent {
    background: rgba(27, 58, 107, 0.92);
    border: 2px solid rgba(110, 231, 212, 0.55);
}
.arch-box.storage {
    background: rgba(27, 58, 107, 0.92);
    border: 2px solid rgba(110, 231, 212, 0.55);
}
.arch-box.databend {
    background: rgba(27, 58, 107, 0.92);
    border: 2px solid rgba(110, 231, 212, 0.55);
}
.arch-box.stream {
    background: rgba(27, 58, 107, 0.42);
    border: 2px dashed rgba(110, 231, 212, 0.65);
}
.arch-box.task {
    background: rgba(14, 159, 142, 0.18);
    border: 2px solid rgba(110, 231, 212, 0.85);
    box-shadow: 0 0 0 1px rgba(110, 231, 212, 0.16), 0 10px 24px rgba(0, 0, 0, 0.12);
}
.arch-label {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}
.arch-arrow {
    font-size: 20px;
    font-weight: 700;
    color: #6ee7d4;
    flex-shrink: 0;
}
.arch-pipeline-7 {
    gap: 7px;
}
.arch-pipeline-7 .arch-box {
    width: 120px;
    height: 70px;
    font-size: 14px;
}
.arch-pipeline-7 .arch-label {
    font-size: 10px;
}
.arch-pipeline-7 .arch-arrow {
    font-size: 18px;
}

/* ---------- CAPABILITY TAGS ---------- */
.cap-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #c2d0e2;
    background: rgba(110, 231, 212, 0.06);
    border: 1px solid rgba(110, 231, 212, 0.16);
}
.pipeline-note {
    margin-top: 26px;
    padding: 16px 22px;
    border-left: 4px solid rgba(110, 231, 212, 0.72);
    border-radius: 8px;
    color: #dbeafe;
    background: rgba(14, 159, 142, 0.10);
    border-top: 1px solid rgba(110, 231, 212, 0.18);
    border-right: 1px solid rgba(110, 231, 212, 0.18);
    border-bottom: 1px solid rgba(110, 231, 212, 0.18);
}
.pipeline-note-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 10px;
}
.pipeline-note-steps {
    display: flex;
    gap: 14px;
    color: #c2d0e2;
    font-size: 15px;
}
.pipeline-note-steps span {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(13, 27, 46, 0.34);
    border: 1px solid rgba(110, 231, 212, 0.12);
}
.pipeline-note-steps b {
    color: #6ee7d4;
}
.pipeline-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 26px;
}
.pipeline-summary div {
    padding: 16px 18px;
    border-radius: 8px;
    background: rgba(13, 27, 46, 0.36);
    border: 1px solid rgba(110, 231, 212, 0.18);
    box-shadow: inset 0 3px 0 rgba(110, 231, 212, 0.34);
}
.pipeline-summary b {
    display: block;
    margin-bottom: 8px;
    color: #6ee7d4;
    font-size: 18px;
}
.pipeline-summary span {
    display: block;
    color: #c2d0e2;
    font-size: 15px;
    line-height: 1.45;
}

/* ---------- JSON TREE ---------- */
.json-tree {
    height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid rgba(110, 231, 212, 0.15);
    background: #0d1b2e;
    padding: 14px 16px;
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: #c2d0e2;
    cursor: grab;
    user-select: none;
    white-space: pre;
}
.json-tree:active { cursor: grabbing; }
.json-tree .jt-key { color: #6ee7d4; }
.json-tree .jt-str { color: #f9c74f; }
.json-tree .jt-num { color: #5b8ff9; }
.json-tree .jt-bool { color: #c39bd3; }
.json-tree .jt-null { color: #6b7c93; }

/* ---------- JSON ANNOTATED ---------- */
.json-annotated {
    background: #0d1b2e;
    border-radius: 8px;
    border: 1px solid rgba(110, 231, 212, 0.15);
    padding: 14px 16px;
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 11.5px;
    line-height: 1.8;
    color: #c2d0e2;
    overflow-y: auto;
    max-height: 420px;
}
.json-annotated .jt-key { color: #6ee7d4; }
.json-annotated .jt-str { color: #f9c74f; }
.json-annotated .jt-num { color: #5b8ff9; }
.ja-line {
    position: relative;
    padding: 1px 0;
    border-radius: 3px;
}
.ja-indent { padding-left: 18px; }
.ja-indent2 { padding-left: 36px; }
.ja-indent3 { padding-left: 54px; }
.ja-highlight-vcol {
    background: linear-gradient(90deg, rgba(47, 109, 240, 0.26), rgba(47, 109, 240, 0.10));
    box-shadow: inset 4px 0 0 #5b8ff9, 0 0 0 1px rgba(91, 143, 249, 0.22);
    padding-right: 118px;
}
.ja-highlight-ft { background: rgba(249, 199, 79, 0.08); }
.ja-highlight-rbac { background: rgba(195, 155, 211, 0.08); }
.ja-badge {
    display: inline-block;
    margin-left: 10px;
    padding: 1px 8px;
    border-radius: 3px;
    font-family: -apple-system, 'PingFang SC', sans-serif;
    font-size: 10px;
    font-weight: 600;
    vertical-align: middle;
}
.ja-badge.vcol {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #dbeafe;
    background: rgba(47, 109, 240, 0.72);
    border: 1px solid rgba(147, 197, 253, 0.65);
    box-shadow: 0 3px 10px rgba(47, 109, 240, 0.28);
}
.ja-badge.ft {
    color: #f9c74f;
    background: rgba(249, 199, 79, 0.15);
    border: 1px solid rgba(249, 199, 79, 0.3);
}
.ja-badge.rbac {
    color: #c39bd3;
    background: rgba(195, 155, 211, 0.15);
    border: 1px solid rgba(195, 155, 211, 0.3);
}
.ja-section-title {
    color: #6b7c93;
    font-size: 11px;
    font-style: italic;
    margin-bottom: 4px;
    font-family: -apple-system, 'PingFang SC', sans-serif;
}
.ja-match {
    background: rgba(249, 199, 79, 0.3);
    color: #f9c74f;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 700;
}
.ja-masked {
    color: #c39bd3;
    letter-spacing: -1px;
    font-size: 13px;
}

/* ---------- TRACE VISUALIZATION ---------- */
.trace-viz {
    background: #0d1b2e;
    border-radius: 10px;
    padding: 20px 24px;
    border: 1px solid rgba(110, 231, 212, 0.15);
}
.trace-row {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}
.trace-row:last-of-type { margin-bottom: 12px; }
.trace-label {
    width: 130px;
    flex-shrink: 0;
    font-size: 14px;
    color: #c2d0e2;
    line-height: 1.3;
}
.trace-label b {
    font-size: 16px;
    color: #fff;
}
.trace-label .muted {
    font-size: 11px;
    color: #6b7c93;
}
.trace-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}
.trace-blocks {
    display: flex;
    gap: 3px;
    flex-wrap: nowrap;
}
.trace-blocks .tb {
    display: inline-block;
    width: 22px;
    height: 18px;
    border-radius: 3px;
    opacity: 0.9;
}
.trace-legend {
    display: flex;
    gap: 14px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 12px;
    color: #9fb4cf;
}
.trace-legend span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.trace-legend .tb {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    display: inline-block;
}

/* ---------- MOBILE FRIENDLY ---------- */
@media (max-width: 767px) {
    html,
    body {
        min-width: 0;
        width: 100%;
        overflow-x: hidden;
        background: #1c2533;
    }

    .shower.list {
        --slide-scale: var(--mobile-slide-scale, 0.28);
        position: static;
        display: grid;
        grid-template-columns: calc(var(--slide-width) * var(--slide-scale));
        grid-auto-rows: calc(var(--slide-height) * var(--slide-scale));
        justify-content: center;
        gap: 18px;
        min-height: 100vh;
        padding: max(14px, env(safe-area-inset-top)) 0 max(28px, env(safe-area-inset-bottom));
        overflow-x: hidden;
        overflow-y: auto;
        background: #1c2533;
    }

    .shower.list .slide {
        margin: 0;
        transform: scale(var(--slide-scale));
        transform-origin: 0 0;
        border-radius: 10px;
    }

    .shower.list .slide::after {
        right: 22px;
        bottom: 18px;
        font-size: 16px;
    }

    .shower.full {
        top: 50%;
        left: 50%;
        margin-top: calc(var(--slide-height) / 2 * -1);
        margin-left: calc(var(--slide-width) / 2 * -1);
        width: var(--slide-width);
        height: var(--slide-height);
        overflow: hidden;
        touch-action: manipulation;
    }
}

@media (max-width: 767px) and (orientation: portrait) {
    .shower.full::before {
        content: "建议横屏查看";
        position: fixed;
        left: 50%;
        bottom: calc(18px + env(safe-area-inset-bottom));
        z-index: 20;
        transform: translateX(-50%);
        padding: 6px 12px;
        border-radius: 999px;
        color: #c2d0e2;
        background: rgba(13, 27, 46, 0.72);
        border: 1px solid rgba(110, 231, 212, 0.22);
        font-size: 13px;
        font-family: -apple-system, "PingFang SC", sans-serif;
        pointer-events: none;
    }
}
