/* ======================================================================
 *  干眼风险自查 · 独立设计「泪膜计时器」
 *  ------------------------------------------------------------------
 *  配色：湖蓝（清爽、医疗感）为主，莓紫（提示、强调）为辅，柔和大圆角
 *  布局：首屏 SVG 环形计时器 → 横向步骤条 → 左打分右结论 → 习惯卡组
 * ====================================================================== */

.dec {
    --bg: #f3f8fd;
    --bg2: #e6f0fb;
    --card: #ffffff;
    --card2: #f5f9fe;
    --ink: #10263f;
    --sub: #4a6480;
    --faint: #8698ac;
    --line: #dde8f4;
    --line2: #ecf3fa;
    --sky: #1e8fd5;
    --sky-2: #38bdf8;
    --sky-soft: #e2f2fd;
    --sky-ink: #0f6ea8;
    --berry: #c026d3;
    --berry-soft: #f8e8fb;
    --ok: #2f9e44;
    --amber: #e8890c;
    --bad: #e03131;
    --bad-soft: #fdecec;
    --shadow-sm: 0 1px 2px rgba(16, 38, 63, .05), 0 6px 16px rgba(16, 38, 63, .05);
    --shadow: 0 2px 6px rgba(16, 38, 63, .07), 0 20px 46px rgba(16, 38, 63, .09);
    --r: 20px;
    --r-sm: 13px;
    --num: "Bahnschrift", "Segoe UI Variable Text", ui-monospace, SFMono-Regular, Menlo, monospace;

    background:
        radial-gradient(760px 340px at 92% -6%, rgba(56, 189, 248, .16), transparent 60%),
        radial-gradient(620px 320px at 2% 8%, rgba(192, 38, 211, .09), transparent 58%),
        var(--bg);
}

:root[data-theme="dark"] .dec {
    --bg: #080f18;
    --bg2: #0d1725;
    --card: #101b2b;
    --card2: #16243a;
    --ink: #e8f0fa;
    --sub: #9cb0c7;
    --faint: #6f8299;
    --line: #1e2f45;
    --line2: #18263a;
    --sky: #4cc3f5;
    --sky-2: #7dd3fc;
    --sky-soft: rgba(76, 195, 245, .14);
    --sky-ink: #7ccdf8;
    --berry: #e879f9;
    --berry-soft: rgba(232, 121, 249, .14);
    --ok: #51cf66;
    --amber: #ffd43b;
    --bad: #ff8787;
    --bad-soft: rgba(255, 135, 135, .14);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5), 0 6px 16px rgba(0, 0, 0, .3);
    --shadow: 0 2px 6px rgba(0, 0, 0, .55), 0 20px 46px rgba(0, 0, 0, .38);
}

.dec * { box-sizing: border-box; }

/* ---------------- 首屏 ---------------- */
.dec-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 356px;
    gap: 30px;
    align-items: center;
    padding: 30px 0 24px;
}
.dec-hero-l .tsk-h1 { margin-top: 15px; }
.dec-hero-l .tsk-h1 em { color: var(--sky-ink); }

.dec-timer-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    padding: 18px 20px 16px;
}
.dec-timer-t {
    text-align: center;
    font-size: 13px;
    font-weight: 750;
    color: var(--ink);
}
.dec-timer-ring {
    position: relative;
    width: 178px;
    height: 178px;
    margin: 10px auto 8px;
}
.dec-timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dec-ring-bg { fill: none; stroke: var(--line2); stroke-width: 9; }
.dec-ring-fg {
    fill: none;
    stroke: var(--sky);
    stroke-width: 9;
    stroke-linecap: round;
    stroke-dasharray: 326.7;
    stroke-dashoffset: 326.7;
    transition: stroke-dashoffset .3s linear;
}
.dec-timer-num {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.dec-timer-num b {
    font: 800 46px/1 var(--num);
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}
.dec-timer-num i {
    font-style: normal;
    font-size: 12px;
    color: var(--faint);
    margin-top: 4px;
}
.dec-timer-note {
    font-size: 12px;
    line-height: 1.7;
    color: var(--sub);
    text-align: center;
    min-height: 41px;
}
.dec-timer-acts { display: flex; gap: 8px; margin-top: 10px; }
.dec-timer-btn { flex: 1; }
.dec-timer-btn:disabled { opacity: .45; cursor: not-allowed; }
.dec-timer-rec {
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--faint);
}
.dec-timer-rec b { color: var(--sky-ink); font-weight: 750; }
.dec-link {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--faint);
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
}
.dec-link:hover { color: var(--bad); }

/* ---------------- 步骤条 ---------------- */
.dec-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow-sm);
    padding: 18px 20px;
}
.dec-step { display: flex; gap: 11px; align-items: flex-start; }
.dec-step-n {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--sky-soft);
    color: var(--sky-ink);
    font: 800 13px/26px var(--num);
    text-align: center;
    flex: none;
}
.dec-step p {
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--sub);
}

/* ---------------- 主区 ---------------- */
.dec-board {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 348px;
    gap: 16px;
    align-items: start;
}
.dec-col {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow-sm);
    padding: 18px 20px 20px;
}
.dec-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 11px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line2);
}
.dec-gap { margin-top: 24px; }
.dec-inline { font-size: 12px; color: var(--faint); }

.dec-range {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 10px;
    border-radius: 99px;
    background: linear-gradient(90deg, #a7e0ff 0 32%, #8ec9f5 32% 62%, #f3b6e8 62% 100%);
    outline: none;
    cursor: pointer;
}
.dec-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--card);
    border: 5px solid var(--sky);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}
.dec-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--card);
    border: 5px solid var(--sky);
    cursor: pointer;
}
.dec-range-ticks {
    display: flex;
    justify-content: space-between;
    font: 600 10.5px/1 var(--num);
    color: var(--faint);
    margin-top: 6px;
}
.dec-tip {
    margin-top: 9px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--sky-ink);
    background: var(--sky-soft);
    border-radius: 9px;
    padding: 8px 11px;
}

.dec-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.dec-pill {
    border: 1.5px solid var(--line);
    background: var(--card2);
    color: var(--sub);
    border-radius: 99px;
    padding: 9px 16px;
    font: 700 13px/1.4 inherit;
    cursor: pointer;
    transition: .15s;
}
.dec-pill:hover { border-color: var(--sky); color: var(--sky-ink); }
.dec-pill.on {
    background: var(--sky);
    border-color: var(--sky);
    color: #fff;
    box-shadow: 0 6px 14px rgba(30, 143, 213, .25);
}
:root[data-theme="dark"] .dec-pill.on { color: #080f18; }

.dec-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}
.dec-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    text-align: left;
    border: 1.5px solid var(--line);
    background: var(--card2);
    border-radius: var(--r-sm);
    padding: 11px 13px;
    cursor: pointer;
    transition: .15s;
}
.dec-check:hover { border-color: var(--sky); }
.dec-box {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1.5px solid var(--line);
    background: var(--card);
    flex: none;
    margin-top: 2px;
    position: relative;
    transition: .15s;
}
.dec-check.on { border-color: var(--sky); background: var(--sky-soft); }
.dec-check.on .dec-box { background: var(--sky); border-color: var(--sky); }
.dec-check.on .dec-box::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(42deg);
}
.dec-check-main b {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.5;
}
.dec-check-main i {
    display: block;
    font-style: normal;
    font-size: 11.5px;
    color: var(--faint);
    line-height: 1.55;
    margin-top: 1px;
}

/* ---------------- 结论 ---------------- */
.dec-verdict {
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
    border-left: 4px solid var(--sky);
    background: var(--card2);
    padding: 13px 15px;
}
.dec-verdict-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--ink);
    line-height: 1.4;
}
.dec-verdict-advice {
    margin-top: 5px;
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--sub);
}

.dec-tbut {
    margin-top: 14px;
    border-radius: var(--r-sm);
    background: var(--sky-soft);
    padding: 12px 14px;
}
.dec-tbut-t { font-size: 11.5px; color: var(--sky-ink); font-weight: 700; }
.dec-tbut-v {
    font: 800 30px/1.2 var(--num);
    color: var(--ink);
    margin: 4px 0 4px;
    font-variant-numeric: tabular-nums;
}
.dec-tbut-d { font-size: 12px; line-height: 1.75; color: var(--sub); }

.dec-redflag {
    margin-top: 14px;
    border-radius: var(--r-sm);
    background: var(--bad-soft);
    border: 1px solid var(--bad);
    padding: 12px 14px;
}
.dec-redflag b { display: block; color: var(--bad); font-size: 13.5px; }
.dec-redflag span { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.75; color: var(--ink); }

.dec-actions {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    gap: 7px;
}
.dec-actions li {
    position: relative;
    padding: 9px 12px 9px 30px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--card2);
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--sub);
}
.dec-actions li::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--berry);
}
.dec-result-acts { margin-top: 16px; display: grid; gap: 8px; }
.dec-full { width: 100%; }

/* ---------------- 习惯卡 ---------------- */
.dec-habits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 14px;
}
.dec-habit {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.dec-habit::after {
    content: "";
    position: absolute;
    right: -20px;
    top: -20px;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, .16), transparent 70%);
}
.dec-habit h3 { color: var(--sky-ink); margin-bottom: 6px; }
.dec-habit p { font-size: 13px; line-height: 1.85; color: var(--sub); }

/* ---------------- 弹窗内容 ---------------- */
.dec-modal-level {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line2);
}
.dec-modal-num {
    font: 800 42px/1 var(--num);
    font-variant-numeric: tabular-nums;
    flex: none;
}
.dec-modal-num small { font-size: 15px; color: var(--faint); }
.dec-modal-level b { display: block; font-size: 16px; font-weight: 800; }
.dec-modal-level span { display: block; font-size: 12.5px; line-height: 1.7; color: var(--sub); margin-top: 3px; }
.dec-modal-list { margin: 14px 0 0; padding-left: 1.2em; display: grid; gap: 6px; }
.dec-modal-list li { font-size: 13px; line-height: 1.85; color: var(--sub); }
.dec-modal-list li::marker { color: var(--berry); font-weight: 700; }
.dec-modal-flag {
    margin-top: 14px;
    background: var(--bad-soft);
    border: 1px solid var(--bad);
    border-radius: 10px;
    padding: 11px 13px;
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--ink);
}
.dec-modal-note { margin-top: 12px; font-size: 12px; color: var(--faint); line-height: 1.7; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
    .dec-board { grid-template-columns: 1fr; }
    .dec-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .dec-hero { grid-template-columns: 1fr; gap: 20px; }
    .dec-checks { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .dec-steps { grid-template-columns: 1fr; }
}
