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

:root {
  --sky-top: #4a90d9;
  --sky-mid: #87ceeb;
  --sky-bottom: #b0d9f0;
  --sun-gold: #ffd700;
  --sun-orange: #ffa500;
  --text-dark: #193052;
  --text-soft: #51627f;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(255, 252, 236, 0.94);
  --panel-border: rgba(255, 215, 0, 0.7);
  --primary: #e39a00;
  --primary-dark: #8e5700;
  --secondary: #2a67bf;
  --secondary-dark: #123f80;
  --shadow: 0 18px 48px rgba(12, 40, 84, 0.18);
}

html, body {
  min-height: 100%;
}

body {
  font-family: "Georgia", serif;
  background: var(--sky-mid);
  color: var(--text-dark);
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.sky {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 42%, var(--sky-bottom) 100%);
  z-index: 0;
}

.cloud {
  position: fixed;
  background: white;
  border-radius: 50px;
  opacity: 0.82;
  filter: blur(1px);
  animation: cloudDrift linear infinite;
  z-index: 1;
  pointer-events: none;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: white;
  border-radius: 50%;
}

.cloud-1 { width: 90px; height: 28px; top: 12%; animation-duration: 28s; animation-delay: 0s; left: -120px; }
.cloud-1::before { width: 45px; height: 40px; top: -18px; left: 10px; }
.cloud-1::after { width: 30px; height: 30px; top: -12px; left: 38px; }

.cloud-2 { width: 120px; height: 34px; top: 28%; animation-duration: 36s; animation-delay: -12s; left: -160px; opacity: 0.65; }
.cloud-2::before { width: 55px; height: 50px; top: -22px; left: 15px; }
.cloud-2::after { width: 40px; height: 38px; top: -15px; left: 55px; }

.cloud-3 { width: 70px; height: 22px; top: 55%; animation-duration: 22s; animation-delay: -6s; left: -100px; opacity: 0.7; }
.cloud-3::before { width: 35px; height: 32px; top: -14px; left: 8px; }
.cloud-3::after { width: 25px; height: 24px; top: -10px; left: 30px; }

.cloud-4 { width: 100px; height: 30px; top: 72%; animation-duration: 31s; animation-delay: -20s; left: -140px; opacity: 0.6; }
.cloud-4::before { width: 50px; height: 44px; top: -20px; left: 12px; }
.cloud-4::after { width: 35px; height: 33px; top: -13px; left: 48px; }

@keyframes cloudDrift {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100vw + 200px)); }
}

.plane-wrapper {
  position: fixed;
  z-index: 2;
  pointer-events: none;
  animation: planeFly linear infinite;
}

.plane {
  position: relative;
  font-size: 18px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.trail {
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(to left, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
  animation: trailGrow linear forwards;
}

.plane-wrapper-1 { top: 18%; animation-duration: 22s; animation-delay: 0s; }
.plane-wrapper-1 .trail { width: 80px; animation-duration: 22s; }
.plane-wrapper-2 { top: 40%; animation-duration: 30s; animation-delay: -10s; }
.plane-wrapper-2 .plane { font-size: 13px; opacity: 0.8; }
.plane-wrapper-2 .trail { width: 60px; animation-duration: 30s; }
.plane-wrapper-3 { top: 65%; animation-duration: 18s; animation-delay: -5s; }
.plane-wrapper-3 .plane { font-size: 15px; opacity: 0.75; }
.plane-wrapper-3 .trail { width: 70px; animation-duration: 18s; }

@keyframes planeFly {
  from { left: -60px; }
  to { left: calc(100vw + 60px); }
}

.app-shell {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 16px 32px;
}

.topbar {
  display: flex;
  justify-content: flex-end;
}

.locale-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 4px;
  backdrop-filter: blur(6px);
}

.locale-btn {
  min-width: 48px;
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: white;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.locale-btn.is-active {
  background: rgba(255, 255, 255, 0.9);
  color: var(--secondary-dark);
}

.locale-btn:hover {
  transform: translateY(-1px);
}

.center-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sun-panel {
  width: min(100%, 840px);
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.sun-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.sun-btn {
  position: relative;
  width: 124px;
  height: 124px;
  cursor: pointer;
  transition: transform 0.2s ease;
  animation: sunFloat 4s ease-in-out infinite, sunRotate 20s linear infinite;
  border: none;
  background: none;
  padding: 0;
  outline: none;
}

.sun-btn:hover {
  animation-play-state: paused;
  transform: scale(1.05);
}

.sun-btn:active {
  transform: scale(0.97);
}

@keyframes sunFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes sunRotate {
  from { filter: drop-shadow(0 0 14px #ffd700); }
  50% { filter: drop-shadow(0 0 22px #ffa500); }
  to { filter: drop-shadow(0 0 14px #ffd700); }
}

.sun-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sun-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  text-align: center;
  max-width: 140px;
  line-height: 1.45;
}

.sun-tooltip {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) scale(0.92);
  background: rgba(255, 255, 255, 0.96);
  color: #333;
  font-size: 11px;
  padding: 7px 12px;
  border-radius: 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  border: 1px solid #ffd700;
}

.sun-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #ffd700;
}

.sun-container:hover .sun-tooltip {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.main-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  padding: 24px 24px 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.eyebrow {
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondary-dark);
}

.main-card h1 {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.08;
  margin-bottom: 12px;
}

.lead {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-soft);
}

.status-chip {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  line-height: 1.4;
  background: rgba(74, 144, 217, 0.12);
  color: var(--secondary-dark);
}

.main-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: none;
  border-radius: 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--sun-gold), var(--sun-orange));
  color: var(--primary-dark);
  box-shadow: 0 3px 10px rgba(255, 165, 0, 0.35);
}

.btn-secondary {
  background: linear-gradient(135deg, #4a90d9, #2563eb);
  color: white;
  box-shadow: 0 3px 10px rgba(74, 144, 217, 0.35);
}

.btn-plain {
  background: #f0f3f8;
  color: var(--text-dark);
}

.btn-full {
  width: 100%;
}

.inline-link {
  margin-top: 14px;
  border: none;
  background: none;
  color: var(--secondary-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.inline-link:hover {
  text-decoration: underline;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(30, 80, 160, 0.55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-box {
  position: relative;
  width: min(100%, 390px);
  max-height: min(88vh, 720px);
  overflow: auto;
  background: linear-gradient(145deg, #fffde7, #fff8cc);
  border: 3px solid var(--sun-gold);
  border-radius: 22px;
  padding: 28px 22px 22px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  animation: modalPop 0.24s ease;
}

@keyframes modalPop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: #6f5b13;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-close[hidden] {
  display: none;
}

.modal-icon {
  font-size: 34px;
  margin-bottom: 8px;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #b8860b;
  margin-bottom: 8px;
}

.modal-text {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}

.modal-body {
  margin-top: 18px;
}

.modal-error {
  min-height: 18px;
  margin-top: 12px;
  color: #b42318;
  font-size: 12px;
  line-height: 1.4;
}

.choice-grid {
  display: grid;
  gap: 10px;
}

.choice-btn {
  width: 100%;
  border: 1px solid rgba(186, 134, 11, 0.18);
  border-radius: 16px;
  padding: 14px 14px 12px;
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.choice-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(186, 134, 11, 0.45);
  box-shadow: 0 8px 18px rgba(37, 56, 90, 0.08);
}

.choice-btn strong {
  display: block;
  font-size: 14px;
  color: var(--text-dark);
}

.choice-btn span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-soft);
}

.choice-btn.is-skip {
  border-style: dashed;
}

.choice-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-soft);
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  font-size: 12px;
  font-weight: 700;
  color: #6d5715;
}

.field input,
.field textarea {
  width: 100%;
  border: 2px solid rgba(255, 215, 0, 0.7);
  border-radius: 12px;
  background: white;
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--text-dark);
  outline: none;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: #f4ae00;
  box-shadow: 0 0 0 3px rgba(244, 174, 0, 0.14);
}

.helper {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-soft);
  margin-bottom: 14px;
}

.helper strong {
  color: var(--text-dark);
}

.form-actions,
.stack-actions {
  display: grid;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(227, 154, 0, 0.12);
  color: #7f5200;
  font-size: 12px;
  font-weight: 700;
}

.summary-card {
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 215, 0, 0.45);
}

.summary-card h3 {
  font-size: 13px;
  margin-bottom: 8px;
}

.summary-card p {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.55;
}

.loading-block {
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.loading-block::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  border-radius: 50%;
  border: 2px solid rgba(37, 103, 191, 0.24);
  border-top-color: #2563eb;
  animation: spin 0.9s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 720px) {
  .sun-panel {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .main-card {
    width: min(100%, 560px);
  }

  .status-chip {
    justify-content: center;
  }

  .main-actions {
    justify-content: center;
  }

  .inline-link {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .app-shell {
    padding: 14px 12px 22px;
  }

  .sun-btn {
    width: 100px;
    height: 100px;
  }

  .main-card {
    padding: 20px 18px 18px;
    border-radius: 20px;
  }

  .main-actions,
  .form-actions,
  .stack-actions {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .modal-box {
    width: min(100%, 100vw - 24px);
    padding: 24px 18px 18px;
  }
}
