:root {
  --bg: #0e0f10;
  --panel: #17191b;
  --panel-2: #202225;
  --panel-3: #282b2f;
  --text: #f4efe7;
  --muted: #a9a197;
  --faint: #6f6a63;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #b73531;
  --accent-2: #ef524c;
  --success: #6bd58f;
  --danger: #ff6f61;
  --warning: #ffc857;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 35% -10%, rgba(239, 82, 76, 0.16), transparent 28rem),
    linear-gradient(135deg, #111315 0%, #0b0c0d 55%, #17120f 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-theme="normal"] {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #f5f6f8;
  --panel-3: #e8eaee;
  --text: #171717;
  --muted: #5d6570;
  --faint: #8b94a0;
  --line: rgba(17, 24, 39, 0.13);
  --shadow: 0 18px 46px rgba(17, 24, 39, 0.12);
  background: #ffffff;
  color-scheme: light;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) minmax(360px, 430px);
  min-height: 100vh;
}

.app-shell.is-detail-mode {
  grid-template-columns: 300px minmax(0, 1fr);
}

.app-shell.is-skins-mode {
  grid-template-columns: 300px minmax(0, 1fr);
}

.app-shell.is-detail-mode .content {
  display: none;
}

.app-shell.is-skins-mode .detail-panel {
  display: none;
}

.app-shell.is-detail-mode .detail-panel {
  grid-column: 2;
  width: 100%;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(17, 18, 20, 0.92);
  backdrop-filter: blur(18px);
  z-index: 20;
  overflow-x: hidden;
}

body[data-theme="normal"] .sidebar {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 12px 0 36px rgba(17, 24, 39, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 28px;
}

.brand-link {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.brand-link:hover h1,
.brand-link:focus-visible h1 {
  color: var(--accent-2);
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(239, 82, 76, 0.18), transparent 48%),
    linear-gradient(145deg, #34383c, #17191b 58%, #0c0d0e);
  border: 1px solid rgba(239, 82, 76, 0.32);
  box-shadow: 0 14px 35px rgba(239, 82, 76, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.42));
}

.brand h1 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.1;
}

.brand p,
.eyebrow,
.results-head p,
.detail-hero p,
.muted {
  margin: 0;
  color: var(--muted);
}

.brand p {
  margin-top: 4px;
  font-size: 0.84rem;
}

.theme-switch {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin: 0 6px 18px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

body[data-theme="normal"] .theme-switch {
  background: #f7f8fa;
}

.theme-switch > span:first-child {
  text-align: right;
}

.theme-toggle {
  position: relative;
  width: 52px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(239, 82, 76, 0.38);
  border-radius: 999px;
  background: linear-gradient(145deg, #34383c, #121314);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.theme-toggle span {
  position: absolute;
  top: 4px;
  left: 26px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 16px rgba(239, 82, 76, 0.4);
  transition: transform 180ms ease, left 180ms ease, background 180ms ease;
}

.theme-toggle[aria-pressed="false"] {
  background: linear-gradient(145deg, #d8cbb9, #f5efe6);
}

.theme-toggle[aria-pressed="false"] span {
  left: 6px;
  background: #5d5449;
}

.category-nav {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-gutter: stable;
}

.category-button,
.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  padding: 0 16px 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.category-button:hover,
.category-button[aria-pressed="true"],
.sidebar-link:hover,
.sidebar-link[aria-pressed="true"] {
  background: rgba(239, 82, 76, 0.1);
  border-color: rgba(239, 82, 76, 0.35);
  color: var(--text);
}

.category-button:hover,
.sidebar-link:hover {
  transform: translateX(3px);
}

.category-button strong,
.sidebar-link strong {
  color: var(--accent-2);
  font-size: 0.82rem;
  margin-left: 10px;
  padding-right: 4px;
}

.sidebar-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.sidebar-section p {
  margin: 0 6px 8px;
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wipe-countdown {
  margin-top: auto;
  padding: 14px 12px;
  border: 1px solid rgba(239, 82, 76, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(239, 82, 76, 0.12), rgba(20, 21, 23, 0.6)),
    rgba(14, 15, 16, 0.72);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

body[data-theme="normal"] .wipe-countdown {
  background:
    linear-gradient(145deg, rgba(239, 82, 76, 0.09), rgba(255, 255, 255, 0.78)),
    #ffffff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.wipe-countdown p {
  margin: 0;
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wipe-countdown strong {
  display: block;
  margin-top: 6px;
  color: var(--accent-2);
  font-size: 1.15rem;
  line-height: 1;
}

.wipe-countdown span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
}

.support-note {
  margin-top: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

body[data-theme="normal"] .support-note {
  background: #f7f8fa;
}

.support-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.support-progress {
  display: grid;
  gap: 7px;
  margin-top: 11px;
}

.support-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.support-progress-head strong {
  flex: 0 0 auto;
  color: #baae18;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
}

.support-progress-track {
  position: relative;
  height: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
}

body[data-theme="normal"] .support-progress-track {
  background: rgba(17, 24, 39, 0.08);
}

.support-progress-track span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef524c, #baae18, #49d17c);
  transition: width 220ms ease;
}

.support-progress small,
.support-admin small {
  color: var(--faint);
  font-size: 0.66rem;
  line-height: 1.25;
}

.support-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.donate-button,
.support-admin-toggle,
.support-login-form button,
.support-settings-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: var(--accent-2);
  color: #1a0d05;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(239, 82, 76, 0.2);
  cursor: pointer;
}

.support-admin-toggle {
  background: rgba(239, 82, 76, 0.14);
  color: var(--accent-2);
  box-shadow: none;
  border: 1px solid rgba(239, 82, 76, 0.34);
}

.support-admin {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.support-login-form,
.support-settings-form {
  display: grid;
  gap: 8px;
}

.support-login-form label,
.support-settings-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.support-login-form input,
.support-settings-form input {
  min-width: 0;
  min-height: 34px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(50, 54, 59, 0.92);
  color: var(--text);
  padding: 0 9px;
  outline: none;
  font-size: 0.78rem;
}

body[data-theme="normal"] .support-login-form input,
body[data-theme="normal"] .support-settings-form input {
  background: #ffffff;
  border-color: rgba(17, 24, 39, 0.16);
}

.time-format-switch {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.time-format-switch span:first-child {
  text-align: right;
}

.time-format-toggle,
.calculator-mode-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(239, 82, 76, 0.38);
  border-radius: 999px;
  background: linear-gradient(145deg, #34383c, #121314);
  cursor: pointer;
}

.time-format-toggle span,
.calculator-mode-toggle span {
  position: absolute;
  top: 3px;
  left: 4px;
  width: 16px;
  height: 16px;
  margin: 0;
  border-radius: 50%;
  background: var(--accent-2);
  transition: left 180ms ease;
}

.time-format-toggle[aria-pressed="true"] span,
.calculator-mode-toggle[aria-pressed="true"] span {
  left: 22px;
}

body[data-theme="normal"] .time-format-toggle,
body[data-theme="normal"] .calculator-mode-toggle {
  background: linear-gradient(145deg, #e8eaee, #ffffff);
}

.content {
  min-width: 0;
  padding: 0 26px 36px;
}

.topbar {
  position: sticky;
  top: 0;
  display: flex;
  gap: 12px;
  padding: 18px 0;
  background: linear-gradient(180deg, rgba(14, 15, 16, 0.96), rgba(14, 15, 16, 0.74));
  backdrop-filter: blur(16px);
  z-index: 10;
}

.search-wrap {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-2);
  font-size: 1.3rem;
}

.search-wrap input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(32, 34, 37, 0.86);
  color: var(--text);
  outline: none;
  padding: 0 18px 0 48px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.search-wrap input:focus {
  border-color: rgba(239, 82, 76, 0.65);
  box-shadow: 0 0 0 4px rgba(239, 82, 76, 0.14);
  background: rgba(40, 43, 47, 0.96);
}

.beta-disclaimer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  max-width: 210px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(239, 82, 76, 0.28);
  border-radius: 8px;
  background: rgba(239, 82, 76, 0.1);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.25;
}

.beta-disclaimer strong {
  color: var(--accent);
  letter-spacing: 0.08em;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(32, 34, 37, 0.78);
}

.language-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 1.18rem;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.language-button:hover,
.language-button[aria-pressed="true"] {
  transform: translateY(-1px);
  border-color: rgba(239, 82, 76, 0.46);
  background: rgba(239, 82, 76, 0.16);
}

.menu-button {
  display: none;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

.hero-band {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  min-height: 236px;
  padding: 30px;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(8, 9, 10, 0.48) 0%, rgba(18, 18, 19, 0.2) 52%, rgba(239, 82, 76, 0.12) 100%),
    url("./assets/hero-raid-action.png") center / cover no-repeat;
  box-shadow: var(--shadow);
  overflow: hidden;
}

body[data-theme="normal"] .hero-band {
  background:
    linear-gradient(120deg, rgba(30, 24, 18, 0.42) 0%, rgba(30, 24, 18, 0.12) 52%, rgba(239, 82, 76, 0.18) 100%),
    url("./assets/hero-raid-action.png") center / cover no-repeat;
}

.eyebrow {
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-band h2 {
  max-width: 620px;
  margin: 8px 0 0;
  font-family: Impact, Haettenschweiler, "Arial Black", "Segoe UI Black", system-ui, sans-serif;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  color: #f6eadc;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.6), 0 16px 32px rgba(0, 0, 0, 0.55);
}

.stats-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stats-strip div {
  min-width: 112px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 15, 16, 0.68);
}

.stats-strip strong,
.stats-strip span {
  display: block;
}

.stats-strip strong {
  font-size: 1.45rem;
}

.stats-strip span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
}

.results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0 16px;
}

.results-head h3 {
  margin: 4px 0 0;
  font-size: 1.5rem;
}

.result-pill {
  white-space: nowrap;
  padding: 8px 12px;
  border: 1px solid rgba(239, 82, 76, 0.28);
  border-radius: 999px;
  background: rgba(239, 82, 76, 0.1);
  color: var(--accent-2);
  font-weight: 800;
  font-size: 0.82rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.structure-card {
  display: grid;
  grid-template-rows: minmax(0, 3fr) minmax(54px, 1fr);
  min-height: 276px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 25, 27, 0.92);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.structure-card:hover,
.structure-card[aria-pressed="true"] {
  transform: translateY(-3px);
  border-color: rgba(239, 82, 76, 0.5);
  background: rgba(32, 34, 37, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.structure-card[aria-pressed="true"] {
  outline: 2px solid rgba(239, 82, 76, 0.3);
}

.structure-group-card {
  grid-template-rows: auto minmax(0, 1fr);
  cursor: default;
}

.structure-group-card:hover {
  transform: translateY(-3px);
}

.group-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 15, 16, 0.42);
}

.group-card-head strong {
  font-size: 0.9rem;
  line-height: 1.05;
}

.group-card-head span {
  color: var(--accent-2);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.group-card-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
}

.group-card-item {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 5px;
  min-width: 0;
  padding: 10px 8px 8px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 180ms ease;
}

.group-card-item:last-child {
  border-right: 0;
}

.group-card-item:hover,
.group-card-item[aria-pressed="true"] {
  background: rgba(239, 82, 76, 0.1);
}

.group-card-item[aria-pressed="true"] {
  box-shadow: inset 0 0 0 2px rgba(239, 82, 76, 0.28);
}

.group-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.group-image-wrap img {
  width: 108%;
  height: 108%;
  object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.35));
}

.group-card-item[data-id="chainlink-fence"] .group-image-wrap img,
.group-card-item[data-id="chainlink-fence-gate"] .group-image-wrap img,
.group-card-item[data-id="prison-cell-wall"] .group-image-wrap img,
.group-card-item[data-id="prison-cell-gate"] .group-image-wrap img {
  width: 92%;
  height: 92%;
}

.group-card-item[data-id="sheet-metal-double-door"] .group-image-wrap img,
.group-card-item[data-id="wooden-double-door"] .group-image-wrap img,
.group-card-item[data-id="armored-double-door"] .group-image-wrap img,
.group-card-item[data-id="sheet-metal-door"] .group-image-wrap img,
.group-card-item[data-id="wooden-door"] .group-image-wrap img,
.group-card-item[data-id="armored-door"] .group-image-wrap img {
  width: 92%;
  height: 92%;
}

.group-item-copy {
  display: grid;
  gap: 2px;
  min-height: 34px;
  color: var(--muted);
  line-height: 1.05;
  text-align: center;
}

.group-item-copy strong {
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 900;
}

.group-item-copy span {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
}

.card-image-wrap {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 6px 20px;
  background: linear-gradient(145deg, #242629, #151719);
}

.card-image-wrap img {
  width: 106%;
  height: 106%;
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.38));
}

.structure-card[data-category="Walls"] .card-image-wrap img {
  width: 90%;
  height: 90%;
}

.structure-card[data-category="Windows"]:not([data-id="armored-window-bars"]) .card-image-wrap img,
.structure-card[data-category="Barricades"] .card-image-wrap img {
  width: 90%;
  height: 90%;
}

.structure-card[data-id="auto-turret"] .card-image-wrap img,
.structure-card[data-id="sam-site"] .card-image-wrap img {
  width: 90%;
  height: 90%;
}

.structure-card[data-id="tool-cupboard"] .card-image-wrap img,
.structure-card[data-id="vending-machine"] .card-image-wrap img,
.structure-card[data-id="shop-front"] .card-image-wrap img,
.structure-card[data-id="metal-shop-front"] .card-image-wrap img,
.structure-card[data-id="garage-door"] .card-image-wrap img,
.structure-card[data-id="sheet-metal-double-door"] .card-image-wrap img,
.structure-card[data-id="wooden-double-door"] .card-image-wrap img,
.structure-card[data-id="armored-double-door"] .card-image-wrap img,
.structure-card[data-id="sheet-metal-door"] .card-image-wrap img,
.structure-card[data-id="wooden-door"] .card-image-wrap img,
.structure-card[data-id="armored-door"] .card-image-wrap img {
  width: 90%;
  height: 90%;
}

.structure-card[data-id="tool-cupboard"] .card-image-wrap img,
.structure-card[data-id="vending-machine"] .card-image-wrap img,
.structure-card[data-id="shop-front"] .card-image-wrap img,
.structure-card[data-id="metal-shop-front"] .card-image-wrap img {
  width: 85%;
  height: 85%;
}

.card-body {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 3px;
  padding: 6px 12px 7px;
}

.card-category {
  position: relative;
  z-index: 3;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(239, 82, 76, 0.12);
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
}

.card-image-wrap .card-category {
  position: absolute;
  top: auto;
  left: auto;
  right: 12px;
  bottom: 12px;
}

.card-body strong {
  font-size: 0.82rem;
  line-height: 1.05;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.38);
}

.card-body > span:not(.variant-note) {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1;
}

.empty-state {
  padding: 44px 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
  background: rgba(23, 25, 27, 0.65);
}

.skins-view {
  padding: 26px 0 40px;
}

.skins-back {
  margin-bottom: 18px;
}

.skins-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.skins-head p {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.skins-head h3 {
  margin: 4px 0 0;
  font-size: 1.7rem;
}

.skins-head a {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid rgba(239, 82, 76, 0.35);
  border-radius: 8px;
  color: var(--accent-2);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.skins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.skin-card a {
  display: grid;
  grid-template-rows: minmax(170px, 1fr) auto;
  min-height: 248px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(23, 25, 27, 0.92);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

body[data-theme="normal"] .skin-card a {
  background: rgba(240, 235, 226, 0.86);
}

.skin-card a:hover {
  transform: translateY(-3px);
  border-color: rgba(239, 82, 76, 0.48);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
}

.skin-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background:
    radial-gradient(circle at 50% 35%, rgba(239, 82, 76, 0.16), transparent 48%),
    linear-gradient(145deg, #242629, #151719);
}

body[data-theme="normal"] .skin-image-wrap {
  background:
    radial-gradient(circle at 50% 35%, rgba(239, 82, 76, 0.18), transparent 48%),
    linear-gradient(145deg, #d8d0c1, #bdb2a1);
}

.skin-image-wrap img {
  width: 100%;
  max-width: 184px;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.36));
}

.skin-copy {
  display: grid;
  gap: 5px;
  padding: 11px 12px 12px;
}

.skin-copy strong {
  min-height: 2.1em;
  font-size: 0.9rem;
  line-height: 1.08;
}

.skin-copy span {
  color: var(--accent-2);
  font-size: 0.86rem;
  font-weight: 900;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
  gap: 18px;
  margin: 28px 0 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(23, 25, 27, 0.82);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2);
}

body[data-theme="normal"] .site-footer {
  background: #f3f4f6;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
}

.footer-copy p {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-copy h3 {
  margin: 8px 0;
  font-size: 1.35rem;
  line-height: 1.1;
}

.footer-copy span {
  display: block;
  color: var(--muted);
  line-height: 1.5;
}

.discord-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 148px;
  padding: 14px;
  border: 1px solid rgba(239, 82, 76, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(239, 82, 76, 0.12), rgba(18, 19, 21, 0.72)),
    rgba(14, 15, 16, 0.78);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

body[data-theme="normal"] .discord-card {
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.discord-card:hover {
  transform: translateY(-2px);
  border-color: rgba(239, 82, 76, 0.52);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.discord-card img {
  width: 112px;
  height: 112px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.discord-card span {
  display: grid;
  gap: 8px;
}

.discord-card strong {
  font-size: 1.18rem;
  line-height: 1.1;
}

.discord-card em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
}

.detail-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: rgba(18, 19, 21, 0.96);
  box-shadow: var(--shadow);
}

.detail-content {
  padding: 22px;
  max-width: 920px;
  margin: 0 auto;
}

.back-button {
  min-height: 42px;
  margin-bottom: 16px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(32, 34, 37, 0.9);
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

body[data-theme="normal"] .back-button {
  border-color: rgba(17, 24, 39, 0.16);
  background: #f3f4f6;
  color: #171717;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}

.back-button:hover {
  transform: translateY(-1px);
  border-color: rgba(239, 82, 76, 0.5);
  background: rgba(239, 82, 76, 0.12);
}

.detail-empty {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 100vh;
  padding: 28px;
  text-align: center;
}

.detail-empty-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  border-radius: 8px;
  background: rgba(239, 82, 76, 0.12);
  color: var(--accent-2);
  font-size: 2rem;
}

.detail-empty h2,
.detail-empty p {
  max-width: 320px;
  margin: 0;
}

.detail-empty p {
  margin-top: 10px;
  color: var(--muted);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding-bottom: 14px;
}

.detail-hero img {
  width: 100%;
  max-width: 260px;
  height: 210px;
  object-fit: contain;
  justify-self: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, #242629, #151719);
  filter: drop-shadow(0 20px 32px rgba(0, 0, 0, 0.34));
}

.detail-hero h2 {
  margin: 10px 0 4px;
  font-size: 2rem;
  line-height: 1.05;
}

.variant-note {
  display: inline-flex;
  margin-top: 10px;
  padding: 6px 9px;
  border: 1px solid rgba(239, 82, 76, 0.32);
  border-radius: 999px;
  background: rgba(239, 82, 76, 0.12);
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
}

.variant-note-card {
  justify-self: center;
  margin-top: 1px;
  padding: 3px 6px;
  font-size: 0.56rem;
  line-height: 1;
  color: var(--muted);
  font-weight: 950;
  text-align: center;
  align-items: center;
  justify-content: center;
}

.group-item-copy .variant-note-card {
  justify-self: center;
  max-width: 100%;
  margin-top: 0;
  padding: 2px 5px;
  font-size: 0.5rem;
  white-space: normal;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.recommendation-card,
.detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(32, 34, 37, 0.74);
}

.recommendation-card {
  padding: 16px;
}

.recommendation-card h3,
.section-title h3 {
  margin: 0;
  font-size: 0.95rem;
}

.recommendation-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.money-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(73, 209, 124, 0.14);
  color: #49d17c;
  font-size: 0.82rem;
  font-weight: 950;
  text-shadow: 0 0 12px rgba(73, 209, 124, 0.45);
  box-shadow: inset 0 0 0 1px rgba(73, 209, 124, 0.42), 0 8px 16px rgba(0, 0, 0, 0.24);
}

.recommendation-card strong,
.recommendation-card > span {
  display: block;
}

.recommendation-card strong {
  margin-top: 14px;
  line-height: 1.25;
}

.combo-name-icons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.combo-name-icons img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.34));
}

.recommendation-card > span {
  margin-top: 8px;
  color: var(--accent-2);
  font-weight: 900;
}

.sulfur-cost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #baae18;
  font-weight: 900;
  white-space: nowrap;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.48);
}

.sulfur-cost img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.35));
}

.detail-section {
  margin-top: 12px;
  overflow: hidden;
}

.detail-content.is-eco-mode .recommendation-grid + .detail-section {
  display: none;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}

.section-title span {
  color: var(--accent-2);
  font-weight: 900;
}

.calculator-title {
  align-items: start;
}

.calculator-mode-switch {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  min-width: 260px;
  color: var(--faint);
  font-size: 0.66rem;
  font-weight: 950;
  text-transform: uppercase;
}

.calculator-mode-switch > span:first-child {
  text-align: right;
}

.calculator-mode-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.side-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.side-selector > div {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

body[data-theme="normal"] .side-selector > div {
  background: #ffffff;
}

.side-selector button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.side-selector button[aria-pressed="true"] {
  border-color: rgba(239, 82, 76, 0.42);
  background: rgba(239, 82, 76, 0.14);
  color: var(--text);
}

.combo-list {
  display: grid;
}

.combo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.combo-row:last-child {
  border-bottom: 0;
}

.combo-row span {
  color: var(--muted);
}

.combo-row-main {
  display: grid;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.combo-progress {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) auto;
  align-items: center;
  gap: 8px;
  max-width: 260px;
}

.combo-progress-track {
  position: relative;
  display: block;
  height: 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.combo-progress-track span {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  width: var(--break-progress);
  border-radius: inherit;
  background: linear-gradient(90deg, #d94a38 0%, #d5bd22 68%, var(--break-color) 100%);
  box-shadow: 0 0 14px rgba(73, 209, 124, 0.2);
}

.combo-progress em {
  color: var(--break-color);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 950;
}

.combo-row strong {
  white-space: nowrap;
  color: var(--text);
}

.durability-list {
  display: grid;
}

.durability-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.durability-row:last-child {
  border-bottom: 0;
}

.durability-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.durability-item img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 6px 9px rgba(0, 0, 0, 0.35));
}

.durability-item span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.durability-item strong {
  color: var(--text);
  line-height: 1.1;
}

.durability-item em,
.durability-row > span {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
}

.durability-needed {
  justify-self: end;
  min-width: 92px;
  padding: 7px 10px;
  border: 1px solid rgba(186, 174, 24, 0.45);
  border-radius: 8px;
  background: rgba(186, 174, 24, 0.12);
  color: #f1df38 !important;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
}

.durability-row > strong {
  justify-self: end;
}

.muted-cost {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.calculator {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
  padding: 16px;
}

.calculator.is-eco {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  max-height: 430px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.calculator label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.explosive-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
}

.eco-label {
  align-items: flex-start;
}

.eco-label > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.eco-label strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eco-label em {
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  line-height: 1.1;
}

.explosive-label img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 6px 9px rgba(0, 0, 0, 0.35));
}

.eco-label img {
  width: 30px;
  height: 30px;
}

.calculator-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.12);
}

.calculator input {
  min-height: 46px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(50, 54, 59, 0.92);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

body[data-theme="normal"] .calculator input {
  border-color: rgba(17, 24, 39, 0.16);
  background: #ffffff;
}

.calculator input:focus {
  border-color: rgba(239, 82, 76, 0.65);
  box-shadow: 0 0 0 3px rgba(239, 82, 76, 0.12);
}

.primary-button {
  grid-column: 1 / -1;
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(145deg, #49d17c, #229b55);
  color: #05140b;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(73, 209, 124, 0.22);
  transition: transform 180ms ease, filter 180ms ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.07);
}

.calculator-result {
  display: none;
  margin: 0 16px 16px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.calculator-result strong,
.calculator-result span {
  display: block;
}

.calculator-result span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.35;
}

.calculator-result .sulfur-cost,
.recommendation-card .sulfur-cost,
.combo-row .sulfur-cost {
  display: inline-flex;
  color: #baae18;
}

.calculator-result.valid,
.calculator-result.invalid,
.calculator-result.warning {
  display: block;
}

.calculator-result.valid {
  border-color: rgba(107, 213, 143, 0.34);
  background: rgba(107, 213, 143, 0.1);
}

.calculator-result.valid.is-overkill {
  border-color: rgba(107, 213, 143, 0.34);
  background: rgba(107, 213, 143, 0.1);
}

.calculator-result .break-progress {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.calculator-result .break-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.break-progress-head b,
.break-progress-head em {
  font-style: normal;
  font-size: 0.82rem;
}

.break-progress-head b {
  color: var(--text);
}

.break-progress-head em {
  color: var(--break-color);
  font-weight: 950;
}

.calculator-result .break-progress-track {
  position: relative;
  display: block;
  height: 12px;
  margin-top: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
}

.calculator-result .break-progress-track span {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  width: var(--break-progress);
  margin-top: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #d94a38 0%, #d5bd22 68%, var(--break-color) 100%);
  box-shadow: 0 0 18px rgba(73, 209, 124, 0.28);
}

.calculator-result .break-progress-copy {
  margin-top: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.calculator-result.invalid .break-progress-head em {
  color: var(--break-color);
}

.calculator-result.invalid .break-progress-track span {
  background: linear-gradient(90deg, #d94a38 0%, var(--break-color) 100%);
  box-shadow: 0 0 14px rgba(213, 189, 34, 0.24);
}

.overkill-note {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 200, 87, 0.42);
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(255, 200, 87, 0.16), rgba(239, 82, 76, 0.1));
  color: #ffd36f;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.24), 0 10px 24px rgba(0, 0, 0, 0.22);
}

.overkill-note b {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #ffc857;
  color: #1b1208;
  font-size: 0.9rem;
  line-height: 1;
  box-shadow: 0 0 0 2px rgba(255, 200, 87, 0.18);
}

.calculator-result.invalid {
  border-color: rgba(255, 111, 97, 0.34);
  background: rgba(255, 111, 97, 0.1);
}

.calculator-result.warning {
  border-color: rgba(255, 200, 87, 0.34);
  background: rgba(255, 200, 87, 0.1);
}

.muted {
  padding: 16px;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: rgba(0, 0, 0, 0.55);
}

body[data-theme="normal"] .topbar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.78));
}

body[data-theme="normal"] .search-wrap input,
body[data-theme="normal"] .language-switcher,
body[data-theme="normal"] .structure-card,
body[data-theme="normal"] .empty-state,
body[data-theme="normal"] .detail-panel,
body[data-theme="normal"] .calculator-result,
body[data-theme="normal"] .stats-strip div {
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
}

body[data-theme="normal"] .detail-section,
body[data-theme="normal"] .recommendation-card,
body[data-theme="normal"] .combo-row {
  background: #f3f4f6;
}

body[data-theme="normal"] .detail-hero img {
  background: linear-gradient(145deg, #f2f3f5, #e3e6eb);
}

body[data-theme="normal"] .calculator-result.valid,
body[data-theme="normal"] .calculator-result.valid.is-overkill {
  border-color: rgba(39, 154, 86, 0.35);
  background: rgba(39, 154, 86, 0.1);
}

body[data-theme="normal"] .calculator-result.invalid {
  border-color: rgba(204, 65, 52, 0.3);
  background: rgba(204, 65, 52, 0.08);
}

body[data-theme="normal"] .calculator-result.warning {
  border-color: rgba(180, 125, 26, 0.34);
  background: rgba(180, 125, 26, 0.1);
}

body[data-theme="normal"] .break-progress-track {
  border-color: rgba(17, 24, 39, 0.12);
  background: rgba(17, 24, 39, 0.08);
}

body[data-theme="normal"] .combo-progress-track {
  border-color: rgba(17, 24, 39, 0.12);
  background: rgba(17, 24, 39, 0.08);
}

body[data-theme="normal"] .structure-card:hover,
body[data-theme="normal"] .structure-card[aria-pressed="true"] {
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.14);
}

body[data-theme="normal"] .language-button:hover,
body[data-theme="normal"] .language-button[aria-pressed="true"] {
  background: rgba(239, 82, 76, 0.12);
}

body[data-theme="normal"] .beta-disclaimer {
  background: rgba(239, 82, 76, 0.08);
  border-color: rgba(239, 82, 76, 0.22);
}

body[data-theme="normal"] .card-image-wrap,
body[data-theme="normal"] .skin-image-wrap {
  background: linear-gradient(145deg, #f4f6f9, #e5e8ee);
}

body[data-theme="normal"] .group-card-head {
  background: #f7f8fa;
}

body[data-theme="normal"] .card-body strong {
  text-shadow: none;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 268px minmax(0, 1fr);
  }

  .app-shell.is-detail-mode {
    grid-template-columns: 268px minmax(0, 1fr);
  }

  .detail-panel {
    position: static;
    grid-column: 2;
    height: auto;
    min-height: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
  }

  .app-shell.is-detail-mode .content {
    display: none;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(82vw, 320px);
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .menu-button {
    display: block;
    flex: 0 0 52px;
  }

  .content {
    padding: 0 16px 28px;
  }

  .hero-band,
  .results-head,
  .combo-row,
  .durability-row {
    display: grid;
  }

  .hero-band {
    padding: 24px 18px;
  }

  .hero-band h2 {
    font-size: 2.2rem;
  }

  .stats-strip {
    width: 100%;
  }

  .stats-strip div {
    flex: 1;
  }

  .detail-panel {
    border-left: 0;
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-hero img {
    max-width: none;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .calculator-title,
  .side-selector {
    align-items: stretch;
    flex-direction: column;
  }

  .calculator-mode-switch {
    min-width: 0;
    width: 100%;
  }

  .side-selector > div {
    width: 100%;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }

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

  .durability-row > strong {
    justify-self: start;
  }

  .durability-needed {
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .topbar {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .search-wrap {
    min-width: calc(100% - 64px);
  }

  .language-switcher {
    width: 100%;
    justify-content: center;
  }

  .beta-disclaimer {
    width: 100%;
    max-width: none;
    justify-content: center;
    text-align: center;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .structure-card {
    grid-template-columns: 132px 1fr;
    grid-template-rows: 132px;
    min-height: 132px;
  }

  .card-image-wrap {
    padding: 6px 6px 18px;
  }

  .recommendation-grid,
  .calculator {
    grid-template-columns: 1fr;
  }

  .detail-content {
    padding: 16px;
  }

  .detail-hero h2 {
    font-size: 1.7rem;
  }
}
