/* BkL: дуэль вдвоём в «Угадай мелодию» (duel.js). Экран строится на тех же классах, что и соло-раунд (game.css): .stage, .opts, .opt. */
.duel .dtop { gap: 8px; }
.duel .dback span { margin-left: 2px; }
.dscore { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; }
.dscore .dn { min-width: 0; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); }
.dscore .dsc { flex: none; font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--gold); }
:root[data-theme="light"] .dscore .dsc { color: var(--red); }
.dscore.pop .dsc { animation: dpop .55s var(--ease); }
@keyframes dpop { 0% { transform: scale(1); } 35% { transform: scale(1.4); } 100% { transform: scale(1); } }
.dround { flex: none; min-width: 36px; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }

.dbanner { flex: none; margin: 0 0 6px; padding: 6px 10px; font-size: 12.5px; line-height: 1.3; font-weight: 700; background: var(--surface2); color: var(--text); }
.dbanner.bad { background: #8c1c22; color: #fff; }

.duel .stage.dcount .state { font-size: 52px; line-height: 1; font-variant-numeric: tabular-nums; animation: beat 1s ease-out infinite; }
.duel .stage .dclock { font-variant-numeric: tabular-nums; }
.duel .stage .state.verdict { font-size: 22px; }
.duel .stage .answer { margin: 2px 0 0; }
.duel .stage .prow2 { margin-top: 4px; }
.duel .stage .prow2 .btn { min-height: 40px; }
.duelbtn { padding: 0 14px; white-space: nowrap; }

/* панель вместо четырёх табличек: приглашение, ожидание, итог */
.playing .opts.dpanel { display: flex; grid-template-rows: none; align-items: stretch; }
.dcard { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 14px 16px; text-align: center; background: color-mix(in srgb, var(--surface) 93%, transparent); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.dcard h2, .dcard h3 { margin: 0; font-weight: 800; letter-spacing: -.015em; }
.dcard h3 { font-size: 19px; }
.dcard p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.dcard .dtip { color: var(--text); font-weight: 700; padding: 8px 10px; background: var(--surface2); }
.dcard .dsm { font-size: 12.5px; }
.dcard .dsm.good { color: #2fbf5b; font-weight: 800; font-size: 15px; }
.dfinal .dfin { font-size: 36px; line-height: 1.1; letter-spacing: .02em; }
.dfinal .dfin.ok { color: #2fbf5b; }
.dfinal .dfin.bad { color: var(--red-hi); }
.dfinal .dfin.tie { color: var(--gold); }
:root[data-theme="light"] .dfinal .dfin.tie { color: var(--red); }
.dfinal .dfs { font-size: 46px; font-weight: 800; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.dfinal .dnames { font-size: 14px; font-weight: 700; }

.opt.picked { box-shadow: inset 0 0 0 3px var(--gold); }
.opt.picked:disabled { opacity: 1; }

.dmodal { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0, 0, 0, .6); }
.dmodal .dcard { flex: none; max-width: 320px; width: 100%; background: var(--surface); }
.dmodal .prow2 { margin-top: 4px; }
#gamesView.duel { position: relative; }
@media (prefers-reduced-motion: reduce) { .duel .stage.dcount .state, .dscore.pop .dsc { animation: none; } }
.duelbtn[hidden] { display: none; }
.duelmini { min-height: 34px; padding: 0 10px; font-size: 13px; flex: none; }

/* выбор жанра и годов перед созданием дуэли */
.dcard.dsetup { justify-content: flex-start; text-align: left; overflow-y: auto; }
.dsetup .ptitle { font-size: 14px; font-weight: 800; color: var(--text); margin: 0 2px 6px; }
.dsetup .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dsetup .chip { min-height: 44px; padding: 0 14px; font-size: 15px; transition: background .15s, transform .15s var(--ease), box-shadow .15s; }
.dsetup .chip:active:not(:disabled) { transform: scale(.95); }
.dsetup .chip.on::before { content: "✓"; margin-right: 6px; font-weight: 900; }
.dsetup .chip:disabled { opacity: .35; }
.dsetup .dpick { display: flex; flex-direction: column; gap: 14px; }
.dsetup .dpick > .ptitle { margin: 0 0 -6px; font-size: 13px; color: var(--muted); }
.dsetup .chips { margin-bottom: 0; }
/* выбор друга в приглашении: два ясных жетона, жанр (залит) и годы (в рамке) */
.dbadges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 2px 0 6px; }
.dbadge { pointer-events: none; min-height: 34px; padding: 0 14px; font-size: 15px; font-weight: 800; }
.dbadge.dec { background: transparent; color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }
:root[data-theme="light"] .dbadge.dec { color: #b45f00; box-shadow: inset 0 0 0 2px #b45f00; }
/* главная кнопка стартового экрана: широкая, остальные рядом поменьше */
.duel .stage .prow2 .btn.dmain { flex: 1 1 auto; min-height: 48px; font-size: 17px; }
.duel .stage .prow2 .btn.dmain:not(:disabled) { animation: dmainpulse 2.2s ease-out infinite; }
@keyframes dmainpulse { 0% { box-shadow: 0 0 0 0 rgba(229, 37, 45, .5); } 70% { box-shadow: 0 0 0 14px rgba(229, 37, 45, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 37, 45, 0); } }
@media (prefers-reduced-motion: reduce) { .duel .stage .prow2 .btn.dmain:not(:disabled) { animation: none; } .dsetup .chip { transition: none; } }

/* приглашение для гостя: карточка крупнее, жетоны выбора хозяина читаются с первого взгляда */
.duel .stage:has(.dbadges) { height: auto; min-height: 138px; overflow: visible; padding: 18px 16px 16px; gap: 6px; }
.duel .stage:has(.dbadges) .state { font-size: 24px; }
.duel .stage:has(.dbadges) .sub { font-size: 14px; }
.duel .stage:has(.dbadges) .dbadge { min-height: 40px; padding: 0 18px; font-size: 18px; }
.duel .stage:has(.dbadges) .prow2 { margin-top: 10px; }
.duel .stage:has(.dbadges) .prow2 .btn { min-height: 48px; font-size: 16px; }
