:root {
  color-scheme: light;
  font-family: "Pretendard", "Noto Sans KR", system-ui, sans-serif;
  background: #f5f1e8;
  color: #1d2523;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 86% 0%, #d9e7d9 0, transparent 32rem),
    linear-gradient(115deg, #f5f1e8, #faf8f3);
}

.shell { width: min(100% - 2rem, 72rem); margin: 0 auto; padding: 5rem 0 2.5rem; }
.hero { max-width: 43rem; margin-bottom: 3rem; }
.eyebrow, .step { margin: 0 0 .65rem; color: #677c65; font-size: .73rem; font-weight: 750; letter-spacing: .13em; }
h1 { margin: 0; font-family: Georgia, "Noto Serif KR", serif; font-size: clamp(2.8rem, 7vw, 5.5rem); font-weight: 500; line-height: .98; letter-spacing: -.06em; }
.lede { max-width: 34rem; margin: 1.5rem 0 0; color: #58635f; font-size: 1.05rem; line-height: 1.7; }

.panel { padding: clamp(1.25rem, 4vw, 3rem); border: 1px solid #d7d4c9; border-radius: 1.25rem; background: rgb(255 255 252 / 82%); box-shadow: 0 1.25rem 3.5rem rgb(47 64 53 / 8%); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.8rem; }
h2 { margin: 0; font-family: Georgia, "Noto Serif KR", serif; font-size: 1.75rem; font-weight: 500; }
.character-count { margin: .25rem 0 0; color: #69716c; font-size: .85rem; white-space: nowrap; }

label { display: block; font-size: .88rem; font-weight: 700; }
textarea, select, input { font: inherit; }
textarea, select { width: 100%; border: 1px solid #cdd1c8; border-radius: .7rem; background: #fffefa; color: inherit; }
textarea { min-height: 13rem; margin-top: .7rem; padding: 1rem; resize: vertical; line-height: 1.7; }
textarea:focus, select:focus, input:focus-visible { outline: 3px solid #b7cfb5; outline-offset: 2px; border-color: #52754f; }
.field-help { margin: .55rem 0 0; color: #6b746f; font-size: .8rem; }

.controls { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem; margin-top: 2rem; padding-top: 1.75rem; border-top: 1px solid #e0dfd6; }
.field { min-width: 0; }
select { margin-top: .7rem; padding: .75rem .8rem; }
.range-label { display: flex; justify-content: space-between; gap: .5rem; }
output { color: #496b48; font-size: .9rem; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; margin-top: 1rem; accent-color: #547d51; }

.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; margin-top: 2.2rem; }
.status-message { margin: 0; color: #5e6863; font-size: .9rem; line-height: 1.5; }
.status-message.is-error { color: #9f392e; }
button { display: inline-flex; flex: none; align-items: center; gap: 1.6rem; border: 0; border-radius: .7rem; padding: .9rem 1.1rem 1rem 1.25rem; background: #234727; color: #fff; cursor: pointer; font: inherit; font-weight: 700; transition: background .15s ease, transform .15s ease; }
button:hover:not(:disabled) { background: #315e35; transform: translateY(-1px); }
button:disabled { cursor: wait; opacity: .7; }

.preview-panel { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem 1.5rem; margin-top: 2rem; padding: 1.5rem; border: 1px solid #c6d8c4; border-radius: .9rem; background: #f1f7ef; }
.preview-panel h3 { margin: 0; font-family: Georgia, "Noto Serif KR", serif; font-size: 1.3rem; font-weight: 500; }
.preview-panel .step { margin-bottom: .35rem; }
.preview-panel audio { grid-column: 1 / -1; width: 100%; }
.download-link { justify-self: end; border-radius: .65rem; padding: .75rem 1rem; background: #234727; color: #fff; font-size: .9rem; font-weight: 700; text-decoration: none; }
.download-link:hover { background: #315e35; }

footer { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; color: #6d756e; font-size: .75rem; line-height: 1.5; }

.auth-shell, .dashboard-shell { width: min(100% - 2rem, 68rem); margin: 0 auto; padding: min(12vh, 8rem) 0 3rem; }
.auth-card { width: min(100%, 28rem); padding: 2rem; border: 1px solid #d7d4c9; border-radius: 1.25rem; background: rgb(255 255 252 / 88%); box-shadow: 0 1.25rem 3.5rem rgb(47 64 53 / 8%); }
.auth-card h1, .dashboard-header h1 { margin: 0; font-family: Georgia, "Noto Serif KR", serif; font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 500; letter-spacing: -.04em; }
.auth-card > p { color: #5e6863; line-height: 1.6; }
.auth-card form { display: grid; gap: .75rem; margin-top: 1.5rem; }
.auth-card input { width: 100%; border: 1px solid #cdd1c8; border-radius: .7rem; padding: .8rem; background: #fffefa; letter-spacing: .3em; text-align: center; }
.auth-card button { justify-content: space-between; margin-top: .5rem; }
.dashboard-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.quiet-button { border: 1px solid #aab7a9; background: transparent; color: #234727; }
.quiet-button:hover:not(:disabled) { background: #e8f0e7; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; }
.metric { min-height: 9rem; padding: 1.3rem; border: 1px solid #d7d4c9; border-radius: 1rem; background: rgb(255 255 252 / 82%); }
.metric p, .metric span { margin: 0; color: #66716b; font-size: .82rem; line-height: 1.45; }
.metric strong { display: block; margin: .8rem 0 .25rem; color: #234727; font-family: Georgia, "Noto Serif KR", serif; font-size: 1.55rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.voice-tier-costs { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.voice-tier-card { padding: 1.5rem; border: 1px solid #d7d4c9; border-radius: 1rem; background: rgb(255 255 252 / 65%); }
.voice-tier-card h3 { margin: 0 0 1rem; color: #234727; font-family: Georgia, "Noto Serif KR", serif; font-size: 1.3rem; font-weight: 500; }
.tier-pricing-summary { margin: 1rem 0 0; color: #5e6863; font-size: .88rem; line-height: 1.6; }
.dashboard-note { margin-top: 1.5rem; padding: 1.5rem; border-left: 3px solid #7a9a78; background: #edf4eb; color: #4f5c54; line-height: 1.7; }
.dashboard-note h2 { margin: 0; color: #234727; font-family: Georgia, "Noto Serif KR", serif; font-weight: 500; }
.dashboard-note p { margin: .75rem 0 0; }
.dashboard-note a { color: #315e35; font-weight: 700; }
.integrated-dashboard { width: 100%; margin-top: 1.5rem; padding: 0; }

@media (max-width: 700px) {
  .shell { padding-top: 2.5rem; }
  .controls { grid-template-columns: 1fr; }
  .form-footer, footer { align-items: flex-start; flex-direction: column; }
  .form-footer button { width: 100%; justify-content: space-between; }
  .preview-panel { grid-template-columns: 1fr; }
  .download-link { justify-self: stretch; text-align: center; }
  .dashboard-header { flex-direction: column; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
}
