/* ============================================================
   Polyglot Tutor — stylesheet entrypoint
   Split into /styles/*.css to keep each file under 1000 lines
   ============================================================ */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");
@import url("./00-shell.css?v=20260504b");
@import url("./01-stage1.css?v=20260424k");
@import url("./02-workbench.css?v=20260420a");
@import url("./02-workbench-typing.css?v=20260424g");
@import url("./03-landing.css?v=20260505a");
@import url("./04-landing-overrides.css?v=20260424g");
@import url("./05-landing-tweaks.css?v=20260426a");
@import url("./06-academy-theme.css?v=20260502a");
@import url("./07-responsive.css?v=20260427b");
@import url("./08-stage3.css?v=20260414ae");
@import url("./10-admin.css?v=20260424g");
@import url("./13-typing-flat.css?v=20260502c");
@import url("./14-typing-dial.css?v=20260502b");
@import url("./16-typing-flow-analysis.css?v=20260423f");
/* 🧪 Typing Dojo Results Styling */
.typing-result-debug {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    background: var(--color-bg-card, #121212);
    border-radius: var(--border-radius-lg, 12px);
    border: 1px solid var(--color-border-main, rgba(255, 255, 255, 0.05));
    margin-top: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.result-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-brand, #22d3ee);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.mermaid-wrap {
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--border-radius-md, 8px);
    padding: 24px 16px;
    overflow-x: auto;
    display: flex;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.03);
}
.mermaid {
    background: transparent !important;
}
.result-divider {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--color-border-main, rgba(255, 255, 255, 0.1)),
        transparent
    );
    margin: 12px 0;
}
.result-output-box {
    background: #000;
    color: #34d399;
    /* Success green */
    padding: 20px;
    border-radius: var(--border-radius-md, 8px);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    border: 1px solid rgba(52, 211, 153, 0.15);
    white-space: pre-wrap;
    word-break: break-all;
}
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* typing Status 배너 (한줄 형식) */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.typing-status-strip {
    margin: 10px 0 8px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.typing-status-banner {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 6px;
    font-size: 11px;
    color: var(--color-text-secondary, #888);
    flex-wrap: nowrap;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.typing-status-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
}

.typing-status-indicator {
    font-size: 10px;
    font-weight: bold;
    min-width: 3.4em;
    text-align: center;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

.typing-status-text {
    color: var(--color-text-secondary, #888);
    font-size: 11px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

.typing-status-separator {
    color: rgba(255, 255, 255, 0.2);
    margin: 0;
    flex-shrink: 0;
}

.typing-status-banner--compact {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.typing-status-ticker {
    position: relative;
    z-index: 0;
    padding: 6px 10px;
    border: 1px solid rgba(34, 211, 238, 0.16);
    border-radius: 8px;
    background: linear-gradient(
        90deg,
        rgba(34, 211, 238, 0.06),
        rgba(15, 23, 42, 0.4)
    );
    color: var(--color-text-secondary, #888);
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.typing-status-ticker--server {
    white-space: nowrap;
    overflow: hidden;
    border-radius: 0;
}

.typing-status-ticker--languages {
    white-space: normal;
    flex-wrap: wrap;
    overflow: visible;
    align-items: flex-start;
    row-gap: 6px;
}

.typing-status-ticker::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: transparent;
    pointer-events: none;
}

.typing-status-ticker > * {
    position: relative;
    z-index: 1;
}

.typing-status-ticker-meter,
.typing-status-ticker-lang,
.typing-status-ticker-shortcut {
    color: var(--color-text-primary, #e5e7eb);
}

.typing-status-ticker-server {
    flex-shrink: 0;
}

.typing-status-ticker-server {
    font-weight: 700;
}

.typing-status-ticker-server--green {
    color: var(--color-success);
}

.typing-status-ticker-server--yellow {
    color: var(--color-warning);
}

.typing-status-ticker-server--red {
    color: var(--color-danger);
}

.typing-status-ticker-chips {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
    row-gap: 6px;
}

.typing-status-ticker-separator {
    color: rgba(255, 255, 255, 0.24);
    flex-shrink: 0;
}

.typing-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    flex-shrink: 0;
}

.typing-status-ticker--server .typing-status-chip {
    border-radius: 0;
}

.typing-status-chip--selected {
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.24);
}

.typing-status-chip--green {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.08);
}

.typing-status-chip--yellow {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.08);
}

.typing-status-chip--red {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
}

.typing-status-chip-name,
.typing-status-chip-label {
    flex-shrink: 0;
    font-weight: 700;
    color: var(--color-text-primary, #e5e7eb);
}

.typing-status-chip-name {
    text-transform: lowercase;
    letter-spacing: 0.02em;
}

.typing-status-chip-meter {
    color: var(--color-text-primary, #e5e7eb);
    font-size: 10px;
}

/* mobile responsive */
@media (max-width: 600px) {
    .typing-status-banner {
        font-size: 10px;
        padding: 6px 8px;
        gap: 4px;
    }

    .typing-status-text {
        font-size: 10px;
    }

    .typing-status-indicator {
        min-width: 3em;
    }

    .typing-status-ticker {
        font-size: 10px;
        padding: 5px 8px;
    }

    .typing-status-server-avatar {
        flex-basis: 8ch;
        min-width: 8ch;
        max-width: 8ch;
        padding: 2px 5px 1px;
    }
}

.typing-status-server-avatar-art {
    display: block;
    white-space: pre;
    font-family: var(--font-mono);
    font-size: 8px;
    line-height: 0.95;
    letter-spacing: -0.04em;
    text-align: center;
    opacity: 0.96;
    user-select: none;
}

.typing-status-server-avatar--loading .typing-status-server-avatar-art {
    color: var(--color-brand, #22d3ee);
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.22);
    animation: typingStatusLoadingPulse 0.85s ease-in-out infinite;
}

.typing-status-server-line--loading .typing-status-server-meter,
.typing-status-server-line--loading .typing-status-server-label {
    color: var(--color-brand, #22d3ee);
}

@keyframes typingStatusLoadingPulse {
    0%,
    100% {
        opacity: 0.55;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-1px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .typing-status-server-avatar--loading .typing-status-server-avatar-art {
        animation: none;
    }
}

.typing-status-server-avatar--green {
    border: none;
    background: transparent;
}

.typing-status-server-avatar--yellow {
    border: none;
    background: transparent;
}

.typing-status-server-avatar--red {
    border: none;
    background: transparent;
}

.typing-status-server-content {
    display: inline-flex;
    align-items: flex-end;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.typing-status-server-prefix {
    color: var(--color-text-secondary, #888);
    font-weight: 700;
    flex-shrink: 0;
}

.typing-status-server-lang {
    text-transform: lowercase;
    font-weight: 700;
    color: var(--color-text-primary, #e5e7eb);
}

.typing-status-server-meter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    color: var(--color-text-primary, #e5e7eb);
    font-weight: 800;
}

.typing-status-server-meter-bar {
    display: inline-grid;
    grid-template-columns: repeat(10, 3px);
    align-items: center;
    gap: 2px;
    height: 8px;
    padding: 1px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.08);
}

.typing-status-server-meter-cell {
    width: 3px;
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
}

.typing-status-server-meter-cell.is-filled {
    background: currentColor;
}

.typing-status-server-meter--green {
    color: var(--color-success, #22c55e);
}

.typing-status-server-meter--yellow {
    color: var(--color-warning, #f59e0b);
}

.typing-status-server-meter--red {
    color: var(--color-danger, #ef4444);
}

.typing-status-server-label {
    font-weight: 800;
}

.typing-status-server-label--green {
    color: var(--color-success) !important;
    text-shadow: 0 0 0.01px currentColor;
}

.typing-status-server-label--yellow {
    color: var(--color-warning);
}

.typing-status-server-label--red {
    color: var(--color-danger);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* Status 배너 (정적 표시) */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.typing-status-banner {
    position: relative;
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 6px;
    overflow: hidden;
    padding: 6px 10px;
}

.typing-status-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 4px;
    transition: all 0.3s ease;
    border-radius: 4px;
    min-width: 0;
}

.typing-status-item.typing-status-tone-green {
    background: rgba(16, 185, 129, 0.08);
}

.typing-status-item.typing-status-tone-yellow {
    background: rgba(245, 158, 11, 0.08);
}

.typing-status-item.typing-status-tone-red {
    background: rgba(239, 68, 68, 0.08);
}

.typing-status-indicator {
    display: inline-block;
    font-size: 9px;
    font-weight: bold;
    min-width: 3.4em;
    text-align: center;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* typing Toolbar (Language/Difficulty select) */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.lang-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 0 1 auto;
    order: 1;
}

.toolbar-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-secondary, #888);
    white-space: nowrap;
}

.tb-btn {
    padding: 4px 10px;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 4px;
    color: var(--color-text-secondary, #888);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tb-btn:hover {
    background: rgba(34, 211, 238, 0.2);
    border-color: rgba(34, 211, 238, 0.5);
}

.tb-btn.active {
    background: rgba(34, 211, 238, 0.2);
    color: var(--color-brand, #22d3ee);
    border-color: var(--color-brand, #22d3ee);
    font-weight: 600;
    border-width: 2px;
}

.tb-stats {
    margin-left: auto;
    font-size: 11px;
    color: var(--color-text-secondary, #888);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    background: rgba(34, 211, 238, 0.05);
    border-radius: 4px;
}

.typing-difficulty-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 auto;
    order: 2;
    margin-top: 0 !important;
}

.typing-difficulty-btn {
    padding: 4px 10px;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 4px;
    color: var(--color-text-secondary, #888);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.typing-difficulty-btn:hover {
    background: rgba(34, 211, 238, 0.2);
    border-color: rgba(34, 211, 238, 0.5);
}

.typing-difficulty-btn.active {
    background: rgba(34, 211, 238, 0.2);
    color: var(--color-brand, #22d3ee);
    border-color: var(--color-brand, #22d3ee);
    font-weight: 600;
    border-width: 2px;
}

/* Language badge */
.typing-lang-badge,
.lang-ver-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: linear-gradient(
        180deg,
        rgba(34, 211, 238, 0.24),
        rgba(34, 211, 238, 0.12)
    );
    color: var(--color-brand, #22d3ee);
    padding: 4px 12px;
    border: 1px solid rgba(34, 211, 238, 0.5);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    margin-left: 0;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.08);
}

.lang-ver-badge {
    opacity: 0.92;
}

.lang-ver-badge::before {
    content: none;
}

/* Run button */
.tb-btn-execute {
    padding: 6px 12px;
    background: rgba(34, 211, 238, 0.15);
    border: 1px solid rgba(34, 211, 238, 0.4);
    border-radius: 4px;
    color: var(--color-brand, #22d3ee);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tb-btn-execute:hover {
    background: rgba(34, 211, 238, 0.25);
    border-color: var(--color-brand, #22d3ee);
    color: var(--color-brand, #22d3ee);
}

.tb-btn-execute--clear {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.32);
    color: var(--color-text-secondary, #8a9db5);
}

.tb-btn-execute--clear:hover {
    background: rgba(148, 163, 184, 0.2);
    border-color: rgba(148, 163, 184, 0.5);
    color: var(--color-text-primary, #cbd5e1);
}

/* Final override: remove inner tuple slot boxes */
#pg-academy .tuple-box--flat .tuple-slot {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
}

/* Academy common typography/table normalization - 2026-04-26 */
#pg-academy .concept-metaphor-guide-body,
#pg-academy .concept-metaphor-guide-body *,
#pg-academy .concept-metaphor .metaphor-desc,
#pg-academy .concept-metaphor .metaphor-desc *,
#pg-academy .concept-try-note,
#pg-academy .concept-try-footer,
#pg-academy .concept-example-desc,
#pg-academy .type-matrix-note {
    font-size: 19px !important;
    line-height: 1.75 !important;
    font-weight: 400 !important;
}

/* concept-stage-copy 기준(16px)으로 통일 - example/인용/메타 텍스트 */
#pg-academy .concept-example-sub,
#pg-academy .concept-doc-quote,
#pg-academy .concept-stage-meta {
    font-size: 16px !important;
    line-height: 1.75 !important;
    font-weight: 400 !important;
}

/* 가이드/example bottom sentence 폰트 통일 - concept-example-sub 기준 */
#pg-academy .concept-metaphor-guide-body,
#pg-academy .concept-metaphor .metaphor-desc,
#pg-academy .concept-example-sub {
    font-family: var(--font-sans) !important;
}

#pg-academy .concept-metaphor-guide-body b,
#pg-academy .concept-metaphor-guide-body strong,
#pg-academy .concept-metaphor .metaphor-desc b,
#pg-academy .concept-metaphor .metaphor-desc strong {
    font-size: inherit !important;
    line-height: inherit !important;
    font-weight: inherit !important;
}

#pg-academy .concept-metaphor .metaphor-eco-frame {
    margin: 10px 0 14px;
    padding: 12px 14px 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-left: 3px solid var(--color-brand);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.18);
}

#pg-academy .concept-metaphor .metaphor-eco-open {
    border-right: 0;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

#pg-academy .concept-metaphor .metaphor-eco-body {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit !important;
    font-family: var(--font-mono) !important;
    font-size: 13px !important;
    line-height: 1.65 !important;
    white-space: pre-wrap !important;
    word-break: keep-all !important;
    overflow-wrap: anywhere !important;
}

#pg-academy .concept-metaphor .metaphor-diagram {
    display: grid;
    gap: 12px;
    margin: 10px 0 14px;
}

#pg-academy .concept-metaphor .metaphor-diagram-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    align-items: stretch;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 0;
    overflow: hidden;
}

#pg-academy .concept-metaphor .metaphor-diagram-track::before {
    display: none;
}

#pg-academy .concept-metaphor .metaphor-diagram-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 112px;
    padding: 14px 12px 12px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 0;
    background: transparent;
    text-align: center;
    border-top: 0;
    border-left: 0;
    border-bottom: 0;
    border-right: 1px solid rgba(148, 163, 184, 0.18);
}

#pg-academy .concept-metaphor .metaphor-diagram-card:last-child {
    border-right: 0;
}

#pg-academy .concept-metaphor .metaphor-diagram-stepno {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 20px;
    padding: 0 6px;
    border-radius: 0;
    background: rgba(34, 211, 238, 0.09);
    color: var(--color-brand);
    font-family: var(--font-mono) !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

#pg-academy .concept-metaphor .metaphor-diagram-content {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    color: var(--color-text-primary);
    font-family: var(--font-sans) !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    min-height: 52px;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

#pg-academy .concept-metaphor .metaphor-diagram-core {
    padding: 11px 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 0;
    background: transparent;
    color: var(--color-text-secondary);
    font-family: var(--font-sans) !important;
    font-size: 13px;
    line-height: 1.65;
}

#pg-academy .concept-metaphor .metaphor-wireframe {
    display: grid;
    gap: 12px;
    margin: 10px 0 14px;
}

#pg-academy .concept-metaphor .metaphor-wireframe-frame {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid rgba(148, 163, 184, 0.24);
    border-left: 1px solid rgba(148, 163, 184, 0.24);
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
    border-right: 0;
    background: transparent;
    overflow: hidden;
}

#pg-academy .concept-metaphor .metaphor-wireframe-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    min-height: 108px;
    padding: 14px 12px 12px;
    border-right: 1px solid rgba(148, 163, 184, 0.18);
    text-align: center;
}

#pg-academy .concept-metaphor .metaphor-wireframe-cell:last-child {
    border-right: 0;
}

#pg-academy .concept-metaphor .metaphor-wireframe-stepno {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 20px;
    padding: 0 6px;
    margin: 0 auto;
    background: rgba(34, 211, 238, 0.09);
    color: var(--color-brand);
    font-family: var(--font-mono) !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

#pg-academy .concept-metaphor .metaphor-wireframe-content {
    color: var(--color-text-primary);
    font-family: var(--font-sans) !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

#pg-academy .concept-metaphor .metaphor-wireframe-core {
    padding: 11px 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-right: 0;
    border-radius: 0;
    background: transparent;
    color: var(--color-text-secondary);
    font-family: var(--font-sans) !important;
    font-size: 13px;
    line-height: 1.65;
}

#pg-academy .concept-metaphor .metaphor-schema {
    display: grid;
    gap: 12px;
    margin: 10px 0 14px;
}

#pg-academy .concept-metaphor .schema-frame {
    border: 1px solid rgba(148, 163, 184, 0.24);
}

#pg-academy .concept-metaphor .schema-seq {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#pg-academy .concept-metaphor .schema-seq .schema-cell,
#pg-academy .concept-metaphor .schema-compare .schema-cell,
#pg-academy .concept-metaphor .schema-branch .schema-cell,
#pg-academy .concept-metaphor .schema-stack .schema-cell {
    min-height: 104px;
    padding: 14px 12px 12px;
    border-right: 1px solid rgba(148, 163, 184, 0.18);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

#pg-academy .concept-metaphor .schema-seq .schema-cell:last-child,
#pg-academy .concept-metaphor .schema-compare .schema-cell:last-child {
    border-right: 0;
}

#pg-academy .concept-metaphor .schema-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: auto;
    min-height: 28px;
    padding: 4px 10px;
    margin: 0 auto;
    background: rgba(34, 211, 238, 0.09);
    border-radius: 6px;
    color: var(--color-brand);
    font-family: var(--font-mono) !important;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

#pg-academy .concept-metaphor .schema-copy {
    color: var(--color-text-primary);
    font-family: var(--font-sans) !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

#pg-academy .concept-metaphor .schema-core {
    padding: 11px 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-top: 0;
    color: var(--color-text-secondary);
    font-family: var(--font-sans) !important;
    font-size: 13px;
    line-height: 1.65;
}

#pg-academy .concept-metaphor .schema-compare {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#pg-academy .concept-metaphor .schema-compare .schema-cell {
    min-height: 116px;
}

#pg-academy .concept-metaphor .schema-compare .schema-index {
    font-size: 16px;
    min-height: 22px;
    padding: 2px 8px;
}

#pg-academy .concept-metaphor .schema-cell-head {
    color: var(--color-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

#pg-academy .concept-metaphor .schema-cell-note {
    color: var(--color-text-secondary);
    font-size: 12px;
    line-height: 1.5;
}

#pg-academy .concept-metaphor .schema-branch {
    display: grid;
    grid-template-columns: 1fr;
}

#pg-academy .concept-metaphor .schema-branch-entry {
    padding: 12px 12px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    text-align: center;
}

#pg-academy .concept-metaphor .schema-branch-entry .schema-copy {
    font-size: 15px;
}

#pg-academy .concept-metaphor .schema-branch-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#pg-academy .concept-metaphor .schema-branch-split .schema-cell:last-child {
    border-right: 0;
}

#pg-academy .concept-metaphor .schema-stack {
    display: grid;
    grid-template-columns: 1fr;
}

#pg-academy .concept-metaphor .schema-stack .schema-cell {
    min-height: auto;
    text-align: left;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

#pg-academy .concept-metaphor .schema-stack .schema-cell:last-child {
    border-bottom: 0;
}

#pg-academy .concept-metaphor .schema-stack .schema-index {
    margin: 0;
    font-size: 16px;
    min-height: 22px;
    padding: 2px 8px;
}

/* ── 살표 flow 그리드 (가로형 도식) ── */
#pg-academy .concept-metaphor .schema-seq--flow2 {
    grid-template-columns: 1fr auto 1fr;
}
#pg-academy .concept-metaphor .schema-seq--flow3 {
    grid-template-columns: 1fr auto 1fr auto 1fr;
}
#pg-academy .concept-metaphor .schema-seq--flow4 {
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
}
#pg-academy .concept-metaphor .schema-cell--arrow {
    min-height: auto;
    padding: 0 2px;
    border: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-brand);
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
    background: transparent;
    user-select: none;
}
#pg-academy .concept-metaphor .schema-branch-split--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 720px) {
    #pg-academy .concept-metaphor .schema-seq--flow2,
    #pg-academy .concept-metaphor .schema-seq--flow3,
    #pg-academy .concept-metaphor .schema-seq--flow4 {
        grid-template-columns: 1fr;
    }
    #pg-academy .concept-metaphor .schema-cell--arrow {
        padding: 2px 0;
        transform: rotate(90deg);
    }
    #pg-academy .concept-metaphor .schema-branch-split--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    #pg-academy .concept-metaphor .metaphor-diagram-track {
        grid-template-columns: 1fr;
    }

    #pg-academy .concept-metaphor .metaphor-diagram-track::before,
    #pg-academy .concept-metaphor .metaphor-diagram-card::after {
        display: none;
    }

    #pg-academy .concept-metaphor .metaphor-diagram-card {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    }

    #pg-academy .concept-metaphor .metaphor-diagram-card:last-child {
        border-bottom: 0;
    }

    #pg-academy .concept-metaphor .metaphor-wireframe-frame {
        grid-template-columns: 1fr;
    }

    #pg-academy .concept-metaphor .metaphor-wireframe-cell {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    }

    #pg-academy .concept-metaphor .metaphor-wireframe-cell:last-child {
        border-bottom: 0;
    }

    #pg-academy .concept-metaphor .metaphor-wireframe-core {
        border-right: 1px solid rgba(148, 163, 184, 0.18);
    }

    #pg-academy .concept-metaphor .schema-seq,
    #pg-academy .concept-metaphor .schema-compare,
    #pg-academy .concept-metaphor .schema-branch-split {
        grid-template-columns: 1fr;
    }

    #pg-academy .concept-metaphor .schema-seq .schema-cell,
    #pg-academy .concept-metaphor .schema-compare .schema-cell,
    #pg-academy .concept-metaphor .schema-branch .schema-cell {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    }

    #pg-academy .concept-metaphor .schema-seq .schema-cell:last-child,
    #pg-academy .concept-metaphor .schema-compare .schema-cell:last-child,
    #pg-academy .concept-metaphor .schema-branch-split .schema-cell:last-child {
        border-bottom: 0;
    }

    /* ── schema-branch mobile/tablet: 박스 안의 박스 안의 박스 (3중 nesting) ──
       Goal: 외곽 1박스(부모 그룹) > internal 1박스(자식 컨테이너) > card N개(개Stars 자식)
       → "어떤 테이블 안의 어떤 테이블인지" 한눈에 이게 */

    /* 1step: schema-branch All에 명확한 외곽 박스 + 라운드 */
    #pg-academy .concept-metaphor .schema-branch {
        border: 2px solid color-mix(in srgb, var(--color-brand) 45%, var(--color-border-main));
        border-radius: 10px;
        background: color-mix(in srgb, var(--color-brand) 4%, transparent);
        overflow: hidden;
    }

    /* 부모 셀: 외곽 박스 안의 윗 영역 — 강조된 background + 강한 바닥선 */
    #pg-academy .concept-metaphor .schema-branch > .schema-cell,
    #pg-academy .concept-metaphor .schema-branch > .schema-branch-entry {
        background: color-mix(in srgb, var(--color-brand) 12%, transparent);
        border-bottom: 2px solid color-mix(in srgb, var(--color-brand) 55%, transparent) !important;
        padding: 14px 12px;
    }

    /* 2step: 자식 컨테이너 — 외곽 박스 안에 들여쓴 자체 박스 */
    #pg-academy .concept-metaphor .schema-branch > .schema-branch-split {
        margin: 10px;
        border: 1px solid rgba(148, 163, 184, 0.32);
        border-radius: 8px;
        background: var(--color-bg-page, rgba(15, 23, 42, 0.4));
        padding: 0;
        overflow: hidden;
        position: relative;
    }

    /* 자식 컨테이너 윗쪽 라벨: '↓ 위 항목의 하위 (N개)' */
    #pg-academy .concept-metaphor .schema-branch > .schema-branch-split::before {
        content: "↓ 위 항목의 하위";
        display: block;
        font-size: 11px;
        font-weight: 700;
        color: var(--color-brand);
        padding: 6px 12px;
        background: color-mix(in srgb, var(--color-brand) 8%, transparent);
        border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    }

    /* 3step: 각 자식 셀이 자체 card — 마진으로 분리 + 자체 더 + 라운드 */
    #pg-academy .concept-metaphor .schema-branch > .schema-branch-split > .schema-cell {
        margin: 8px;
        border: 1px solid rgba(148, 163, 184, 0.28) !important;
        border-radius: 6px;
        padding: 10px 12px;
        background: color-mix(in srgb, var(--color-brand) 2%, transparent);
    }

    /* 마지막 자식도 card 더 유지 (이전 :last-child border-bottom:0 rules 력) */
    #pg-academy .concept-metaphor .schema-branch > .schema-branch-split > .schema-cell:last-child {
        border: 1px solid rgba(148, 163, 184, 0.28) !important;
        border-bottom: 1px solid rgba(148, 163, 184, 0.28) !important;
    }
}


[data-theme="dark"] #pg-academy .concept-metaphor .metaphor-eco-frame {
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(5, 10, 18, 0.26);
}

[data-theme="light"] #pg-academy .concept-metaphor .metaphor-eco-frame {
    border-color: rgba(15, 23, 42, 0.14);
    background: rgba(255, 255, 255, 0.72);
}

#pg-academy .concept-doc-table,
#pg-academy .concept-metaphor table.metaphor-table,
#pg-academy .type-matrix-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

#pg-academy .concept-doc-table th,
#pg-academy .concept-metaphor table.metaphor-table th,
#pg-academy .type-matrix-table th,
#pg-academy .type-matrix-table thead th,
#pg-academy .type-matrix-table tbody:first-child tr:first-child > th,
#pg-academy .concept-doc-table tbody:first-child tr:first-child > th,
#pg-academy
    .concept-metaphor
    table.metaphor-table
    tbody:first-child
    tr:first-child
    > th,
[data-theme="light"] #pg-academy .concept-doc-table th,
[data-theme="light"] #pg-academy .concept-metaphor table.metaphor-table th,
[data-theme="light"] #pg-academy .type-matrix-table th {
    color: #111111 !important;
    text-align: center !important;
    font-weight: 800 !important;
    padding: 9px 12px !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28) !important;
    box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.28) !important;
    background: transparent !important;
}

#pg-academy .concept-doc-table td,
#pg-academy .concept-metaphor table.metaphor-table td,
#pg-academy .type-matrix-table td,
[data-theme="light"] #pg-academy .concept-doc-table td,
[data-theme="light"] #pg-academy .concept-metaphor table.metaphor-table td,
[data-theme="light"] #pg-academy .type-matrix-table td {
    color: #111111 !important;
    padding: 9px 12px !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.28) !important;
    background: transparent !important;
    vertical-align: middle !important;
}

#pg-academy .type-matrix-table th,
#pg-academy .type-matrix-table td {
    font-size: 14px !important;
    line-height: 1.6 !important;
}

#pg-academy .type-matrix-table code,
#pg-academy .concept-doc-table code,
#pg-academy .concept-metaphor table.metaphor-table code {
    font-size: 0.92em !important;
}

[data-theme="dark"] #pg-academy .concept-doc-table th,
[data-theme="dark"] #pg-academy .concept-doc-table td,
[data-theme="dark"] #pg-academy .concept-metaphor table.metaphor-table th,
[data-theme="dark"] #pg-academy .concept-metaphor table.metaphor-table td,
[data-theme="dark"] #pg-academy .type-matrix-table th,
[data-theme="dark"] #pg-academy .type-matrix-table td {
    color: #f8fafc !important;
}

[data-theme="dark"] #pg-academy .concept-doc-table thead th,
[data-theme="dark"]
    #pg-academy
    .concept-doc-table
    tbody:first-child
    tr:first-child
    > th,
[data-theme="dark"] #pg-academy .concept-metaphor table.metaphor-table thead th,
[data-theme="dark"]
    #pg-academy
    .concept-metaphor
    table.metaphor-table
    tbody:first-child
    tr:first-child
    > th,
[data-theme="dark"] #pg-academy .type-matrix-table thead th,
[data-theme="dark"]
    #pg-academy
    .type-matrix-table
    tbody:first-child
    tr:first-child
    > th {
    background: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="light"] #pg-academy .concept-doc-table thead th,
[data-theme="light"]
    #pg-academy
    .concept-doc-table
    tbody:first-child
    tr:first-child
    > th,
[data-theme="light"]
    #pg-academy
    .concept-metaphor
    table.metaphor-table
    thead
    th,
[data-theme="light"]
    #pg-academy
    .concept-metaphor
    table.metaphor-table
    tbody:first-child
    tr:first-child
    > th,
[data-theme="light"] #pg-academy .type-matrix-table thead th,
[data-theme="light"]
    #pg-academy
    .type-matrix-table
    tbody:first-child
    tr:first-child
    > th {
    background: rgba(8, 145, 178, 0.08) !important;
}

/* Academy guide inline emphasis must keep body size */
#pg-academy .concept-metaphor-guide-body b,
#pg-academy .concept-metaphor-guide-body strong,
#pg-academy .concept-metaphor-guide-body em,
#pg-academy .concept-metaphor-guide-body code,
#pg-academy .concept-metaphor .metaphor-desc b,
#pg-academy .concept-metaphor .metaphor-desc strong,
#pg-academy .concept-metaphor .metaphor-desc em,
#pg-academy .concept-metaphor .metaphor-desc code {
    font-size: 16px !important;
    line-height: 1.75 !important;
    font-weight: inherit !important;
}

/* Academy while metaphor simple flow */
#pg-academy .while-simple-flow,
#pg-academy .while-simple-flow * {
    background: transparent !important;
}
#pg-academy .while-simple-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 12px 0 14px;
}
#pg-academy .while-simple-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 620px;
}
#pg-academy .while-simple-path {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
#pg-academy .while-simple-node,
#pg-academy .while-simple-pill {
    min-width: 150px;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    border-radius: 8px;
    padding: 10px 14px;
    color: #111111 !important;
    text-align: center;
    box-shadow: none !important;
}
#pg-academy .while-simple-title {
    color: #111111 !important;
    font-weight: 800;
    font-size: 14px;
    line-height: 1.5;
}
#pg-academy .while-simple-node code,
#pg-academy .while-simple-node span {
    color: #111111 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}
#pg-academy .while-simple-arrow {
    border: 0 !important;
    color: #111111 !important;
    font-weight: 800;
    font-size: 15px;
    line-height: 1.4;
}
[data-theme="dark"] #pg-academy .while-simple-node,
[data-theme="dark"] #pg-academy .while-simple-pill,
[data-theme="dark"] #pg-academy .while-simple-title,
[data-theme="dark"] #pg-academy .while-simple-node code,
[data-theme="dark"] #pg-academy .while-simple-node span,
[data-theme="dark"] #pg-academy .while-simple-arrow {
    color: #f8fafc !important;
}
@media (max-width: 680px) {
    #pg-academy .while-simple-split {
        grid-template-columns: 1fr;
    }
}
