.couple-page {
    width: min(100% - 40px, 900px);
    margin: 0 auto;
    padding-bottom: 52px;
}

.couple-intro {
    display: block;
    padding-top: clamp(31px, 5vw, 52px);
}

.couple-intro-copy {
    max-width: 62ch;
    margin: 11px 0 0;
    color: #d4cde3;
    font: 500 1rem/1.6 var(--font-ui);
}

.couple-cabinet {
    position: relative;
    isolation: isolate;
    width: min(100%, 720px);
    margin: 27px auto 0;
    padding: clamp(15px, 3.5vw, 28px);
    border: 3px solid #9b5bde;
    border-radius: 9px;
    background:
        repeating-linear-gradient(0deg, rgba(148, 133, 190, .035) 0 1px, transparent 1px 4px),
        linear-gradient(145deg, rgba(32, 24, 61, .98), rgba(13, 11, 31, .98));
    box-shadow: 0 0 0 4px #30204b, 0 0 26px rgba(173, 91, 235, .2), inset 0 0 26px rgba(0, 0, 0, .45);
}

.couple-cabinet-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.couple-cabinet-label {
    color: var(--cyan);
    font: 800 .78rem/1.4 var(--font-ui);
    letter-spacing: .08em;
}

.couple-sound-toggle,
.couple-reset,
.couple-back {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid #7861b0;
    border-radius: 5px;
    color: #f8f3ff;
    background: #21163d;
    box-shadow: 0 3px 0 #100a20;
    font: 700 .95rem/1.25 var(--font-ui);
    text-decoration: none;
    cursor: pointer;
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.couple-sound-toggle {
    min-height: 42px;
    padding: 8px 12px;
}

.couple-sound-toggle:hover,
.couple-back:hover {
    border-color: var(--cyan);
    box-shadow: 0 3px 0 #100a20, 0 0 14px rgba(76, 232, 255, .22);
}

.couple-cabinet h2 {
    margin: 19px 0 0;
    color: var(--gold);
    font: 400 clamp(1rem, 3.4vw, 1.35rem)/1.6 var(--font-pixel);
    text-align: center;
    text-shadow: 2px 2px #8d3c90;
}

.couple-subtitle {
    margin: 4px 0 20px;
    color: var(--cyan);
    font: 800 .78rem/1.5 var(--font-ui);
    letter-spacing: .08em;
    text-align: center;
}

.couple-players {
    display: grid;
    width: min(100%, 430px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
    margin: 0 auto 16px;
}

.couple-player {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid #4b3c70;
    border-radius: 5px;
    color: #d6cde8;
    background: rgba(13, 10, 29, .8);
    font: 800 .95rem/1.3 var(--font-ui);
    transition: border-color .15s ease, box-shadow .15s ease, color .15s ease;
}

.couple-player[data-turn="true"] {
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: inset 0 0 16px rgba(255, 225, 123, .08), 0 0 13px rgba(255, 225, 123, .13);
}

.couple-player-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.couple-board {
    display: grid;
    width: min(100%, 430px);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 auto;
    padding: 9px;
    border: 2px solid #453761;
    border-radius: 8px;
    background: #090817;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, .55), 0 0 14px rgba(104, 67, 170, .14);
}

.couple-cell {
    display: grid;
    min-width: 0;
    aspect-ratio: 1;
    place-items: center;
    padding: 0;
    border: 2px solid #51456e;
    border-radius: 5px;
    color: var(--gold);
    background: linear-gradient(145deg, #201a3a, #151227);
    font: 400 clamp(2.1rem, 10vw, 3.5rem)/1 var(--font-ui);
    cursor: pointer;
    touch-action: manipulation;
    transition: background .14s ease, border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.couple-cell:hover:not(:disabled) {
    border-color: var(--cyan);
    background: #252044;
    box-shadow: inset 0 0 17px rgba(76, 232, 255, .08), 0 0 11px rgba(76, 232, 255, .15);
}

.couple-cell:focus-visible,
.couple-sound-toggle:focus-visible,
.couple-reset:focus-visible,
.couple-back:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.couple-cell[data-player="dj"] { color: var(--cyan); }
.couple-cell:disabled { cursor: default; }
.couple-cell.is-winning {
    border-color: var(--gold);
    background: linear-gradient(145deg, #493c24, #27203b);
    box-shadow: 0 0 17px rgba(255, 225, 123, .34), inset 0 0 12px rgba(255, 225, 123, .12);
}

.couple-turn {
    margin: 18px 0 0;
    color: var(--gold);
    font: 800 1.1rem/1.4 var(--font-ui);
    text-align: center;
}

.couple-message {
    min-height: 1.6em;
    margin: 7px 0 18px;
    color: #d4cde3;
    font: 500 1rem/1.55 var(--font-ui);
    text-align: center;
}
.couple-cabinet.is-result-open .couple-players,
.couple-cabinet.is-result-open .couple-board,
.couple-cabinet.is-result-open .couple-turn,
.couple-cabinet.is-result-open .couple-message,
.couple-cabinet.is-result-open .couple-actions {
    display: none !important;
}
.couple-result h3 {
    margin: 0;
    color: var(--gold);
    font: 400 .95rem/1.6 "ADJMN Press Start", "Courier New", monospace;
}
.couple-result .game-result-actions { margin-top: 18px; }

.couple-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.couple-reset {
    border-color: #ff6078;
    color: #fff;
    background: linear-gradient(180deg, #f34861, #d52342);
    box-shadow: 0 4px 0 #81132e, 0 0 15px rgba(239, 48, 73, .18);
}

.couple-reset:hover {
    border-color: #ff9aaa;
    box-shadow: 0 4px 0 #81132e, 0 0 18px rgba(239, 48, 73, .36);
}

.couple-reset:active,
.couple-back:active,
.couple-sound-toggle:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #100a20;
}

.couple-reset:active { box-shadow: 0 2px 0 #81132e; }

@media (max-width: 520px) {
    .couple-page { width: min(100% - 28px, 440px); padding-bottom: 38px; }
    .couple-intro { padding-top: 29px; }
    .couple-cabinet { margin-top: 21px; }
    .couple-cabinet-label { max-width: 52%; font-size: .72rem; }
    .couple-board { gap: 6px; padding: 7px; }
    .couple-cell { border-width: 1px; }
    .couple-actions { display: grid; grid-template-columns: 1fr; }
    .couple-reset, .couple-back { width: 100%; }
}

@media (max-width: 360px) {
    .couple-page { width: calc(100% - 24px); }
    .couple-cabinet { padding: 13px; }
    .couple-cabinet-label { font-size: .68rem; }
    .couple-sound-toggle { padding-inline: 9px; }
    .couple-subtitle { font-size: .72rem; }
}

@media (prefers-reduced-motion: reduce) {
    .couple-cell, .couple-player, .couple-sound-toggle, .couple-reset, .couple-back {
        transition: none;
    }
}
