:root {
  --bg: #081118;
  --panel: rgba(10, 18, 28, 0.82);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f2efe7;
  --muted: #b8c0cb;
  --accent: #f0b429;
  --accent-soft: rgba(240, 180, 41, 0.14);
  --blue: #63a9ff;
  --radius: 24px;
  --font-ui: "SF Pro Text", "SF Pro Display", "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(99, 169, 255, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(240, 180, 41, 0.14), transparent 30%),
    linear-gradient(180deg, #09131d 0%, #081118 100%);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.guide-page {
  min-height: 100vh;
  padding: 24px;
}

.guide-topbar,
.guide-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.guide-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.guide-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.guide-brand-mark {
  font-size: 24px;
  letter-spacing: 2px;
}

.guide-brand-name {
  font-size: 18px;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.is-red { color: #ff9685; }

.guide-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.guide-link-btn,
.guide-primary-btn,
.guide-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 11px 16px;
  text-decoration: none;
  font-weight: 700;
}

.guide-link-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.guide-link-btn-primary,
.guide-primary-btn {
  background: var(--accent);
  color: #101114;
}

.guide-secondary-btn {
  border: 1px solid rgba(240, 180, 41, 0.28);
  background: rgba(240, 180, 41, 0.08);
  color: var(--text);
}

.guide-shell {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.guide-hero,
.guide-section {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  padding: 42px;
}

.guide-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 180, 41, 0.12), transparent 68%);
  pointer-events: none;
}

.guide-kicker,
.guide-section-kicker,
.guide-stage-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.guide-hero h1,
.guide-section h2 {
  margin: 10px 0 14px;
  line-height: 1.06;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
}

.guide-hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 0.94;
  max-width: 10ch;
}

.guide-hero p,
.guide-section p,
.guide-rule span,
.guide-panel-card p,
.guide-note-list {
  color: var(--muted);
  line-height: 1.65;
}

.guide-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.guide-stage-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  height: 100%;
  border-radius: 24px;
  border: 1px solid rgba(240, 180, 41, 0.18);
  background:
    radial-gradient(circle at top right, rgba(240, 180, 41, 0.1), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.guide-xt-display {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  align-items: end;
}

.guide-xt-label {
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.guide-xt-value {
  font-size: 52px;
  font-weight: 800;
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.guide-xt-copy {
  grid-column: 2;
  color: var(--muted);
}

.guide-suit-rank {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-suit-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.guide-suit-row.is-best {
  border-color: rgba(240, 180, 41, 0.32);
  background: rgba(240, 180, 41, 0.08);
}

.guide-suit-row strong {
  font-size: 13px;
  letter-spacing: 0.12em;
}

.guide-suit-label {
  display: inline-flex;
  align-items: center;
  min-width: 1.1em;
  justify-content: center;
}

.guide-suit-glyph {
  font-size: 15px;
  line-height: 1;
  color: var(--text);
}

.guide-suit-glyph.is-red {
  color: #ff9685;
}

.guide-suit-row span {
  color: var(--muted);
  font-size: 13px;
}

.guide-section {
  padding: 32px 34px;
}

.guide-section-dark {
  background:
    radial-gradient(circle at top right, rgba(99, 169, 255, 0.1), transparent 34%),
    var(--panel);
}

.guide-section-accent {
  background:
    radial-gradient(circle at bottom left, rgba(240, 180, 41, 0.1), transparent 34%),
    var(--panel);
}

.guide-section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(250px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.guide-note-block,
.guide-rule-stack,
.guide-panel-card {
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.guide-note-block {
  padding: 18px 20px;
}

.guide-note-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.guide-note-list {
  margin: 0;
  padding-left: 18px;
}

.guide-note-list li + li {
  margin-top: 8px;
}

.guide-rule-stack {
  display: flex;
  flex-direction: column;
}

.guide-rule {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
}

.guide-rule + .guide-rule {
  border-top: 1px solid var(--line);
}

.guide-rule strong,
.guide-panel-card strong {
  font-size: 14px;
}

.guide-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.guide-panel-card {
  padding: 18px 20px;
}

.guide-panel-card p {
  margin: 8px 0 0;
}

@media (max-width: 900px) {
  .guide-page {
    padding: 14px;
  }

  .guide-hero,
  .guide-section-grid,
  .guide-panel-grid {
    grid-template-columns: 1fr;
  }

  .guide-hero,
  .guide-section {
    padding: 22px 20px;
  }

  .guide-hero h1 {
    max-width: none;
    font-size: 2.6rem;
  }

  .guide-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
