:root{
  --bg:#06080b;
  --bg-soft:#12161c;
  --panel:#10141a;
  --panel-strong:#181d24;
  --line:rgba(255,255,255,.1);
  --text:#f5f7fb;
  --muted:#adb5c2;
  --accent:#ff7a18;
  --accent-soft:rgba(255,122,24,.16);
  --accent-strong:#ff8d38;
  --shadow:0 28px 80px rgba(0,0,0,.45);
}

*{box-sizing:border-box;}

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

body{
  margin:0;
  color:var(--text);
  background:
    radial-gradient(900px 560px at 50% -12%, rgba(255,122,24,.16), transparent 60%),
    radial-gradient(700px 420px at 50% 120%, rgba(255,255,255,.05), transparent 60%),
    linear-gradient(180deg, #0a0d12 0%, #06080b 100%);
  font-family:"Segoe UI Variable","Segoe UI","Pretendard Variable","Pretendard","Apple SD Gothic Neo","Noto Sans KR",system-ui,sans-serif;
}

button,
input{
  font:inherit;
}

.page{
  min-height:100dvh;
}

.hero{
  min-height:100dvh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px 16px;
}

.shell{
  width:min(100%, 560px);
}

.brand{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin-bottom:18px;
}

.brand__logo{
  width:44px;
  height:44px;
  border-radius:14px;
  display:block;
  box-shadow:0 18px 36px rgba(0,0,0,.34);
}

.brand__name{
  font-size:clamp(28px, 4vw, 34px);
  line-height:1;
  font-weight:900;
  letter-spacing:-.06em;
}

.panel{
  padding:24px;
  border-radius:28px;
  border:1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.018)),
    linear-gradient(180deg, rgba(255,122,24,.04), transparent 28%);
  box-shadow:var(--shadow);
  backdrop-filter:blur(14px);
}

.lead{
  margin:0 0 18px;
  font-size:15px;
  line-height:1.55;
  color:rgba(255,255,255,.92);
  text-align:center;
  text-wrap:balance;
}

.form{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:10px;
}

.input{
  min-width:0;
  height:52px;
  padding:0 16px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.28);
  color:var(--text);
  outline:none;
  transition:border-color .18s ease, box-shadow .18s ease;
}

.input:focus{
  border-color:rgba(255,141,56,.72);
  box-shadow:0 0 0 4px rgba(255,122,24,.12);
}

.input::placeholder{
  color:rgba(255,255,255,.42);
}

.btn{
  appearance:none;
  min-height:52px;
  padding:0 18px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.05);
  color:var(--text);
  cursor:pointer;
  font-weight:900;
  letter-spacing:-.02em;
  transition:transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.btn:hover{
  transform:translateY(-1px);
  border-color:rgba(255,255,255,.2);
}

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

.btn--primary{
  border-color:rgba(255,141,56,.6);
  background:linear-gradient(180deg, var(--accent-strong), var(--accent));
  color:#120b05;
  box-shadow:0 18px 36px rgba(255,122,24,.24);
}

.btn--ghost{
  background:rgba(255,255,255,.035);
}

.conversion,
.result{
  margin-top:16px;
  padding:16px;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
}

.conversion.hidden,
.result.hidden{
  display:none;
}

.conversion__status{
  min-height:22px;
  font-size:14px;
  font-weight:900;
  letter-spacing:-.02em;
}

.conversion__status.is-error{
  color:#ffb7b7;
}

.conversion__status.is-ok{
  color:#ffd0ab;
}

.conversion__tip{
  margin-top:14px;
  font-size:15px;
  line-height:1.45;
  color:rgba(255,255,255,.92);
}

.preview{
  aspect-ratio:1 / 1;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(45deg, rgba(255,255,255,.05) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.05) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.05) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.05) 75%),
    rgba(0,0,0,.22);
  background-size:24px 24px;
  background-position:0 0, 0 12px, 12px -12px, -12px 0;
}

.preview img{
  display:block;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}

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

.story{
  padding:0 16px 56px;
  opacity:0;
  transform:translateY(56px);
  transition:opacity .7s ease, transform .7s ease;
}

.story.is-visible{
  opacity:1;
  transform:translateY(0);
}

.story__card{
  width:min(100%, 760px);
  margin:0 auto;
  padding:24px;
  border-radius:28px;
  border:1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.032), rgba(255,255,255,.016)),
    linear-gradient(180deg, rgba(255,122,24,.035), transparent 34%);
  box-shadow:var(--shadow);
}

.story__text{
  margin:0;
  color:rgba(255,255,255,.9);
  font-size:15px;
  line-height:1.8;
  text-wrap:pretty;
}

.story__text + .story__text{
  margin-top:18px;
}

@media (max-width: 640px){
  .hero{
    padding:18px 12px;
  }

  .panel{
    padding:18px;
    border-radius:24px;
  }

  .form{
    grid-template-columns:1fr;
  }

  .result__actions{
    grid-template-columns:1fr;
    display:grid;
  }

  .story{
    padding:0 12px 40px;
  }

  .story__card{
    padding:18px;
    border-radius:24px;
  }
}
