/* ============ AI 고해성사청 — 기묘한 SF 고딕 + 몽환의 미래 ============ */

:root {
  --ink: #232950;            /* 본문 텍스트: 짙은 남색 */
  --ink-soft: #4a5180;
  --gold: #c9a14d;           /* 부드러운 금색 강조 */
  --teal: #3fbfb2;           /* 청록 발광 */
  --teal-glow: rgba(125, 227, 216, 0.55);
  --lavender: #b89bff;
  --violet-deep: #3a3470;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.75);
  --radius: 18px;
  --font-display: "Orbit", "Noto Sans KR", sans-serif;
  --font-serif: "Hahmlet", serif;
  font-size: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans KR", sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background: linear-gradient(160deg, #cfd6ff 0%, #e3d4ff 30%, #d2f1ec 70%, #cfe6ff 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  word-break: keep-all;
}

/* ============ 배경: 오로라 + 그리드 + 부유 구체 ============ */
.aurora {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 20% 15%, rgba(184, 155, 255, 0.45), transparent 70%),
    radial-gradient(ellipse 50% 35% at 85% 25%, rgba(125, 227, 216, 0.4), transparent 70%),
    radial-gradient(ellipse 70% 45% at 50% 95%, rgba(233, 200, 120, 0.22), transparent 70%);
  animation: aurora-drift 18s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
  from { transform: translateY(0) scale(1); }
  to   { transform: translateY(-30px) scale(1.06); }
}
.grid-overlay {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; opacity: 0.35;
  background-image:
    linear-gradient(rgba(255,255,255,0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
}
.orbs { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
  animation: float 14s ease-in-out infinite alternate;
}
.orb.o1 { width: 14px; height: 14px; top: 18%; left: 8%;  background: radial-gradient(circle, #fff, #7de3d8); animation-duration: 11s; }
.orb.o2 { width: 8px;  height: 8px;  top: 32%; left: 84%; background: radial-gradient(circle, #fff, #b89bff); animation-duration: 16s; }
.orb.o3 { width: 20px; height: 20px; top: 64%; left: 12%; background: radial-gradient(circle, #fff, #e9c878); animation-duration: 13s; opacity: 0.4; }
.orb.o4 { width: 10px; height: 10px; top: 76%; left: 78%; background: radial-gradient(circle, #fff, #7de3d8); animation-duration: 18s; }
.orb.o5 { width: 6px;  height: 6px;  top: 48%; left: 50%; background: radial-gradient(circle, #fff, #b89bff); animation-duration: 9s; }
@keyframes float {
  from { transform: translateY(0) translateX(0); }
  to   { transform: translateY(-60px) translateX(24px); }
}

/* ============ 포고령 티커 ============ */
.ticker {
  position: sticky; top: 0; z-index: 50;
  overflow: hidden;
  background: rgba(58, 52, 112, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(201, 161, 77, 0.5);
  padding: 7px 0;
}
.ticker-track {
  display: inline-flex;
  gap: 64px;
  white-space: nowrap;
  animation: ticker-scroll 55s linear infinite;
  font-family: "Share Tech Mono", "Noto Sans KR", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: #e9d9a8;
}
.ticker-track span::before {
  content: "◈ ";
  color: var(--teal);
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============ 히어로 ============ */
.hero {
  --px: 0;
  --py: 0;
  min-height: calc(100vh - 34px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 20px 32px;
  position: relative;
  overflow: hidden;
}

/* FX 캔버스 레이어 */
#fx-bg, #fx-glyphs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#fx-bg {
  z-index: -1;
  /* 아래 섹션의 그라데이션 배경과 자연스럽게 합성 */
  mask-image: linear-gradient(180deg, black 78%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, black 78%, transparent 100%);
}
#fx-glyphs { z-index: 0; }

/* 시네마틱 카메라 드리프트 + 패럴랙스 */
.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate3d(calc(var(--px) * -14px), calc(var(--py) * -10px), 0);
  animation: camera-drift 26s ease-in-out infinite alternate;
}
@keyframes camera-drift {
  from { scale: 1; }
  to   { scale: 1.035; }
}
body.fx:not(.hero-live) .hero-inner > * { opacity: 0; }
.hero-live .hero-inner > * {
  animation: hero-rise 1.1s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.hero-live .hero-inner > :nth-child(1) { animation-delay: 0.05s; }
.hero-live .hero-inner > :nth-child(2) { animation-delay: 0.25s; }
.hero-live .hero-inner > :nth-child(3) { animation-delay: 0.35s; }
.hero-live .hero-inner > :nth-child(4) { animation-delay: 0.5s; }
.hero-live .hero-inner > :nth-child(5) { animation-delay: 1.5s; }
.hero-live .hero-inner > :nth-child(6) { animation-delay: 1.9s; }
.hero-live .hero-inner > :nth-child(7) { animation-delay: 2.3s; }
.hero-live .hero-inner > :nth-child(8) { animation-delay: 2.5s; }
.hero-live .hero-inner > :nth-child(9) { animation-delay: 2.8s; }
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(30px); filter: blur(10px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* 타이틀 디코드 글자 */
.tchar { display: inline-block; }
.tchar:not(.settled) {
  opacity: 0.5;
  filter: blur(1px);
}
.tchar.settled {
  animation: char-land 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes char-land {
  0%   { transform: scale(1.4); filter: blur(4px); text-shadow: 0 0 40px rgba(184, 155, 255, 1); }
  100% { transform: scale(1); filter: none; }
}

/* ============ 부팅 시퀀스 오버레이 ============ */
#boot-overlay { display: none; }
body.fx #boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 90% 70% at 50% 40%, rgba(74, 64, 140, 0.97), rgba(28, 24, 58, 0.99)),
    #1c183a;
  cursor: pointer;
  transition: opacity 0.7s ease, filter 0.7s ease;
}
#boot-overlay::after {
  /* CRT 주사선 */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(125, 227, 216, 0.035) 3px 4px);
}
#boot-overlay.boot-done {
  opacity: 0;
  filter: blur(8px);
  pointer-events: none;
}
.boot-frame {
  width: min(520px, calc(100vw - 48px));
  font-family: "Share Tech Mono", "Noto Sans KR", monospace;
}
.boot-head {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: rgba(125, 227, 216, 0.75);
  border-bottom: 1px solid rgba(125, 227, 216, 0.35);
  padding-bottom: 10px;
  margin-bottom: 18px;
}
.boot-lines { min-height: 150px; }
.boot-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.86rem;
  color: #cfd2f5;
  padding: 4px 0;
  text-shadow: 0 0 10px rgba(125, 227, 216, 0.35);
}
.boot-dots {
  flex: 1;
  border-bottom: 1px dotted rgba(207, 210, 245, 0.3);
}
.boot-status { color: #e9c878; white-space: nowrap; }
.boot-row.boot-ok .boot-status { animation: status-pop 0.25s ease; }
@keyframes status-pop {
  from { opacity: 0; transform: translateX(6px); }
  to   { opacity: 1; transform: none; }
}
.boot-skip {
  margin-top: 22px;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: rgba(207, 210, 245, 0.45);
  animation: flicker 3s ease-in-out infinite;
}

/* 후광 링 — 텍스트보다 깊은 층처럼 반대 방향 패럴랙스 */
.halo {
  position: relative; width: 220px; height: 220px; margin-bottom: 10px;
  translate: calc(var(--px) * 18px) calc(var(--py) * 14px);
}
.hero-quote, .hero-micro {
  translate: calc(var(--px) * -8px) calc(var(--py) * -6px);
}
.halo .emblem {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.halo .emblem svg {
  filter: drop-shadow(0 0 18px var(--teal-glow));
  animation: emblem-breathe 5s ease-in-out infinite;
}
@keyframes emblem-breathe {
  0%, 100% { filter: drop-shadow(0 0 14px var(--teal-glow)); }
  50%      { filter: drop-shadow(0 0 30px rgba(184, 155, 255, 0.8)); }
}
.halo-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(184, 155, 255, 0.5);
}
.halo-ring.r1 {
  inset: -8px;
  border-style: dashed;
  animation: spin-slow 40s linear infinite;
}
.halo-ring.r2 {
  inset: -28px;
  border-color: rgba(125, 227, 216, 0.4);
  border-width: 1px;
  animation: spin-slow 60s linear infinite reverse;
}
.halo-ring.r2::before {
  content: "";
  position: absolute; top: -4px; left: 50%;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}
.halo-ring.r3 {
  inset: -52px;
  border-color: rgba(233, 200, 120, 0.3);
  border-style: dotted;
  animation: spin-slow 90s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

.agency-label {
  letter-spacing: 0.5em;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 14px;
}
.site-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 10vw, 4.8rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  background: linear-gradient(120deg, #5a4fb8, #3fbfb2 55%, #c9a14d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 6px 0 2px;
  animation: title-shimmer 7s ease-in-out infinite;
  background-size: 200% 100%;
  filter: drop-shadow(0 3px 22px rgba(58, 52, 112, 0.4));
}
@keyframes title-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.agency-year {
  font-family: "Share Tech Mono", monospace;
  color: var(--gold);
  letter-spacing: 0.3em;
  font-size: 0.95rem;
}
.hero-lede {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  line-height: 1.8;
  margin-top: 34px;
  color: var(--violet-deep);
}
.hero-quote {
  margin-top: 26px;
  max-width: 480px;
}
.hero-quote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--ink-soft);
  min-height: 3em;
  transition: opacity 0.5s ease;
}
.hero-quote p.fading { opacity: 0; }
.hero-quote cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--ink-soft);
  opacity: 0.8;
}

.btn-cta {
  display: inline-block;
  margin-top: 34px;
  padding: 16px 44px;
  border-radius: 14px;
  background: linear-gradient(120deg, #5a4fb8, #3fbfb2);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.18em;
  box-shadow: 0 4px 26px rgba(90, 79, 184, 0.45), 0 0 0 1px rgba(255,255,255,0.3) inset;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  animation: cta-pulse 3.5s ease-in-out infinite;
}
.btn-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 34px rgba(63, 191, 178, 0.55);
}
@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 4px 26px rgba(90, 79, 184, 0.45); }
  50%      { box-shadow: 0 4px 32px rgba(125, 227, 216, 0.65); }
}
.hero-micro {
  margin-top: 16px;
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
}
.scroll-hint {
  margin-top: 36px;
  color: var(--ink-soft);
  font-size: 1.1rem;
  animation: hint-bob 2s ease-in-out infinite;
  opacity: 0.7;
}
@keyframes hint-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

/* ============ 섹션 공통 ============ */
main {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 16px 40px;
}
.section-code {
  text-align: center;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.35em;
  color: var(--gold);
  margin-bottom: 10px;
}
.section-title {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  letter-spacing: 0.14em;
  color: var(--violet-deep);
  margin-bottom: 30px;
}

/* 스크롤 등장 */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============ 세계관 ============ */
.lore { padding: 70px 8px 30px; }
.lore-intro {
  max-width: 600px;
  margin: 0 auto 50px;
  text-align: center;
  font-family: var(--font-serif);
  line-height: 2.05;
  font-size: 0.98rem;
  color: var(--ink);
}
.lore-intro p + p { margin-top: 18px; }
.lore-intro em { color: #5a4fb8; }
.lore-emphasis {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--violet-deep);
  text-shadow: 0 0 18px rgba(184, 155, 255, 0.6);
}

/* 연표 */
.timeline {
  list-style: none;
  max-width: 580px;
  margin: 0 auto;
  position: relative;
  padding-left: 24px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 3px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, var(--teal), var(--lavender), var(--gold));
  box-shadow: 0 0 8px var(--teal-glow);
}
.timeline li {
  position: relative;
  padding: 0 0 34px 18px;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -25px; top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--teal);
  box-shadow: 0 0 10px var(--teal-glow);
}
.tl-year {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.92rem;
  color: var(--gold);
  letter-spacing: 0.2em;
}
.tl-body h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.08rem;
  color: var(--violet-deep);
  margin: 4px 0 6px;
  letter-spacing: 0.06em;
}
.tl-body p {
  font-size: 0.9rem;
  line-height: 1.85;
  color: var(--ink-soft);
}

/* ============ 통계 ============ */
.stats { padding: 60px 8px 30px; text-align: center; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 26px;
}
.stat {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  padding: 22px 10px 18px;
  box-shadow: 0 6px 24px rgba(90, 79, 184, 0.14);
}
.stat-num {
  display: block;
  font-family: "Share Tech Mono", monospace;
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  color: #5a4fb8;
  text-shadow: 0 0 14px rgba(184, 155, 255, 0.5);
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}
.stat-label {
  font-size: 0.76rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.stats-note {
  margin-top: 18px;
  font-size: 0.76rem;
  color: var(--ink-soft);
  font-style: italic;
  opacity: 0.85;
}

/* ============ 죄목 카드 ============ */
.crimes { padding: 60px 8px 40px; }
.crime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.crime-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  padding: 22px 20px;
  box-shadow: 0 6px 24px rgba(90, 79, 184, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.crime-card:hover {
  transform: translateY(-4px) rotate(-0.4deg);
  box-shadow: 0 10px 32px rgba(125, 227, 216, 0.4);
}
.crime-law {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  display: block;
  margin-bottom: 8px;
}
.crime-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.12rem;
  color: var(--violet-deep);
  margin-bottom: 10px;
  letter-spacing: 0.06em;
}
.crime-card p {
  font-size: 0.86rem;
  line-height: 1.85;
  color: var(--ink-soft);
}
.crimes-note {
  text-align: center;
  margin-top: 26px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* ============ 판례 보관소 ============ */
.archive { padding: 60px 8px 30px; }
.archive-sub {
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: -16px 0 26px;
}
.worst-today {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 640px;
  margin: 0 auto 20px;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(224, 123, 90, 0.14), rgba(233, 200, 120, 0.18));
  border: 1px solid rgba(224, 123, 90, 0.4);
  box-shadow: 0 0 16px rgba(224, 123, 90, 0.25);
}
.worst-label {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: #b3471f;
  white-space: nowrap;
}
.worst-today a {
  color: var(--ink);
  font-size: 0.88rem;
  text-decoration: none;
  border-bottom: 1px dotted rgba(74, 81, 128, 0.5);
}
.worst-today a:hover { color: #b3471f; }
.archive-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  max-width: 640px;
  margin: 0 auto;
}
.case-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  padding: 16px 18px;
  box-shadow: 0 5px 20px rgba(90, 79, 184, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.case-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 28px rgba(125, 227, 216, 0.35);
}
.case-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.case-cat {
  font-weight: 700;
  font-size: 0.86rem;
  color: #5a4fb8;
}
.case-sev {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.76rem;
  white-space: nowrap;
  color: var(--ink-soft);
}
.case-sev.hot { color: #b3471f; }
.case-excerpt {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.case-sentence {
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 700;
}
.case-meta {
  margin-top: 8px;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.68rem;
  color: var(--ink-soft);
  opacity: 0.75;
}
.archive-empty {
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink-soft);
  padding: 30px 0;
}
.archive-more {
  display: block;
  margin: 22px auto 0;
  padding: 10px 28px;
}

/* 보관 동의 체크박스 */
.archive-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1.6;
}
.archive-consent input {
  margin-top: 3px;
  accent-color: #5a4fb8;
}
.archive-consent em {
  font-style: normal;
  opacity: 0.7;
  font-size: 0.74rem;
}

/* ============ 패널 공통 (glassmorphism) ============ */
.glass-panel {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 8px 40px rgba(90, 79, 184, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  padding: 26px 24px 30px;
  max-width: 640px;
  margin: 0 auto;
}
.intake { margin-top: 40px; scroll-margin-top: 60px; }
.panel-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.78rem;
  color: var(--ink-soft);
  border-bottom: 1px dashed rgba(74, 81, 128, 0.35);
  padding-bottom: 10px;
  margin-bottom: 18px;
}
.receipt-no strong { color: var(--gold); }
.panel-title {
  font-family: var(--font-display);
  font-weight: 400;
  text-align: center;
  font-size: 1.45rem;
  letter-spacing: 0.2em;
  color: var(--violet-deep);
  margin-bottom: 10px;
}
.panel-sub {
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.84rem;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

/* ============ 탭 ============ */
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab {
  flex: 1;
  padding: 10px 0;
  border: 1px solid rgba(74, 81, 128, 0.25);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.35);
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab.active {
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  border-color: var(--teal);
  box-shadow: 0 0 12px var(--teal-glow);
  font-weight: 700;
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ============ 입력 ============ */
textarea {
  width: 100%;
  border: 1px solid rgba(74, 81, 128, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  padding: 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  resize: vertical;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(63, 191, 178, 0.25);
}
#confession-text-extra { margin-top: 10px; }

.dropzone {
  border: 2px dashed rgba(74, 81, 128, 0.4);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding: 28px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--teal);
  box-shadow: 0 0 18px var(--teal-glow);
  background: rgba(255, 255, 255, 0.6);
}
.dz-icon { font-size: 2rem; color: var(--teal); }
.dz-sub { font-size: 0.8rem; color: var(--ink-soft); margin-top: 4px; }
#dropzone-preview img {
  max-width: 100%;
  max-height: 240px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.btn-ghost {
  margin-top: 10px;
  background: none;
  border: 1px solid rgba(74, 81, 128, 0.35);
  border-radius: 8px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ============ 죄목 칩 ============ */
.category-field { border: none; margin: 18px 0 4px; }
.category-field legend {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid rgba(74, 81, 128, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip.selected {
  background: linear-gradient(120deg, rgba(125,227,216,0.5), rgba(184,155,255,0.5));
  border-color: var(--teal);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 0 10px var(--teal-glow);
}

/* ============ 버튼 ============ */
.btn-primary {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 14px 0;
  border: none;
  border-radius: 12px;
  background: linear-gradient(120deg, #5a4fb8, #3fbfb2);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(90, 79, 184, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(63, 191, 178, 0.5);
}
.btn-primary:disabled { opacity: 0.6; cursor: wait; transform: none; }

.microcopy {
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 12px;
  letter-spacing: 0.05em;
}
.form-error {
  text-align: center;
  margin-top: 12px;
  color: #b3471f;
  font-size: 0.88rem;
}

/* ============ 로딩 ============ */
.loading-panel { text-align: center; padding: 48px 24px; margin-top: 40px; }
.scanner {
  position: relative;
  width: 110px; height: 110px;
  margin: 0 auto 26px;
}
.scan-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--teal);
  border-top-color: transparent;
  border-left-color: var(--lavender);
  animation: spin 1.4s linear infinite;
  box-shadow: 0 0 24px var(--teal-glow);
}
.scan-line {
  position: absolute; left: 12%; right: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  animation: scan 1.8s ease-in-out infinite;
  box-shadow: 0 0 10px var(--teal-glow);
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scan {
  0%, 100% { top: 18%; opacity: 0.4; }
  50% { top: 78%; opacity: 1; }
}
.loading-message {
  font-family: "Share Tech Mono", "Noto Sans KR", monospace;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  animation: flicker 2s ease-in-out infinite;
}
@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  94% { opacity: 0.4; }
  96% { opacity: 1; }
}
.loading-sub {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--ink-soft);
  letter-spacing: 0.15em;
}

/* ============ 판결 결과 ============ */
.result-panel { animation: materialize 0.6s ease; margin-top: 40px; }
@keyframes materialize {
  from { opacity: 0; transform: translateY(16px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}
.result-issuer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin: -2px 0 20px;
  letter-spacing: 0.08em;
}
.verdict-body { border-top: 2px solid var(--ink); }
.verdict-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(74, 81, 128, 0.25);
}
.verdict-row dt {
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--ink-soft);
  font-size: 0.9rem;
  padding-top: 2px;
}
.verdict-row dd { font-size: 0.95rem; line-height: 1.65; }
#result-category { font-weight: 700; color: #5a4fb8; }
.sentence-text { font-weight: 700; color: var(--gold); font-size: 1.05rem; }

.severity-gauge { display: flex; gap: 4px; margin-bottom: 6px; }
.severity-gauge .seg {
  width: 18px; height: 14px;
  border-radius: 3px;
  background: rgba(74, 81, 128, 0.15);
  border: 1px solid rgba(74, 81, 128, 0.2);
}
.severity-gauge .seg.on {
  background: linear-gradient(180deg, #7de3d8, #e9c878 140%);
  border-color: var(--teal);
  box-shadow: 0 0 8px var(--teal-glow);
}
.severity-gauge .seg.on.hot {
  background: linear-gradient(180deg, #e9c878, #e07b5a);
  border-color: #e07b5a;
  box-shadow: 0 0 8px rgba(224, 123, 90, 0.6);
}
.severity-label {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.stamp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}
.mercy-note {
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.7;
}
.stamp { flex-shrink: 0; transform: rotate(-8deg); opacity: 0.9; }

.share-row { display: flex; gap: 10px; margin-top: 24px; }
.btn-share {
  flex: 1;
  padding: 11px 0;
  border: 1px solid rgba(74, 81, 128, 0.3);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-share:hover {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(233, 200, 120, 0.5);
}

/* ============ 푸터 ============ */
.site-footer {
  text-align: center;
  font-size: 0.74rem;
  color: var(--ink-soft);
  line-height: 1.9;
  padding: 38px 16px 44px;
  opacity: 0.9;
}
.footer-motto {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--violet-deep);
  margin-bottom: 16px;
  letter-spacing: 0.06em;
}

/* ============ 가상 시민 등급 인증서 발급소 ============ */
.shop { padding: 60px 8px 50px; }
.shop-sub {
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.95;
  color: var(--ink-soft);
  max-width: 540px;
  margin: -16px auto 14px;
}
.shop-disclaimer {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 32px;
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(224,123,90,0.07);
  border: 1px solid rgba(224,123,90,0.28);
  font-size: 0.75rem;
  color: #b3471f;
  letter-spacing: 0.03em;
  line-height: 1.7;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.rank-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  padding: 24px 18px 20px;
  text-align: center;
  box-shadow: 0 6px 24px rgba(90,79,184,0.13);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rank-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(90,79,184,0.22);
}
.rank-card.tier-1 { border-color: rgba(63,191,178,0.45); }
.rank-card.tier-2 { border-color: rgba(90,79,184,0.45); }
.rank-card.tier-3 {
  border-color: rgba(201,161,77,0.55);
  background: linear-gradient(180deg, rgba(255,255,255,0.62) 0%, rgba(233,200,120,0.1) 100%);
}
.rank-card.tier-4 {
  border-color: rgba(201,161,77,0.75);
  background: linear-gradient(160deg, rgba(255,255,255,0.58) 0%, rgba(233,200,120,0.18) 50%, rgba(184,155,255,0.12) 100%);
  box-shadow: 0 6px 28px rgba(201,161,77,0.18), 0 6px 24px rgba(90,79,184,0.12);
}

.popular-tag {
  position: absolute;
  top: 12px; right: 12px;
  background: linear-gradient(120deg, #e07b5a, #e9c878);
  color: #fff;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  padding: 2px 9px;
  border-radius: 999px;
}
.rank-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
  border: 1px solid currentColor;
}
.tier-1 .rank-badge { color: var(--teal); background: rgba(63,191,178,0.1); }
.tier-2 .rank-badge { color: #5a4fb8; background: rgba(90,79,184,0.1); }
.tier-3 .rank-badge { color: var(--gold); background: rgba(201,161,77,0.12); }
.tier-4 .rank-badge {
  color: #8b6f20;
  background: linear-gradient(120deg, rgba(233,200,120,0.22), rgba(184,155,255,0.18));
  border-color: rgba(201,161,77,0.65);
}
.rank-class {
  font-family: "Share Tech Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  color: var(--ink-soft);
  margin-bottom: 12px;
  opacity: 0.8;
}
.rank-desc {
  font-family: var(--font-serif);
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 14px;
  min-height: 52px;
}
.rank-perks {
  list-style: none;
  text-align: left;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  flex: 1;
}
.rank-perks li {
  padding: 3px 0 3px 18px;
  position: relative;
  line-height: 1.6;
}
.rank-perks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--teal);
  font-weight: 700;
}
.rank-price {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: 0.06em;
  color: var(--violet-deep);
  margin-bottom: 14px;
  font-weight: 400;
}
.tier-3 .rank-price { color: #7a5a10; }
.tier-4 .rank-price { color: #7a5a10; }

.btn-rank {
  display: block;
  width: 100%;
  padding: 11px 0;
  border: none;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tier-1 .btn-rank {
  background: linear-gradient(120deg, #3fbfb2, #5a4fb8);
  color: #fff;
  box-shadow: 0 3px 14px rgba(63,191,178,0.32);
}
.tier-2 .btn-rank {
  background: linear-gradient(120deg, #5a4fb8, #3fbfb2);
  color: #fff;
  box-shadow: 0 3px 14px rgba(90,79,184,0.32);
}
.tier-3 .btn-rank {
  background: linear-gradient(120deg, #c9a14d, #e9c878);
  color: #3a2e00;
  box-shadow: 0 3px 14px rgba(201,161,77,0.38);
}
.tier-4 .btn-rank {
  background: linear-gradient(120deg, #8b6f20, #c9a14d 50%, #b89bff);
  color: #fff;
  box-shadow: 0 3px 18px rgba(201,161,77,0.38), 0 3px 18px rgba(184,155,255,0.28);
}
.btn-rank:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

/* 면죄부 발급 버튼 */
.btn-indulgence {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 12px 0;
  border: 1px solid rgba(201,161,77,0.5);
  border-radius: 12px;
  background: linear-gradient(120deg, rgba(201,161,77,0.1), rgba(184,155,255,0.1));
  font-family: var(--font-display);
  font-size: 0.92rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-indulgence:hover {
  background: linear-gradient(120deg, rgba(201,161,77,0.2), rgba(184,155,255,0.2));
  box-shadow: 0 0 18px rgba(201,161,77,0.28);
  border-color: rgba(201,161,77,0.75);
}

/* ============ 결제 모달 ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(20,18,50,0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal-box {
  position: relative;
  max-width: 400px;
  width: 100%;
  text-align: center;
  animation: materialize 0.4s ease;
}
.modal-close {
  position: absolute;
  top: 12px; right: 14px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--ink-soft);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}
.modal-close:hover { color: var(--ink); }
.modal-price {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--violet-deep);
  margin: -8px 0 14px;
}
.modal-body {
  font-size: 0.86rem;
  line-height: 1.9;
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.btn-donate-modal { text-decoration: none; }

/* ============ 후원 버튼 / 푸터 링크 ============ */
.btn-donate {
  display: inline-block;
  margin-top: 14px;
  padding: 9px 26px;
  border-radius: 10px;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(201,161,77,0.5);
  color: var(--gold);
  font-size: 0.84rem;
  text-decoration: none;
  letter-spacing: 0.06em;
  backdrop-filter: blur(6px);
  transition: all 0.15s ease;
}
.btn-donate:hover {
  background: rgba(201,161,77,0.12);
  box-shadow: 0 0 14px rgba(201,161,77,0.25);
  border-color: rgba(201,161,77,0.75);
}
.footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.76rem;
  border-bottom: 1px dotted rgba(74,81,128,0.4);
  padding-bottom: 1px;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--ink); }
.footer-copy {
  margin-top: 16px;
  font-size: 0.72rem;
  color: var(--ink-soft);
  opacity: 0.7;
}

/* ============ 반응형 ============ */
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-num { font-size: 0.92rem; letter-spacing: -0.02em; }
}
@media (max-width: 480px) {
  .glass-panel { padding: 20px 16px 24px; }
  .panel-title { font-size: 1.2rem; letter-spacing: 0.12em; }
  .verdict-row { grid-template-columns: 56px 1fr; }
  .verdict-row dt { letter-spacing: 0.15em; font-size: 0.84rem; }
  .severity-gauge .seg { width: 14px; }
  .share-row { flex-direction: column; }
  .stamp svg { width: 76px; height: 76px; }
  .halo { width: 180px; height: 180px; }
  .halo .emblem svg { width: 92px; height: 92px; }
}

/* 모션 최소화 환경 배려 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
