/* Layout shells: lobby, game stage, HUD layers, modal frames */
/* Mobile: UI column max 497px (side fields); 3D canvas stays full-bleed. Wide ≥692px. */

.lobby {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  background: transparent !important;
  z-index: 6;
  overflow: hidden;
}

.lobby-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.menu-bobber {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
  /* shows through while WebGL buffer is cleared on resize */
  background: #2a4548;
}

.lobby-shell {
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  height: 100%;
  max-width: 497px;
  max-height: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(0.4rem, 1.2vh, 0.7rem);
  padding:
    max(0.55rem, var(--safe-t))
    max(0.55rem, var(--safe-r))
    max(0.55rem, var(--safe-b))
    max(0.55rem, var(--safe-l));
  overflow: hidden;
  pointer-events: none;
  animation: lobbyIn 0.45s ease-out both;
  box-sizing: border-box;
}

.lobby-body {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  grid-template-areas:
    "cur"
    "gap"
    "nav"
    "cta";
  gap: clamp(0.4rem, 1.2vh, 0.7rem);
  min-height: 0;
  min-width: 0;
  pointer-events: none;
}

/* Wrappers dissolve so children join lobby-body grid (mobile order ≠ DOM) */
.lobby-rail,
.lobby-hero {
  display: contents;
  pointer-events: none;
}

/* Only real chrome blocks the full-bleed bite layer */
.lobby-top,
.lobby-daily-btn,
.lobby-daily,
.lobby-mid-row,
.lobby-bottom-row,
.lobby #menu-error {
  pointer-events: auto;
}

/* Inline daily — ONLY tablet/PC (>=692px). Mobile: button → modal */
.lobby-daily {
  display: none !important;
}

.lobby-mail-btn {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: auto !important;
  min-width: 44px !important;
  height: 44px !important;
  padding: 0 0.75rem 0 0.65rem !important;
  border-radius: 14px !important;
  font-weight: 800;
  font-size: 0.88rem;
  color: #eaf6f2;
}

.lobby-mail-label {
  display: none;
}

.lobby-mail-btn .lobby-ico {
  width: 1.25rem;
  height: 1.25rem;
}

.lobby-mail-btn .mail-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #c45c26;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
}

.lobby-stage-gap {
  grid-area: gap;
  pointer-events: none !important;
  min-height: clamp(4rem, 18vh, 8rem);
  min-width: 0;
  position: relative;
}

.lobby-daily-btn {
  position: relative;
  z-index: 2;
  grid-area: cur;
  width: 100% !important;
  min-height: 44px !important;
  height: auto !important;
  min-width: 0 !important;
  padding: 0.45rem 0.7rem !important;
  border-radius: 14px !important;
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  touch-action: manipulation;
  font-weight: 800;
  font-size: 0.88rem;
  color: #eaf6f2;
}

.lobby-daily-ico {
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  line-height: 0;
  flex-shrink: 0;
}

.lobby-daily-ico svg {
  width: 1.25rem;
  height: 1.25rem;
}

.lobby-daily-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-daily-btn .mail-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #c45c26;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.lobby-daily-btn.has-claim {
  box-shadow: var(--shadow-up), 0 0 0 2px rgba(230, 195, 92, 0.45);
}

/* Full-bleed bite layer under UI — shell is pointer-events:none, chrome catches clicks */
.bobber-hit {
  pointer-events: auto;
  position: absolute;
  z-index: 1;
  inset: 0;
  width: auto;
  height: auto;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 0;
  -webkit-tap-highlight-color: transparent;
}

.lobby-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  min-width: 0;
}

.lobby-identity {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  flex: 0 1 auto;
}

.lobby-level-badge {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(8, 28, 30, 0.72);
  border: 2px solid rgba(200, 230, 220, 0.45);
  box-shadow: var(--shadow-up);
  color: #fff;
  font-size: 1.15rem;
}

.lobby-identity-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.lobby-name-input {
  width: 100%;
  max-width: 11rem;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #fff !important;
  font: 800 clamp(1.05rem, 3.6vw, 1.35rem)/1.1 var(--font-ui, "Nunito", sans-serif) !important;
  padding: 0 !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.lobby-name-input:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.25) !important;
  border-radius: 8px !important;
  padding: 0.1rem 0.35rem !important;
}

.lobby-xp-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 12rem;
}

.xp-bar-lobby {
  flex: 1;
  height: 8px !important;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.lobby-xp-label {
  font-size: 0.68rem;
  color: rgba(230, 245, 240, 0.75);
  white-space: nowrap;
}

.lobby-top-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
  margin-left: auto;
}

.lobby-icon-btn {
  position: relative;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center;
}

.lobby-ico {
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  line-height: 0;
}

.lobby-ico svg {
  width: 1.25rem;
  height: 1.25rem;
}

.lobby-icon-btn .mail-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #c45c26;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
}

.lobby-announce {
  flex: 1 1 180px;
  min-width: 0;
  max-width: 28rem;
  padding: 0.35rem 0.7rem;
  border-radius: 10px;
  background: rgba(18, 52, 48, 0.82);
  border: 1px solid rgba(120, 210, 180, 0.35);
  color: #d8f3ea;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.maintenance-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(4, 16, 18, 0.82);
  backdrop-filter: blur(8px);
}
.maintenance-overlay.hidden { display: none; }
.maintenance-card {
  padding: 1.6rem 1.8rem;
  border-radius: 18px;
  background: #123532;
  border: 1px solid rgba(180, 220, 205, 0.3);
  color: #eaf6f2;
  text-align: center;
  max-width: 22rem;
}
.lobby-tile[disabled],
.lobby-cta[disabled] {
  opacity: 0.4;
  pointer-events: none;
}

.lobby-currency {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  min-width: 0;
}

.lobby-cur {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.55rem;
  border-radius: 12px;
  background: rgba(8, 26, 28, 0.72);
  border: 1px solid rgba(180, 220, 205, 0.28);
  box-shadow: var(--shadow-up);
  color: #eaf6f2;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.lobby-cur-label {
  display: none;
}

.lobby-cur .cur-ico {
  width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.lobby-cur.gold strong {
  color: #f0d56a;
}

.lobby-cur.dia strong {
  color: #9fd4ff;
}

.lobby-mid-row {
  grid-area: nav;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
}

.lobby-tile {
  min-height: 52px !important;
  padding: 0.4rem 0.2rem !important;
  font-size: clamp(0.62rem, 2.4vw, 0.78rem) !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  white-space: normal !important;
  text-align: center;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.lobby-tile-ico {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  line-height: 0;
}

.lobby-tile-ico svg {
  width: 1.85rem;
  height: 1.85rem;
}

.lobby-bottom-row {
  grid-area: cta;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.lobby-cta {
  min-height: 52px !important;
  font-size: 1.02rem !important;
  font-weight: 800 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.lobby-cta-ico {
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  line-height: 0;
}

.lobby-cta-ico svg {
  width: 1.35rem;
  height: 1.35rem;
}

.lobby #menu-error {
  margin: 0;
  text-align: center;
}

.logo {
  margin: 0.15rem 0 !important;
  font-size: clamp(2.6rem, 11vw, 3.6rem) !important;
  letter-spacing: -0.02em;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-family: var(--font-brand) !important;
  font-weight: 700;
  color: #fff8e7;
}

.tagline {
  margin: 0 !important;
  opacity: 0.85;
  font-size: 0.95rem !important;
  color: var(--text-dim) !important;
}

.mode-row {
  display: flex;
  flex-direction: column;
  gap: 0.55rem !important;
  width: 100% !important;
}

.game {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
}

.stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  overflow: hidden;
}

#pond {
  display: block;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: crosshair;
  touch-action: none;
  background: #1f8f88;
}

#farm {
  display: block;
  border: 0;
  cursor: pointer;
  touch-action: none;
  background: #6a9a4a;
}

/* World layer: canvas covers stage (16:9), HUD full-bleed */
.stage-world {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.stage-world #pond,
.stage-world #farm {
  pointer-events: auto;
  width: max(100%, calc(100dvh * 16 / 9));
  height: auto;
  aspect-ratio: 16 / 9;
  max-width: none;
  max-height: none;
}

.hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.hud-bottom, .hud-side, .overlay-panel, .prompt, .btn, .struggle-arrow {
  pointer-events: auto;
}

/* Stats / leaderboard are display-only — let shore clicks pass through to canvas walk zone */
.hud-top,
.hud-stats,
.leaderboard {
  pointer-events: none;
}

.hud-top-actions,
.hud-top-actions .btn,
.chum-controls,
.chum-type-menu {
  pointer-events: auto;
}

.hud-top {
  position: absolute;
  top: var(--hud-pad);
  left: var(--hud-pad);
  right: var(--hud-pad);
  display: flex;
  gap: 0.4rem !important;
  align-items: flex-start !important;
  justify-content: space-between;
}

.hud-stats {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.35rem !important;
  max-width: min(72vw, 640px);
  padding: 0.4rem 0.55rem !important;
}

.hud-top-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.leaderboard {
  position: absolute;
  top: calc(var(--hud-pad) + 2.6rem);
  left: var(--hud-pad);
  min-width: min(160px, 42%);
  max-width: 46%;
  background: rgba(12, 18, 18, 0.78);
  border: 2px solid #0c0c0c;
  border-radius: 10px;
  padding: 0.4rem 0.55rem !important;
  font-size: clamp(0.75rem, 2.2vw, 0.85rem);
  color: var(--text) !important;
}

.leaderboard .row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.12rem 0;
}

.leaderboard .row.you {
  color: #ffd166;
}

.hud-side {
  position: absolute;
  right: var(--hud-pad);
  top: 50%;
  transform: translateY(-42%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  max-width: 42%;
}

.hud-left-dock {
  position: absolute;
  left: var(--hud-pad);
  bottom: var(--hud-pad);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  width: min(260px, 48vw);
  z-index: 12;
  pointer-events: none;
}

.hud-left-dock > * {
  pointer-events: auto;
}

.hud-bottom {
  position: static;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
}

.overlay-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(380px, calc(100% - 1.5rem));
  max-height: min(80dvh, 560px);
  overflow: auto;
  background: var(--glass-strong) !important;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: 0 16px 40px var(--shadow);
  z-index: 5;
  color: var(--text);
}

.overlay-panel h2 {
  margin: 0 0 0.75rem;
}

.overlay-panel ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.overlay-panel li {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.menu-top {
  display: flex;
  justify-content: flex-end;
  width: 100% !important;
}

.mode-row.stacked {
  flex-direction: column;
  gap: 0.55rem;
  width: 100% !important;
}

.mode-row.stacked .btn {
  width: 100%;
}

.profile-card {
  width: 100% !important;
  margin: 0.6rem 0 1rem;
  padding: 0.9rem 1rem !important;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.profile-stats {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: #e8fff8;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.profile-level-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

.map-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 0%, rgba(40, 120, 110, 0.4), transparent 50%),
  var(--water-deep) !important;
  z-index: 7 !important;
  padding: max(8px, var(--safe-t)) max(8px, var(--safe-r)) max(8px, var(--safe-b)) max(8px, var(--safe-l));
}

.map-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.map-header h2 {
  margin: 0;
  font-size: 1.25rem !important;
  font-family: var(--font-brand);
  text-align: center;
}

.map-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 18px !important;
  overflow: hidden;
  border: 1px solid var(--stroke) !important;
  box-shadow: var(--shadow-up);
  background: #0a2a26;
  touch-action: none;
}

.map-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.map-viewport.is-panning {
  cursor: grabbing;
}

.map-world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.map-world picture,
.map-world img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.map-polys {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: visible;
  pointer-events: auto;
}

.map-polys .map-poly {
  pointer-events: auto;
  cursor: pointer;
  fill: rgba(40, 130, 150, 0.28);
  stroke: rgba(180, 240, 250, 0.85);
  stroke-width: 2;
  stroke-dasharray: 7 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: fill 0.12s ease, stroke 0.12s ease, opacity 0.12s ease;
}

.map-polys .map-poly:hover,
.map-polys .map-poly.is-hover {
  fill: rgba(60, 170, 150, 0.42);
  stroke: rgba(200, 255, 230, 0.95);
  stroke-width: 2.4;
}

.map-polys .map-poly.open {
  fill: rgba(40, 170, 130, 0.4);
  stroke: rgba(140, 255, 200, 0.95);
  stroke-width: 2.4;
  filter: drop-shadow(0 0 2px rgba(100, 255, 180, 0.35));
}

.map-polys .map-poly.open.premium {
  fill: rgba(220, 170, 50, 0.38);
  stroke: rgba(255, 225, 120, 0.95);
}

.map-polys .map-poly.locked {
  fill: rgba(70, 85, 100, 0.32);
  stroke: rgba(190, 205, 220, 0.8);
  cursor: pointer;
  opacity: 1;
}

.map-polys .map-poly.locked-premium {
  fill: rgba(140, 105, 35, 0.34);
  stroke: rgba(240, 200, 100, 0.85);
  cursor: pointer;
}

.map-polys .map-poly.coming-soon {
  fill: rgba(90, 100, 115, 0.3);
  stroke: rgba(175, 190, 210, 0.78);
  opacity: 1;
  cursor: pointer;
}


.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(4, 18, 16, 0.72) !important;
  padding: 1rem;
  backdrop-filter: blur(6px);
}

.modal.hidden {
  display: none;
}

.modal-card {
  background: linear-gradient(180deg,#1a2420,#0d1210);
  color: #f2f7f4;
  border: 2px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  width: min(440px,94vw);
  max-height: min(86vh,640px);
  overflow: auto;
  font-family: var(--font-ui);
}

.modal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  justify-content: space-between;
  margin-bottom: 0.65rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.55rem;
}

.modal-head h2 {
  margin: 0;
}

.inv-panel {
  width: min(760px, 96vw) !important;
  max-height: min(90vh, 760px) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.55rem !important;
}

.inv-panel .modal-head {
  align-items: center;
}

.inv-panel .inv-slots {
  margin: 0;
}

.modal-card, .inv-panel, .bazaar-card, .tourney-results, .profile-card {
  box-shadow: 6px 6px 16px var(--neo-dark),
  -4px -4px 12px var(--neo-light);
}

.hud-gear {
  display: none !important;
}

.hud-gear-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35) !important;
  box-shadow: none !important;
  font-size: 0.85rem;
  border: 1px solid var(--stroke) !important;
  color: var(--text);
}

.inv-panel.panel-neo, .tackle-card.panel-neo {
  background: linear-gradient(165deg, #1e322e 0%, #121a18 55%, #0c1210 100%) !important;
  color: #e8f4f0 !important;
  border: 1px solid rgba(160, 210, 195, 0.22);
  overflow: hidden;
}

.modal-head-title {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.inv-body {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 250px) !important;
  gap: 0.7rem !important;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.lobby-bg {
  display: none;
}

.lobby-brand {
  text-align: center;
  padding: 0.25rem 0 0.15rem;
}

.brand-mark {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(240, 220, 140, 0.85);
  font-weight: 800;
}

.mode-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.mode-secondary .btn {
  font-size: 0.88rem !important;
  min-height: 42px !important;
  padding: 0.55rem 0.6rem !important;
}

.mode-secondary .btn-tile:nth-child(5) {
  grid-column: 1 / -1;
}

.bestiary-card {
  width: min(860px, 96vw) !important;
  height: min(88vh, 700px) !important;
  max-height: min(88vh, 700px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  gap: 0.45rem !important;
}

.bestiary-card > .modal-head, .bestiary-tabs {
  flex-shrink: 0;
}

.bestiary-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0 !important;
}

.bestiary-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 0.7rem;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.map-header.glass-bar {
  margin-bottom: 0.55rem !important;
  padding: 0.55rem 0.75rem;
  display: grid !important;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
}

.map-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.hud-stats .stat {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.25rem 0.45rem;
  min-width: 0;
}

.hud-stats .label {
  opacity: 0.7;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hud-stats .stat-cur {
  align-items: center;
}

.hud-stats .stat-cur .label {
  opacity: 1;
  font-size: 1em;
  text-transform: none;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.hud-stats .stat-cur .ico svg {
  width: 1.1em;
  height: 1.1em;
}

.hud-top-actions .btn {
  width: auto !important;
}

.hud-bottom .btn {
  min-width: 0;
  flex: 1 1 auto;
  background: linear-gradient(180deg, rgba(42, 111, 102, 0.95), rgba(26, 79, 74, 0.98)) !important;
  color: var(--foam) !important;
  border: 1px solid var(--stroke-strong) !important;
}

.modal-card h2, .modal-head h2 {
  font-family: var(--font-brand) !important;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tackle-card > .modal-head {
  flex-shrink: 0;
}

.bazaar-card, .tourney-results, .craft-card, #settings-modal .modal-card, #premium-modal .modal-card, #mail-modal .modal-card {
  width: min(640px, 96vw);
  color: var(--text) !important;
}

.mode-row.stacked .btn-hero, .mode-row.stacked .btn-mode {
  width: 100%;
}

.hud-top-actions.glass-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.45rem !important;
}

.hud-gear-slot .ico svg {
  filter: brightness(1.15);
}

#settings-modal .modal-card, #premium-modal .modal-card, #mail-modal .modal-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hud-left-dock .hud-ping {
  position: static;
  align-self: flex-start;
  z-index: 15;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  opacity: 0.9;
  line-height: 1.2;
  margin-top: 0.1rem;
}

.hud-ping.ok {
  color: #7dffa0;
}

.hud-ping.mid {
  color: #ffd76a;
}

.hud-ping.bad {
  color: #ff8a8a;
}

.hud-ping.off {
  color: rgba(255, 255, 255, 0.45);
}

.settings-version {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.8rem;
  text-align: center;
  opacity: 0.7;
}
