/* game.css: retained cascade position */ /* Match table: compact turn header, tactile dice, persistent inventory and score ledger. */
.screen-game .dice-item-picker {
  width: 100%;
  margin-top: 20px;
  text-align: left;
}
.screen-game .dice-item-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}
.screen-game .dice-item-heading > div > span {
  color: #e4c282;
  font-size: 12px;
}
.screen-game .dice-item-heading h3 {
  margin-top: 4px;
  color: #f3e5ca;
  font-size: 22px;
}
.screen-game .dice-item-heading p {
  margin-top: 6px;
  color: #ded6c5;
  font-size: 13px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.screen-game .item-cancel {
  min-height: 44px;
  padding: 8px 14px;
  flex-shrink: 0;
  border: 1px solid #9b8359;
  border-radius: 5px;
  background: #101c20;
  color: #f1dfbb;
}
.screen-game .item-direction {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.screen-game .item-direction-button {
  flex: 1;
  min-height: 44px;
  padding: 8px;
  background: #111e24;
  color: #e9dfc9;
  border: 1px solid #9b8359;
  border-radius: 5px;
}
.screen-game .item-direction-button[aria-pressed='true'],
.screen-game .hand .item-card[aria-pressed='true'] {
  background: #3b3220;
  color: #f1d399;
  border-color: #e4c282;
}
.screen-game .item-dice-labels {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 10px;
  color: #ded6c5;
  font-size: 12px;
}
.screen-game .item-dice-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(3px, 1vw, 12px);
}
.screen-game .item-die-choice {
  display: flex;
  min-width: 0;
  padding: 12px 5px 8px;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: 2px solid transparent;
  border-radius: 9px;
  background: #0d2523b3;
  color: #f1dfbb;
}
.screen-game .item-die-choice[aria-pressed='true'] {
  background: #3b3220;
  border-color: #e4c282;
}
.screen-game .item-die-choice:focus-visible {
  outline-color: #ffe1a2;
  outline-offset: 2px;
}
.screen-game .item-die-choice:disabled {
  opacity: 1;
  color: #c4c4bb;
}
.screen-game .item-die-choice:disabled .item-die-face {
  opacity: 0.5;
}
.screen-game .item-die-number {
  min-height: 18px;
  font-size: 12px;
}
.screen-game .item-die-face {
  display: grid;
  place-items: center;
  width: min(100%, 72px);
  aspect-ratio: 1;
  padding: 12%;
  flex-shrink: 0;
  border-radius: 10px;
  background: radial-gradient(ellipse at 30% 10%, #fff5dc, #e6d4af);
  border: 1px solid #dfcca3;
  box-shadow: 0 3px 0 #ab9468;
  color: #344448;
  font-size: 24px;
}
.screen-game .item-die-face .pip {
  width: 65%;
  height: auto;
  aspect-ratio: 1;
}
.screen-game .item-die-face.small {
  width: min(100%, 40px);
  padding: 7px;
  border-radius: 6px;
  box-shadow: none;
}
.screen-game .item-die-change {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #f1d399;
}
.screen-game .item-die-unavailable {
  min-height: 40px;
  display: grid;
  place-items: center;
}
.screen-game .item-die-state {
  font-size: 11px;
  min-height: 32px;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}
.screen-game .item-change-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 92px;
  padding: 14px 0;
  gap: 5px;
  text-align: center;
  color: #e9dfc9;
  font-size: 13px;
}
.screen-game .item-change-summary strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  color: #f1d399;
}
.screen-game .item-apply {
  width: 100%;
  min-height: 48px;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #e4c282;
  background: #d8b473;
  color: #201c15;
  font-size: 16px;
}
.screen-game .item-apply-note {
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  color: #ded6c5;
}
@media (max-width: 600px) {
  .screen-game .dice-item-heading h3 {
    font-size: 19px;
  }
  .screen-game .item-dice-labels {
    font-size: 11px;
  }
  .screen-game .item-die-choice {
    padding: 8px 1px;
    gap: 8px;
  }
  .screen-game .item-die-face {
    max-width: 48px;
    padding: 15%;
    border-radius: 6px;
  }
  .screen-game .item-die-face.small {
    max-width: 32px;
    padding: 5px;
  }
  .screen-game .item-die-change {
    font-size: 12px;
  }
  .screen-game .item-die-unavailable {
    min-height: 32px;
  }
}
body[data-screen='game']:before {
  background: #081013 var(--art-shop-background) center/cover no-repeat;
}
body[data-screen='game']:after {
  background: linear-gradient(90deg, #02090ca6, #03080cb5 65%, #090605aa);
}
.screen-game {
  --match-gold: #bb965b;
  --match-surface: #0b141cf0;
}
.screen-game #main {
  width: 100%;
  max-width: 1760px;
  flex: 1;
  padding: 18px clamp(18px, 3.2vw, 60px) 24px;
}
.screen-game .game-top {
  position: relative;
  top: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(120px, 1fr);
  gap: 22px;
  align-items: center;
  min-height: 58px;
  margin: 0 0 15px;
  padding: 0;
  background: none;
  border: 0;
  backdrop-filter: none;
}
.match-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}
.screen-game .section-label {
  font:
    700 clamp(17px, 1.4vw, 23px) / 1.4 'Noto Serif KR',
    Batang,
    serif;
  max-width: 100%;
  margin: 0;
  color: #f2dfbb;
}
.screen-game .game-mode {
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font-size: 11px;
  color: #d3c5af;
}
.match-turn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
}
.screen-game .game-top h1 {
  font:
    700 clamp(23px, 2.1vw, 34px) / 1.3 'Noto Serif KR',
    Batang,
    serif;
  color: #f6e8c9;
  max-width: 320px;
  overflow-wrap: anywhere;
}
.screen-game .turn-clock {
  gap: 15px;
  margin: 0;
}
.screen-game .turn-clock > span {
  font-size: 13px;
  color: #e5d5b7;
  max-width: none;
  white-space: nowrap;
}
.screen-game .turn-clock > strong {
  font-size: 32px;
  color: #f0c67d;
  min-width: 67px;
}
.screen-game .turn-clock .urgent {
  color: #ffab92;
}
.clock-state {
  font-size: 11px;
  color: #e9bd8a;
  flex-basis: 100%;
  text-align: center;
  margin-top: -18px;
}
.game-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  --settings-size: 50px;
}
.game-tools .lobby-tools {
  position: static;
}
.game-tools > .quiet {
  min-width: 72px;
  border: 1px solid #97794c;
  background: #11151bd9;
  color: #e6c78e;
}
.screen-game .game-players {
  grid-template-columns: repeat(var(--players), minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.screen-game .mini-player {
  gap: 15px;
  padding: 12px 18px;
  background: linear-gradient(115deg, #0b161ce8, #091017e8);
  border: 1px solid #9a7c4e;
  border-radius: 6px;
  min-height: 86px;
  box-shadow: inset 0 0 0 1px #e3bd6520;
}
.screen-game .mini-player.active {
  background: linear-gradient(120deg, #28251de8, #0d151ae8);
  border-color: #e8c47d;
  box-shadow:
    inset 0 0 0 1px #e4bc68aa,
    0 0 12px #d49f351a;
}
.screen-game .mini-player strong {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  font-size: 17px;
  color: #f5e4c5;
}
.screen-game .participant-name {
  overflow-wrap: anywhere;
  min-width: 0;
}
.screen-game .mini-player small {
  font-size: 11px;
  color: #ccbfa6;
  margin-top: 5px;
}
.screen-game .mini-player strong small {
  margin: 0;
  padding: 2px 7px;
  border: 1px solid #807048;
  border-radius: 3px;
  font-size: 10px;
  color: #e4c992;
  line-height: 1.5;
}
.screen-game .mini-player .self-tag {
  border-color: #527e77;
  background: #183936;
  color: #a6d9ce;
}
.screen-game .mini-player .bot-badge {
  font-size: 9px;
  font-family: 'Malgun Gothic', sans-serif;
}
.screen-game .mini-player > b {
  font-size: 31px;
  font-weight: 600;
  color: #f3e5ca;
}
.screen-game .mini-player > b small {
  display: inline;
  font-size: 12px;
  margin-left: 4px;
}
.screen-game .mini-player .avatar {
  width: 60px;
  height: 60px;
  border-width: 2px;
}
.match-profile {
  padding: 0;
  line-height: 0;
  border-radius: 50%;
  flex-shrink: 0;
}
.screen-game .effect-tag {
  font-size: 11px;
  color: #f0b598;
}
.screen-game .game-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(410px, 1fr);
  gap: 20px;
  align-items: stretch;
}
.screen-game .play-column {
  gap: 12px;
}
.screen-game .dice-board {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 355px;
  padding: 24px 26px 28px;
  border: 7px ridge #745135;
  border-radius: 22px;
  background: #07362e var(--art-felt) center/cover;
  box-shadow:
    inset 0 0 0 2px #b49152,
    inset 0 0 0 6px #051410,
    inset 0 8px 25px #000a,
    0 0 0 1px #b28a4f,
    0 8px 25px #0007;
}
.screen-game .board-top {
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0;
  color: #ebdcb9;
}
.screen-game .board-top h2 {
  font:
    700 25px/1.3 'Noto Serif KR',
    Batang,
    serif;
}
.screen-game .board-top b {
  font-size: 21px;
}
.screen-game .dice-row {
  gap: clamp(15px, 2vw, 32px);
  margin: 0;
  padding: 48px 0 40px;
  flex: 1;
  align-items: center;
  min-height: 150px;
}
.screen-game .die {
  width: clamp(65px, 6.2vw, 104px);
  height: clamp(69px, 6.6vw, 110px);
  padding: 16px;
  border: 1px solid #dfcca3;
  border-bottom: 6px solid #ab9468;
  border-radius: 14px;
  background: radial-gradient(ellipse at 30% 10%, #fff5dc, #e6d4af);
  color: #344448;
  box-shadow:
    inset 0 0 0 3px #fff4d399,
    0 8px 9px #0007;
}
.screen-game .die.held {
  outline: 2px solid #efc56e;
  outline-offset: 4px;
  translate: 0 -5px;
  box-shadow:
    inset 0 0 0 2px #ffedb888,
    0 0 14px #ecb64466,
    0 8px 9px #0007;
}
.screen-game .die.stuck {
  outline: 3px dashed #e2a273;
  outline-offset: 4px;
}
.screen-game .die.unrolled {
  opacity: 0.65;
  font-size: 36px;
}
.screen-game .pip {
  width: clamp(7px, 1vw, 14px);
  height: clamp(7px, 1vw, 14px);
  background: #1c3035;
  box-shadow:
    inset 0 1px 2px #000c,
    0 1px 1px #fff8;
}
.screen-game .die small {
  top: calc(100% + 14px);
  font-size: 11px;
  line-height: 22px;
}
.screen-game .die.held small,
.screen-game .die.stuck small {
  left: 1px;
  right: 1px;
  background: #12251e;
  border: 1px solid #cba04f;
  border-radius: 4px;
  color: #ffe7ae;
}
.screen-game .dice-hint {
  font-size: 12px;
  margin: 4px 0 18px;
  min-height: 0;
  color: #e4dbc7;
}
.screen-game .yacht-bonus-preview {
  margin: 0 0 14px;
  padding: 8px 12px;
  border: 1px solid #bd9556;
  border-radius: 6px;
  background: #10261fde;
  color: #ffe0a0;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.roll-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}
.screen-game .game-plaque {
  position: relative;
  isolation: isolate;
  min-height: 58px;
  width: min(100%, 410px);
  padding: 10px 22px;
  font:
    700 clamp(19px, 1.6vw, 27px) / 1.4 'Noto Serif KR',
    Batang,
    serif;
  color: #f8e7c3;
  background: linear-gradient(120deg, #164b43, #092b28);
  border: 2px solid #bd9556;
  box-shadow: inset 0 0 0 3px #0a171a;
}
.game-plaque > .button-art {
  display: none;
  position: absolute;
  pointer-events: none;
  max-width: none;
  z-index: -1;
  left: -1.4925373134%;
  top: -41.2213740458%;
  width: 102.8917910448%;
  height: 181.4249363868%;
}
.screen-game .game-plaque.art-ready {
  border: 0;
  background: none;
  box-shadow: none;
}
.game-plaque.art-ready > .button-art {
  display: block;
}
.screen-game .game-plaque:disabled {
  opacity: 1;
  color: #c2bba8;
}
.game-plaque:disabled > .button-art {
  filter: saturate(0.12) brightness(0.55);
}
.record-hint {
  font-size: 11px;
  color: #d3c7aa;
}
.screen-game .current-effect {
  margin-top: 12px;
  padding: 7px 10px;
  font-size: 12px;
  background: #11190bc7;
  border-color: #ba985f;
  color: #f2d9a4;
}
.screen-game .insurance-tag {
  font-size: 12px;
  margin-top: 18px;
}
.screen-game .drafting {
  min-height: 0;
  padding-bottom: 16px;
}
.screen-game .drafting .dice-row {
  flex: 0 0 auto;
  padding: 22px 0 25px;
  min-height: 0;
}
.screen-game .drafting .die {
  width: 58px;
  height: 61px;
  font-size: 28px;
}
.screen-game .draft-panel {
  border: 1px solid #9c8251;
  border-radius: 10px;
  background: #051410a3;
  box-shadow: 0 3px 15px #0003;
}
.screen-game .panel-heading {
  padding: 12px 15px;
  border-bottom: 0;
  gap: 10px;
}
.screen-game .panel-heading h2 {
  font:
    700 21px/1.4 'Noto Serif KR',
    Batang,
    serif;
  color: #f1dfbb;
}
.screen-game .panel-heading small {
  font-size: 10px;
  color: #c7c0b0;
}
.screen-game .count {
  font:
    400 14px 'Malgun Gothic',
    sans-serif;
  color: #dbbc7e;
}
.screen-game .draft-cards {
  padding: 0 13px 8px;
  gap: 12px;
}
.screen-game .item-card {
  background: linear-gradient(130deg, #172029eb, #0c141bed);
  border: 1px solid #92794c;
  border-radius: 7px;
  gap: 8px;
}
.screen-game .item-card:disabled {
  opacity: 1;
  background: linear-gradient(130deg, #111b23eb, #0b1118ed);
  color: #e5dccb;
}
.game-item-icon {
  position: relative;
  border: 0 !important;
  background: none !important;
  flex-shrink: 0;
  isolation: isolate;
}
.game-item-art {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  inset: 0;
  z-index: 1;
  opacity: 0;
}
.game-item-icon.art-ready .game-item-art {
  opacity: 1;
}
.game-item-icon.art-ready .item-symbol {
  visibility: hidden;
}
.screen-game .draft-cards .item-card {
  align-items: center;
  text-align: center;
  padding: 10px 12px;
}
.screen-game .draft-cards .game-item-icon {
  width: 90px;
  height: 90px;
}
.screen-game .item-card strong {
  display: block;
  font:
    700 17px/1.4 'Noto Serif KR',
    Batang,
    serif;
  color: #f3e5cb;
  overflow-wrap: anywhere;
}
.screen-game .item-card .item-description {
  display: block;
  font-size: 11px;
  line-height: 1.65;
  color: #d5cec0;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.screen-game .draft-cards .item-description {
  flex: 1;
}
.item-select {
  display: block;
  border: 1px solid #bf995b;
  background: #0b3934;
  color: #f0dfb8;
  border-radius: 4px;
  padding: 6px 12px;
  width: 100%;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
}
.draft-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 13px 7px;
}
.draft-footer > span {
  font-size: 10px;
  line-height: 1.6;
  color: #bdbaa9;
  text-align: right;
}
.screen-game .draft-footer .text-button {
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
}
.screen-game .hand-panel,
.screen-game .activity {
  background: var(--match-surface);
  border: 1px solid #8b744d;
  border-radius: 7px;
}
.screen-game .hand {
  padding: 0 12px 12px;
  gap: 10px;
}
.screen-game .hand .item-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 8px;
  min-height: 122px;
}
.screen-game .hand .game-item-icon {
  width: 48px;
  height: 48px;
  margin-top: 3px;
}
.item-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.screen-game .hand .item-card strong {
  font-size: 15px;
}
.screen-game .hand .item-card .item-description {
  font-size: 10px;
  line-height: 1.6;
}
.screen-game .item-availability {
  display: block;
  font-size: 10px;
  color: #c5b69e;
  line-height: 1.5;
  margin-top: auto;
}
.screen-game .item-availability.available {
  align-self: flex-start;
  padding: 3px 13px;
  background: #124239;
  border: 1px solid #8c9e70;
  border-radius: 3px;
  color: #e4dfba;
}
.empty-item-slot {
  min-height: 122px;
  display: grid;
  place-items: center;
  border: 1px dashed #b9a16c35;
  border-radius: 6px;
  color: #8e918860;
  font-size: 11px;
}
.screen-game .activity summary {
  padding: 12px 16px;
  color: #ddbf80;
  font-size: 12px;
}
.screen-game .activity > div {
  max-height: 140px;
}
.screen-game .score-panel {
  background: linear-gradient(135deg, #0d1721f5, #080f16f7);
  border: 1px solid #b18d51;
  border-radius: 7px;
  box-shadow: 0 6px 20px #0005;
  align-self: start;
  scroll-margin-top: 15px;
}
.screen-game .score-heading {
  padding: 11px 17px;
  border-color: #b8995744;
}
.screen-game .score-heading h2 {
  font:
    700 25px/1.3 'Noto Serif KR',
    Batang,
    serif;
  color: #f5e4bf;
}
.screen-game .score-heading small {
  font-size: 10px;
  color: #d6bf93;
  white-space: nowrap;
}
.screen-game .score-scroll table {
  min-width: 400px;
  font-size: 13px;
}
.screen-game .score-scroll th,
.screen-game .score-scroll td {
  height: 34px;
  padding: 2px 5px;
  border-color: #ad9a7140;
}
.screen-game .score-scroll th:first-child {
  width: 140px;
  padding-left: 12px;
  background: #0d1922;
  color: #f0e4cc;
  font-size: 11px;
}
.screen-game .score-scroll [data-score-category] > th {
  font-size: 13px;
}
.screen-game .score-scroll thead th {
  height: 49px;
  background: #101f29;
  color: #e7d5ae;
  font-size: 12px;
}
.screen-game .score-scroll thead th:first-child {
  background: #101f29;
}
.screen-game .score-scroll .current-col {
  background: #16312d66;
}
.screen-game .score-scroll thead .current-col {
  background: #293d32;
  color: #f3d394;
}
.screen-game .score-scroll .category-face {
  width: 17px;
  height: 18px;
  border-color: #957741;
  background: #392b15;
  color: #f7d78e;
  margin-right: 7px;
}
.screen-game .score-scroll .bot-badge {
  font-size: 8px;
}
.screen-game .score-scroll .section-start th,
.screen-game .score-scroll .section-start td,
.screen-game .score-scroll .subtotal th,
.screen-game .score-scroll .subtotal td {
  border-top: 1px solid #b29052;
}
.screen-game .score-choice {
  min-height: 28px;
  border: 1px solid #9d865552;
  background: linear-gradient(#b4964e15, #b4964e05);
  font-size: 13px;
  color: #f5ce80;
  border-radius: 4px;
}
.screen-game .score-choice.positive {
  border-color: #c69f57;
  background: #bd934514;
}
.screen-game .score-choice:hover:not(:disabled) {
  background: #b28a4c44;
}
.screen-game .score-choice:focus-visible {
  outline-offset: -2px;
}
.screen-game .recorded-score {
  color: #f3ebdb;
  font-weight: 600;
}
.screen-game .preview {
  color: #ceb780;
}
.screen-game .blank {
  color: #8b9495;
}
.sealed-score {
  font-size: 11px;
  color: #e5a88e;
}
.screen-game .score-scroll .score-summary th,
.screen-game .score-scroll .score-summary td {
  height: 27px;
  font-size: 10px;
  background: #111b22;
}
.screen-game .score-scroll tfoot th,
.screen-game .score-scroll tfoot td {
  height: 44px;
  background: #1c3e38;
  color: #f8d58a;
  font-size: 20px;
}
.screen-game .score-scroll tfoot th {
  font:
    700 16px 'Noto Serif KR',
    Batang,
    serif;
}
.screen-game .score-note {
  padding: 9px 13px;
  font-size: 9px;
  line-height: 1.5;
  color: #bab29e;
  margin: 0;
}
@media (min-width: 901px) and (max-height: 820px) {
  .screen-game #main {
    padding-top: 10px;
    padding-bottom: 14px;
  }
  .screen-game .game-top {
    min-height: 45px;
    margin-bottom: 9px;
  }
  .screen-game .game-players {
    margin-bottom: 12px;
    gap: 12px;
  }
  .screen-game .mini-player {
    padding: 8px 13px;
    min-height: 68px;
  }
  .screen-game .mini-player .avatar {
    width: 46px;
    height: 46px;
  }
  .screen-game .mini-player strong {
    font-size: 14px;
  }
  .screen-game .mini-player > b {
    font-size: 26px;
  }
  .screen-game .game-top h1 {
    font-size: 26px;
  }
  .screen-game .turn-clock > strong {
    font-size: 28px;
  }
  .game-tools {
    --settings-size: 44px;
  }
  .screen-game .dice-board {
    min-height: 295px;
    padding: 17px 20px 22px;
  }
  .screen-game .dice-row {
    padding: 30px 0 36px;
  }
  .screen-game .die {
    width: 70px;
    height: 75px;
    padding: 12px;
  }
  .screen-game .drafting .dice-row {
    padding: 14px 0 18px;
  }
  .screen-game .drafting .die {
    width: 46px;
    height: 49px;
    font-size: 24px;
  }
  .screen-game .draft-cards .game-item-icon {
    width: 64px;
    height: 64px;
  }
  .screen-game .draft-cards .item-card {
    padding: 8px;
    gap: 5px;
  }
  .screen-game .draft-cards .item-card strong {
    font-size: 15px;
  }
  .screen-game .draft-cards .item-description {
    font-size: 10px;
  }
  .screen-game .score-heading {
    padding: 9px 15px;
  }
  .screen-game .score-heading h2 {
    font-size: 22px;
  }
  .screen-game .score-scroll thead th {
    height: 42px;
  }
  .screen-game .score-scroll th,
  .screen-game .score-scroll td {
    height: 29px;
  }
  .screen-game .score-choice {
    min-height: 25px;
    font-size: 12px;
  }
  .screen-game .score-scroll .score-summary th,
  .screen-game .score-scroll .score-summary td {
    height: 23px;
  }
  .screen-game .score-scroll tfoot th,
  .screen-game .score-scroll tfoot td {
    height: 37px;
  }
  .screen-game .score-note {
    padding: 7px 12px;
  }
  .screen-game .hand .item-card,
  .empty-item-slot {
    min-height: 115px;
  }
  .screen-game .hand .game-item-icon {
    width: 40px;
    height: 40px;
  }
  .screen-game .hand .item-card {
    padding: 8px 6px;
  }
  .screen-game .hand .item-card strong {
    font-size: 13px;
  }
  .screen-game .panel-heading {
    padding: 9px 13px;
  }
  .screen-game .panel-heading h2 {
    font-size: 19px;
  }
  .screen-game .activity summary {
    padding: 10px 14px;
  }
}
@media (min-width: 901px) and (max-width: 1200px) {
  .screen-game .game-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(380px, 1fr);
    gap: 14px;
  }
  .screen-game .dice-board {
    padding-left: 16px;
    padding-right: 16px;
  }
  .screen-game .die {
    width: 60px;
    height: 65px;
    padding: 11px;
  }
  .screen-game .dice-row {
    gap: 16px;
  }
  .screen-game .hand .item-card {
    flex-direction: column;
  }
  .screen-game .hand .game-item-icon {
    width: 42px;
    height: 42px;
  }
  .screen-game .mini-player {
    padding: 9px;
    gap: 8px;
  }
  .screen-game .mini-player .avatar {
    width: 44px;
    height: 44px;
  }
  .screen-game .mini-player strong {
    font-size: 13px;
  }
  .screen-game .mini-player > b {
    font-size: 24px;
  }
  .screen-game .mini-player small {
    font-size: 9px;
  }
  .screen-game .score-scroll th:first-child {
    width: 121px;
    padding-left: 8px;
  }
  .screen-game .score-scroll table {
    min-width: 370px;
  }
  .match-heading {
    gap: 2px;
  }
  .screen-game .game-top {
    gap: 15px;
  }
  .match-turn {
    gap: 12px;
  }
  .screen-game .game-top h1 {
    font-size: 24px;
  }
  .screen-game .turn-clock {
    gap: 8px;
  }
  .game-tools {
    gap: 12px;
  }
}
@media (max-width: 900px) {
  html:has(body[data-screen='game']) {
    scroll-padding-bottom: 90px;
  }
  .screen-game [data-action] {
    scroll-margin-bottom: 90px;
  }
  .screen-game #main {
    padding: 14px 18px 100px;
  }
  .screen-game .game-top {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 16px;
    margin-bottom: 14px;
  }
  .match-heading {
    gap: 10px;
  }
  .match-turn {
    grid-row: 2;
    grid-column: 1/-1;
    justify-content: flex-start;
    gap: 16px;
  }
  .game-tools {
    grid-column: 2;
    grid-row: 1;
    gap: 12px;
    --settings-size: 42px;
  }
  .screen-game .game-top h1 {
    font-size: 26px;
    max-width: none;
  }
  .screen-game .turn-clock > strong {
    font-size: 28px;
  }
  .clock-state {
    flex-basis: auto;
    margin: 0;
  }
  .screen-game .game-players {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .screen-game .mini-player {
    padding: 10px 13px;
    gap: 10px;
    min-height: 76px;
  }
  .screen-game .mini-player .avatar {
    width: 46px;
    height: 46px;
  }
  .screen-game .mini-player strong {
    font-size: 15px;
  }
  .screen-game .mini-player > b {
    font-size: 26px;
  }
  .screen-game .game-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .screen-game .dice-board {
    min-height: 350px;
  }
  .screen-game .die {
    width: 82px;
    height: 87px;
    padding: 14px;
  }
  .screen-game .dice-row {
    gap: 26px;
  }
  .screen-game .pip {
    width: 10px;
    height: 10px;
  }
  .screen-game .score-panel {
    scroll-margin-top: 14px;
  }
  .screen-game .score-scroll {
    max-height: min(75dvh, calc(100dvh - 155px));
  }
  .screen-game .score-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
  }
  .screen-game .score-scroll thead th:first-child {
    z-index: 3;
  }
  .screen-game .score-scroll th,
  .screen-game .score-scroll td {
    height: 44px;
  }
  .screen-game .score-choice {
    min-height: 37px;
  }
  .screen-game .score-scroll thead th {
    height: 56px;
  }
  .screen-game .score-scroll .score-summary th,
  .screen-game .score-scroll .score-summary td {
    height: 31px;
  }
  .screen-game .mobile-actions {
    display: flex;
    position: fixed;
    z-index: 25;
    bottom: 0;
    left: 0;
    right: 0;
    gap: 12px;
    padding: 10px 18px max(10px, env(safe-area-inset-bottom));
    background: #0c151ef5;
    border-top: 1px solid #91794d;
    backdrop-filter: blur(10px);
  }
  .screen-game .mobile-actions button {
    flex: 1;
    min-width: 0;
    font-size: 13px;
  }
}
@media (max-width: 600px) {
  .screen-game #main {
    padding: 12px 12px 96px;
  }
  .screen-game .game-top {
    gap: 8px;
    margin-bottom: 12px;
  }
  .screen-game .section-label {
    font-size: 15px;
  }
  .screen-game .game-mode {
    font-size: 9px;
  }
  .match-heading {
    display: block;
  }
  .screen-game .section-label {
    margin-bottom: 2px;
    max-width: 190px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .game-tools {
    --settings-size: 37px;
    gap: 10px;
  }
  .game-tools > .quiet {
    min-width: 52px;
    min-height: 37px;
    padding: 6px;
    font-size: 11px;
  }
  .screen-game .game-top h1 {
    font-size: 23px;
    max-width: 190px;
  }
  .match-turn {
    gap: 12px;
    justify-content: space-between;
  }
  .screen-game .turn-clock {
    gap: 8px;
  }
  .screen-game .turn-clock > span {
    font-size: 10px;
  }
  .screen-game .turn-clock > strong {
    font-size: 27px;
    min-width: 52px;
  }
  .clock-state {
    width: 100%;
    text-align: left;
  }
  .screen-game .game-players {
    gap: 8px;
    margin-bottom: 13px;
  }
  .screen-game .mini-player {
    gap: 6px;
    padding: 9px 8px;
    min-height: 77px;
    align-items: flex-start;
    position: relative;
  }
  .screen-game .mini-player .avatar {
    width: 34px;
    height: 34px;
  }
  .screen-game .mini-player > div {
    padding-bottom: 22px;
  }
  .screen-game .mini-player strong {
    font-size: 12px;
    gap: 3px 5px;
  }
  .screen-game .mini-player strong small,
  .screen-game .mini-player .bot-badge {
    font-size: 8px;
    padding: 1px 4px;
  }
  .screen-game .mini-player small {
    font-size: 9px;
  }
  .screen-game .mini-player > b {
    position: absolute;
    left: 48px;
    bottom: 6px;
    font-size: 20px;
  }
  .screen-game .mini-player > b small {
    font-size: 10px;
  }
  .screen-game .effect-tag {
    font-size: 9px;
  }
  .screen-game .dice-board {
    padding: 15px 12px 22px;
    min-height: 292px;
    border-width: 5px;
    border-radius: 15px;
  }
  .screen-game .board-top h2 {
    font-size: 20px;
  }
  .screen-game .board-top {
    font-size: 10px;
  }
  .screen-game .board-top b {
    font-size: 17px;
  }
  .screen-game .dice-row {
    gap: 13px;
    padding: 35px 0 38px;
    min-height: 130px;
  }
  .screen-game .die {
    width: 48px;
    height: 53px;
    padding: 8px;
    border-radius: 9px;
    border-bottom-width: 4px;
  }
  .screen-game .pip {
    width: 6px;
    height: 6px;
  }
  .screen-game .die.unrolled {
    font-size: 25px;
  }
  .screen-game .die small {
    font-size: 9px;
    top: calc(100% + 9px);
    line-height: 18px;
  }
  .screen-game .dice-hint {
    font-size: 10px;
    margin: 3px 0 15px;
  }
  .screen-game .game-plaque {
    min-height: 48px;
    width: 90%;
    font-size: 20px;
  }
  .roll-controls {
    gap: 10px;
  }
  .record-hint {
    font-size: 10px;
  }
  .screen-game .drafting {
    min-height: 0;
    padding: 15px 9px 12px;
  }
  .screen-game .drafting .dice-row {
    gap: 15px;
    padding: 17px 0 20px;
  }
  .screen-game .drafting .die {
    width: 43px;
    height: 46px;
  }
  .screen-game .draft-panel {
    background: #071710b3;
  }
  .screen-game .draft-panel .panel-heading {
    flex-wrap: wrap;
    padding: 10px 11px;
    gap: 3px;
  }
  .screen-game .panel-heading h2 {
    font-size: 19px;
  }
  .screen-game .panel-heading small {
    font-size: 9px;
  }
  .screen-game .draft-cards {
    grid-template-columns: 1fr;
    padding: 0 9px 7px;
    gap: 8px;
  }
  .screen-game .draft-cards .item-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 43px;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 8px;
    row-gap: 3px;
    text-align: left;
    padding: 10px 8px;
  }
  .screen-game .draft-cards .game-item-icon {
    grid-row: 1/3;
    width: 54px;
    height: 54px;
  }
  .screen-game .draft-cards .item-card strong {
    font-size: 16px;
  }
  .screen-game .draft-cards .item-description {
    grid-column: 2;
    grid-row: 2;
    font-size: 10px;
  }
  .screen-game .item-select {
    grid-column: 3;
    grid-row: 1/3;
    font-size: 11px;
    padding: 9px 3px;
    text-align: center;
    margin: 0;
  }
  .draft-footer {
    padding: 0 7px 5px;
    gap: 8px;
  }
  .draft-footer > span {
    font-size: 9px;
  }
  .screen-game .hand {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0 11px 12px;
  }
  .screen-game .hand .item-card {
    flex-direction: row;
    min-height: 0;
    padding: 11px;
    gap: 12px;
  }
  .screen-game .hand .game-item-icon {
    width: 53px;
    height: 53px;
  }
  .screen-game .hand .item-card strong {
    font-size: 16px;
  }
  .screen-game .hand .item-card .item-description {
    font-size: 11px;
  }
  .screen-game .empty-item-slot {
    display: none;
  }
  .screen-game .hand > .muted {
    font-size: 11px;
    padding: 3px;
  }
  .screen-game .current-effect {
    font-size: 10px;
  }
  .screen-game .insurance-tag {
    font-size: 10px;
  }
  .screen-game .score-heading {
    padding: 13px;
  }
  .screen-game .score-heading h2 {
    font-size: 22px;
  }
  .screen-game .score-heading small {
    font-size: 9px;
  }
  .screen-game .score-scroll th:first-child {
    width: 130px;
  }
  .screen-game .score-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
  }
  .screen-game .score-scroll thead th:first-child {
    z-index: 3;
  }
  .screen-game .score-scroll {
    max-height: min(75dvh, calc(100dvh - 155px));
  }
  .screen-game .score-note {
    font-size: 9px;
  }
}
@media (max-width: 360px) {
  .screen-game .dice-row {
    gap: 10px;
  }
  .screen-game .die {
    width: 43px;
    height: 47px;
    padding: 7px;
  }
  .screen-game .pip {
    width: 5px;
    height: 5px;
  }
  .screen-game .drafting .dice-row {
    gap: 11px;
  }
  .screen-game .drafting .die {
    width: 38px;
    height: 42px;
  }
  .screen-game .draft-cards .item-card {
    grid-template-columns: 44px minmax(0, 1fr) 36px;
    gap: 3px 6px;
  }
  .screen-game .draft-cards .game-item-icon {
    width: 44px;
    height: 44px;
  }
  .screen-game .draft-cards .item-card strong {
    font-size: 14px;
  }
  .screen-game .mini-player .avatar {
    width: 28px;
    height: 28px;
  }
  .screen-game .mini-player > b {
    left: 42px;
  }
  .screen-game .mini-player > div {
    min-width: 0;
  }
  .screen-game .mini-player small {
    font-size: 8px;
  }
}
