:root {
    --portal-bg: #0f1014;
    --portal-surface: rgba(22, 24, 30, 0.84);
    --portal-surface-strong: rgba(29, 30, 38, 0.92);
    --portal-surface-soft: rgba(255, 255, 255, 0.04);
    --portal-line: rgba(255, 236, 211, 0.12);
    --portal-line-strong: rgba(228, 192, 142, 0.24);
    --portal-text: rgba(255, 248, 238, 0.94);
    --portal-text-soft: rgba(228, 218, 204, 0.72);
    --portal-text-dim: rgba(201, 187, 171, 0.58);
    --portal-gold: #e4c08e;
    --portal-cool: #b0cae8;
    --portal-shadow: 0 32px 80px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
}

body {
    position: relative;
    overflow: hidden;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
    color: var(--portal-text);
    background:
        radial-gradient(circle at 18% 18%, rgba(228, 192, 142, 0.12), transparent 26%),
        radial-gradient(circle at 78% 16%, rgba(176, 202, 232, 0.08), transparent 24%),
        linear-gradient(155deg, #15120f 0%, #080809 52%, #141313 100%);
}

body.portal-viewer-active {
    overflow: hidden;
}

.portal-viewer-shell {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    background: #05070c;
    color: var(--portal-text);
}

.portal-viewer-shell.is-open {
    display: block;
}

.portal-viewer-frame-host {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #05070c;
}

.portal-viewer-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #05070c;
    opacity: 0;
    pointer-events: none;
}

.portal-viewer-frame.is-active {
    opacity: 1;
    pointer-events: auto;
}

.portal-viewer-toolbar {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid rgba(255, 236, 211, 0.14);
    border-radius: 14px;
    background: rgba(10, 10, 12, 0.72);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.portal-viewer-back,
.portal-viewer-tabs button {
    height: 34px;
    border: 1px solid rgba(255, 236, 211, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff9ef;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.portal-viewer-back {
    padding: 0 14px;
}

.portal-viewer-tabs {
    display: flex;
    gap: 6px;
}

.portal-viewer-tabs button {
    min-width: 58px;
    padding: 0 12px;
}

.portal-viewer-tabs button.is-active {
    border-color: rgba(242, 211, 164, 0.46);
    background: rgba(242, 211, 164, 0.18);
}

.portal-shell {
    position: relative;
    z-index: 1;
    height: 100vh;
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.portal-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.portal-backdrop::before,
.portal-backdrop::after {
    content: '';
    position: absolute;
    pointer-events: none;
}

.portal-backdrop::before {
    inset: -14%;
    background:
        linear-gradient(120deg, transparent 8%, rgba(228, 192, 142, 0.12) 32%, transparent 56%),
        linear-gradient(300deg, transparent 16%, rgba(176, 202, 232, 0.08) 44%, transparent 64%);
    opacity: 0.7;
    transform: translate3d(-1.5%, -1%, 0) rotate(-4deg);
    animation: portalBackdropDrift 24s ease-in-out infinite alternate;
    will-change: transform, opacity;
}

.portal-backdrop::after {
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 236, 211, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 236, 211, 0.028) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.08) 72%);
    opacity: 0.42;
}

.portal-card {
    width: min(1320px, 100%);
    height: min(900px, calc(100vh - 36px));
    max-height: calc(100vh - 36px);
    padding: 24px 24px 22px;
    border-radius: 30px;
    background:
        linear-gradient(180deg, rgba(255, 251, 245, 0.055), rgba(255, 255, 255, 0.018)),
        rgba(14, 13, 14, 0.86);
    border: 1px solid rgba(255, 236, 211, 0.1);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: grid;
    grid-template-columns: minmax(388px, 0.9fr) minmax(500px, 1.1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
        "header stage"
        "terminals stage";
    gap: 18px 24px;
    overflow: hidden;
    position: relative;
}

@keyframes portalBackdropDrift {
    0% {
        transform: translate3d(-1.5%, -1%, 0) rotate(-4deg);
        opacity: 0.58;
    }
    100% {
        transform: translate3d(1.5%, 1%, 0) rotate(-2deg);
        opacity: 0.78;
    }
}

.portal-card::before,
.portal-card::after {
    content: '';
    position: absolute;
    pointer-events: none;
    inset: 0;
}

.portal-card::before {
    background:
        radial-gradient(circle at 18% 0%, rgba(228, 192, 142, 0.08), transparent 28%),
        radial-gradient(circle at 86% 20%, rgba(176, 202, 232, 0.055), transparent 24%);
    opacity: 0.9;
}

.portal-card::after {
    inset: 1px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.portal-header {
    grid-area: header;
    display: grid;
    gap: 12px;
    align-items: start;
    min-width: 0;
}

.portal-brand-logo {
    width: clamp(64px, 6vw, 92px);
    height: clamp(64px, 6vw, 92px);
    object-fit: contain;
    margin-bottom: 2px;
    border-radius: 22px;
    filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.36));
}

.portal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(228, 192, 142, 0.22);
    background: rgba(255, 255, 255, 0.04);
    color: var(--portal-cool);
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.portal-title {
    margin: 16px 0 10px;
    font-family: 'Georgia', 'Times New Roman', 'Songti SC', serif;
    font-size: clamp(34px, 3.5vw, 54px);
    line-height: 1.02;
    letter-spacing: 0.02em;
    white-space: nowrap;
    background: linear-gradient(135deg, #fff9f2 0%, #f0d4a4 48%, #fff7eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.portal-selection-status {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    width: fit-content;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 236, 211, 0.12);
    color: var(--portal-text-soft);
    font-size: 12px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.portal-model-stage {
    grid-area: stage;
    margin-top: 0;
    padding: 24px 24px 20px;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 251, 245, 0.045), rgba(255, 255, 255, 0.018)),
        rgba(12, 11, 12, 0.9);
    border: 1px solid rgba(255, 236, 211, 0.08);
    position: relative;
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    min-width: 0;
}

.portal-stage-label {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--portal-text-dim);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.portal-model-title {
    margin: 0;
    font-size: clamp(26px, 2.6vw, 38px);
    letter-spacing: 0.03em;
}

.portal-model-description {
    margin: 8px 0 0;
    max-width: 520px;
    color: var(--portal-text-soft);
    font-size: 14px;
    line-height: 1.7;
    min-height: 48px;
}

.portal-wheel-shell {
    position: relative;
    z-index: 1;
    margin-top: 8px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 0;
}

.portal-wheel-nav {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 236, 211, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    color: var(--portal-text);
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.portal-wheel-nav:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: var(--portal-line-strong);
    background: rgba(255, 255, 255, 0.08);
}

.portal-wheel-nav:disabled {
    opacity: 0.4;
    cursor: default;
}

.portal-wheel-viewport {
    position: relative;
    height: clamp(320px, 44vh, 430px);
    min-height: 320px;
    overflow: hidden;
    perspective: 1200px;
    perspective-origin: center 42%;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.portal-wheel-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    transform-style: preserve-3d;
}

.portal-wheel-rotor {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    will-change: transform;
}

.portal-wheel-rotor.is-animated {
    transition: none;
}

.portal-wheel-rotor.is-dragging {
    transition: none;
}

.portal-wheel-rotor:not(.is-animated) .portal-wheel-item {
    transition: none;
}

.portal-wheel-viewport:active {
    cursor: grabbing;
}

.portal-wheel-rotor.is-dragging .portal-wheel-item {
    transition: none;
}

.portal-wheel-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--wheel-item-width, 250px);
    min-height: var(--wheel-item-height, 174px);
    height: var(--wheel-item-height, 174px);
    padding: 18px 18px 16px;
    border-radius: 22px;
    border: 1px solid rgba(255, 236, 211, 0.1);
    background:
        linear-gradient(180deg, rgba(255, 249, 241, 0.08), rgba(255, 255, 255, 0.015)),
        rgba(23, 20, 18, 0.7);
    color: inherit;
    text-align: left;
    cursor: pointer;
    transform-origin: center center;
    transform-style: preserve-3d;
    transition: transform 260ms cubic-bezier(0.22, 0.72, 0.18, 1), opacity 220ms ease, filter 220ms ease, border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
    overflow: hidden;
    transform: translate(-50%, -50%);
    will-change: transform, opacity;
}

.portal-wheel-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 249, 241, 0.09), transparent 26%),
        linear-gradient(135deg, transparent 12%, rgba(213, 171, 80, 0.08) 42%, transparent 72%);
    pointer-events: none;
}

.portal-wheel-item:hover {
    border-color: rgba(228, 192, 142, 0.22);
}

.portal-wheel-item.is-front {
    filter: saturate(1.04);
}

.portal-wheel-item.is-selected {
    border-color: rgba(228, 192, 142, 0.38);
    background:
        linear-gradient(180deg, rgba(255, 249, 241, 0.12), rgba(255, 255, 255, 0.025)),
        rgba(30, 25, 20, 0.82);
    box-shadow:
        0 22px 48px rgba(0, 0, 0, 0.34),
        0 0 34px rgba(213, 171, 80, 0.15);
}

.portal-wheel-item.is-back {
    opacity: 0.46;
}

.portal-wheel-item-index {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(11, 13, 18, 0.42);
    color: var(--portal-gold);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.portal-wheel-item-title {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.25;
    position: relative;
    z-index: 1;
}

.portal-wheel-item-copy {
    margin: 0 0 12px;
    color: var(--portal-text-soft);
    font-size: 13px;
    line-height: 1.62;
    position: relative;
    z-index: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portal-wheel-item-meta {
    color: var(--portal-text-dim);
    font-size: 12px;
    position: relative;
    z-index: 1;
}

.portal-wheel-hint {
    position: relative;
    z-index: 1;
    margin: 8px 0 0;
    color: var(--portal-text-dim);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-align: center;
}

.portal-terminal-grid {
    grid-area: terminals;
    margin-top: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 0;
    align-content: start;
    overflow: visible;
}

.portal-option {
    position: relative;
    display: block;
    min-height: 0;
    border-radius: 22px;
    border: 1px solid rgba(255, 236, 211, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 249, 241, 0.06), rgba(255, 255, 255, 0.015)),
        rgba(19, 18, 19, 0.72);
    overflow: hidden;
}

.portal-option::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(176, 202, 232, 0.18), transparent 38%),
        radial-gradient(circle at bottom left, rgba(228, 192, 142, 0.14), transparent 42%);
    opacity: 0.92;
    pointer-events: none;
}

.portal-option > * {
    position: relative;
    z-index: 1;
}

.portal-option-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 86px;
    padding: 14px;
}

.portal-option-copygroup {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.portal-option-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
    width: clamp(156px, 16vw, 190px);
    flex-shrink: 0;
}

.portal-option-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    width: fit-content;
    background: rgba(11, 13, 18, 0.44);
    border: 1px solid rgba(255, 236, 211, 0.12);
    color: var(--portal-gold);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.portal-option-title {
    margin: 0;
    font-size: 19px;
    letter-spacing: 0.03em;
}

.portal-toggle {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: center;
    padding: 7px 9px;
    border-radius: 14px;
    border: 1px solid rgba(255, 236, 211, 0.1);
    background: rgba(10, 12, 18, 0.28);
    cursor: pointer;
    width: 100%;
}

.portal-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.portal-toggle-track {
    position: relative;
    width: 48px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    transition: background 0.22s ease;
}

.portal-toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff9f0;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.24);
    transition: transform 0.22s ease;
}

.portal-toggle input:checked + .portal-toggle-track {
    background: linear-gradient(135deg, rgba(255, 183, 112, 0.76), rgba(128, 170, 255, 0.8));
}

.portal-toggle input:checked + .portal-toggle-track::after {
    transform: translateX(20px);
}

.portal-toggle-copy strong {
    display: block;
    font-size: 12px;
}

.portal-option-cta {
    width: 100%;
    min-height: 42px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 211, 152, 0.34);
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(255, 183, 112, 0.22), rgba(128, 170, 255, 0.18)),
        rgba(255, 255, 255, 0.04);
    color: #fff8ef;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 245, 229, 0.14);
    transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease, background 0.26s ease;
}

.portal-option-cta:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(255, 214, 160, 0.5);
    background:
        linear-gradient(135deg, rgba(255, 191, 120, 0.28), rgba(142, 181, 255, 0.22)),
        rgba(255, 255, 255, 0.05);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.28),
        0 0 32px rgba(255, 177, 92, 0.12),
        inset 0 1px 0 rgba(255, 247, 234, 0.18);
}

.portal-option-cta:disabled {
    opacity: 0.5;
    cursor: default;
}

.portal-admin-link {
    position: absolute;
    left: 24px;
    bottom: 10px;
    z-index: 2;
}

.portal-admin-link a {
    color: var(--portal-gold);
    text-decoration: none;
    font-size: 13px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.portal-admin-link a:hover {
    opacity: 1;
}

.portal-empty {
    display: grid;
    place-items: center;
    min-height: 180px;
    padding: 24px;
    border-radius: 24px;
    border: 1px dashed rgba(255, 236, 211, 0.12);
    color: var(--portal-text-soft);
    text-align: center;
    line-height: 1.7;
}

@media (max-width: 1180px) and (orientation: landscape) and (pointer: coarse) {
    body {
        overflow: hidden;
    }

    .portal-shell {
        height: 100vh;
        min-height: 100vh;
        overflow: hidden;
        align-items: center;
    }

    .portal-card {
        grid-template-columns: minmax(280px, 0.84fr) minmax(0, 1.16fr);
        grid-template-rows: auto minmax(0, 1fr);
        grid-template-areas:
            "header stage"
            "terminals stage";
        height: calc(100vh - 28px);
        max-height: calc(100vh - 28px);
        min-height: 0;
        padding: 18px 18px 28px;
        gap: 14px 18px;
    }

    .portal-header {
        gap: 12px;
    }

    .portal-title {
        margin: 10px 0 8px;
        font-size: clamp(28px, 3vw, 40px);
        white-space: normal;
    }

    .portal-model-stage {
        padding: 18px 18px 16px;
    }

    .portal-model-description {
        min-height: 0;
        font-size: 13px;
        line-height: 1.55;
    }

    .portal-wheel-shell {
        gap: 8px;
    }

    .portal-wheel-viewport {
        height: clamp(250px, 42vh, 340px);
        min-height: 250px;
    }

    .portal-wheel-item {
        min-height: 150px;
        height: 150px;
        padding: 16px 16px 14px;
    }

    .portal-terminal-grid {
        gap: 9px;
    }

    .portal-option-main {
        grid-template-columns: minmax(0, 1fr) 158px;
        min-height: 78px;
        padding: 12px;
        gap: 10px;
    }

    .portal-option-copygroup {
        gap: 7px;
    }

    .portal-option-title {
        font-size: 18px;
    }

    .portal-toggle {
        padding: 6px 8px;
    }

    .portal-option-cta {
        min-height: 40px;
        font-size: 13px;
        letter-spacing: 0.05em;
    }
}

@media (max-width: 1040px) {
    .portal-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto minmax(0, 1fr);
        grid-template-areas:
            "header"
            "terminals"
            "stage";
        height: calc(100vh - 32px);
    }

    .portal-title {
        white-space: normal;
    }

    .portal-selection-status {
        width: fit-content;
    }

    .portal-terminal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .portal-option-main {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
    }

    .portal-option-actions {
        width: 174px;
    }
}

@media (max-width: 880px) {
    body {
        overflow: auto;
    }

    .portal-shell {
        height: auto;
        min-height: 100dvh;
        padding: 12px;
        overflow: visible;
        align-items: flex-start;
    }

    .portal-card {
        height: auto;
        max-height: none;
        min-height: calc(100dvh - 24px);
        padding: 18px 16px 16px;
        border-radius: 22px;
    }

    .portal-model-stage {
        padding: 14px 14px 12px;
    }

    .portal-wheel-shell {
        grid-template-columns: 1fr;
    }

    .portal-wheel-nav {
        display: none;
    }

    .portal-wheel-viewport {
        height: clamp(210px, 30vh, 260px);
        min-height: 210px;
    }

    .portal-wheel-item {
        min-height: 124px;
        height: 124px;
        padding: 12px;
        border-radius: 16px;
    }

    .portal-option-title {
        font-size: 20px;
    }

    .portal-terminal-grid {
        grid-template-columns: 1fr;
    }

    .portal-option-main {
        grid-template-columns: 1fr;
        gap: 8px;
        min-height: 74px;
        padding: 10px;
    }

    .portal-option-actions {
        justify-content: flex-start;
        width: 100%;
        gap: 6px;
    }

    .portal-option-badge {
        min-height: 24px;
        padding: 0 9px;
        font-size: 10px;
    }

    .portal-option-title {
        font-size: 17px;
    }

    .portal-option-cta {
        min-height: 34px;
        font-size: 12px;
    }

    .portal-toggle {
        padding: 6px 8px;
    }

    .portal-toggle-track {
        width: 40px;
        height: 24px;
    }

    .portal-toggle-track::after {
        width: 18px;
        height: 18px;
    }

    .portal-toggle input:checked + .portal-toggle-track::after {
        transform: translateX(16px);
    }
}

@media (max-width: 1180px) and (orientation: landscape) and (pointer: coarse) {
    body {
        overflow: hidden;
    }

    .portal-shell {
        height: 100vh;
        min-height: 100vh;
        overflow: hidden;
        align-items: center;
    }

    .portal-card {
        grid-template-columns: minmax(312px, 0.9fr) minmax(0, 1.1fr);
        grid-template-rows: auto minmax(0, 1fr);
        grid-template-areas:
            "header stage"
            "terminals stage";
        height: calc(100vh - 28px);
        max-height: calc(100vh - 28px);
        min-height: 0;
        padding: 18px 18px 28px;
        gap: 14px 18px;
    }

    .portal-model-stage {
        padding: 18px 18px 16px;
    }

    .portal-wheel-viewport {
        height: clamp(250px, 42vh, 340px);
        min-height: 250px;
    }

    .portal-terminal-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .portal-option-main {
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: 78px;
        padding: 12px;
        gap: 10px;
    }

    .portal-option-actions {
        width: 158px;
        gap: 8px;
    }
}

@media (min-width: 881px) and (max-width: 1180px) and (orientation: landscape) {
    body {
        overflow: hidden;
    }

    .portal-shell {
        height: 100vh;
        min-height: 100vh;
        padding: 10px;
        overflow: hidden;
        align-items: center;
    }

    .portal-card {
        width: min(1120px, 100%);
        height: calc(100vh - 20px);
        max-height: calc(100vh - 20px);
        min-height: 0;
        padding: 14px 14px 22px;
        border-radius: 22px;
        grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
        grid-template-rows: auto minmax(0, 1fr);
        grid-template-areas:
            "header stage"
            "terminals stage";
        gap: 10px 14px;
    }

    .portal-header {
        gap: 8px;
    }

    .portal-brand-logo {
        width: 54px;
        height: 54px;
        border-radius: 16px;
    }

    .portal-eyebrow {
        min-height: 24px;
        padding: 4px 9px;
        font-size: 10px;
        letter-spacing: 0.14em;
    }

    .portal-title {
        margin: 8px 0 4px;
        font-size: clamp(26px, 3vw, 34px);
        line-height: 1;
    }

    .portal-selection-status {
        min-height: 30px;
        padding: 0 10px;
        font-size: 11px;
    }

    .portal-terminal-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .portal-option {
        border-radius: 16px;
    }

    .portal-option-main {
        grid-template-columns: minmax(0, 1fr) 144px;
        min-height: 66px;
        padding: 9px 10px;
        gap: 8px;
    }

    .portal-option-badge {
        min-height: 24px;
        padding: 0 9px;
        font-size: 10px;
        letter-spacing: 0.1em;
    }

    .portal-option-title {
        font-size: 16px;
    }

    .portal-option-actions {
        width: 144px;
        gap: 6px;
    }

    .portal-toggle {
        grid-template-columns: auto 1fr;
        padding: 5px 7px;
        gap: 6px;
        border-radius: 12px;
    }

    .portal-toggle-track {
        width: 40px;
        height: 24px;
    }

    .portal-toggle-track::after {
        width: 18px;
        height: 18px;
    }

    .portal-toggle input:checked + .portal-toggle-track::after {
        transform: translateX(16px);
    }

    .portal-toggle-copy strong {
        font-size: 11px;
    }

    .portal-option-cta {
        min-height: 34px;
        font-size: 12px;
        letter-spacing: 0.04em;
    }

    .portal-model-stage {
        padding: 14px 14px 12px;
        border-radius: 20px;
        grid-template-rows: auto minmax(0, 1fr) auto;
    }

    .portal-stage-label {
        margin-bottom: 5px;
        font-size: 10px;
        letter-spacing: 0.14em;
    }

    .portal-model-title {
        font-size: clamp(22px, 2.5vw, 30px);
        line-height: 1.08;
    }

    .portal-model-description {
        margin-top: 5px;
        min-height: 0;
        font-size: 12px;
        line-height: 1.45;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .portal-wheel-shell {
        margin-top: 4px;
        gap: 6px;
    }

    .portal-wheel-nav {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }

    .portal-wheel-viewport {
        height: clamp(210px, 36vh, 280px);
        min-height: 210px;
    }

    .portal-wheel-item {
        min-height: 132px;
        height: 132px;
        padding: 13px 14px 12px;
        border-radius: 16px;
    }

    .portal-wheel-item-index {
        margin-bottom: 7px;
        padding: 3px 8px;
        font-size: 9px;
    }

    .portal-wheel-item-title {
        margin-bottom: 6px;
        font-size: 18px;
    }

    .portal-wheel-item-copy {
        font-size: 12px;
        line-height: 1.45;
        -webkit-line-clamp: 2;
    }

    .portal-wheel-hint {
        margin-top: 4px;
        font-size: 11px;
    }

    .portal-admin-link {
        left: 16px;
        bottom: 6px;
    }

    .portal-admin-link a {
        font-size: 12px;
    }
}
