/* SAFE TO EDIT: visual presentation for the game. This file contains CSS only. */
.site-footer {
  position: fixed;
  right: 8px;
  bottom: 5px;
  z-index: 5;
}

.admin-entry-link {
  color: rgba(232, 247, 241, 0.28);
  font-size: 9px;
  text-decoration: none;
  text-transform: uppercase;
}

.admin-entry-link:hover,
.admin-entry-link:focus-visible {
  color: rgba(232, 247, 241, 0.72);
}

/* The old in-game admin controls are disabled; administration lives at admin.html. */
.admin-button,
.admin-activity-panel,
#adminModal {
  display: none !important;
}
:root {
  color-scheme: dark;
  --panel: rgba(7, 20, 29, 0.78);
  --panel-strong: rgba(7, 20, 29, 0.9);
  --line: rgba(166, 230, 213, 0.28);
  --text: #e8f7f1;
  --muted: #a7c6bf;
  --accent: #60f0bd;
  --amber: #f7bf64;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #05111b;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-width: 320px;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  cursor: crosshair;
  touch-action: none;
}

.landing-welcome {
  width: min(420px, 100%);
  margin: 0;
  color: #8eeadd;
  font-size: clamp(13px, 1.8vw, 17px);
  font-weight: 900;
  line-height: 1.35;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  text-transform: uppercase;
}

.landing-actions {
  display: grid;
  gap: 12px;
  width: min(420px, 100%);
}

.landing-action {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  min-height: 58px;
  border: 1px solid rgba(83, 239, 216, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(12, 61, 72, 0.78), rgba(2, 24, 35, 0.9)),
    radial-gradient(circle at 10% 50%, rgba(247, 191, 100, 0.16), transparent 26%);
  color: #fff7ed;
  cursor: pointer;
  font: 950 20px/1 ui-sans-serif, system-ui, sans-serif;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 244, 196, 0.08), 0 12px 38px rgba(0, 0, 0, 0.28);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.landing-action:hover {
  transform: translateY(-2px);
  border-color: rgba(247, 191, 100, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 244, 196, 0.12), 0 18px 44px rgba(0, 0, 0, 0.34);
}

.landing-icon {
  display: grid;
  place-items: center;
  height: 100%;
  color: #ffe4a8;
  font-size: 30px;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.38);
}

.landing-action.is-secondary {
  min-height: 52px;
  color: #ffe4a8;
  font-size: 15px;
  border-color: rgba(247, 191, 100, 0.46);
}

.hud {
  position: fixed;
  top: 58px;
  left: 16px;
  z-index: 3;
  display: grid;
  gap: 9px;
  width: min(300px, calc(100vw - 32px));
  pointer-events: none;
}

.resource-strip {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  left: 50%;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(520px, calc(100vw - 104px));
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid rgba(157, 233, 212, 0.28);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(9, 26, 37, 0.9), rgba(7, 20, 29, 0.74));
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.resource-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 58px;
  color: #fff7d9;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.resource-icon {
  font-size: 15px;
  line-height: 1;
  filter: drop-shadow(0 0 7px rgba(255, 217, 120, 0.36));
}

.top-bar-button {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  z-index: 8;
  display: grid;
  place-items: center;
  width: 38px;
  height: 34px;
  border: 1px solid rgba(247, 191, 100, 0.46);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(57, 38, 19, 0.88), rgba(7, 20, 29, 0.82));
  color: #ffe4a8;
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 244, 196, 0.08);
  cursor: pointer;
  font: 950 15px/1 ui-sans-serif, system-ui, sans-serif;
  backdrop-filter: blur(12px);
}

.top-bar-button.is-left {
  left: max(12px, calc(50% - 304px));
}

.top-bar-button.is-right {
  right: max(12px, calc(50% - 304px));
}

.hud-toggle {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  left: 16px;
  z-index: 8;
  width: 38px;
  height: 34px;
  border: 1px solid rgba(157, 233, 212, 0.34);
  border-radius: 8px;
  background: rgba(7, 20, 29, 0.84);
  color: var(--text);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  font: 900 15px/1 ui-sans-serif, system-ui, sans-serif;
  backdrop-filter: blur(12px);
}

.settings-button {
  position: fixed;
  top: calc(52px + env(safe-area-inset-top));
  left: 16px;
  z-index: 8;
  width: 38px;
  height: 34px;
  border: 1px solid rgba(157, 233, 212, 0.34);
  border-radius: 8px;
  background: rgba(7, 20, 29, 0.84);
  color: var(--text);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  font: 900 15px/1 ui-sans-serif, system-ui, sans-serif;
  backdrop-filter: blur(12px);
}

.test-button,
.market-button,
.upgrade-button,
.admin-button {
  position: fixed;
  left: 16px;
  z-index: 8;
  width: 38px;
  height: 34px;
  border: 1px solid rgba(157, 233, 212, 0.34);
  border-radius: 8px;
  background: rgba(7, 20, 29, 0.84);
  color: var(--text);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  font: 900 15px/1 ui-sans-serif, system-ui, sans-serif;
  backdrop-filter: blur(12px);
}

.test-button {
  top: calc(94px + env(safe-area-inset-top));
}

.market-button {
  top: calc(136px + env(safe-area-inset-top));
}

.upgrade-button {
  top: calc(178px + env(safe-area-inset-top));
}

.admin-button {
  top: calc(220px + env(safe-area-inset-top));
  border-color: rgba(255, 217, 120, 0.58);
  background: linear-gradient(180deg, rgba(85, 58, 13, 0.94), rgba(21, 14, 8, 0.9));
  color: #ffd978;
  text-shadow: 0 0 10px rgba(255, 217, 120, 0.45);
}

.admin-button.is-hidden {
  display: none !important;
}

.admin-activity-panel {
  position: fixed;
  left: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 9;
  width: min(300px, calc(100vw - 32px));
  max-height: 260px;
  border: 1px solid rgba(255, 217, 120, 0.36);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 14, 9, 0.92), rgba(5, 12, 17, 0.9));
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.36);
  color: var(--text);
  overflow: hidden;
  pointer-events: auto;
  backdrop-filter: blur(12px);
}

.admin-activity-panel.is-hidden {
  display: none;
}

.admin-activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 217, 120, 0.18);
  color: #ffd978;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-activity-list {
  display: grid;
  gap: 7px;
  max-height: 212px;
  padding: 9px 10px;
  overflow: auto;
  font-size: 11px;
  line-height: 1.3;
}

.admin-activity-item {
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(232, 247, 241, 0.08);
  color: rgba(232, 247, 241, 0.82);
}

.admin-activity-item strong {
  color: #fff4c4;
}

.admin-activity-player {
  color: #ffd978;
  font-weight: 950;
}

.admin-activity-danger {
  color: #ff6b5f;
  font-weight: 950;
}

.admin-activity-muted {
  color: rgba(232, 247, 241, 0.62);
}

@media (max-width: 780px) {
  .admin-activity-panel {
    bottom: calc(104px + env(safe-area-inset-bottom));
    width: min(250px, calc(100vw - 24px));
  }
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0 16px;
  padding: 10px 0;
  border-top: 1px solid rgba(232, 247, 241, 0.12);
  border-bottom: 1px solid rgba(232, 247, 241, 0.12);
  color: var(--text);
  font-size: 13px;
  text-align: left;
}

.setting-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.status {
  padding: 12px 14px;
  border: 1px solid rgba(157, 233, 212, 0.24);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel-strong), rgba(8, 24, 36, 0.72));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.hud.is-collapsed .status {
  display: none;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.05;
  font-weight: 760;
}

.signal {
  display: inline-grid;
  grid-template-columns: repeat(4, 5px);
  gap: 3px;
  align-items: end;
  height: 16px;
  flex: 0 0 auto;
}

.signal span {
  display: block;
  width: 5px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(96, 240, 189, 0.6);
}

.signal span:nth-child(1) {
  height: 5px;
  opacity: 0.45;
}

.signal span:nth-child(2) {
  height: 8px;
  opacity: 0.62;
}

.signal span:nth-child(3) {
  height: 12px;
  opacity: 0.82;
}

.signal span:nth-child(4) {
  height: 16px;
}

.readouts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.readout {
  min-width: 0;
  border-top: 1px solid rgba(232, 247, 241, 0.1);
  padding-top: 8px;
}

.label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  text-transform: uppercase;
}

.value {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-panel {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 72px minmax(210px, 1fr);
  grid-template-areas:
    "left crest right"
    "slots slots slots";
  gap: 8px 10px;
  width: min(820px, calc(100vw - 560px));
  min-width: 560px;
  padding: 10px;
  border: 1px solid rgba(247, 191, 100, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(57, 38, 19, 0.82), rgba(12, 18, 20, 0.9)),
    radial-gradient(circle at 50% 0, rgba(247, 191, 100, 0.18), transparent 58%);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 244, 196, 0.08);
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
  transition: transform 180ms ease, opacity 180ms ease;
}

.command-panel.is-collapsed {
  opacity: 0.16;
  pointer-events: none;
  transform: translateX(-50%) translateY(calc(100% + 20px));
}

.command-panel-toggle {
  position: fixed;
  left: 50%;
  bottom: 174px;
  z-index: 7;
  display: grid;
  place-items: center;
  width: 34px;
  height: 28px;
  border: 1px solid rgba(247, 191, 100, 0.42);
  border-radius: 8px;
  background: rgba(7, 20, 29, 0.86);
  color: #ffe4a8;
  cursor: pointer;
  font: 950 14px/1 ui-sans-serif, system-ui, sans-serif;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.command-panel-toggle.is-collapsed {
  bottom: calc(12px + env(safe-area-inset-bottom));
}

.panel-left,
.panel-right {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.panel-left {
  grid-area: left;
}

.panel-right {
  grid-area: right;
}

.panel-crest {
  grid-area: crest;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(247, 191, 100, 0.46);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(232, 247, 241, 0.1), rgba(0, 0, 0, 0.28));
  box-shadow: inset 0 0 18px rgba(247, 191, 100, 0.12);
  color: #ffe4a8;
  font-size: 28px;
  line-height: 1;
}

.stat-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 3px 6px;
  border: 1px solid rgba(255, 244, 196, 0.16);
  border-radius: 7px;
  background: rgba(31, 18, 8, 0.72);
  box-shadow: inset 0 1px 10px rgba(0, 0, 0, 0.38);
}

.stat-label,
.stat-value {
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.stat-value {
  color: #f7f3dc;
  font-variant-numeric: tabular-nums;
}

.stat-track {
  min-width: 0;
  height: 10px;
  border: 1px solid rgba(255, 244, 196, 0.18);
  border-radius: 999px;
  background: rgba(3, 9, 12, 0.72);
  overflow: hidden;
}

.stat-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(96, 240, 189, 0.4);
}

#panelHpFill {
  background: linear-gradient(90deg, #1f9c36, #62f15f);
}

#panelXpFill {
  background: linear-gradient(90deg, #2e6cff, #86c9ff);
}

#panelBpFill {
  background: linear-gradient(90deg, #d88b22, #ffd978);
}

#panelEpFill {
  background: linear-gradient(90deg, #e8f7f1, #7dfbe1);
}

.panel-slots {
  grid-area: slots;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.slot,
.panel-button,
.ammo-button,
.ammo-select,
.ammo-select-toggle,
.ammo-option,
.rocket-button,
.repair-button,
.logout-button,
.shoot-button {
  min-width: 0;
  border: 1px solid rgba(166, 230, 213, 0.2);
  border-radius: 7px;
  background: rgba(11, 18, 15, 0.72);
  color: var(--text);
  font: 800 11px/1 ui-sans-serif, system-ui, sans-serif;
  text-transform: uppercase;
}

.slot {
  position: relative;
  min-height: 54px;
  padding: 7px 6px 6px;
  box-shadow: inset 0 0 18px rgba(247, 191, 100, 0.05);
}

.slot-key {
  position: absolute;
  top: 3px;
  right: 5px;
  color: rgba(255, 244, 196, 0.58);
  font-size: 10px;
  font-weight: 900;
}

.slot-icon {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
  line-height: 1;
}

.slot-name {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.slot-value {
  display: block;
  margin-top: 3px;
  color: #fff7d9;
  font-size: 11px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.panel-button,
.ammo-button,
.ammo-select-toggle,
.ammo-option,
.rocket-button,
.repair-button,
.logout-button,
.shoot-button {
  min-height: 54px;
  padding: 6px;
  cursor: pointer;
}

.ammo-select {
  position: relative;
  min-height: 54px;
  padding: 0;
  overflow: visible;
}

.ammo-select-toggle {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  color: inherit;
}

.ammo-menu {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 12;
  display: none;
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(157, 233, 212, 0.3);
  border-radius: 8px;
  background: rgba(7, 20, 29, 0.94);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
}

.ammo-select.is-open .ammo-menu {
  display: grid;
}

.ammo-option {
  min-height: 40px;
  padding: 5px;
  border-radius: 6px;
  background: rgba(232, 247, 241, 0.06);
}

.ammo-option.is-active {
  border-color: rgba(96, 240, 189, 0.72);
  background: rgba(96, 240, 189, 0.18);
  box-shadow: inset 0 0 16px rgba(96, 240, 189, 0.12);
}

.shoot-button {
  border-color: rgba(247, 191, 100, 0.62);
  background: linear-gradient(180deg, #ffd78c, #d88737);
  color: #241309;
  box-shadow: 0 10px 24px rgba(216, 135, 55, 0.22);
}

.shoot-button.is-stopping {
  border-color: rgba(239, 96, 91, 0.68);
  background: linear-gradient(180deg, #ff9b83, #bf3831);
  color: #fff7ed;
}

.shoot-button:disabled,
.rocket-button:disabled,
.repair-button:disabled,
.logout-button:disabled {
  border-color: rgba(166, 230, 213, 0.16);
  background: rgba(166, 230, 213, 0.08);
  color: rgba(232, 247, 241, 0.42);
  cursor: not-allowed;
  box-shadow: none;
}

.ammo-count {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  line-height: 1;
}

.ammo-button.is-active {
  border-color: rgba(96, 240, 189, 0.7);
  background: linear-gradient(180deg, rgba(96, 240, 189, 0.24), rgba(96, 240, 189, 0.1));
  box-shadow: 0 0 22px rgba(96, 240, 189, 0.16) inset, 0 10px 28px rgba(0, 0, 0, 0.16);
}

.ammo-button[data-ammo="elites"].is-active {
  border-color: rgba(247, 191, 100, 0.78);
  background: linear-gradient(180deg, rgba(247, 191, 100, 0.32), rgba(96, 240, 189, 0.14));
  box-shadow: 0 0 24px rgba(247, 191, 100, 0.22), 0 0 18px rgba(96, 240, 189, 0.12) inset;
}

.repair-button {
  border-color: rgba(96, 240, 189, 0.34);
  background: rgba(96, 240, 189, 0.1);
}

.rocket-button {
  border-color: rgba(126, 190, 255, 0.48);
  background: linear-gradient(180deg, rgba(126, 190, 255, 0.24), rgba(126, 190, 255, 0.08));
  box-shadow: inset 0 0 20px rgba(126, 190, 255, 0.12);
}

.logout-button {
  border-color: rgba(239, 96, 91, 0.42);
  background: rgba(239, 96, 91, 0.12);
}

.logout-button.is-counting {
  border-color: rgba(255, 217, 120, 0.72);
  background: linear-gradient(180deg, rgba(255, 217, 120, 0.24), rgba(239, 96, 91, 0.15));
  color: #fff4c4;
}

.rocket-button.is-cooling {
  color: rgba(232, 247, 241, 0.5);
  background: rgba(126, 190, 255, 0.08);
}

.repair-button.is-active {
  border-color: rgba(96, 240, 189, 0.76);
  background: linear-gradient(180deg, rgba(96, 240, 189, 0.3), rgba(96, 240, 189, 0.12));
  box-shadow: 0 0 20px rgba(96, 240, 189, 0.2);
}

.repair-button:disabled {
  color: rgba(232, 247, 241, 0.42);
  cursor: not-allowed;
  opacity: 0.72;
}

.mini-wrap {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  width: clamp(170px, 23vw, 260px);
  border: 1px solid rgba(157, 233, 212, 0.32);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.test-button,
.market-button,
.upgrade-button {
  display: none !important;
}

#testModal,
#marketModal,
#upgradeModal {
  display: none !important;
}

.admin-modal {
  width: min(980px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  text-align: left;
  border-color: rgba(255, 217, 120, 0.5);
  background:
    linear-gradient(180deg, rgba(36, 22, 12, 0.98), rgba(9, 14, 19, 0.98)),
    radial-gradient(circle at 50% 0, rgba(255, 217, 120, 0.14), transparent 58%);
}

.admin-modal h2,
.admin-modal h3 {
  margin: 0;
  color: #ffd978;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-modal p {
  margin: 8px 0 14px;
  color: rgba(232, 247, 241, 0.72);
  font-size: 12px;
  line-height: 1.4;
}

.admin-tools-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.2fr);
  gap: 14px;
}

.admin-player-list,
.admin-editor {
  min-height: 320px;
  border: 1px solid rgba(255, 217, 120, 0.22);
  border-radius: 8px;
  background: rgba(2, 8, 16, 0.48);
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.admin-player-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
}

.admin-player-card {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(157, 233, 212, 0.18);
  border-radius: 8px;
  background: rgba(232, 247, 241, 0.06);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.admin-player-card:hover,
.admin-player-card.is-selected {
  border-color: rgba(255, 217, 120, 0.62);
  background: rgba(255, 217, 120, 0.1);
}

.admin-player-card strong {
  color: #fff4c4;
  font-size: 13px;
}

.admin-player-card span {
  color: rgba(232, 247, 241, 0.66);
  font-size: 11px;
}

.admin-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.admin-field {
  display: grid;
  gap: 5px;
  color: rgba(232, 247, 241, 0.76);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-field input,
.admin-field select {
  width: 100%;
  height: 36px;
  border: 1px solid rgba(157, 233, 212, 0.28);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.32);
  color: var(--text);
  padding: 0 10px;
  font: 800 13px/1 ui-sans-serif, system-ui, sans-serif;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

.admin-status {
  min-height: 16px;
  color: #ffd978;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .admin-tools-grid,
  .admin-fields {
    grid-template-columns: 1fr;
  }
}

.mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(232, 247, 241, 0.1);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  text-transform: uppercase;
}

.map-button {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 22px;
  border: 1px solid rgba(157, 233, 212, 0.34);
  border-radius: 6px;
  background: rgba(232, 247, 241, 0.08);
  color: var(--text);
  cursor: pointer;
  font: 900 13px/1 ui-sans-serif, system-ui, sans-serif;
}

.map-button.is-active {
  border-color: rgba(255, 226, 90, 0.82);
  background: rgba(255, 226, 90, 0.18);
  color: #ffe25a;
  box-shadow: 0 0 12px rgba(255, 226, 90, 0.22);
}

.world-map {
  display: grid;
  grid-template-columns: repeat(4, minmax(68px, 1fr));
  gap: 4px;
  margin: 14px 0 16px;
  padding: 12px;
  border: 1px solid rgba(247, 191, 100, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(69, 39, 14, 0.9), rgba(23, 16, 9, 0.88)),
    repeating-linear-gradient(90deg, rgba(255, 244, 196, 0.05) 0 1px, transparent 1px 10px);
  box-shadow: inset 0 0 0 1px rgba(255, 244, 196, 0.08), 0 14px 34px rgba(0, 0, 0, 0.28);
}

.world-cell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 54px;
  border: 1px solid rgba(42, 24, 10, 0.72);
  border-radius: 3px;
  background:
    linear-gradient(135deg, rgba(83, 58, 28, 0.88), rgba(34, 25, 15, 0.86)),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.14) 0 3px, rgba(255, 244, 196, 0.04) 3px 6px);
  color: rgba(255, 232, 151, 0.88);
  font-size: 13px;
  font-weight: 950;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.44);
}

.world-cell.is-known {
  background:
    linear-gradient(135deg, rgba(70, 91, 39, 0.9), rgba(29, 50, 25, 0.88)),
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.12) 0 3px, rgba(255, 244, 196, 0.05) 3px 6px);
  color: #ffe98d;
}

.world-cell.is-current {
  outline: 2px solid #fff4da;
  outline-offset: -4px;
  box-shadow: inset 0 0 0 2px rgba(247, 191, 100, 0.64), 0 0 18px rgba(247, 191, 100, 0.24);
}

.world-cell.is-current::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #f7bf64;
  box-shadow: 0 0 10px rgba(247, 191, 100, 0.8);
}

.world-cell.is-locked {
  color: rgba(255, 232, 151, 0.42);
}

.world-cell small {
  position: absolute;
  left: 6px;
  bottom: 5px;
  color: rgba(232, 247, 241, 0.68);
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.modal-button {
  min-height: 38px;
  border: 1px solid rgba(96, 240, 189, 0.46);
  border-radius: 8px;
  background: rgba(96, 240, 189, 0.12);
  color: var(--text);
  cursor: pointer;
  font: 800 12px/1 ui-sans-serif, system-ui, sans-serif;
  text-transform: uppercase;
}

.modal-button.is-primary {
  border-color: rgba(247, 191, 100, 0.62);
  background: linear-gradient(180deg, rgba(247, 191, 100, 0.34), rgba(216, 135, 55, 0.18));
  color: #fff7d9;
}

.mini-head strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 740;
}

#minimap {
  display: block;
  width: 100%;
  aspect-ratio: 46 / 32;
  cursor: crosshair;
  touch-action: none;
  background: #06151f;
}

#minimap:active {
  cursor: crosshair;
}

.compass {
  position: fixed;
  right: 16px;
  top: 16px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(157, 233, 212, 0.26);
  border-radius: 50%;
  background: rgba(7, 20, 29, 0.7);
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.compass::before {
  content: "";
  width: 2px;
  height: 24px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--amber) 0 42%, rgba(232, 247, 241, 0.38) 42% 100%);
  transform: rotate(0deg);
}

.compass::after {
  content: "N";
  position: absolute;
  top: 5px;
  color: var(--amber);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 55%, transparent 0 45%, rgba(1, 7, 13, 0.28) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.14), transparent 18%, transparent 80%, rgba(0, 0, 0, 0.2));
  mix-blend-mode: multiply;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 8, 16, 0.72);
  backdrop-filter: blur(10px);
}

.modal-backdrop.is-hidden {
  display: none;
}

.modal {
  width: min(360px, calc(100vw - 40px));
  padding: 18px;
  border: 1px solid rgba(239, 96, 91, 0.38);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(18, 31, 41, 0.98), rgba(7, 20, 29, 0.96));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.modal.start-modal {
  display: grid;
  justify-items: center;
  width: min(520px, calc(100vw - 34px));
  padding: 18px 20px 16px;
  border-color: rgba(247, 191, 100, 0.42);
  background:
    linear-gradient(180deg, rgba(18, 31, 41, 0.98), rgba(5, 15, 22, 0.97)),
    radial-gradient(circle at 50% 0, rgba(247, 191, 100, 0.14), transparent 58%);
  box-shadow: 0 32px 110px rgba(0, 0, 0, 0.68), inset 0 0 0 1px rgba(255, 244, 196, 0.08);
}

.start-logo {
  display: block;
  width: min(430px, 100%);
  margin: -8px auto 10px;
  border-radius: 8px;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.42));
}

.start-modal .landing-welcome {
  width: auto;
  margin: 0 0 18px;
  color: #9fe9d4;
  font-size: 13px;
  line-height: 1.25;
}

.start-modal input {
  width: min(360px, 100%);
  height: 44px;
  margin-bottom: 12px;
  border: 1px solid rgba(96, 240, 189, 0.48);
  border-radius: 8px;
  background: rgba(2, 8, 16, 0.72);
  color: var(--text);
  padding: 0 14px;
  font: 850 15px/1 ui-sans-serif, system-ui, sans-serif;
  text-align: center;
}

.auth-register-fields {
  display: none;
  width: min(360px, 100%);
}

.start-modal.is-registering .auth-register-fields {
  display: contents;
}

.start-modal .landing-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(360px, 100%);
  margin-top: 6px;
}

.start-modal .landing-action {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

.start-modal .landing-action.is-secondary {
  border-color: rgba(157, 233, 212, 0.34);
  background: rgba(232, 247, 241, 0.08);
  color: #e8f7f1;
}

.auth-message {
  min-height: 18px;
  margin: 0 0 8px;
  color: #ffd978;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.prototype-note {
  margin: 500px 0 0;
  color: rgba(247, 232, 232, 0.58);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.35;
}

.modal-backdrop.is-clear {
  background: rgba(2, 8, 16, 0.08);
  backdrop-filter: none;
}

.howto-modal {
  text-align: left;
}

.howto-modal h2 {
  text-align: center;
}

.command-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 16px;
}

.command-list span {
  display: block;
  padding: 8px 10px;
  border: 1px solid rgba(232, 247, 241, 0.12);
  border-radius: 8px;
  background: rgba(7, 20, 29, 0.62);
  color: #dff8f0;
  font-size: 12px;
  line-height: 1.35;
}

.command-list kbd {
  display: inline-grid;
  place-items: center;
  min-width: 23px;
  height: 22px;
  margin: 0 2px;
  border: 1px solid rgba(247, 191, 100, 0.5);
  border-radius: 6px;
  background: rgba(31, 18, 8, 0.78);
  color: #ffe4a8;
  font: 950 11px/1 ui-sans-serif, system-ui, sans-serif;
}

.combat-banners {
  position: fixed;
  left: 16px;
  top: 250px;
  z-index: 5;
  display: grid;
  gap: 9px;
  width: min(260px, calc(100vw - 32px));
  pointer-events: none;
}

.combat-banner {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 9px;
  align-items: center;
  min-height: 58px;
  padding: 7px 9px;
  border: 1px solid rgba(232, 247, 241, 0.36);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(6, 15, 22, 0.9), rgba(3, 8, 12, 0.84));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36), inset 0 0 0 1px rgba(255, 244, 196, 0.08);
  opacity: 1;
  transform: translateX(0);
  transition: opacity 160ms ease, transform 160ms ease;
  backdrop-filter: blur(8px);
}

.combat-banner.is-hidden {
  display: none;
}

.combat-banner.is-incoming {
  border-color: rgba(239, 96, 91, 0.48);
  background: linear-gradient(180deg, rgba(64, 25, 31, 0.9), rgba(18, 12, 16, 0.86));
}

.combat-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(247, 191, 100, 0.32);
  border-radius: 8px;
  background: radial-gradient(circle at 50% 42%, rgba(247, 191, 100, 0.26), rgba(7, 20, 29, 0.78));
  font-size: 22px;
}

.combat-icon canvas {
  display: block;
  width: 38px;
  height: 38px;
}

.combat-copy {
  min-width: 0;
}

.combat-kicker {
  display: block;
  margin-bottom: 2px;
  color: rgba(232, 247, 241, 0.58);
  font-size: 8px;
  font-weight: 950;
  text-transform: uppercase;
}

.combat-name {
  display: block;
  overflow: hidden;
  color: #fff4da;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combat-banner.is-multi .combat-name {
  white-space: normal;
}

.combat-hp {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
}

.combat-track {
  height: 7px;
  border: 1px solid rgba(255, 244, 196, 0.18);
  border-radius: 999px;
  background: rgba(3, 9, 12, 0.76);
  overflow: hidden;
}

.combat-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef605b, #ffd978);
}

.combat-value {
  color: #fff3d0;
  font-size: 10px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.modal.is-wide {
  width: min(760px, calc(100vw - 34px));
  max-height: min(760px, calc(100dvh - 34px));
  overflow: auto;
  text-align: left;
}

#shipyardModal {
  --sy-wood: #2a1408;
  --sy-wood-mid: #1a0d06;
  --sy-wood-dark: #070503;
  --sy-panel: rgba(8, 7, 5, 0.88);
  --sy-panel-soft: rgba(28, 17, 8, 0.72);
  --sy-gold: #d8ac55;
  --sy-gold-bright: #ffe2a0;
  --sy-border: rgba(216, 172, 85, 0.58);
  --sy-red: #8d211b;
  --sy-green: #19a14c;
  --sy-blue: #1a81c7;
  --sy-shadow: 0 22px 60px rgba(0, 0, 0, 0.72);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#shipyardModal .shipyard-window {
  position: relative;
  width: min(1220px, 90vw);
  height: min(880px, 85dvh);
  padding: 12px;
  border: 2px solid var(--sy-border);
  border-radius: 6px;
  color: #ede5d6;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.38), transparent 12%, transparent 88%, rgba(0, 0, 0, 0.42)),
    repeating-linear-gradient(0deg, rgba(255, 224, 148, 0.035) 0 1px, transparent 1px 9px),
    linear-gradient(135deg, var(--sy-wood), var(--sy-wood-dark) 42%, var(--sy-wood-mid));
  box-shadow: var(--sy-shadow), inset 0 0 0 1px rgba(255, 235, 178, 0.16), inset 0 0 42px rgba(0, 0, 0, 0.8);
  overflow: auto;
  scrollbar-color: rgba(216, 172, 85, 0.72) rgba(0, 0, 0, 0.45);
}

#shipyardModal .shipyard-window::before,
#shipyardModal .shipyard-window::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 227, 165, 0.52);
  pointer-events: none;
}

#shipyardModal .shipyard-window::before {
  top: 5px;
  left: 5px;
  border-right: 0;
  border-bottom: 0;
}

#shipyardModal .shipyard-window::after {
  right: 5px;
  bottom: 5px;
  border-left: 0;
  border-top: 0;
}

.shipyard-titlebar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  margin-bottom: 10px;
  border: 1px solid rgba(216, 172, 85, 0.42);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.5), rgba(56, 29, 12, 0.9), rgba(0, 0, 0, 0.5)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 16px);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.82);
}

.shipyard-titlebar::before,
.shipyard-titlebar::after {
  content: "⚓";
  margin: 0 20px;
  color: rgba(216, 172, 85, 0.7);
  font-size: 28px;
  text-shadow: 0 2px 4px #000;
}

.shipyard-titlebar h2 {
  margin: 0;
  color: var(--sy-gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 2px 0 #150a03, 0 0 18px rgba(216, 172, 85, 0.45);
}

.shipyard-close {
  position: absolute;
  top: 11px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 222, 143, 0.78);
  border-radius: 4px;
  color: #ffe8a9;
  background: linear-gradient(180deg, #9c2f22, #3c0b08);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.7), 0 0 16px rgba(216, 83, 55, 0.32);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 950;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

.shipyard-close:hover {
  transform: translateY(-1px);
  filter: brightness(1.16);
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.7), 0 0 22px rgba(255, 127, 86, 0.5);
}

.shipyard-main {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: 10px;
  min-height: 378px;
}

.shipyard-section,
.shipyard-panel {
  min-width: 0;
  border: 1px solid rgba(216, 172, 85, 0.34);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 231, 169, 0.04), transparent 18%),
    linear-gradient(135deg, rgba(7, 6, 4, 0.92), rgba(28, 17, 8, 0.78));
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.72);
}

.shipyard-section-title {
  margin: 0;
  padding: 13px 16px 9px;
  color: var(--sy-gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 2px 4px #000;
  border-bottom: 1px solid rgba(216, 172, 85, 0.22);
}

.shipyard-preview {
  position: relative;
  min-height: 268px;
  margin: 0 10px 12px;
  border: 1px solid rgba(216, 172, 85, 0.35);
  border-radius: 4px;
  background:
    radial-gradient(circle at 22% 60%, rgba(32, 92, 42, 0.36), transparent 22%),
    radial-gradient(circle at 80% 20%, rgba(238, 178, 66, 0.2), transparent 24%),
    linear-gradient(180deg, rgba(34, 30, 17, 0.9), rgba(11, 24, 19, 0.9)),
    linear-gradient(120deg, rgba(98, 72, 31, 0.5), rgba(0, 0, 0, 0.1));
  overflow: hidden;
}

.shipyard-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 74%, rgba(0, 0, 0, 0.48), transparent 28%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.48));
  pointer-events: none;
}

#shipyardCanvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 268px;
}

.shipyard-progress-block {
  padding: 0 12px 14px;
}

.shipyard-progress-label {
  margin-bottom: 8px;
  color: #f5dca7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 800;
  text-shadow: 0 2px 4px #000;
}

.shipyard-progress-row {
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 12px;
  align-items: center;
}

.shipyard-progress {
  position: relative;
  height: 30px;
  border: 2px solid rgba(216, 172, 85, 0.58);
  border-radius: 4px;
  background: #050403;
  box-shadow: inset 0 0 10px #000;
  overflow: hidden;
}

.shipyard-progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(180deg, #39d86b, #0c6d2e 62%, #064817);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.24), 0 0 14px rgba(31, 196, 80, 0.48);
  transition: width 220ms ease;
}

.shipyard-progress-value {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff4cf;
  font-size: 14px;
  font-weight: 950;
  text-shadow: 0 2px 3px #000;
  font-variant-numeric: tabular-nums;
}

.shipyard-icon-button,
.shipyard-action,
.shipyard-tab {
  border: 1px solid rgba(216, 172, 85, 0.62);
  color: var(--sy-gold-bright);
  background:
    linear-gradient(180deg, rgba(55, 55, 52, 0.96), rgba(4, 4, 4, 0.94)),
    radial-gradient(circle at 50% 0%, rgba(216, 172, 85, 0.22), transparent 55%);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.88), 0 0 14px rgba(216, 172, 85, 0.14);
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

.shipyard-icon-button:hover,
.shipyard-action:hover,
.shipyard-tab:hover {
  transform: translateY(-1px);
  filter: brightness(1.14);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.86), 0 0 18px rgba(216, 172, 85, 0.34);
}

.shipyard-icon-button {
  width: 54px;
  height: 54px;
  border-radius: 5px;
  font-size: 25px;
}

.shipyard-details-body {
  position: relative;
  display: grid;
  grid-template-columns: 1fr minmax(112px, 170px);
  gap: 16px;
  padding: 22px 20px;
}

.shipyard-stats {
  display: grid;
  gap: 6px;
}

.shipyard-stat {
  display: grid;
  grid-template-columns: 34px minmax(132px, 0.72fr) 1fr;
  gap: 10px;
  align-items: center;
  min-height: 39px;
  border-bottom: 1px solid rgba(216, 172, 85, 0.14);
}

.shipyard-stat-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--sy-gold-bright);
  text-shadow: 0 2px 4px #000;
  font-size: 20px;
  filter: drop-shadow(0 0 6px rgba(216, 172, 85, 0.28));
}

.shipyard-stat-label {
  color: #e7c783;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 850;
}

.shipyard-stat-value {
  color: #ece7dd;
  font-size: 15px;
  font-weight: 850;
  text-shadow: 0 1px 2px #000;
  font-variant-numeric: tabular-nums;
}

.shipyard-badge {
  align-self: start;
  display: grid;
  place-items: center;
  min-height: 152px;
  border: 1px solid rgba(216, 172, 85, 0.35);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 38%, rgba(216, 172, 85, 0.28), transparent 42%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.62));
}

.shipyard-badge-mark {
  display: grid;
  place-items: center;
  width: 96px;
  height: 112px;
  border: 3px solid rgba(216, 172, 85, 0.72);
  border-radius: 16px 16px 26px 26px;
  color: #ffe3a1;
  background: linear-gradient(180deg, #26323b, #0b0c0e);
  box-shadow: 0 0 0 5px rgba(74, 46, 19, 0.5), 0 0 22px rgba(216, 172, 85, 0.28);
  font-size: 46px;
}

.rank-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.rank-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(216, 172, 85, 0.28);
  border-radius: 5px;
  background: rgba(5, 5, 4, 0.72);
}

.rank-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  color: #fff1c2;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.rank-medal {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 244, 196, 0.72);
  border-radius: 50%;
  color: #06121c;
  font-size: 10px;
  font-weight: 950;
  box-shadow: 0 0 12px rgba(216, 172, 85, 0.22);
}

.rank-copy {
  color: #b9b0a0;
  font-size: 11px;
  line-height: 1.35;
}

.shipyard-bottom {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(300px, 1fr) minmax(300px, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.shipyard-panel {
  padding: 0 12px 14px;
}

.shipyard-items,
.shipyard-card-row {
  display: grid;
  gap: 10px;
  margin: 12px 0 14px;
}

.shipyard-items {
  grid-template-columns: repeat(4, minmax(62px, 1fr));
}

.shipyard-card-row {
  grid-template-columns: repeat(3, minmax(82px, 1fr));
}

.shipyard-item,
.shipyard-card {
  position: relative;
  min-height: 88px;
  border: 1px solid rgba(216, 172, 85, 0.48);
  border-radius: 5px;
  background:
    radial-gradient(circle at 50% 26%, rgba(216, 172, 85, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(12, 12, 10, 0.98), rgba(4, 4, 4, 0.96));
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.72);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.shipyard-item:hover,
.shipyard-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 226, 160, 0.84);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.72), 0 0 18px rgba(216, 172, 85, 0.24);
}

.shipyard-item-icon,
.shipyard-card-icon {
  display: grid;
  place-items: center;
  min-height: 56px;
  font-size: 34px;
  text-shadow: 0 3px 6px #000;
}

.shipyard-item-qty,
.shipyard-card-qty {
  position: absolute;
  right: 8px;
  bottom: 7px;
  color: #f4ead8;
  font-size: 14px;
  font-weight: 950;
  text-shadow: 0 2px 3px #000;
  font-variant-numeric: tabular-nums;
}

.shipyard-card {
  min-height: 132px;
  padding: 9px;
}

.shipyard-card-title {
  color: #efe2c6;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.shipyard-card-icon {
  min-height: 78px;
  font-size: 44px;
}

.shipyard-card.is-locked {
  opacity: 0.56;
  filter: grayscale(0.5);
}

.shipyard-action {
  display: block;
  width: min(260px, 86%);
  min-height: 38px;
  margin: 0 auto;
  border-radius: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  font-weight: 850;
}

@media (max-width: 980px) {
  #shipyardModal {
    padding: 10px;
  }

  #shipyardModal .shipyard-window {
    width: min(96vw, 1220px);
    height: min(90dvh, 880px);
  }

  .shipyard-main,
  .shipyard-bottom {
    grid-template-columns: 1fr;
  }

  .shipyard-details-body {
    grid-template-columns: 1fr;
  }

  .shipyard-badge {
    display: none;
  }

}

@media (max-width: 560px) {
  #shipyardModal .shipyard-window {
    padding: 8px;
  }

  .shipyard-titlebar {
    min-height: 52px;
  }

  .shipyard-titlebar::before,
  .shipyard-titlebar::after {
    display: none;
  }

  .shipyard-close {
    width: 38px;
    height: 38px;
    font-size: 24px;
  }

  .shipyard-section-title {
    font-size: 16px;
  }

  .shipyard-stat {
    grid-template-columns: 30px 1fr;
  }

  .shipyard-stat-value {
    grid-column: 2;
  }

    .rank-grid,
    .shipyard-items,
    .shipyard-card-row {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

  .shipyard-progress-row {
    grid-template-columns: 1fr;
  }
}

.bazar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 16px;
}

.bazar-tile {
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(247, 191, 100, 0.24);
  border-radius: 8px;
  background: rgba(31, 18, 8, 0.64);
  color: #ffe4a8;
  font-size: 12px;
  font-weight: 850;
  text-align: left;
}

.modal h2 {
  margin: 0 0 8px;
  color: #fff7ed;
  font-size: 22px;
  line-height: 1.1;
}

.modal p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.tool-grid,
.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.tool-field,
.shop-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(232, 247, 241, 0.14);
  border-radius: 8px;
  background: rgba(7, 20, 29, 0.62);
}

.tool-field label,
.shop-card strong {
  display: block;
  margin-bottom: 7px;
  color: #fff7d9;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.tool-field input,
.tool-field select {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(157, 233, 212, 0.22);
  border-radius: 7px;
  background: rgba(2, 8, 16, 0.64);
  color: var(--text);
  padding: 6px 8px;
  font: 800 12px/1.2 ui-sans-serif, system-ui, sans-serif;
}

.shop-card span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.shop-card button {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(96, 240, 189, 0.46);
  border-radius: 7px;
  background: rgba(96, 240, 189, 0.16);
  color: var(--text);
  cursor: pointer;
  font: 850 12px/1 ui-sans-serif, system-ui, sans-serif;
}

.upgrade-level {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.respawn-button {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(96, 240, 189, 0.64);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(96, 240, 189, 0.32), rgba(96, 240, 189, 0.14));
  color: var(--text);
  cursor: pointer;
  font: 800 13px/1 ui-sans-serif, system-ui, sans-serif;
  text-transform: uppercase;
}

@media (max-width: 680px) {
  .landing-welcome {
    font-size: 12px;
  }

  .landing-action {
    grid-template-columns: 54px 1fr;
    min-height: 52px;
    font-size: 17px;
  }

  .landing-icon {
    font-size: 25px;
  }

  .resource-strip {
    left: 54px;
    right: 8px;
    width: auto;
    gap: 6px;
    padding: 5px 7px;
    transform: none;
  }

  .resource-pill {
    min-width: 0;
    font-size: 11px;
  }

  .hud-toggle {
    left: 8px;
    width: 38px;
  }

  .hud {
    top: calc(52px + env(safe-area-inset-top));
    left: 8px;
    width: min(220px, calc(58vw - 12px));
  }

  .status {
    padding: 9px;
    border-radius: 7px;
  }

  h1 {
    font-size: 14px;
  }

  .readouts {
    grid-template-columns: 1fr 1fr;
    gap: 5px 7px;
  }

  .readout {
    padding-top: 6px;
  }

  .readout:nth-child(4),
  .readout:nth-child(5),
  .readout:nth-child(7) {
    display: none;
  }

  .label {
    font-size: 8px;
  }

  .value {
    font-size: 11px;
  }

  .command-panel {
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: auto;
    min-width: 0;
    padding: 8px;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "left right"
      "slots slots";
    gap: 7px;
    transform: none;
  }

  .command-panel.is-collapsed {
    transform: translateY(calc(100% + 20px));
  }

  .command-panel-toggle {
    left: 50%;
    bottom: calc(154px + env(safe-area-inset-bottom));
  }

  .combat-banners {
    left: 8px;
    top: calc(104px + env(safe-area-inset-top));
    width: min(218px, calc(58vw - 10px));
    gap: 6px;
  }

  .combat-banner {
    grid-template-columns: 36px 1fr;
    min-height: 50px;
    padding: 6px;
  }

  .combat-icon {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }

  .combat-name {
    font-size: 10px;
  }

  .combat-value {
    font-size: 9px;
  }

  .panel-crest {
    display: none;
  }

  .panel-left,
  .panel-right {
    gap: 5px;
  }

  .stat-row {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 5px;
    min-height: 20px;
    padding: 3px 5px;
  }

  .stat-label,
  .stat-value {
    font-size: 9px;
  }

  .stat-value {
    grid-column: 1 / -1;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .stat-track {
    height: 8px;
  }

  .panel-slots {
    display: flex;
    gap: 7px;
    padding-bottom: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .panel-slots::-webkit-scrollbar {
    display: none;
  }

  .slot,
  .panel-button,
  .ammo-button,
  .ammo-select,
  .ammo-select-toggle,
  .rocket-button,
  .repair-button,
  .logout-button,
  .shoot-button {
    flex: 0 0 62px;
    min-height: 52px;
    min-width: 62px;
    padding: 6px 5px;
    scroll-snap-align: start;
  }

  .slot-icon {
    margin-bottom: 4px;
    font-size: 14px;
  }

  .slot-name {
    font-size: 8px;
  }

  .slot-value {
    font-size: 10px;
  }

  .mini-wrap {
    top: calc(8px + env(safe-area-inset-top));
    right: 8px;
    bottom: auto;
    width: min(148px, calc(42vw - 10px));
  }

  .compass {
    right: 8px;
    top: auto;
    bottom: calc(156px + env(safe-area-inset-bottom));
    width: 38px;
    height: 38px;
  }

  .mini-head {
    padding: 6px 7px;
    font-size: 8px;
  }

  .mini-head strong {
    font-size: 9px;
  }
}

@media (max-width: 680px) and (max-height: 720px) {
  .landing-action {
    min-height: 46px;
  }

  .hud {
    width: 176px;
  }

  .title-row {
    margin-bottom: 6px;
  }

  .readout:nth-child(2),
  .readout:nth-child(6) {
    display: none;
  }

  .command-panel {
    padding: 7px;
  }

  .command-panel-toggle {
    bottom: calc(136px + env(safe-area-inset-bottom));
  }

  .slot,
  .panel-button,
  .ammo-button,
  .ammo-select,
  .ammo-select-toggle,
  .rocket-button,
  .repair-button,
  .logout-button,
  .shoot-button {
    flex-basis: 58px;
    min-width: 58px;
    min-height: 48px;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .landing-action {
    min-height: 46px;
  }

  .hud {
    width: 220px;
  }

  .command-panel {
    left: 240px;
    right: 12px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: auto;
    min-width: 0;
    transform: none;
  }

  .command-panel.is-collapsed {
    transform: translateY(calc(100% + 20px));
  }

  .command-panel-toggle {
    left: calc(240px + (100vw - 252px) / 2);
    bottom: calc(118px + env(safe-area-inset-bottom));
  }

  .combat-banners {
    top: 98px;
    width: 210px;
  }

  .mini-wrap {
    top: 12px;
    width: 150px;
    bottom: auto;
  }
}
