: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 {
  display: flex;
  align-items: center;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.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-kicker {
  display: block;
  overflow: hidden;
  color: var(--gold-2);
  font-size: 0.54em;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.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 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.1em;
  min-height: 3em;
  padding: 0 0.72em;
  border: 0;
  border-radius: 999em;
  background: transparent;
  color: var(--gold-2);
  font-family: inherit;
  font-size: 0.88em;
  font-weight: 760;
  line-height: 1;
  cursor: pointer;
}

.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 {
  display: inline-block;
  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;
}

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

.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;
}

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

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-desc {
  display: block;
  margin-top: 0.36em;
  color: var(--muted);
  font-size: 0.77em;
  font-weight: 560;
  line-height: 1.5;
}

.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;
}

.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 {
  margin: 0.28em 0 0;
  color: var(--text);
  font-size: clamp(1.4rem, 6vw, 1.7rem);
  font-weight: 780;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.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 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(50% - 0.7em);
  min-height: 4.35em;
  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-size: 0.94em;
  font-weight: 760;
  line-height: 1.18;
  cursor: pointer;
}

.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-title {
  margin: 0;
  color: var(--text);
  font-size: 1.55em;
  font-weight: 780;
  line-height: 1.1;
}

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

.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 {
  display: block;
  width: 100%;
  min-height: 3.25em;
  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-size: 0.96em;
  font-weight: 720;
}

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

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

.database-submit {
  flex: 0 0 auto;
  min-width: 5.5em;
  min-height: 3.25em;
  margin-left: 0.65em;
  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-size: 0.96em;
  font-weight: 820;
  cursor: pointer;
}

.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 {
  flex: 0 0 auto;
  width: 36%;
  margin: 0;
  color: var(--gold);
  font-size: 1.02em;
  font-weight: 780;
  text-align: left;
}

.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-compact {
  display: block;
  color: var(--gold);
  font-size: clamp(2.25em, 11vw, 3.2em);
  font-weight: 850;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

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

.database-total-card.is-multiple .database-total-compact {
  font-size: clamp(1.55em, 7vw, 2.1em);
}

.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: 2.25em;
  }

  .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-page-title {
  margin: 0.28em 0 0;
  color: var(--text);
  font-size: 28px;
  font-weight: 780;
  line-height: 1.08;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.sanctuary-page-text {
  margin: 0.75em 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 620;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.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 {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.sanctuary-select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  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-size: 16px;
  font-weight: 760;
  line-height: 1.2;
  cursor: pointer;
}

.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 {
  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: 16px;
  font-weight: 820;
  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-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-label {
  color: var(--gold-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.sanctuary-total-range {
  margin-left: 0.8em;
  color: var(--text);
  font-size: 14px;
  font-weight: 760;
  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-name {
  display: block;
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  margin-top: 5px;
  overflow: visible;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

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

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

.sanctuary-resource-compact {
  grid-column: 2;
  grid-row: 1;
  margin-left: 4px;
  overflow: visible;
  color: var(--text);
  font-size: 14px;
  font-weight: 830;
  line-height: 1.15;
  white-space: nowrap;
  text-overflow: clip;
}

.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: 12px;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  text-overflow: clip;
}

.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 {
  flex: 0 1 auto;
  order: 2;
  color: var(--gold-2);
  font-size: 18px;
}

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

.sanctuary-resource-item.is-total .sanctuary-resource-exact {
  flex: 0 0 100%;
  order: 4;
  color: rgba(242, 242, 242, 0.72);
  font-size: 13px;
}

.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-label {
  flex: 1 1 8em;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.sanctuary-time-value {
  flex: 0 1 auto;
  max-width: 100%;
  margin-left: 0.8em;
  color: var(--gold-2);
  font-size: 18px;
  font-weight: 830;
  line-height: 1.2;
  text-align: right;
  white-space: normal;
  overflow-wrap: anywhere;
}

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

.sanctuary-breakdown-title {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 780;
  line-height: 1.35;
}

.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-stage-title {
  margin: 0;
  color: var(--gold-2);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.sanctuary-detail-label {
  margin: 0;
  color: rgba(242, 242, 242, 0.52);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.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-resources .sanctuary-resource-name {
  font-size: 12px;
  text-align: left;
}

.sanctuary-stage-resources .sanctuary-resource-compact {
  color: #ffffff;
  font-size: 14px;
}

.sanctuary-stage-resources .sanctuary-resource-exact {
  color: rgba(242, 242, 242, 0.42);
  font-size: 12px;
  text-align: left;
}

.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 {
  margin: 0;
  color: #ffffff;
  font-size: 14px;
  font-weight: 640;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.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-main {
  margin-top: 0.6em;
}

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

.duel-page-title {
  margin: 0.28em 0 0;
  color: var(--text);
  font-size: clamp(1.4rem, 6vw, 1.7rem);
  font-weight: 780;
  line-height: 1.08;
  letter-spacing: -0.2em;
}

.duel-page-text {
  margin: 0.7em 0 0;
  color: var(--muted);
  font-size: 0.92em;
  font-weight: 620;
  line-height: 1.5;
}

.duel-day-tabs {
  display: flex;
  width: 100%;
  margin-top: 1.5em;
  padding: 0.28em;
  overflow-x: auto;
  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-tabs::-webkit-scrollbar {
  display: none;
}

.duel-day-tab {
  flex: 1 0 4.55em;
  min-width: 4.55em;
  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.82em;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

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

.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-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-base-panel {
  border-color: rgba(214, 170, 79, 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-accordion-title,
.duel-card-title {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 1em;
  font-weight: 780;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.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-accordion-chevron,
.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-accordion-toggle[aria-expanded="false"] .duel-accordion-chevron,
.duel-card-toggle[aria-expanded="false"] .duel-card-chevron {
  transform: translateY(0.12em) rotate(-45deg);
}

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

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

.duel-base-help {
  margin: 0.9em 0 0;
  color: var(--muted);
  font-size: 0.78em;
  font-weight: 620;
  line-height: 1.55;
}

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

.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-group-title {
  margin: 0 0 0.64em;
  color: var(--gold-2);
  font-size: 0.74em;
  font-weight: 820;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.duel-base-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.25em;
  align-items: center;
  min-height: 3.3em;
}

.duel-base-field + .duel-base-field {
  margin-top: 0.35em;
  padding-top: 0.35em;
  border-top: 0.075em solid rgba(255, 255, 255, 0.055);
}

.duel-base-field-label {
  min-width: 0;
  padding-right: 0.7em;
  color: rgba(242, 242, 242, 0.82);
  font-size: 0.76em;
  font-weight: 680;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.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 {
  padding: 0 2.15em 0 0.68em;
  text-align: right;
}

.duel-number-input {
  padding: 0 0.68em;
  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;
}

.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 {
  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.88em;
  font-weight: 840;
  line-height: 1.2;
  cursor: pointer;
}

.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-calculation-title {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 1.12em;
  font-weight: 790;
  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.72em;
  font-weight: 740;
  cursor: pointer;
}

.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-task-card {
  margin-top: 0.72em;
}

.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,
.duel-card-subtotal {
  display: block;
  font-size: 0.66em;
  font-weight: 720;
  line-height: 1.35;
  white-space: nowrap;
}

.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-field-label {
  display: block;
  min-height: 1.35em;
  margin-bottom: 0.36em;
  color: var(--muted);
  font-size: 0.68em;
  font-weight: 710;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.duel-result {
  min-width: 0;
  margin-left: 0.55em;
  padding: 0.58em 0.62em;
  border: 0.075em solid rgba(214, 170, 79, 0.22);
  border-radius: 0.72em;
  background: rgba(214, 170, 79, 0.055);
  text-align: right;
}

.duel-result-label {
  display: block;
  min-height: 1.35em;
  color: var(--soft);
  font-size: 0.62em;
  font-weight: 710;
  line-height: 1.35;
}

.duel-result-value {
  display: block;
  min-width: 0;
  margin-top: 0.27em;
  overflow: hidden;
  color: var(--gold-2);
  font-size: clamp(0.78em, 3.45vw, 0.94em);
  font-variant-numeric: tabular-nums;
  font-weight: 820;
  line-height: 1.15;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.duel-result-value.is-waiting {
  color: var(--muted);
  font-size: 0.72em;
}

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

.duel-resource-row + .duel-resource-row {
  margin-top: 0.72em;
  padding-top: 0.72em;
  border-top: 0.075em solid rgba(255, 255, 255, 0.06);
}

.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.73em;
  font-weight: 720;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.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-title {
  margin: 0 0 0.66em;
  color: var(--gold-2);
  font-size: 0.76em;
  font-weight: 790;
  line-height: 1.35;
}

.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-duration .duel-number-input {
  padding-left: 0.34em;
  padding-right: 0.34em;
}

.duel-slot .duel-result {
  margin-top: 0.62em;
  margin-left: 0;
}

.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.72em;
  font-weight: 760;
  cursor: pointer;
}

.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 {
  min-width: 0;
  padding-right: 0.8em;
  color: rgba(242, 242, 242, 0.72);
  font-size: 0.75em;
  font-weight: 740;
  line-height: 1.3;
}

.duel-sticky-total-value {
  display: block;
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: var(--gold-2);
  font-size: clamp(1.14em, 5.2vw, 1.48em);
  font-variant-numeric: tabular-nums;
  font-weight: 860;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-align: right;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@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: clamp(1.4rem, 6vw, 1.7rem);
  }

  .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 {
  flex: 1 1 auto;
}

.brand-kicker {
  font-size: 0.58em;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.language-toggle {
  min-width: 6.4em;
  padding-left: 0.5em;
  padding-right: 0.5em;
  font-weight: 680;
}

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

.section-title {
  font-size: 1.24em;
  font-weight: 680;
  line-height: 1.2;
}

.tool-title {
  font-size: 0.98em;
  font-weight: 700;
}

.tool-desc {
  font-size: 0.74em;
  font-weight: 500;
}

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: clamp(1.65em, 7vw, 2.25em);
  font-weight: 720;
  line-height: 1.16;
  letter-spacing: -0.005em;
}

.duel-day-tabs {
  overflow-x: visible;
}

.duel-day-tab {
  flex: 1 1 0;
  min-width: 0;
  padding-left: 0.12em;
  padding-right: 0.12em;
  font-size: 0.72em;
  font-weight: 700;
}

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

.database-page-title {
  font-size: clamp(1.72em, 7.2vw, 2.25em);
  font-weight: 720;
  letter-spacing: -0.015em;
}

.database-tab {
  font-size: 0.88em;
  font-weight: 700;
}

.database-panel-title {
  font-size: 1.35em;
  font-weight: 720;
}

.database-select {
  padding-left: 0.55em;
  padding-right: 1.6em;
  font-size: 0.84em;
  font-weight: 650;
}

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

.database-submit {
  min-width: 4.4em;
  margin-left: 0.35em;
  padding-left: 0.5em;
  padding-right: 0.5em;
  font-size: 0.88em;
  font-weight: 760;
}

.database-total-label {
  width: 30%;
  font-size: 0.88em;
  font-weight: 700;
}

.database-total-compact {
  font-size: clamp(1.65em, 8vw, 2.3em);
  font-weight: 760;
  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 {
  font-size: 0.68em;
  font-weight: 600;
}

@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 {
  flex: 0 1 auto;
  max-width: none;
  padding-right: 0.7em;
  overflow: hidden;
  font-size: 0.68em;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.duel-sticky-total-value {
  flex: 0 0 auto;
  font-size: clamp(0.98em, 4.4vw, 1.16em);
  font-weight: 720;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
