@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@600;700&display=swap");

/* ── Sponsors Footer ── */
.sponsors-footer {
  text-align: center;
  padding: 2.5rem 1rem 3rem;
  margin-top: 1rem;
}

.sponsors-label {
  font-family: "Cormorant Garamond", serif;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}

.sponsors-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.sponsor-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.6rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 18px rgba(73, 60, 27, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sponsor-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(198, 146, 20, 0.22);
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent);
}

:root {
  --bg-1: #f8f0df;
  --bg-2: #f3ecdf;
  --bg-3: #e7efe8;
  --bg-4: #fbf8f0;
  --ink: #1f2a37;
  --ink-soft: #556172;
  --line: rgba(23, 42, 58, 0.12);
  --primary: #0f766e;
  --primary-strong: #115e59;
  --accent: #c69214;
  --focus: #c9a43d;
  --shadow: 0 18px 45px rgba(73, 60, 27, 0.16);
}

html {
  -webkit-text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(132deg, var(--bg-1), var(--bg-2), var(--bg-3), var(--bg-4));
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: contain;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 85% 5%, rgba(198, 146, 20, 0.16), transparent 35%),
    radial-gradient(circle at 12% 84%, rgba(15, 118, 110, 0.13), transparent 40%);
}

.aurora-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  filter: blur(55px) saturate(115%);
}

.aurora {
  position: absolute;
  border-radius: 999px;
  opacity: 0.34;
  animation: drift 18s ease-in-out infinite alternate;
}

.aurora.a1 {
  width: 44vw;
  height: 44vw;
  left: -12vw;
  top: -14vw;
  background: rgba(20, 184, 166, 0.5);
}

.aurora.a2 {
  width: 38vw;
  height: 38vw;
  right: -10vw;
  top: 14vh;
  background: rgba(234, 88, 12, 0.34);
  animation-duration: 23s;
}

.aurora.a3 {
  width: 36vw;
  height: 36vw;
  left: 28vw;
  bottom: -14vw;
  background: rgba(15, 118, 110, 0.33);
  animation-duration: 26s;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 118, 110, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 38%, black 35%, transparent 82%);
}

.topbar {
  width: min(1140px, 93%);
  margin: 22px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(248, 252, 251, 0.72));
  backdrop-filter: blur(13px);
  box-shadow: 0 18px 38px rgba(57, 48, 25, 0.12);
  animation: slideDown 0.6s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, var(--primary), var(--accent));
}

.brand-logo-image {
  object-fit: cover;
  padding: 0;
  box-shadow: 0 10px 24px rgba(128, 98, 26, 0.18);
  background: #fff;
}

.brand h1 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
  line-height: 1;
}

.brand p {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.82rem, 1.1vw, 0.92rem);
}

.auth-actions {
  display: flex;
  gap: 10px;
}

.container {
  width: min(1140px, 93%);
  margin: 20px auto 38px;
  display: grid;
  gap: 16px;
  perspective: 1000px;
}

.card {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.88), rgba(252, 249, 242, 0.82));
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.62);
  padding: 26px;
  animation: reveal 0.6s ease;
  overflow: clip;
}

.intro-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.intro-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(15, 118, 110, 0.08), transparent 32%, rgba(234, 88, 12, 0.08));
}

.intro-card:hover {
  box-shadow: 0 26px 44px rgba(15, 94, 89, 0.24);
}

.shine {
  position: absolute;
  width: 180px;
  height: 180px;
  top: -62px;
  right: -64px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(198, 146, 20, 0.12);
  color: #8f6a11;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.hero-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1.1;
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.01em;
}

.hero-lead {
  font-size: clamp(1rem, 1.55vw, 1.12rem);
  color: #223140;
}

.hero-note {
  margin-top: 10px;
  color: #6f5d36;
  font-weight: 700;
}

.title-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  animation: wordEnter 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.title-word:nth-child(1) {
  animation-delay: 0.08s;
}

.title-word:nth-child(2) {
  animation-delay: 0.2s;
}

.title-word:nth-child(3) {
  animation-delay: 0.32s;
}

.title-word:nth-child(4) {
  animation-delay: 0.44s;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  align-items: start;
}

.hero-panel {
  border-radius: 18px;
  border: 1px solid rgba(198, 146, 20, 0.24);
  background: linear-gradient(155deg, rgba(255, 252, 245, 0.98), rgba(244, 238, 220, 0.92));
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 14px 24px rgba(129, 99, 28, 0.1);
  display: grid;
  gap: 10px;
}

.hero-panel h3 {
  margin-top: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.55rem;
}

.hero-quote {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(198, 146, 20, 0.18);
  background: rgba(255, 255, 255, 0.54);
  color: #695329;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.08rem;
  line-height: 1.35;
}

.hero-panel ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
}

.hero-panel li {
  margin: 7px 0;
}

.hero-illustration {
  margin-top: 4px;
  border-radius: 14px;
  border: 1px solid rgba(198, 146, 20, 0.2);
  background: linear-gradient(145deg, #fffaf0, #f5efe2);
  min-height: 148px;
  position: relative;
  overflow: hidden;
  padding: 8px;
}

.hero-scene {
  width: 100%;
  height: 156px;
  display: block;
}

.draw-line {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: drawLine 2.1s ease forwards;
}

.draw-line.delay {
  animation-delay: 0.55s;
}

.pulse-dot {
  transform-origin: center;
  animation: dotPulse 1.9s ease-in-out infinite;
}

.trust-row {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.trust-row span {
  border-radius: 999px;
  border: 1px solid rgba(198, 146, 20, 0.24);
  background: rgba(198, 146, 20, 0.12);
  color: #7d5f17;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 10px;
}

h2,
h3,
h4 {
  margin: 10px 0;
}

h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
}

p {
  line-height: 1.6;
  text-wrap: pretty;
}

.stats-grid {
  margin-top: 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.stat-card {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.96), rgba(250, 245, 231, 0.9));
  padding: 12px;
  display: grid;
  gap: 3px;
  box-shadow: 0 8px 18px rgba(125, 95, 23, 0.08);
}

.stat-card strong {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  color: #8d6611;
}

.stat-card span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.intro-actions {
  margin-top: 18px;
}

.action-note {
  margin: 12px 0 0;
  color: #6e5a30;
  font-size: 0.92rem;
}

#flowSection,
#resultSection {
  position: relative;
  scroll-margin-top: 78px;
}

#flowSection {
  --flow-accent: var(--primary);
  --flow-soft: rgba(15, 118, 110, 0.14);
}

#flowSection::after,
#resultSection::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 14px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.22), rgba(20, 184, 166, 0));
  pointer-events: none;
}

.step-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid var(--flow-soft);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(238, 249, 247, 0.62));
}

.step-header p {
  margin: 0;
  color: var(--ink-soft);
}

.step-meta {
  min-width: 180px;
  display: grid;
  gap: 6px;
}

.step-meta span {
  color: #355269;
  font-weight: 800;
  font-size: 0.82rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--flow-soft);
  border: 1px solid var(--flow-soft);
}

.progress-bar {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--flow-accent), var(--accent));
  box-shadow: 0 0 12px rgba(15, 118, 110, 0.35);
  transition: width 0.3s ease;
}

.step-pills {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.step-pill {
  border-radius: 999px;
  border: 1px solid var(--flow-soft);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #436074;
  background: rgba(255, 255, 255, 0.62);
  transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.step-pill.active {
  color: #fff;
  background: linear-gradient(115deg, var(--flow-accent), var(--accent));
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(116, 93, 36, 0.24);
}

.step-pill.done {
  color: #0f6f67;
  border-color: rgba(15, 118, 110, 0.3);
  background: rgba(20, 184, 166, 0.12);
}

.grid {
  margin-top: 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.target-switch {
  grid-column: 1 / -1;
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.95), rgba(246, 250, 249, 0.9));
  padding: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.target-chip {
  border: 1px solid rgba(15, 118, 110, 0.26);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #0f5d56;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
}

.target-chip.is-active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(110deg, var(--flow-accent), var(--accent));
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.2);
}

.target-note {
  margin-left: auto;
  font-size: 0.82rem;
  color: #436074;
  font-weight: 700;
}

.option-card {
  border: 1px solid rgba(15, 118, 110, 0.2);
  background: linear-gradient(165deg, #ffffff, #fbf6ea);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  opacity: 0;
  transform: translateY(7px);
  animation: cardIn 0.35s ease forwards;
  animation-delay: calc(var(--i, 0) * 55ms);
}

.option-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(198, 146, 20, 0.12), transparent 45%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.option-card:hover {
  transform: translateY(-2px);
  border-color: var(--flow-accent);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.14);
}

.option-card:hover::before {
  opacity: 1;
}

.option-card:active {
  transform: translateY(0) scale(0.992);
}

.option-card.is-selected {
  border-color: var(--flow-accent);
  box-shadow: 0 14px 24px rgba(121, 94, 23, 0.16);
  background: linear-gradient(150deg, #ffffff, rgba(198, 146, 20, 0.12));
}

.option-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.room-card {
  position: relative;
  min-height: 158px;
  display: grid;
  gap: 10px;
  align-content: start;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(249, 243, 228, 0.92));
}

.grid.room-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.room-card::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
  border-radius: 0 0 13px 13px;
  background: linear-gradient(90deg, var(--flow-accent), var(--accent));
  transform: scaleX(0.18);
  transform-origin: left;
  transition: transform 0.24s ease;
}

.room-card:hover::after {
  transform: scaleX(1);
}

.room-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
}

.room-head h4 {
  margin: 0;
}

.room-badge {
  flex-shrink: 0;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--primary-strong);
  background: rgba(198, 146, 20, 0.14);
  border: 1px solid rgba(198, 146, 20, 0.2);
  border-radius: 999px;
  padding: 4px 8px;
}

.room-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #4c6f69;
}

.room-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.room-topic-chip,
.room-topic-more {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  border-radius: 999px;
  padding: 3px 7px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: rgba(15, 118, 110, 0.08);
  color: #1e5f58;
}

.room-topic-more {
  background: rgba(198, 146, 20, 0.14);
  border-color: rgba(198, 146, 20, 0.24);
  color: #7a5b18;
}

.room-link {
  font-weight: 800;
  color: #0f5d56;
}

.form-block {
  margin-top: 6px;
}

.form-block h4 {
  margin-top: 0;
  font-size: clamp(1.02rem, 1.8vw, 1.2rem);
  line-height: 1.35;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid rgba(15, 118, 110, 0.26);
  padding: 12px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
}

textarea:focus {
  outline: 3px solid rgba(20, 184, 166, 0.2);
  border-color: var(--focus);
}

.form-actions,
.result-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.result-tag {
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  background: rgba(20, 184, 166, 0.1);
  color: #0f4a46;
  font-size: 0.85rem;
  line-height: 1.2;
}

.history-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.history-head h3 {
  margin-top: 0;
  margin-bottom: 6px;
}

.history-head p {
  margin: 0;
  color: var(--ink-soft);
}

.history-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.history-controls {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 10px;
}

.history-controls select,
.history-controls input {
  width: 100%;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
}

.history-controls select:focus,
.history-controls input:focus {
  outline: 3px solid rgba(20, 184, 166, 0.2);
  border-color: var(--focus);
}

.admin-stats {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.history-empty,
.history-card {
  border-radius: 14px;
  border: 1px solid rgba(15, 118, 110, 0.2);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.96), rgba(249, 245, 234, 0.92));
  padding: 14px;
}

.history-empty h4,
.history-card h4 {
  margin-top: 0;
  margin-bottom: 8px;
}

.history-empty p {
  margin-bottom: 12px;
  color: var(--ink-soft);
}

.history-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.history-card-head span {
  color: #5a6f82;
  font-size: 0.84rem;
  font-weight: 700;
}

.history-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.history-comment {
  margin: 10px 0 0;
  color: #415567;
}

.history-details {
  margin-top: 10px;
  border-top: 1px solid rgba(15, 118, 110, 0.16);
  padding-top: 10px;
}

.history-details summary {
  cursor: pointer;
  font-weight: 700;
  color: #0f5d56;
}

.history-details ul {
  margin: 8px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 7px;
}

.history-details li {
  color: #304657;
  font-size: 0.9rem;
  line-height: 1.45;
}

.history-actions {
  margin-top: 12px;
}

.btn {
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
  font-family: "Manrope", sans-serif;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  letter-spacing: 0.01em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(125deg, var(--primary), #0b8178);
}

.btn-primary:hover {
  background: var(--primary-strong);
  box-shadow: 0 10px 20px rgba(15, 94, 89, 0.24);
}

.btn-ghost {
  color: var(--primary-strong);
  border: 1px solid rgba(15, 118, 110, 0.26);
  background: rgba(255, 255, 255, 0.84);
}

.btn-ghost:hover {
  background: rgba(20, 184, 166, 0.08);
}

.btn-cta {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  position: relative;
  overflow: hidden;
  padding: 12px 20px;
  min-height: 48px;
}

.btn-cta::before {
  content: "";
  position: absolute;
  width: 42%;
  height: 300%;
  left: -70%;
  top: -95%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  animation: sweep 3s ease-in-out infinite;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #1e293b;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.hidden {
  display: none;
}

@keyframes drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(3vw, -3vh) scale(1.08);
  }
}

@keyframes sweep {
  0% {
    left: -70%;
  }
  70%,
  100% {
    left: 145%;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wordEnter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes dotPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.25);
    opacity: 0.65;
  }
}

@keyframes cardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .option-card {
    opacity: 1;
    transform: none;
  }
}

@media (hover: none) {
  .intro-card {
    transform: none !important;
  }

  .intro-card:hover {
    box-shadow: var(--shadow);
  }

  .option-card:hover {
    transform: none;
  }
}

@media (max-width: 980px) {
  .topbar,
  .container {
    width: min(1140px, 95%);
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .step-header {
    align-items: flex-start;
  }

  .step-header > .btn {
    margin-left: auto;
  }

  .intro-card {
    transform: none !important;
  }
}

@media (max-width: 760px) {
  body {
    background: linear-gradient(145deg, #f8f0df, #f4ede0, #edf2ea);
  }

  .container > .card {
    position: relative;
  }

  .container > .card + .card {
    margin-top: 6px;
  }

  .container > .card + .card::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 10%;
    width: 80%;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(15, 118, 110, 0.4), rgba(198, 146, 20, 0.32), transparent);
    box-shadow: 0 0 14px rgba(15, 118, 110, 0.18);
    pointer-events: none;
  }

  .topbar {
    margin-top: 14px;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 16px;
    position: sticky;
    top: 10px;
    z-index: 20;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 252, 245, 0.98);
  }

  .brand {
    align-items: flex-start;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .brand h1 {
    font-size: 1rem;
  }

  .auth-actions {
    justify-content: stretch;
    flex-wrap: wrap;
    width: 100%;
  }

  .auth-actions .btn {
    flex: 1 1 140px;
    text-align: center;
  }

  .container {
    margin-top: 14px;
    gap: 18px;
  }

  .card {
    padding: 18px;
    border-radius: 18px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 252, 246, 0.98);
    border: 1px solid rgba(15, 118, 110, 0.18);
    box-shadow: 0 14px 28px rgba(26, 43, 57, 0.12);
  }

  .hero-title {
    font-size: clamp(1.3rem, 7.2vw, 1.85rem);
    gap: 6px;
  }

  .hero-illustration {
    min-height: 132px;
  }

  .hero-scene {
    height: 136px;
  }

  .stats-grid,
  .grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .grid.room-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .target-switch {
    padding: 9px;
  }

  .target-note {
    width: 100%;
    margin-left: 0;
  }

  .grid.room-grid .room-card {
    min-height: 136px;
    padding: 12px;
  }

  .grid.room-grid .room-footer {
    font-size: 0.72rem;
  }

  .stat-card,
  .option-card,
  .room-card {
    border-radius: 12px;
  }

  .step-header {
    padding: 10px;
    gap: 10px;
  }

  .step-header h3 {
    margin-top: 0;
    margin-bottom: 6px;
  }

  .step-meta {
    order: 3;
    width: 100%;
  }

  .step-pills {
    margin-top: 10px;
    gap: 6px;
  }

  .step-pill {
    font-size: 0.75rem;
    padding: 6px 9px;
  }

  .option-card {
    padding: 13px;
  }

  .option-card h4 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 0.98rem;
    line-height: 1.3;
  }

  .option-card p {
    font-size: 0.84rem;
  }

  .step-header > .btn {
    margin-left: 0;
  }

  #flowSection::after,
  #resultSection::after {
    width: 58px;
    height: 58px;
    top: 12px;
    right: 12px;
  }

  .aurora-layer {
    display: none;
  }

  .grid-overlay {
    display: none;
  }

  body.compact-mode .topbar {
    margin-top: 8px;
    padding: 10px;
  }

  body.compact-mode .brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  body.compact-mode .brand h1 {
    font-size: 0.94rem;
  }

  body.compact-mode .brand p {
    font-size: 0.76rem;
  }

  body.compact-mode .container {
    margin-top: 10px;
    gap: 9px;
  }

  body.compact-mode .card {
    padding: 12px;
  }

  body.compact-mode .hero-title {
    font-size: clamp(1.12rem, 5.2vw, 1.45rem);
    gap: 4px;
  }

  body.compact-mode .hero-panel {
    padding: 11px;
    gap: 8px;
  }

  body.compact-mode .hero-illustration {
    min-height: 104px;
  }

  body.compact-mode .hero-scene {
    height: 104px;
  }

  body.compact-mode .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  body.compact-mode .stat-card {
    padding: 8px;
  }

  body.compact-mode .stat-card strong {
    font-size: 1rem;
  }

  body.compact-mode .step-header {
    padding: 8px;
    gap: 8px;
  }

  body.compact-mode .step-pills {
    margin-top: 6px;
    gap: 5px;
  }

  body.compact-mode .step-pill {
    padding: 5px 7px;
    font-size: 0.7rem;
  }

  body.compact-mode .grid.room-grid .room-card {
    min-height: 122px;
    padding: 10px;
  }
}

@media (max-width: 560px) {
  .container {
    margin-top: 14px;
    margin-bottom: 24px;
    gap: 16px;
  }

  .card {
    padding: 14px;
    border-radius: 16px;
    box-shadow: 0 12px 22px rgba(26, 43, 57, 0.1);
  }

  .container > .card + .card::before {
    top: -12px;
    left: 8%;
    width: 84%;
  }

  .topbar {
    position: static;
    top: auto;
    z-index: auto;
    margin-top: 10px;
    padding: 12px;
  }

  #flowSection,
  #resultSection {
    scroll-margin-top: 12px;
  }

  .badge,
  .room-badge,
  .result-tag {
    font-size: 0.75rem;
  }

  .step-pill {
    flex: 1 1 calc(33.333% - 6px);
    text-align: center;
    padding: 7px 6px;
    font-size: 0.74rem;
  }

  .grid.room-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .target-chip {
    flex: 1 1 calc(50% - 8px);
    text-align: center;
  }

  .grid.room-grid .room-card {
    min-height: 118px;
    padding: 10px;
  }

  .grid.room-grid .room-head h4 {
    font-size: 0.88rem;
  }

  .grid.room-grid .room-badge {
    font-size: 0.68rem;
    padding: 3px 6px;
  }

  .grid.room-grid .room-card p {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .grid.room-grid .room-footer {
    font-size: 0.68rem;
  }

  .step-header {
    border-radius: 12px;
    padding: 9px;
  }

  .step-meta {
    min-width: 0;
  }

  .step-meta span {
    font-size: 0.78rem;
  }

  .progress-track {
    height: 7px;
  }

  .room-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .room-footer {
    font-size: 0.75rem;
    gap: 6px;
    flex-wrap: wrap;
  }

  .btn,
  .btn-cta,
  .form-actions .btn,
  .result-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 46px;
  }

  .form-actions,
  .result-actions {
    gap: 8px;
  }

  .toast {
    right: 10px;
    left: 10px;
    bottom: 10px;
    text-align: center;
  }

  .hero-panel ul {
    padding-left: 16px;
  }

  .hero-panel {
    padding: 13px;
  }

  .hero-illustration {
    min-height: 118px;
  }

  .hero-scene {
    height: 122px;
  }

  textarea {
    min-height: 124px;
    padding: 10px;
  }

  .result-tags {
    gap: 6px;
  }

  .result-tag {
    font-size: 0.74rem;
    padding: 6px 9px;
  }

  .history-controls {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .history-card,
  .history-empty {
    padding: 12px;
  }

  .history-card-head span {
    font-size: 0.76rem;
  }

  .history-details li {
    font-size: 0.82rem;
  }

  .page-bg {
    background:
      radial-gradient(circle at 82% 6%, rgba(234, 88, 12, 0.1), transparent 33%),
      radial-gradient(circle at 15% 86%, rgba(20, 184, 166, 0.11), transparent 37%);
  }

  .aurora-layer,
  .grid-overlay {
    display: none;
  }
}

@media (max-width: 400px) {
  .topbar,
  .container {
    width: 96%;
  }

  .brand p {
    font-size: 0.82rem;
  }

  .option-card {
    padding: 12px;
  }

  .trust-row span {
    padding: 5px 8px;
    font-size: 0.74rem;
  }

  .brand {
    gap: 10px;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .step-meta span {
    font-size: 0.76rem;
  }
}
