html { scroll-behavior: smooth; }

:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #efe9dd;
  background: #15110d;
  line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top left, #48331d, #15110d 45%); }
.shell { width: min(1480px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 48px; }

.top-meta {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 6px;
  margin-bottom: 12px;
  color: #d7c7ae;
  font-size: 13px;
  font-weight: 700;
}
.top-meta span, .top-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(214, 169, 94, .24);
  border-radius: 999px;
  background: rgba(26, 22, 17, .6);
}
a { color: #ffd993; }
a:hover { color: #fff3ce; }
.contact-panel {
  margin-top: 18px;
}
.contact-panel h2 {
  margin-top: 0;
}
.contact-panel p {
  margin: 8px 0;
  color: #d7c7ae;
}

.version-link {
  text-decoration: none;
}
.version-link:hover {
  text-decoration: underline;
}
.bottom-panels {
  display: grid;
  grid-template-columns: minmax(320px, .95fr) minmax(420px, 1.05fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}
.changelog-panel h2,
.changelog-panel h3,
.changelog-panel h4 {
  margin-top: 0;
}
.changelog-panel h3 {
  color: #ffd993;
  margin-bottom: 10px;
}
.changelog-panel h4 {
  color: #f5dfb8;
  margin: 14px 0 6px;
}
.changelog-panel ul {
  margin: 6px 0 12px 20px;
  padding: 0;
  color: #d7c7ae;
}
.changelog-panel p {
  color: #d7c7ae;
  margin: 10px 0 14px;
}
.update-notice {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .62);
}
.update-notice[hidden] {
  display: none;
}
.update-notice-card {
  position: relative;
  width: min(560px, 100%);
  padding: 22px;
  border: 1px solid rgba(214, 169, 94, .42);
  border-radius: 18px;
  background: #1a1611;
  box-shadow: 0 24px 90px rgba(0,0,0,.55);
}
.update-notice-card h2 {
  margin: 4px 34px 12px 0;
}
.update-notice-card ul {
  margin: 8px 0 18px 20px;
  padding: 0;
  color: #d7c7ae;
}
.update-notice-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  color: #f6e8ce;
  background: #3a2b1d;
  border: 1px solid #735631;
  font-size: 22px;
  line-height: 1;
}
.update-notice-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 800;
  color: #1b1209;
  background: #e0b25d;
  text-decoration: none;
}
.button-link:hover {
  color: #1b1209;
  filter: brightness(1.08);
}
@media (max-width: 900px) {
  .bottom-panels { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .top-meta {
    align-items: flex-start;
  }
}
.hero { margin-bottom: 20px; text-align: center; }
.hero-title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: 100%;
}
.hero-title-icon {
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(214, 169, 94, .34), 0 8px 24px rgba(0,0,0,.32);
}
.eyebrow { text-transform: uppercase; letter-spacing: .14em; color: #d6a95e; font-size: 12px; font-weight: 700; }
h1 { font-size: clamp(30px, 4.2vw, 56px); margin: 4px 0 10px; line-height: 1; white-space: nowrap; }
h2 { margin: 24px 0 12px; font-size: 19px; }
.hero p { max-width: 880px; margin-left: auto; margin-right: auto; color: #d7c7ae; }
.grid { display: grid; grid-template-columns: minmax(620px, 1.05fr) minmax(460px, .95fr); gap: 22px; align-items: start; }
.panel { background: rgba(26, 22, 17, .88); border: 1px solid rgba(214, 169, 94, .24); box-shadow: 0 20px 70px rgba(0,0,0,.35); border-radius: 18px; padding: 20px; backdrop-filter: blur(8px); }
.form-panel { position: relative; }
.form-top-actions {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 10px;
}
button.compact {
  padding: 9px 14px;
  font-size: 13px;
}

.warning { margin-bottom: 18px; color: #f5dfb8; }
label { display: grid; gap: 6px; margin: 12px 0; font-weight: 700; }
label small, .muted { color: #bba98e; font-weight: 400; }
.field-heading {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.inline { display: flex; align-items: center; gap: 8px; font-weight: 600; }
input, select, button { font: inherit; }
input, select { width: 100%; padding: 10px 12px; color: #fff9ef; background: #211a13; border: 1px solid #5b452b; border-radius: 10px; }
input:focus, select:focus { outline: 2px solid #d6a95e; outline-offset: 1px; }
.minor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.single-choice-grid { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
.age-card { border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 12px; background: rgba(255,255,255,.035); }
.subpanel { border: 1px solid rgba(214,169,94,.2); border-radius: 14px; padding: 12px; margin: 12px 0; background: rgba(255,255,255,.035); }
.subpanel h3 { margin: 0 0 6px; font-size: 16px; color: #ffd993; }
.age-card h3 { margin: 0 0 6px; font-size: 16px; color: #ffd993; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
button { border: 0; border-radius: 999px; padding: 11px 16px; font-weight: 800; color: #1b1209; background: #e0b25d; cursor: pointer; }
button:hover { filter: brightness(1.08); }
button.secondary { color: #f6e8ce; background: #3a2b1d; border: 1px solid #735631; }
pre { overflow: auto; max-height: 560px; padding: 14px; background: #0d0b09; color: #f7e1b8; border-radius: 12px; border: 1px solid rgba(255,255,255,.08); font-size: 12px; white-space: pre-wrap; }
.messages { margin-top: 12px; min-height: 24px; color: #ffd993; }
.messages.error { color: #ff9d8f; }
code { color: #ffd993; }

@media (max-width: 520px) {
  .hero-title-wrap { gap: 10px; }
  .hero-title-icon { width: 44px; height: 44px; }
  h1 { font-size: clamp(24px, 7vw, 32px); }
}

@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } .minor-grid { grid-template-columns: 1fr; } }

.search-combo-wrap {
  position: relative;
  width: 100%;
  margin-top: 0;
}
.search-combo-wrap::after {
  content: "▼";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #fff9ef;
  font-size: 12px;
  pointer-events: none;
  opacity: .95;
}
.combo-select-input {
  width: 100%;
  padding: 10px 34px 10px 12px;
  color: #fff9ef;
  background: #211a13;
  border: 1px solid #5b452b;
  border-radius: 10px;
  font-weight: 700;
}
.combo-select-input::placeholder { color: #bba98e; opacity: .75; font-weight: 700; }
.combo-select-input:focus { outline: 2px solid #d6a95e; outline-offset: 1px; }
.combo-select-input:disabled { opacity: .65; cursor: not-allowed; }
.combo-suggestion-panel {
  position: absolute;
  z-index: 50;
  left: 0;
  right: auto;
  top: calc(100% + 6px);
  width: min(980px, calc(100vw - 48px));
  max-width: calc(100vw - 48px);
  max-height: 520px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0;
  background: #211a13;
  border: 1px solid #5b452b;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  display: none;
}
.combo-suggestion-panel.open { display: block; }
.combo-suggestion-option, .combo-suggestion-empty {
  padding: 8px 12px;
  color: #fff9ef;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.combo-suggestion-option:hover, .combo-suggestion-option.active {
  background: #3a2b1d;
  color: #ffd993;
}
.combo-suggestion-option.disabled {
  color: #8b8173;
  cursor: not-allowed;
  opacity: .58;
}
.combo-suggestion-option.disabled:hover {
  background: transparent;
  color: #8b8173;
}
.combo-suggestion-empty { color: #bba98e; cursor: default; }
.native-select-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.combo-suggestion-option:has(.combo-suggestion-description) {
  white-space: normal;
  line-height: 1.3;
  padding-top: 9px;
  padding-bottom: 10px;
}
.combo-suggestion-title {
  font-weight: 800;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.combo-suggestion-description {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 500;
  color: #d7c9ad;
  white-space: normal;
  overflow-wrap: anywhere;
}
.combo-suggestion-option.active .combo-suggestion-description,
.combo-suggestion-option:hover .combo-suggestion-description {
  color: #f0dfbc;
}
.combo-suggestion-option.disabled .combo-suggestion-description,
.combo-suggestion-option.disabled:hover .combo-suggestion-description {
  color: #8b8173;
}

.god-preview {
  display: grid;
  gap: 14px;
}
.preview-card {
  border: 1px solid rgba(214,169,94,.22);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
  padding: 14px;
}
.preview-card h3 {
  margin: 0 0 10px;
  color: #ffd993;
  font-size: 16px;
}
.preview-god-header {
  padding: 18px;
  background: linear-gradient(135deg, rgba(214,169,94,.18), rgba(255,255,255,.03));
}
.preview-god-name {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.05;
}
.preview-god-title {
  margin: 7px 0 0;
  color: #d7c7ae;
  font-weight: 700;
}
.preview-section-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  color: #ffd993;
  font-weight: 800;
}
.preview-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.preview-pill, .preview-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  background: rgba(13,11,9,.45);
  padding: 9px 11px;
}
.preview-pill {
  justify-content: flex-start;
}
.preview-label {
  color: #bba98e;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
.preview-value {
  color: #fff9ef;
  font-weight: 750;
  text-align: right;
}
.preview-pill .preview-value {
  text-align: left;
}
.preview-age-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.preview-age-card {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,.03);
}
.preview-age-card h3 {
  margin: 0 0 9px;
  color: #ffd993;
}
.preview-note {
  margin: 8px 0 0;
  color: #bba98e;
  font-size: 13px;
}
@media (max-width: 1160px) {
  .grid { grid-template-columns: 1fr; }
  .preview-age-grid { grid-template-columns: 1fr; }
}

.install-box {
  margin: 0.75rem 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(212, 170, 82, 0.35);
  border-radius: 12px;
  background: rgba(212, 170, 82, 0.07);
}
.install-box h3 {
  margin: 0 0 0.5rem;
  color: var(--gold);
}
.install-box ol {
  margin: 0;
  padding-left: 1.25rem;
}
.install-box li {
  margin: 0.25rem 0;
}
.install-box code {
  overflow-wrap: anywhere;
}

.preview-age-rows {
  grid-template-columns: 1fr;
}
.preview-age-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.28fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,.03);
}
.preview-age-row h3 {
  margin: 0;
  color: #ffd993;
  display: flex;
  align-items: center;
}
.preview-age-row-body {
  display: grid;
  gap: 8px;
}
.preview-value-line {
  display: grid;
  grid-template-columns: minmax(96px, max-content) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(13,11,9,.35);
  padding: 8px 10px;
}
.preview-value-line .preview-value {
  text-align: left;
}
@media (max-width: 700px) {
  .preview-age-row {
    grid-template-columns: 1fr;
  }
  .preview-value-line {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}


/* Preview polish */
.preview-panel > h2 {
  text-align: center;
}
.preview-god-header {
  text-align: center;
}
.preview-god-name {
  font-size: clamp(34px, 4.2vw, 54px);
}
.preview-focus strong {
  color: #efe9dd;
  font-weight: 900;
}
.preview-card h3 {
  text-align: center;
}
.preview-age-row h3 {
  text-align: left;
}


/* Preview sizing and centered overview polish */
.preview-panel > h2 {
  margin-top: 4px;
  margin-bottom: 10px;
  font-size: 17px;
  line-height: 1.15;
}
.preview-god-name {
  font-size: clamp(42px, 5.4vw, 72px);
  letter-spacing: -0.03em;
}
.preview-god-title {
  font-size: clamp(16px, 1.4vw, 22px);
}
.preview-card:not(.preview-god-header) > h3 {
  margin-bottom: 12px;
}
.preview-card:not(.preview-god-header):not(.preview-overview-card) > .preview-row {
  width: min(100%, 520px);
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
}
.preview-card:not(.preview-god-header):not(.preview-overview-card) > .preview-row + .preview-row {
  margin-top: 7px;
}
.preview-card:not(.preview-god-header):not(.preview-overview-card) > .preview-row .preview-label {
  text-align: left;
}
.preview-card:not(.preview-god-header):not(.preview-overview-card) > .preview-row .preview-value {
  text-align: right;
}
@media (max-width: 700px) {
  .preview-god-name {
    font-size: clamp(34px, 12vw, 48px);
  }
  .preview-card:not(.preview-god-header):not(.preview-overview-card) > .preview-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .preview-card:not(.preview-god-header):not(.preview-overview-card) > .preview-row .preview-value {
    text-align: left;
  }
}

/* Preview final alignment polish */
.preview-panel > h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 16px;
}
.preview-card.preview-god-header .preview-god-name,
h3.preview-god-name {
  font-size: clamp(56px, 7.2vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.045em;
}
.preview-overview-card > .preview-row {
  width: min(100%, 440px);
  grid-template-columns: max-content max-content;
  justify-content: center;
  column-gap: clamp(44px, 7vw, 88px);
}
.preview-overview-card > .preview-row .preview-label,
.preview-overview-card > .preview-row .preview-value {
  text-align: left;
}
@media (max-width: 700px) {
  .preview-card.preview-god-header .preview-god-name,
  h3.preview-god-name {
    font-size: clamp(42px, 15vw, 62px);
  }
  .preview-overview-card > .preview-row {
    grid-template-columns: 1fr;
    justify-content: stretch;
    width: 100%;
  }
}

/* Preview minor-god icon rows */
.preview-age-row {
  grid-template-columns: minmax(112px, 0.22fr) minmax(0, 1fr);
  align-items: center;
}
.preview-age-heading {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  min-height: 86px;
  text-align: center;
}
.preview-age-heading h3 {
  margin: 0;
  color: #ffd993;
  font-size: 15px;
  line-height: 1.1;
}
.preview-age-icon,
.preview-minor-god-icon {
  width: 48px;
  height: 48px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.35));
}
.preview-age-row-body {
  gap: 10px;
}
.preview-minor-god-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 12px;
  align-items: stretch;
}
.preview-minor-god-tile {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  min-height: 82px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(13,11,9,.35);
  padding: 9px 8px;
  text-align: center;
}
.preview-minor-god-name {
  color: #fff9ef;
  font-weight: 850;
  line-height: 1.12;
}
.preview-minor-god-empty {
  grid-column: 1 / -1;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(13,11,9,.26);
  padding: 14px;
  color: #bba98e;
  font-weight: 750;
  text-align: center;
}
.preview-age-extras {
  display: grid;
  gap: 7px;
}
@media (max-width: 700px) {
  .preview-age-row {
    grid-template-columns: 1fr;
  }
  .preview-age-heading {
    min-height: auto;
  }
  .preview-minor-god-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Preview header/overview adjustment */
.preview-card.preview-god-header .preview-god-name,
h3.preview-god-name {
  font-size: clamp(34px, 4.3vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.preview-focus {
  font-size: 16px;
  color: #fff9ef;
  font-weight: 750;
}
.preview-focus strong {
  font-size: 16px;
  font-weight: 900;
}
.preview-overview-card > .preview-row {
  width: min(100%, 520px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  justify-content: center;
  column-gap: 24px;
}
.preview-overview-card > .preview-row .preview-label {
  text-align: right;
}
.preview-overview-card > .preview-row .preview-value {
  text-align: left;
}
@media (max-width: 700px) {
  .preview-card.preview-god-header .preview-god-name,
  h3.preview-god-name {
    font-size: clamp(32px, 12vw, 46px);
  }
  .preview-overview-card > .preview-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .preview-overview-card > .preview-row .preview-label,
  .preview-overview-card > .preview-row .preview-value {
    text-align: center;
  }
}


/* Preview age extra rows alignment fix */
.preview-age-extras {
  width: 100%;
}
.preview-age-extras .preview-value-line {
  grid-template-columns: minmax(150px, 150px) minmax(0, 1fr);
  column-gap: 14px;
  align-items: center;
}
.preview-age-extras .preview-label {
  text-align: left;
  white-space: nowrap;
}
.preview-age-extras .preview-value {
  text-align: left;
}
@media (max-width: 700px) {
  .preview-age-extras .preview-value-line {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .preview-age-extras .preview-label,
  .preview-age-extras .preview-value {
    text-align: center;
  }
}

/* Overview rows: keep values truly centered in the row */
.preview-overview-card > .preview-row {
  position: relative;
  width: min(100%, 520px);
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 120px;
}
.preview-overview-card > .preview-row .preview-label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 112px;
  text-align: left;
}
.preview-overview-card > .preview-row .preview-value {
  display: block;
  width: 100%;
  text-align: center;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .preview-overview-card > .preview-row {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4px;
    padding: 9px 11px;
  }
  .preview-overview-card > .preview-row .preview-label {
    position: static;
    transform: none;
    max-width: none;
    text-align: center;
  }
  .preview-overview-card > .preview-row .preview-value {
    text-align: center;
  }
}

/* God preview image export */
.preview-god-header {
  position: relative;
}
.preview-export-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 8px 11px;
  font-size: 12px;
  line-height: 1;
}
@media (max-width: 700px) {
  .preview-export-button {
    position: static;
    display: block;
    margin: 0 auto 12px;
  }
}

/* Preview export button: keep it tucked into the corner above the name */
.preview-god-header {
  padding-top: 42px;
}
.preview-export-button {
  top: 10px;
  right: 10px;
  padding: 7px 10px;
  font-size: 11px;
}
@media (max-width: 700px) {
  .preview-god-header {
    padding-top: 18px;
  }
}

/* Major-god icon in preview header */
.preview-god-identity {
  display: inline-grid;
  grid-template-columns: auto minmax(0, max-content);
  align-items: center;
  justify-content: center;
  gap: 24px;
  max-width: min(100%, 820px);
  margin: 0 auto;
}
.preview-god-identity.no-major-icon {
  grid-template-columns: minmax(0, 1fr);
}
.preview-god-text {
  min-width: 0;
  text-align: left;
}
.preview-god-identity.no-major-icon .preview-god-text {
  text-align: center;
}
.preview-major-god-icon-frame {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 217, 147, .72);
  background: rgba(13, 11, 9, .45);
  box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 0 0 2px rgba(0,0,0,.25);
  flex: 0 0 auto;
}
.preview-major-god-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 700px) {
  .preview-god-identity {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 14px;
  }
  .preview-major-god-icon-frame {
    width: 82px;
    height: 82px;
  }
  .preview-god-text,
  .preview-god-identity.no-major-icon .preview-god-text {
    text-align: center;
  }
}


/* Overview rows: align values like Hero / Unique Unit rows */
.preview-overview-card > .preview-row {
  position: static;
  width: min(100%, 520px);
  min-height: 43px;
  display: grid;
  grid-template-columns: minmax(150px, 150px) minmax(0, 1fr);
  align-items: center;
  column-gap: 14px;
  justify-content: stretch;
  padding: 9px 11px;
}
.preview-overview-card > .preview-row .preview-label {
  position: static;
  transform: none;
  max-width: none;
  text-align: left;
  white-space: nowrap;
}
.preview-overview-card > .preview-row .preview-value {
  width: auto;
  text-align: left;
  white-space: normal;
}
@media (max-width: 700px) {
  .preview-overview-card > .preview-row {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4px;
  }
  .preview-overview-card > .preview-row .preview-label,
  .preview-overview-card > .preview-row .preview-value {
    text-align: center;
  }
}

/* Final overview row alignment: value starts at the center split, like age extra rows.
   This selector is deliberately more specific than the generic preview-row rules. */
.preview-card.preview-overview-card > .preview-row {
  position: static;
  width: min(100%, 520px);
  min-height: 43px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  justify-content: center;
  column-gap: 24px;
  padding: 9px 11px;
}
.preview-card.preview-overview-card > .preview-row .preview-label {
  position: static;
  transform: none;
  max-width: none;
  text-align: right;
  white-space: nowrap;
}
.preview-card.preview-overview-card > .preview-row .preview-value {
  display: block;
  width: auto;
  min-width: 0;
  text-align: left;
  white-space: normal;
}
@media (max-width: 700px) {
  .preview-card.preview-overview-card > .preview-row {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4px;
  }
  .preview-card.preview-overview-card > .preview-row .preview-label,
  .preview-card.preview-overview-card > .preview-row .preview-value {
    text-align: center;
  }
}

/* Preview detail icons for god powers, unique techs, heroes, and units */
.preview-row .preview-value,
.preview-value-line .preview-value {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.preview-row-icon,
.preview-extra-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 999px;
  object-fit: cover;
  display: inline-block;
  border: 1px solid rgba(255, 217, 147, .45);
  background: rgba(13, 11, 9, .55);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.preview-extra-icon {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}
.preview-value-text {
  min-width: 0;
}
.preview-card.preview-overview-card > .preview-row .preview-value {
  display: inline-flex;
  justify-self: start;
}
@media (max-width: 700px) {
  .preview-card.preview-overview-card > .preview-row .preview-value,
  .preview-value-line .preview-value {
    justify-content: center;
  }
}

/* Combo dropdown readability: allow long bonus labels to wrap cleanly. */
.combo-suggestion-option:not(:has(.combo-suggestion-description)) {
  white-space: normal;
  overflow: hidden;
  text-overflow: initial;
  overflow-wrap: anywhere;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  padding-top: 9px;
  padding-bottom: 9px;
}
.combo-suggestion-option:has(.combo-suggestion-description) .combo-suggestion-title {
  white-space: normal;
  overflow: hidden;
  text-overflow: initial;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.bonus-combination-warning {
  margin: -4px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(245, 217, 153, 0.38);
  border-radius: 10px;
  background: rgba(122, 82, 24, 0.22);
  color: #f5dfb8;
  font-size: 0.92rem;
  line-height: 1.35;
}

.bonus-combination-warning[hidden] {
  display: none;
}
