/* ======================================================================
 *  helmet-size-converter.css —— 头盔尺码换算（#6）
 *  主题：深海蓝 + 荧光橙（骑行装备夜行反光感）
 *  布局语言：环形刻度尺 + 尺码卡矩阵（区别于其它工具的双栏表格式）
 * ====================================================================== */

/* ---------- 作用域：根元素与浮层共用同一套变量 ---------- */
.hsc-page,
.hsc-modal,
.hsc-sheet,
.hsc-toast {
    --hsc-deep:   #0B1F3A;
    --hsc-mid:    #12365F;
    --hsc-brand:  #FF6B1A;
    --hsc-brand-2:#FF9E4D;
    --hsc-brand-soft: #FFF1E7;
    --hsc-cyan:   #17C3D6;
    --hsc-paper:  #F4F7FB;
    --hsc-card:   #FFFFFF;
    --hsc-card-2: #F9FBFD;
    --hsc-line:   #DCE4EE;
    --hsc-line-2: #EDF1F6;
    --hsc-ink:    #101F33;
    --hsc-ink-2:  #46586E;
    --hsc-ink-3:  #7C8CA1;
    --hsc-ok:     #0E8A63;
    --hsc-ok-soft:#E4F5EE;
    --hsc-warn:   #B26A00;
    --hsc-warn-soft:#FFF3DF;
    --hsc-danger: #C23A3F;
    --hsc-danger-soft:#FCEBEC;
    --hsc-r-sm: 10px;
    --hsc-r-md: 16px;
    --hsc-r-lg: 22px;
    --hsc-sh-1: 0 1px 2px rgba(11, 31, 58, .06);
    --hsc-sh-2: 0 8px 24px rgba(11, 31, 58, .09);
    --hsc-sh-3: 0 20px 48px rgba(11, 31, 58, .14);
    --hsc-ring: conic-gradient(from 180deg, var(--hsc-cyan) 0deg, var(--hsc-brand) 140deg, var(--hsc-deep) 300deg, var(--hsc-cyan) 360deg);
}

:root[data-theme="dark"] .hsc-page,
:root[data-theme="dark"] .hsc-modal,
:root[data-theme="dark"] .hsc-sheet,
:root[data-theme="dark"] .hsc-toast {
    --hsc-deep:   #071524;
    --hsc-mid:    #0D2946;
    --hsc-brand:  #FF8A45;
    --hsc-brand-2:#FFB37C;
    --hsc-brand-soft: rgba(255, 107, 26, .16);
    --hsc-cyan:   #3BD9EA;
    --hsc-paper:  #0A121C;
    --hsc-card:   #111C29;
    --hsc-card-2: #16222F;
    --hsc-line:   #24344A;
    --hsc-line-2: #1B2836;
    --hsc-ink:    #E8EFF7;
    --hsc-ink-2:  #A7B7CA;
    --hsc-ink-3:  #74869B;
    --hsc-ok:     #3FC79B;
    --hsc-ok-soft:rgba(63, 199, 155, .16);
    --hsc-warn:   #F0A94B;
    --hsc-warn-soft:rgba(240, 169, 75, .16);
    --hsc-danger: #F08287;
    --hsc-danger-soft:rgba(240, 130, 135, .16);
    --hsc-sh-1: 0 1px 2px rgba(0, 0, 0, .4);
    --hsc-sh-2: 0 8px 24px rgba(0, 0, 0, .45);
    --hsc-sh-3: 0 20px 48px rgba(0, 0, 0, .55);
}

.hsc-page {
    color: var(--hsc-ink);
    font-size: 15.5px;
    line-height: 1.82;
}
.hsc-page * { box-sizing: border-box; }

/* ================= 首屏 ================= */
.hsc-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: 34px;
    align-items: center;
    background:
        radial-gradient(680px 300px at 8% -10%, rgba(23, 195, 214, .16), transparent 62%),
        linear-gradient(135deg, var(--hsc-deep) 0%, var(--hsc-mid) 58%, #0A2038 100%);
    border-radius: var(--hsc-r-lg);
    padding: 34px 38px;
    margin-bottom: 26px;
    box-shadow: var(--hsc-sh-3);
    position: relative;
    overflow: hidden;
}
.hsc-hero::after {
    content: "";
    position: absolute;
    right: -60px; bottom: -90px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 26, .22), transparent 68%);
    pointer-events: none;
}
.hsc-hero-copy { position: relative; z-index: 1; min-width: 0; }
.hsc-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #DCEAF7;
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 14px;
}
.hsc-hero h1 {
    font-size: clamp(26px, 3.4vw, 36px);
    font-weight: 800;
    line-height: 1.24;
    letter-spacing: -.02em;
    color: #FFFFFF;
    margin: 0 0 12px;
}
.hsc-hero-sub {
    font-size: 15.5px;
    line-height: 1.86;
    color: #C6D8E8;
    margin: 0 0 18px;
    max-width: 54ch;
}
.hsc-hero-sub b { color: #FFFFFF; font-weight: 700; }
.hsc-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.hsc-chips li {
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .16);
    color: #DCEAF7;
    font-size: 12.5px;
    font-weight: 600;
}

/* 环形读数 */
.hsc-readout {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 22px 18px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--hsc-r-lg);
}
.hsc-ring {
    position: relative;
    width: 188px; height: 188px;
    border-radius: 50%;
    background: var(--hsc-ring);
    display: grid;
    place-items: center;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .3);
}
.hsc-ring::before {
    content: "";
    position: absolute;
    inset: 13px;
    border-radius: 50%;
    background: var(--hsc-deep);
}
.hsc-ring-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
}
.hsc-ring-num {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.02em;
    color: #FFFFFF;
}
.hsc-ring-unit { font-size: 13px; color: #A9C4DC; font-weight: 600; }
.hsc-ring-size {
    margin-top: 6px;
    padding: 3px 13px;
    border-radius: 999px;
    background: var(--hsc-brand);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}
.hsc-readout-note {
    font-size: 12.5px;
    line-height: 1.7;
    color: #C6D8E8;
    text-align: center;
    max-width: 30ch;
}
.hsc-readout-note b { color: #FFB37C; }

/* ================= 首屏操作条 ================= */
.hsc-quick {
    background: var(--hsc-card);
    border: 1px solid var(--hsc-line);
    border-radius: var(--hsc-r-md);
    box-shadow: var(--hsc-sh-2);
    padding: 18px 22px 16px;
    margin: -12px 0 22px;
    position: relative;
    z-index: 3;
}
.hsc-quick-grid {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr) auto;
    gap: 18px;
    align-items: end;
}
.hsc-qfield { min-width: 0; }
.hsc-qfield > label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--hsc-ink-2);
    margin-bottom: 7px;
}
.hsc-qfield--act { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.hsc-quick-mini { display: flex; gap: 14px; justify-content: center; }
.hsc-linkbtn {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 650;
    color: var(--hsc-ink-3);
    cursor: pointer;
    border-bottom: 1px dashed var(--hsc-line);
    transition: color .16s, border-color .16s;
}
.hsc-linkbtn:hover { color: var(--hsc-brand); border-color: var(--hsc-brand); }
.hsc-btn--lg { padding: 12px 30px; font-size: 15px; }

/* ================= 主区 ================= */
.hsc-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 372px);
    gap: 22px;
    align-items: start;
}
.hsc-side { min-width: 0; position: sticky; top: 84px; }

.hsc-panel {
    background: var(--hsc-card);
    border: 1px solid var(--hsc-line);
    border-radius: var(--hsc-r-md);
    box-shadow: var(--hsc-sh-1);
    padding: 20px 22px 22px;
    margin-bottom: 18px;
}
.hsc-panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.hsc-step {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 28px; height: 28px;
    border-radius: 9px;
    background: var(--hsc-deep);
    color: #fff;
    font-size: 12.5px;
    font-weight: 800;
}
.hsc-panel-head h2 {
    font-size: 17px;
    font-weight: 750;
    color: var(--hsc-ink);
    margin: 0;
    letter-spacing: -.01em;
}

/* ---------- 表单 ---------- */
.hsc-field { margin-bottom: 14px; }
.hsc-field:last-child { margin-bottom: 0; }
.hsc-field > label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--hsc-ink-2);
    margin-bottom: 6px;
}
.hsc-field input[type="text"],
.hsc-field input[type="number"],
.hsc-field select,
.hsc-qfield input[type="text"],
.hsc-qfield select {
    width: 100%;
    padding: 10px 13px;
    font-size: 15px;
    font-family: inherit;
    color: var(--hsc-ink);
    background: var(--hsc-card-2);
    border: 1px solid var(--hsc-line);
    border-radius: var(--hsc-r-sm);
    outline: none;
    transition: border-color .16s, box-shadow .16s, background-color .16s;
}
.hsc-field input:focus, .hsc-field select:focus,
.hsc-qfield input:focus, .hsc-qfield select:focus {
    border-color: var(--hsc-brand);
    background: var(--hsc-card);
    box-shadow: 0 0 0 3px var(--hsc-brand-soft);
}
.hsc-field input.is-bad,
.hsc-qfield input.is-bad {
    border-color: var(--hsc-danger);
    box-shadow: 0 0 0 3px var(--hsc-danger-soft);
}
.hsc-unit-row { display: flex; gap: 8px; }
.hsc-unit-row input { flex: 1; min-width: 0; }
.hsc-unit-row select { width: 92px; flex-shrink: 0; }
.hsc-hint { font-size: 12.5px; line-height: 1.65; color: var(--hsc-ink-3); margin-top: 5px; }
.hsc-hint b { color: var(--hsc-ink-2); }
.hsc-err { font-size: 12.5px; color: var(--hsc-danger); margin-top: 8px; font-weight: 600; }
.hsc-err:empty { display: none; }

/* 头型选择 */
.hsc-shape-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hsc-shape {
    padding: 11px 6px;
    border: 1px solid var(--hsc-line);
    border-radius: var(--hsc-r-sm);
    background: var(--hsc-card-2);
    color: var(--hsc-ink-2);
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    text-align: center;
    transition: all .16s;
    font-family: inherit;
    line-height: 1.4;
}
.hsc-shape small { display: block; font-size: 11px; font-weight: 500; color: var(--hsc-ink-3); margin-top: 2px; }
.hsc-shape:hover { border-color: var(--hsc-brand); color: var(--hsc-ink); }
.hsc-shape.is-on {
    background: var(--hsc-deep);
    border-color: var(--hsc-deep);
    color: #fff;
    box-shadow: var(--hsc-sh-2);
}
.hsc-shape.is-on small { color: #A9C4DC; }

/* ---------- 按钮 ---------- */
.hsc-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 4px; }
.hsc-btn {
    padding: 10px 18px;
    border-radius: var(--hsc-r-sm);
    border: 1px solid var(--hsc-line);
    background: var(--hsc-card);
    color: var(--hsc-ink-2);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all .16s;
}
.hsc-btn:hover { border-color: var(--hsc-brand); color: var(--hsc-brand); transform: translateY(-1px); }
.hsc-btn--primary {
    background: linear-gradient(135deg, var(--hsc-brand), var(--hsc-brand-2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 20px rgba(255, 107, 26, .28);
}
.hsc-btn--primary:hover { color: #fff; filter: brightness(1.04); }
.hsc-btn--ghost { background: transparent; }

/* ================= 结果区 ================= */
.hsc-out { min-width: 0; }
.hsc-verdict {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 22px 24px;
    border-radius: var(--hsc-r-md);
    background: linear-gradient(135deg, var(--hsc-deep), var(--hsc-mid));
    color: #fff;
    margin-bottom: 18px;
    box-shadow: var(--hsc-sh-2);
}
.hsc-verdict-badge {
    display: grid;
    place-items: center;
    min-width: 92px;
    padding: 12px 18px;
    border-radius: var(--hsc-r-sm);
    background: var(--hsc-brand);
    color: #fff;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
}
.hsc-verdict-badge small { display: block; font-size: 11px; font-weight: 600; opacity: .9; margin-top: 2px; }
.hsc-verdict-main h3 { font-size: 19px; font-weight: 800; margin: 0 0 6px; color: #fff; letter-spacing: -.01em; }
.hsc-verdict-main p { font-size: 14px; line-height: 1.75; color: #C6D8E8; margin: 0; }
.hsc-verdict-main p b { color: #FFB37C; }

/* 尺码卡矩阵 */
.hsc-sizegrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.hsc-sizecard {
    padding: 14px 12px;
    border: 1px solid var(--hsc-line);
    border-radius: var(--hsc-r-sm);
    background: var(--hsc-card-2);
    text-align: center;
    transition: all .16s;
}
.hsc-sizecard .sc-size { font-size: 21px; font-weight: 800; color: var(--hsc-ink); line-height: 1.1; }
.hsc-sizecard .sc-range { font-size: 12.5px; color: var(--hsc-ink-2); margin-top: 4px; font-weight: 600; }
.hsc-sizecard .sc-note { font-size: 11.5px; color: var(--hsc-ink-3); margin-top: 3px; }
.hsc-sizecard.is-hit {
    border-color: var(--hsc-brand);
    background: var(--hsc-brand-soft);
    box-shadow: 0 6px 18px rgba(255, 107, 26, .16);
    transform: translateY(-2px);
}
.hsc-sizecard.is-hit .sc-size { color: var(--hsc-brand); }
.hsc-sizecard.is-near { border-color: var(--hsc-cyan); }
.hsc-sizecard.is-near .sc-size { color: var(--hsc-cyan); }

/* 明细表 */
.hsc-rows { display: flex; flex-direction: column; }
.hsc-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 11px 2px;
    border-bottom: 1px dashed var(--hsc-line);
    font-size: 14px;
}
.hsc-row:last-child { border-bottom: none; }
.hsc-row .rk { color: var(--hsc-ink-2); flex-shrink: 0; }
.hsc-row .rv { color: var(--hsc-ink); font-weight: 700; text-align: right; word-break: break-all; }
.hsc-row .rv em { font-style: normal; color: var(--hsc-ink-3); font-weight: 500; font-size: 12.5px; }

/* 提示条 */
.hsc-note {
    display: flex;
    gap: 11px;
    padding: 13px 16px;
    border-radius: var(--hsc-r-sm);
    font-size: 13.5px;
    line-height: 1.75;
    margin-bottom: 12px;
    border: 1px solid transparent;
}
.hsc-note:last-child { margin-bottom: 0; }
.hsc-note .ico { flex-shrink: 0; font-size: 16px; line-height: 1.5; }
.hsc-note b { font-weight: 700; }
.hsc-note--ok { background: var(--hsc-ok-soft); border-color: color-mix(in srgb, var(--hsc-ok) 26%, transparent); color: var(--hsc-ink-2); }
.hsc-note--ok b { color: var(--hsc-ok); }
.hsc-note--warn { background: var(--hsc-warn-soft); border-color: color-mix(in srgb, var(--hsc-warn) 26%, transparent); color: var(--hsc-ink-2); }
.hsc-note--warn b { color: var(--hsc-warn); }
.hsc-note--danger { background: var(--hsc-danger-soft); border-color: color-mix(in srgb, var(--hsc-danger) 26%, transparent); color: var(--hsc-ink-2); }
.hsc-note--danger b { color: var(--hsc-danger); }

/* 品牌对照表 */
.hsc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.hsc-table th, .hsc-table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--hsc-line-2); }
.hsc-table th {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--hsc-ink-3);
    background: var(--hsc-card-2);
    white-space: nowrap;
}
.hsc-table td { color: var(--hsc-ink-2); }
.hsc-table td:first-child { font-weight: 700; color: var(--hsc-ink); white-space: nowrap; }
.hsc-table tr.is-hit td { background: var(--hsc-brand-soft); color: var(--hsc-ink); }
.hsc-table tr.is-hit td:first-child { color: var(--hsc-brand); }
.hsc-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* 批量换算 */
.hsc-batch textarea {
    width: 100%;
    min-height: 116px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: var(--font-mono, monospace);
    line-height: 1.7;
    color: var(--hsc-ink);
    background: var(--hsc-card-2);
    border: 1px solid var(--hsc-line);
    border-radius: var(--hsc-r-sm);
    outline: none;
    resize: vertical;
}
.hsc-batch textarea:focus { border-color: var(--hsc-brand); box-shadow: 0 0 0 3px var(--hsc-brand-soft); }
.hsc-batch-out {
    margin-top: 12px;
    max-height: 320px;
    overflow: auto;
    border: 1px solid var(--hsc-line);
    border-radius: var(--hsc-r-sm);
}
.hsc-batch-out table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hsc-batch-out th, .hsc-batch-out td { padding: 7px 10px; border-bottom: 1px solid var(--hsc-line-2); text-align: left; }
.hsc-batch-out th { background: var(--hsc-card-2); color: var(--hsc-ink-3); font-size: 12px; font-weight: 700; position: sticky; top: 0; }
.hsc-batch-out td { color: var(--hsc-ink-2); }
.hsc-batch-out td:first-child { font-weight: 700; color: var(--hsc-ink); }

/* 试戴自查 */
.hsc-checklist { list-style: none; margin: 0; padding: 0; }
.hsc-checklist li {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px dashed var(--hsc-line);
    font-size: 14px;
    line-height: 1.72;
    color: var(--hsc-ink-2);
}
.hsc-checklist li:last-child { border-bottom: none; }
.hsc-checklist .tick { flex-shrink: 0; color: var(--hsc-ok); font-weight: 800; }
.hsc-checklist b { color: var(--hsc-ink); }

/* 全文输出 */
.hsc-doc {
    font-family: var(--font-mono, monospace);
    font-size: 13px;
    line-height: 1.85;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--hsc-ink-2);
    background: var(--hsc-card-2);
    border: 1px solid var(--hsc-line);
    border-radius: var(--hsc-r-sm);
    padding: 15px 17px;
    max-height: 460px;
    overflow: auto;
}
.hsc-doc:empty::before { content: "填写信息后点击「生成选购建议」"; color: var(--hsc-ink-3); }

/* 风险卡 */
.hsc-risk { margin-top: 30px; }
.hsc-risk > h2 { font-size: 20px; font-weight: 800; margin: 0 0 16px; letter-spacing: -.01em; }
.hsc-risk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 13px; }
.hsc-risk-card {
    padding: 18px 19px;
    border: 1px solid var(--hsc-line);
    border-left: 3px solid var(--hsc-brand);
    border-radius: var(--hsc-r-sm);
    background: var(--hsc-card);
    box-shadow: var(--hsc-sh-1);
}
.hsc-risk-card h3 { font-size: 15px; font-weight: 750; margin: 0 0 7px; color: var(--hsc-ink); }
.hsc-risk-card p { font-size: 13.5px; line-height: 1.78; color: var(--hsc-ink-2); margin: 0; }
.hsc-risk-card b { color: var(--hsc-ink); }

/* ---------- toast ---------- */
.hsc-toast {
    position: fixed;
    left: 50%; bottom: 28px;
    transform: translateX(-50%) translateY(10px);
    background: var(--hsc-deep);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: 999px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    box-shadow: var(--hsc-sh-3);
}
.hsc-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
    .hsc-hero { grid-template-columns: 1fr; padding: 28px 24px; }
    .hsc-main { grid-template-columns: 1fr; }
    .hsc-side { position: static; }
    .hsc-quick-grid { grid-template-columns: 1fr; gap: 14px; align-items: stretch; }
    .hsc-quick { margin-top: -8px; }
    .hsc-ring { width: 158px; height: 158px; }
    .hsc-ring-num { font-size: 34px; }
}
@media (max-width: 600px) {
    .hsc-hero { padding: 22px 18px; border-radius: var(--hsc-r-md); }
    .hsc-hero h1 { font-size: 23px; }
    .hsc-shape-row { grid-template-columns: repeat(3, 1fr); }
    .hsc-verdict { grid-template-columns: 1fr; text-align: center; }
    .hsc-verdict-badge { justify-self: center; }
    .hsc-sizegrid { grid-template-columns: repeat(2, 1fr); }
    .hsc-qfield--act { align-items: stretch; }
}

/* ---------- 打印 ---------- */
@media print {
    .hsc-actions, .hsc-batch, .hsc-toast { display: none !important; }
    .hsc-hero { background: none; box-shadow: none; border: 1px solid #999; }
    .hsc-hero h1, .hsc-hero-sub, .hsc-kicker, .hsc-chips li { color: #000 !important; }
    .hsc-ring { box-shadow: none; }
    .hsc-panel, .hsc-sizecard, .hsc-risk-card { box-shadow: none; break-inside: avoid; }
}
