:root {
    --ink: #11292e;
    --muted: #5d7175;
    --line: #d8e2e2;
    --paper: #ffffff;
    --canvas: #f2f7f6;
    --teal: #0e6268;
    --teal-dark: #0e3b43;
    --mint: #cce8df;
    --coral: #ed755e;
    --warning: #fff7e4;
    --radius: 8px;
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, Pretendard, "Noto Sans", Arial, sans-serif;
    line-height: 1.55;
    letter-spacing: 0;
}
button, input { font: inherit; }
a { color: inherit; }

.site-header {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand span:last-child { display: grid; line-height: 1.05; }
.brand strong { font-size: 18px; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 4px; text-transform: uppercase; }
.brand-mark { width: 38px; height: 38px; display: flex; align-items: center; gap: 3px; padding: 9px; background: var(--teal-dark); border-radius: 50%; }
.brand-mark i { width: 3px; background: white; border-radius: 2px; }
.brand-mark i:nth-child(1) { height: 8px; }
.brand-mark i:nth-child(2) { height: 18px; }
.brand-mark i:nth-child(3) { height: 12px; }
.secure-label { font-size: 12px; color: var(--teal); font-weight: 700; }

main { max-width: 1180px; margin: 0 auto; padding: 0 24px 64px; }
.intro {
    min-height: 440px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
    overflow: hidden;
    background: var(--teal-dark);
    color: white;
    border-radius: var(--radius);
}
.intro-copy { padding: 62px 56px; align-self: center; }
.eyebrow { margin: 0 0 10px; color: var(--coral); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 600px; margin-bottom: 18px; font-size: 48px; line-height: 1.06; letter-spacing: 0; }
.lead { max-width: 620px; margin-bottom: 30px; color: #d8e7e7; font-size: 17px; }
.intro-visual {
    min-height: 440px;
    background: url('/assets/pulse-sensor.webp') center right / cover no-repeat;
}
.process-points { display: flex; flex-wrap: wrap; gap: 14px 24px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.process-points li { display: flex; align-items: center; gap: 8px; }
.process-points span { width: 24px; height: 24px; display: inline-grid; place-items: center; border: 1px solid #6d9094; border-radius: 50%; font-weight: 700; }

.workspace { margin: 28px 0; padding: 34px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.workspace-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.workspace-heading h2 { margin-bottom: 0; font-size: 28px; }
.workspace-heading > p { margin: 0; color: var(--muted); font-size: 13px; }
.language-field { margin: 0 0 20px; padding: 0; border: 0; }
.language-field legend { margin-bottom: 9px; font-size: 13px; font-weight: 700; }
.language-field label { display: inline-block; }
.language-field input { position: absolute; opacity: 0; pointer-events: none; }
.language-field span { display: inline-flex; min-height: 42px; align-items: center; padding: 0 20px; border: 1px solid var(--line); cursor: pointer; font-weight: 700; }
.language-field label:first-of-type span { border-radius: 6px 0 0 6px; }
.language-field label:last-of-type span { margin-left: -1px; border-radius: 0 6px 6px 0; }
.language-field input:checked + span { position: relative; z-index: 1; color: white; background: var(--teal); border-color: var(--teal); }

.drop-zone { min-height: 190px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 28px; border: 2px dashed #9fb6b7; background: #f8fbfa; border-radius: var(--radius); cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--teal); background: #eef8f5; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-icon { width: 42px; height: 42px; display: grid; place-items: center; color: white; background: var(--teal); border-radius: 50%; font-size: 22px; line-height: 1; }
.drop-zone strong { font-size: 17px; }
.drop-zone small { color: var(--muted); }
.file-list { display: grid; gap: 8px; margin-top: 10px; }
.file-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 12px; background: #edf5f3; border-radius: 6px; font-size: 13px; }
.file-item button { width: 30px; height: 30px; border: 0; background: transparent; cursor: pointer; font-size: 20px; }
.consent-row { display: grid; grid-template-columns: 20px 1fr; gap: 10px; margin: 22px 0 16px; color: #344f54; font-size: 13px; }
.consent-row input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--teal); }
.notice { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 15px 17px; background: var(--warning); border-left: 4px solid #dca63c; font-size: 13px; }
.notice p { margin: 0; }
.primary-button { width: 100%; min-height: 54px; margin-top: 20px; border: 0; color: white; background: var(--teal); border-radius: 6px; cursor: pointer; font-weight: 800; }
.primary-button:hover { background: #0b5055; }
.primary-button:disabled { cursor: not-allowed; opacity: .55; }
.primary-button span { margin-left: 8px; }
.form-error { min-height: 22px; margin: 10px 0 0; color: #b43d2e; font-size: 13px; text-align: center; }

.trust-strip { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: white; border-radius: var(--radius); }
.trust-strip div { min-height: 110px; display: grid; align-content: center; gap: 4px; padding: 22px 26px; }
.trust-strip div + div { border-left: 1px solid var(--line); }
.trust-strip span { color: var(--muted); font-size: 13px; }

.progress-dialog { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(9, 26, 30, .68); }
.progress-dialog[hidden] { display: none; }
.progress-panel { width: min(520px, 100%); padding: 40px; background: white; border-radius: var(--radius); text-align: center; }
.progress-panel h2 { margin-bottom: 8px; }
.progress-panel > p:not(.eyebrow) { color: var(--muted); }
.progress-panel small { color: var(--muted); }
.progress-track { height: 8px; margin: 22px 0 16px; overflow: hidden; background: #dfe9e8; border-radius: 8px; }
.progress-track span { width: 5%; height: 100%; display: block; background: var(--coral); transition: width .35s ease; }
.pulse-loader { height: 36px; display: flex; justify-content: center; align-items: center; gap: 5px; margin-bottom: 20px; }
.pulse-loader i { width: 4px; height: 12px; background: var(--teal); animation: pulse 1s infinite ease-in-out; }
.pulse-loader i:nth-child(2) { animation-delay: .12s; }
.pulse-loader i:nth-child(3) { animation-delay: .24s; }
.pulse-loader i:nth-child(4) { animation-delay: .36s; }
@keyframes pulse { 0%, 100% { height: 10px; } 50% { height: 34px; } }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px 24px; color: var(--muted); background: white; border-top: 1px solid var(--line); font-size: 12px; }
footer p { margin: 0; }

.report-shell { max-width: 920px; margin: 0 auto; padding: 24px 24px 64px; }
.report-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 28px; color: white; background: var(--teal-dark); border-radius: var(--radius); }
.report-header h1 { margin-bottom: 6px; font-size: 34px; }
.report-header p { margin: 0; color: #d9e7e8; }
.download-button { display: inline-flex; min-height: 44px; align-items: center; white-space: nowrap; padding: 0 18px; color: var(--teal-dark); background: white; border-radius: 6px; text-decoration: none; font-weight: 800; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.summary-item { min-height: 125px; padding: 20px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.summary-item small { display: block; color: var(--muted); }
.summary-item strong { display: block; margin: 8px 0 3px; font-size: 24px; }
.report-section { margin-top: 16px; padding: 26px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.report-section h2 { font-size: 22px; }
.report-section h3 { margin-bottom: 7px; font-size: 16px; }
.report-section p:last-child { margin-bottom: 0; }
.measurement-group + .measurement-group { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.metric-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-grid div { min-width: 0; padding: 14px; background: #f1f7f5; border-radius: 6px; }
.metric-grid dt { color: var(--muted); font-size: 12px; }
.metric-grid dd { margin: 5px 0 0; overflow-wrap: anywhere; font-size: 17px; font-weight: 800; }
.table-scroll { overflow-x: auto; }
.measurement-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.measurement-table th, .measurement-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.measurement-table th { color: var(--muted); background: #f1f7f5; font-size: 11px; }
.interpretation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.interpretation-grid article { padding: 15px; background: #f7f9f9; border: 1px solid var(--line); border-radius: 6px; }
.interpretation-grid p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.reference-section > h3 { margin-top: 30px; }
.reference-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--line); }
.reference-list article { display: grid; grid-template-columns: minmax(170px, .75fr) minmax(0, 2fr); gap: 18px; padding: 16px; background: white; }
.reference-list article > div { display: grid; align-content: start; gap: 5px; }
.reference-list strong { font-size: 14px; }
.reference-list span { color: var(--teal); font-size: 13px; font-weight: 800; }
.reference-list p { margin: 0; color: #40595d; font-size: 13px; }
.reference-note { margin-top: 16px; padding: 14px 16px; color: #6b5324; background: var(--warning); border-left: 4px solid #dca63c; font-size: 13px; }
.guidance-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.guidance-list article { padding: 16px; background: #f1f7f5; border-radius: 6px; }
.disclaimer { color: var(--muted); font-size: 12px; }

@media (max-width: 800px) {
    .site-header { padding-inline: 16px; }
    main { padding: 0 12px 36px; }
    .intro { grid-template-columns: 1fr; }
    .intro-copy { padding: 38px 24px 30px; }
    .intro-visual { min-height: 230px; background-position: 62% center; }
    h1 { font-size: 36px; }
    .workspace { padding: 24px 18px; }
    .workspace-heading { align-items: start; flex-direction: column; }
    .trust-strip, .summary-grid { grid-template-columns: 1fr; }
    .trust-strip div + div { border-left: 0; border-top: 1px solid var(--line); }
    .report-header { flex-direction: column; }
    .metric-grid, .metric-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .interpretation-grid { grid-template-columns: 1fr; }
    .reference-list article { grid-template-columns: 1fr; gap: 8px; }
    .guidance-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .secure-label { display: none; }
    .process-points { display: grid; }
    .language-field { display: grid; grid-template-columns: 1fr 1fr; }
    .language-field span { justify-content: center; padding-inline: 8px; }
    .notice { grid-template-columns: 1fr; }
    .progress-panel { padding: 30px 20px; }
    .report-shell { padding-inline: 12px; }
    .report-header, .report-section { padding: 20px; }
    .report-header h1 { font-size: 28px; }
    .metric-grid, .metric-grid.compact { grid-template-columns: 1fr 1fr; }
    footer { flex-direction: column; }
}
