/* Room handbooks and encounters share the academy's muted moonlight palette. */
.room-modal { scrollbar-gutter: stable; overscroll-behavior: contain; }
.room-codex { width: min(100%, 1000px); }
.room-codex > .modal-eyebrow { display: block; padding: 0 24px; line-height: 1.8; }
.room-codex .room-practice-note { margin: 13px 0 20px; color: #a9beb3; font-size: 11px; }
.room-guide-tabs { margin-top: 20px; }
.room-guide-tabs button { min-width: 112px; min-height: 39px; }
.room-catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.room-guide-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 14px 16px; background: #122b34; border: 1px solid #809f8940; border-radius: 10px; text-align: left; }
.room-card-number { position: absolute; right: 12px; top: 12px; color: #6c918b; font-size: 10px; letter-spacing: 2px; }
.room-card-art { display: grid; place-items: center; height: 96px; margin: 0 0 5px; }
.room-card-art canvas { width: 150px; max-width: 100%; height: 100px; object-fit: contain; image-rendering: pixelated; }
.room-card-art [hidden] { display: none; }
.room-icon-fallback { color: #c8d0ad; font-size: 42px; text-shadow: 0 6px 16px #091e2855; }
.room-guide-card h3 { margin: 7px 0 4px; color: #e5dfc8; font-size: 14px; line-height: 1.6; letter-spacing: 1px; }
.room-guide-card p { margin: 6px 0 15px; color: #aec2bc; font-size: 11px; line-height: 1.85; }
.room-practice { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-top: auto; padding: 10px 12px; min-height: 39px; border: 1px solid #8da79455; border-radius: 5px; color: #d2d8b7; background: #304b48; font-size: 11px; text-align: left; }
.room-practice:hover:not(:disabled) { background: #455e50; border-color: #b7c89e; }
.room-practice:disabled { opacity: .45; cursor: not-allowed; }
.room-empty { color: #b4c6b7; text-align: center; font-size: 12px; padding: 30px 0; }
.room-rule-section { margin: 21px 0; text-align: left; }
.room-rule-section h3 { color: #e5dfc8; font-size: 16px; letter-spacing: 1px; margin: 9px 0; }
.room-rule-section h4 { font-size: 12px; color: #d8dbc3; margin: 18px 0 10px; }
.room-rule-section p { color: #afc2b9; font-size: 11px; line-height: 1.85; }
.room-chest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 17px 0; }
.room-chest-card { display: flex; align-items: flex-start; gap: 13px; padding: 15px; background: #142e37; border: 1px solid #809f8938; border-radius: 8px; }
.room-chest-symbol { font-size: 33px; line-height: 1.2; flex: 0 0 34px; }
.room-chest-card h4 { margin: 1px 0 7px; }
.room-chest-card p { margin: 0; }
.room-chest-practice { max-width: 270px; margin: 15px auto; background: #bac7a4; color: #253b3e; }
.room-chest-practice:hover:not(:disabled) { background: #d0dab6; }
.room-reference { padding: 7px 0; color: #93aca7 !important; font-size: 10px !important; }
.room-reference a { color: #c9c294; text-decoration: underline; text-underline-offset: 3px; }
.room-balance { padding: 21px; background: #132d3680; border: 1px solid #a9b69040; border-radius: 9px; }
.room-note-label { display: inline-block; padding: 5px 9px; background: #dcc58e19; border: 1px solid #dcc58e40; border-radius: 4px; color: #dcca99; font-size: 10px; line-height: 1.6; }
.room-probability-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 15px 0 25px; font-size: 11px; }
.room-probability-list > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid #91ad9430; }
.room-probability-list dt { color: #b1c3b8; }
.room-probability-list dd { color: #e1d29f; margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.room-table-scroll { overflow-x: auto; }
.room-weights { width: 100%; border-collapse: collapse; font-size: 11px; color: #bdd0c1; }
.room-weights caption { text-align: left; padding-bottom: 9px; color: #b4ad88; font-size: 10px; }
.room-weights th, .room-weights td { padding: 10px 8px; border-bottom: 1px solid #91ad9428; text-align: center; white-space: nowrap; }
.room-weights thead { background: #314b4955; color: #d6dcc1; }
.room-weights th { font-weight: 500; }
.room-weights td { font-variant-numeric: tabular-nums; }
.room-table-note { color: #99b4ac !important; font-size: 10px !important; }
.room-rank-note { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid #a1b99d35; }
.room-interaction { width: min(100%, 740px); }
.room-interaction > .modal-eyebrow { display: block; padding: 0 25px; line-height: 1.8; }
.room-wallet { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 17px; padding: 12px 14px; background: #122c3480; border: 1px solid #829f8933; border-radius: 7px; color: #b2c5b7; font-size: 11px; line-height: 1.6; }
.room-wallet strong { color: #dfd09f; font-weight: 500; }
.room-current-weapon { color: #c4d0b2; overflow-wrap: anywhere; }
.room-interaction > .room-status-note { color: #c2cda9; margin: 13px 0 0; font-size: 11px; }
.room-feedback { padding: 12px 5px 5px; min-height: 36px; color: #d8cfaa; font-size: 12px; line-height: 1.8; }
.room-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 15px 0 0; }
.room-action { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 95px; padding: 16px; border: 1px solid #8dab8c66; border-radius: 8px; background: #33504b; color: #e1dfc3; text-align: left; }
.room-action-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.room-action strong { font-size: 12px; line-height: 1.6; font-weight: 600; }
.room-action-price { font-size: 10px; color: #e2ce99; line-height: 1.6; }
.room-action-detail { display: block; color: #aec5b8; font-size: 11px; line-height: 1.8; }
.room-action:hover:not(:disabled) { background: #496351; border-color: #c2cea2; }
.room-action:disabled { background: #233b40; border-color: #809b8538; color: #98aba1; cursor: not-allowed; opacity: .65; }
.room-action:disabled .room-action-price { color: #a5a58c; }
.room-modal button:focus-visible, .room-modal a:focus-visible { outline: 2px solid #e1d2a5; outline-offset: 4px; }
@media (max-width: 650px) {
  .room-codex { padding: 20px 13px; }
  .room-codex > .modal-eyebrow, .room-interaction > .modal-eyebrow { font-size: 7px; letter-spacing: 2px; }
  .room-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .room-guide-card { padding: 10px; }
  .room-card-art { height: 76px; }
  .room-card-art canvas { width: 120px; height: 80px; }
  .room-guide-card h3 { font-size: 12px; }
  .room-guide-card p { font-size: 10px; }
  .room-practice { padding: 9px; font-size: 10px; min-height: 40px; }
  .room-chest-grid { grid-template-columns: 1fr; }
  .room-chest-card { padding: 12px; }
  .room-balance { padding: 14px; }
  .room-probability-list { grid-template-columns: 1fr; }
  .room-action-grid { grid-template-columns: 1fr; }
  .room-action { min-height: 80px; padding: 14px; }
  .room-wallet { padding: 10px; gap: 6px 12px; }
  .room-weights th, .room-weights td { padding: 9px 6px; }
}
@media (max-width: 360px) {
  .room-catalog-grid { grid-template-columns: 1fr; }
  .room-card-art { height: 84px; }
}
@media (max-height: 500px) and (min-width: 651px) {
  .room-interaction { padding-top: 18px; padding-bottom: 18px; }
  .room-action { min-height: 78px; padding: 12px; }
  .room-feedback { padding-top: 8px; }
}
