/* ============================================================
   Доп. страницы и фичи: шпаргалка, чеклист, таймер лиги, поиск
   (подключается ПОСЛЕ styles.css — использует его переменные)
   ============================================================ */

/* ---------- общий каркас доп. страниц ---------- */
.page-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.page-wrap {
  position: relative;
  z-index: 1;
  width: min(860px, 94vw);
  padding: 2.2rem 0 4rem;
}

.page-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line-soft);
}
.page-back {
  font-family: var(--sans);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.page-back:hover { color: var(--gold-bright); }
.page-topbar .lang-switch { margin: 0; }

.page-head { text-align: center; margin-bottom: 2.2rem; }
.page-title {
  font-family: var(--caps);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.9rem);
  color: var(--gold-bright);
  line-height: 1.08;
  text-shadow: 0 0 26px rgba(200, 170, 110, 0.22);
}
.page-sub {
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
  margin-top: 0.6rem;
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- плашка «билд в разработке» ---------- */
.wip-banner {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  max-width: 860px;
  margin: 1.8rem auto 0.2rem;
  padding: 0.72rem 1.1rem;
  border: 1px dashed var(--gold-dim);
  border-radius: 5px;
  background:
    repeating-linear-gradient(-45deg, rgba(200,170,110,0.05) 0 10px, transparent 10px 20px),
    linear-gradient(90deg, rgba(87, 21, 18, 0.22), rgba(200, 170, 110, 0.06));
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
}
.wip-banner .wip-ico { font-size: 1.15rem; line-height: 1; flex: 0 0 auto; }
.wip-banner b { color: var(--gold-bright); font-weight: 700; }

/* ---------- лента: до старта лиги ---------- */
.league-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.6rem 1.4rem;
  margin: 0.4rem auto 0.8rem;
  padding: 0.9rem 1.4rem;
  border: 1px solid var(--gold-dim);
  border-left: none;
  border-right: none;
  background:
    linear-gradient(90deg, transparent, rgba(200, 170, 110, 0.07) 20%, rgba(200, 170, 110, 0.07) 80%, transparent);
}
.league-strip .ls-label {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
/* номер версии: дисплейным серифом (Cormorant) — не тем сансом, что вокруг;
   крупные изящные цифры как осознанный акцент, а не тресканутая мелочь */
.league-strip .ls-ver {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.42em;
  letter-spacing: 0.01em;
  color: #f0dcac;
}
.league-strip .ls-timer {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: 0.03em;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(200, 170, 110, 0.3);
}
.league-strip .ls-note {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--faint);
}
.league-strip.live .ls-label { color: #9fc98f; }

/* ---------- кнопка-поле поиска в рейле (над оглавлением) ---------- */
.rail-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin: 0 0 1.1rem;
  padding: 0.55rem 0.75rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--faint);
  text-align: left;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.rail-search:hover { border-color: var(--gold-dim); color: var(--muted); }
.rail-search .rs-txt { flex: 1; }
.rail-search kbd {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--faint);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 0.12rem 0.4rem;
  background: var(--bg);
  white-space: nowrap;
}

/* поиск в мобильной шапке */
.tb-actions { display: flex; align-items: center; gap: 0.5rem; }
.topbar-search {
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--gold);
  padding: 0.42rem 0.62rem;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}
.topbar-search:hover { border-color: var(--gold-dim); color: var(--gold-bright); }
@media (max-width: 1080px) {
  .rail-search kbd { display: none; }
}

/* ---------- поиск по гайду ---------- */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 4vw 4vh;
  background: rgba(6, 5, 4, 0.82);
  backdrop-filter: blur(2px);
}
.search-modal.open { display: flex; }
.sm-box {
  width: min(640px, 100%);
  border: 1px solid var(--gold-dim);
  border-radius: 6px;
  background: var(--panel-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}
.sm-input {
  width: 100%;
  border: none;
  outline: none;
  background: var(--panel);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.1rem;
  padding: 0.95rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.sm-input::placeholder { color: var(--faint); }
.sm-results {
  max-height: 55vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.sm-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line-soft);
  padding: 0.75rem 1.2rem;
  cursor: pointer;
  color: var(--text);
}
.sm-item:hover, .sm-item.sel { background: rgba(200, 170, 110, 0.07); }
.sm-item .smi-ch {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.2rem;
}
.sm-item .smi-tx {
  display: block;
  font-family: var(--serif);
  font-size: 0.93rem;
  line-height: 1.5;
  color: var(--muted);
}
.sm-item mark { background: rgba(200, 170, 110, 0.3); color: var(--gold-bright); padding: 0 0.1em; }
.sm-empty {
  padding: 1.1rem 1.2rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--faint);
}
.sm-hint {
  padding: 0.5rem 1.2rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--faint);
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
}

/* ---------- шпаргалка ---------- */
.cs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
}
.cs-card {
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold-dim);
  border-radius: 4px;
  background: var(--panel);
  padding: 1.1rem 1.25rem 1.2rem;
}
.cs-card--wide { grid-column: 1 / -1; }
.cs-card h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--gold);
  margin-bottom: 0.7rem;
}
.cs-card .modlist { margin: 0; }
.cs-card .modlist li { padding: 0.5rem 0.1rem 0.5rem 1.4rem; font-size: 0.92rem; line-height: 1.55; }
.cs-card .modlist li::before { top: 0.68rem; }
.cs-banner {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.cs-banner p { font-size: 0.97rem; line-height: 1.55; }
.cs-banner b { color: var(--gold-bright); }
.cs-kv { list-style: none; }
.cs-kv li {
  padding: 0.45rem 0;
  font-size: 0.97rem;
  border-top: 1px solid var(--line-soft);
}
.cs-kv li:first-child { border-top: none; }
.cs-kv b { color: var(--gold-bright); }
.cs-note { font-family: var(--sans); font-size: 0.8rem; color: var(--faint); margin-top: 0.6rem; }

/* ---------- чеклист ---------- */
.cl-progress-wrap { margin: 0 0 1.8rem; }
.cl-progress-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.cl-progress {
  height: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  overflow: hidden;
}
.cl-progress .bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-bright));
  box-shadow: 0 0 12px rgba(200, 170, 110, 0.5);
  transition: width 0.35s ease;
}
.cl-list { list-style: none; display: flex; flex-direction: column; }
.cl-item {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: baseline;
  padding: 0.72rem 0.3rem;
  border-top: 1px solid var(--line-soft);
  cursor: pointer;
}
.cl-item:last-child { border-bottom: 1px solid var(--line-soft); }
.cl-item:hover { background: rgba(200, 170, 110, 0.04); }
.cl-box {
  width: 1.25rem;
  height: 1.25rem;
  align-self: center;
  border: 1px solid var(--gold-dim);
  border-radius: 3px;
  background: var(--panel);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  color: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}
.cl-item.done .cl-box { color: #14100a; background: linear-gradient(180deg, var(--gold-bright), var(--gold)); }
.cl-text { font-size: 1rem; line-height: 1.5; }
.cl-item.done .cl-text { color: var(--faint); text-decoration: line-through; text-decoration-color: rgba(200,170,110,0.5); }
.cl-item.milestone .cl-text b { color: var(--unique); }
.cl-item .cl-ch {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--faint);
  text-decoration: none;
  white-space: nowrap;
}
.cl-item .cl-ch:hover { color: var(--gold-bright); }
.cl-reset-row { text-align: center; margin-top: 1.4rem; }
.cl-milestone-note {
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--unique);
  min-height: 1.5rem;
  margin-top: 0.9rem;
}

/* ---------- кнопки (для страниц без sim.css) ---------- */
.page-body .sim-btn {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: #14100a;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border: none;
  border-radius: 4px;
  padding: 0.75rem 1.7rem;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.page-body .sim-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.page-body .sim-btn--ghost {
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
}
.page-body .sim-btn--ghost:hover { color: var(--gold-bright); border-color: var(--gold-dim); filter: none; }
.page-body .sim-btn--small { font-size: 0.78rem; padding: 0.45rem 0.9rem; font-weight: 500; }

/* ---------- адаптив и печать ---------- */
@media (max-width: 700px) {
  .cs-grid { grid-template-columns: 1fr; }
  .cl-item { grid-template-columns: 1.7rem minmax(0, 1fr); }
  .cl-item .cl-ch { grid-column: 2; justify-self: start; }
  .league-strip { flex-direction: column; align-items: center; gap: 0.25rem; text-align: center; }
}
@media print {
  body { background: #fff; color: #000; }
  .page-topbar, .sim-btn, .cl-reset-row, .to-top { display: none !important; }
  .cs-card, .cl-item { border-color: #999; background: #fff; }
  .cs-card h3, .page-title { color: #000; text-shadow: none; }
}
