.page-body .app { border: 6px solid #0d6efd; border-radius: 20px; padding: 20px; background: aliceblue; box-shadow: 0 18px 44px #0d6efd38; }
.hm-mode-panel { margin: 18px 0 24px; text-align: left; }
.hm-mode-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hm-mode-options button,
.hm-online-settings button,
.hm-lobby button { padding: 12px; border: 1px solid #0d6efd; border-radius: 14px; color: #064493; background: #fff; font-weight: 700; box-shadow: 0 4px 12px #0d6efd24; min-height: 44px; }
.hm-mode-options button { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.hm-mode-options button i { font-size: 1.3rem; }
.hm-mode-options button[aria-pressed="true"] { background: #0d6efd; color: #fff; box-shadow: 0 6px 16px #0d6efd40; }
.hm-mode-note { margin: 12px 0; color: #43526b; font-size: .9rem; line-height: 1.5; }
.hm-online-settings { display: grid; gap: 8px; }
.hm-online-settings label { font-size: .85rem; font-weight: 700; }
.hm-online-settings input,
.hm-code-controls input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; border: 1px solid #a9ccff; border-radius: 10px; background: #fff; color: #123968; padding: 10px; }
.hm-join-controls,
.hm-code-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.hm-join-controls input { text-transform: uppercase; }
.hm-code-controls input { font: 800 1.3rem/1.2 monospace; letter-spacing: .15em; text-align: center; }
.hm-lobby { padding: 18px; border: 1px solid #a9ccff; border-radius: 16px; background: #ffffff80; margin-bottom: 20px; }
.hm-lobby h2 { font-size: 1.4rem; color: #123968; margin: 0 0 12px; }
.hm-lobby p { font-size: .9rem; line-height: 1.5; color: #43526b; margin: 12px 0; }
.hm-lobby-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 16px; }
.hm-lobby-actions button:disabled { opacity: .5; cursor: default; }
.hm-players { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 14px 0; }
.hm-player { min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 10px; border: 1px solid #b6d4fe; border-radius: 12px; background: #ffffffb8; color: #123968; overflow-wrap: anywhere; }
.hm-player span,.hm-player small { font-size: .75rem; color: #43526b; }
.hm-status { margin: 12px 0; line-height: 1.5; color: #064493; font-size: .9rem; }
.hm-status:empty { display: none; }
.page-body .app #cats .cat { background: #fff; color: #064493; border-color: #0d6efd; box-shadow: 0 4px 12px #0d6efd24; }
.page-body .app #cats .cat:hover { background: #dceaff; }
.hm-mode-panel [hidden], .hm-lobby[hidden], .hm-players[hidden], .hm-code-controls[hidden] { display: none !important; }
.hm-mode-panel button:focus-visible,.hm-lobby button:focus-visible { outline: 3px solid #172b4d; outline-offset: 3px; }
@media (max-width:380px) {
  .page-body { padding: 16px 8px 24px; }
  .page-body .app { padding: 12px; border-width: 4px; }
  .page-body .app #cats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hm-mode-options button { padding: 10px 6px; font-size: .85rem; }
  .hm-player { padding: 8px; }
}
