/* Shared expedition chrome: safe areas, touch targets, and a bounded game surface. */
.lobby {
  padding: 36px 0;
  gap: 35px;
}
.lobby-panel {
  background: linear-gradient(140deg, #1c3738, #000f08);
  border-color: #8baaad40;
  border-radius: 12px;
}
.lobby .class-card {
  position: relative;
  text-align: center;
  background: linear-gradient(150deg, #1c3738, #000f08);
  border-color: #ffffff25;
  border-radius: 10px;
  padding: 24px 14px;
}
.lobby .class-card.chosen {
  background: linear-gradient(150deg, #4d4847, #1c3738);
  border-color: var(--gold);
  box-shadow:
    inset 0 0 0 1px var(--gold),
    0 6px 20px #0004;
}
.lobby .class-card.chosen:after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 12px;
  color: var(--gold);
}
.lobby .class-symbol {
  display: flex;
  justify-content: center;
}
.lobby .class-card p,
.lobby .class-card small {
  font-size: 14px;
  line-height: 1.5;
}
.lobby label {
  font-size: 14px;
}
.lobby-panel .muted {
  font-size: 16px;
}
.room-bar {
  padding: 14px 0;
  font-size: 14px;
}
.party .player {
  background: #1c3738;
  border-radius: 8px;
}
.playing > main {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  grid-template-rows: 56px minmax(0, 1fr);
  background: radial-gradient(ellipse at 50% 15%, #1c3738, transparent 70%), #000f08;
}
.game-rail {
  background: linear-gradient(#1c3738, #000f08);
  border-bottom-color: #8baaad44;
  gap: 10px;
}
.rail-icon {
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 11px;
  border-radius: 8px;
}
.rail-icon:hover {
  color: var(--gold);
}
.playing .obstacle-stage {
  background: radial-gradient(ellipse at center, #8baaad0d, transparent 65%);
}
.playing .middle-rail {
  background: linear-gradient(#1c3738, #000f08);
  border-color: #8baaad55;
  box-shadow:
    0 -5px 25px #0003,
    0 8px 25px #0004;
}
.playing .roll-center .roll-button {
  border-radius: 9px;
  box-shadow:
    inset 0 1px #ffffff55,
    0 3px 0 #0005;
}
.playing .hand-zone {
  background: radial-gradient(ellipse at bottom, #8baaad33, transparent 75%), #000f0888;
}
.playing .context-actions,
.playing .hand-actions > .context-actions {
  background-color: #1c3738;
}
.playing .hand-head h2 {
  color: var(--gold);
}
.roll-notice {
  background: #1c3738;
  font-size: 14px;
}
.custom-modal {
  border-color: #8baaad55;
  border-radius: 14px;
}
.custom-modal .learn-playground {
  margin-bottom: 28px;
}
.custom-modal .lesson-1,
.custom-modal .practice-boss {
  grid-template-columns: 1fr;
}
.custom-modal .lesson-tabs button {
  padding: 10px 8px;
  font-size: 13px;
  flex-direction: column;
  align-items: start;
}
@media (max-width: 900px) {
  .game-rail .rail-progress,
  .game-rail .rail-boss,
  .game-rail .rail-brand {
    display: none;
  }
  .game-rail {
    gap: 8px;
    padding-inline: max(8px, env(safe-area-inset-left));
  }
  .rail-menu {
    min-width: 0;
    flex: 1 1 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .rail-menu .rail-icon {
    flex: 0 0 48px;
  }
}
@media (max-width: 600px) {
  .lobby {
    padding-top: 16px;
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .lobby .class-grid {
    grid-template-columns: 1fr 1fr;
  }
  .lobby .class-card {
    padding: 18px 12px;
  }
  .lobby-panel {
    padding: 22px;
  }
  .playing .middle-rail {
    grid-template-columns: repeat(4, minmax(48px, 1fr));
    gap: 6px;
    padding: 6px 10px;
  }
  .playing .middle-rail .roll-center {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .playing .middle-rail .skill {
    height: 54px;
    grid-row: 1;
  }
  .playing .middle-rail .skill small {
    font-size: 12px;
  }
  .playing .roll-center .roll-button {
    min-height: 48px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 18px;
  }
  .playing .roll-conditions {
    font-size: 12px;
  }
  .playing .play-board {
    grid-template-rows: minmax(135px, 1fr) auto minmax(180px, 40%);
  }
  .playing .obstacle-stage {
    padding-inline: 8px;
  }
  .playing .hand-head > button,
  .hand-actions > summary {
    min-height: 44px;
    display: grid;
    place-items: center;
  }
  .playing .hand-zone {
    grid-template-rows: 44px minmax(0, 1fr);
  }
  .modal-overlay {
    padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  }
  .custom-modal {
    width: 100%;
    max-height: 100%;
  }
}
@media (max-height: 650px) {
  body.playing {
    overflow: auto;
  }
  .playing > main {
    min-height: 650px;
    height: auto;
    overflow: visible;
  }
  .playing .play-board {
    min-height: 594px;
  }
}
/* Mint reference dialogs keep dense rule text readable. */
.custom-modal {
  background: #f4fff8;
  color: #1c3738;
}
.custom-modal .modal-header,
.custom-modal .modal-footer {
  background: #8baaad;
  border-color: #1c373830;
}
.custom-modal .modal-close,
.custom-modal .modal-footer button:not(.primary) {
  color: #1c3738;
  border-color: #1c373840;
}
.custom-modal .modal-body a {
  color: #1c3738;
}
.custom-modal .modal-body input {
  background: #f4fff8;
  color: #1c3738;
}
.custom-modal label {
  color: #4d4847;
}
.custom-modal .rules-guide {
  color: #1c3738;
}
.custom-modal .rules-guide p,
.custom-modal .rules-guide dd {
  color: #1c3738;
}
.custom-modal .learn-playground {
  color: var(--paper);
}
.custom-modal .learn-playground label {
  color: var(--muted);
}
