:root {
  font-family:
    system-ui,
    -apple-system,
    "Noto Sans TC",
    sans-serif;
  color: #eef5e9;
  background: #101e24;
  color-scheme: dark;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
button,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #52646a;
  background: #24343b;
  color: #f2f5ec;
  border-radius: 10px;
  padding: 12px 16px;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  background: #36484d;
}
button:active {
  transform: translateY(2px);
}
button:focus-visible {
  outline: 3px solid #c4fb60;
  outline-offset: 3px;
}
button.primary {
  background: #c4fb60;
  color: #172523;
  border-color: #c4fb60;
  font-weight: 800;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
#battle-top {
  position: fixed;
  top: env(safe-area-inset-top);
  left: env(safe-area-inset-left);
  right: env(safe-area-inset-right);
  pointer-events: none;
}
header {
  position: relative;
  top: auto;
  left: 0;
  right: 0;
  padding: 12px 18px 10px;
  background: linear-gradient(#101e24e8, #101e2499, transparent);
  display: flex;
  align-items: center;
  gap: 22px;
  pointer-events: none;
}
header[hidden] {
  display: none;
}
header button {
  pointer-events: auto;
  padding: 10px 13px;
}
.vital {
  width: 140px;
}
.vital b {
  font-size: 14px;
}
.bar {
  height: 5px;
  background: #5f4142;
  margin-top: 6px;
  border-radius: 4px;
  overflow: hidden;
}
.bar i {
  height: 100%;
  display: block;
  background: #b6f463;
  transition: width 0.2s;
}
.wave {
  display: grid;
  gap: 2px;
}
.wave small {
  color: #bcf57c;
  letter-spacing: 2px;
  font-size: 10px;
}
.wave b {
  font-size: 16px;
}
.clock {
  margin-left: auto;
  display: grid;
  text-align: right;
}
.clock b {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}
.clock small {
  font-size: 12px;
  color: #e9c880;
}
#xp {
  position: fixed;
  top: 0px;
  height: 3px;
  width: 100%;
  background: #172327;
}
#xp i {
  display: block;
  background: #70dab9;
  height: 100%;
  width: 0;
}
#notice {
  position: fixed;
  top: 110px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 2px 5px #000;
  pointer-events: none;
  white-space: nowrap;
}
#hint {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: #fffbea;
  text-shadow: 0 1px 3px #33452b;
  white-space: nowrap;
  pointer-events: none;
}
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #263c386b;
  padding: 24px;
  overflow: auto;
}
.overlay:empty {
  display: none;
}
.panel {
  max-width: 740px;
  width: 100%;
  margin: auto;
  padding: 34px;
  background: linear-gradient(150deg, #25383df5, #12242af8);
  border: 1px solid #536365;
  border-radius: 22px;
  box-shadow: 0 22px 100px #0008;
}
.eyebrow {
  color: #c5ef87;
  font-size: 12px;
  letter-spacing: 3px;
  font-weight: 700;
}
.panel h1 {
  font-size: clamp(30px, 5vw, 46px);
  margin: 12px 0 8px;
  letter-spacing: -1px;
}
.panel h2 {
  margin: 8px 0 14px;
  font-size: 28px;
}
.panel p {
  color: #b4c4c5;
  font-size: 14px;
  line-height: 1.8;
  margin: 8px 0 20px;
}
.characters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 22px 0;
}
.character {
  padding: 10px 5px 14px;
  display: flex;
  align-items: center;
  flex-direction: column;
  border-color: #46565a;
  background: #172a30;
}
.character.selected {
  border: 2px solid #c4fb60;
  background: #30432f;
  padding: 9px 4px 13px;
}
.character b {
  font-size: 15px;
}
.character small {
  font-size: 12px;
  color: #b4c4c5;
  margin-top: 6px;
}
.portrait {
  width: 100px;
  height: 100px;
  background-size: 400% 200%;
  image-rendering: pixelated;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.actions .primary {
  flex: 1;
}
.footnote {
  font-size: 12px;
  color: #829d9f;
  margin-top: 20px;
}
.badge {
  color: #142621;
  background: #a3e4c6;
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 1px;
  font-size: 11px;
  margin-left: 8px;
}
.choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.choice {
  text-align: left;
  min-height: 155px;
}
.choice b {
  display: block;
  font-size: 18px;
  color: #d4f7ac;
  margin-bottom: 12px;
}
.choice small {
  line-height: 1.6;
  font-size: 14px;
  color: #bdcfcf;
}
.metrics {
  display: flex;
  gap: 24px;
  margin: 20px 0;
}
.metrics b {
  display: block;
  font-size: 30px;
  color: #c4fb60;
}
.metrics small {
  color: #a3b5b7;
}
.settings {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  color: #c1d0cf;
  margin: 20px 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 20px 0;
}
td,
th {
  padding: 10px 5px;
  text-align: left;
  border-bottom: 1px solid #40545a;
}
th {
  color: #b7d898;
}
select {
  border: 1px solid #5e7377;
  border-radius: 6px;
  padding: 5px;
  background: #20373d;
}
.settings input {
  accent-color: #bdf563;
}
@media (max-width: 600px) {
  header {
    gap: 12px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .vital {
    width: 95px;
  }
  .wave b {
    font-size: 14px;
  }
  .clock b {
    font-size: 20px;
  }
  .panel {
    padding: 22px 16px;
    border-radius: 16px;
  }
  .overlay {
    padding: 14px;
  }
  .portrait {
    width: 70px;
    height: 70px;
  }
  .characters {
    gap: 6px;
  }
  .character b {
    font-size: 13px;
  }
  .character small {
    font-size: 11px;
  }
  .choices {
    grid-template-columns: 1fr;
  }
  .choice {
    min-height: auto;
    padding: 16px;
  }
  .choice b {
    font-size: 16px;
    margin-bottom: 5px;
  }
  .choice small {
    font-size: 13px;
  }
  #hint {
    bottom: 20px;
    left: 14px;
    transform: none;
    font-size: 11px;
    max-width: 65%;
    white-space: normal;
  }
  .footnote {
    font-size: 11px;
  }
  .panel h1 {
    font-size: 30px;
  }
}
:root {
  --portrait-size: 108px;
}
.work-summary {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 14px;
  background: #10272b;
  border-radius: 10px;
  font-size: 16px;
}
.work-summary b {
  color: #ffe299;
}
.work-section {
  border-top: 1px solid #4c6564;
  padding: 18px 0;
}
.work-section h3 {
  margin: 0;
  font-size: 20px;
}
.work-section h3 span {
  float: right;
  font-size: 14px;
  color: #bef584;
}
.work-section p {
  font-size: 14px;
  margin: 8px 0 14px;
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.work-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 10px;
  padding: 16px;
  min-width: 0;
}
.work-card b {
  font-size: 18px;
}
.work-card small {
  font-size: 14px;
  color: #a4d8e2;
}
.work-card strong {
  color: #d2fa91;
  font-size: 17px;
}
.work-card span {
  font-size: 14px;
  line-height: 1.5;
}
.work-card em {
  margin-top: auto;
  font-style: normal;
  font-size: 14px;
  color: #ffe09b;
  padding-top: 8px;
}
.work-card.free {
  border-color: #97c967;
  background: #2b412f;
}
.work-card:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.equipped-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.equipped-list span {
  background: #152a30;
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
}
.equipped-list b {
  color: #c4fb60;
}
.work-footer {
  position: sticky;
  bottom: -34px;
  background: #152a2af5;
  padding: 14px 0;
  display: grid;
  gap: 8px;
}
.work-footer small {
  font-size: 14px;
  color: #b8cbc7;
}
@media (max-width: 600px) {
  .work-grid {
    grid-template-columns: 1fr;
  }
  .work-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
  }
  .work-card small,
  .work-card span {
    grid-column: 1 / -1;
  }
  .work-card b {
    font-size: 17px;
  }
  .work-card em {
    grid-column: 1 / -1;
  }
  .work-footer {
    bottom: -22px;
  }
  .work-section h3 {
    font-size: 18px;
  }
}
#weapons {
  position: relative;
  margin: 0 12px;
  display: flex;
  gap: 6px;
  pointer-events: none;
  flex-wrap: wrap;
}
#weapons[hidden] {
  display: none;
}
.weapon-slot {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #10232bd9;
  border: 1px solid #63816688;
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 14px;
}
.weapon-slot > span:first-child {
  font-size: 24px;
}
.weapon-slot small {
  display: block;
  color: #c4fb60;
  font-size: 12px;
}
.sound-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.sound-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.sound-controls input {
  max-width: 130px;
}
.sound-controls small {
  width: 100%;
  color: #bdd5c8;
  font-size: 14px;
}
.pause-reason {
  border-left: 3px solid #c4fb60;
  padding-left: 12px;
}
#notice {
  top: calc(155px + env(safe-area-inset-top));
  max-width: 94vw;
  white-space: normal;
  text-align: center;
}
.overlay {
  z-index: 3;
}
@media (max-width: 540px) {
  #weapons {
    gap: 4px;
  }
  .weapon-slot {
    padding: 4px;
    font-size: 12px;
  }
  .weapon-slot > span:first-child {
    font-size: 20px;
  }
}
.panel {
  min-width: 0;
  max-height: calc(var(--game-height, 100dvh) - 32px);
  overflow: auto;
}
.characters {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.character {
  min-width: 0;
  overflow: hidden;
  justify-content: center;
}
.character b,
.character small {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}
.portrait {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, var(--portrait-size));
  height: auto;
  aspect-ratio: 1;
  flex: none;
  background: none !important;
  overflow: hidden;
}
.portrait img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}
.portrait:empty::after {
  content: "…";
  color: #b1caab;
  font-size: 24px;
}
.actions > * {
  min-width: 0;
}
.badge {
  display: inline-block;
}
.eyebrow {
  overflow-wrap: anywhere;
}
.loot-key {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.loot-key span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #c7d9d2;
}
.loot-key img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: pixelated;
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}
@media (max-width: 540px) {
  .characters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .character {
    padding: 10px;
  }
  .character.selected {
    padding: 9px;
  }
  .portrait {
    width: 90px;
  }
  .character b {
    font-size: 15px;
  }
  .character small {
    font-size: 13px;
  }
  .panel {
    max-height: calc(var(--game-height, 100dvh) - 24px);
  }
  .actions button {
    flex: 1 1 120px;
  }
  .eyebrow {
    letter-spacing: 1px;
  }
}
.start-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.start-actions #start {
  flex: none;
  min-height: 56px;
  font-size: 18px;
  width: 100%;
}
.start-actions .rank-link {
  flex: none;
  align-self: flex-end;
  width: auto;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 14px;
  background: transparent;
  border-color: transparent;
  color: #b9cdce;
}
.start-actions .rank-link:hover {
  color: #d5f69e;
  border-color: #536b64;
}
.work-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.work-heading button {
  font-size: 14px;
  min-height: 44px;
}
.work-heading h2 {
  margin: 8px 0;
}
.work-steps {
  display: flex;
  gap: 16px;
  margin: 14px 0;
  color: #a0b5b7;
  font-size: 14px;
}
.work-steps .active {
  color: #c4fb60;
  font-weight: 800;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.stat-grid > div {
  background: #10272b;
  padding: 12px;
  border-radius: 10px;
  min-width: 0;
}
.stat-grid dt {
  font-size: 14px;
  color: #b4c4c5;
}
.stat-grid dd {
  font-size: 18px;
  color: #d2fa91;
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}
.info-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.info-list article {
  padding: 14px;
  background: #152a30;
  border-radius: 10px;
}
.info-list p {
  margin: 6px 0 0;
}
.info-list b {
  font-size: 16px;
}
#character-info {
  font-size: 14px;
  white-space: nowrap;
  min-height: 44px;
}
header button {
  min-height: 44px;
}
@media (max-width: 600px) {
  header {
    gap: 8px;
  }
  header button {
    padding: 8px;
  }
  .vital {
    width: 80px;
    flex-shrink: 1;
  }
  .wave {
    flex-shrink: 0;
  }
  .clock {
    min-width: 48px;
  }
  .work-steps {
    gap: 12px;
    flex-wrap: wrap;
  }
}
/* Expedition visual system: restrained chrome, readable illustrated inventory. */
:root {
  --lime: #c6f777;
  --gold: #e7c47c;
  --ink: #101c20;
  --edge: #40534d;
  color: #edf1e6;
  background: var(--ink);
}
.overlay {
  background: #061112ca;
  backdrop-filter: blur(3px);
}
.panel {
  background: linear-gradient(145deg, #253932, #152523 65%, #11201f);
  border-color: #62715b66;
  box-shadow: 0 24px 90px #0009;
  max-width: 820px;
}
.panel:has(.home-hero) {
  padding-top: 0;
}
.home-hero {
  position: relative;
  min-height: 225px;
  margin: 0 -34px 22px;
  padding: 100px 34px 24px;
  background: linear-gradient(90deg, #10221ced, #10221c30);
  border-bottom: 1px solid #bdcd8055;
}
.home-hero h1 {
  max-width: 360px;
  text-shadow: 0 2px 16px #10221c;
}
.home-hero p {
  max-width: 300px;
  margin-bottom: 0;
  color: #dae9cb;
}
.home-hero .eyebrow {
  color: #dcf7a5;
}
.characters {
  margin: 16px 0;
}
.character {
  background: #122620;
  border: 1px solid var(--edge);
  border-radius: 14px;
}
.character.selected {
  background: linear-gradient(#334d2e, #243b29);
  border-color: var(--lime);
}
.character small {
  color: #c4d0b7;
}
.class-detail {
  padding: 12px 16px;
  background: #0f211c;
  border-left: 3px solid var(--lime);
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}
.class-detail b {
  color: var(--lime);
  margin-right: 12px;
}
.more {
  width: 100%;
  margin: 8px 0;
  color: #b9c9bc;
  font-size: 13px;
  min-width: 0;
}
.more summary {
  cursor: pointer;
  min-height: 44px;
  display: list-item;
  align-content: center;
  padding: 10px 4px;
  color: #d0dbbc;
  line-height: 1.5;
}
.more summary:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}
.more[open] > summary {
  color: var(--lime);
}
.detail-body {
  padding: 0 4px 12px;
}
.detail-body p {
  font-size: 13px;
  line-height: 1.7;
  margin: 6px 0 10px;
}
.evolution-list {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  display: grid;
  gap: 10px;
}
.evolution-list li {
  color: #adbbb4;
  line-height: 1.7;
  font-size: 13px;
  border-left: 2px solid #425348;
  padding-left: 9px;
}
.evolution-list li b {
  display: block;
  color: #e4cb94;
}
.evolution-list li.unlocked {
  border-color: var(--lime);
  color: #e5eed9;
}
.work-summary {
  background: #0d201c;
  border: 1px solid #54654055;
  align-items: center;
  justify-content: space-between;
  font-variant-numeric: tabular-nums;
}
.work-steps {
  font-size: 13px;
  border-bottom: 1px solid var(--edge);
  padding-bottom: 12px;
}
.work-section {
  border-color: #62715b44;
}
.work-section h3 {
  margin-bottom: 12px;
}
.work-card {
  border: 1px solid #55684d80;
  border-radius: 14px;
  background: linear-gradient(155deg, #26392b, #182921);
  gap: 8px;
  position: relative;
  display: flex;
  align-items: stretch;
}
.work-card > b {
  font-size: 17px;
}
.work-card > small {
  font-size: 11px;
  color: #c6cea5;
  letter-spacing: 1px;
}
.work-card > span {
  color: #bbcab9;
  font-size: 13px;
}
.work-card > strong {
  color: var(--gold);
  font-size: 16px;
}
.work-card > .art-icon {
  width: 64px;
  height: 64px;
  align-self: flex-start;
}
.work-card .more {
  margin: 0;
}
.buy-action {
  width: 100%;
  margin-top: auto;
  background: #3a4a2a;
  border: 1px solid #82935a;
  color: #e5f2bf;
  font-weight: 700;
  font-size: 14px;
  min-height: 44px;
}
.buy-action:disabled {
  cursor: not-allowed;
  background: #1a2923;
  opacity: 0.6;
}
.work-card.free {
  background: linear-gradient(155deg, #344a2b, #203224);
  border-color: #9abb6577;
}
.work-grid {
  align-items: start;
}
.work-footer {
  background: #152523f5;
  border-top: 1px solid #596b4944;
  z-index: 1;
}
.work-footer small {
  font-size: 12px;
  color: #9fb096;
}
.art-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: pixelated;
  vertical-align: middle;
  display: inline-block;
  flex-shrink: 0;
}
.fallback {
  font-size: 30px;
  color: var(--gold);
}
.weapon-slot {
  background: #10231bdb;
  border-color: #89a75b55;
  border-radius: 10px;
}
.weapon-slot .art-icon {
  width: 30px;
  height: 30px;
}
.info-list .art-icon {
  width: 40px;
  height: 40px;
}
.stat-grid > div,
.info-list article {
  background: #11271e;
  border: 1px solid #52644744;
}
.quiet {
  font-size: 12px !important;
  color: #9bb09b !important;
}
.guide-art {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}
.guide-list {
  display: grid;
  gap: 12px;
}
.guide-list dt {
  color: #e2d29d;
  font-weight: 700;
}
.guide-list dd {
  margin: 4px 0;
  color: #b9c9bc;
}
.settings {
  font-size: 13px;
}
.sound-controls small {
  font-size: 12px;
}
.panel h2 {
  font-size: 26px;
}
@media (max-width: 600px) {
  .home-hero {
    margin: 0 -16px 16px;
    padding: 85px 16px 20px;
    min-height: 210px;
    background-position: 60% center;
  }
  .home-hero h1 {
    font-size: 30px;
    max-width: 220px;
  }
  .home-hero p {
    max-width: 190px;
    font-size: 13px;
  }
  .work-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 5px 14px;
    padding: 14px;
  }
  .work-card > .art-icon {
    grid-column: 1;
    grid-row: 1 / 4;
    align-self: center;
  }
  .work-card > b,
  .work-card > small,
  .work-card > strong {
    grid-column: 2;
  }
  .work-card > span:not(.art-icon),
  .work-card > .more,
  .work-card > .buy-action {
    grid-column: 1 / -1;
  }
  .work-card > span:not(.art-icon) {
    margin-top: 5px;
  }
  .characters {
    gap: 8px;
  }
  .portrait {
    width: 78px;
  }
  .character {
    padding: 8px;
  }
  .character.selected {
    padding: 7px;
  }
  .class-detail {
    font-size: 13px;
  }
  .work-heading h2 {
    font-size: 23px;
  }
  .panel {
    border-radius: 16px;
  }
  .work-section {
    padding: 16px 0;
  }
  .art-icon {
    max-width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  button,
  .bar i {
    transition: none;
  }
}
/* Compact selection: all actions remain touch-sized; art no longer drives card height. */
.panel {
  padding: 20px;
  max-width: 820px;
}
.panel:has(.home-hero) {
  padding-top: 0;
}
.home-hero {
  min-height: 110px;
  margin: 0 -20px 12px;
  padding: 20px;
  background-position: center 48%;
}
.home-hero h1 {
  font-size: 28px;
  max-width: none;
  margin: 6px 0;
}
.home-hero p {
  margin: 0;
  font-size: 12px;
}
.characters {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 10px 0;
  gap: 6px;
}
.portrait {
  width: 60px;
}
.character {
  padding: 6px 3px;
}
.character.selected {
  padding: 5px 2px;
}
.character b {
  font-size: 14px;
}
.character small {
  font-size: 11px;
  margin-top: 2px;
}
.class-detail {
  padding: 8px 10px;
  margin: 8px 0;
  font-size: 12px;
}
.start-actions #start {
  min-height: 44px;
  font-size: 16px;
}
.start-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.start-actions .rank-link {
  font-size: 12px;
  align-self: center;
  padding: 8px;
  min-height: 44px;
}
.settings {
  margin: 10px 0;
  gap: 12px;
}
.panel > .more {
  margin: 0;
}
.sound-controls {
  margin-top: 6px;
  gap: 6px;
}
.sound-controls small {
  display: none;
}
.work-heading h2 {
  font-size: 22px;
  margin: 4px 0;
}
.work-heading button {
  padding: 8px 10px;
  font-size: 12px;
}
.work-steps {
  margin: 4px 0 8px;
  padding-bottom: 6px;
  gap: 12px;
  font-size: 12px;
}
.work-summary {
  padding: 8px 10px;
  font-size: 14px;
}
.work-section {
  padding: 10px 0;
  border: 0;
}
.work-section h3 {
  font-size: 15px;
  margin: 0 0 6px;
}
.work-section h3 span {
  font-size: 11px;
}
.work-section + .work-section {
  padding-top: 2px;
}
.work-grid {
  grid-template-columns: 1fr;
  gap: 5px;
}
.work-card,
.work-card.free {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 40px 78px;
  grid-template-rows: auto auto;
  gap: 0 7px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 9px;
  min-height: 58px;
  background: #1b2e24;
}
.work-card > .art-icon {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 34px;
  height: 34px;
}
.work-card > b {
  grid-column: 2;
  grid-row: 1;
  font-size: 14px;
  line-height: 1.4;
}
.work-card > strong {
  grid-column: 2;
  grid-row: 2;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  color: #bfd99a;
}
.work-card > .more {
  grid-column: 3;
  grid-row: 1 / 3;
  margin: 0;
  align-self: stretch;
}
.work-card > .more > summary {
  min-height: 44px;
  list-style: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #bbcab9;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.work-card > .more > summary::-webkit-details-marker {
  display: none;
}
.work-card > .buy-action {
  grid-column: 4;
  grid-row: 1 / 3;
  width: 78px;
  min-height: 44px;
  margin: 0;
  padding: 6px 2px;
  font-size: 12px;
  border-radius: 7px;
}
.work-footer {
  padding: 8px 0;
  bottom: -20px;
}
.work-footer .primary {
  min-height: 44px;
  padding: 10px;
}
.stat-grid {
  gap: 6px;
  margin: 10px 0;
}
.stat-grid > div {
  padding: 8px;
}
.stat-grid dd {
  font-size: 16px;
}
.stat-grid dt {
  font-size: 12px;
}
.info-list {
  gap: 6px;
}
.info-list article {
  padding: 9px;
}
@media (min-width: 720px) {
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .work-card {
    grid-template-columns: 30px minmax(0, 1fr) 36px 74px;
    gap: 0 5px;
  }
  .work-card > .buy-action {
    width: 74px;
  }
}
@media (max-width: 600px) {
  .overlay {
    padding: 8px;
  }
  .panel {
    padding: 12px;
    max-height: calc(var(--game-height, 100dvh) - 16px);
    border-radius: 12px;
  }
  .home-hero {
    margin: 0 -12px 10px;
    padding: 16px 12px;
    min-height: 100px;
  }
  .home-hero h1 {
    font-size: 24px;
    max-width: none;
  }
  .home-hero p {
    font-size: 12px;
    max-width: none;
  }
  .eyebrow {
    font-size: 10px;
  }
  .portrait {
    width: 48px;
  }
  .character b {
    font-size: 13px;
  }
  .character small {
    font-size: 10px;
  }
  .characters {
    gap: 5px;
  }
  .work-heading h2 {
    font-size: 21px;
  }
  .work-footer {
    bottom: -12px;
  }
  .work-grid {
    grid-template-columns: 1fr;
  }
  .work-card,
  .work-card.free {
    gap: 0 5px;
    padding: 5px 6px;
    grid-template-columns: 30px minmax(0, 1fr) 38px 74px;
    min-height: 56px;
  }
  .work-card > .art-icon {
    width: 30px;
    height: 30px;
  }
  .work-card > .buy-action {
    width: 74px;
  }
  .work-card > b {
    font-size: 13px;
  }
  .work-card > strong {
    font-size: 11px;
  }
  .work-heading {
    gap: 6px;
  }
  .start-actions .rank-link {
    width: auto;
  }
  .actions.start-actions #start {
    width: 100%;
    flex: none;
  }
  .class-detail b {
    margin-right: 6px;
  }
}

/* Original round mascot proportions, clean 2D outlines. */
.portrait img,
.guide-roster img,
.guide-entry img {
  image-rendering: auto;
  object-fit: contain;
}
.home-hero {
  background: linear-gradient(110deg, #133626, #263e2a);
}
.guide-roster {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 4px 0 12px;
}
.guide-roster figure {
  margin: 0;
  text-align: center;
  background: #11271e;
  border-radius: 8px;
  padding: 4px;
}
.guide-roster img {
  display: block;
  width: 56px;
  height: 56px;
  max-width: 100%;
  margin: auto;
}
.guide-roster figcaption {
  font-size: 12px;
  color: #cfdec2;
}
.guide-entry {
  display: grid;
  grid-template-columns: 48px 1fr;
  column-gap: 8px;
  align-items: center;
}
.guide-entry img {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 48px;
  height: 48px;
}
.guide-entry dt,
.guide-entry dd {
  grid-column: 2;
}
.guide-entry dd {
  font-size: 12px;
}

/* Keep native details content in a full-width block; its internal wrapper must not become a grid cell. */
.work-card,
.work-card.free {
  --detail-width: 40px;
  --purchase-width: 78px;
  --card-inset: 8px;
  --control-gap: 7px;
  --control-top: 6px;
  grid-template-rows: auto auto auto;
}
.work-card > .more,
.work-card > .more[open] {
  display: block;
  grid-column: 1 / -1;
  grid-row: 3;
  min-width: 0;
  width: 100%;
  margin: 0;
  align-self: auto;
}
.work-card > .more > summary {
  position: absolute;
  top: var(--control-top);
  right: calc(var(--card-inset) + var(--purchase-width) + var(--control-gap));
  width: var(--detail-width);
  height: 44px;
  min-height: 44px;
}
.work-card > .more > .detail-body {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border-top: 1px solid #61735755;
  margin-top: 7px;
  padding: 8px 4px;
  white-space: normal;
  overflow-wrap: break-word;
}
.work-card > .more > .detail-body p,
.work-card > .more > .detail-body li {
  font-size: 14px;
  line-height: 1.7;
}
@media (min-width: 720px) {
  .work-card,
  .work-card.free {
    --detail-width: 36px;
    --purchase-width: 74px;
    --control-gap: 5px;
  }
}
@media (max-width: 600px) {
  .work-card,
  .work-card.free {
    --detail-width: 38px;
    --purchase-width: 74px;
    --card-inset: 6px;
    --control-gap: 5px;
    --control-top: 5px;
  }
}

#ultimate {
  position: fixed;
  right: 16px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 2;
  width: 76px;
  height: 76px;
  padding: 6px;
  border: 2px solid #638783;
  border-radius: 50%;
  background: #102c2fed;
  color: #aac5be;
  touch-action: none;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
#ultimate[hidden] {
  display: none;
}
#ultimate b {
  font-size: 14px;
}
#ultimate small {
  font-size: 13px;
}
#ultimate.ready {
  background: #30511df5;
  color: #e6ffbb;
  border-color: #c0ff64;
  box-shadow: 0 0 16px #b6ff6655;
}
#ultimate:disabled {
  opacity: 0.85;
  cursor: default;
}
/* One scroll owner: an expanded card must not scroll both panel and backdrop. */
:root {
  --overlay-inset: 24px;
}
.overlay {
  padding: var(--overlay-inset);
  overflow: hidden;
}
.panel {
  max-height: calc(var(--game-height, 100dvh) - 2 * var(--overlay-inset));
  overflow-anchor: none;
}
@media (max-width: 600px) {
  :root {
    --overlay-inset: 8px;
  }
}
#hint {
  max-width: calc(100% - 115px);
}

/* Emerald expedition: compact supplies, warm metal accents and readable choices. */
:root {
  --gold: #ead49a;
  --mint: #b7f27b;
}
.panel {
  background: linear-gradient(150deg, #24463df7, #122c29fa 60%, #122831fa);
  border-color: #789c7866;
  box-shadow:
    0 24px 80px #0009,
    inset 0 1px #d0e8ae22;
}
.home-hero {
  position: relative;
}
.home-hero .eyebrow {
  color: var(--gold);
}
.home-hero h1 {
  color: #f0f3d8;
  text-shadow: 0 3px #122e27;
}
.character.selected {
  border-color: var(--mint);
  box-shadow:
    inset 0 0 18px #b7f27b12,
    0 0 0 1px #b7f27b44;
}
button.primary {
  background: linear-gradient(#cdf982, #afe75c);
  box-shadow:
    inset 0 1px #efffcc77,
    0 3px 0 #496d2a;
}
.work-summary {
  border: 1px solid #769f6550;
}
.work-card {
  background: #102c24b8;
  border-color: #748a584d;
  box-shadow: inset 0 1px #b8d39309;
}
.supply-tabs {
  display: flex;
  gap: 6px;
  margin: 8px 0 10px;
}
.supply-tabs button {
  flex: 1;
  padding: 8px 10px;
  min-height: 40px;
  color: #b8c9b3;
  background: #102a29;
  border-color: #6f897c55;
}
.supply-tabs button.active {
  background: #354c2d;
  border-color: #b4d17a;
  color: #e1f6b8;
}
.work-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}
.work-footer .primary {
  flex: 1;
}
.work-footer .settle-link {
  flex: 0 0 auto;
  font-size: 12px;
  padding: 8px 4px;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: #afc3ac;
}
.relic-section h3 {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.relic-section h3 span {
  margin-left: auto;
}
#relic-refresh {
  padding: 6px 8px;
  min-height: 38px;
  font-size: 12px;
  color: #ead49a;
}
.relic-card {
  border-color: #cfb56755;
}
.relic-card > .relic-lock {
  grid-column: 1 / -1;
  grid-row: 4;
  justify-self: start;
  min-height: 32px;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  color: #a4b49d;
  background: #ffffff05;
  font-size: 11px;
}
.relic-card > .relic-lock.locked {
  color: #ead49a;
  background: #ead49a12;
}
.relic-lifetime {
  margin: 4px 0 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #d7d4b0;
}
.amulet-icon {
  display: inline-grid;
  place-items: center;
  font-size: 26px;
  line-height: 1;
  background: #d3b66a15;
  border: 1px solid #d3b66a55;
  border-radius: 9px;
}
.owned-relics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 8px;
}
.owned-relics > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border: 1px solid #bfa86e44;
  border-radius: 6px;
  font-size: 11px;
  color: #e0d3ad;
}
.owned-relics .art-icon,
.weapon-slot.relic-inventory .art-icon {
  width: 22px;
  height: 22px;
  font-size: 17px;
}
.weapon-slot.relic-inventory {
  gap: 4px;
  border-color: #cfb56755;
}
.weapon-slot.relic-inventory small {
  margin: 0;
  color: #ead49a;
}
.relic-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 5px 10px;
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.6;
}
.relic-facts dt {
  color: #dbcc9c;
}
.relic-facts dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: break-word;
}
.sound-controls {
  display: grid;
  gap: 8px;
  padding: 4px 0;
}
.sound-controls label {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.sound-controls input[type="range"] {
  width: 100%;
  min-width: 0;
  accent-color: #baff50;
}
.settings {
  flex-wrap: wrap;
}
.branch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.branch-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #95b87166;
  background: #112e28;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.branch-card > .art-icon {
  width: 48px;
  height: 48px;
  align-self: center;
}
.branch-card h3 {
  color: #e0edb7;
  font-size: 18px;
  margin: 8px 0 0;
}
.branch-card p {
  font-size: 13px;
  line-height: 1.6;
}
.branch-card > .more {
  margin-bottom: 12px;
}
.branch-card > button {
  margin-top: auto;
  min-height: 42px;
  padding: 9px;
}
.branch-card .detail-body {
  min-width: 0;
  overflow-wrap: break-word;
}
#ultimate.ready {
  background: radial-gradient(circle at 35% 25%, #4e7032, #173a2e);
  box-shadow:
    0 0 0 4px #b6ff6612,
    0 0 18px #b6ff6644;
}
@media (max-width: 600px) {
  .branch-grid {
    gap: 8px;
  }
  .branch-card {
    padding: 10px;
  }
  .branch-card h3 {
    font-size: 16px;
  }
  .work-footer {
    gap: 7px;
  }
  .work-footer .primary {
    min-width: 0;
  }
}

/* Six readable profession cards, retaining two rows on narrow screens. */
.characters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (min-width: 700px) {
  .characters {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

#healing {
  position: fixed;
  right: 104px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 2;
  width: 76px;
  height: 76px;
  padding: 6px;
  border: 2px solid #729c8b;
  border-radius: 18px;
  background: #173a2ded;
  color: #c2e6d0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
#healing[hidden] {
  display: none;
}
#healing b {
  font-size: 13px;
}
#healing small {
  font-size: 12px;
}
#healing.ready {
  border-color: #b4f691;
  box-shadow: 0 0 12px #a4f08044;
}
#healing.unavailable {
  opacity: 0.75;
}
.skill-change {
  font-size: 12px;
  color: #d4ecb1;
  line-height: 1.5;
  grid-column: 2/-1;
  margin: 4px 0;
}

#healing > * {
  pointer-events: none;
}

/* Game gestures must never invoke Safari text selection or long-press callouts. */
html,
body,
body * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
input,
textarea,
select,
[contenteditable="true"],
[contenteditable="true"] * {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}
img,
canvas {
  -webkit-user-drag: none;
}
button,
summary {
  touch-action: manipulation;
}
#ultimate,
#healing,
#game {
  touch-action: none;
}

/* One visible viewport for the canvas, HUD, menus and touch controls. */
#game-viewport {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
}
#game-viewport > #game,
#game-viewport > #battle-top,
#game-viewport > #xp,
#game-viewport > #notice,
#game-viewport > #hint,
#game-viewport > #overlay,
#game-viewport > #ultimate,
#game-viewport > #healing {
  position: absolute;
}
#game {
  top: 0;
  left: 0;
}
#ultimate {
  right: calc(16px + env(safe-area-inset-right));
}
#healing {
  right: calc(104px + env(safe-area-inset-right));
}

/* Explicit tracks prevent flex-basis from collapsing the primary menu action. */
.panel .actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  align-items: stretch;
}
.panel .actions > button,
.panel > button.primary {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  flex: none;
  white-space: normal;
  line-height: 1.4;
}
.display-settings {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: #ccddd0;
  font-size: 13px;
}
.display-settings select {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #789a83;
  border-radius: 10px;
  background: #15382d;
  color: #f0f5d8;
}
@media (max-width: 600px) {
  .panel .actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .panel .actions > .primary {
    grid-column: 1 / -1;
  }
  #hint {
    left: 12px;
    right: auto;
    max-width: calc(100% - 215px);
    text-align: left;
  }
}

/* Replacement cards have their own content flow, independent of purchase columns. */
.work-card.replacement-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 14px;
}
.work-card.replacement-card > * {
  grid-column: 1;
  grid-row: auto;
  width: 100%;
  margin: 0;
  min-width: 0;
}
.work-card.replacement-card > button {
  min-height: 48px;
  padding: 10px;
}
.owned-relics > span {
  flex-wrap: wrap;
}
.owned-relics button {
  min-height: 44px;
}
.skill-demonstration {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e3eac4;
}
.skill-demonstration .art-icon {
  flex: 0 0 32px;
}

/* Membership remains scrollable inside the visual viewport, including keyboards. */
.member-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
  padding: 12px 16px;
  border: 1px solid #b3d8aa40;
  border-radius: 16px;
  background: #102d2b99;
  text-align: left;
}
.member-strip span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.member-strip small,
.member-form small {
  display: block;
  font-size: 12px;
  color: #bfd1c5;
  margin-top: 5px;
}
.member-strip button {
  flex: none;
  min-height: 44px;
  padding: 8px 14px;
}
.member-form {
  text-align: left;
  max-width: 480px;
  margin: 0 auto;
}
.member-form label,
.recovery-code {
  display: block;
  margin: 14px 0;
  color: #e8efdd;
  font-weight: 600;
}
.member-form input,
.recovery-code input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 7px;
  padding: 12px 14px;
  min-height: 48px;
  background: #102628;
  color: #fff;
  border: 1px solid #809d8b;
  border-radius: 10px;
  font: 16px system-ui;
  touch-action: auto;
  user-select: text;
  -webkit-user-select: text;
}
.member-form input:focus,
.recovery-code input:focus {
  outline: 2px solid #c7e574;
  outline-offset: 2px;
}
.member-error {
  min-height: 24px;
  color: #ffd39e;
  overflow-wrap: anywhere;
}
.member-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.member-links button {
  min-height: 44px;
}
.member-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  text-align: left;
  background: #102d2b99;
  padding: 18px;
  border-radius: 16px;
}
.member-details dt {
  font-size: 13px;
  color: #b6cbbd;
}
.member-details dd {
  margin: 0 0 12px;
  font-size: 17px;
  overflow-wrap: anywhere;
}
.recovery-code input {
  font:
    16px ui-monospace,
    monospace;
}
.recovery-confirm {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  margin: 16px 0;
}
.recovery-confirm input {
  width: 22px;
  height: 22px;
}
.board-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px 0;
}
.board-filter select {
  min-height: 44px;
  padding: 8px;
  font-size: 16px;
  background: #173b38;
  color: #fff;
  border-radius: 10px;
}
.rank-scroll {
  overflow-x: auto;
  max-width: 100%;
  border-radius: 12px;
}
.rank-scroll table {
  min-width: 300px;
  width: 100%;
  font-size: 14px;
}
.rank-scroll td:first-child {
  max-width: 160px;
  overflow-wrap: anywhere;
}
.rank-scroll small {
  display: block;
  font-size: 11px;
  color: #b9cdbf;
}
.rank-mine {
  background: #bfdc6730;
}
.personal-rank {
  color: #d9eb9e;
}
.ranked-result {
  margin-top: 16px;
  font-size: 14px;
  color: #c9dabb;
}
.ranked-result button[hidden] {
  display: none;
}
@media (max-width: 600px) {
  .member-strip {
    padding: 10px;
    gap: 8px;
    font-size: 14px;
  }
  .member-strip button {
    font-size: 13px;
    padding: 8px;
  }
  .member-form .actions {
    grid-template-columns: minmax(0, 1fr);
  }
  .member-links button {
    flex: 1 1 auto;
  }
}
/* Keep both play modes together, including narrow phone layouts. */
.play-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 10px;
}
.mode-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 88px;
  padding: 12px;
  text-align: left;
  border-radius: 14px;
  white-space: normal;
}
.coop-entry {
  color: #213c30;
  border-color: #f5e8ac;
  background: linear-gradient(115deg, #f1e6b7, #dcca82);
  box-shadow:
    inset 0 1px #fff8d9,
    0 3px 0 #665d36;
}
.coop-entry:hover {
  background: linear-gradient(115deg, #fff2c2, #ebd88c);
}
.mode-entry-art {
  position: relative;
  flex: 0 0 70px;
  width: 70px;
  height: 60px;
}
.mode-entry-art .portrait {
  position: absolute;
  width: 54px;
}
.solo-entry .portrait {
  left: 8px;
  top: 3px;
}
.coop-entry .portrait:first-child {
  left: 0;
  top: 0;
}
.coop-entry .portrait:last-child {
  right: 0;
  bottom: 0;
}
.mode-entry-copy {
  min-width: 0;
}
.mode-entry-copy strong,
.mode-entry-copy small {
  display: block;
}
.mode-entry-copy strong {
  font-size: 22px;
  line-height: 1.3;
}
.mode-entry-copy small {
  margin-top: 5px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
@media (max-width: 600px) {
  .mode-entry {
    flex-direction: column;
    gap: 4px;
    min-height: 128px;
    padding: 10px 8px;
    text-align: center;
  }
  .mode-entry-art {
    flex-basis: 52px;
    width: 62px;
    height: 52px;
  }
  .mode-entry-art .portrait {
    width: 46px;
  }
  .mode-entry-copy strong {
    font-size: 18px;
  }
  .mode-entry-copy small {
    margin-top: 3px;
    font-size: 13px;
  }
}

/* Two-player rooms reuse the game panels and remain scrollable on phones. */
.coop-code {
  text-align: center;
  padding: 14px;
  border: 1px solid #76956e;
  border-radius: 16px;
  background: #203b34;
  margin: 14px 0;
}
.coop-code small {
  display: block;
  color: #c4d5bd;
}
.coop-code strong {
  display: block;
  font-size: clamp(24px, 6vw, 36px);
  letter-spacing: 0.14em;
  color: #e7f8c9;
  user-select: text;
  -webkit-user-select: text;
}
.coop-seats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.coop-seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1px solid #54685b;
  border-radius: 16px;
  background: #152c29;
  overflow-wrap: anywhere;
  text-align: center;
}
.coop-seat .portrait {
  width: 88px;
  height: 88px;
}
.coop-seat small {
  color: #c1de9f;
}
.coop-empty {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  font-size: 40px;
  color: #819b86;
}
.coop-class {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
}
.coop-class select {
  min-height: 44px;
  flex: 1;
}
.coop-join {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin: 16px 0;
}
.coop-join label {
  flex: 1;
  min-width: 140px;
}
.coop-join input {
  display: block;
  width: 100%;
  min-height: 46px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.coop-directory {
  margin: 20px 0;
}
.coop-directory h3 {
  margin-bottom: 6px;
}
.coop-room-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  margin: 8px 0;
  border: 1px solid #54685b;
  border-radius: 12px;
  background: #152c29;
}
.coop-room-row div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.coop-room-row small {
  display: block;
  color: #c1de9f;
  margin-top: 5px;
}
.coop-room-row button {
  flex-shrink: 0;
  min-height: 46px;
  min-width: 72px;
}
.coop-empty-list {
  padding: 18px;
  border: 1px dashed #54685b;
  border-radius: 12px;
}

.board-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 8px;
}
.board-filters label {
  flex: 1;
  min-width: 130px;
  display: grid;
  gap: 6px;
}
.board-filters select {
  width: 100%;
  min-height: 44px;
  padding: 8px;
  border-radius: 10px;
  background: #203c40;
  color: #fff;
  border: 1px solid #627e79;
}
