:root {
  color-scheme: light;
  font-family: Inter, Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background: #f5f7fb;
  color: #172033;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 9% 0%, #e1eaff 0, transparent 28rem),
    radial-gradient(circle at 95% 11%, #e1f7ef 0, transparent 23rem),
    #f5f7fb;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(100% - 40px, 1120px);
  margin: 0 auto;
  padding: 80px 0 64px;
}

.hero {
  max-width: 680px;
  margin-bottom: 36px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #3b5ccc;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.11em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.055em;
  line-height: 1.13;
}

.intro {
  margin-bottom: 12px;
  color: #45516a;
  font-size: 1.08rem;
  line-height: 1.7;
}

.privacy-note {
  margin: 0;
  color: #527061;
  font-size: 0.88rem;
  line-height: 1.65;
}

.preview-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 410px;
  overflow: hidden;
  border: 1px solid #d9e0ec;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 45px rgb(39 58 96 / 0.09);
}

.input-panel,
.output-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 26px;
}

.output-panel {
  background: #fbfcff;
}

.panel-heading,
.input-footer,
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-heading {
  min-height: 28px;
  margin-bottom: 17px;
}

label,
h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 750;
}

textarea {
  width: 100%;
  min-height: 270px;
  resize: vertical;
  border: 1px solid #cfd8e7;
  border-radius: 10px;
  padding: 16px;
  outline: none;
  background: #fff;
  color: #172033;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.91rem;
  line-height: 1.65;
}

textarea:focus {
  border-color: #5474de;
  box-shadow: 0 0 0 4px rgb(84 116 222 / 0.15);
}

.input-footer {
  margin-top: 12px;
  color: #748096;
  font-size: 0.78rem;
}

.divider {
  width: 1px;
  background: #e4e9f1;
}

.result-text {
  display: block;
  min-height: 270px;
  overflow-wrap: anywhere;
  border: 1px solid #e1e6ef;
  border-radius: 10px;
  padding: 16px;
  background: #f4f7fb;
  color: #2d3950;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.91rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.text-button,
.secondary-button {
  border: 0;
  padding: 5px 0;
  background: transparent;
  color: #3b5ccc;
  font-size: 0.82rem;
  font-weight: 750;
}

.secondary-button {
  padding: 5px 7px;
  color: #66738a;
}

.text-button:hover,
.secondary-button:hover {
  color: #1e3d9e;
}

.status {
  border-radius: 99px;
  padding: 5px 9px;
  background: #eef1f5;
  color: #6a7280;
  font-size: 0.73rem;
  font-weight: 700;
}

.status[data-type="working"] {
  background: #fff5d9;
  color: #8a6010;
}

.status[data-type="complete"] {
  background: #e2f6eb;
  color: #1f6a44;
}

.status[data-type="error"] {
  background: #ffe9e8;
  color: #a33935;
}

.action-row {
  justify-content: flex-start;
  margin: 24px 2px 0;
}

.action-row p {
  margin: 0;
  color: #6a7589;
  font-size: 0.78rem;
  line-height: 1.6;
}

code {
  color: #435271;
}

.primary-button {
  flex: none;
  border: 1px solid #3455ba;
  border-radius: 9px;
  padding: 12px 17px;
  background: #3d60ca;
  color: #fff;
  font-weight: 750;
  box-shadow: 0 6px 13px rgb(61 96 202 / 0.21);
}

.primary-button:hover {
  background: #304fae;
}

.primary-button:focus-visible,
.text-button:focus-visible,
.secondary-button:focus-visible {
  outline: 3px solid rgb(84 116 222 / 0.3);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 28px, 600px);
    padding: 48px 0;
  }

  .preview-card {
    grid-template-columns: 1fr;
  }

  .divider {
    width: auto;
    height: 1px;
  }

  .input-panel,
  .output-panel {
    padding: 21px;
  }

  .action-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
