@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #0b0e14;
  --item: #131722;
  --item-hover: #19202e;
  --line: #1e2634;
  --line-focus: #2d384c;
  --text: #e6edf3;
  --muted: #8b949e;
  --orange: #f59e0b;
  --orange-press: #d97706;
  --blue: #229ED9;
  --blue-hover: #1c8cc3;
  --radius: 8px;
  --font: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: dark;
}

body.page {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

body.page h1,
body.page h2,
body.page h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: #ffffff;
}
body.page h1 {
  font-size: 2.15rem;
}
body.page h2 {
  font-size: 1.55rem;
}
body.page h3 {
  font-size: 1.15rem;
}

body.page a { color: var(--orange); text-decoration: none; }
body.page a:hover { text-decoration: underline; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(19, 23, 34, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.logo img {
  height: 32px;
  width: auto;
  display: block;
}

body.page .site-nav a {
  color: #c0c6cf;
  text-decoration: none;
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius);
  font-weight: 500;
  transition: color 0.15s ease, background 0.15s ease;
}
body.page .site-nav a:hover {
  color: #fff;
  text-decoration: none;
  background: var(--item-hover);
}
body.page .site-nav a.nav-on {
  color: var(--orange);
  background: rgba(245, 158, 11, 0.1);
  font-weight: 600;
}

.site-header .ml-auto {
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .site-header .ml-auto {
    width: 100%;
    margin-left: 0;
  }
  .site-header .site-nav {
    width: 100%;
  }
}

.card {
  background: var(--item);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
a.card {
  color: var(--text);
  text-decoration: none;
  display: block;
}
a.card:hover {
  text-decoration: none;
  border-color: var(--line-focus);
  background: var(--item-hover);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.ph {
  background: var(--item);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.banner {
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  object-position: center;
  margin-inline: auto;
  border-radius: var(--radius);
}

.btn,
.btn-outline,
.btn-telegram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 1.05rem;
  font-size: 0.88rem;
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover,
.btn-outline:hover,
.btn-telegram:hover { text-decoration: none; }

body.page a.btn,
body.page .btn {
  background: var(--orange);
  color: #0b0e14;
  border-color: var(--orange);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}
body.page a.btn:hover,
body.page .btn:hover {
  background: #fbbf24;
  border-color: #fbbf24;
  color: #0b0e14;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
body.page a.btn:active,
body.page .btn:active {
  transform: translateY(0) scale(0.97);
  background: var(--orange-press);
  border-color: var(--orange-press);
}
body.page .btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

body.page a.btn-outline,
body.page .btn-outline {
  background: transparent;
  color: var(--orange);
  border-color: var(--orange);
}
body.page a.btn-outline:hover,
body.page .btn-outline:hover {
  background: rgba(245, 158, 11, 0.12);
  color: var(--orange);
  text-decoration: none;
  transform: translateY(-1px);
}

/* Telegram Button (Dedicated Blue) */
body.page a.btn-telegram,
body.page .btn-telegram {
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(34, 158, 217, 0.35);
  font-weight: 600;
}
body.page a.btn-telegram:hover,
body.page .btn-telegram:hover {
  background: linear-gradient(135deg, #3bb3f2 0%, #1c8cc3 100%);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(34, 158, 217, 0.5);
  text-decoration: none !important;
}
body.page a.btn-telegram:active,
body.page .btn-telegram:active {
  transform: translateY(0) scale(0.97);
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.step-grid li {
  padding: 0.85rem 0.95rem;
}
.step-grid .step-copy {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}
@media (min-width: 640px) {
  .step-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.meta-row span {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.muted { color: var(--muted); }

table.sheet {
  width: 100%;
  border-collapse: collapse;
  background: var(--item);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
table.sheet th,
table.sheet td {
  border: 1px solid var(--line);
  padding: 0.6rem 0.75rem;
  text-align: left;
}
table.sheet thead {
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  color: #ffffff;
}

details.card {
  padding: 0.75rem 1rem;
}
details.card summary {
  cursor: pointer;
  outline: none;
}
details.card summary:hover {
  color: var(--orange);
}

.site-footer {
  background: var(--item);
  border-top: 1px solid var(--line);
}
body.page .site-footer a { color: #adb5bd; }
body.page .site-footer a:hover { color: var(--orange); }

.field,
body.page select,
body.page input[type="number"],
body.page input[type="text"] {
  display: block;
  margin-top: 0.3rem;
  width: 100%;
  max-width: 22rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0d1017;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.88rem;
  transition: border-color 0.15s ease;
}
body.page select:focus,
body.page input[type="number"]:focus,
body.page input[type="text"]:focus {
  outline: none;
  border-color: var(--orange);
}
body.page label {
  display: block;
  margin-bottom: 0.95rem;
  font-size: 0.88rem;
  font-weight: 500;
}

.grade {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-games {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-bottom: 1px solid var(--line);
}
.home-games .game-line:first-child {
  border-top: 1px solid var(--line);
}
.home-games .game-line {
  padding: 0.85rem 0;
}
body.page .home-games h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: #adb5bd;
}
.home-names {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 0.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.home-names li {
  font-family: var(--font);
  font-size: 0.98rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  padding: 0.2rem 0;
}
@media (min-width: 768px) {
  .home-names.slot-names {
    grid-template-columns: repeat(4, 1fr);
  }
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.65rem;
}
.game-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--item);
  padding: 0.9rem 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.game-tile:hover {
  border-color: var(--line-focus);
  transform: translateY(-1px);
}
.game-name {
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1.25;
}
.game-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.25rem;
  line-height: 1.35;
}

.mark {
  color: var(--orange);
  margin-right: 0.35rem;
}

@media (max-width: 639px) {
  .factor-grid,
  .issue-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .factor-grid .card,
  .issue-grid .card {
    padding: 0.7rem 0.75rem;
  }
  .factor-grid .mark,
  .issue-grid .mark {
    display: inline-block;
    margin: 0 0.3rem 0 0;
    font-size: 0.9rem;
  }
  body.page .factor-grid h3 {
    display: inline;
    font-size: 0.98rem;
  }
  .factor-grid p,
  .issue-grid .muted {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.76rem;
    line-height: 1.35;
  }
  .factor-grid .meta-row {
    display: none;
  }
}

button.door {
  font-family: var(--font);
  font-size: 0.92rem;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  width: 100%;
  background: var(--item);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: all 0.18s ease;
}
button.door:hover {
  background: var(--item-hover);
  border-color: var(--line-focus);
}
button.door strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.2rem;
}
button.door.on {
  border-color: var(--orange);
  background: rgba(245, 158, 11, 0.05);
}
button.door:active { transform: scale(0.97); }

body.page label.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  cursor: pointer;
}
body.page label.choice input {
  width: auto;
  max-width: none;
  margin-top: 0.25rem;
  accent-color: var(--orange);
}

.meter {
  height: 8px;
  background: #161b24;
  border-radius: var(--radius);
  overflow: hidden;
}
.meter span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--orange);
  transition: width 0.3s ease;
}

