:root {
  --bg-0: #010202;
  --bg-1: #030404;
  --bg-2: #070807;
  --glass: rgba(18, 18, 17, 0.42);
  --glass-strong: rgba(25, 25, 23, 0.52);
  --glass-line: rgba(255, 255, 255, 0.12);
  --glass-line-soft: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(214, 170, 79, 0.5);
  --gold: #d6aa4f;
  --gold-2: #f3d27a;
  --gold-3: #9f7429;
  --text: #f2f2f2;
  --muted: rgba(242, 242, 242, 0.6);
  --soft: rgba(242, 242, 242, 0.4);
  --shadow: rgba(0, 0, 0, 0.62);
  --radius-lg: 1.75em;
  --radius-md: 1.18em;
  --radius-sm: 0.82em;
  --font-main: Inter, "SF Pro Text", "Segoe UI Variable", "Segoe UI", "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 15.5px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  margin: 0;
  background:
    radial-gradient(ellipse at 116% -12%, rgba(255, 255, 255, 0.12) 0%, rgba(210, 196, 160, 0.045) 18em, transparent 35em),
    linear-gradient(180deg, #040505 0%, #020303 56%, #000101 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 3.75em 3.75em;
  opacity: 0.16;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 43.5em;
  min-height: 100svh;
  margin-left: auto;
  margin-right: auto;
  padding: 0.72em 1.1em 1.35em;
}

.site-header {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 3.65em;
}


.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 3.35em;
  height: 3.35em;
  margin-right: 0.55em;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.brand-mark img,
.tool-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-copy {
  display: block;
  min-width: 0;
  padding-right: 0.6em;
}


.brand-title {
  display: block;
  overflow: hidden;
  margin-top: 0.08em;
  color: var(--text);
  font-size: 0.86em;
  font-weight: 680;
  line-height: 1.15;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.language {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}

.language-toggle {
  justify-content: center;
  min-width: 7.1em;
  font-size: 0.88em;
}

.language-toggle:hover,
.language-toggle:focus-visible,
.language.is-open .language-toggle {
  background: rgba(214, 170, 79, 0.12);
  outline: none;
}

.language-icon {
  width: 1.3em;
  height: 1.3em;
  margin-right: 0.46em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.language-current {
  max-width: 4.9em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.language-chevron {
  display: inline-block;
  width: 0.48em;
  height: 0.48em;
  margin-left: 0.72em;
  border-right: 0.15em solid currentColor;
  border-bottom: 0.15em solid currentColor;
  transform: translateY(-0.12em) rotate(45deg);
}

.language-menu {
  position: absolute;
  top: calc(100% + 0.35em);
  right: 0;
  z-index: 20;
  min-width: 10.8em;
  padding: 0.38em;
  border: 0.075em solid var(--glass-line);
  border-radius: 1.05em;
  background: rgba(8, 9, 9, 0.86);
  backdrop-filter: blur(1em) saturate(140%);
  -webkit-backdrop-filter: blur(1em) saturate(140%);
  box-shadow: 0 1.2em 2.4em rgba(0, 0, 0, 0.58);
}

.language-option {
  display: block;
  width: 100%;
  min-height: 3em;
  padding: 0 0.95em;
  border: 0;
  border-radius: 0.78em;
  background: transparent;
  color: rgba(242, 242, 242, 0.78);
  font-family: inherit;
  font-size: 0.9em;
  font-weight: 760;
  text-align: left;
  cursor: pointer;
}

.language-option + .language-option {
  margin-top: 0.18em;
}

.language-option:hover,
.language-option:focus-visible {
  background: rgba(214, 170, 79, 0.12);
  color: var(--gold-2);
  outline: none;
}

.language-option.is-active {
  background: linear-gradient(180deg, #f3d27a 0%, #c08a2b 100%);
  color: #090806;
}

.main-content {
  margin-top: 0.95em;
}

.hero {
  --hero-image: url("../assets/bg/top-hero.webp");
  position: relative;
  width: 100vw;
  min-height: clamp(9.5em, 34vw, 11.5em);
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: max(1.35em, calc((100vw - 43.5em) / 2 + 1.1em));
  padding-right: max(1.35em, calc((100vw - 43.5em) / 2 + 1.1em));
  border: 0;
  border-radius: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  overflow: hidden;
  box-shadow: none;
}

.hero::after {
  content: none;
}

.hero-surface {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 24em;
  margin: 0;
  padding: 0;
  text-align: left;
}

.hero-kicker,
.section-kicker {
  margin: 0;
  color: var(--gold-2);
  font-size: 0.64em;
  font-weight: 780;
  line-height: 1.25;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.hero-title {
  max-width: 12em;
  margin: 0.45em 0 0;
  color: var(--text);
  font-size: clamp(1.62em, 7.1vw, 2.18em);
  font-weight: 760;
  line-height: 1.06;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}

.hero-text {
  max-width: 24em;
  margin: 1.05em 0 0;
  color: rgba(242, 242, 242, 0.66);
  font-size: 0.86em;
  font-weight: 560;
  line-height: 1.68;
}

.tool-section {
  margin-top: 2.1em;
}


.tool-list {
  display: block;
  margin-top: 1.35em;
}

.tool-card {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 5.85em;
  padding: 1em 1em;
  border: 0.075em solid var(--glass-line);
  border-radius: 1.45em;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.028) 48%, rgba(255, 255, 255, 0.018) 100%),
    rgba(12, 13, 12, 0.48);
  backdrop-filter: blur(1.05em) saturate(135%);
  -webkit-backdrop-filter: blur(1.05em) saturate(135%);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1.2em 2.4em rgba(0, 0, 0, 0.28), inset 0 0.08em 0 rgba(255, 255, 255, 0.06);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.tool-card + .tool-card {
  margin-top: 1em;
}

.tool-card:hover,
.tool-card:focus-visible,
.tool-card:active {
  border-color: rgba(243, 210, 122, 0.55);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0%, rgba(214, 170, 79, 0.055) 100%),
    rgba(20, 20, 18, 0.58);
  box-shadow: 0 1.25em 2.4em rgba(0, 0, 0, 0.34), inset 0 0.08em 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-0.08em);
  outline: none;
}

.tool-card.is-primary {
  border-color: rgba(214, 170, 79, 0.55);
  background:
    linear-gradient(135deg, rgba(214, 170, 79, 0.12) 0%, rgba(255, 255, 255, 0.04) 44%, rgba(255, 255, 255, 0.018) 100%),
    rgba(13, 13, 12, 0.55);
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.75em;
  height: 2.75em;
  margin-right: 0.9em;
  border: 0.075em solid rgba(214, 170, 79, 0.34);
  border-radius: 0.72em;
  background: rgba(214, 170, 79, 0.07);
  color: var(--gold-2);
  font-size: 0.82em;
  font-weight: 820;
}

.tool-body {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
  padding-right: 0.75em;
}


html[lang="en"] .tool-title {
  text-transform: uppercase;
  font-size: 0.94em;
  letter-spacing: 0.055em;
}

html[lang="ru"] .tool-title,
html[lang="es"] .tool-title {
  font-size: 0.96em;
  letter-spacing: 0;
}


.tool-action,
.tool-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 2.62em;
  border-radius: 999em;
  font-size: 0.72em;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}

.tool-action {
  min-width: 4.6em;
  padding: 0 1.05em;
  background: linear-gradient(180deg, #ffe28a 0%, #c99131 100%);
  color: #080705;
  box-shadow: inset 0 0.08em 0 rgba(255, 255, 255, 0.34), 0 0.75em 1.3em rgba(0, 0, 0, 0.3);
}

.tool-card:hover .tool-action,
.tool-card:focus-visible .tool-action,
.tool-card:active .tool-action {
  background: linear-gradient(180deg, #fff0ae 0%, #d6a249 100%);
}

.tool-status {
  min-width: 4.8em;
  padding: 0 1em;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(242, 242, 242, 0.72);
}

.site-footer {
  margin-top: 2.7em;
  padding-bottom: env(safe-area-inset-bottom);
  color: rgba(242, 242, 242, 0.36);
  font-size: 0.78em;
  font-weight: 700;
  text-align: center;
}

.site-footer-owner,
.site-footer-disclaimer {
  display: block;
}

.site-footer-disclaimer {
  max-width: 48em;
  margin: 0.6em auto 0;
  color: rgba(242, 242, 242, 0.2);
  font-size: 0.52rem;
  font-weight: 400;
  line-height: 1.45;
}

.database-main {
  margin-top: 0.6em;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75em;
  color: var(--gold-2);
  font-size: 0.86em;
  font-weight: 760;
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  color: #fff0ae;
  outline: none;
}

.database-intro {
  margin-top: 1.2em;
}

.database-page-title {
  font-size: 1.4rem;
}

.database-page-text {
  margin: 0.75em 0 0;
  color: var(--muted);
  font-size: 0.95em;
  font-weight: 620;
  line-height: 1.5;
}

.database-tabs {
  display: flex;
  flex-wrap: wrap;
  margin: 1.7em -0.35em -0.35em;
}

.database-tab {
  min-height: 4.35em;
  font-size: 0.94em;
}

.database-tab:hover,
.database-tab:focus-visible {
  border-color: rgba(243, 210, 122, 0.5);
  color: var(--text);
  outline: none;
}

.database-tab.is-active {
  border-color: rgba(243, 210, 122, 0.84);
  background: linear-gradient(135deg, rgba(214, 170, 79, 0.28), rgba(214, 170, 79, 0.08));
  color: var(--gold-2);
  box-shadow: inset 0 0.08em 0 rgba(255, 255, 255, 0.08);
}

.database-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2em;
  width: 2em;
  height: 2em;
  margin-right: 0.5em;
}

.database-tab-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.82;
  filter: drop-shadow(0 0.08em 0.12em rgba(0, 0, 0, 0.55));
  transition: opacity 160ms ease, transform 160ms ease;
}

.database-tab:hover .database-tab-icon img,
.database-tab:focus-visible .database-tab-icon img,
.database-tab.is-active .database-tab-icon img {
  opacity: 1;
}

.database-tab.is-active .database-tab-icon img {
  transform: scale(1.06);
}

.database-panel {
  margin-top: 1.15em;
  padding: 1.25em 1.15em 1.15em;
  border: 0.075em solid rgba(214, 170, 79, 0.42);
  border-radius: 1em;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(8, 9, 9, 0.72);
  box-shadow: 0 1.25em 2.4em rgba(0, 0, 0, 0.3);
}


.database-panel-subtitle {
  margin: 0.32em 0 0;
  color: var(--muted);
  font-size: 0.93em;
  font-weight: 620;
}

.database-panel-heading-main {
  display: block;
}

.database-panel-heading-image {
  display: none;
}

#databasePanel[aria-labelledby="tabUrClaireStar"] .database-panel-heading-main {
  display: flex;
  align-items: stretch;
}

#databasePanel[aria-labelledby="tabUrClaireStar"] .database-panel-heading-image {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: 2.8em;
  aspect-ratio: 919 / 940;
  margin-right: 0.7em;
}

#databasePanel[aria-labelledby="tabUrClaireStar"] .database-panel-heading-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#databasePanel[aria-labelledby="tabUrClaireStar"] .database-panel-heading-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.database-panel-note {
  white-space: pre-line;
  font-size: 13px;
}

.database-controls {
  display: flex;
  align-items: flex-end;
  margin-top: 1.2em;
}

.database-field {
  display: block;
  min-width: 0;
  flex: 1 1 0;
}

.database-field-label {
  display: block;
  margin: 0 0 0.35em 0.35em;
  color: var(--muted);
  font-size: 0.78em;
  font-weight: 700;
  line-height: 1.2;
}

.database-select {
  min-height: 3.25em;
  font-size: 0.96em;
}

.database-select:focus {
  border-color: var(--gold);
  outline: 0.14em solid rgba(214, 170, 79, 0.2);
  outline-offset: 0.08em;
}

.database-range-arrow {
  font-size: 1.55em;
}

.database-submit {
  min-width: 5.5em;
  min-height: 3.25em;
  margin-left: 0.65em;
  font-size: 0.96em;
}

.database-submit:hover,
.database-submit:focus-visible {
  background: linear-gradient(180deg, #fff0ae 0%, #d6a249 100%);
  outline: 0.14em solid rgba(243, 210, 122, 0.24);
  outline-offset: 0.08em;
}

.database-total-card {
  margin-top: 1.15em;
  padding: 1em 1em;
  border: 0.075em solid rgba(243, 210, 122, 0.84);
  border-radius: 0.85em;
  background: rgba(214, 170, 79, 0.045);
  text-align: center;
}

.database-total-card.is-stale {
  border-color: rgba(255, 255, 255, 0.22);
}

.database-total-range {
  margin: 0;
  color: var(--gold-2);
  font-size: 0.9em;
  font-weight: 780;
  line-height: 1.25;
}

.database-total-layout {
  display: flex;
  align-items: center;
  margin-top: 0.65em;
}

.database-total-label {
  width: 36%;
  font-size: 1.02em;
}

.database-total-values {
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-width: 0;
  flex: 1 1 auto;
}

.database-total-item {
  min-width: 0;
  flex: 1 1 0;
  text-align: center;
}

.database-total-item + .database-total-item {
  margin-left: 0.7em;
  padding-left: 0.7em;
  border-left: 0.075em solid rgba(255, 255, 255, 0.13);
}


.database-total-card.is-multiple .database-total-exact {
  font-size: 0.67em;
}

.database-breakdown {
  margin-top: 1.2em;
}

.database-breakdown-title {
  margin: 0 0 0.55em;
  color: var(--muted);
  font-size: 0.96em;
  font-weight: 720;
  line-height: 1.3;
}

.database-table-wrap {
  overflow: hidden;
  border: 0.075em solid rgba(255, 255, 255, 0.18);
  border-radius: 0.65em;
}

.database-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.database-table th,
.database-table td {
  height: 3.05em;
  padding: 0.5em 0.6em;
  border-bottom: 0.075em solid rgba(255, 255, 255, 0.14);
  font-size: 0.82em;
  line-height: 1.25;
  text-align: right;
}

.database-table th {
  color: var(--gold);
  font-weight: 800;
}

.database-table th:first-child,
.database-table td:first-child {
  text-align: center;
}

.database-table th + th,
.database-table td + td {
  border-left: 0.075em solid rgba(255, 255, 255, 0.12);
}

.database-table tbody tr:last-child td {
  border-bottom: 0;
}

.database-table.is-three-columns th,
.database-table.is-three-columns td {
  padding-left: 0.42em;
  padding-right: 0.42em;
  font-size: 0.74em;
}

.database-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.85em;
}

.database-pagination[hidden] {
  display: none;
}

.database-page-button {
  min-width: 5.5em;
  min-height: 2.8em;
  padding: 0 0.8em;
  border: 0.075em solid rgba(255, 255, 255, 0.22);
  border-radius: 999em;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: inherit;
  font-size: 0.76em;
  font-weight: 720;
  cursor: pointer;
}

.database-page-button:disabled {
  color: var(--soft);
  cursor: default;
  opacity: 0.55;
}

.database-page-button:not(:disabled):hover,
.database-page-button:not(:disabled):focus-visible {
  border-color: var(--gold);
  color: var(--gold-2);
  outline: none;
}

.database-page-status {
  min-width: 5.5em;
  margin: 0 0.75em;
  color: var(--muted);
  font-size: 0.76em;
  font-weight: 700;
  text-align: center;
}

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

@media (max-width: 380px) {
  .page-shell {
    padding-left: 0.9em;
    padding-right: 0.9em;
  }

  .language-toggle {
    min-width: 6.2em;
    padding-left: 0.45em;
    padding-right: 0.45em;
    font-size: 0.86em;
  }

  .language-current {
    max-width: 4.3em;
  }

  .brand-kicker {
    max-width: 15em;
  }

  .brand-title {
    max-width: 11.8em;
  }

  .hero {
    min-height: clamp(9.2em, 34vw, 10.8em);
    padding-left: 1.1em;
    padding-right: 1.1em;
  }

  .hero-surface {
    padding: 0;
  }

  .hero-title {
    font-size: clamp(1.5em, 6.8vw, 1.95em);
  }

  .hero-text {
    font-size: 0.8em;
  }

  .tool-card {
    min-height: 5.55em;
    padding-left: 0.86em;
    padding-right: 0.82em;
  }

  .tool-icon {
    margin-right: 0.75em;
  }

  .tool-action,
  .tool-status {
    min-width: 4.25em;
    padding-left: 0.85em;
    padding-right: 0.85em;
  }

  .database-page-title {
    font-size: 1.4rem;
  }

  .database-tab {
    min-height: 4em;
    padding-left: 0.38em;
    padding-right: 0.38em;
    font-size: 0.86em;
  }

  .database-tab-icon {
    margin-right: 0.42em;
  }

  .database-panel {
    padding-left: 0.85em;
    padding-right: 0.85em;
  }

  .database-field-label {
    font-size: 0.72em;
  }

  .database-select {
    min-height: 3.15em;
    padding-left: 0.62em;
    font-size: 0.88em;
  }

  .database-range-arrow {
    margin-left: 0.3em;
    margin-right: 0.3em;
    font-size: 1.3em;
  }

  .database-submit {
    min-width: 4.75em;
    min-height: 3.15em;
    margin-left: 0.42em;
    padding-left: 0.62em;
    padding-right: 0.62em;
    font-size: 0.88em;
  }

  .database-total-card {
    padding-left: 0.75em;
    padding-right: 0.75em;
  }

  .database-total-label {
    width: 32%;
    font-size: 0.88em;
  }

  .database-total-item + .database-total-item {
    margin-left: 0.4em;
    padding-left: 0.4em;
  }

  .database-table th,
  .database-table td {
    padding-left: 0.42em;
    padding-right: 0.42em;
  }
}

.sanctuary-main {
  margin-top: 0.6em;
  font-variant-numeric: tabular-nums;
}

.sanctuary-intro {
  margin-top: 1.2em;
}


.sanctuary-panel {
  margin-top: 1.45em;
  padding: 1.05em;
  border: 0.075em solid var(--glass-line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(10, 11, 10, 0.5);
  box-shadow: 0 1.4em 2.8em rgba(0, 0, 0, 0.28);
}

.sanctuary-controls {
  display: block;
}

.sanctuary-level-fields {
  display: flex;
  align-items: flex-end;
}

.sanctuary-field {
  display: block;
  flex: 1 1 0;
  min-width: 0;
}

.sanctuary-field-label {
  margin: 0 0 6px;
  font-size: 13px;
}

.sanctuary-select {
  min-height: 44px;
  height: 44px;
  font-size: 16px;
}

.sanctuary-select:focus {
  border-color: rgba(243, 210, 122, 0.72);
  outline: 0.13em solid rgba(214, 170, 79, 0.15);
}

.sanctuary-range-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 44px;
  margin-left: 6px;
  margin-right: 6px;
  color: var(--gold-2);
  font-size: 1em;
  font-weight: 800;
}


.sanctuary-submit:hover,
.sanctuary-submit:focus-visible {
  background: linear-gradient(180deg, #fff0ae 0%, #d6a249 100%);
  outline: none;
}

.sanctuary-total-card {
  margin-top: 1.05em;
  overflow: hidden;
  border: 0.075em solid rgba(214, 170, 79, 0.58);
  border-radius: 1.25em;
  background:
    linear-gradient(145deg, rgba(214, 170, 79, 0.11), rgba(255, 255, 255, 0.022)),
    rgba(8, 9, 8, 0.72);
  box-shadow: inset 0 0.08em 0 rgba(255, 255, 255, 0.06);
}

.sanctuary-total-card.is-stale {
  border-color: var(--glass-line);
  opacity: 0.7;
}

.sanctuary-total-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3.45em;
  padding: 0.75em 0.9em;
  border-bottom: 0.075em solid rgba(214, 170, 79, 0.25);
}

.sanctuary-total-label,
.sanctuary-total-range {
  margin: 0;
}


.sanctuary-total-range {
  margin-left: 0.8em;
  white-space: nowrap;
}

.sanctuary-resource-grid,
.sanctuary-stage-resources {
  display: flex;
  width: 100%;
}

.sanctuary-resource-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-content: center;
  align-items: center;
  flex: 1 1 33.333%;
  width: 33.333%;
  max-width: 33.333%;
  min-width: 0;
  padding: 10px 4px;
}

.sanctuary-resource-item + .sanctuary-resource-item {
  border-left: 0.075em solid rgba(255, 255, 255, 0.09);
}

.sanctuary-resource-identity {
  display: contents;
}

.sanctuary-resource-icon {
  display: block;
  grid-column: 1;
  grid-row: 1;
  width: 22px;
  height: 22px;
  margin: 0;
  object-fit: contain;
}


.sanctuary-resource-values {
  display: contents;
}

.sanctuary-resource-compact,
.sanctuary-resource-exact {
  display: block;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.sanctuary-resource-compact {
  margin-left: 4px;
  font-size: 14px;
  white-space: nowrap;
}


.sanctuary-resource-item.is-total {
  display: flex;
  align-content: center;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 5.1em;
}

.sanctuary-resource-item.is-total .sanctuary-resource-icon {
  flex: 0 0 22px;
  order: 1;
}

.sanctuary-resource-item.is-total .sanctuary-resource-compact {
  font-size: 18px;
}

.sanctuary-resource-item.is-total .sanctuary-resource-name {
  flex: 0 0 100%;
  order: 3;
}


.sanctuary-time-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 3.75em;
  padding: 0.8em 0.95em;
  border-top: 0.075em solid rgba(214, 170, 79, 0.25);
}


.sanctuary-time-value {
  margin-left: 0.8em;
  text-align: right;
}

.sanctuary-breakdown {
  margin-top: 1.45em;
}


.sanctuary-stage-list {
  margin-top: 0.82em;
}

.sanctuary-stage-card {
  padding: 0.95em;
  border: 0.075em solid rgba(255, 255, 255, 0.14);
  border-radius: 1.05em;
  background: rgba(255, 255, 255, 0.025);
}

.sanctuary-stage-card + .sanctuary-stage-card {
  margin-top: 0.75em;
}


.sanctuary-resources-label {
  margin-top: 0.9em;
}

.sanctuary-stage-resources {
  margin-top: 0.35em;
  border-top: 0.075em solid rgba(255, 255, 255, 0.075);
  border-bottom: 0.075em solid rgba(255, 255, 255, 0.075);
}

.sanctuary-stage-resources .sanctuary-resource-item {
  grid-template-columns: 20px minmax(0, 1fr);
  min-height: 0;
  padding: 8px 3px;
}

.sanctuary-stage-resources .sanctuary-resource-identity {
  display: contents;
}

.sanctuary-stage-resources .sanctuary-resource-icon {
  width: 20px;
  height: 20px;
}


.sanctuary-stage-details {
  margin-top: 0.8em;
  font-size: 0;
}

.sanctuary-detail-section {
  display: block;
  padding-top: 0.68rem;
}

.sanctuary-detail-section + .sanctuary-detail-section {
  border-top: 0.075rem solid rgba(255, 255, 255, 0.065);
}

.sanctuary-detail-section.is-diamonds,
.sanctuary-detail-section.is-time {
  display: inline-block;
  width: calc(50% - 0.28rem);
  vertical-align: top;
}

.sanctuary-detail-section.is-time {
  margin-left: 0.56rem;
}

.sanctuary-detail-section.is-time,
.sanctuary-detail-section.is-diamonds {
  border-top: 0.075rem solid rgba(255, 255, 255, 0.065);
}

.sanctuary-detail-section.is-unlocks {
  clear: both;
}

.sanctuary-detail-values {
  margin-top: 0.28rem;
}


.sanctuary-detail-values p + p {
  margin-top: 0.16rem;
}

@media (max-width: 24em) {
  .sanctuary-panel {
    padding: 0.82em;
  }

  .sanctuary-field-label {
    margin: 0 0 6px;
    font-size: 13px;
  }

  .sanctuary-select {
    min-height: 44px;
    height: 44px;
    padding-left: 8px;
    padding-right: 28px;
    font-size: 16px;
  }

  .sanctuary-range-arrow {
    margin-left: 4px;
    margin-right: 4px;
  }

  .sanctuary-total-heading {
    padding-left: 0.72em;
    padding-right: 0.72em;
  }

  .sanctuary-resource-item {
    padding-left: 3px;
    padding-right: 3px;
  }

  .sanctuary-resource-identity {
    display: contents;
  }

  .sanctuary-resource-icon {
    width: 20px;
    height: 20px;
  }

  .sanctuary-resource-compact {
    font-size: 14px;
  }

  .sanctuary-resource-item.is-total .sanctuary-resource-compact {
    font-size: 18px;
  }

  .sanctuary-resource-item.is-total .sanctuary-resource-icon {
    flex-basis: 20px;
  }

  .sanctuary-time-total {
    display: block;
  }

  .sanctuary-time-value {
    display: block;
    margin-top: 6px;
    margin-left: 0;
    text-align: left;
  }

  .sanctuary-stage-card {
    padding: 0.78em;
  }

  html[lang="ru"] .sanctuary-field-label,
  html[lang="es"] .sanctuary-field-label {
    font-size: 13px;
  }
}

@media (max-width: 15em) {
  .page-shell {
    padding-left: 0.45em;
    padding-right: 0.45em;
  }

  .site-header {
    flex-wrap: wrap;
  }

  .brand {
    width: 100%;
  }

  .brand-kicker,
  .brand-title {
    max-width: none;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
  }

  .language {
    width: 100%;
    margin-top: 0.2em;
    margin-left: 0;
  }

  .language-toggle {
    width: 100%;
    justify-content: flex-start;
  }

  .language-current {
    flex: 1 1 auto;
    max-width: none;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
  }

  .language-chevron {
    margin-left: auto;
  }

  .sanctuary-panel {
    padding: 0.45em;
  }

  .sanctuary-total-heading {
    display: block;
  }

  .sanctuary-total-range {
    margin-top: 6px;
    margin-left: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .sanctuary-level-fields {
    flex-direction: column;
    align-items: stretch;
  }

  .sanctuary-field {
    width: 100%;
  }

  .sanctuary-range-arrow {
    align-self: center;
    width: 44px;
    height: 44px;
    margin: 2px 0;
    transform: rotate(90deg);
  }

  .sanctuary-stage-card {
    padding: 0.4em;
  }

  .sanctuary-resource-item {
    grid-template-columns: 8px minmax(0, 1fr);
    padding-left: 1px;
    padding-right: 1px;
  }

  .sanctuary-resource-item.is-total .sanctuary-resource-icon {
    flex-basis: 8px;
  }

  .sanctuary-stage-resources .sanctuary-resource-item {
    grid-template-columns: 8px minmax(0, 1fr);
    padding-left: 1px;
    padding-right: 1px;
  }

  .sanctuary-resource-icon,
  .sanctuary-stage-resources .sanctuary-resource-icon {
    width: 8px;
    height: 8px;
  }

  .sanctuary-resource-compact {
    margin-left: 1px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .sanctuary-detail-section.is-diamonds,
  .sanctuary-detail-section.is-time {
    display: block;
    width: 100%;
  }

  .sanctuary-detail-section.is-time {
    margin-left: 0;
  }
}

/* Alliance Duel calculator */


.duel-intro {
  margin-top: 1.2em;
}

.duel-page-title {
  font-size: 1.4rem;
}


.duel-day-tabs::-webkit-scrollbar {
  display: none;
}


.duel-day-tab:hover,
.duel-day-tab:focus-visible {
  color: var(--gold-2);
  outline: 0.12em solid rgba(243, 210, 122, 0.38);
  outline-offset: -0.12em;
}

.duel-day-tab.is-active {
  background: linear-gradient(180deg, #f3d27a 0%, #bd8125 100%);
  color: #090806;
  box-shadow: 0 0.55em 1.2em rgba(0, 0, 0, 0.35);
}

.duel-day-panel {
  margin-top: 1em;
  outline: none;
}

.duel-phase-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 3.08 / 1;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #080909;
  box-shadow: none;
  isolation: isolate;
}

.duel-phase-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.duel-phase-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.duel-phase-title {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.3em 0.75em;
  color: #ffffff;
  font-size: clamp(1rem, 4.6vw, 1.5rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0.04em;
  text-align: center;
  text-shadow:
    0 0.08em 0.22em rgba(0, 0, 0, 0.9),
    0 0 0.5em rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

html[lang="ja"] .duel-phase-title,
html[lang="en"] .duel-phase-title {
  text-transform: uppercase;
}

html[lang="ru"] .duel-phase-title {
  font-size: clamp(0.86rem, 3.8vw, 1.25rem);
  letter-spacing: 0;
}

.duel-phase-visual + .duel-base-panel {
  margin-top: 1em;
}

.duel-base-panel,
.duel-task-card {
  overflow: hidden;
  border: 0.075em solid var(--glass-line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 52%),
    rgba(9, 10, 9, 0.86);
  box-shadow: 0 1em 2.2em rgba(0, 0, 0, 0.28);
}


.duel-accordion-toggle,
.duel-card-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 4.35em;
  padding: 0.82em 1em;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.duel-accordion-toggle:hover,
.duel-accordion-toggle:focus-visible,
.duel-card-toggle:hover,
.duel-card-toggle:focus-visible {
  background: rgba(214, 170, 79, 0.075);
  outline: none;
}

.duel-accordion-heading,
.duel-card-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}


.duel-save-status {
  flex: 0 0 auto;
  margin-left: 0.7em;
  padding: 0.43em 0.68em;
  border: 0.075em solid rgba(255, 255, 255, 0.1);
  border-radius: 999em;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.67em;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}

.duel-save-status[data-status="duelSaved"] {
  border-color: rgba(214, 170, 79, 0.35);
  background: rgba(214, 170, 79, 0.12);
  color: var(--gold-2);
}

.duel-save-status[data-status="duelPartiallySaved"] {
  color: #e9c978;
}

.duel-card-chevron {
  flex: 0 0 auto;
  width: 0.62em;
  height: 0.62em;
  margin-left: 0.85em;
  border-right: 0.14em solid var(--gold-2);
  border-bottom: 0.14em solid var(--gold-2);
  transform: translateY(-0.16em) rotate(45deg);
  transition: transform 160ms ease;
}

.duel-card-toggle[aria-expanded="false"] .duel-card-chevron {
  transform: translateY(0.12em) rotate(-45deg);
}


.duel-base-content[hidden],
.duel-card-content[hidden] {
  display: none;
}


.duel-base-group {
  padding: 0.78em;
  border: 0.075em solid rgba(255, 255, 255, 0.075);
  border-radius: 0.9em;
  background: rgba(255, 255, 255, 0.025);
}

.duel-base-group + .duel-base-group {
  margin-top: 0.55em;
}


.duel-base-field {
  grid-template-columns: minmax(0, 1fr) 7.25em;
}


.duel-base-field-label {
  font-size: 0.76em;
}

.duel-base-input-wrap {
  position: relative;
  display: block;
}

.duel-base-input,
.duel-number-input,
.duel-select {
  width: 100%;
  min-height: 48px;
  border: 0.075em solid rgba(255, 255, 255, 0.14);
  border-radius: 0.72em;
  background-color: #111211;
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 720;
  line-height: 1;
  outline: none;
}


.duel-base-input:focus,
.duel-number-input:focus,
.duel-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 0.18em rgba(214, 170, 79, 0.14);
}

.duel-base-input[aria-invalid="true"],
.duel-number-input[aria-invalid="true"] {
  border-color: #dc7272;
  box-shadow: 0 0 0 0.16em rgba(220, 114, 114, 0.12);
}

.duel-base-unit {
  position: absolute;
  top: 50%;
  right: 0.68em;
  color: var(--soft);
  font-size: 0.67em;
  font-weight: 780;
  pointer-events: none;
  transform: translateY(-50%);
}

.duel-field-error {
  display: block;
  grid-column: 1 / -1;
  margin-top: 0.3em;
  color: #ef9999;
  font-size: 0.68em;
  font-weight: 650;
  line-height: 1.4;
}

.duel-field-error[hidden] {
  display: none;
}

.duel-form-error,
.duel-validation-summary {
  margin-top: 0.72em;
  padding: 0.68em 0.8em;
  border: 0.075em solid rgba(220, 114, 114, 0.34);
  border-radius: 0.72em;
  background: rgba(122, 35, 35, 0.13);
  color: #f0a4a4;
  font-size: 0.74em;
  font-weight: 670;
  line-height: 1.45;
}

.duel-form-error.is-success {
  border-color: rgba(214, 170, 79, 0.32);
  background: rgba(214, 170, 79, 0.1);
  color: var(--gold-2);
}

.duel-form-error[hidden],
.duel-validation-summary[hidden] {
  display: none;
}


.duel-save-button:hover,
.duel-save-button:focus-visible {
  background: linear-gradient(180deg, #fff0ae 0%, #d39d3e 100%);
  outline: 0.14em solid rgba(243, 210, 122, 0.32);
  outline-offset: 0.14em;
}

.duel-calculation {
  margin-top: 1.25em;
}

.duel-calculation-heading {
  display: flex;
  align-items: center;
}


.duel-reset-button:hover,
.duel-reset-button:focus-visible {
  border-color: rgba(214, 170, 79, 0.38);
  color: var(--gold-2);
  outline: none;
}

.duel-task-list {
  margin-top: 0.82em;
}


.duel-task-card > .duel-card-heading {
  min-height: 3.7em;
  padding: 0.85em 1em 0.55em;
}

.duel-card-toggle {
  min-height: 4.2em;
}

.duel-card-meta {
  display: block;
  flex: 0 0 auto;
  margin-left: auto;
  padding-left: 0.7em;
  text-align: right;
}


.duel-card-input-count {
  color: var(--soft);
}

.duel-card-subtotal {
  margin-top: 0.15em;
  color: var(--gold-2);
  font-variant-numeric: tabular-nums;
}

.duel-card-content {
  padding: 0.72em 1em 1em;
  border-top: 0.075em solid rgba(255, 255, 255, 0.07);
}

.duel-task-card-task .duel-card-content,
.duel-task-card-variant_task .duel-card-content,
.duel-task-card-tier_task .duel-card-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(7.4em, 0.82fr);
  align-items: end;
}

.duel-task-card-variant_task .duel-card-content,
.duel-task-card-tier_task .duel-card-content {
  grid-template-columns: minmax(6.4em, 0.55fr) minmax(0, 1fr);
}

.duel-task-card-variant_task .duel-result,
.duel-task-card-tier_task .duel-result {
  grid-column: 1 / -1;
  margin-top: 0.62em;
}

.duel-field {
  display: block;
  min-width: 0;
  margin: 0;
}

.duel-field + .duel-field {
  margin-left: 0.55em;
}


.duel-result {
  margin-left: 0.55em;
}


.duel-result-value {
  font-size: clamp(0.78em, 3.45vw, 0.94em);
}


.duel-resource-row {
  grid-template-columns: minmax(0, 1fr) minmax(6.9em, 0.72fr) minmax(6.7em, 0.72fr);
}


.duel-slot {
  padding: 0.78em;
  border: 0.075em solid rgba(255, 255, 255, 0.075);
  border-radius: 0.85em;
  background: rgba(255, 255, 255, 0.025);
}

.duel-slot + .duel-slot {
  margin-top: 0.62em;
}


.duel-slot > .duel-field {
  display: inline-block;
  width: calc(50% - 0.3em);
  vertical-align: bottom;
}

.duel-slot > .duel-field + .duel-field {
  margin-left: 0.55em;
}

.duel-slot > .duel-duration {
  margin-top: 0;
}

.duel-slot > .duel-field + .duel-duration {
  margin-top: 0.62em;
}

.duel-slot > .duel-duration + .duel-field {
  display: block;
  width: 100%;
  margin-top: 0.62em;
  margin-left: 0;
}

.duel-duration {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.duel-duration-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.duel-duration-fields .duel-field + .duel-field {
  margin-left: 0.42em;
}


.duel-copy-button:hover,
.duel-copy-button:focus-visible {
  border-color: var(--gold);
  background: rgba(214, 170, 79, 0.13);
  outline: none;
}

.duel-loading,
.duel-empty,
.duel-noscript {
  margin: 0.8em 0;
  color: var(--muted);
  font-size: 0.78em;
  line-height: 1.5;
}

.duel-footer {
  margin-top: 2em;
  padding-bottom: calc(5.9em + env(safe-area-inset-bottom));
}

.duel-sticky-total {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  padding: 0.6em 1em calc(0.6em + env(safe-area-inset-bottom));
  border-top: 0.075em solid rgba(214, 170, 79, 0.48);
  background: rgba(3, 4, 4, 0.94);
  backdrop-filter: blur(1em) saturate(130%);
  -webkit-backdrop-filter: blur(1em) saturate(130%);
  box-shadow: 0 -1em 2.1em rgba(0, 0, 0, 0.52);
}

.duel-sticky-total-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 41.3em;
  min-height: 3.5em;
  margin-left: auto;
  margin-right: auto;
}

.duel-sticky-total-label {
  font-size: 0.75em;
}

.duel-sticky-total-value {
  font-size: clamp(1.14em, 5.2vw, 1.48em);
}

@media (max-width: 30em) {
  .duel-base-content,
  .duel-card-content {
    padding-left: 0.82em;
    padding-right: 0.82em;
  }

  .duel-accordion-toggle,
  .duel-card-toggle {
    padding-left: 0.82em;
    padding-right: 0.82em;
  }

  .duel-task-card > .duel-card-heading {
    padding-left: 0.82em;
    padding-right: 0.82em;
  }

  .duel-resource-row {
    grid-template-columns: minmax(0, 1fr) minmax(6.2em, 0.68fr);
  }

  .duel-resource-row .duel-result {
    grid-column: 1 / -1;
    margin-top: 0.48em;
    margin-left: 0;
  }

  .duel-resource-row .duel-result-label,
  .duel-resource-row .duel-result-value {
    display: inline-block;
    min-height: 0;
    margin-top: 0;
  }

  .duel-resource-row .duel-result-value {
    margin-left: 0.55em;
  }
}

@media (max-width: 24em) {
  .duel-page-title {
    font-size: 1.4rem;
  }

  .duel-base-field {
    grid-template-columns: minmax(0, 1fr) 6.65em;
  }

  .duel-base-field-label {
    font-size: 0.72em;
  }

  .duel-task-card-task .duel-card-content {
    grid-template-columns: minmax(0, 1fr) minmax(6.7em, 0.78fr);
  }

  .duel-result {
    margin-left: 0.42em;
    padding-left: 0.42em;
    padding-right: 0.42em;
  }

  .duel-result-value {
    font-size: 0.76em;
  }

  .duel-card-title {
    font-size: 0.92em;
  }

  .duel-card-input-count,
  .duel-card-subtotal {
    font-size: 0.61em;
  }

  .duel-sticky-total {
    padding-left: 0.82em;
    padding-right: 0.82em;
  }

  .duel-sticky-total-label {
    max-width: 8.4em;
    font-size: 0.7em;
  }

  .duel-sticky-total-value {
    font-size: clamp(1.03em, 5.2vw, 1.26em);
  }
}

@media (max-width: 21.5em) {
  .duel-accordion-heading,
  .duel-card-heading {
    align-items: flex-start;
  }

  .duel-task-card-variant_task .duel-card-content,
  .duel-task-card-tier_task .duel-card-content {
    grid-template-columns: 1fr;
  }

  .duel-task-card-variant_task .duel-field + .duel-field,
  .duel-task-card-tier_task .duel-field + .duel-field {
    margin-top: 0.55em;
    margin-left: 0;
  }

  .duel-base-field {
    grid-template-columns: minmax(0, 1fr) 6em;
  }

  .duel-base-group,
  .duel-slot {
    padding: 0.6em;
  }

  .duel-duration-fields .duel-field + .duel-field {
    margin-left: 0.3em;
  }
}
/* Mobile typography and overflow tuning */
.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  flex: 1 1 auto;
}

.brand-kicker {
  display: block;
  overflow: hidden;
  color: var(--gold-2);
  font-size: 0.58em;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.language-toggle {
  min-width: 6.4em;
  padding-left: 0.5em;
  padding-right: 0.5em;
  display: inline-flex;
  align-items: center;
  min-height: 3em;
  padding: 0 0.72em;
  border: 0;
  border-radius: 999em;
  background: transparent;
  color: var(--gold-2);
  font-family: inherit;
  font-weight: 680;
  line-height: 1;
  cursor: pointer;
}

.language-current {
  max-width: 4.5em;
  display: inline-block;
}

.section-title {
  margin: 0.18em 0 0;
  color: var(--text);
  font-size: 1.24em;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.012em;
}

.tool-title {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.98em;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: 0.002em;
}

.tool-desc {
  display: block;
  margin-top: 0.36em;
  color: var(--muted);
  font-size: 0.74em;
  font-weight: 400;
  line-height: 1.5;
}

html[lang="ru"] .hero-kicker,
html[lang="ru"] .section-kicker {
  letter-spacing: 0.12em;
}

html[lang="ru"] .hero-title,
html[lang="ru"] .hero-text,
html[lang="ru"] .section-title,
html[lang="ru"] .tool-title,
html[lang="ru"] .tool-desc,
html[lang="ru"] .tool-action,
html[lang="ru"] .tool-status {
  letter-spacing: -0.012em;
}

.duel-page-title {
  font-size: 1.4rem;
}

.duel-day-tabs {
  display: flex;
  width: 100%;
  margin-top: 1.5em;
  padding: 0.28em;
  overflow-x: visible;
  border: 0.075em solid var(--glass-line);
  border-radius: 1em;
  background: rgba(10, 11, 10, 0.76);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}


.duel-day-tab + .duel-day-tab {
  margin-left: 0.08em;
}

.database-page-title {
  font-size: 1.4rem;
  margin: 0.28em 0 0;
  color: var(--text);
  font-weight: 720;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.database-tab {
  font-size: 0.88em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(50% - 0.7em);
  margin: 0.35em;
  padding: 0.7em 0.55em;
  border: 0.075em solid var(--glass-line);
  border-radius: 0.85em;
  background: rgba(12, 13, 12, 0.48);
  color: rgba(242, 242, 242, 0.76);
  font-family: inherit;
  font-weight: 700;
  line-height: 1.18;
  cursor: pointer;
}

.database-panel-title {
  margin: 0;
  color: var(--text);
  font-size: 1.35em;
  font-weight: 720;
  line-height: 1.1;
}

.database-select {
  padding-left: 0.55em;
  font-size: 0.84em;
  display: block;
  width: 100%;
  padding: 0 2.3em 0 0.85em;
  border: 0.075em solid rgba(255, 255, 255, 0.28);
  border-radius: 0.65em;
  background-color: #0b0d0d;
  color: var(--text);
  font-family: inherit;
  font-weight: 650;
  padding-right: 1.6em;
}

.database-range-arrow {
  margin-left: 0.3em;
  margin-right: 0.3em;
  font-size: 1.3em;
  flex: 0 0 auto;
  margin: 0 0.5em 0.72em;
  color: var(--gold);
  line-height: 1;
}

.database-submit {
  min-width: 4.4em;
  margin-left: 0.35em;
  padding-left: 0.5em;
  padding-right: 0.5em;
  font-size: 0.88em;
  flex: 0 0 auto;
  padding: 0 0.9em;
  border: 0.075em solid #edc45f;
  border-radius: 0.65em;
  background: linear-gradient(180deg, #f3d27a 0%, #c18a2e 100%);
  color: #090806;
  font-family: inherit;
  font-weight: 760;
  cursor: pointer;
}

.database-total-label {
  width: 30%;
  font-size: 0.88em;
  flex: 0 0 auto;
  margin: 0;
  color: var(--gold);
  font-weight: 700;
  text-align: left;
}

.database-total-compact {
  display: block;
  color: var(--gold);
  font-size: clamp(1.65em, 8vw, 2.3em);
  font-weight: 760;
  line-height: 0.95;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.database-total-card.is-multiple .database-total-compact {
  font-size: clamp(1.35em, 6vw, 1.85em);
}

.database-total-exact {
  display: block;
  margin-top: 0.35em;
  color: var(--muted);
  font-size: 0.68em;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

@media (max-width: 24em) {
  .page-shell {
    padding-left: 0.82em;
    padding-right: 0.82em;
  }

  .brand-mark {
    margin-right: 0.58em;
  }

  .brand-copy {
    padding-right: 0.28em;
  }

  .language-toggle {
    min-width: 5.8em;
    font-size: 0.8em;
  }

  .language-current {
    max-width: 4.15em;
  }

  .database-total-label {
    width: 28%;
  }

  .database-total-card.is-multiple .database-total-compact {
    font-size: clamp(1.2em, 5.5vw, 1.65em);
  }
}
/* Alliance Duel sticky total only */
.duel-sticky-total-label {
  max-width: none;
  font-size: 0.68em;
}

.duel-sticky-total-value {
  font-size: clamp(0.98em, 4.4vw, 1.16em);
}

/* Russian typography correction for Sanctuary detail cards */
html[lang="ru"] .sanctuary-resource-name {
  font-size: 0.68rem;
  line-height: 1.2;
  letter-spacing: 0;
  overflow-wrap: normal;
  word-break: normal;
}

html[lang="ru"] .sanctuary-detail-label {
  font-size: 0.68rem;
  line-height: 1.3;
  letter-spacing: 0.03em;
}

html[lang="ru"] .sanctuary-detail-values p {
  font-size: 0.78rem;
  font-weight: 560;
  line-height: 1.45;
  letter-spacing: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

html[lang="ru"] .sanctuary-detail-section.is-unlocks .sanctuary-detail-label {
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}

html[lang="ru"] .sanctuary-detail-section.is-unlocks .sanctuary-detail-values p {
  font-size: 0.75rem;
  font-weight: 520;
  line-height: 1.45;
  letter-spacing: 0;
  overflow-wrap: break-word;
  word-break: normal;
}

/* Final guard: page titles remain identical at every viewport width */
.sanctuary-page-title,
.duel-page-title,
.database-page-title {
  font-size: 1.4rem;
}

/* ========================================
   Alliance Duel: earned points
   ======================================== */

.duel-earned-points {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.82em;
  padding: 0.82em 0.9em;
  border: 0.075em solid rgba(91, 177, 225, 0.52);
  border-radius: 0.85em;
  background:
    linear-gradient(
      135deg,
      rgba(71, 155, 207, 0.17),
      rgba(71, 155, 207, 0.045)
    ),
    rgba(7, 16, 23, 0.82);
  box-shadow:
    inset 0 0.08em 0 rgba(255, 255, 255, 0.055),
    0 0.8em 1.6em rgba(0, 0, 0, 0.2);
}

.duel-earned-label {
  font-size: 0.82em;
}

.duel-earned-input-wrap {
  position: relative;
  flex: 0 0 44%;
  min-width: 8.5em;
}

.duel-earned-input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 0 2.35em 0 0.72em;
  border: 0.075em solid rgba(91, 177, 225, 0.62);
  border-radius: 0.72em;
  background: #071722;
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 720;
  line-height: 1;
  text-align: right;
  outline: none;
}

.duel-earned-input:focus {
  border-color: #83d2ff;
  box-shadow: 0 0 0 0.18em rgba(91, 177, 225, 0.18);
}

.duel-earned-input[aria-invalid="true"] {
  border-color: #dc7272;
  box-shadow: 0 0 0 0.16em rgba(220, 114, 114, 0.12);
}

.duel-earned-unit {
  position: absolute;
  top: 50%;
  right: 0.72em;
  color: rgba(191, 233, 255, 0.7);
  font-size: 0.7em;
  font-weight: 760;
  transform: translateY(-50%);
  pointer-events: none;
}

.duel-earned-error {
  flex: 0 0 100%;
  margin-top: 0.35em;
}

@media (max-width: 24em) {
  .duel-earned-points {
    padding-left: 0.72em;
    padding-right: 0.72em;
  }

  .duel-earned-label {
    font-size: 0.76em;
  }

  .duel-earned-input-wrap {
    flex-basis: 48%;
    min-width: 7.5em;
  }
}

/* =========================================================
   Alliance Duel Outcome Estimator v2
   ========================================================= */

.estimator-main {
  margin-top: 0.6em;
}

.estimator-intro {
  margin-top: 1.2em;
}

.estimator-page-title {
  margin: 0.28em 0 0;
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.estimator-page-text {
  max-width: 35rem;
  margin: 0.7em 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.55;
}

.estimator-day-tabs {
  display: flex;
  width: 100%;
  margin-top: 1.45em;
  padding: 0;
  overflow-x: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.estimator-day-tabs::-webkit-scrollbar {
  display: none;
}

.estimator-day-tab {
  flex: 1 0 4.45em;
  min-width: 4.45em;
  min-height: 2.8rem;
  padding: 0 0.52em;
  border: 0;
  border-radius: 0.68em;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(242, 242, 242, 0.58);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.estimator-day-tab + .estimator-day-tab {
  margin-left: 0.25rem;
}

.estimator-day-tab:hover,
.estimator-day-tab:focus-visible {
  color: var(--gold-2);
  outline: 0.1rem solid rgba(243, 210, 122, 0.34);
  outline-offset: -0.1rem;
}

.estimator-day-tab.is-active {
  background: linear-gradient(180deg, #f3d27a 0%, #bd8125 100%);
  color: #090806;
  box-shadow: 0 0.4em 0.9em rgba(0, 0, 0, 0.26);
}

.estimator-day-panel {
  margin-top: 1.05em;
  outline: none;
}

.estimator-section {
  padding: 1rem 0;
  border: 0;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.estimator-section:first-child {
  padding-top: 0.35rem;
  border-top: 0;
}

.estimator-section + .estimator-section {
  margin-top: 0.15rem;
}

.estimator-section-heading {
  display: flex;
  align-items: flex-start;
  min-width: 0;
}

.estimator-section-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.estimator-section-title {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.estimator-selected-day {
  display: inline-block;
  margin-left: 0.35em;
  color: var(--gold-2);
  font-size: 0.72em;
  font-weight: 550;
  white-space: nowrap;
}

.estimator-section-help {
  margin: 0.38em 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 450;
  line-height: 1.5;
}

.estimator-section-reset {
  flex: 0 0 auto;
  min-height: 2.75rem;
  margin-left: 0.75rem;
  padding: 0 0.72em;
  border: 0.0625rem solid rgba(255, 255, 255, 0.13);
  border-radius: 0.68em;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
}

.estimator-section-reset:hover,
.estimator-section-reset:focus-visible {
  border-color: rgba(214, 170, 79, 0.4);
  color: var(--gold-2);
  outline: none;
}

/* Current battle score */

.estimator-score-form {
  margin-top: 0.75rem;
}

.estimator-score-board {
  display: flex;
  width: 100%;
  overflow: hidden;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.12);
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.12);
  background: #0a0b0b;
}

.estimator-score-side {
  display: block;
  min-width: 0;
  width: 50%;
  padding: 0.8rem 0.72rem 0.72rem;
}

.estimator-score-side + .estimator-score-side {
  border-left: 0.0625rem solid rgba(255, 255, 255, 0.16);
}

.estimator-score-side.is-self {
  background: linear-gradient(135deg, rgba(23, 83, 120, 0.76), rgba(10, 35, 52, 0.66));
}

.estimator-score-side.is-opponent {
  background: linear-gradient(135deg, rgba(122, 44, 54, 0.74), rgba(55, 19, 25, 0.66));
}

.estimator-score-label {
  display: block;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.69rem;
  font-weight: 550;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.estimator-score-line,
.estimator-input-line {
  position: relative;
  display: block;
  min-width: 0;
}

.estimator-score-line {
  margin-top: 0.42rem;
}

.estimator-score-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 2.8rem;
  padding: 0 1.7rem 0 0.15rem;
  border: 0;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  font-family: inherit;
  font-size: 1.04rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
  text-align: right;
  white-space: nowrap;
  outline: none;
}

.estimator-score-input:focus {
  border-bottom-color: var(--gold-2);
  box-shadow: 0 0.1rem 0 rgba(243, 210, 122, 0.38);
}

.estimator-score-input[aria-invalid="true"],
.estimator-number-input[aria-invalid="true"],
.estimator-duration-input[aria-invalid="true"] {
  border-color: #dc7272;
}

.estimator-score-unit,
.estimator-input-unit {
  position: absolute;
  top: 50%;
  right: 0.18rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.64rem;
  font-weight: 500;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.estimator-field-error {
  display: block;
  margin-top: 0.32rem;
  color: #e99a9a;
  font-size: 0.67rem;
  font-weight: 500;
  line-height: 1.45;
}

.estimator-field-error[hidden],
.estimator-validation-summary[hidden],
.estimator-base-warning[hidden],
.estimator-task-content[hidden] {
  display: none !important;
}

.estimator-validation-summary {
  margin-top: 0.62rem;
  padding: 0.68rem 0.75rem;
  border-left: 0.18rem solid rgba(220, 114, 114, 0.72);
  background: rgba(122, 35, 35, 0.12);
  color: #efb0b0;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.5;
}


.estimator-result-label {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 500;
  line-height: 1.35;
}

.estimator-gap-value,
.estimator-summary-value {
  display: block;
  width: 100%;
  margin-top: 0.28rem;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.estimator-gap-value {
  font-size: clamp(1rem, 4.4vw, 1.18rem);
}

.estimator-gap-status,
.estimator-summary-status {
  margin: 0.36rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 450;
  line-height: 1.48;
}

.estimator-gap-result[data-result-state="ahead"] .estimator-gap-value,
.estimator-gap-result[data-result-state="ahead"] .estimator-gap-status,
.estimator-summary-card[data-result-state="ahead"] .estimator-summary-value,
.estimator-summary-card[data-result-state="ahead"] .estimator-summary-status {
  color: #9fd7b1;
}

.estimator-gap-result[data-result-state="behind"] .estimator-gap-value,
.estimator-gap-result[data-result-state="behind"] .estimator-gap-status,
.estimator-summary-card[data-result-state="behind"] .estimator-summary-value,
.estimator-summary-card[data-result-state="behind"] .estimator-summary-status {
  color: #e7a0a0;
}

.estimator-gap-result[data-result-state="tied"] .estimator-gap-value,
.estimator-gap-result[data-result-state="tied"] .estimator-gap-status,
.estimator-summary-card[data-result-state="tied"] .estimator-summary-value,
.estimator-summary-card[data-result-state="tied"] .estimator-summary-status {
  color: #ffffff;
}

/* Saved base-point status */

.estimator-base-status {
  display: flex;
  align-items: center;
  min-height: 3.2rem;
  margin-top: 0.75rem;
  padding: 0.58rem 0;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.08);
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.08);
}

.estimator-base-status-copy {
  display: block;
  min-width: 0;
}

.estimator-base-status-label,
.estimator-base-status-value {
  display: block;
}

.estimator-base-status-label {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.3;
}

.estimator-base-status-value {
  margin-top: 0.12rem;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
}

.estimator-base-status[data-status="complete"] .estimator-base-status-value {
  color: #9fd7b1;
}

.estimator-base-status[data-status="partial"] .estimator-base-status-value,
.estimator-base-status[data-status="missing"] .estimator-base-status-value {
  color: #e7c07b;
}

.estimator-base-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 2.6rem;
  margin-left: auto;
  padding: 0 0.72rem;
  border: 0.0625rem solid rgba(255, 255, 255, 0.12);
  border-radius: 0.65rem;
  color: var(--gold-2);
  font-size: 0.69rem;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
}

.estimator-base-link:hover,
.estimator-base-link:focus-visible {
  border-color: rgba(214, 170, 79, 0.42);
  background: rgba(214, 170, 79, 0.06);
  outline: none;
}

.estimator-base-warning {
  margin-top: 0.62rem;
  padding: 0.7rem 0.74rem;
  border-left: 0.18rem solid rgba(214, 170, 79, 0.58);
  background: rgba(92, 63, 18, 0.12);
  color: #e7c889;
  font-size: 0.72rem;
  font-weight: 450;
  line-height: 1.5;
}

.estimator-base-warning p {
  margin: 0;
}

.estimator-base-warning a {
  display: inline-block;
  margin-top: 0.38rem;
  color: var(--gold-2);
  font-weight: 600;
}

/* Task list */

.estimator-task-list {
  margin-top: 0.75rem;
}

.estimator-loading,
.estimator-noscript {
  margin: 0;
  padding: 0.82rem;
  border: 0.0625rem solid var(--glass-line-soft);
  border-radius: 0.72rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 450;
  line-height: 1.5;
  text-align: center;
}

.estimator-task-card {
  overflow: hidden;
  border: 0.0625rem solid rgba(255, 255, 255, 0.1);
  border-radius: 0.78rem;
  background: rgba(9, 10, 9, 0.78);
  box-shadow: none;
}

.estimator-task-card + .estimator-task-card {
  margin-top: 0.64rem;
}

.estimator-task-header,
.estimator-task-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 0.76rem 0.78rem;
}

.estimator-task-header {
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.065);
}

.estimator-task-toggle {
  min-height: 3.8rem;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.estimator-task-toggle:hover,
.estimator-task-toggle:focus-visible {
  background: rgba(214, 170, 79, 0.05);
  outline: none;
}

.estimator-task-copy {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
}

.estimator-task-name,
.estimator-row-name {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  line-height: 1.38;
  overflow-wrap: normal;
  word-break: normal;
}

.estimator-task-name {
  display: block;
  font-size: 0.88rem;
}

.estimator-row-name {
  font-size: 0.76rem;
}

.estimator-task-rule,
.estimator-task-meta {
  display: block;
  margin: 0.22rem 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 450;
  line-height: 1.45;
  overflow-wrap: normal;
  word-break: normal;
}

.estimator-task-result {
  display: block;
  flex: 0 0 auto;
  min-width: 7.1rem;
  margin-left: 0.7rem;
  text-align: right;
}

.estimator-task-points,
.estimator-row-points,
.estimator-slot-points {
  color: var(--gold-2);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.estimator-task-points {
  display: block;
  margin-top: 0.16rem;
  font-size: clamp(0.76rem, 3.2vw, 0.88rem);
  line-height: 1.18;
}

.estimator-accordion-chevron {
  flex: 0 0 auto;
  width: 0.56rem;
  height: 0.56rem;
  margin-left: 0.72rem;
  border-right: 0.12rem solid rgba(242, 242, 242, 0.52);
  border-bottom: 0.12rem solid rgba(242, 242, 242, 0.52);
  transform: translateY(-0.12rem) rotate(45deg);
  transition: transform 160ms ease;
}

.estimator-task-toggle[aria-expanded="false"] .estimator-accordion-chevron {
  transform: translateY(0.08rem) rotate(-45deg);
}

.estimator-task-content {
  padding: 0.76rem;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.065);
}

.estimator-task-single > .estimator-field,
.estimator-task-duration > .estimator-duration-fieldset,
.estimator-task-variant > .estimator-variant-fields {
  margin: 0.76rem;
}

.estimator-field {
  display: block;
  min-width: 0;
}

.estimator-field-label {
  display: block;
  margin-bottom: 0.34rem;
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: normal;
  word-break: normal;
}

.estimator-number-input,
.estimator-duration-input,
.estimator-select {
  width: 100%;
  min-height: 2.9rem;
  border: 0.0625rem solid rgba(255, 255, 255, 0.14);
  border-radius: 0.66rem;
  background-color: #101111;
  color: #ffffff;
  font-family: inherit;
  font-size: 1.04rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  line-height: 1;
  outline: none;
}

.estimator-number-input {
  padding: 0 2.1rem 0 0.62rem;
  letter-spacing: -0.03em;
  text-align: right;
}

.estimator-duration-input {
  padding: 0 0.45rem;
  letter-spacing: -0.02em;
  text-align: center;
}

.estimator-select {
  padding: 0 2rem 0 0.62rem;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gold-2) 50%),
    linear-gradient(135deg, var(--gold-2) 50%, transparent 50%);
  background-position:
    calc(100% - 0.9rem) calc(50% - 0.12rem),
    calc(100% - 0.6rem) calc(50% - 0.12rem);
  background-repeat: no-repeat;
  background-size: 0.32rem 0.32rem, 0.32rem 0.32rem;
}

.estimator-number-input:focus,
.estimator-duration-input:focus,
.estimator-select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 0.14rem rgba(214, 170, 79, 0.12);
}

.estimator-resource-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(7.1rem, 0.72fr);
  align-items: end;
}

.estimator-resource-row + .estimator-resource-row {
  margin-top: 0.66rem;
  padding-top: 0.66rem;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.06);
}

.estimator-resource-row > .estimator-field {
  margin-left: 0.58rem;
}

.estimator-row-points {
  grid-column: 1 / -1;
  margin-top: 0.42rem;
  font-size: 0.74rem;
  line-height: 1.2;
  text-align: right;
}

.estimator-variant-fields,
.estimator-tier-fields {
  display: grid;
  grid-template-columns: minmax(6.5rem, 0.62fr) minmax(0, 1fr);
}

.estimator-variant-fields .estimator-field + .estimator-field,
.estimator-tier-fields .estimator-field + .estimator-field {
  margin-left: 0.58rem;
}

.estimator-duration-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.estimator-duration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.estimator-duration-grid label {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.estimator-duration-grid label + label {
  margin-left: 0.42rem;
}

.estimator-duration-grid label > span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

.estimator-owned-duration {
  padding-bottom: 0.72rem;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.065);
}

.estimator-slot-list {
  margin-top: 0.72rem;
}

.estimator-plan-slot {
  padding: 0.72rem;
  border-left: 0.16rem solid rgba(214, 170, 79, 0.36);
  background: rgba(255, 255, 255, 0.022);
}

.estimator-plan-slot + .estimator-plan-slot {
  margin-top: 0.62rem;
}

.estimator-slot-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  margin-bottom: 0.62rem;
}

.estimator-slot-title {
  min-width: 0;
  margin: 0;
  color: var(--gold-2);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
}

.estimator-slot-points {
  margin-left: auto;
  padding-left: 0.6rem;
  font-size: 0.74rem;
  line-height: 1.2;
  text-align: right;
}

.estimator-plan-slot > .estimator-duration-fieldset + .estimator-field,
.estimator-plan-slot > .estimator-tier-fields + .estimator-duration-fieldset {
  margin-top: 0.65rem;
}

.estimator-copy-slots {
  width: 100%;
  min-height: 2.75rem;
  margin-top: 0.72rem;
  padding: 0.5rem 0.72rem;
  border: 0.0625rem solid rgba(214, 170, 79, 0.28);
  border-radius: 0.66rem;
  background: rgba(214, 170, 79, 0.06);
  color: var(--gold-2);
  font-family: inherit;
  font-size: 0.71rem;
  font-weight: 550;
  cursor: pointer;
}

.estimator-copy-slots:hover,
.estimator-copy-slots:focus-visible {
  border-color: var(--gold);
  background: rgba(214, 170, 79, 0.11);
  outline: none;
}

/* Summary */

.estimator-summary-card {
  margin-top: 0.72rem;
  padding: 0.7rem 0.12rem;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.08);
}

.estimator-summary-card.is-projection {
  border-top-color: rgba(214, 170, 79, 0.3);
}

.estimator-summary-value {
  font-size: clamp(1rem, 4.3vw, 1.18rem);
}

.estimator-summary-note {
  margin: 0.7rem 0 0;
  color: var(--soft);
  font-size: 0.66rem;
  font-weight: 450;
  line-height: 1.48;
}

.estimator-reset-all {
  width: 100%;
  min-height: 2.8rem;
  margin-top: 0.76rem;
  padding: 0 0.9rem;
  border: 0.0625rem solid rgba(255, 255, 255, 0.13);
  border-radius: 0.68rem;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 550;
  cursor: pointer;
}

.estimator-reset-all:hover,
.estimator-reset-all:focus-visible {
  border-color: rgba(214, 170, 79, 0.38);
  color: var(--gold-2);
  outline: none;
}

.estimator-footer {
  margin-top: 1.8em;
}

/* Language tuning */

html[lang="ru"] .estimator-page-title,
html[lang="es"] .estimator-page-title {
  font-size: 1.28rem;
  letter-spacing: -0.02em;
}

html[lang="ru"] .estimator-section-title,
html[lang="ru"] .estimator-section-help,
html[lang="ru"] .estimator-task-name,
html[lang="ru"] .estimator-task-rule,
html[lang="ru"] .estimator-field-label,
html[lang="ru"] .estimator-base-status-label,
html[lang="ru"] .estimator-base-status-value {
  letter-spacing: -0.012em;
}

@media (max-width: 30em) {
  .estimator-section-heading {
    display: block;
  }

  .estimator-section-reset {
    width: 100%;
    margin-top: 0.62rem;
    margin-left: 0;
  }

  .estimator-resource-row {
    grid-template-columns: minmax(0, 1fr) minmax(6.65rem, 0.7fr);
  }
}

@media (max-width: 24em) {
  .estimator-day-tab {
    flex-basis: 0;
    min-width: 0;
    min-height: 2.65rem;
    padding-left: 0.1rem;
    padding-right: 0.1rem;
    font-size: 0.68rem;
  }

  .estimator-day-tab + .estimator-day-tab {
    margin-left: 0.12rem;
  }

  .estimator-score-side {
    padding-left: 0.54rem;
    padding-right: 0.54rem;
  }

  .estimator-score-input {
    padding-right: 1.55rem;
    font-size: 1.04rem;
  }

  .estimator-task-header,
  .estimator-task-toggle,
  .estimator-task-content {
    padding-left: 0.68rem;
    padding-right: 0.68rem;
  }

  .estimator-task-single > .estimator-field,
  .estimator-task-duration > .estimator-duration-fieldset,
  .estimator-task-variant > .estimator-variant-fields {
    margin-left: 0.68rem;
    margin-right: 0.68rem;
  }

  .estimator-task-result {
    min-width: 6.4rem;
    margin-left: 0.5rem;
  }

  .estimator-task-name {
    font-size: 0.84rem;
  }

  .estimator-task-points {
    font-size: 0.74rem;
  }

  .estimator-resource-row {
    grid-template-columns: minmax(0, 1fr) minmax(6.2rem, 0.68fr);
  }

  .estimator-resource-row > .estimator-field {
    margin-left: 0.42rem;
  }

  .estimator-duration-grid label + label {
    margin-left: 0.28rem;
  }

  .estimator-duration-input {
    padding-left: 0.22rem;
    padding-right: 0.22rem;
  }

  .estimator-plan-slot {
    padding: 0.64rem;
  }
}

@media (max-width: 21.5em) {
  .estimator-score-board {
    display: block;
  }

  .estimator-score-side {
    width: 100%;
  }

  .estimator-score-side + .estimator-score-side {
    border-top: 0.0625rem solid rgba(255, 255, 255, 0.16);
    border-left: 0;
  }

  .estimator-variant-fields,
  .estimator-tier-fields {
    grid-template-columns: 1fr;
  }

  .estimator-variant-fields .estimator-field + .estimator-field,
  .estimator-tier-fields .estimator-field + .estimator-field {
    margin-top: 0.58rem;
    margin-left: 0;
  }

  .estimator-resource-row {
    display: block;
  }

  .estimator-resource-row > .estimator-field {
    margin-top: 0.48rem;
    margin-left: 0;
  }

  .estimator-row-points {
    margin-top: 0.4rem;
    text-align: left;
  }
}
.duel-day-tabs,
.estimator-day-tabs {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

/* ========================================
   Sanctuary typography correction
   ======================================== */

.sanctuary-page-title {
  margin: 0.28em 0 0;
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.sanctuary-page-text {
  margin: 0.75em 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.sanctuary-field-label {
  font-size: 0.82rem;
  display: block;
  color: var(--muted);
  font-weight: 550;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.sanctuary-select {
  font-size: 1.05rem;
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0 30px 0 10px;
  border: 0.075em solid rgba(255, 255, 255, 0.16);
  border-radius: 0.82em;
  background: #111211;
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.sanctuary-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 0.85em;
  padding: 0 1.2em;
  border: 0;
  border-radius: 0.9em;
  background: linear-gradient(180deg, #ffe28a 0%, #c99131 100%);
  color: #080705;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: inset 0 0.08em 0 rgba(255, 255, 255, 0.34), 0 0.8em 1.4em rgba(0, 0, 0, 0.28);
}

.sanctuary-total-label {
  color: var(--gold-2);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.sanctuary-total-range {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.sanctuary-resource-name {
  display: block;
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  margin-top: 5px;
  overflow: visible;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

.sanctuary-resource-compact {
  font-size: clamp(0.82rem, 3.8vw, 0.98rem);
  white-space: nowrap;
  grid-column: 2;
  grid-row: 1;
  overflow: visible;
  color: var(--text);
  font-weight: 600;
  line-height: 1.15;
  text-overflow: clip;
  letter-spacing: -0.035em;
}

.sanctuary-resource-exact {
  grid-column: 1 / -1;
  grid-row: 3;
  width: 100%;
  margin-top: 4px;
  overflow: visible;
  color: rgba(242, 242, 242, 0.48);
  font-size: clamp(0.56rem, 2.45vw, 0.68rem);
  font-weight: 450;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  text-overflow: clip;
  letter-spacing: -0.04em;
}

.sanctuary-resource-item.is-total .sanctuary-resource-compact {
  font-size: clamp(1rem, 4.5vw, 1.16rem);
  flex: 0 1 auto;
  order: 2;
  color: var(--gold-2);
  font-weight: 650;
}

.sanctuary-resource-item.is-total .sanctuary-resource-exact {
  flex: 0 0 100%;
  order: 4;
  color: rgba(242, 242, 242, 0.72);
  font-size: clamp(0.58rem, 2.55vw, 0.7rem);
  font-weight: 500;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.sanctuary-time-label {
  flex: 1 1 8em;
  min-width: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 550;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.sanctuary-time-value {
  flex: 0 1 auto;
  max-width: 100%;
  color: var(--gold-2);
  font-size: clamp(1rem, 4.6vw, 1.16rem);
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  overflow-wrap: normal;
  letter-spacing: -0.025em;
}

.sanctuary-breakdown-title {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.35;
}

.sanctuary-stage-title {
  margin: 0;
  color: var(--gold-2);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.sanctuary-detail-label {
  margin: 0;
  color: rgba(242, 242, 242, 0.52);
  font-size: 0.72rem;
  font-weight: 550;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sanctuary-stage-resources .sanctuary-resource-name {
  font-size: 0.68rem;
  text-align: left;
  font-weight: 500;
}

.sanctuary-stage-resources .sanctuary-resource-compact {
  color: #ffffff;
  font-size: clamp(0.78rem, 3.6vw, 0.9rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.sanctuary-stage-resources .sanctuary-resource-exact {
  color: rgba(242, 242, 242, 0.42);
  font-size: clamp(0.54rem, 2.35vw, 0.65rem);
  text-align: left;
  font-weight: 450;
  letter-spacing: -0.04em;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.sanctuary-detail-values p {
  margin: 0;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 24em) {
  .sanctuary-panel {
    padding: 0.78rem;
  }

  .sanctuary-total-heading {
    min-height: 3rem;
    padding: 0.7rem;
  }

  .sanctuary-resource-item {
    padding: 0.62rem 0.12rem;
  }

  .sanctuary-resource-icon {
    width: 1.15rem;
    height: 1.15rem;
  }

  .sanctuary-resource-compact {
    margin-left: 0.12rem;
  }

  .sanctuary-stage-card {
    padding: 0.72rem;
  }

  .sanctuary-stage-resources .sanctuary-resource-item {
    padding: 0.5rem 0.08rem;
  }

  .sanctuary-stage-resources .sanctuary-resource-icon {
    width: 1rem;
    height: 1rem;
  }
}

/* ========================================
   Alliance Duel typography correction
   ======================================== */

.duel-page-title {
  font-size: 1.4rem;
  margin: 0.28em 0 0;
  color: var(--text);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.duel-page-text {
  margin: 0.7em 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.55;
}

.duel-day-tab {
  flex: 1 1 0;
  min-width: 0;
  min-height: 3em;
  padding: 0 0.62em;
  border: 0;
  border-radius: 0.72em;
  background: transparent;
  color: rgba(242, 242, 242, 0.56);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  padding-left: 0.12em;
  padding-right: 0.12em;
}

.duel-accordion-title,
.duel-card-title {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: normal;
  word-break: normal;
}

.duel-save-status,
.duel-base-toggle-label {
  font-size: 0.68rem;
  font-weight: 600;
}


.duel-base-field-label {
  font-size: 0.76rem;
}

.duel-base-input,
.duel-number-input,
.duel-select,
.duel-earned-input {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.duel-base-unit,
.duel-earned-unit {
  font-size: 0.68rem;
  font-weight: 500;
}

.duel-save-button {
  width: 100%;
  min-height: 48px;
  margin-top: 0.85em;
  padding: 0.65em 1em;
  border: 0;
  border-radius: 0.78em;
  background: linear-gradient(180deg, #f3d27a 0%, #bd8125 100%);
  color: #090806;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
}

.duel-calculation-title {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.3;
}

.duel-reset-button {
  flex: 0 0 auto;
  min-height: 44px;
  margin-left: auto;
  padding: 0 0.82em;
  border: 0.075em solid rgba(255, 255, 255, 0.13);
  border-radius: 0.7em;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.duel-earned-label {
  font-size: 0.78rem;
  min-width: 0;
  flex: 1 1 auto;
  padding-right: 0.75em;
  color: #bfe9ff;
  font-weight: 550;
  line-height: 1.35;
}

.duel-card-input-count,
.duel-card-subtotal {
  display: block;
  font-size: 0.66rem;
  font-weight: 550;
  line-height: 1.35;
  white-space: nowrap;
}

.duel-field-label {
  display: block;
  min-height: 1.35em;
  margin-bottom: 0.36em;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: normal;
  word-break: normal;
}

.duel-row-title {
  min-width: 0;
  margin: 0;
  padding-right: 0.65em;
  padding-bottom: 0.65em;
  color: rgba(242, 242, 242, 0.86);
  font-size: 0.74rem;
  font-weight: 550;
  line-height: 1.35;
  overflow-wrap: normal;
  word-break: normal;
}

.duel-slot-title {
  margin: 0 0 0.66em;
  color: var(--gold-2);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
}


.duel-result-value {
  font-size: clamp(0.76rem, 3.1vw, 0.88rem);
}


.duel-copy-button {
  width: 100%;
  min-height: 44px;
  margin-bottom: 0.62em;
  padding: 0.5em 0.75em;
  border: 0.075em solid rgba(214, 170, 79, 0.28);
  border-radius: 0.72em;
  background: rgba(214, 170, 79, 0.075);
  color: var(--gold-2);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.duel-sticky-total-label {
  font-size: 0.75rem;
  min-width: 0;
  padding-right: 0.7em;
  color: rgba(242, 242, 242, 0.72);
  font-weight: 550;
  line-height: 1.2;
  flex: 0 1 auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.duel-sticky-total-value {
  font-size: clamp(1rem, 4.4vw, 1.2rem);
  display: block;
  min-width: 0;
  margin-left: auto;
  overflow: visible;
  color: var(--gold-2);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.035em;
  text-align: right;
  white-space: nowrap;
  text-overflow: clip;
  flex: 0 0 auto;
}

/* ========================================
   Alliance Duel: estimator page link
   ======================================== */

.duel-estimator-entry {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 1rem;
  margin-bottom: 1.35rem;
  padding: 0.95rem 2.8rem 0.95rem 0.15rem;
  border-top: 0.0625rem solid rgba(184, 134, 73, 0.34);
  border-bottom: 0.0625rem solid rgba(184, 134, 73, 0.34);
  background: rgba(0,0,0,0.65);
  color: inherit;
  text-decoration: none;
}

.duel-estimator-entry-copy {
  display: block;
  min-width: 0;
  width: 100%;
  padding-left: 8px;
}

.duel-estimator-entry-kicker {
  display: block;
  margin-bottom: 0.28rem;
  color: rgba(228, 184, 95, 0.72);
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.14em;
}

.duel-estimator-entry-title {
  display: block;
  color: #e4b85f;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

.duel-estimator-entry-text {
  display: block;
  margin-top: 0.22rem;
  color: rgba(242, 242, 242, 0.56);
  font-size: 0.72rem;
  font-weight: 450;
  line-height: 1.45;
}

.duel-estimator-entry-arrow {
  position: absolute;
  top: 50%;
  right: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: #e4b85f;
  font-size: 1.8rem;
  font-weight: 300;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.duel-estimator-entry:hover .duel-estimator-entry-title,
.duel-estimator-entry:focus-visible .duel-estimator-entry-title {
  color: #f2d083;
}

.duel-estimator-entry:hover .duel-estimator-entry-arrow,
.duel-estimator-entry:focus-visible .duel-estimator-entry-arrow {
  color: #f2d083;
  transform: translate(0.12rem, -50%);
}

.duel-estimator-entry:focus-visible {
  outline: 0.125rem solid rgba(228, 184, 95, 0.65);
  outline-offset: 0.25rem;
}

@media (max-width: 24em) {
  .duel-estimator-entry {
    margin-top: 0.9rem;
    margin-bottom: 1.2rem;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    padding-right: 2.45rem;
  }

  .duel-estimator-entry-title {
    font-size: 0.9rem;
  }

  .duel-estimator-entry-text {
    font-size: 0.69rem;
  }

  .duel-estimator-entry-arrow {
    right: 0.1rem;
    font-size: 1.7rem;
  }
}

.duel-base-input,
.duel-number-input,
.duel-earned-input {
  font-size: 1.04rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   Alliance Duel UI v3
   - Keep the outer gold accordion frame
   - Convert base-point items to a ruled list
   - Compact and widen numeric inputs
   - Place task title and input side by side
   - Show each earned-point subtotal as a small borderless row
   - Normalise Russian typography
   ========================================================= */

/* ---------------------------------------------------------
   1. Shared Alliance Duel sizing
   --------------------------------------------------------- */

.duel-main {
  margin-top: 0.6em;
  --duel-inline-padding: clamp(0.72rem, 3vw, 0.92rem);
  --duel-block-padding: clamp(0.62rem, 2.7vw, 0.82rem);
  --duel-input-column: minmax(8.5rem, 46%);
  --duel-divider: rgba(255, 255, 255, 0.075);
  --duel-divider-strong: rgba(255, 255, 255, 0.11);
}

/* ---------------------------------------------------------
   2. Base-point accordion
   Keep the outer gold frame because this is one collapsible
   settings section.
   --------------------------------------------------------- */

.duel-base-panel {
  border-color: rgba(214, 170, 79, 0.42);
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 52%),
    rgba(8, 9, 8, 0.9);
  box-shadow: none;
}

.duel-accordion-toggle {
  min-height: 3.65rem;
  padding: 0.72rem var(--duel-inline-padding);
}

.duel-accordion-heading {
  align-items: center;
  flex-wrap: wrap;
}

.duel-base-toggle-label {
  flex: 0 0 auto;
  min-width: 4rem;
  margin-left: 0.6rem;
  padding: 0.42rem 0.62rem;
  border: 0.0625rem solid rgba(214, 170, 79, 0.42);
  border-radius: 999rem;
  background: rgba(214, 170, 79, 0.1);
  color: var(--gold-2);
  font-size: 0.68em;
  font-weight: 820;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.duel-base-toggle-label::after {
  content: "";
  display: inline-block;
  width: 0.36rem;
  height: 0.36rem;
  margin-left: 0.42rem;
  border-right: 0.1rem solid currentColor;
  border-bottom: 0.1rem solid currentColor;
  transform: translateY(-0.08rem) rotate(45deg);
  transition: transform 160ms ease;
}

.duel-accordion-toggle[aria-expanded="true"] .duel-base-toggle-label::after {
  transform: translateY(0.08rem) rotate(-135deg);
}

.duel-base-content {
  padding: 0 var(--duel-inline-padding) var(--duel-inline-padding);
  border-top: 0.075em solid rgba(255, 255, 255, 0.07);
}

.duel-base-help {
  margin: 0.68rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.55;
}

/* ---------------------------------------------------------
   3. Base-point list
   Remove only the inner rounded item cards. The outer gold
   accordion frame above remains unchanged.
   --------------------------------------------------------- */

.duel-base-list {
  margin-top: 0.48rem;
  border-top: 0.0625rem solid var(--duel-divider-strong);
  border-bottom: 0.0625rem solid var(--duel-divider-strong);
}

.duel-base-list > .duel-base-group {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.duel-base-list > .duel-base-group + .duel-base-group {
  margin-top: 0;
  border-top: 0.0625rem solid var(--duel-divider);
}

.duel-base-group-title {
  margin: 0;
  color: var(--gold-2);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
  padding: 0.62rem 0 0.16rem;
}

.duel-base-field {
  grid-template-columns: minmax(0, 1fr) minmax(8.75rem, 46%);
  display: grid;
  align-items: center;
  min-height: 0;
  padding: 0.42rem 0;
}

.duel-base-field + .duel-base-field {
  margin-top: 0;
  padding-top: 0.42rem;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.06);
}

.duel-base-field-label {
  min-width: 0;
  padding-right: 0.7rem;
  color: rgba(242, 242, 242, 0.82);
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: normal;
  word-break: normal;
}

.duel-base-input {
  padding: 0 2.15em 0 0.68em;
  text-align: right;
  min-width: 0;
  min-height: 2.45rem;
  height: auto;
  padding-top: 0.48rem;
  padding-bottom: 0.48rem;
  border-radius: 0.58rem;
  font-size: 16px;
  font-weight: 450;
}

/* ---------------------------------------------------------
   4. Current calculation: compact task blocks
   For ordinary task cards, the task title and input area are
   aligned on the same row. Height remains content-driven.
   --------------------------------------------------------- */

.duel-task-card {
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.82rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.02), transparent 56%),
    rgba(8, 9, 8, 0.84);
  box-shadow: none;
}

.duel-task-card + .duel-task-card {
  margin-top: 0.62rem;
}

.duel-task-card-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--duel-input-column);
  align-items: center;
}

.duel-task-card-task > .duel-card-heading {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  min-height: 0;
  padding: var(--duel-block-padding) 0.72rem var(--duel-block-padding) var(--duel-inline-padding);
  border: 0;
}

.duel-task-card-task > .duel-card-content {
  display: contents;
}

.duel-task-card-task > .duel-card-content > .duel-field,
.duel-task-card-task > .duel-card-content > .duel-duration {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  min-width: 0;
  margin: 0;
  padding: var(--duel-block-padding) var(--duel-inline-padding) var(--duel-block-padding) 0;
}

.duel-task-card-task .duel-card-title {
  font-size: clamp(0.82rem, 3.7vw, 0.94rem);
  line-height: 1.38;
}

.duel-task-card-task .duel-field-label {
  min-height: 0;
  margin-bottom: 0.24rem;
  font-size: 0.68rem;
  line-height: 1.3;
}

/* ---------------------------------------------------------
   5. Numeric controls
   Width is fluid; height is controlled with min-height and
   padding rather than a fixed height.
   --------------------------------------------------------- */

.duel-number-input,
.duel-select {
  min-width: 0;
  min-height: 2.45rem;
  height: auto;
  border-radius: 0.58rem;
  font-size: 16px;
  font-weight: 450;
  line-height: 1.15;
}

.duel-number-input {
  padding: 0.48rem 0.65rem;
  text-align: right;
}

.duel-select {
  padding: 0 2em 0 0.68em;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold-2) 50%),
    linear-gradient(135deg, var(--gold-2) 50%, transparent 50%);
  background-position: calc(100% - 0.92em) calc(50% - 0.13em),
    calc(100% - 0.61em) calc(50% - 0.13em);
  background-repeat: no-repeat;
  background-size: 0.34em 0.34em, 0.34em 0.34em;
  padding-top: 0.48rem;
  padding-bottom: 0.48rem;
}

.duel-duration .duel-number-input {
  padding-left: 0.24rem;
  padding-right: 0.24rem;
  text-align: center;
}

/* ---------------------------------------------------------
   6. Earned-point subtotal
   This is a small subtotal, not the page total. Keep it gold,
   borderless and visually subordinate.
   --------------------------------------------------------- */

.duel-result {
  min-width: 0;
  padding: 0.52rem var(--duel-inline-padding);
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
  margin: 0;
  border-top: 0.0625rem solid var(--duel-divider);
  box-shadow: none;
}

.duel-result-label {
  display: block;
  min-height: 0;
  color: rgba(242, 242, 242, 0.48);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.3;
  min-width: 0;
}

.duel-result-value {
  font-size: clamp(0.76rem, 3.1vw, 0.86rem);
  display: block;
  min-width: 0;
  margin-top: 0.25rem;
  overflow: visible;
  color: var(--gold-2);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: clip;
  letter-spacing: -0.02em;
  flex: 0 0 auto;
  margin: 0 0 0 auto;
}

.duel-result-value.is-waiting {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
}

/* ---------------------------------------------------------
   7. Grouped task rows
   Resource rows follow the same title/input top row and small
   subtotal bottom row. Complex slot cards retain their current
   structure but use the borderless subtotal treatment.
   --------------------------------------------------------- */

.duel-resource-row {
  grid-template-columns: minmax(0, 1fr) var(--duel-input-column);
  display: grid;
  align-items: center;
}

.duel-resource-row + .duel-resource-row {
  margin-top: 0;
  padding-top: 0;
  border-top: 0.0625rem solid var(--duel-divider);
}

.duel-resource-row .duel-row-title {
  align-self: center;
  padding: var(--duel-block-padding) 0.72rem var(--duel-block-padding) 0;
}

.duel-resource-row > .duel-field {
  align-self: center;
  margin-left: 0;
  padding: var(--duel-block-padding) 0;
}

.duel-resource-row .duel-result {
  grid-column: 1 / -1;
  margin: 0;
  padding-right: 0;
  padding-left: 0;
}

.duel-task-card-variant_task .duel-result,
.duel-task-card-tier_task .duel-result,
.duel-slot .duel-result {
  margin-left: 0;
}

.duel-slot .duel-result {
  margin-top: 0.58rem;
  margin-left: 0;
  padding-right: 0;
  padding-left: 0;
}

/* ---------------------------------------------------------
   8. Russian typography
   Remove unintended tracking while preserving small deliberate
   tracking only for kicker labels.
   --------------------------------------------------------- */

html[lang="ru"] .duel-page-title,
html[lang="ru"] .duel-page-text,
html[lang="ru"] .duel-day-tab,
html[lang="ru"] .duel-phase-title,
html[lang="ru"] .duel-estimator-entry-title,
html[lang="ru"] .duel-estimator-entry-text,
html[lang="ru"] .duel-accordion-title,
html[lang="ru"] .duel-save-status,
html[lang="ru"] .duel-base-toggle-label,
html[lang="ru"] .duel-base-help,
html[lang="ru"] .duel-base-group-title,
html[lang="ru"] .duel-base-field-label,
html[lang="ru"] .duel-calculation-title,
html[lang="ru"] .duel-earned-label,
html[lang="ru"] .duel-card-title,
html[lang="ru"] .duel-field-label,
html[lang="ru"] .duel-row-title,
html[lang="ru"] .duel-result-label,
html[lang="ru"] .duel-result-value,
html[lang="ru"] .duel-sticky-total-label,
html[lang="ru"] .duel-sticky-total-value {
  letter-spacing: 0;
  word-spacing: 0;
  text-transform: none;
}

html[lang="ru"] .duel-intro .section-kicker {
  letter-spacing: 0.08em;
}

html[lang="ru"] .duel-estimator-entry-kicker {
  letter-spacing: 0.05em;
}

html[lang="ru"] .duel-page-title {
  font-size: clamp(1.08rem, 5.2vw, 1.28rem);
  line-height: 1.24;
  overflow-wrap: normal;
  word-break: normal;
}

html[lang="ru"] .duel-page-text {
  font-size: 0.82rem;
  line-height: 1.5;
}

html[lang="ru"] .duel-accordion-title {
  flex: 0 0 100%;
}

html[lang="ru"] .duel-save-status {
  margin-top: 0.28rem;
  margin-left: 0;
}

html[lang="ru"] .duel-base-field-label,
html[lang="ru"] .duel-card-title,
html[lang="ru"] .duel-row-title {
  font-size: 0.7rem;
  line-height: 1.38;
}

/* ---------------------------------------------------------
   9. Narrow viewports
   Keep the side-by-side concept while protecting input width.
   --------------------------------------------------------- */

@media (max-width: 24em) {
  .duel-main {
    --duel-inline-padding: 0.72rem;
    --duel-block-padding: 0.58rem;
    --duel-input-column: minmax(8rem, 47%);
  }

  .duel-base-field {
    grid-template-columns: minmax(0, 1fr) minmax(8rem, 47%);
  }

  .duel-task-card-task > .duel-card-heading {
    padding-right: 0.55rem;
  }

  .duel-task-card-task .duel-card-title {
    font-size: 0.82rem;
  }

  .duel-task-card-task .duel-field-label {
    font-size: 0.64rem;
  }

  .duel-result {
    padding-top: 0.48rem;
    padding-bottom: 0.48rem;
  }
}

@media (max-width: 21.5em) {
  .duel-main {
    --duel-inline-padding: 0.64rem;
    --duel-block-padding: 0.54rem;
    --duel-input-column: minmax(7.5rem, 48%);
  }

  .duel-base-field {
    grid-template-columns: minmax(0, 1fr) minmax(7.5rem, 48%);
  }

  .duel-base-toggle-label {
    min-width: 0;
    margin-left: 0.38rem;
    padding-right: 0.46rem;
    padding-left: 0.46rem;
  }

  .duel-base-toggle-label::after {
    margin-left: 0.3rem;
  }

  .duel-task-card-task .duel-card-title,
  .duel-row-title {
    font-size: 0.76rem;
  }

  .duel-number-input,
  .duel-base-input,
  .duel-select {
    font-size: 16px;
  }
}

/* =========================================================
   Alliance Duel Outcome Estimator
   Complete integration override
   Version: 20260803-estimator-simple-input-1

   Includes:
   - centred current point-gap block
   - forward/reverse mode tabs
   - reverse target input and result rows
   - reverse result colour states
   - simplified construction/research inputs
   - simplified training inputs with up to four grounds
   - fixed bottom summary
   ========================================================= */

/* ---------------------------------------------------------
   1. Current point gap
   --------------------------------------------------------- */

.estimator-gap-result {
  margin-top: 0.78rem;
  padding: 0.74rem 0.12rem 0;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

/* ---------------------------------------------------------
   2. Forward / reverse mode tabs
   --------------------------------------------------------- */

.estimator-mode-tabs {
  display: flex;
  width: 100%;
  margin-top: 0.9rem;
  overflow: hidden;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.14);
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.018);
}

.estimator-mode-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 50%;
  width: 50%;
  min-width: 0;
  min-height: 3.1rem;
  padding: 0.58rem 0.45rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(242, 242, 242, 0.58);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.estimator-mode-tab + .estimator-mode-tab {
  border-left: 0.0625rem solid rgba(255, 255, 255, 0.12);
}

.estimator-mode-tab:hover,
.estimator-mode-tab:focus-visible {
  color: var(--gold-2);
  background: rgba(214, 170, 79, 0.055);
  outline: none;
}

.estimator-mode-tab.is-active,
.estimator-mode-tab[aria-selected="true"] {
  background: linear-gradient(180deg, rgba(243, 210, 122, 0.98) 0%, rgba(189, 129, 37, 0.98) 100%);
  color: #090806;
}

.estimator-mode-panel {
  margin-top: 0.75rem;
  outline: none;
}

.estimator-mode-panel[hidden],
.estimator-summary-panel[hidden] {
  display: none !important;
}

.estimator-mode-panel .estimator-task-list {
  margin-top: 0;
}

html[lang="ru"] .estimator-mode-tab,
html[lang="es"] .estimator-mode-tab {
  font-size: 0.74rem;
  line-height: 1.16;
}

/* ---------------------------------------------------------
   3. Reverse target input
   --------------------------------------------------------- */

.estimator-reverse-target {
  padding: 0.12rem 0 0.82rem;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.1);
}

.estimator-reverse-target-field {
  display: block;
  min-width: 0;
}

.estimator-reverse-input-line {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  margin-top: 0.34rem;
}

.estimator-target-points-input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  padding-right: 0.68rem;
  text-align: right;
}

.estimator-reverse-input-line .estimator-input-unit {
  position: static;
  flex: 0 0 auto;
  margin-left: 0.48rem;
  color: rgba(242, 242, 242, 0.72);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1;
  transform: none;
  pointer-events: none;
}

.estimator-reverse-help {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 450;
  line-height: 1.48;
}

/* ---------------------------------------------------------
   4. Reverse result list
   --------------------------------------------------------- */

.estimator-reverse-task-list {
  margin-top: 0.15rem;
}

.estimator-reverse-empty {
  margin: 0;
  padding: 0.9rem 0.1rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 450;
  line-height: 1.5;
  text-align: left;
}

.estimator-reverse-task {
  padding: 0.82rem 0.08rem 0.86rem;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.1);
}

.estimator-reverse-task-name {
  margin: 0;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.estimator-reverse-values {
  display: flex;
  width: 100%;
  min-width: 0;
  margin-top: 0.52rem;
}

.estimator-reverse-value {
  flex: 0 0 50%;
  width: 50%;
  min-width: 0;
}

.estimator-reverse-value.is-required {
  padding-right: 0.64rem;
}

.estimator-reverse-value.is-earned {
  padding-left: 0.64rem;
  border-left: 0.0625rem solid rgba(255, 255, 255, 0.1);
}

.estimator-reverse-label {
  display: block;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

.estimator-reverse-number {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 0.18rem;
  color: #bfe9ff;
  font-size: clamp(0.62rem, 2.8vw, 0.94rem);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.estimator-reverse-value.is-earned .estimator-reverse-number {
  color: var(--gold-2);
}

.estimator-reverse-task.is-base-missing .estimator-reverse-value.is-required .estimator-reverse-number {
  color: #e7a0a0;
}

.estimator-reverse-task.is-base-missing .estimator-reverse-value.is-earned .estimator-reverse-number {
  color: var(--muted);
}

.estimator-reverse-duration-number {
  font-size: 1em;
  font-variant-numeric: tabular-nums;
}

.estimator-reverse-duration-unit {
  margin-left: 0.06em;
  margin-right: 0.16em;
  font-size: 0.66em;
  font-weight: 550;
  letter-spacing: -0.04em;
  vertical-align: 0.08em;
}

.estimator-reverse-duration-unit:last-child {
  margin-right: 0;
}

.estimator-reverse-duration-total {
  display: inline;
  margin-left: 0.28em;
  font-size: 0.82em;
  font-variant-numeric: tabular-nums;
  font-weight: 550;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.estimator-reverse-duration-total-number {
  font-size: 1em;
}

.estimator-reverse-duration-total-unit {
  margin-left: 0.04em;
  font-size: 0.78em;
  font-weight: 550;
  letter-spacing: -0.04em;
  vertical-align: 0.06em;
}

.estimator-boost-conversion {
  margin-top: 0.62rem;
  padding-top: 0.56rem;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.075);
}

.estimator-boost-conversion[hidden] {
  display: none !important;
}

.estimator-boost-conversion-label {
  display: block;
  color: rgba(242, 242, 242, 0.52);
  font-size: 0.61rem;
  font-weight: 500;
  line-height: 1.3;
}

.estimator-boost-conversion-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
  margin-top: 0.34rem;
  overflow: hidden;
}

.estimator-boost-conversion-item {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  color: rgba(242, 242, 242, 0.84);
  font-size: clamp(0.59rem, 2.55vw, 0.7rem);
  font-variant-numeric: tabular-nums;
  font-weight: 550;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.estimator-boost-conversion-item:nth-child(-n/**/+3) {
  flex: 0 0 33.333%;
  width: 33.333%;
}

.estimator-boost-conversion-item:nth-child(n/**/+4) {
  flex: 0 0 33.333%;
  width: 33.333%;
  margin-top: 0.38rem;
}

.estimator-boost-conversion-item:nth-child(4) {
  border-left: 0;
}

.estimator-boost-conversion-item + .estimator-boost-conversion-item {
  border-left: 0.0625rem solid rgba(255, 255, 255, 0.1);
}

.estimator-boost-clock {
  display: block;
  flex: 0 0 auto;
  width: 0.88rem;
  height: 0.88rem;
  margin-right: 0.18rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.estimator-boost-conversion-item.is-long .estimator-boost-clock {
  color: #9b7cff;
}

.estimator-boost-conversion-item.is-short .estimator-boost-clock {
  color: #b8e63a;
}

.estimator-boost-duration {
  flex: 0 0 auto;
  color: rgba(242, 242, 242, 0.78);
}

.estimator-boost-times {
  flex: 0 0 auto;
  margin-right: 0.04em;
  margin-left: 0.04em;
  color: rgba(242, 242, 242, 0.46);
  font-size: 1em;
}

.estimator-boost-count {
  display: inline;
  min-width: 0;
  overflow: visible;
  color: #ffffff;
  font: inherit;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

.estimator-boost-conversion-note {
  margin: 0.3rem 0 0;
  color: rgba(242, 242, 242, 0.34);
  font-size: 0.54rem;
  font-weight: 450;
  line-height: 1.35;
}

/* ---------------------------------------------------------
   5. Simplified construction and research inputs
   --------------------------------------------------------- */

.estimator-simple-activity-content {
  padding-top: 0.78rem;
  padding-bottom: 0.78rem;
}

.estimator-simple-activity-content > .estimator-duration-fieldset {
  padding-bottom: 0.76rem;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.075);
}

.estimator-simple-activity-content > .estimator-might-field {
  margin-top: 0.76rem;
}

.estimator-simple-activity-content .estimator-number-input {
  min-height: 2.9rem;
}

.estimator-simple-activity .estimator-task-meta {
  color: rgba(242, 242, 242, 0.48);
}

/* ---------------------------------------------------------
   6. Simplified training inputs
   --------------------------------------------------------- */

.estimator-training-content {
  padding-top: 0.78rem;
  padding-bottom: 0.78rem;
}

.estimator-training-duration {
  padding-bottom: 0.78rem;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.075);
}

.estimator-training-slot-list {
  margin-top: 0.72rem;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.075);
}

.estimator-training-slot {
  padding: 0.72rem 0;
  border-left: 0;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.075);
  background: transparent;
}

.estimator-training-slot + .estimator-training-slot {
  margin-top: 0;
}

.estimator-training-slot .estimator-slot-heading {
  margin-bottom: 0.58rem;
}

.estimator-training-slot .estimator-slot-title {
  flex: 1 1 auto;
}

.estimator-training-slot .estimator-slot-points {
  flex: 0 0 auto;
  margin-left: 0.65rem;
  padding-left: 0;
}

.estimator-remove-training-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
  margin-left: 0.5rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(231, 160, 160, 0.78);
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.estimator-remove-training-slot:hover,
.estimator-remove-training-slot:focus-visible {
  color: #f0b0b0;
  background: rgba(220, 114, 114, 0.08);
  outline: none;
}

.estimator-remove-training-slot[hidden] {
  display: none !important;
}

.estimator-add-training-slot {
  width: 100%;
  min-height: 2.8rem;
  margin-top: 0.72rem;
  padding: 0.52rem 0.75rem;
  border: 0.0625rem solid rgba(214, 170, 79, 0.3);
  border-radius: 0.66rem;
  background: rgba(214, 170, 79, 0.065);
  color: var(--gold-2);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}

.estimator-add-training-slot:hover,
.estimator-add-training-slot:focus-visible {
  border-color: var(--gold);
  background: rgba(214, 170, 79, 0.12);
  outline: none;
}

.estimator-add-training-slot:disabled {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
  color: var(--soft);
  cursor: default;
}

.estimator-add-training-slot[hidden] {
  display: none !important;
}

/* ---------------------------------------------------------
   7. Summary actions in normal document flow
   --------------------------------------------------------- */

.estimator-summary-actions {
  margin-top: 0.15rem;
  padding: 0.9rem 0 0.35rem;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.1);
}

/* ---------------------------------------------------------
   8. Fixed bottom summary
   --------------------------------------------------------- */

.estimator-sticky-summary {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 80;
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 0.0625rem solid rgba(214, 170, 79, 0.55);
  background: rgba(4, 5, 5, 0.94);
  backdrop-filter: blur(0.95rem) saturate(135%);
  -webkit-backdrop-filter: blur(0.95rem) saturate(135%);
  box-shadow: 0 -0.65rem 1.4rem rgba(0, 0, 0, 0.38);
}

.estimator-sticky-summary-inner {
  width: 100%;
  max-width: 43.5em;
  margin-right: auto;
  margin-left: auto;
  padding: 0.55rem 1.1em 0.62rem;
}

.estimator-sticky-summary-title {
  margin: 0;
  color: var(--gold-2);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.25;
}

.estimator-sticky-summary-panel {
  margin-top: 0.38rem;
}

.estimator-sticky-summary-values {
  display: flex;
  width: 100%;
  min-width: 0;
}

.estimator-sticky-summary-item,
.estimator-sticky-summary .estimator-summary-card {
  flex: 0 0 50%;
  width: 50%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.estimator-sticky-summary-item:first-child {
  padding-right: 0.68rem;
}

.estimator-sticky-summary-item + .estimator-sticky-summary-item {
  padding-left: 0.68rem;
  border-left: 0.0625rem solid rgba(255, 255, 255, 0.12);
}

.estimator-sticky-summary-label {
  display: block;
  min-height: 2.35em;
  color: rgba(242, 242, 242, 0.58);
  font-size: 0.63rem;
  font-weight: 500;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.estimator-sticky-summary-value {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 0.12rem;
  color: #ffffff;
  font-size: clamp(0.82rem, 3.8vw, 1.12rem);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.estimator-main + .site-footer {
  margin-bottom: calc(7.2rem + env(safe-area-inset-bottom));
}

/* ---------------------------------------------------------
   9. Narrow-screen adjustments
   --------------------------------------------------------- */

@media (max-width: 24em) {
  .estimator-mode-tab {
    min-height: 3.2rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    font-size: 0.74rem;
  }

  html[lang="ru"] .estimator-mode-tab,
  html[lang="es"] .estimator-mode-tab {
    font-size: 0.69rem;
  }

  .estimator-reverse-value.is-required {
    padding-right: 0.45rem;
  }

  .estimator-reverse-value.is-earned {
    padding-left: 0.45rem;
  }

  .estimator-reverse-label {
    font-size: 0.61rem;
  }

  .estimator-reverse-number {
    font-size: clamp(0.6rem, 2.9vw, 0.82rem);
    letter-spacing: -0.055em;
  }

  .estimator-reverse-duration-unit {
    margin-right: 0.1em;
    font-size: 0.62em;
  }

  .estimator-reverse-duration-total {
    margin-left: 0.2em;
    font-size: 0.76em;
  }

  .estimator-reverse-duration-total-unit {
    font-size: 0.74em;
  }

  .estimator-boost-conversion {
    margin-top: 0.54rem;
    padding-top: 0.5rem;
  }

  .estimator-boost-conversion-label {
    font-size: 0.57rem;
  }

  .estimator-boost-conversion-item {
    font-size: clamp(0.56rem, 2.42vw, 0.66rem);
    letter-spacing: -0.05em;
  }

  .estimator-boost-conversion-item:nth-child(n/**/+4) {
    margin-top: 0.34rem;
  }

  .estimator-boost-clock {
    width: 0.8rem;
    height: 0.8rem;
    margin-right: 0.13rem;
  }

  .estimator-boost-conversion-note {
    font-size: 0.51rem;
  }

  .estimator-simple-activity-content,
  .estimator-training-content {
    padding-left: 0.68rem;
    padding-right: 0.68rem;
  }

  .estimator-training-slot .estimator-tier-fields {
    grid-template-columns: minmax(5.2rem, 0.54fr) minmax(0, 1fr);
  }

  .estimator-training-slot .estimator-tier-fields .estimator-field + .estimator-field {
    margin-left: 0.42rem;
  }

  .estimator-remove-training-slot {
    width: 1.8rem;
    min-width: 1.8rem;
    height: 1.8rem;
    margin-left: 0.35rem;
  }

  .estimator-sticky-summary-inner {
    padding-right: 0.82em;
    padding-left: 0.82em;
  }

  .estimator-sticky-summary-item:first-child {
    padding-right: 0.48rem;
  }

  .estimator-sticky-summary-item + .estimator-sticky-summary-item {
    padding-left: 0.48rem;
  }

  .estimator-sticky-summary-label {
    font-size: 0.58rem;
  }

  .estimator-sticky-summary-value {
    font-size: clamp(0.76rem, 3.9vw, 1rem);
    letter-spacing: -0.05em;
  }
}

@media (max-width: 21.5em) {
  .estimator-reverse-task-name {
    font-size: 0.8rem;
  }

  .estimator-reverse-number {
    font-size: 0.58rem;
  }

  .estimator-reverse-duration-unit {
    font-size: 0.58em;
  }

  .estimator-reverse-duration-total {
    margin-left: 0.16em;
    font-size: 0.72em;
  }

  .estimator-reverse-duration-total-unit {
    font-size: 0.72em;
  }

  .estimator-boost-conversion-item {
    font-size: 0.53rem;
    letter-spacing: -0.055em;
  }

  .estimator-boost-clock {
    width: 0.72rem;
    height: 0.72rem;
    margin-right: 0.09rem;
  }

  .estimator-boost-times {
    margin-right: 0.02em;
    margin-left: 0.02em;
  }

  .estimator-training-slot .estimator-tier-fields {
    grid-template-columns: 1fr;
  }

  .estimator-training-slot .estimator-tier-fields .estimator-field + .estimator-field {
    margin-top: 0.55rem;
    margin-left: 0;
  }

  .estimator-sticky-summary-label {
    font-size: 0.55rem;
  }

  .estimator-sticky-summary-value {
    font-size: 0.72rem;
  }
}

/* ---------------------------------------------------------
   10. Reduced motion
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .estimator-mode-tab,
  .estimator-accordion-chevron {
    transition: none;
  }
}

/* =========================================================
   Tips index
   ========================================================= */

.tips-main {
  margin-top: 0.6em;
}

.tips-intro {
  margin-top: 1.2em;
}

.tips-page-title {
  margin: 0.28em 0 0;
  color: var(--text);
  font-size: clamp(1.55rem, 6vw, 1.9rem);
  font-weight: 780;
  line-height: 1.08;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.tips-page-text {
  margin: 0.75em 0 0;
  color: var(--muted);
  font-size: clamp(0.82rem, 3.4vw, 0.95rem);
  font-weight: 620;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------
   Tips grid
   横2列固定 / 正方形固定 / 縦横間隔を完全統一
   gapは使用しない
   --------------------------------------------------------- */

.tips-grid {
  --tips-space: clamp(0.68em, 3.2vw, 0.96em);
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin-top: clamp(1.55em, 6vw, 2em);
  padding: 0;
}

/* 親幅から中央余白を引き、残りを正確に2分割 */
.tips-card {
  position: relative;
  display: block;
  flex: 0 0 calc((100% - var(--tips-space)) / 2);
  width: calc((100% - var(--tips-space)) / 2);
  max-width: calc((100% - var(--tips-space)) / 2);
  min-width: 0;
  aspect-ratio: 1 / 1;
  margin: 0 0 var(--tips-space);
  overflow: hidden;
  border: 0.075em solid var(--glass-line);
  border-radius: clamp(1em, 4vw, 1.45em);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.016)),
    rgba(10, 11, 10, 0.56);
  color: inherit;
  text-decoration: none;
  box-shadow:
    0 1.1em 2.15em rgba(0, 0, 0, 0.27),
    inset 0 0.075em 0 rgba(255, 255, 255, 0.065);
  isolation: isolate;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

/* 横方向のカード間隔
   縦方向と同じ --tips-space を使用 */
.tips-card:nth-child(even) {
  margin-left: var(--tips-space);
}

/* 最終行の下にはカード間隔を残さない */
.tips-card:last-child,
.tips-card:nth-last-child(2):nth-child(odd) {
  margin-bottom: 0;
}

/* ---------------------------------------------------------
   Card image
   --------------------------------------------------------- */

.tips-card-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  overflow: hidden;
}

.tips-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--tips-image-position, center);
  transform: scale(1.002);
  transition: transform 240ms ease;
}

.tips-card-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.14) 0%,
      rgba(0, 0, 0, 0.03) 36%,
      rgba(0, 0, 0, 0.24) 58%,
      rgba(0, 0, 0, 0.88) 100%
    );
}

/* ---------------------------------------------------------
   Card content
   --------------------------------------------------------- */

.tips-card-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  padding: clamp(0.68em, 3vw, 0.95em);
  pointer-events: none;
}

.tips-card-category {
  position: absolute;
  top: clamp(0.68em, 3vw, 0.95em);
  left: clamp(0.68em, 3vw, 0.95em);
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 1.5em);
  min-height: 1.8em;
  padding: 0 0.62em;
  overflow: hidden;
  border: 0.075em solid rgba(243, 210, 122, 0.26);
  border-radius: 999em;
  background: rgba(5, 6, 6, 0.58);
  backdrop-filter: blur(0.42em);
  -webkit-backdrop-filter: blur(0.42em);
  color: var(--gold-2);
  font-size: clamp(0.56rem, 2.25vw, 0.68rem);
  font-weight: 820;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tips-card-title {
  position: absolute;
  left: clamp(0.72em, 3.1vw, 1em);
  right: clamp(2.15em, 8vw, 2.8em);
  bottom: clamp(0.72em, 3.1vw, 1em);
  display: -webkit-box;
  overflow: hidden;
  color: #ffffff;
  font-size: clamp(0.88rem, 3.55vw, 1.08rem);
  font-weight: 780;
  line-height: 1.22;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  text-shadow: 0 0.12em 0.55em rgba(0, 0, 0, 0.82);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.tips-card-arrow {
  position: absolute;
  right: clamp(0.65em, 2.8vw, 0.9em);
  bottom: clamp(0.65em, 2.8vw, 0.9em);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(1.65em, 6.6vw, 1.95em);
  aspect-ratio: 1 / 1;
  border: 0.075em solid rgba(243, 210, 122, 0.3);
  border-radius: 50%;
  background: rgba(5, 6, 6, 0.55);
  backdrop-filter: blur(0.42em);
  -webkit-backdrop-filter: blur(0.42em);
  color: var(--gold-2);
  font-size: clamp(0.76rem, 3vw, 0.94rem);
  font-weight: 760;
  line-height: 1;
}

/* ---------------------------------------------------------
   Pointer interaction
   タッチ端末では不要なhoverを発生させない
   --------------------------------------------------------- */

@media (hover: hover) and (pointer: fine) {
  .tips-card:hover {
    border-color: rgba(243, 210, 122, 0.55);
    box-shadow:
      0 1.2em 2.35em rgba(0, 0, 0, 0.34),
      inset 0 0.075em 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-0.08em);
  }

  .tips-card:hover .tips-card-image {
    transform: scale(1.035);
  }
}

.tips-card:focus-visible {
  border-color: var(--gold-2);
  outline: 0.12em solid rgba(243, 210, 122, 0.42);
  outline-offset: 0.14em;
}

.tips-card:active {
  transform: scale(0.985);
}

/* ---------------------------------------------------------
   Multilingual typography
   カード寸法は絶対に変更しない
   --------------------------------------------------------- */

html[lang="en"] .tips-card-title {
  font-size: clamp(0.8rem, 3.2vw, 1rem);
  letter-spacing: -0.01em;
}

html[lang="ru"] .tips-card-title {
  font-size: clamp(0.72rem, 2.9vw, 0.92rem);
  line-height: 1.18;
}

html[lang="es"] .tips-card-title {
  font-size: clamp(0.76rem, 3vw, 0.96rem);
  line-height: 1.2;
}

/* ---------------------------------------------------------
   Motion accessibility
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .tips-card,
  .tips-card-image {
    transition: none;
  }

  .tips-card:hover,
  .tips-card:active {
    transform: none;
  }

  .tips-card:hover .tips-card-image {
    transform: scale(1.002);
  }
}

/* =========================================================
   Resource Guide
   tips-resource-guide.html
   Final typography / character sizing revision
   ========================================================= */

body.resource-guide-page {
  --resource-guide-character-height: clamp(4.4rem, 17vw, 5.8rem);
  position: relative;
  min-height: 100svh;
  overflow-x: hidden;
  background: #050607;
}

/* 既存のグリッド背景をResource Guideでは非表示 */
body.resource-guide-page::before {
  opacity: 0;
}

/* ---------------------------------------------------------
   Fixed background
   iOS Safariでもbackground-attachment: fixedを使わず固定
   --------------------------------------------------------- */

.resource-guide-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image:
    linear-gradient(
      180deg,
      rgba(7, 7, 6, 0.22) 0%,
      rgba(8, 7, 5, 0.16) 22%,
      rgba(8, 7, 5, 0.24) 55%,
      rgba(5, 5, 4, 0.44) 100%
    ),
    url("../assets/tips/resource-guide/background.webp");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

.resource-guide-shell {
  position: relative;
  z-index: 1;
}

.resource-guide-main {
  position: relative;
  margin-top: 0.6em;
  padding-bottom: 0.5em;
}

.resource-guide-main > .back-link {
  font-weight: 600;
}

/* ---------------------------------------------------------
   Hero
   他ページのタイトル階層に合わせる
   --------------------------------------------------------- */

.resource-guide-hero {
  position: relative;
  margin-top: clamp(1.3em, 4.8vw, 1.9em);
  padding: 0.35em 0.15em 0.7em;
  text-shadow: 0 0.16em 0.7em rgba(0, 0, 0, 0.68);
}

.resource-guide-hero-title {
  max-width: 100%;
  margin: 0;
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  overflow-wrap: normal;
  word-break: normal;
}

.resource-guide-hero-tagline {
  max-width: 32em;
  margin: 0.58em 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0;
  overflow-wrap: normal;
  word-break: normal;
}

/* 長文化しやすい言語のみ既存ページと同様に少し縮小 */
html[lang="ru"] .resource-guide-hero-title,
html[lang="es"] .resource-guide-hero-title {
  font-size: 1.28rem;
  line-height: 1.22;
}

/* ---------------------------------------------------------
   Glass panels
   --------------------------------------------------------- */

.resource-guide-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  padding: clamp(1em, 4vw, 1.35em);
  border: 0.075em solid rgba(255, 255, 255, 0.22);
  border-radius: clamp(1.35em, 5vw, 1.9em);
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.17) 0%,
      rgba(255, 255, 255, 0.075) 34%,
      rgba(255, 255, 255, 0.028) 100%
    ),
    rgba(34, 24, 15, 0.48);
  backdrop-filter: blur(1.35em) saturate(145%);
  -webkit-backdrop-filter: blur(1.35em) saturate(145%);
  box-shadow:
    0 1.25em 2.7em rgba(0, 0, 0, 0.32),
    inset 0 0.075em 0 rgba(255, 255, 255, 0.22),
    inset 0 -0.075em 0 rgba(255, 255, 255, 0.035);
}

.resource-guide-panel + .resource-guide-panel {
  margin-top: clamp(0.9em, 3.6vw, 1.25em);
}

.resource-guide-panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 5%;
  width: 90%;
  height: 42%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center top,
    rgba(255, 255, 255, 0.13) 0%,
    rgba(255, 255, 255, 0.035) 48%,
    transparent 74%
  );
  pointer-events: none;
}

.resource-guide-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(12, 8, 5, 0.06) 54%,
    rgba(10, 7, 5, 0.14) 100%
  );
  pointer-events: none;
}

/* ---------------------------------------------------------
   Panel header
   5枚のキャラクター画像は img 自体の高さを完全統一
   幅は各画像のアスペクト比に応じて自動
   --------------------------------------------------------- */

.resource-guide-panel-header {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.resource-guide-character {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  margin-right: clamp(0.65em, 2.8vw, 0.95em);
}

.resource-guide-character img {
  display: block;
  width: auto;
  height: var(--resource-guide-character-height);
  max-width: none;
  max-height: none;
  object-fit: contain;
  filter: drop-shadow(0 0.4em 0.45em rgba(0, 0, 0, 0.32));
}

.resource-guide-heading-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.resource-guide-panel-title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.02rem, 4.2vw, 1.16rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.015em;
  overflow-wrap: normal;
  word-break: normal;
}

.resource-guide-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  max-width: 38%;
  min-height: 2.35em;
  margin-left: 0.75em;
  padding: 0.25em 0.9em;
  border: 0.075em solid rgba(255, 255, 255, 0.22);
  border-radius: 999em;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.72),
      rgba(225, 212, 187, 0.52)
    );
  color: rgba(54, 43, 31, 0.92);
  box-shadow:
    0 0.5em 0.9em rgba(0, 0, 0, 0.18),
    inset 0 0.075em 0 rgba(255, 255, 255, 0.52);
  font-size: clamp(0.64rem, 2.5vw, 0.74rem);
  font-weight: 550;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: normal;
  word-break: normal;
}

.resource-guide-panel-header-no-badge .resource-guide-heading-copy {
  padding-right: 0;
}

/* ---------------------------------------------------------
   Common guide item
   --------------------------------------------------------- */

.resource-guide-item {
  display: flex;
  align-items: center;
  min-width: 0;
}

.resource-guide-item + .resource-guide-item {
  margin-top: clamp(0.9em, 3.6vw, 1.2em);
}

.resource-guide-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: clamp(2.15em, 8.5vw, 2.75em);
  height: clamp(2.15em, 8.5vw, 2.75em);
  margin-right: clamp(0.55em, 2.3vw, 0.8em);
}

.resource-guide-item-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    brightness(1.12)
    drop-shadow(0 0.18em 0.18em rgba(0, 0, 0, 0.24));
}

.resource-guide-item-title {
  display: block;
  min-width: 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(0.8rem, 3.1vw, 0.92rem);
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: normal;
  word-break: normal;
}

/* ---------------------------------------------------------
   DIRECT GAIN
   --------------------------------------------------------- */

.resource-guide-panel-direct {
  margin-top: clamp(1.05em, 4vw, 1.45em);
}

.resource-guide-direct-grid {
  display: flex;
  align-items: flex-start;
  width: 100%;
  margin-top: clamp(1.15em, 4.5vw, 1.55em);
}

.resource-guide-direct-column {
  flex: 0 0 50%;
  width: 50%;
  max-width: 50%;
  min-width: 0;
}

.resource-guide-direct-column:first-child {
  padding-right: clamp(0.5em, 2vw, 0.75em);
}

.resource-guide-direct-column:last-child {
  padding-left: clamp(0.5em, 2vw, 0.75em);
  border-left: 0.075em solid rgba(255, 255, 255, 0.11);
}

.resource-guide-flow {
  position: relative;
  margin-top: clamp(0.95em, 3.8vw, 1.25em);
  padding-left: clamp(1.35em, 5vw, 1.65em);
}

.resource-guide-flow::before {
  content: "";
  position: absolute;
  top: 0.72em;
  bottom: 0.72em;
  left: 0.38em;
  width: 0.075em;
  background: rgba(255, 255, 255, 0.5);
}

.resource-guide-flow-item {
  position: relative;
  min-width: 0;
}

.resource-guide-flow-item + .resource-guide-flow-item {
  margin-top: clamp(0.8em, 3vw, 1em);
}

.resource-guide-flow-marker {
  position: absolute;
  top: 0.2em;
  left: calc(-1 * clamp(1.35em, 5vw, 1.65em));
  width: 0.78em;
  height: 0.78em;
  border: 0.09em solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: rgba(110, 85, 54, 0.68);
  box-shadow: 0 0 0 0.14em rgba(255, 255, 255, 0.035);
}

.resource-guide-flow-title {
  display: block;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.72rem, 2.8vw, 0.84rem);
  font-weight: 450;
  line-height: 1.42;
  overflow-wrap: normal;
  word-break: normal;
}

/* ---------------------------------------------------------
   EFFICIENCY BOOST
   --------------------------------------------------------- */

.resource-guide-efficiency-grid {
  display: flex;
  align-items: stretch;
  width: 100%;
  margin-top: clamp(1.05em, 4vw, 1.4em);
}

.resource-guide-efficiency-grid > .resource-guide-item {
  flex: 0 0 50%;
  width: 50%;
  max-width: 50%;
  min-width: 0;
}

.resource-guide-efficiency-grid > .resource-guide-item:first-child {
  padding-right: clamp(0.5em, 2vw, 0.75em);
}

.resource-guide-efficiency-grid > .resource-guide-item:last-child {
  margin-top: 0;
  padding-left: clamp(0.5em, 2vw, 0.75em);
  border-left: 0.075em solid rgba(255, 255, 255, 0.11);
}

/* ---------------------------------------------------------
   SUPPLEMENTAL SOURCES
   --------------------------------------------------------- */

.resource-guide-supplement-list {
  margin-top: clamp(1.05em, 4vw, 1.4em);
}

.resource-guide-supplement-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 0.15em 0;
}

.resource-guide-supplement-row + .resource-guide-supplement-row {
  margin-top: 0.8em;
  padding-top: 0.95em;
  border-top: 0.075em solid rgba(255, 255, 255, 0.16);
}

.resource-guide-supplement-row > .resource-guide-item {
  flex: 0 0 56%;
  width: 56%;
  max-width: 56%;
  min-width: 0;
  padding-right: clamp(0.55em, 2.2vw, 0.8em);
}

.resource-guide-note {
  flex: 0 0 44%;
  width: 44%;
  max-width: 44%;
  min-width: 0;
  margin: 0;
  padding-left: clamp(0.55em, 2.2vw, 0.8em);
  border-left: 0.075em solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(0.68rem, 2.65vw, 0.8rem);
  font-weight: 450;
  line-height: 1.45;
  overflow-wrap: normal;
  word-break: normal;
}

/* ---------------------------------------------------------
   F2P PRIORITY
   --------------------------------------------------------- */

.resource-guide-panel-f2p {
  padding-top: clamp(1.1em, 4.4vw, 1.45em);
}

.resource-guide-f2p-header {
  position: relative;
  z-index: 2;
  min-height: calc(var(--resource-guide-character-height) + 0.35rem);
  padding:
    clamp(0.65em, 2.5vw, 0.9em)
    clamp(4.4em, 18vw, 6em)
    0;
  text-align: center;
}

.resource-guide-f2p-header .resource-guide-panel-title {
  font-size: clamp(1.02rem, 4.2vw, 1.16rem);
  font-weight: 600;
  line-height: 1.22;
  text-align: center;
}

.resource-guide-f2p-character {
  position: absolute;
  z-index: 1;
  top: clamp(0.65em, 2.6vw, 0.9em);
  display: inline-block;
  width: auto;
  height: auto;
  pointer-events: none;
}

.resource-guide-f2p-character-left {
  left: clamp(0.65em, 2.5vw, 1em);
}

.resource-guide-f2p-character-right {
  right: clamp(0.65em, 2.5vw, 1em);
}

.resource-guide-f2p-character img {
  display: block;
  width: auto;
  height: var(--resource-guide-character-height);
  max-width: none;
  max-height: none;
  object-fit: contain;
  filter: drop-shadow(0 0.4em 0.45em rgba(0, 0, 0, 0.26));
}

.resource-guide-priority-grid {
  display: flex;
  align-items: stretch;
  width: 100%;
  margin-top: clamp(0.72em, 2.8vw, 0.95em);
}

.resource-guide-priority-item {
  display: flex;
  flex: 0 0 25%;
  flex-direction: column;
  align-items: center;
  width: 25%;
  max-width: 25%;
  min-width: 0;
  padding: 0 0.28em;
  text-align: center;
}

.resource-guide-priority-item + .resource-guide-priority-item {
  border-left: 0.075em solid rgba(255, 255, 255, 0.1);
}

.resource-guide-priority-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.7em;
  padding: 0.35em 0.3em;
  border: 0.075em solid rgba(255, 255, 255, 0.18);
  border-radius: 0.7em;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.095),
      rgba(255, 255, 255, 0.035)
    );
  color: rgba(255, 255, 255, 0.86);
  box-shadow:
    inset 0 0.075em 0 rgba(255, 255, 255, 0.1),
    0 0.35em 0.75em rgba(0, 0, 0, 0.15);
  font-size: clamp(0.53rem, 2.05vw, 0.64rem);
  font-weight: 550;
  line-height: 1.2;
  overflow-wrap: normal;
  word-break: normal;
}

.resource-guide-stars {
  margin-top: 0.55em;
  color: #ffffff;
  font-size: clamp(0.66rem, 2.65vw, 0.82rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
  text-shadow: 0 0.12em 0.3em rgba(0, 0, 0, 0.42);
}

.resource-guide-priority-title {
  display: block;
  margin-top: 0.5em;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(0.6rem, 2.3vw, 0.72rem);
  font-weight: 500;
  line-height: 1.38;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

/* ---------------------------------------------------------
   Signature
   --------------------------------------------------------- */

.resource-guide-signature {
  margin: clamp(1.65em, 6vw, 2.2em) 0 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: clamp(0.66rem, 2.55vw, 0.78rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.18em;
  text-align: center;
  text-shadow: 0 0.12em 0.45em rgba(0, 0, 0, 0.7);
}

/* ---------------------------------------------------------
   Language-specific adjustments
   --------------------------------------------------------- */

html[lang="ru"] .resource-guide-panel-title {
  font-size: clamp(0.94rem, 3.8vw, 1.08rem);
  line-height: 1.26;
  letter-spacing: 0;
}

html[lang="es"] .resource-guide-panel-title {
  font-size: clamp(0.96rem, 3.9vw, 1.1rem);
  line-height: 1.24;
  letter-spacing: 0;
}

html[lang="ru"] .resource-guide-item-title,
html[lang="ru"] .resource-guide-flow-title,
html[lang="ru"] .resource-guide-note,
html[lang="es"] .resource-guide-item-title,
html[lang="es"] .resource-guide-flow-title,
html[lang="es"] .resource-guide-note {
  letter-spacing: 0;
  overflow-wrap: normal;
  word-break: normal;
}

html[lang="ru"] .resource-guide-item-title {
  font-size: clamp(0.72rem, 2.8vw, 0.84rem);
}

html[lang="es"] .resource-guide-item-title {
  font-size: clamp(0.74rem, 2.9vw, 0.86rem);
}

html[lang="ru"] .resource-guide-flow-title,
html[lang="ru"] .resource-guide-note {
  font-size: clamp(0.64rem, 2.45vw, 0.76rem);
}

html[lang="es"] .resource-guide-flow-title,
html[lang="es"] .resource-guide-note {
  font-size: clamp(0.66rem, 2.5vw, 0.78rem);
}

html[lang="ru"] .resource-guide-priority-title {
  font-size: clamp(0.5rem, 1.9vw, 0.62rem);
  line-height: 1.34;
}

html[lang="es"] .resource-guide-priority-title {
  font-size: clamp(0.52rem, 1.95vw, 0.64rem);
  line-height: 1.34;
}

html[lang="ru"] .resource-guide-priority-badge,
html[lang="es"] .resource-guide-priority-badge {
  font-size: clamp(0.48rem, 1.8vw, 0.58rem);
}

/* ---------------------------------------------------------
   Narrow smartphones
   360px前後
   キャラクターサイズはここで個別上書きしない
   --------------------------------------------------------- */

@media (max-width: 24em) {
  .resource-guide-panel {
    padding: 0.88em;
    border-radius: 1.35em;
  }

  .resource-guide-badge {
    max-width: 36%;
    min-height: 2.3em;
    margin-left: 0.5em;
    padding-left: 0.65em;
    padding-right: 0.65em;
  }

  .resource-guide-direct-column:first-child {
    padding-right: 0.4em;
  }

  .resource-guide-direct-column:last-child {
    padding-left: 0.4em;
  }

  .resource-guide-item-icon {
    width: 2em;
    height: 2em;
    margin-right: 0.42em;
  }

  .resource-guide-item-title {
    font-size: 0.78rem;
  }

  .resource-guide-flow {
    padding-left: 1.2em;
  }

  .resource-guide-flow-marker {
    left: -1.2em;
  }

  .resource-guide-efficiency-grid > .resource-guide-item:first-child {
    padding-right: 0.4em;
  }

  .resource-guide-efficiency-grid > .resource-guide-item:last-child {
    padding-left: 0.4em;
  }

  .resource-guide-supplement-row > .resource-guide-item {
    flex-basis: 54%;
    width: 54%;
    max-width: 54%;
    padding-right: 0.42em;
  }

  .resource-guide-note {
    flex-basis: 46%;
    width: 46%;
    max-width: 46%;
    padding-left: 0.42em;
  }

  .resource-guide-f2p-header {
    min-height: calc(var(--resource-guide-character-height) + 0.25rem);
    padding-left: 4.1em;
    padding-right: 4.1em;
  }

  .resource-guide-priority-item {
    padding-left: 0.18em;
    padding-right: 0.18em;
  }

  .resource-guide-priority-badge {
    min-height: 2.85em;
    padding-left: 0.16em;
    padding-right: 0.16em;
  }
}

/* ---------------------------------------------------------
   Very narrow emergency layout
   通常スマートフォンでは発動しない
   --------------------------------------------------------- */

@media (max-width: 19em) {
  .resource-guide-direct-grid,
  .resource-guide-efficiency-grid {
    display: block;
  }

  .resource-guide-direct-column,
  .resource-guide-efficiency-grid > .resource-guide-item {
    width: 100%;
    max-width: 100%;
  }

  .resource-guide-direct-column:first-child,
  .resource-guide-efficiency-grid > .resource-guide-item:first-child {
    padding-right: 0;
  }

  .resource-guide-direct-column:last-child {
    margin-top: 1.1em;
    padding-top: 1.1em;
    padding-left: 0;
    border-top: 0.075em solid rgba(255, 255, 255, 0.11);
    border-left: 0;
  }

  .resource-guide-efficiency-grid > .resource-guide-item:last-child {
    margin-top: 1em;
    padding-top: 1em;
    padding-left: 0;
    border-top: 0.075em solid rgba(255, 255, 255, 0.11);
    border-left: 0;
  }

  .resource-guide-supplement-row {
    display: block;
  }

  .resource-guide-supplement-row > .resource-guide-item,
  .resource-guide-note {
    width: 100%;
    max-width: 100%;
  }

  .resource-guide-supplement-row > .resource-guide-item {
    padding-right: 0;
  }

  .resource-guide-note {
    margin-top: 0.65em;
    padding-top: 0.6em;
    padding-left: 0;
    border-top: 0.075em solid rgba(255, 255, 255, 0.1);
    border-left: 0;
  }

  .resource-guide-priority-grid {
    flex-wrap: wrap;
  }

  .resource-guide-priority-item {
    flex-basis: 50%;
    width: 50%;
    max-width: 50%;
    padding: 0.45em;
  }

  .resource-guide-priority-item + .resource-guide-priority-item {
    border-left: 0;
  }

  .resource-guide-priority-item:nth-child(even) {
    border-left: 0.075em solid rgba(255, 255, 255, 0.1);
  }

  .resource-guide-priority-item:nth-child(n/**/+3) {
    margin-top: 0.65em;
    padding-top: 0.75em;
    border-top: 0.075em solid rgba(255, 255, 255, 0.1);
  }
}

/* ---------------------------------------------------------
   Backdrop-filter fallback
   --------------------------------------------------------- */

@supports not ((backdrop-filter: blur(1em)) or (-webkit-backdrop-filter: blur(1em))) {
  .resource-guide-panel {
    background:
      linear-gradient(
        145deg,
        rgba(73, 54, 37, 0.94),
        rgba(38, 29, 22, 0.95)
      );
  }
}

/* ---------------------------------------------------------
   Reduced motion
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .resource-guide-background {
    transform: none;
  }
}

/* =========================================================
   Sunday Guide
   tips-sunday-guide.html
   Final integrated revision
   - Hero title white
   - Fixed background / glass panels retained
   - Gathering and Rallies art sized by panel width (~1/3)
   - Body text kept below character art
   - Shop art keeps height-based sizing
   - Japanese-only subtitles hidden in other languages
   ========================================================= */

body.sunday-guide-page {
  position: relative;
  min-height: 100svh;
  overflow-x: hidden;
  background: #050607;
}

/* 既存の共通グリッド背景は、このページでは非表示 */
body.sunday-guide-page::before {
  opacity: 0;
}

/* ---------------------------------------------------------
   Fixed background
   iOS Safari対策として background-attachment: fixed は使わない
   --------------------------------------------------------- */

.sunday-guide-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image:
    linear-gradient(
      180deg,
      rgba(4, 7, 9, 0.18) 0%,
      rgba(4, 7, 9, 0.12) 20%,
      rgba(4, 6, 8, 0.22) 54%,
      rgba(3, 4, 5, 0.48) 100%
    ),
    url("../assets/tips/sunday-guide/background.webp");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

.sunday-guide-shell {
  position: relative;
  z-index: 1;
}

.sunday-guide-main {
  position: relative;
  margin-top: 0.6em;
  padding-bottom: 0.55em;
}

.sunday-guide-main > .back-link {
  font-weight: 600;
}

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */

.sunday-guide-hero {
  position: relative;
  margin-top: clamp(1.25em, 4.8vw, 1.85em);
  padding: 0.35em 0.15em 0.9em;
  text-align: left;
  text-shadow: 0 0.16em 0.75em rgba(0, 0, 0, 0.72);
}

.sunday-guide-hero-title {
  margin: 0;
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.025em;
  overflow-wrap: normal;
  word-break: normal;
}

.sunday-guide-hero-tagline {
  max-width: 92%;
  margin: 0.48em 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.005em;
  overflow-wrap: normal;
  word-break: normal;
}

/* ---------------------------------------------------------
   Glass panels
   panel本体は overflow: visible
   ガラス面だけ別レイヤーで角丸・クリップする
   --------------------------------------------------------- */

.sunday-guide-panel {
  --sunday-character-right: -0.45em;
  --sunday-character-top: -2.05rem;
  --sunday-content-width: 68%;

  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: clamp(10.2em, 41vw, 12.6em);
  overflow: visible;
  padding: clamp(1.05em, 4vw, 1.35em);
}

.sunday-guide-panel + .sunday-guide-panel {
  margin-top: clamp(1.65em, 6.4vw, 2.25em);
}

.sunday-guide-panel-surface {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  border: 0.075em solid rgba(243, 210, 122, 0.27);
  border-radius: clamp(1.05em, 4vw, 1.35em);
  background:
    linear-gradient(
      145deg,
      rgba(35, 39, 41, 0.58) 0%,
      rgba(19, 23, 25, 0.48) 46%,
      rgba(10, 13, 15, 0.58) 100%
    );
  box-shadow:
    0 1em 2.1em rgba(0, 0, 0, 0.28),
    inset 0 0.075em 0 rgba(255, 255, 255, 0.1),
    inset 0 0 1.45em rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(1em) saturate(118%);
  -webkit-backdrop-filter: blur(1em) saturate(118%);
  pointer-events: none;
}

.sunday-guide-panel-surface::before {
  content: "";
  position: absolute;
  top: -28%;
  left: 5%;
  width: 90%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.035) 44%,
    transparent 72%
  );
  pointer-events: none;
}

.sunday-guide-panel-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(0, 0, 0, 0.035) 52%,
    rgba(0, 0, 0, 0.16) 100%
  );
  pointer-events: none;
}

/* ---------------------------------------------------------
   Character art
   Gathering / Rallies = panel width basis
   Shop = existing height basis
   --------------------------------------------------------- */

.sunday-guide-character {
  position: absolute;
  z-index: 2;
  top: var(--sunday-character-top);
  right: var(--sunday-character-right);
  display: block;
  width: auto;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.sunday-guide-character img {
  display: block;
  max-width: none;
  max-height: none;
  object-fit: contain;
  filter:
    drop-shadow(0 0.45em 0.55em rgba(0, 0, 0, 0.34))
    drop-shadow(0 0 0.22em rgba(243, 210, 122, 0.08));
}

/* GATHERING / RALLIES はカード横幅の約1/3 */
.sunday-guide-character-gathering,
.sunday-guide-character-rallies {
  width: var(--sunday-character-width);
}

.sunday-guide-character-gathering img,
.sunday-guide-character-rallies img {
  width: 100%;
  height: auto;
}

.sunday-guide-panel-gathering {
  --sunday-character-width: 34%;
  --sunday-character-right: -0.1em;
  --sunday-character-top: -1.15rem;
  --sunday-content-width: 67%;
  --sunday-header-clearance: 3.7rem;
}

.sunday-guide-panel-rallies {
  --sunday-character-width: 35%;
  --sunday-character-right: -0.15em;
  --sunday-character-top: -1.35rem;
  --sunday-content-width: 66%;
  --sunday-header-clearance: 4rem;
}

/* SHOP は縦長画像のため従来どおり高さ基準 */
.sunday-guide-panel-shop {
  --sunday-character-height: clamp(8.6rem, 36vw, 11.2rem);
  --sunday-character-right: -0.8em;
  --sunday-content-width: 66%;
  min-height: clamp(10.6em, 43vw, 13.2em);
}

.sunday-guide-character-shop img {
  width: auto;
  height: var(--sunday-character-height);
}

.sunday-guide-panel-shop .sunday-guide-character {
  top: auto;
  bottom: -1.15rem;
}

/* ---------------------------------------------------------
   Panel content
   --------------------------------------------------------- */

.sunday-guide-panel-content {
  position: relative;
  z-index: 3;
  width: var(--sunday-content-width);
  max-width: var(--sunday-content-width);
  min-width: 0;
}

.sunday-guide-panel-header {
  position: relative;
  min-width: 0;
}

.sunday-guide-panel-title {
  margin: 0;
  color: var(--gold-2);
  font-size: clamp(1.02rem, 4.2vw, 1.2rem);
  font-weight: 600;
  line-height: 1.17;
  letter-spacing: -0.018em;
  overflow-wrap: normal;
  word-break: normal;
}

.sunday-guide-panel-subtitle {
  margin: 0.34em 0 0;
  color: rgba(255, 255, 255, 0.93);
  font-size: clamp(0.78rem, 3.05vw, 0.9rem);
  font-weight: 500;
  line-height: 1.42;
}

.sunday-guide-panel-text {
  margin: clamp(0.78em, 3vw, 1em) 0 0;
  color: rgba(255, 255, 255, 0.87);
  font-size: clamp(0.79rem, 3.05vw, 0.9rem);
  font-weight: 450;
  line-height: 1.62;
  letter-spacing: 0.002em;
  overflow-wrap: normal;
  word-break: normal;
}

/* 日本語だけ表示する小タイトル */
html:not([lang="ja"]) .sunday-guide-ja-only {
  display: none;
}

/* ---------------------------------------------------------
   Gathering / Rallies body-flow protection
   本文は画像の下からカード全幅で開始
   --------------------------------------------------------- */

.sunday-guide-panel-gathering .sunday-guide-panel-content,
.sunday-guide-panel-rallies .sunday-guide-panel-content {
  width: 100%;
  max-width: 100%;
}

.sunday-guide-panel-gathering .sunday-guide-panel-header,
.sunday-guide-panel-rallies .sunday-guide-panel-header {
  width: var(--sunday-content-width);
  max-width: var(--sunday-content-width);
  min-height: var(--sunday-header-clearance);
}

.sunday-guide-panel-gathering .sunday-guide-panel-text,
.sunday-guide-panel-rallies .sunday-guide-panel-text {
  width: 100%;
  max-width: 100%;
  margin-top: 0.7em;
}

/* ---------------------------------------------------------
   Signature
   --------------------------------------------------------- */

.sunday-guide-signature {
  margin: clamp(1.7em, 6vw, 2.3em) 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.66rem, 2.5vw, 0.76rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.18em;
  text-align: center;
  text-shadow: 0 0.12em 0.55em rgba(0, 0, 0, 0.72);
}

.sunday-guide-page .site-footer {
  position: relative;
  z-index: 1;
  text-shadow: 0 0.12em 0.5em rgba(0, 0, 0, 0.72);
}

/* ---------------------------------------------------------
   Multilingual typography
   RU / ESの長い見出しでもカード幅を崩さない
   --------------------------------------------------------- */

html[lang="en"] .sunday-guide-hero-title {
  font-size: 1.4rem;
}

html[lang="ru"] .sunday-guide-hero-title {
  font-size: clamp(1.12rem, 4.6vw, 1.28rem);
  line-height: 1.2;
}

html[lang="es"] .sunday-guide-hero-title {
  font-size: clamp(1.16rem, 4.8vw, 1.32rem);
  line-height: 1.2;
}

html[lang="ru"] .sunday-guide-hero-tagline,
html[lang="es"] .sunday-guide-hero-tagline {
  max-width: 96%;
  font-size: clamp(0.79rem, 3.1vw, 0.88rem);
  line-height: 1.5;
}

html[lang="en"] .sunday-guide-panel-title {
  font-size: clamp(0.96rem, 3.95vw, 1.15rem);
}

html[lang="ru"] .sunday-guide-panel-title {
  font-size: clamp(0.82rem, 3.35vw, 1rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

html[lang="es"] .sunday-guide-panel-title {
  font-size: clamp(0.86rem, 3.5vw, 1.04rem);
  line-height: 1.2;
  letter-spacing: -0.012em;
}

html[lang="ru"] .sunday-guide-panel-text,
html[lang="es"] .sunday-guide-panel-text {
  font-size: clamp(0.76rem, 2.95vw, 0.87rem);
  line-height: 1.58;
}

/* ---------------------------------------------------------
   Smartphone tuning
   --------------------------------------------------------- */

@media (max-width: 24em) {
  .sunday-guide-hero {
    margin-top: 1.18em;
    padding-bottom: 0.78em;
  }

  .sunday-guide-panel {
    --sunday-content-width: 68%;
    min-height: 10.35em;
    padding: 1em 0.95em 1.05em;
  }

  .sunday-guide-panel + .sunday-guide-panel {
    margin-top: 1.8em;
  }

  .sunday-guide-panel-gathering {
    --sunday-character-width: 33%;
    --sunday-character-right: -0.12em;
    --sunday-character-top: -1rem;
    --sunday-content-width: 67%;
    --sunday-header-clearance: 3.45rem;
  }

  .sunday-guide-panel-rallies {
    --sunday-character-width: 34%;
    --sunday-character-right: -0.16em;
    --sunday-character-top: -1.18rem;
    --sunday-content-width: 66%;
    --sunday-header-clearance: 3.7rem;
  }

  .sunday-guide-panel-shop {
    --sunday-character-height: clamp(8rem, 34vw, 9.5rem);
    --sunday-character-right: -0.85em;
    min-height: 10.75em;
  }

  .sunday-guide-panel-shop .sunday-guide-character {
    bottom: -0.95rem;
  }

  .sunday-guide-panel-text {
    line-height: 1.58;
  }
}

/* ---------------------------------------------------------
   Narrow smartphone tuning
   340px前後でも文字とキャラを衝突させない
   --------------------------------------------------------- */

@media (max-width: 21.5em) {
  .sunday-guide-panel {
    --sunday-content-width: 69%;
    padding-left: 0.85em;
    padding-right: 0.85em;
  }

  .sunday-guide-panel-gathering {
    --sunday-character-width: 32%;
    --sunday-character-right: -0.15em;
    --sunday-character-top: -0.9rem;
    --sunday-content-width: 68%;
    --sunday-header-clearance: 3.2rem;
  }

  .sunday-guide-panel-rallies {
    --sunday-character-width: 33%;
    --sunday-character-right: -0.18em;
    --sunday-character-top: -1.05rem;
    --sunday-content-width: 67%;
    --sunday-header-clearance: 3.45rem;
  }

  .sunday-guide-panel-shop {
    --sunday-character-height: 7.55rem;
    --sunday-character-right: -0.9em;
  }

  .sunday-guide-panel-title {
    font-size: 0.96rem;
  }

  .sunday-guide-panel-subtitle {
    font-size: 0.76rem;
  }

  .sunday-guide-panel-text {
    font-size: 0.77rem;
  }

  html[lang="ru"] .sunday-guide-panel-title {
    font-size: 0.79rem;
  }

  html[lang="es"] .sunday-guide-panel-title {
    font-size: 0.82rem;
  }
}

/* ---------------------------------------------------------
   Very narrow emergency layout
   通常スマートフォンでは発動しない
   --------------------------------------------------------- */

@media (max-width: 19em) {
  .sunday-guide-panel {
    --sunday-content-width: 100%;
    min-height: 12.4em;
    padding-top: 5.4em;
  }

  .sunday-guide-panel-content {
    width: 100%;
    max-width: 100%;
  }

  .sunday-guide-character {
    top: -1.45rem;
    right: 0;
  }

  .sunday-guide-panel-gathering {
    --sunday-character-width: 36%;
    --sunday-character-right: 0;
    --sunday-content-width: 100%;
    --sunday-header-clearance: 3.15rem;
  }

  .sunday-guide-panel-rallies {
    --sunday-character-width: 36%;
    --sunday-character-right: 0;
    --sunday-content-width: 100%;
    --sunday-header-clearance: 3.3rem;
  }

  .sunday-guide-panel-shop {
    --sunday-character-height: 6.5rem;
    --sunday-character-right: 0;
    --sunday-content-width: 100%;
  }

  .sunday-guide-panel-gathering .sunday-guide-panel-header,
  .sunday-guide-panel-rallies .sunday-guide-panel-header {
    width: 100%;
    max-width: 100%;
  }

  .sunday-guide-panel-shop .sunday-guide-character {
    top: -1.35rem;
    bottom: auto;
  }
}

/* ---------------------------------------------------------
   Backdrop-filter fallback
   --------------------------------------------------------- */

@supports not ((backdrop-filter: blur(1em)) or (-webkit-backdrop-filter: blur(1em))) {
  .sunday-guide-panel-surface {
    background:
      linear-gradient(
        145deg,
        rgba(42, 45, 47, 0.94),
        rgba(17, 20, 22, 0.95)
      );
  }
}

/* ---------------------------------------------------------
   Reduced motion
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .sunday-guide-background {
    transform: none;
  }
}


/* =========================================================
   Day 1 UR rune chest input / reverse conversion
   Uses existing interface font sizes and numeric controls.
   ========================================================= */
.duel-task-card-rune-box {
  display: block;
}

.duel-task-card-rune-box > .duel-card-heading {
  display: block;
  min-height: 0;
  padding: var(--duel-block-padding) var(--duel-inline-padding);
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.065);
}

.duel-task-card-rune-box > .duel-card-content {
  display: block;
  padding: 0.7rem var(--duel-inline-padding) 0.78rem;
  border-top: 0;
}

.duel-rune-box-fields,
.estimator-rune-box-fields {
  display: block;
  min-width: 0;
}

.duel-rune-box-row,
.estimator-rune-box-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.duel-rune-box-row + .duel-rune-box-row,
.estimator-rune-box-row + .estimator-rune-box-row {
  margin-top: 0.42rem;
  padding-top: 0.42rem;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.065);
}

.duel-rune-box-identity,
.estimator-rune-box-identity,
.estimator-rune-box-conversion-identity {
  display: flex;
  align-items: center;
  min-width: 0;
}

.duel-rune-box-identity,
.estimator-rune-box-identity {
  flex: 1 1 42%;
  padding-right: 0.5rem;
}

.duel-rune-rarity,
.estimator-rune-rarity {
  display: inline-block;
  flex: 0 0 auto;
  min-width: 2.1rem;
  margin-right: 0.34rem;
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
}

.duel-rune-rarity.is-ur,
.estimator-rune-rarity.is-ur {
  color: #f0a24a;
}

.duel-rune-rarity.is-ssr,
.estimator-rune-rarity.is-ssr {
  color: #9b7cff;
}

.duel-rune-rarity.is-sr,
.estimator-rune-rarity.is-sr {
  color: #4da3ff;
}

.duel-rune-rarity.is-r,
.estimator-rune-rarity.is-r {
  color: #b8e63a;
}

.duel-rune-box-name,
.estimator-rune-box-name,
.estimator-rune-box-conversion-name {
  min-width: 0;
  color: rgba(242, 242, 242, 0.78);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.duel-rune-box-input-wrap,
.estimator-rune-box-input-line {
  display: flex;
  align-items: center;
  flex: 1 1 54%;
  min-width: 8rem;
}

.duel-rune-box-input,
.estimator-rune-box-input {
  min-width: 0;
  flex: 1 1 auto;
}

.duel-rune-box-multiplier,
.estimator-rune-box-multiplier {
  flex: 0 0 2.7rem;
  margin-left: 0.38rem;
  color: var(--gold-2);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.duel-rune-box-error,
.estimator-rune-box-error {
  flex: 0 0 100%;
  margin-top: 0.24rem;
}

.duel-rune-shard-equivalent,
.estimator-rune-shard-equivalent {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  margin-top: 0.56rem;
  padding-top: 0.5rem;
  border-top: 0.0625rem dashed rgba(255, 255, 255, 0.1);
}

.duel-rune-shard-equivalent-label,
.estimator-rune-shard-equivalent-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.3;
}

.duel-rune-shard-equivalent-value,
.estimator-rune-shard-equivalent-value {
  margin-left: 0.6rem;
  color: var(--gold-2);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.duel-task-card-rune-box .duel-result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  margin: 0.56rem 0 0;
}

.duel-task-card-rune-box .duel-result-label {
  margin-right: 0.6rem;
}

.estimator-task-rune-box > .estimator-rune-box-fields {
  margin: 0.76rem;
}

.estimator-rune-box-conversion {
  margin-top: 0.62rem;
  padding-top: 0.56rem;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.075);
}

.estimator-rune-box-conversion-label {
  display: block;
  color: rgba(242, 242, 242, 0.52);
  font-size: 0.61rem;
  font-weight: 500;
  line-height: 1.3;
}

.estimator-rune-box-conversion-list {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 0.34rem;
  overflow: hidden;
  border: 0.0625rem solid rgba(255, 255, 255, 0.08);
  border-radius: 0.58rem;
}

.estimator-rune-box-conversion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 2.2rem;
  padding: 0.38rem 0.54rem;
}

.estimator-rune-box-conversion-item + .estimator-rune-box-conversion-item {
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.075);
}

.estimator-rune-box-conversion-identity {
  flex: 1 1 auto;
  padding-right: 0.55rem;
}

.estimator-rune-box-conversion-count {
  flex: 0 0 auto;
  color: var(--gold-2);
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.estimator-rune-box-conversion-note {
  margin: 0.3rem 0 0;
  color: rgba(242, 242, 242, 0.34);
  font-size: 0.54rem;
  font-weight: 450;
  line-height: 1.35;
}

@media (max-width: 380px) {
  .duel-rune-box-identity,
  .estimator-rune-box-identity {
    flex-basis: 44%;
    padding-right: 0.36rem;
  }

  .duel-rune-box-input-wrap,
  .estimator-rune-box-input-line {
    flex-basis: 52%;
    min-width: 7.1rem;
  }

  .duel-rune-rarity,
  .estimator-rune-rarity {
    min-width: 1.9rem;
    margin-right: 0.22rem;
  }

  .duel-rune-box-name,
  .estimator-rune-box-name,
  .estimator-rune-box-conversion-name {
    font-size: 0.64rem;
  }

  .duel-rune-box-multiplier,
  .estimator-rune-box-multiplier {
    flex-basis: 2.35rem;
    margin-left: 0.26rem;
    font-size: 0.64rem;
  }

  .estimator-rune-box-conversion-item {
    padding-left: 0.46rem;
    padding-right: 0.46rem;
  }
}

/* Database compact multilingual UI — final mobile override */
.database-tab { font-size:clamp(.62rem,2.65vw,.74rem); font-weight:650; line-height:1.12; letter-spacing:0; overflow-wrap:normal; word-break:normal; padding:.62em .42em; }
.database-panel-title { font-size:clamp(1.08rem,5vw,1.4rem); font-weight:700; line-height:1.08; letter-spacing:-.015em; }
.database-panel-subtitle { font-size:clamp(.62rem,2.8vw,.76rem); font-weight:550; line-height:1.28; letter-spacing:0; }
.database-field-label { font-size:clamp(.62rem,2.65vw,.72rem); letter-spacing:0; }
.database-submit { font-size:clamp(.7rem,2.9vw,.8rem); }
.database-total-layout { display:block; margin-top:.55em; }
.database-total-label { width:auto; margin:0 0 .42em; font-size:clamp(.64rem,2.7vw,.74rem); text-align:left; letter-spacing:0; }
.database-total-values { display:flex; width:100%; align-items:flex-start; justify-content:stretch; }
.database-total-item { min-width:0; flex:1 1 0; padding:0 .1em; text-align:center; }
.database-total-item + .database-total-item { margin-left:0; padding-left:.1em; }
.database-total-compact { font-size:clamp(1.02rem,4.5vw,1.3rem); font-weight:650; line-height:1; letter-spacing:-.02em; white-space:nowrap; }
.database-total-card.is-multiple .database-total-compact { font-size:clamp(1rem,4.4vw,1.24rem); }
.database-total-exact { margin-top:.28em; font-size:clamp(.5rem,2.2vw,.61rem); font-weight:500; line-height:1.12; letter-spacing:0; overflow-wrap:normal; word-break:normal; hyphens:none; }
.database-total-exact-value,.database-total-exact-unit { display:block; }
.database-total-exact-value { white-space:nowrap; }
.database-total-exact-unit { margin-top:.14em; overflow-wrap:normal; word-break:normal; hyphens:none; }
.database-breakdown-title { font-size:clamp(.88rem,3.8vw,1.04rem); letter-spacing:0; }
.database-table { table-layout:fixed; width:100%; }
.database-table th { padding:.5em .1em; font-size:clamp(.48rem,2.05vw,.59rem); font-weight:650; line-height:1.06; letter-spacing:-.01em; overflow-wrap:normal; word-break:normal; hyphens:none; }
.database-table td { padding-left:.16em; padding-right:.16em; font-size:clamp(.66rem,2.85vw,.78rem); }
.database-table:not(.is-three-columns) th:first-child,.database-table:not(.is-three-columns) td:first-child { width:20%; }
.database-table:not(.is-three-columns) th:nth-child(2),.database-table:not(.is-three-columns) td:nth-child(2) { width:22%; }
.database-table:not(.is-three-columns) th:nth-child(3),.database-table:not(.is-three-columns) td:nth-child(3) { width:20%; }
.database-table:not(.is-three-columns) th:nth-child(4),.database-table:not(.is-three-columns) td:nth-child(4),.database-table:not(.is-three-columns) th:nth-child(5),.database-table:not(.is-three-columns) td:nth-child(5) { width:19%; }
html[lang="ru"] .database-tab,html[lang="ru"] .database-panel-title,html[lang="ru"] .database-panel-subtitle,html[lang="ru"] .database-field-label,html[lang="ru"] .database-submit,html[lang="ru"] .database-total-label,html[lang="ru"] .database-total-exact,html[lang="ru"] .database-breakdown-title,html[lang="ru"] .database-table th { letter-spacing:0; }
html[lang="ru"] .database-tab { font-size:clamp(.56rem,2.4vw,.66rem); }
html[lang="ru"] .database-panel-title { font-size:clamp(1rem,4.5vw,1.28rem); letter-spacing:0; }
html[lang="ru"] .database-panel-subtitle { font-size:clamp(.58rem,2.5vw,.69rem); }
html[lang="ru"] .database-submit { font-size:clamp(.64rem,2.7vw,.74rem); }
html[lang="ru"] .database-table th { font-size:clamp(.44rem,1.9vw,.54rem); }
html[lang="es"] .database-tab { font-size:clamp(.59rem,2.5vw,.69rem); }
html[lang="es"] .database-table th { font-size:clamp(.46rem,1.98vw,.56rem); }
@media (max-width:24em) {
  .database-tab { font-size:clamp(.58rem,2.5vw,.68rem); }
  .database-panel-title { font-size:clamp(1rem,4.7vw,1.24rem); }
  .database-panel-subtitle { font-size:clamp(.58rem,2.6vw,.69rem); }
  .database-total-card { padding-left:.58em; padding-right:.58em; }
  .database-total-item { padding-left:.06em; padding-right:.06em; }
  .database-total-item + .database-total-item { padding-left:.06em; }
  .database-total-card.is-multiple .database-total-compact { font-size:clamp(.92rem,4.15vw,1.1rem); }
  .database-total-exact { font-size:clamp(.47rem,2.05vw,.56rem); }
  .database-table th { font-size:clamp(.44rem,1.9vw,.53rem); }
  .database-table td { font-size:clamp(.62rem,2.7vw,.72rem); }
}


/* =========================================================
   Alliance Caravan Rules
   tips-alliance-caravan.html
   Fixed background + simple glassmorphism
   ========================================================= */

body.alliance-caravan-page {
  position: relative;
  min-height: 100svh;
  overflow-x: hidden;
  background: #17110c;
}

body.alliance-caravan-page::before {
  opacity: 0;
}

.alliance-caravan-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(35, 24, 14, 0.18) 0%, rgba(25, 18, 12, 0.24) 30%, rgba(12, 10, 8, 0.44) 72%, rgba(7, 7, 7, 0.56) 100%),
    url("../assets/tips/alliance-caravan/background.webp");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}

.alliance-caravan-shell {
  position: relative;
  z-index: 1;
}

.alliance-caravan-page .site-header,
.alliance-caravan-page .site-footer {
  text-shadow: 0 0.12em 0.6em rgba(0, 0, 0, 0.82);
}

.alliance-caravan-main {
  position: relative;
  margin-top: 0.6em;
  padding-bottom: 0.55em;
  font-variant-numeric: tabular-nums;
}

.alliance-caravan-main > .back-link {
  font-weight: 600;
  text-shadow: 0 0.12em 0.55em rgba(0, 0, 0, 0.82);
}

/* Hero */
.alliance-caravan-hero {
  position: relative;
  margin-top: clamp(1.25em, 4.8vw, 1.85em);
  padding: 0.7em 0.15em 0.9em;
  text-align: center;
}

.alliance-caravan-hero-title {
  margin: 0;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: clamp(1.28rem, 5.6vw, 1.55rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0.075em;
  text-shadow: 0 0.08em 0.18em rgba(0, 0, 0, 0.95), 0 0.25em 0.85em rgba(0, 0, 0, 0.8);
}

.alliance-caravan-hero-subtitle {
  margin: 0.5em 0 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(0.78rem, 3vw, 0.88rem);
  font-weight: 560;
  line-height: 1.45;
  text-shadow: 0 0.08em 0.16em rgba(0, 0, 0, 0.95), 0 0.25em 0.8em rgba(0, 0, 0, 0.82);
}

.alliance-caravan-mark {
  display: block;
  width: 50%;
  max-width: 19rem;
  min-width: 10.6rem;
  height: auto;
  margin: 0.8em auto 0;
  object-fit: contain;
  filter: drop-shadow(0 0.12em 0.12em rgba(255, 248, 232, 0.42)) drop-shadow(0 0.42em 0.65em rgba(0, 0, 0, 0.42));
}

/* Glass panel */
.alliance-caravan-panel {
  position: relative;
  margin-top: 0.78em;
  padding: 0.78em 0.82em 0.86em;
  overflow: hidden;
  border: 0.075em solid rgba(255, 239, 204, 0.28);
  border-radius: 1.05em;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.025)),
    rgba(27, 20, 14, 0.54);
  backdrop-filter: blur(1em) saturate(122%);
  -webkit-backdrop-filter: blur(1em) saturate(122%);
  box-shadow: 0 0.75em 1.65em rgba(0, 0, 0, 0.24), inset 0 0.06em 0 rgba(255, 255, 255, 0.08);
}

.alliance-caravan-panel-header {
  display: flex;
  align-items: center;
  min-width: 0;
  padding-bottom: 0.62em;
  border-bottom: 0.075em solid rgba(255, 255, 255, 0.11);
}

.alliance-caravan-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  margin-right: 0.68em;
  border: 0.075em solid rgba(243, 210, 122, 0.55);
  border-radius: 50%;
  background: rgba(31, 23, 15, 0.42);
}

.alliance-caravan-panel-icon img {
  display: block;
  width: 1.28rem;
  height: 1.28rem;
  object-fit: contain;
}

.alliance-caravan-panel-copy {
  display: flex;
  align-items: baseline;
  min-width: 0;
  flex: 1 1 auto;
}

.alliance-caravan-panel-no {
  flex: 0 0 auto;
  margin-right: 0.62em;
  color: var(--gold-2);
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1;
  letter-spacing: 0.08em;
}

.alliance-caravan-panel-title {
  min-width: 0;
  margin: 0;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: clamp(0.94rem, 3.85vw, 1.08rem);
  font-weight: 680;
  line-height: 1.25;
  letter-spacing: -0.01em;
  overflow-wrap: normal;
  word-break: normal;
}

.alliance-caravan-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.7rem, 2.85vw, 0.8rem);
  font-weight: 450;
  line-height: 1.56;
  letter-spacing: 0.002em;
  overflow-wrap: normal;
  word-break: normal;
}

/* Coachman */
.alliance-caravan-ranking-list {
  margin-top: 0.68em;
  overflow: hidden;
  border: 0.075em solid rgba(255, 255, 255, 0.1);
  border-radius: 0.72em;
  background: rgba(7, 8, 8, 0.22);
}

.alliance-caravan-ranking-row {
  display: grid;
  grid-template-columns: minmax(3.2rem, 0.58fr) minmax(0, 1.7fr) minmax(3.3rem, 0.58fr);
  align-items: center;
  min-width: 0;
  padding: 0.55em 0.62em;
}

.alliance-caravan-ranking-row + .alliance-caravan-ranking-row {
  border-top: 0.075em solid rgba(255, 255, 255, 0.085);
}

.alliance-caravan-day,
.alliance-caravan-condition,
.alliance-caravan-rank {
  min-width: 0;
}

.alliance-caravan-day {
  color: #ffffff;
  font-size: clamp(0.7rem, 2.9vw, 0.8rem);
  font-weight: 650;
  line-height: 1.3;
}

.alliance-caravan-condition {
  padding-right: 0.45em;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(0.66rem, 2.7vw, 0.77rem);
  font-weight: 450;
  line-height: 1.38;
}

.alliance-caravan-rank {
  justify-self: end;
  min-width: 3rem;
  padding: 0.34em 0.48em;
  border: 0.075em solid rgba(243, 210, 122, 0.36);
  border-radius: 999em;
  background: rgba(214, 170, 79, 0.17);
  color: var(--gold-2);
  font-size: clamp(0.65rem, 2.65vw, 0.76rem);
  font-weight: 760;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.alliance-caravan-vip {
  margin-top: 0.68em;
  padding-top: 0.66em;
  border-top: 0.075em solid rgba(243, 210, 122, 0.28);
}

.alliance-caravan-vip-title {
  display: block;
  margin-bottom: 0.22em;
  color: var(--gold-2);
  font-size: clamp(0.72rem, 2.95vw, 0.82rem);
  font-weight: 680;
  line-height: 1.36;
}

/* Schedule */
.alliance-caravan-time-wrap {
  margin-top: 0.7em;
}

.alliance-caravan-time {
  display: flex;
  align-items: baseline;
  margin: 0;
  color: #ffffff;
  line-height: 1.05;
  white-space: nowrap;
}

.alliance-caravan-time strong {
  color: var(--gold-2);
  font-size: clamp(1.04rem, 4.65vw, 1.28rem);
  font-weight: 650;
  letter-spacing: -0.018em;
}

.alliance-caravan-time span {
  margin-left: 0.55em;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(0.64rem, 2.55vw, 0.74rem);
  font-weight: 560;
  letter-spacing: 0.01em;
}

.alliance-caravan-time-text {
  margin-top: 0.5em;
}

html[lang="ja"] .alliance-caravan-time-server {
  display: none;
}

html:not([lang="ja"]) .alliance-caravan-time-ja {
  display: none;
}

.alliance-caravan-note {
  display: flex;
  align-items: flex-start;
  margin-top: 0.7em;
  padding: 0.58em 0.64em;
  border: 0.075em solid rgba(243, 210, 122, 0.2);
  border-radius: 0.7em;
  background: rgba(8, 8, 8, 0.24);
}

.alliance-caravan-note-label {
  flex: 0 0 auto;
  margin-right: 0.62em;
  color: var(--gold-2);
  font-size: 0.61rem;
  font-weight: 780;
  line-height: 1.4;
  letter-spacing: 0.1em;
}

.alliance-caravan-note-text {
  min-width: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.66rem, 2.65vw, 0.76rem);
  font-weight: 430;
  line-height: 1.5;
}

/* Additional rules */
.alliance-caravan-rule-list {
  margin: 0.68em 0 0;
  padding: 0;
  list-style: none;
}

.alliance-caravan-rule-list li {
  display: flex;
  align-items: flex-start;
  min-width: 0;
}

.alliance-caravan-rule-list li + li {
  margin-top: 0.58em;
  padding-top: 0.58em;
  border-top: 0.075em solid rgba(255, 255, 255, 0.075);
}

.alliance-caravan-rule-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  margin-right: 0.62em;
  border: 0.075em solid rgba(243, 210, 122, 0.38);
  border-radius: 50%;
  background: rgba(214, 170, 79, 0.13);
  color: var(--gold-2);
  font-size: 0.62rem;
  font-weight: 760;
  line-height: 1;
}

.alliance-caravan-rule-list p {
  min-width: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.87);
  font-size: clamp(0.69rem, 2.78vw, 0.79rem);
  font-weight: 440;
  line-height: 1.55;
}

/* Tickets */
.alliance-caravan-ticket-copy {
  margin-top: 0.68em;
}

.alliance-caravan-ticket-copy .alliance-caravan-text + .alliance-caravan-text {
  margin-top: 0.42em;
}

.alliance-caravan-text-last {
  color: rgba(255, 255, 255, 0.94);
  font-weight: 520;
}

/* Long-language protection */
html[lang="ru"] .alliance-caravan-hero-title,
html[lang="es"] .alliance-caravan-hero-title {
  font-size: clamp(1.12rem, 5vw, 1.42rem);
}

html[lang="ru"] .alliance-caravan-panel-title,
html[lang="es"] .alliance-caravan-panel-title {
  font-size: clamp(0.88rem, 3.55vw, 1rem);
}

html[lang="ru"] .alliance-caravan-condition,
html[lang="es"] .alliance-caravan-condition {
  font-size: clamp(0.61rem, 2.42vw, 0.72rem);
  line-height: 1.34;
}

@media (max-width: 23.75em) {
  .alliance-caravan-panel {
    padding-left: 0.72em;
    padding-right: 0.72em;
  }

  .alliance-caravan-ranking-row {
    grid-template-columns: minmax(2.8rem, 0.56fr) minmax(0, 1.7fr) minmax(3rem, 0.56fr);
    padding-left: 0.5em;
    padding-right: 0.5em;
  }

  .alliance-caravan-panel-icon {
    width: 2.15rem;
    height: 2.15rem;
    margin-right: 0.58em;
  }

  .alliance-caravan-panel-icon img {
    width: 1.16rem;
    height: 1.16rem;
  }
}

@media (max-width: 20em) {
  .alliance-caravan-hero-title {
    font-size: 1.15rem;
    letter-spacing: 0.055em;
  }

  .alliance-caravan-mark {
    width: 56%;
    min-width: 9.8rem;
  }

  .alliance-caravan-ranking-row {
    grid-template-columns: 2.65rem minmax(0, 1fr) 2.9rem;
  }

  .alliance-caravan-condition {
    font-size: 0.62rem;
  }

  .alliance-caravan-rank {
    min-width: 2.78rem;
    padding-left: 0.35em;
    padding-right: 0.35em;
  }

  .alliance-caravan-time strong {
    font-size: 0.98rem;
  }

  .alliance-caravan-time span {
    margin-left: 0.42em;
    font-size: 0.61rem;
  }
}

@supports not ((backdrop-filter: blur(1em)) or (-webkit-backdrop-filter: blur(1em))) {
  .alliance-caravan-panel {
    background: rgba(37, 28, 20, 0.9);
  }
}

/* ===== Exclusive Weapon database (2026-10-08 preservation) ===== */
#databasePanel[aria-labelledby="tabExclusiveWeapon"] .database-panel-heading-main {
  display: flex;
  align-items: stretch;
}
#databasePanel[aria-labelledby="tabExclusiveWeapon"] .database-panel-heading-image {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: 2.8em;
  aspect-ratio: 1 / 1;
  margin-right: 0.7em;
}
#databasePanel[aria-labelledby="tabExclusiveWeapon"] .database-panel-heading-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#databasePanel[aria-labelledby="tabExclusiveWeapon"] .database-panel-heading-copy {
  min-width: 0;
  flex: 1 1 auto;
}
.exclusive-weapon-prerequisite[hidden] { display: none; }
.exclusive-weapon-prerequisite {
  margin-top: 1em;
  padding: 0.82em;
  border: 0.075em solid rgba(214, 170, 79, 0.32);
  border-radius: 0.85em;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)), rgba(9, 10, 10, 0.56);
}
.exclusive-weapon-prerequisite-heading { min-width: 0; }
.exclusive-weapon-prerequisite-title {
  margin: 0;
  color: var(--gold-2);
  font-size: clamp(0.78rem, 3.35vw, 0.94rem);
  font-weight: 760;
  line-height: 1.24;
  letter-spacing: -0.01em;
}
.exclusive-weapon-prerequisite-text {
  margin: 0.42em 0 0;
  color: rgba(242, 242, 242, 0.68);
  font-size: clamp(0.58rem, 2.45vw, 0.69rem);
  font-weight: 520;
  line-height: 1.5;
}
.exclusive-weapon-cards {
  display: flex;
  align-items: stretch;
  margin: 0.78em -0.22em 0;
}
.exclusive-weapon-card {
  width: calc(33.333333% - 0.44em);
  min-width: 0;
  margin: 0 0.22em;
  padding: 0.42em 0.28em 0.5em;
  border: 0.075em solid rgba(255, 255, 255, 0.14);
  border-radius: 0.7em;
  background: rgba(4, 6, 7, 0.48);
  text-align: center;
}
.exclusive-weapon-hero-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 0.55em;
  background: rgba(255, 255, 255, 0.035);
}
.exclusive-weapon-hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.exclusive-weapon-hero-name {
  margin: 0.38em 0 0;
  color: var(--text);
  font-size: clamp(0.61rem, 2.62vw, 0.74rem);
  font-weight: 720;
  line-height: 1.16;
  overflow-wrap: normal;
  word-break: normal;
}
.exclusive-weapon-hero-name-en {
  margin: 0.12em 0 0;
  color: rgba(242, 242, 242, 0.52);
  font-size: clamp(0.48rem, 2.05vw, 0.58rem);
  font-weight: 560;
  line-height: 1.12;
}
.exclusive-weapon-weapon-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: clamp(3.05rem, 14vw, 4.2rem);
  margin-top: 0.42em;
}
.exclusive-weapon-weapon-image img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0.16em 0.26em rgba(0, 0, 0, 0.5));
}
.exclusive-weapon-weapon-name {
  min-height: 2.3em;
  margin: 0.14em 0 0;
  color: rgba(242, 242, 242, 0.9);
  font-size: clamp(0.54rem, 2.3vw, 0.66rem);
  font-weight: 680;
  line-height: 1.18;
  overflow-wrap: normal;
  word-break: normal;
}
.exclusive-weapon-weapon-name-en {
  min-height: 2.3em;
  margin: 0.12em 0 0;
  color: rgba(242, 242, 242, 0.48);
  font-size: clamp(0.42rem, 1.8vw, 0.52rem);
  font-weight: 520;
  line-height: 1.15;
  overflow-wrap: normal;
  word-break: normal;
}
.exclusive-weapon-unlock {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  margin-top: 0.48em;
  padding-top: 0.45em;
  border-top: 0.075em solid rgba(255, 255, 255, 0.09);
  color: rgba(242, 242, 242, 0.72);
  font-size: clamp(0.48rem, 2.05vw, 0.58rem);
  font-weight: 620;
  line-height: 1;
  white-space: nowrap;
}
.exclusive-weapon-unlock img {
  display: block;
  flex: 0 0 auto;
  width: 1.45em;
  height: 1.45em;
  margin-right: 0.25em;
  object-fit: contain;
}
.exclusive-weapon-unlock strong {
  margin-left: 0.24em;
  color: var(--gold-2);
  font-size: 1.24em;
  font-weight: 780;
  line-height: 1;
}
.exclusive-weapon-unlock-note {
  margin: 0.7em 0 0;
  color: rgba(242, 242, 242, 0.5);
  font-size: clamp(0.5rem, 2.15vw, 0.61rem);
  font-weight: 500;
  line-height: 1.45;
}
html:not([lang="ja"]) .exclusive-weapon-hero-name-en,
html:not([lang="ja"]) .exclusive-weapon-weapon-name-en { display: none; }
html:not([lang="ja"]) .exclusive-weapon-weapon-name { min-height: 2.4em; }
html[lang="ru"] .exclusive-weapon-prerequisite-title,
html[lang="ru"] .exclusive-weapon-prerequisite-text,
html[lang="ru"] .exclusive-weapon-hero-name,
html[lang="ru"] .exclusive-weapon-weapon-name,
html[lang="ru"] .exclusive-weapon-unlock,
html[lang="ru"] .exclusive-weapon-unlock-note,
html[lang="es"] .exclusive-weapon-prerequisite-title,
html[lang="es"] .exclusive-weapon-prerequisite-text,
html[lang="es"] .exclusive-weapon-hero-name,
html[lang="es"] .exclusive-weapon-weapon-name,
html[lang="es"] .exclusive-weapon-unlock,
html[lang="es"] .exclusive-weapon-unlock-note { letter-spacing: 0; }
@media (max-width: 24em) {
  .exclusive-weapon-prerequisite { padding-left: 0.58em; padding-right: 0.58em; }
  .exclusive-weapon-cards { margin-left: -0.16em; margin-right: -0.16em; }
  .exclusive-weapon-card { width: calc(33.333333% - 0.32em); margin-left: 0.16em; margin-right: 0.16em; padding-left: 0.2em; padding-right: 0.2em; }
  .exclusive-weapon-weapon-image { height: clamp(2.75rem, 13.5vw, 3.5rem); }
  .exclusive-weapon-unlock img { width: 1.3em; height: 1.3em; }
}
