:root {
  color-scheme: light;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --ink: #173338;
  --muted: #53696a;
  --deep: #112d31;
  --accent: #116450;
  --accent-hover: #104c3e;
  --border: #d9e5df;
  --canvas: #f3f7f5;
  --white: #fff;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
h1, h2, p { margin: 0; }
button, input, select { font: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid #258d74; outline-offset: 4px; }

.masthead { background: var(--deep); color: #e6f4ec; }
.masthead-inner {
  display: flex; align-items: center; gap: 1rem;
  max-width: 68rem; margin: 0 auto; padding: 1rem clamp(1rem, 3.5vw, 2rem);
}
.wordmark { color: #fbfdfa; font-size: 2rem; font-weight: 900; letter-spacing: -.1em; line-height: 1; }
.wordmark span { color: #a9e1b5; }
.masthead-label { border-left: 1px solid #577276; padding-left: 1rem; font-weight: 650; font-size: .84rem; }
.page { width: min(100%, 68rem); margin: 0 auto; padding: clamp(1rem, 4.2vw, 3.25rem) clamp(1rem, 3.5vw, 2rem) 3rem; }

.download-panel {
  display: grid; grid-template-columns: 1fr 1fr;
  overflow: hidden; border: 1px solid var(--border); border-radius: 1.25rem;
  background: var(--white); box-shadow: 0 20px 55px #163e3210;
}
.introduction {
  display: grid; align-content: center; padding: clamp(1.5rem, 4.5vw, 3.6rem);
  color: #f5fff9; background: radial-gradient(ellipse at 99% 95%, #286c61 0, #164045 59%, #112d31 100%);
}
.introduction .platform { color: #bde6d5; font-size: .84rem; font-weight: 730; }
h1 { margin-top: .55rem; font-size: clamp(2.2rem, 4.6vw, 3.75rem); font-weight: 790; letter-spacing: -.065em; line-height: 1.08; }
.introduction h1 + p { max-width: 24rem; margin-top: 1.1rem; color: #def1e9; font-size: .98rem; line-height: 1.65; word-break: keep-all; overflow-wrap: anywhere; }
.introduction .english-intro { max-width: 24rem; margin-top: .52rem; color: #bde6d5; font-size: .8rem; }
.download-action { padding: clamp(1.4rem, 4.4vw, 3.3rem); }
h2 { font-size: 1.29rem; line-height: 1.3; letter-spacing: -.025em; }
.description { color: var(--muted); font-size: .92rem; margin-top: .5rem; }
form { margin-top: 1.45rem; }
label { display: block; margin-bottom: .3rem; font-size: .88rem; font-weight: 730; }
.translation { color: var(--muted); font-size: .76rem; font-weight: 580; }
input, select {
  display: block; min-width: 0; width: 100%; min-height: 3rem;
  padding: .65rem .78rem; border: 1px solid #a8c1b7; border-radius: .6rem;
  color: var(--ink); background: #fcfdfc;
}
input[type="password"] { letter-spacing: .12em; }
select + label { margin-top: .8rem; }
.field-help { color: var(--muted); font-size: .8rem; margin-top: .3rem; }
button {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  width: 100%; min-height: 3.1rem; margin-top: 1.12rem; padding: .63rem .9rem;
  border: 0; border-radius: .66rem; color: var(--white); background: var(--accent);
  font-weight: 730; text-align: left; cursor: pointer;
}
button:hover:not(:disabled) { background: var(--accent-hover); }
button:disabled { opacity: .62; cursor: default; }
.button-copy { display: flex; flex-direction: column; line-height: 1.3; }
.button-copy small { color: #d9f2e8; font-size: .72rem; font-weight: 620; }
.download-arrow { font-size: 1.24rem; line-height: 1; }
.status, .no-script { color: var(--accent-hover); margin-top: .62rem; font-size: .87rem; }
.status:empty { margin: 0; }
.status[data-state="error"], .no-script { color: #9b342c; }

.setup { margin: 1.8rem 0 0; padding: 1.35rem clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--border); border-radius: 1rem; background: var(--white); }
.steps {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
  margin: .9rem 0 0; padding: 0 0 0 1.22rem;
}
.steps li { padding-left: .08rem; }
.steps li::marker { color: var(--accent); font-weight: 780; }
.steps strong { font-size: .92rem; }
.steps p { margin: .27rem 0 0; color: var(--muted); font-size: .85rem; word-break: keep-all; overflow-wrap: anywhere; }
.setup-translation { margin-top: .85rem; padding-top: .72rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .81rem; }
code { color: var(--ink); font: .81rem ui-monospace, SFMono-Regular, monospace; overflow-wrap: anywhere; }
.destinations { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .95rem; }
.destinations a {
  display: inline-flex; align-items: baseline; gap: .45rem;
  padding: .42rem .73rem; border: 1px solid var(--border); border-radius: .55rem;
  background: var(--white); font-size: .86rem; font-weight: 680; text-decoration: none;
}
.destinations a:hover { border-color: #98bbac; background: #eaf5ee; }

.issue-controls { display: flex; align-items: stretch; flex-wrap: wrap; gap: .5rem; }
.issue-controls input { flex: 1 1 12.5rem; min-width: 0; min-height: 2.68rem; }
.issue-controls button {
  justify-content: center; width: auto; min-height: 2.68rem; margin: 0;
  padding: .48rem .75rem; font-size: .88rem; white-space: nowrap;
}
.issued-link { margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--border); }
.issued-link input { font: .83rem ui-monospace, SFMono-Regular, monospace; letter-spacing: 0; }

@media (max-width: 750px) {
  .download-panel { grid-template-columns: 1fr; }
  h1 br { display: none; }
  .steps { grid-template-columns: 1fr; gap: .72rem; }
}
