/* Mobil: mere plads til selve spillet. Desktop og pokerbordets originale CSS bevares. */
.abc-game .abc-mobile-menu,
.abc-game .abc-room-toggle,
.sea-mobile-tabs {
  display: none;
}
@media (max-width: 800px) {
  .abc-game main.abc-game-main {
    padding: 8px;
  }
  .abc-game .abc-game-header {
    min-height: 36px;
    gap: 6px;
    flex-direction: row;
    align-items: center;
  }
  .abc-game .abc-brand {
    font-size: 18px;
  }
  .abc-game .abc-game-modes {
    gap: 2px;
    width: auto;
  }
  .abc-game .abc-game-modes a {
    min-height: 36px;
    padding: 7px 8px;
    font-size: 11px;
  }
  .abc-game .abc-game-intro {
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 5px 0 10px;
  }
  .abc-game .abc-game-heading {
    flex: 1;
  }
  .abc-game .abc-game-intro h1 {
    font-size: 23px;
    line-height: 1.15;
    letter-spacing: -0.5px;
  }
  .abc-game .abc-game-intro :is(.abc-eyebrow, .abc-game-description) {
    display: none;
  }
  .abc-game .abc-mobile-menu {
    display: inline-flex;
    flex: none;
    min-height: 44px;
    font-size: 11px;
    padding: 9px 10px;
  }
  .abc-game .abc-game-tools {
    display: contents;
  }
  .abc-game .abc-game-tools > * {
    display: none;
  }
  .abc-game .abc-game-tools > #undoBtn {
    display: inline-flex;
    min-height: 44px;
    padding: 9px 10px;
    font-size: 11px;
  }
  .abc-game .abc-menu-open .abc-game-tools {
    display: flex;
    position: absolute;
    top: 100%;
    right: 0;
    width: min(270px, 100%);
    max-width: none;
    padding: 10px;
    border: 1px solid #72947d;
    border-radius: 12px;
    background: #183d30;
    box-shadow: 0 12px 30px #0008;
    z-index: 30;
  }
  .abc-game .abc-menu-open .abc-game-tools > * {
    display: inline-flex;
    width: 100%;
    min-height: 44px;
  }
  .abc-game :is(.panel, .lobby-panel) {
    padding: 10px;
    margin: 8px 0;
    border-radius: 13px;
  }
  .abc-game :is(.panel, .lobby-panel) > :is(h2, h3) {
    margin-bottom: 8px;
    font-size: 18px;
  }
  .abc-game :is(#status, #message, #msg):not(:empty) {
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.45;
    margin-block: 6px;
  }
  .abc-game :is(.controls, .actions) {
    gap: 6px;
  }
  .abc-game.abc-in-game
    :is(
      .rules-short,
      .abc-game-content > footer,
      .abc-game-content > .rules,
      #game > .panel.muted
    ) {
    display: none;
  }
  .abc-game.abc-in-game #game > .panel > .players + p {
    margin: 4px 0 0;
    font-size: 11px;
  }
  .abc-game.abc-in-game:not(.abc-game--poker) :is(.players, .player-grid) {
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 4px;
    margin-top: 0;
  }
  .abc-game.abc-in-game:not(.abc-game--poker) :is(.player, .player-box) {
    padding: 6px 4px;
    font-size: 10px;
    line-height: 1.3;
    border-radius: 8px;
    overflow-wrap: anywhere;
  }
  .abc-game.abc-in-game:not(.abc-game--poker) :is(.player, .player-box) p {
    font-size: 10px;
    margin: 2px 0;
  }
  /* Ludo: alle fire spillere, bræt og terning tæt sammen. */
  .abc-game--ludo .room-bar {
    font-size: 10px;
    margin-bottom: 6px !important;
    gap: 5px;
  }
  .abc-game--ludo .players {
    margin-bottom: 6px;
  }
  .abc-game--ludo .player {
    gap: 4px;
  }
  .abc-game--ludo .player strong {
    font-size: 10px;
  }
  .abc-game--ludo .player > div {
    min-width: 0;
  }
  .abc-game--ludo .player :is(strong, small) {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .abc-game--ludo .player .color-dot {
    width: 8px;
    height: 8px;
  }
  .abc-game--ludo .game-layout {
    gap: 6px;
  }
  .abc-game--ludo .board-caption {
    display: none;
  }
  .abc-game--ludo .game-controls {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 5px 8px;
    margin: 0;
    padding: 8px;
  }
  .abc-game--ludo #turnLabel {
    display: none;
  }
  .abc-game--ludo .game-controls .die {
    grid-row: 1 / span 2;
    width: 48px;
    height: 48px;
    font-size: 30px;
  }
  .abc-game--ludo .game-controls #status {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    padding: 5px 8px;
    min-height: 0;
  }
  .abc-game--ludo .game-controls #roll {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
  }
  .abc-game--ludo #turnHint {
    font-size: 10px;
    margin: 0;
  }
  .abc-game--ludo .game-controls details {
    font-size: 11px;
    margin: 0;
  }
  .abc-game--ludo #moveChoices:empty {
    display: none;
  }
  /* Yatzy: kast og hold kan betjenes, mens man vælger længere nede i pointtavlen. */
  .abc-game.abc-in-game .abc-room-toggle {
    display: inline-flex;
    min-height: 36px;
    padding: 5px 9px;
    font-size: 11px;
    margin-bottom: 6px;
  }
  .abc-game.abc-in-game .abc-collapsible:not(.abc-room-expanded) {
    display: none;
  }
  .abc-game--yatzy #players small {
    font-size: 9px;
  }
  .abc-game--yatzy #last:empty {
    display: none;
  }
  .abc-game--yatzy #last {
    font-size: 11px;
    margin: 4px 0;
  }
  .abc-game--yatzy #dicePanel {
    position: sticky;
    top: 4px;
    z-index: 12;
    background: #173e31;
    box-shadow: 0 6px 15px #0006;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 8px;
  }
  .abc-game--yatzy #dicePanel h2 {
    grid-column: 1/-1;
    font-size: 14px;
    margin: 0;
  }
  .abc-game--yatzy #dicePanel .hint {
    display: none;
  }
  .abc-game--yatzy .dice {
    gap: 6px;
    margin: 0;
  }
  .abc-game--yatzy .die {
    width: 38px;
    height: 38px;
    font-size: 24px;
  }
  .abc-game--yatzy #roll {
    max-width: 108px;
    min-height: 44px;
    padding: 7px 8px;
    font-size: 12px;
  }
  .abc-game--yatzy #scores {
    min-width: 100%;
    font-size: 11px;
  }
  .abc-game--yatzy #scores :is(th, td) {
    padding: 6px 3px;
  }
  .abc-game--yatzy #scores :is(th, td):first-child {
    min-width: 90px;
  }
  .abc-game--yatzy #scores button {
    min-height: 40px;
    min-width: 40px;
    padding: 6px;
    font-size: 12px;
    scroll-margin-top: 130px;
  }
  /* Korthånden får én række frem for flere høje rækker. */
  .abc-game--uno .ucard {
    width: 62px;
    height: 90px;
    min-width: 62px;
  }
  .abc-game--uno .controls:has(> .ucard[data-card]),
  .abc-game--uno .hand:has(> .mp-card),
  .abc-game--500 :is(#game, #room) .hand:has(> .card),
  .abc-game--sorteper .mine .cards {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 5px 3px 8px;
    min-height: 0;
  }
  .abc-game--500 :is(#game, #room) .hand > .card:not(.small),
  .abc-game--sorteper .mine .card {
    width: 62px;
    height: 92px;
    flex: 0 0 62px;
    font-size: 18px;
  }
  .abc-game--500 :is(#game, #room) .hand > .card:not(.small) .center-suit,
  .abc-game--sorteper .mine .card .symbol {
    font-size: 32px;
  }
  .abc-game--500 #game .hand:empty,
  .abc-game--500 #game p:has(+ .hand:empty),
  .abc-game--500 #newround:disabled,
  .abc-game--poker #deal:disabled {
    display: none;
  }
  .abc-game--uno .mp-card {
    width: 62px;
    height: 90px;
    min-width: 62px;
    flex: 0 0 62px;
  }
  .abc-game--500 #room > .panel p {
    font-size: 12px;
    margin: 5px 0;
  }
  .abc-game--sorteper .opponents {
    gap: 4px;
  }
  .abc-game--sorteper .opponent {
    padding: 6px;
  }
  .abc-game--sorteper .opponent .name {
    font-size: 11px;
    margin-bottom: 4px;
  }
  .abc-game--sorteper .opponent:not(.target) .cards {
    display: none;
  }
  .abc-game--sorteper .opponent.target {
    grid-column: 1/-1;
    grid-row: 1;
  }
  .abc-game--sorteper .center {
    margin: 5px 0;
    gap: 6px;
  }
  .abc-game--sorteper .discard {
    padding: 4px 8px;
    font-size: 11px;
  }
  .abc-game--sorteper .discard strong {
    font-size: 17px;
  }
  .abc-game--sorteper .mine {
    padding-top: 7px;
  }
  .abc-game--sorteper .mine h2 {
    font-size: 15px;
    margin: 3px 0;
  }
  .abc-game--blackjack.abc-in-game #setup {
    display: none;
  }
  .abc-game--blackjack .hand {
    margin: 6px 0;
  }
  .abc-game--blackjack #game .panel:last-child p {
    display: none;
  }
  .abc-game--hearts #setup .rowline > span {
    font-size: 11px;
  }
  .abc-game--hearts #game > .panel.rowline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }
  .abc-game--hearts .seat {
    min-width: 0;
    padding: 5px;
    font-size: 11px;
  }
  .abc-game--hearts .seat :is(small, .tiny) {
    font-size: 10px;
  }
  .abc-game--hearts .hand:has([data-play]) {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 8px 3px;
  }
  .abc-game--hearts [data-play] {
    flex: 0 0 57px;
  }
  .abc-game--hearts [data-play] .card {
    width: 57px;
    height: 84px;
  }
  .abc-game--31 .center-table {
    margin: 8px 0;
  }
  .abc-game--31 .your-area {
    margin: 6px 0;
    padding: 8px;
  }
  .abc-game--31 .hand-header h2 {
    font-size: 16px;
    margin: 4px 0;
  }
  .abc-game--31 .actions {
    margin: 6px 0;
  }
  /* Samme pokerbord, med mindre lodret luft på telefonen. */
  .abc-game--poker #setup {
    padding: 6px 8px;
  }
  .abc-game--poker #setup .rowline > span {
    font-size: 10px;
  }
  .abc-game--poker .poker-felt,
  .abc-game--poker #table .poker-felt {
    min-height: 420px;
    height: 420px;
    aspect-ratio: auto;
  }
  .abc-game--poker #table[data-opponents="5"] .poker-felt,
  .abc-game--poker #table[data-opponents="6"] .poker-felt,
  .abc-game--poker #table[data-opponents="7"] .poker-felt {
    height: 520px;
    min-height: 520px;
  }
  .abc-game--poker
    #table:is([data-opponents="5"], [data-opponents="6"], [data-opponents="7"])
    .poker-players
    .seat {
    width: 58px;
  }
  .abc-game--poker
    #table:is([data-opponents="5"], [data-opponents="6"], [data-opponents="7"])
    .poker-players
    .seat
    .card {
    width: 21px;
    height: 31px;
  }
  .abc-game--poker
    #table:is([data-opponents="5"], [data-opponents="6"], [data-opponents="7"])
    .poker-players
    .seat
    .card
    + .card {
    margin-left: -8px;
  }
  .abc-game--poker
    #table:is([data-opponents="5"], [data-opponents="6"], [data-opponents="7"])
    .poker-players
    .seat
    strong {
    max-width: 58px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .abc-game--poker .poker-table-shell {
    margin: 8px auto 10px;
  }
  .abc-game--poker .poker-actions {
    margin: 6px 0;
    padding: 8px;
  }
  .abc-game--poker .hand-badge {
    padding: 7px;
    font-size: 12px;
  }
  .abc-game--poker .hand-hint {
    padding: 7px;
    margin-bottom: 6px;
    font-size: 12px;
  }
  .abc-game--poker .hand-hint small {
    display: none;
  }
  .abc-game--poker .poker-actions .controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .abc-game--poker .poker-actions .abc-button {
    min-width: 0;
    padding: 7px 5px;
    font-size: 11px;
  }
  /* De nye dueller: kun ét havkort ad gangen, vælg med mobilfanerne. */
  .duel-room-bar {
    font-size: 10px;
    margin-bottom: 6px;
  }
  .duel-players {
    margin-bottom: 6px;
    gap: 6px;
  }
  .duel-player {
    padding: 7px 9px;
  }
  .duel-status {
    padding: 8px 10px;
    font-size: 12px;
    margin-bottom: 8px;
  }
  .connect-guide {
    display: none;
  }
  .connect-layout,
  .sea-battle {
    grid-template-columns: minmax(0, 1fr);
  }
  .connect-board-wrap {
    padding-bottom: 16px;
  }
  .sea-mobile-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
  }
  .sea-mobile-tabs .abc-button {
    flex: 1;
    min-height: 44px;
    padding: 8px;
  }
  .sea-mobile-tabs [aria-pressed="true"] {
    background: #edcf8a;
    color: #17372b;
  }
  .sea-battle > section {
    margin: 0 !important;
  }
  .sea-battle > section:last-child {
    display: none;
  }
  .sea-show-own .sea-battle > section:first-child {
    display: none;
  }
  .sea-show-own .sea-battle > section:last-child {
    display: block;
  }
  .sea-heading {
    margin-bottom: 8px;
  }
  .sea-heading .abc-eyebrow {
    display: none;
  }
  .sea-heading h2 {
    font-size: 19px;
  }
  .sea-placement {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .sea-placement > .sea-panel,
  .sea-placement > .fleet-controls {
    display: contents;
  }
  .sea-placement .sea-heading,
  .sea-placement .fleet-controls > :is(h2, .abc-eyebrow, .hint:not(#fleet-hint)) {
    display: none;
  }
  .sea-placement .fleet-picker {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    order: 1;
    margin: 0;
    width: 100%;
  }
  .sea-placement .fleet-choice {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 5px 2px;
    min-height: 56px;
    text-align: center;
  }
  .sea-placement .fleet-choice .ship-model {
    height: 22px;
  }
  .sea-placement .fleet-choice strong {
    font-size: 9px;
  }
  .sea-placement .fleet-choice small {
    display: none;
  }
  .sea-placement .fleet-map-tools {
    order: 2;
    width: 100%;
    margin: 0;
  }
  .sea-placement .sea-map {
    order: 3;
  }
  .sea-placement .fleet-tools {
    order: 4;
  }
  .sea-placement #fleet-hint {
    order: 5;
    font-size: 11px;
    margin: 0;
  }
  .sea-placement #fleet-ready {
    order: 6;
  }
}
@media (max-width: 360px) {
  .abc-game .abc-brand {
    font-size: 16px;
  }
  .abc-game .abc-game-modes a {
    padding-inline: 6px;
    font-size: 10px;
  }
  .abc-game--yatzy .dice {
    gap: 4px;
  }
  .abc-game--yatzy .die {
    width: 32px;
    height: 32px;
  }
  .abc-game--yatzy #roll {
    max-width: 90px;
  }
}
