:root {
    --bg: #f7f8fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #667085;
    --line: #e7eaf0;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Malgun Gothic", "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}

.site-header {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    backdrop-filter: blur(12px);
}

.brand {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.nav .nav-cta {
    color: white;
    background: var(--primary);
    padding: 10px 16px;
    border-radius: 999px;
}

.page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 56px 24px 80px;
}

.hero {
    min-height: 420px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #eef4ff, #ffffff);
    border: 1px solid var(--line);
    border-radius: 32px;
    padding: 64px;
    box-shadow: var(--shadow);
}

.eyebrow {
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 0.08em;
}

h1 {
    font-size: 44px;
    line-height: 1.16;
    margin: 0 0 18px;
}

.hero-text {
    color: var(--muted);
    font-size: 18px;
    max-width: 680px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: white;
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.btn.primary:hover { background: var(--primary-dark); }
.btn.full { width: 100%; margin-top: 22px; }

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 28px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow);
}

.card h2 { margin-top: 0; }
.card p { color: var(--muted); }
.price { font-size: 28px; font-weight: 900; color: var(--text) !important; }
.featured { border-color: var(--primary); }

.form-page {
    display: flex;
    justify-content: center;
}

.form-card {
    width: 100%;
    max-width: 480px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 36px;
    box-shadow: var(--shadow);
}

.form-card h1 { font-size: 32px; }
.muted { color: var(--muted); }
.optional { color: var(--muted); font-size: 12px; font-weight: 600; }

label {
    display: block;
    font-weight: 800;
    margin: 18px 0 8px;
}

input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 14px;
    font-size: 15px;
}

span.field-validation-error,
.validation-summary {
    display: block;
    color: #dc2626;
    font-size: 14px;
    margin-top: 6px;
}

.alert {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 24px;
    font-weight: 700;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 28px;
    text-align: center;
    color: var(--muted);
}

@media (max-width: 760px) {
    .site-header { padding: 0 20px; }
    .nav { gap: 10px; font-size: 13px; }
    .hero { padding: 36px; }
    h1 { font-size: 34px; }
    .cards { grid-template-columns: 1fr; }
}

.nav-form {
    margin: 0;
}

.nav-form button {
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
}

input[readonly] {
    background: #f8fafc;
    color: var(--muted);
}

button[disabled],
input[disabled],
textarea[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
}

.wide-card {
    max-width: 720px;
}

.status-box {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.status-box > div {
    border: 1px solid var(--line);
    background: #f8fafc;
    border-radius: 16px;
    padding: 16px;
}

.status-box span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px;
}

.status-box strong {
    display: block;
    font-size: 17px;
}

.notice-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 22px;
}

.notice-box p {
    margin: 6px 0 0;
}

.plan-select-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.plan-radio {
    margin: 0;
    cursor: pointer;
}

.plan-radio input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.plan-radio span {
    display: block;
    min-height: 92px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
    background: #fff;
}

.plan-radio b,
.plan-radio small {
    display: block;
}

.plan-radio small {
    color: var(--muted);
    margin-top: 6px;
}

.plan-radio input:checked + span {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-divider {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 26px 0 18px;
}

@media (max-width: 760px) {
    .status-box,
    .plan-select-grid {
        grid-template-columns: 1fr;
    }
}

.alert.danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.btn.danger {
    background: #fff;
    border-color: #fecaca;
    color: #b91c1c;
}

.btn.danger:hover {
    background: #fef2f2;
}

.inline-action-form {
    margin-top: 14px;
}

.inline-action-form .btn {
    min-height: 38px;
    padding: 0 14px;
}

/* v1.0.8 - 평가판 / 일시불 구매 라이선스 */
.section-heading {
    margin-bottom: 24px;
}

.hero-license-text {
    margin-top: 14px;
    max-width: 760px;
    color: #475467;
    font-weight: 600;
}

.purchase-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.plan-badge {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 8px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef4ff;
    color: #3538cd;
    font-size: 0.82rem;
    font-weight: 700;
}

.feature-list {
    margin: 18px 0 24px;
    padding-left: 20px;
    color: #475467;
    line-height: 1.85;
}

.service-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.disabled-card {
    opacity: 0.48;
    cursor: not-allowed;
}

.license-status-box {
    margin-bottom: 20px;
}

.success-box {
    border-color: #abefc6;
    background: #ecfdf3;
}

.pending-box {
    border-color: #fedf89;
    background: #fffaeb;
}

.api-notice {
    margin-top: 24px;
}

.api-notice.compact {
    margin-top: 28px;
    margin-bottom: 0;
}

@media (max-width: 760px) {
    .purchase-cards,
    .service-type-grid {
        grid-template-columns: 1fr;
    }
}

/* Home feature upgrade v1 */
.hero-content {
    width: 100%;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-points span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid #dbe6fb;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #3b4b66;
    font-size: 13px;
    font-weight: 800;
}

.section-heading {
    max-width: 760px;
    margin: 72px auto 4px;
    text-align: center;
}

.section-heading h2,
.showcase-copy h2,
.home-cta h2 {
    margin: 8px 0 14px;
    font-size: 30px;
    line-height: 1.3;
}

.section-heading > p:last-child,
.showcase-copy > p,
.home-cta p {
    color: var(--muted);
    line-height: 1.8;
}

/* Home product preview v1 */
.product-preview {
    margin-top: 32px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.product-preview-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 22px;
}

.product-preview-head h2 {
    margin: 7px 0 10px;
    font-size: 27px;
    line-height: 1.35;
}

.product-preview-head > div:first-child > p:last-child {
    max-width: 700px;
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.preview-flow {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 7px;
    flex: 0 0 auto;
}

.preview-flow span {
    display: inline-flex;
    align-items: center;
    min-height: 31px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef4ff;
    color: #31558f;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.preview-flow i {
    color: #94a3b8;
    font-size: 13px;
    font-style: normal;
    font-weight: 900;
}

.product-preview-frame {
    margin: 0;
    overflow: hidden;
    border: 1px solid #d9e2ef;
    border-radius: 20px;
    background: #eef2f7;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.13);
}

.product-preview-frame img {
    display: block;
    width: 100%;
    height: auto;
}

.product-preview-frame figcaption {
    padding: 11px 16px 12px;
    border-top: 1px solid #e2e8f0;
    background: #fbfcfe;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

.feature-cards {
    margin-top: 28px;
}

.feature-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: #d4def0;
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.12);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    margin-bottom: 20px;
    padding: 0 11px;
    border-radius: 14px;
    background: #eef4ff;
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.feature-card h2 {
    margin-bottom: 10px;
    font-size: 20px;
}

.feature-card p {
    margin-bottom: 0;
    line-height: 1.75;
}

.feature-showcase {
    display: grid;
    gap: 24px;
    margin-top: 72px;
}

.showcase-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 48px;
    min-height: 380px;
    padding: 44px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.showcase-item.reverse .showcase-copy {
    order: 2;
}

.showcase-item.reverse .showcase-visual {
    order: 1;
}

.showcase-copy > p:not(.eyebrow) {
    margin-bottom: 0;
}

.showcase-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.showcase-tags span {
    padding: 8px 11px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.showcase-visual {
    min-height: 272px;
    overflow: hidden;
    border: 1px solid #dbe5f4;
    border-radius: 24px;
    background: linear-gradient(145deg, #edf4ff, #f8fbff 58%, #eef2f7);
    position: relative;
}

.caption-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px;
}

.preview-frame {
    width: 100%;
    min-height: 218px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    border-radius: 18px;
    background: linear-gradient(155deg, #26344e 0%, #101827 70%);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.22);
}

.preview-label {
    align-self: flex-start;
    margin-bottom: auto;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    color: #bfd2f5;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.caption-line {
    width: fit-content;
    max-width: 100%;
    margin-top: 7px;
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    color: #101828;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.4;
}

.caption-line-small {
    font-size: 14px;
    color: #344054;
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 3px;
    background: var(--primary);
    vertical-align: -2px;
}

.camera-preview {
    display: grid;
    place-items: center;
    min-height: 485px;
    padding: 26px;
    background: linear-gradient(145deg, #e8f0fb, #f8fbff 58%, #edf2f8);
}

.camera-screenshot-frame {
    width: min(100%, 310px);
    margin: 0;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 26px 52px rgba(15, 23, 42, 0.20);
}

.camera-screenshot-label {
    margin-bottom: 10px;
    color: #2563eb;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
}

.camera-screenshot-frame img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 246 / 415;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #eef2f7;
    object-fit: contain;
}

.camera-screenshot-frame figcaption {
    margin-top: 11px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.55;
    text-align: center;
}

.home-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-top: 72px;
    padding: 38px 42px;
    border: 1px solid #d8e4f8;
    border-radius: 28px;
    background: linear-gradient(135deg, #eef4ff, #ffffff);
    box-shadow: var(--shadow);
}

.home-cta h2 {
    font-size: 26px;
}

.home-cta p {
    margin-bottom: 0;
}

.home-cta .btn {
    flex: 0 0 auto;
}

@media (max-width: 760px) {
    .hero {
        min-height: auto;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .section-heading {
        margin-top: 52px;
    }

    .section-heading h2,
    .showcase-copy h2 {
        font-size: 25px;
    }

    .showcase-item,
    .showcase-item.reverse {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 28px;
    }

    .showcase-item.reverse .showcase-copy,
    .showcase-item.reverse .showcase-visual {
        order: initial;
    }

    .showcase-visual {
        min-height: 230px;
    }

    .camera-preview {
        min-height: 0;
        padding: 22px;
    }

    .camera-screenshot-frame {
        width: min(100%, 286px);
    }

    .home-cta {
        align-items: flex-start;
        flex-direction: column;
        margin-top: 52px;
        padding: 30px;
    }

    .home-cta .btn {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .product-preview {
        margin-top: 24px;
        padding: 18px;
        border-radius: 22px;
    }

    .product-preview-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
        margin-bottom: 18px;
    }

    .product-preview-head h2 {
        font-size: 23px;
    }

    .preview-flow {
        justify-content: flex-start;
    }

    .product-preview-frame {
        border-radius: 14px;
    }

    .product-preview-frame figcaption {
        text-align: left;
    }
}

/* Visitor Analytics */
.analytics-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin: 20px 0 12px;
}

.analytics-kicker {
    display: block;
    margin-bottom: 8px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
}

.analytics-head h1 {
    margin: 0 0 10px;
    font-size: 34px;
}

.analytics-head p,
.analytics-panel-head p {
    margin: 0;
    color: #64748b;
}

.analytics-filter {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}

.analytics-filter label {
    display: grid;
    gap: 6px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.analytics-filter input[type="date"] {
    min-width: 145px;
    padding: 10px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font: inherit;
}

.analytics-range {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.analytics-range span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
}

.analytics-cards {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.analytics-card {
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.analytics-card span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.analytics-card strong {
    display: block;
    margin: 7px 0 5px;
    color: #0f172a;
    font-size: 30px;
    line-height: 1;
}

.analytics-card small {
    color: #94a3b8;
    font-size: 11px;
}

.analytics-panel {
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
}

.analytics-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}

.analytics-panel-head h2 {
    margin: 0 0 5px;
    font-size: 19px;
}

.analytics-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.analytics-table-wrap {
    overflow-x: auto;
}

.analytics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.analytics-table th,
.analytics-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #eef2f7;
    text-align: right;
    white-space: nowrap;
}

.analytics-table th {
    color: #64748b;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 900;
}

.analytics-table th:first-child,
.analytics-table td:first-child {
    text-align: left;
}

.analytics-table tbody tr:last-child td {
    border-bottom: 0;
}

.analytics-path {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #334155;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.analytics-bar-track {
    width: 120px;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #eef2ff;
}

.analytics-bar {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #2563eb;
}

.analytics-visitor-id {
    display: inline-block;
    padding: 4px 7px;
    border-radius: 7px;
    background: #f1f5f9;
    color: #334155;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    font-weight: 800;
}

.analytics-user-no {
    display: block;
    margin-top: 4px;
    color: #64748b;
}

.analytics-empty {
    padding: 36px 12px;
    color: #94a3b8;
    text-align: center;
}

.analytics-note {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 12px;
}

@media (max-width: 980px) {
    .analytics-head {
        align-items: stretch;
        flex-direction: column;
    }

    .analytics-filter {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .analytics-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .analytics-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .analytics-cards {
        grid-template-columns: 1fr;
    }

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

    .analytics-filter input[type="date"] {
        width: 100%;
    }

    .analytics-trend-col {
        display: none;
    }
}

/* Visitor Analytics v3 */
.analytics-funnel {
    display: grid;
    gap: 14px;
}

.analytics-funnel-step {
    display: grid;
    gap: 8px;
}

.analytics-funnel-meta {
    display: grid;
    grid-template-columns: auto minmax(160px, 1fr) auto auto auto;
    align-items: center;
    gap: 12px;
    color: #475569;
    font-size: 12px;
}

.analytics-funnel-meta strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
}

.analytics-funnel-meta small {
    display: block;
    margin-top: 2px;
    color: #94a3b8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.analytics-funnel-meta b {
    color: #0f172a;
    font-size: 15px;
}

.analytics-funnel-meta em {
    font-style: normal;
    white-space: nowrap;
}

.analytics-step-no {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 900;
}

.analytics-funnel-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #f1f5f9;
}

.analytics-funnel-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
}

.analytics-subnote {
    margin: 14px 0 0;
    color: #94a3b8;
    font-size: 11px;
}

@media (max-width: 760px) {
    .analytics-funnel-meta {
        grid-template-columns: auto 1fr auto;
    }

    .analytics-funnel-meta em {
        display: none;
    }
}
