:root {
  --bg: #0f172a;
  --panel: #111a2f;
  --panel-soft: #16213c;
  --text: #f8fafc;
  --muted: #9fb0ce;
  --brand: #5eead4;
  --brand-2: #38bdf8;
  --warn: #fbbf24;
  --bad: #f87171;
  --ok: #34d399;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans KR", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% 0%, #1d2a4b 0%, transparent 50%),
    radial-gradient(1000px 500px at 90% 100%, #0d5f65 0%, transparent 50%),
    var(--bg);
  overflow-x: hidden;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  z-index: 5;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: var(--text);
  text-decoration: none;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.skip-link:focus {
  left: 12px;
}

.bg-orb {
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.35;
}

.bg-orb-a {
  width: 280px;
  height: 280px;
  background: #2563eb;
  top: -60px;
  left: -40px;
}

.bg-orb-b {
  width: 240px;
  height: 240px;
  background: #14b8a6;
  bottom: -50px;
  right: -40px;
}

.shell {
  max-width: 1040px;
  margin: 0 auto;
  padding: 30px 18px 44px;
}

.hero h1,
h2 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.02em;
}

.hero {
  margin-bottom: 18px;
}

.hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.hero-copy {
  min-width: 0;
}

.h1-sub {
  font-size: 0.58em;
  font-weight: 700;
  color: rgba(159, 176, 206, 0.95);
  letter-spacing: 0.02em;
  margin-left: 6px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2vw + 1rem, 2.5rem);
  text-wrap: balance;
}

.sub {
  margin: 0;
  color: var(--muted);
}

.sub2 {
  margin-top: 8px;
  color: rgba(159, 176, 206, 0.9);
}

.hero-mascot {
  width: 170px;
  height: 170px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.18);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-mascot img {
  width: 150px;
  height: 150px;
  display: block;
  object-fit: contain;
}

.notice {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
  font-size: 0.86rem;
  line-height: 1.45;
}

.hint {
  margin: 2px 0 8px;
  color: rgba(159, 176, 206, 0.95);
  font-size: 0.82rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-soft));
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  color: var(--muted);
  font-size: 0.85rem;
}

input[type="text"],
input[type="url"],
input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #0b1328;
  color: var(--text);
}

input:focus-visible,
textarea:focus-visible,
button:focus-visible,
.download:focus-visible {
  outline: 2px solid rgba(94, 234, 212, 0.8);
  outline-offset: 2px;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.checkline input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand);
  flex: 0 0 auto;
}

.checkline span {
  line-height: 1.3;
}

textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #0b1328;
  color: var(--text);
  resize: vertical;
}

input.disabled {
  opacity: 0.7;
}

button,
.download {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
  touch-action: manipulation;
}

button {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #0b1222;
}

button:hover,
.download:hover {
  transform: translateY(-1px);
}

.ghost {
  background: #0d152b;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.danger {
  border-color: rgba(248, 113, 113, 0.4);
  color: #fecaca;
}

.status-line {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.badge {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  font-family: "Space Grotesk", sans-serif;
}

.badge.neutral {
  background: rgba(148, 163, 184, 0.2);
}

.badge.ok {
  background: rgba(52, 211, 153, 0.2);
  color: #86efac;
}

.badge.warn {
  background: rgba(251, 191, 36, 0.2);
  color: #fcd34d;
}

.badge.bad {
  background: rgba(248, 113, 113, 0.22);
  color: #fca5a5;
}

.download {
  margin-top: 12px;
  display: inline-block;
  background: rgba(56, 189, 248, 0.18);
  color: #bae6fd;
  text-decoration: none;
}

.download.disabled {
  opacity: 0.45;
  pointer-events: none;
}

pre {
  margin: 0;
  max-height: 260px;
  overflow: auto;
  background: #0a1122;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 12px;
  color: #dbeafe;
  font-size: 0.83rem;
}

.prompt {
  white-space: pre-wrap;
  line-height: 1.55;
  color: #e5e7eb;
  max-height: 420px;
}

.ai-actions {
  margin: 10px 0 10px;
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.45s ease forwards;
}

@media (max-width: 760px) {
  .hero-row {
    flex-direction: column-reverse;
    align-items: flex-start;
  }
  .hero-mascot {
    width: 150px;
    height: 150px;
  }
  .hero-mascot img {
    width: 130px;
    height: 130px;
  }
}

.stagger-1 {
  animation-delay: 0.05s;
}

.stagger-2 {
  animation-delay: 0.1s;
}

.stagger-3 {
  animation-delay: 0.15s;
}

.stagger-4 {
  animation-delay: 0.2s;
}

.stagger-5 {
  animation-delay: 0.25s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }
  button:hover,
  .download:hover {
    transform: none;
  }
}

@media (max-width: 840px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .shell {
    padding-top: 20px;
  }
}
