/* ===== Splash ===== */
.screen-splash {
  background:
    radial-gradient(ellipse 120% 80% at 70% 20%, rgba(232, 200, 90, 0.22), transparent 55%),
    radial-gradient(ellipse 90% 70% at 10% 90%, rgba(47, 111, 106, 0.35), transparent 50%),
    linear-gradient(165deg, #121820 0%, #1c2838 40%, #243044 100%);
  color: #fff;
  justify-content: space-between;
  padding:
    calc(28px + var(--safe-top)) 28px
    calc(28px + var(--safe-bottom));
  overflow: hidden;
}

.splash__sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 28% 42%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 72% 14%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 88% 36%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1px 1px at 48% 22%, rgba(255, 255, 255, 0.45), transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

.splash__top {
  position: relative;
  z-index: 2;
}

.splash__title {
  margin-top: 28px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.85rem, 7vw, 2.35rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.splash__title em {
  font-style: normal;
  color: var(--gold-bright);
}

.splash__lead {
  margin-top: 14px;
  max-width: 18em;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.splash__hero {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.splash__ground {
  position: absolute;
  bottom: 18%;
  left: 10%;
  right: 10%;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.35), transparent 70%);
  filter: blur(4px);
}

.heung-figure {
  width: min(220px, 58vw);
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35));
  animation: floatY 3.2s var(--ease-out) infinite alternate;
  transform-origin: center bottom;
}

@keyframes floatY {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}

.speech-bubble {
  position: absolute;
  top: 12%;
  right: 6%;
  max-width: 148px;
  padding: 12px 14px;
  border-radius: 16px 16px 16px 4px;
  background: #fff;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: var(--shadow-soft);
  animation: bubbleIn 0.7s 0.4s var(--ease-spring) both;
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: scale(0.7) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.splash__cta {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.splash__meta {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ===== Onboarding ===== */
.screen-onboard {
  background: var(--paper);
  padding-bottom: calc(24px + var(--safe-bottom));
}

.onboard__visual {
  position: relative;
  height: 48dvh;
  min-height: 280px;
  overflow: hidden;
  background:
    linear-gradient(180deg, transparent 40%, var(--paper) 100%),
    linear-gradient(145deg, #2a3a4a 0%, #1a2430 60%, #314850 100%);
}

.onboard__visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 70%, rgba(196, 160, 53, 0.2), transparent),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath d='M0 70h80M10 70V40M40 70V25M70 70V45' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  opacity: 0.9;
}

.onboard__slide-art {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 24px;
}

.onboard__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 28px 0;
}

.onboard__step {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold-deep);
  text-transform: uppercase;
}

.onboard__title {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.onboard__desc {
  margin-top: 12px;
  color: var(--stone);
  font-size: 0.95rem;
  line-height: 1.6;
}

.onboard__actions {
  margin-top: auto;
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.onboard__skip {
  text-align: center;
  font-size: 0.875rem;
  color: var(--stone);
  font-weight: 500;
  min-height: 40px;
}

/* Mini jamo row */
.jamo-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 280px;
}

.jamo-chip {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  animation: chipPop 0.5s var(--ease-spring) both;
}

.jamo-chip:nth-child(1) { animation-delay: 0.05s; background: #f7e6a8; }
.jamo-chip:nth-child(2) { animation-delay: 0.12s; background: #c8e6e2; }
.jamo-chip:nth-child(3) { animation-delay: 0.19s; background: #f2cfc7; }
.jamo-chip:nth-child(4) { animation-delay: 0.26s; background: #d5dff0; }
.jamo-chip:nth-child(5) { animation-delay: 0.33s; background: #e5d4f0; }

@keyframes chipPop {
  from {
    opacity: 0;
    transform: scale(0.5) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ===== Home ===== */
.screen-home {
  background: var(--paper);
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom-gap) + 20px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.home__header {
  padding: var(--safe-top-gap) 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.home__logo span {
  color: var(--gold-deep);
}

.demo-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--teal-soft);
  color: var(--teal);
}

.home__hero {
  position: relative;
  margin: 18px 16px 0;
  padding: 28px 24px 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(ellipse 80% 60% at 90% 10%, rgba(232, 200, 90, 0.28), transparent 50%),
    linear-gradient(155deg, #182030 0%, #243448 50%, #1e3a3a 100%);
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.home__hero::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 201, 77, 0.25), transparent 65%);
  pointer-events: none;
}

.home__eyebrow {
  position: relative;
  z-index: 1;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.65);
}

.home__headline {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.home__headline em {
  font-style: normal;
  color: var(--gold-bright);
}

.home__sub {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  max-width: 16em;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.home__mascot {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 132px;
  z-index: 1;
  animation: floatY 3s ease-in-out infinite alternate;
}

.home__cta {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-top: 28px;
  max-width: 200px;
}

.home__section {
  padding: 28px 22px 0;
}

.home__section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.home__section-desc {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--stone);
  line-height: 1.5;
}

.flow-strip {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.flow-strip__item {
  text-align: center;
  padding: 14px 4px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(20, 24, 31, 0.06);
}

.flow-strip__icon {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--gold-deep);
  min-height: 1.2em;
}

.flow-strip__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.stage-note {
  margin: 22px 22px 0;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(196, 160, 53, 0.12), rgba(47, 111, 106, 0.1));
  border: 1px solid rgba(196, 160, 53, 0.22);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.stage-note strong {
  color: var(--gold-deep);
}

.coming-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.coming-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(20, 24, 31, 0.06);
  opacity: 0.72;
}

.coming-item__num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  background: var(--mist);
  color: var(--stone);
}

.coming-item__text {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 600;
}

.coming-item__tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--stone);
}

.demo-tools {
  margin-top: 8px;
  padding-bottom: 8px;
}

.demo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.demo-row__label {
  flex-shrink: 0;
  min-width: 64px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  max-width: 240px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(20, 24, 31, 0.08);
  border: 1px solid rgba(20, 24, 31, 0.08);
  gap: 2px;
}

.seg__btn {
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--stone);
  background: transparent;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.15s;
}

.seg__btn:active {
  transform: scale(0.97);
}

.seg__btn.is-active {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 4px 12px rgba(20, 24, 31, 0.18);
}

.seg__btn.seg__btn--ok.is-active {
  background: linear-gradient(135deg, #3d8b6e, #2f6f6a);
  color: #fff;
}

.seg__btn.seg__btn--off.is-active {
  background: #8a9099;
  color: #fff;
}

.demo-tools__reset {
  width: 100%;
  margin-top: 16px;
  min-height: 42px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(20, 24, 31, 0.12);
  color: var(--stone);
  font-weight: 650;
}

/* 홈 하단 채움 — 다음 할 일 · 미션 */
.home-panel {
  margin-top: 4px;
}

.home-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.home-panel__meta {
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--gold-deep);
}

.home-quick {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.home-quick__card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 14px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(20, 24, 31, 0.08);
  box-shadow: 0 8px 20px rgba(20, 24, 31, 0.04);
  text-align: left;
  transition: transform 0.15s, box-shadow 0.15s;
}

.home-quick__card:active {
  transform: scale(0.985);
}

.home-quick__ico {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-text);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
}

.home-quick__ico--book {
  background: linear-gradient(135deg, #d5ebe8, #2f6f6a);
  color: #fff;
}

.home-quick__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.home-quick__body strong {
  font-size: 0.92rem;
  font-weight: 750;
  color: var(--ink);
}

.home-quick__body em {
  font-style: normal;
  font-size: 0.75rem;
  color: var(--stone);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-missions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.home-mission {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(20, 24, 31, 0.07);
}

.home-mission.is-done {
  background: linear-gradient(90deg, rgba(61, 139, 110, 0.08), #fff 55%);
  border-color: rgba(61, 139, 110, 0.22);
}

.home-mission__title {
  font-size: 0.9rem;
  font-weight: 750;
  color: var(--ink);
}

.home-mission__status {
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--stone);
  align-self: start;
}

.home-mission.is-done .home-mission__status {
  color: var(--ok);
}

.home-mission__jamo {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.home-mission__chip {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  background: var(--mist);
  color: var(--stone);
}

.home-mission__chip.is-have {
  background: rgba(196, 160, 53, 0.18);
  color: var(--gold-deep);
  box-shadow: inset 0 0 0 1px rgba(196, 160, 53, 0.35);
}
