:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --line: #e2e7ec;
    --line-strong: #d4dae1;
    --text: #15181d;
    --muted: #66707c;
    --subtle: #929ba6;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: #eff6ff;
    --accent-text: #ffffff;
    --success: #16a36a;
    --danger: #d14343;
    font-family: Pretendard, "Noto Sans KR", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.theme-likes {
    --accent: #db2777;
    --accent-hover: #be185d;
    --accent-soft: #fdf2f8;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.055), transparent 24rem),
        var(--bg);
}

.theme-likes {
    background:
        radial-gradient(circle at 10% 0%, rgba(219, 39, 119, 0.05), transparent 24rem),
        var(--bg);
}

button,
input {
    font: inherit;
}

.page-shell {
    width: min(650px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2.5rem 0 4rem;
}

.site-header {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 58px;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--line);
}

.brand {
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 900;
    letter-spacing: -0.035em;
    text-decoration: none;
}

.brand span {
    color: var(--accent);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--subtle);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.11em;
}

.header-status > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(22, 163, 106, 0.1);
}

.intro {
    position: sticky;
    top: 2rem;
    padding-top: 2rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.13em;
}

.eyebrow::before {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    content: "";
    background: currentColor;
}

h1 {
    margin: 1.15rem 0 1.2rem;
    font-size: clamp(2.35rem, 4vw, 3.65rem);
    line-height: 1.08;
    letter-spacing: -0.065em;
}

h1 em {
    color: var(--accent);
    font-style: normal;
}

.intro > p {
    margin: 0;
    color: var(--muted);
    font-size: 0.91rem;
    line-height: 1.8;
    word-break: keep-all;
}

.steps {
    display: grid;
    gap: 0;
    margin-top: 2.3rem;
    border-top: 1px solid var(--line);
}

.steps div {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    min-height: 52px;
    border-bottom: 1px solid var(--line);
}

.steps strong {
    color: var(--accent);
    font-size: 0.67rem;
    letter-spacing: 0.08em;
}

.steps span {
    color: #4f5965;
    font-size: 0.79rem;
    font-weight: 650;
}

.order-card {
    padding: 1.65rem;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 16px 45px rgba(24, 32, 43, 0.065);
}

.product-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
    margin-bottom: 1.7rem;
    padding: 0.3rem;
    border-radius: 11px;
    background: #f0f2f5;
}

.product-nav a {
    padding: 0.7rem;
    border-radius: 8px;
    color: #7a8490;
    font-size: 0.77rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.product-nav a:hover {
    color: var(--text);
}

.product-nav a.active {
    color: var(--text);
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(25, 32, 42, 0.08);
}

.card-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.8rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #edf0f3;
}

.card-heading > div {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(22, 163, 106, 0.1);
}

.status-dot-off {
    background: #9aa3ad;
    box-shadow: 0 0 0 4px rgba(154, 163, 173, 0.11);
}

.status-text,
.service-code {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.045em;
}

.service-code {
    color: var(--subtle);
}

h2 {
    margin: 0;
    font-size: 1.55rem;
    letter-spacing: -0.04em;
}

.form-help {
    margin: 0.45rem 0 1.7rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.order-form {
    display: grid;
    gap: 0.7rem;
}

.order-form label:not(.agreement) {
    margin-top: 0.6rem;
    color: #333a43;
    font-size: 0.79rem;
    font-weight: 800;
}

.input-wrap {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 52px;
    padding: 0 0.95rem;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    background: var(--surface-soft);
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.input-wrap:focus-within {
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.input-wrap > span:first-child {
    color: var(--accent);
    font-size: 0.8rem;
}

.input-wrap input {
    flex: 1;
    min-width: 0;
    height: 50px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

input::placeholder {
    color: #a4acb5;
}

.unit {
    color: var(--subtle);
    font-size: 0.78rem;
}

small {
    color: var(--subtle);
    font-size: 0.7rem;
}

.agreement {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    margin: 1rem 0 0.15rem;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.55;
}

.agreement input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 0.1rem 0 0;
    accent-color: var(--accent);
}

button {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 53px;
    margin-top: 0.35rem;
    padding: 0 1.1rem;
    border: 0;
    border-radius: 11px;
    color: var(--accent-text);
    background: var(--accent);
    font-weight: 850;
    cursor: pointer;
    transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

button:hover {
    background: var(--accent-hover);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 20%, transparent);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    color: #8c959f;
    background: #e7eaee;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.security-note {
    margin: 1rem 0 0;
    color: var(--subtle);
    font-size: 0.66rem;
    text-align: center;
}

.notice {
    margin-bottom: 1.15rem;
    padding: 0.9rem 1rem;
    border: 1px solid;
    border-radius: 10px;
    font-size: 0.78rem;
    line-height: 1.55;
}

.notice strong {
    display: block;
    margin-bottom: 0.2rem;
}

.notice p,
.notice ul {
    margin: 0.25rem 0 0;
}

.notice ul {
    padding-left: 1.15rem;
}

.notice-error {
    color: #9f2f2f;
    border-color: #f1c7c7;
    background: #fff6f6;
}

.notice-success {
    color: #126b49;
    border-color: #bde5d4;
    background: #f2fbf7;
}

.notice-setup {
    color: #6a551c;
    border-color: #eadcae;
    background: #fffbeb;
}

details {
    margin-top: 0.6rem;
}

summary {
    cursor: pointer;
}

pre {
    max-height: 180px;
    padding: 0.75rem;
    overflow: auto;
    border-radius: 8px;
    color: #dfe5ec;
    background: #1d232c;
    font-size: 0.7rem;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 860px) {
    .page-shell {
        width: min(620px, calc(100% - 2rem));
        padding-top: 1rem;
    }
}

@media (max-width: 520px) {
    .page-shell {
        width: min(100% - 1rem, 620px);
        padding-bottom: 2rem;
    }

    .order-card {
        padding: 1.15rem;
        border-radius: 16px;
    }

    .card-heading {
        margin-bottom: 1.4rem;
    }
}
