/* ============================================================
   css/beta-survey.css — 一测体验感与意见收集（全屏问卷页，TASK-BETA-SURVEY-001）

   外壳直接复用 css/announcements.css 的 .kp-page / .kp-topbar / .kp-scroll
   （absolute 挂 #app 内、自带浅色底、顶栏让出安全区），这里只补问卷自己的东西。
   类前缀 .sv-；不写死高度，滚动底留白交给 .kp-scroll。
   ============================================================ */

.sv-page {
    /* 从收件箱列表层（.ibx-overlay）之上打开，别被压在下面 */
    z-index: 2000;
}
.sv-scroll {
    padding-bottom: calc(96px + var(--safe-bottom, 0px));
}

/* ===== 头部 ===== */
.sv-hero {
    padding: 18px 2px 14px;
    border-bottom: 1px solid var(--gold-light, rgba(196, 168, 106, 0.15));
    margin-bottom: 14px;
}
.sv-hero-title {
    font-family: var(--font-decorative, 'Playfair Display', Georgia, serif);
    font-size: 20px;
    letter-spacing: 2px;
    color: var(--text-primary, #1E1C1A);
}
.sv-hero-sub {
    margin-top: 7px;
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--text-secondary, #7A6E64);
}

/* ===== 题块 ===== */
.sv-q {
    padding: 15px 14px 16px;
    margin-bottom: 12px;
    border-radius: 16px;
    background: #fffdfa;
    border: 1px solid var(--border-faint, rgba(196, 168, 140, 0.16));
}
.sv-q-title {
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0.5px;
    color: var(--text-primary, #1E1C1A);
}
.sv-req { color: var(--rose, #C9A8A8); margin-left: 3px; }
.sv-q-sub {
    margin-top: 5px;
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--text-tertiary, #9A8F84);
}

/* ===== 选项 ===== */
.sv-opts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}
.sv-opt {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid var(--border-faint, rgba(196, 168, 140, 0.2));
    background: #fff;
    color: var(--text-primary, #1E1C1A);
    font-size: 13px;
    font-family: var(--font-body, inherit);
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
}
.sv-opt:active { transform: scale(0.985); }
.sv-opt.on {
    border-color: rgba(201, 168, 168, 0.75);
    background: rgba(201, 168, 168, 0.1);
}
.sv-tick {
    position: relative;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1.4px solid var(--border-soft, rgba(196, 168, 140, 0.45));
    transition: border-color 0.18s ease, background 0.18s ease;
}
.sv-opt.on .sv-tick {
    border-color: var(--rose, #C9A8A8);
    background: var(--rose, #C9A8A8);
}
.sv-opt.on .sv-tick::after {
    content: '';
    position: absolute;
    left: 4.5px;
    top: 1.5px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}
.sv-opt-label { flex: 1; min-width: 0; line-height: 1.5; }

/* ===== 打分（1~5）===== */
.sv-rate-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
}
.sv-rate-label {
    flex: 1;
    min-width: 0;
    font-size: 12.5px;
    color: var(--text-primary, #1E1C1A);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sv-stars { display: flex; gap: 4px; flex-shrink: 0; }
.sv-star {
    width: 27px;
    height: 27px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--border-faint, rgba(196, 168, 140, 0.25));
    background: #fff;
    color: var(--text-tertiary, #9A8F84);
    font-size: 11px;
    font-family: var(--font-body, inherit);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}
.sv-star:active { transform: scale(0.92); }
.sv-star.on {
    background: rgba(201, 168, 168, 0.88);
    border-color: rgba(201, 168, 168, 0.9);
    color: #fff;
}

/* ===== 文本框 / 名字 / 同意 ===== */
.sv-textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 84px;
    margin-top: 12px;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-faint, rgba(196, 168, 140, 0.2));
    background: #fff;
    color: var(--text-primary, #1E1C1A);
    font-family: var(--font-body, inherit);
    font-size: 13px;
    line-height: 1.7;
    resize: none;
    outline: none;
    -webkit-appearance: none;
    transition: border-color 0.18s ease;
}
.sv-textarea:focus { border-color: rgba(201, 168, 168, 0.6); }
.sv-name { margin-top: 12px; }
.sv-input {
    width: 100%;
    box-sizing: border-box;
    height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--border-faint, rgba(196, 168, 140, 0.2));
    background: #fff;
    color: var(--text-primary, #1E1C1A);
    font-family: var(--font-body, inherit);
    font-size: 13px;
    outline: none;
    -webkit-appearance: none;
    transition: border-color 0.18s ease;
}
.sv-input:focus { border-color: rgba(201, 168, 168, 0.6); }
.sv-consent {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 11px;
    cursor: pointer;
}
.sv-consent input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    margin: 0;
}
.sv-box {
    position: relative;
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    margin-top: 1px;
    border-radius: 5px;
    border: 1.4px solid var(--border-soft, rgba(196, 168, 140, 0.45));
    background: #fff;
    transition: border-color 0.18s ease, background 0.18s ease;
}
.sv-consent input:checked + .sv-box {
    background: var(--rose, #C9A8A8);
    border-color: var(--rose, #C9A8A8);
}
.sv-consent input:checked + .sv-box::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}
.sv-consent-text {
    flex: 1;
    font-size: 11.5px;
    line-height: 1.65;
    color: var(--text-secondary, #7A6E64);
}

/* ===== 底部提交（不随滚动走，自己让出底部安全区）===== */
.sv-foot {
    flex-shrink: 0;
    padding: 10px 14px calc(12px + var(--safe-bottom, 0px));
    background: rgba(250, 246, 241, 0.97);
    border-top: 1px solid var(--border-faint, rgba(196, 168, 140, 0.14));
}
.sv-submit {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 23px;
    background: linear-gradient(135deg, #C9A8A8, #B88F8F);
    color: #fff;
    font-size: 14px;
    font-family: var(--font-body, inherit);
    letter-spacing: 3px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.18s ease, transform 0.12s ease;
}
.sv-submit:active { transform: scale(0.985); }
.sv-submit:disabled { opacity: 0.65; }

/* ===== 完成 / 已结束 / 打不开 ===== */
.sv-done {
    padding: 52px 18px 40px;
    text-align: center;
}
.sv-done-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    border-radius: 50%;
    border: 1px solid rgba(201, 168, 168, 0.45);
    background: rgba(201, 168, 168, 0.08);
    color: var(--rose, #C9A8A8);
}
.sv-done-title {
    font-family: var(--font-decorative, 'Playfair Display', Georgia, serif);
    font-size: 19px;
    letter-spacing: 2px;
    color: var(--text-primary, #1E1C1A);
}
.sv-done-sub {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.85;
    color: var(--text-secondary, #7A6E64);
}
.sv-done-note {
    margin-top: 18px;
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--text-tertiary, #9A8F84);
}
.sv-hint {
    padding: 40px 0;
    text-align: center;
    font-size: 12.5px;
    color: var(--text-tertiary, #9A8F84);
}

/* ===== 窄屏（<370）===== */
@media (max-width: 370px) {
    .sv-q { padding: 13px 12px 14px; }
    /* 星级不许跟着窄屏缩：360 屏实测缩到 24px 就点不准了（量尺抓到的唯一红项） */
    .sv-star { width: 27px; height: 27px; font-size: 10px; }
    .sv-rate-label { font-size: 12px; }
    .sv-hero-title { font-size: 18px; }
}
