[hidden] { display: none !important; }
.durak-page { background: radial-gradient(ellipse at 73% 14%, #513026, #2b2028 43%, #141923 85%); }
.durak-main { width: min(960px, calc(100% - 32px)); padding-block: 26px 56px; }
.durak-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 18px; }
.durak-heading h1 { font-size: clamp(33px, 6vw, 62px); }
.durak-heading h1 span { color: #ffce90; }
.cabin-details { display: flex; flex: none; align-items: end; gap: 10px; }
.cabin-window { position: relative; overflow: hidden; width: 74px; height: 57px; border: 3px solid #996d65; border-radius: 8px 8px 4px 4px; background: linear-gradient(0deg, #526d86, #1a2743 68%); box-shadow: inset 0 0 7px #0b1226; }
.cabin-window::before, .cabin-window::after { content: ''; position: absolute; inset: 0; }
.cabin-window::before {
  background-image: radial-gradient(circle at 3px 6px, #e8f7ffd0 1px, transparent 1.5px), radial-gradient(circle at 15px 17px, #c8eaff99 .7px, transparent 1.2px);
  background-size: 22px 24px, 29px 24px;
  animation: cabin-snow 3s linear infinite;
}
.cabin-window::after { background: linear-gradient(90deg, transparent 48%, #996d65 48% 52%, transparent 52%), linear-gradient(0deg, transparent 42%, #996d65 42% 48%, transparent 48%); }
@keyframes cabin-snow { to { background-position: 0 24px; } }
.hearth { position: relative; flex: none; width: clamp(49px, 10vw, 88px); height: 64px; border: 5px solid #9a6560; border-bottom: 8px solid #744e4d; border-radius: 43% 43% 7px 7px; background: radial-gradient(ellipse at 50% 95%, #8e482c, #272034 67%); box-shadow: 0 0 44px #fa9a4960; }
.hearth i { position: absolute; width: 26%; height: 53%; left: 36%; bottom: 0; border-radius: 65% 24% 55% 52%; background: linear-gradient(#ffc17f, #fb805a); transform: rotate(15deg); animation: flicker 2s ease-in-out infinite alternate; }
.hearth i:first-child { left: 19%; height: 33%; animation-delay: -.8s; }
.hearth i:last-child { left: 58%; height: 39%; animation-delay: -1.2s; }
@keyframes flicker { to { transform: rotate(8deg) scaleY(.84); } }
@media (prefers-reduced-motion: reduce) { .hearth i, .cabin-window::before { animation: none; } }
.durak-setup, .durak-game { border: 1px solid #8d665e; border-radius: 17px; background: #28212c; box-shadow: 0 18px 60px #0b111c8c; }
.durak-setup { padding: clamp(12px, 4vw, 28px); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr)); gap: 11px; }
.settings-grid label { display: grid; gap: 4px; color: #f0decd; font-weight: 800; }
.settings-grid select { width: 100%; min-height: 44px; padding: 6px 9px; border: 1px solid #906a68; border-radius: 8px; background: #332a37; color: #fff0df; font: inherit; }
.durak-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 11px; }
.durak-button { min-height: 44px; min-width: 44px; border: 1px solid #a27365; border-radius: 8px; padding: 8px 11px; background: #3e2e39; color: #fff2dc; font: 800 14px Nunito, sans-serif; cursor: pointer; touch-action: manipulation; }
.durak-button.gold { background: #efc188; color: #32212a; border-color: #ffe0ad; }
.durak-button:disabled { opacity: .58; cursor: default; }
.durak-button:hover:not(:disabled) { border-color: #ffdfae; }
.durak-button:focus-visible, .playing-card:focus-visible, .settings-grid select:focus-visible, summary:focus-visible { outline: 2px solid #ffe1a6; outline-offset: 3px; }
.rules { margin-top: 12px; color: #ead8cc; }
.rules summary { cursor: pointer; padding: 10px 0; }
.rules p + p { margin-top: 7px; }
.durak-game { padding: clamp(8px, 2vw, 18px); }
.durak-toolbar, .opponent { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.durak-toolbar { color: #f2dcbb; font-size: 13px; }
.durak-toolbar button { margin-left: auto; }
.opponent { margin-block: 9px; color: #eddddb; font-size: 13px; }
.card-fan { display: flex; padding-inline-start: 12px; }
.card-back { width: 29px; height: 40px; margin-inline-start: -12px; border: 1px solid #b47b79; border-radius: 5px; background: repeating-linear-gradient(135deg, #722e49 0 4px, #8d4558 4px 7px); box-shadow: inset 0 0 0 2px #49253d; }
.green-table { display: flex; align-items: center; gap: clamp(7px, 2vw, 20px); padding: clamp(8px, 2vw, 18px); min-height: 151px; border: 1px solid #987a62; border-radius: 13px; background: radial-gradient(ellipse at center, #2a504b, #1a373a 80%); }
.stock { flex: none; color: #e8eee3; text-align: center; font-size: 12px; }
.stock p { margin-top: 6px; padding: 4px; border: 1px solid #a69e6b; border-radius: 5px; color: #ffdda0; }
.card-table { display: grid; grid-template-columns: repeat(auto-fit, minmax(61px, 1fr)); justify-items: center; gap: 10px 6px; flex: 1; min-width: 0; }
.card-table .empty-table { grid-column: 1 / -1; color: #c4dfd5; }
.card-pair { position: relative; width: 64px; height: 90px; }
.playing-card { display: inline-grid; place-items: center; min-width: 44px; width: 54px; height: 72px; border: 1px solid #e9cca7; border-radius: 7px; padding: 3px; background: linear-gradient(150deg, #fff5df, #e8d6bd); color: #253047; font: 800 19px Nunito, sans-serif; line-height: 1; box-shadow: 0 2px 5px #120c17a3; touch-action: manipulation; white-space: nowrap; }
button.playing-card { cursor: pointer; }
.playing-card.red { color: #a33146; }
.playing-card.trump { border-color: #bd8b37; box-shadow: inset 0 0 0 2px #f2c66d, 0 2px 4px #150e16aa; }
.playing-card span { font: 24px Georgia, serif; line-height: .86; }
.card-pair > .playing-card { position: absolute; top: 0; left: 0; }
.card-pair > .cover-card { top: 16px; left: 12px; }
.card-hand { display: flex; align-items: start; flex-wrap: wrap; gap: 5px; min-height: 72px; }
.card-hand .playing-card[aria-pressed='true'] { outline: 2px solid #95efd0; outline-offset: -2px; background: #d2f0df; }
.card-hand .playing-card.legal { border-bottom: 4px solid #60ac89; }
.card-hand .playing-card:disabled { filter: brightness(.78) saturate(.74); cursor: default; }
.card-table button.playing-card { outline: 2px solid #a6f7d9; outline-offset: 2px; }
.turn-message { margin-block: 9px; min-height: 46px; color: #fff0cf; }
.turn-message p { color: #d5c8d3; font-size: 13px; }
.hint-text { margin-top: 7px; color: #b8eed8; }
.durak-result { margin-top: 12px; padding: 12px; border: 1px solid #ba8b67; border-radius: 9px; background: #3a2935; }
.durak-result p { margin-block: 5px 9px; color: #f3dbbf; }
.card-table .playing-card:focus-visible { outline-color: #ffe1a6; }
@media (max-width: 520px) {
  .durak-main { padding-top: 12px; }
  .green-table { padding: 7px; }
  .card-table { grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); }
  .card-pair { width: 52px; height: 81px; }
  .card-pair > .cover-card { left: 8px; }
  .playing-card { width: 44px; height: 64px; }
  .cabin-window { display: none; }
}