/* KR Lotto Platform — portal layout, red & gold, polished UI */
:root {
  --color-bg: #fafbfc;
  --color-surface: #ffffff;
  --color-border: #e6e8eb;
  --color-text: #15181d;
  --color-muted: #5a6270;
  --color-red: #d4193d;
  --color-red-dark: #a31130;
  --color-gold: #c9a227;
  --color-gold-light: #efd766;
  --color-ink: #0f1218;
  --shadow-card: 0 4px 20px rgba(15, 18, 24, 0.06);
  --shadow-hover: 0 14px 40px rgba(212, 25, 61, 0.14);
  --radius: 14px;
  --font-sans: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --bottom-nav-h: 62px;
  --header-h: 58px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(212, 25, 61, 0.07), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 20%, rgba(201, 162, 39, 0.09), transparent 45%),
    radial-gradient(ellipse 60% 40% at 0% 80%, rgba(201, 162, 39, 0.06), transparent 40%);
  background-attachment: fixed;
  padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0));
}

@media (min-width: 900px) {
  body {
    padding-bottom: 0;
  }
}

a {
  color: var(--color-red);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(230, 232, 235, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(201, 162, 39, 0.12);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-text);
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  color: var(--color-red);
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #ffffff66 0%, transparent 42%),
    linear-gradient(145deg, var(--color-red) 0%, var(--color-red-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(212, 25, 61, 0.42);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}

.logo:hover .logo-mark {
  transform: rotate(-6deg) scale(1.04);
  box-shadow: 0 8px 22px rgba(212, 25, 61, 0.38);
}

.nav-desktop {
  display: none;
  gap: 0.25rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav-desktop a {
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
}

.nav-desktop a:hover,
.nav-desktop a.is-active {
  background: linear-gradient(180deg, #fff9e6 0%, #fff 100%);
  color: var(--color-red);
  text-decoration: none;
}

@media (min-width: 900px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  cursor: pointer;
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }
}

.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.45);
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(300px, 88vw);
  height: 100%;
  background: var(--color-bg);
  padding: 1.25rem;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  overflow-y: auto;
}

.mobile-drawer-panel nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 1rem;
}

.mobile-drawer-panel a {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  font-weight: 500;
}

.drawer-close {
  float: right;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--color-surface);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: var(--bottom-nav-h);
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -8px 30px rgba(15, 18, 24, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@media (min-width: 900px) {
  .bottom-nav {
    display: none;
  }
}

.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-muted);
  text-decoration: none;
}

.bottom-nav a span.icon {
  font-size: 1.25rem;
  line-height: 1;
}

.bottom-nav a.is-active,
.bottom-nav a:hover {
  color: var(--color-red);
  text-decoration: none;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 2rem 0 2.5rem;
  background: linear-gradient(165deg, #fffdf5 0%, #ffffff 42%, #fafbfc 100%);
  border-bottom: 1px solid var(--color-border);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 120%;
  background: radial-gradient(circle, rgba(212, 25, 61, 0.06) 0%, transparent 55%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.55rem, 4.2vw, 2.05rem);
  font-weight: 800;
  color: var(--color-ink);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.hero .lead {
  margin: 0 auto;
  max-width: 38rem;
  color: var(--color-muted);
  font-size: 1.02rem;
}

/* 홈: 첫 화면에 즉석 추첨 카드 */
.hero.hero--play {
  text-align: left;
  padding: 2rem 0 2.75rem;
}

.hero-play-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero-copy .lead {
  margin-left: 0;
  margin-right: 0;
  max-width: 36rem;
}

.hero-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-red-dark);
}

.hero-points {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.92rem;
  color: var(--color-muted);
}

.hero-points li {
  padding-left: 1.35rem;
  position: relative;
}

.hero-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-red);
  font-weight: 800;
}

.hero-play-card-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.hero-play-hint {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--color-muted);
  line-height: 1.5;
}

.hero-play-more {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-red-dark);
  text-decoration: none;
}

.hero-play-more:hover {
  text-decoration: underline;
}

.btn-hero-draw {
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.hero-play-card .balls-row {
  margin: 1.25rem 0 1rem;
}

/* 히어로 카드: 한 줄 유지 + 살짝 작게 */
.hero-play-card .balls-row--pick .lotto-slot {
  width: clamp(28px, 10.2vw, 46px);
  height: clamp(28px, 10.2vw, 46px);
}

@media (min-width: 840px) {
  .hero-play-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
    gap: 2.5rem;
  }
}

@media (max-width: 839px) {
  .hero.hero--play {
    text-align: center;
  }

  .hero-copy .lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-points {
    align-items: stretch;
    text-align: left;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
  }
}

.notice-banner {
  margin: 0;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--color-red);
  background: rgba(212, 25, 61, 0.045);
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--color-surface);
  border: 1px solid rgba(230, 232, 235, 0.95);
  border-radius: var(--radius);
  padding: 1.35rem 1.3rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.28s var(--ease-out), transform 0.28s var(--ease-out), border-color 0.28s;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: rgba(212, 25, 61, 0.14);
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 0.5rem;
}

.card-meta {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--color-red) 0%, var(--color-red-dark) 100%);
  color: #fff;
  box-shadow: 0 6px 22px rgba(212, 25, 61, 0.38);
}

.btn-primary:hover {
  filter: brightness(1.06);
  text-decoration: none;
  color: #fff;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-gold);
  text-decoration: none;
}

.section {
  margin-top: 2.5rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.link-more {
  font-weight: 600;
  font-size: 0.9rem;
}

.page-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
}

.page-intro {
  color: var(--color-muted);
  margin: 0 0 1.25rem;
  max-width: 42rem;
}

/* Lotto balls */
.balls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  min-height: 3.5rem;
  margin: 1rem 0;
}

/* 클릭 추첨 — 7개 한 줄, 스크롤바 없이 공 크기만 줄임 */
.balls-row--pick {
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  overflow: visible;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 3.5rem;
  padding: 0.2rem 0;
  gap: clamp(0.18rem, 1.2vw, 0.4rem);
}

.balls-row--pick .lotto-slot {
  flex: 0 0 auto;
  width: clamp(30px, 11vw, 52px);
  height: clamp(30px, 11vw, 52px);
}

.balls-row--pick .lotto-slot-inner {
  font-size: clamp(0.78rem, 3.6vw, 1.12rem);
}

.balls-row.is-drawing {
  animation: row-pulse 0.38s ease-in-out infinite alternate;
}

@keyframes row-pulse {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(1.06);
  }
}

.lotto-slot {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lotto-slot-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-sizing: border-box;
}

.lotto-slot--empty .lotto-slot-inner {
  color: #6a7384;
  background: linear-gradient(160deg, #f2f4f9 0%, #dce1eb 100%);
  box-shadow: inset 0 -5px 10px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(15, 18, 24, 0.08);
  border: 2px dashed rgba(212, 25, 61, 0.28);
}

.lotto-slot.is-spinning:not(.lotto-slot--filled) .lotto-slot-inner {
  color: var(--color-red-dark);
  background: linear-gradient(145deg, #ffffff 0%, #ffd6de 100%);
  border: none;
  animation: slot-jiggle 0.07s linear infinite;
}

@keyframes slot-jiggle {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-2px) rotate(-3deg);
  }
  75% {
    transform: translateY(2px) rotate(3deg);
  }
}

/* 확정 후 번호대별 색 — 동행복권 로또 공 구간과 동일하게 매칭 */
.lotto-slot--filled .lotto-slot-inner {
  color: #fff;
  border: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  animation: ball-lock-in 0.48s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.lotto-slot--filled.lotto-slot--band-y .lotto-slot-inner {
  color: #1e1b16;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  background: radial-gradient(circle at 32% 28%, #ffffffaa 0%, transparent 42%),
    linear-gradient(155deg, #ffe066 0%, #f5bc00 52%, #e2a800 100%);
  box-shadow: inset -2px -4px 8px rgba(0, 0, 0, 0.12), 0 8px 18px rgba(230, 176, 0, 0.35);
}

.lotto-slot--filled.lotto-slot--band-b .lotto-slot-inner {
  background: radial-gradient(circle at 32% 28%, #ffffffaa 0%, transparent 42%),
    linear-gradient(155deg, #7ecbff 0%, #3aa5f5 55%, #1f7fd4 100%);
  box-shadow: inset -2px -4px 8px rgba(0, 0, 0, 0.18), 0 8px 18px rgba(42, 132, 212, 0.38);
}

.lotto-slot--filled.lotto-slot--band-r .lotto-slot-inner {
  background: radial-gradient(circle at 32% 28%, #ffffffaa 0%, transparent 42%),
    linear-gradient(155deg, #ff8b8b 0%, #ef4343 52%, #c92525 100%);
  box-shadow: inset -2px -4px 8px rgba(0, 0, 0, 0.22), 0 8px 18px rgba(210, 60, 60, 0.4);
}

.lotto-slot--filled.lotto-slot--band-gr .lotto-slot-inner {
  background: radial-gradient(circle at 32% 28%, #ffffffaa 0%, transparent 42%),
    linear-gradient(155deg, #d9dee6 0%, #aeb6bf 48%, #8e96a3 100%);
  box-shadow: inset -2px -4px 8px rgba(0, 0, 0, 0.2), 0 8px 18px rgba(90, 98, 112, 0.28);
}

.lotto-slot--filled.lotto-slot--band-gn .lotto-slot-inner {
  background: radial-gradient(circle at 32% 28%, #ffffffaa 0%, transparent 42%),
    linear-gradient(155deg, #c9ef7a 0%, #8fce3b 50%, #6fad28 100%);
  box-shadow: inset -2px -4px 8px rgba(0, 0, 0, 0.18), 0 8px 18px rgba(96, 160, 48, 0.38);
}

@keyframes ball-lock-in {
  from {
    opacity: 0.65;
    transform: scale(0.55) rotate(-14deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.btn-primary.is-busy {
  opacity: 0.88;
  cursor: wait;
  pointer-events: none;
}

.lotto-ball {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
  background: radial-gradient(circle at 30% 30%, #fff6 0%, transparent 45%),
    linear-gradient(145deg, var(--color-red) 0%, var(--color-red-dark) 100%);
  box-shadow: inset -2px -4px 8px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(196, 30, 58, 0.35);
  animation: ball-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
  transform: scale(0.5);
}

.lotto-ball.is-gold {
  background: radial-gradient(circle at 30% 30%, #fff8 0%, transparent 45%),
    linear-gradient(145deg, var(--color-gold) 0%, #a88620 100%);
  box-shadow: inset -2px -4px 8px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(201, 162, 39, 0.45);
}

.lotto-ball:nth-child(1) {
  animation-delay: 0.05s;
}
.lotto-ball:nth-child(2) {
  animation-delay: 0.1s;
}
.lotto-ball:nth-child(3) {
  animation-delay: 0.15s;
}
.lotto-ball:nth-child(4) {
  animation-delay: 0.2s;
}
.lotto-ball:nth-child(5) {
  animation-delay: 0.25s;
}
.lotto-ball:nth-child(6) {
  animation-delay: 0.3s;
}

@keyframes ball-pop {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.balls-row.is-static .lotto-ball {
  animation: none;
  opacity: 1;
  transform: scale(1);
}

@media (min-width: 640px) {
  .lotto-ball {
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
  }

  .lotto-slot {
    width: 56px;
    height: 56px;
  }

  .lotto-slot-inner {
    font-size: 1.25rem;
  }

  .balls-row--pick .lotto-slot {
    width: clamp(34px, 9vw, 54px);
    height: clamp(34px, 9vw, 54px);
  }

  .hero-play-card .balls-row--pick .lotto-slot {
    width: clamp(30px, 8.5vw, 48px);
    height: clamp(30px, 8.5vw, 48px);
  }
}

/* Generator form */
.generator-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.form-row input[type="text"],
.form-row textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 0.35rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.generator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.result-panel {
  position: relative;
  text-align: center;
  padding: 1.65rem 1.15rem;
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(180deg, #fffdf6 0%, #ffffff 65%);
  margin-top: 1.35rem;
  border: 1px solid rgba(201, 162, 39, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 12px 36px rgba(15, 18, 24, 0.07);
}

.result-panel::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  bottom: 10px;
  border-radius: var(--radius);
  border: 1px dashed rgba(201, 162, 39, 0.35);
  pointer-events: none;
}

.result-panel .balls-row {
  position: relative;
  z-index: 1;
}

.result-panel .balls-row {
  margin: 1.25rem 0;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.alert-error {
  background: #fff0f0;
  border: 1px solid #f5c2c7;
  color: var(--color-red-dark);
}

/* Stats / lists */
.stat-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stat-list li {
  padding: 0.35rem 0.65rem;
  background: var(--color-surface);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-weight: 700;
}

.pattern-bar {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--color-red), var(--color-gold));
  margin-top: 0.35rem;
  max-width: 100%;
}

.win-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.win-table th,
.win-table td {
  border: 1px solid var(--color-border);
  padding: 0.6rem 0.5rem;
  text-align: center;
}

.win-table th {
  background: var(--color-surface);
  font-weight: 800;
}

.win-table .nums {
  font-weight: 700;
  color: var(--color-red-dark);
}

.note-box {
  background: #fff9e6;
  border-left: 4px solid var(--color-gold);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}

/* FAQ */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: var(--color-bg);
}

.faq-q {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-family: inherit;
  font-size: 1rem;
  border: none;
  background: var(--color-surface);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.faq-q::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--color-red);
  flex-shrink: 0;
}

.faq-item.is-open .faq-q::after {
  content: "−";
}

.faq-a {
  display: none;
  padding: 0 1.25rem 1rem;
  color: var(--color-muted);
}

.faq-item.is-open .faq-a {
  display: block;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 2rem 1rem;
  border-top: 1px solid var(--color-border);
  background: linear-gradient(180deg, var(--color-bg) 0%, #fffdf7 100%);
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}

.site-footer a {
  color: var(--color-muted);
  font-weight: 500;
}

.ad-slot {
  margin: 1.25rem 0;
  min-height: 90px;
  background: repeating-linear-gradient(
      -45deg,
      #f5f5f5,
      #f5f5f5 8px,
      #ebebeb 8px,
      #ebebeb 16px
    );
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--color-muted);
}

.ad-slot span {
  padding: 0.5rem;
  text-align: center;
}

/* Article prose */
.prose {
  max-width: 42rem;
}

.prose h2 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 800;
}

.prose h3 {
  font-size: 1.05rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.prose p {
  margin: 0 0 1rem;
  color: var(--color-text);
}

.prose ul {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.site-main {
  min-height: 40vh;
}

/* ---------- Enhanced footer (AdSense / trust) ---------- */
.site-footer--full {
  text-align: left;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  padding-bottom: 1rem;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    align-items: start;
  }
}

.footer-brand strong {
  font-size: 1.05rem;
  color: var(--color-ink);
}

.footer-tagline {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.footer-heading {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.45rem;
}

.footer-links a {
  color: var(--color-text);
  font-weight: 500;
}

.footer-copy {
  margin: 0;
  padding: 1rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-muted);
  border-top: 1px solid var(--color-border);
}

.policy-main .policy-rev {
  margin-top: -0.35rem;
}

/* ---------- Bottom nav icons ---------- */
.nav-ic {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(15, 18, 24, 0.12);
}

.bottom-nav a.is-active .nav-ic,
.bottom-nav a:hover .nav-ic {
  box-shadow: 0 0 0 2px rgba(212, 25, 61, 0.28), 0 4px 12px rgba(212, 25, 61, 0.22);
}

.nav-ic--home {
  background: radial-gradient(circle at 35% 30%, #ffffff77 0%, transparent 45%), linear-gradient(145deg, #8f96a3, #5e6675);
}

.nav-ic--gen {
  background: radial-gradient(circle at 35% 30%, #ffffff77 0%, transparent 45%), linear-gradient(145deg, var(--color-red), var(--color-red-dark));
}

.nav-ic--chart {
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff 35%, #e6eaf1 100%);
  box-shadow: inset 0 -5px 0 rgba(212, 25, 61, 0.85), 0 2px 8px rgba(15, 18, 24, 0.12);
}

.nav-ic--star {
  border-radius: 4px;
  background: conic-gradient(from 210deg, var(--color-gold), #fff2a8, var(--color-gold));
  clip-path: polygon(50% 0%, 63% 38%, 100% 38%, 69% 62%, 82% 100%, 50% 76%, 18% 100%, 31% 62%, 0 38%, 37% 38%);
}

.nav-ic--book {
  border-radius: 5px 6px 6px 5px;
  background: linear-gradient(135deg, var(--color-red-dark), var(--color-red) 55%, #ff8aa3);
}

/* ---------- Confetti ---------- */
.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

.confetti-piece {
  position: absolute;
  width: 9px;
  height: 13px;
  border-radius: 2px;
  animation: confetti-fly 0.88s var(--ease-out) forwards;
}

@keyframes confetti-fly {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
    opacity: 1;
  }
  to {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(520deg);
    opacity: 0;
  }
}

/* ---------- Forms ---------- */
.form-row input[type="text"]:focus,
.form-row textarea:focus {
  outline: none;
  border-color: rgba(212, 25, 61, 0.45);
  box-shadow: 0 0 0 3px rgba(212, 25, 61, 0.12);
}

.generator-panel {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fb 100%);
  border: 1px solid rgba(230, 232, 235, 0.95);
  padding-bottom: 1.85rem;
}

.generator-panel::after {
  content: "";
  position: absolute;
  inset: auto 12px 8px;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    rgba(212, 25, 61, 0.18),
    rgba(212, 25, 61, 0.18) 4px,
    transparent 4px,
    transparent 8px
  );
  opacity: 0.55;
  pointer-events: none;
  border-radius: 3px;
}

.section-head h2 {
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
}

.page-title {
  letter-spacing: -0.02em;
}

.ad-slot {
  min-height: 100px;
  background: linear-gradient(135deg, #f3f4f7 0%, #eceef3 50%, #f6f7fa 100%);
  border: 1px dashed rgba(90, 98, 112, 0.28);
  font-weight: 600;
}

.link-more {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(212, 25, 61, 0.06);
  color: var(--color-red-dark);
  text-decoration: none;
  font-size: 0.82rem;
}

.link-more:hover {
  background: rgba(212, 25, 61, 0.11);
  text-decoration: none;
}

.preview-card {
  background: linear-gradient(165deg, #ffffff 0%, #fff9ef 100%);
  border: 1px solid rgba(201, 162, 39, 0.35);
}

.editorial-card {
  border-color: rgba(212, 25, 61, 0.12);
  background: linear-gradient(125deg, #ffffff 0%, #fff8fb 45%, #ffffff 100%);
}

.celebrate-shake {
  animation: ticket-shake 0.45s var(--ease-out);
}

@keyframes ticket-shake {
  0% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-2deg);
  }
  50% {
    transform: rotate(2deg);
  }
  100% {
    transform: rotate(0deg);
  }
}
