/* =====================================================================
 * 34 伴郎伴娘任务分派 · PARTY CARDS
 * 独立设计：玫瑰粉 + 奶油白；首屏右半是横向环节轨道与可点选人物卡牌，
 * 点卡牌即给当前环节加任务；任务表为圆润卡片式行，物品为缎带标签。
 * ===================================================================== */
.wpt {
    --ag-bg: #fdf6f7;
    --ag-bg2: #f7e9ec;
    --ag-surface: #ffffff;
    --ag-surface2: #fdf8f9;
    --ag-ink: #3d2b31;
    --ag-ink2: #6d555d;
    --ag-muted: #a38b92;
    --ag-line: #efdfe3;
    --ag-line2: #e0c6cd;
    --ag-accent: #c25f7d;
    --ag-accent2: #d8a35b;
    --ag-on: #ffffff;
    --ag-ok: #2a7357;
    --ag-okbg: #e4f2ea;
    --ag-warn: #9a6416;
    --ag-warnbg: #fbefd6;
    --ag-bad: #b34b48;
    --ag-badbg: #fbe9e6;
    --ag-info: #9a5570;
    --ag-infobg: #f9ecf1;
    --ag-r: 20px;
    --ag-shadow: 0 12px 32px rgba(61, 43, 49, .08);
    --ag-h: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    --ag-b: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    --ag-m: "JetBrains Mono", Consolas, monospace;
}
:root[data-theme="dark"] .wpt {
    --ag-bg: #1b1418;
    --ag-bg2: #271b21;
    --ag-surface: #241a20;
    --ag-surface2: #2b2027;
    --ag-ink: #f5e9ee;
    --ag-ink2: #cdb3bd;
    --ag-muted: #9c818c;
    --ag-line: #3a2a32;
    --ag-line2: #4c3641;
    --ag-accent: #e89ab4;
    --ag-accent2: #e8c07f;
    --ag-on: #191015;
    --ag-ok: #7fd0a7;
    --ag-okbg: #173529;
    --ag-warn: #e5bd73;
    --ag-warnbg: #382c17;
    --ag-bad: #ef9a90;
    --ag-badbg: #3a2220;
    --ag-info: #e89ab4;
    --ag-infobg: #33202a;
    --ag-shadow: 0 12px 34px rgba(0, 0, 0, .42);
}
.wpt { background: var(--ag-bg) radial-gradient(700px 320px at 12% -2%, rgba(194, 95, 125, .09), transparent 70%) no-repeat; }
.wpt h1, .wpt h2, .wpt h3 { letter-spacing: -.02em; }
.wpt input, .wpt select, .wpt textarea {
    width: 100%; background: var(--ag-surface2); color: var(--ag-ink);
    border: 1px solid var(--ag-line2); border-radius: 10px; padding: 8px 10px;
    font-size: 13px; line-height: 1.6; outline: none;
}
.wpt input:focus, .wpt select:focus, .wpt textarea:focus { border-color: var(--ag-accent); box-shadow: 0 0 0 3px rgba(194, 95, 125, .12); }
.wpt textarea { resize: vertical; font-family: var(--ag-m); font-size: 12.5px; }
.wpt label { display: block; font-size: 11.5px; font-weight: 650; color: var(--ag-ink2); margin-bottom: 4px; }
.wpt code { background: var(--ag-bg2); color: var(--ag-accent); }

/* ---------- 首屏 ---------- */
.wpt-hero { display: grid; grid-template-columns: .92fr 1.08fr; background: var(--ag-surface); border: 1px solid var(--ag-line); border-radius: var(--ag-r); overflow: hidden; box-shadow: var(--ag-shadow); }
.wpt-intro { padding: 32px 30px 22px; }
.wpt-kicker { display: inline-block; font-family: var(--ag-m); font-size: 10px; letter-spacing: .16em; color: var(--ag-accent); background: var(--ag-infobg); border-radius: 999px; padding: 5px 13px; margin-bottom: 16px; }
.wpt-hero h1 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 850; margin-bottom: 12px; }
.wpt-lede { font-size: 14px; line-height: 2; color: var(--ag-ink2); }
.wpt-lede b { color: var(--ag-accent); font-weight: 750; }
.wpt-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.wpt-rules { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.wpt-rules span { font-size: 11.5px; font-weight: 650; color: var(--ag-ink2); background: var(--ag-surface2); border: 1px solid var(--ag-line2); border-radius: 999px; padding: 4px 12px; }
.wpt-quick-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.wpt-intro-note { font-size: 11.5px; line-height: 1.8; color: var(--ag-muted); margin: 13px 0 0; padding-top: 10px; border-top: 1px dashed var(--ag-line2); }
.wpt-art { display: block; width: 100%; max-width: 270px; height: auto; margin: 14px 0 0 auto; opacity: .9; }

.wpt-board { padding: 26px 26px 20px; background: linear-gradient(160deg, #fff8f9, #fbf2f4); border-left: 1px solid var(--ag-line); }
:root[data-theme="dark"] .wpt-board { background: linear-gradient(160deg, #2a1e24, var(--ag-surface2)); }
.wpt-board-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--ag-line2); padding-bottom: 9px; }
.wpt-board-hd b { font-size: 16px; }
.wpt-board-hd span { font-family: var(--ag-m); font-size: 11px; font-weight: 700; color: var(--ag-accent); }
.wpt-board-hd.sub { margin-top: 20px; }
.wpt-board-hd.sub span { font-family: var(--ag-b); font-size: 11px; font-weight: 500; color: var(--ag-muted); }
.wpt-stages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; }
.wpt-stage { position: relative; padding: 10px 4px; border: 1px solid var(--ag-line2); border-radius: 12px; background: var(--ag-surface); color: var(--ag-ink2); font-size: 12px; font-weight: 700; text-align: center; }
.wpt-stage i { display: block; font-family: var(--ag-m); font-style: normal; font-size: 9.5px; color: var(--ag-muted); }
.wpt-stage.is-on { background: var(--ag-accent); border-color: var(--ag-accent); color: #fff; }
.wpt-stage.is-on i { color: #ffe7ef; }
.wpt-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; max-height: 232px; overflow-y: auto; }
.wpt-card { position: relative; padding: 11px 8px 9px; border: 1px solid var(--ag-line2); border-radius: 14px; background: var(--ag-surface); text-align: center; cursor: pointer; transition: transform .12s, border-color .15s, background .15s; }
.wpt-card:hover { transform: translateY(-2px); border-color: var(--ag-accent); }
.wpt-avatar { width: 30px; height: 30px; margin: 0 auto 6px; border-radius: 50%; background: var(--ag-bg2); display: grid; place-items: center; font-size: 13px; color: var(--ag-accent); }
.wpt-card b { display: block; font-size: 11.5px; }
.wpt-card small { font-family: var(--ag-m); font-size: 10px; color: var(--ag-muted); }
.wpt-card .cnt { position: absolute; right: 5px; top: 5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--ag-accent2); color: #402b12; font-family: var(--ag-m); font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.wpt-board-foot { font-size: 11px; line-height: 1.8; color: var(--ag-muted); margin-top: 12px; }

/* ---------- 按钮 ---------- */
.wpt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 17px; border-radius: 999px; font-size: 13px; font-weight: 750; border: 1px solid transparent; transition: transform .13s, box-shadow .13s, background .13s; }
.wpt-btn:hover { transform: translateY(-1px); }
.wpt-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.wpt-btn-main { background: var(--ag-accent); color: #fff; box-shadow: 0 6px 16px rgba(194, 95, 125, .24); }
.wpt-btn-soft { background: var(--ag-infobg); color: var(--ag-accent); border-color: var(--ag-line2); }
.wpt-btn-line { background: transparent; color: var(--ag-ink2); border-color: var(--ag-line2); }
.wpt-btn-line:hover { border-color: var(--ag-accent); color: var(--ag-accent); }
.wpt-btn-mini { padding: 5px 11px; font-size: 11.5px; }

/* ---------- 表格 / 物品 ---------- */
.wpt-sec-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 42px 0 16px; }
.wpt-sec-hd h2 { font-size: 21px; display: flex; align-items: center; gap: 11px; }
.wpt-sec-hd h2 i { font-family: var(--ag-m); font-style: normal; font-size: 10.5px; color: #fff; background: var(--ag-accent); border-radius: 8px; padding: 3px 8px; }
.wpt-sec-hd span { font-size: 12px; color: var(--ag-muted); }
.wpt-panel { background: var(--ag-surface); border: 1px solid var(--ag-line); border-radius: var(--ag-r); padding: 18px 20px; min-width: 0; }
.wpt-panel-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--ag-line); padding-bottom: 9px; margin-bottom: 12px; }
.wpt-panel-hd h3 { font-size: 16px; }
.wpt-panel-hd span { font-size: 11px; color: var(--ag-muted); }
.wpt-scroll { overflow-x: auto; }
.wpt-table { width: 100%; min-width: 820px; font-size: 12.5px; }
.wpt-table th { text-align: left; background: var(--ag-bg2); color: var(--ag-ink2); font-size: 11px; padding: 8px 8px; border-bottom: 2px solid var(--ag-line2); white-space: nowrap; }
.wpt-table td { padding: 6px 6px; border-bottom: 1px dotted var(--ag-line); }
.wpt-table input, .wpt-table select { padding: 5px 7px; font-size: 12px; border-radius: 7px; }
.wpt-table tr.dup { background: var(--ag-badbg); }
.wpt-del { border: 0; background: transparent; color: var(--ag-bad); font-size: 17px; }
.wpt-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.wpt-item { display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; background: var(--ag-surface); border: 1px solid var(--ag-line); border-radius: 14px; cursor: pointer; }
.wpt-item input { width: 15px; height: 15px; flex: none; margin-top: 3px; accent-color: var(--ag-accent); }
.wpt-item b { display: block; font-size: 13px; }
.wpt-item small { display: block; font-size: 11px; color: var(--ag-muted); line-height: 1.65; margin-top: 2px; }
.wpt-item.is-on { border-color: var(--ag-ok); background: var(--ag-okbg); }
.wpt-err { margin-top: 12px; padding: 10px 13px; border-radius: 10px; background: var(--ag-badbg); color: var(--ag-bad); font-size: 12.5px; }
.wpt-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }

/* ---------- 结果 ---------- */
.wpt-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.wpt-stat { background: var(--ag-surface); border: 1px solid var(--ag-line); border-radius: 14px; padding: 12px 15px; }
.wpt-stat small { display: block; font-size: 11px; color: var(--ag-muted); }
.wpt-stat b { display: block; font-family: var(--ag-m); font-size: 20px; line-height: 1.5; }
.wpt-result-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; }
.wpt-next { margin: 0; padding-left: 20px; font-size: 12.8px; line-height: 1.95; color: var(--ag-ink2); }
.wpt-next li { margin-bottom: 7px; }
.wpt-next b { color: var(--ag-accent); }
.wpt-notes { display: grid; gap: 8px; font-size: 12.5px; line-height: 1.85; color: var(--ag-ink2); }
.wpt-notes > div { padding: 9px 11px; border-left: 3px solid var(--ag-line2); background: var(--ag-surface2); border-radius: 0 8px 8px 0; }
.wpt-notes > div.ok { border-left-color: var(--ag-ok); background: var(--ag-okbg); }
.wpt-notes > div.no { border-left-color: var(--ag-bad); background: var(--ag-badbg); }
.wpt-clean { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; font-size: 11.5px; }
.wpt-clean > b { color: var(--ag-ink2); }
.wpt-clean #wptPreview { flex: 1 1 100%; font-family: var(--ag-m); font-size: 11px; color: var(--ag-muted); background: var(--ag-surface2); border-left: 2px solid var(--ag-accent2); border-radius: 6px; padding: 6px 9px; overflow-wrap: anywhere; white-space: normal; }
.wpt-panel > label { font-size: 12px; margin-bottom: 8px; line-height: 1.8; }
.wg4-read { margin-top: 46px; padding: 26px 28px; border-radius: var(--ag-r); background: var(--ag-surface); border: 1px solid var(--ag-line); }
.wg4-read h2 { font-size: 21px; margin-bottom: 16px; }
.wg4-read p { font-size: 14px; line-height: 2.05; color: var(--ag-ink2); margin-bottom: 14px; }
.wg4-read p:last-child { margin-bottom: 0; }
.wg4-read b { color: var(--ag-accent); }

@media (max-width: 1080px) {
    .wpt-hero { grid-template-columns: 1fr; }
    .wpt-board { border-left: 0; border-top: 1px solid var(--ag-line); }
    .wpt-art { display: none; }
    .wpt-items { grid-template-columns: repeat(2, 1fr); }
    .wpt-result-grid { grid-template-columns: 1fr; }
    .wpt-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
    .wpt-intro, .wpt-board { padding: 22px 16px; }
    .wpt-fields { grid-template-columns: 1fr 1fr; }
    .wpt-stages { grid-template-columns: repeat(3, 1fr); }
    .wpt-cards { grid-template-columns: repeat(3, 1fr); }
    .wpt-items { grid-template-columns: 1fr; }
    .wg4-read { padding: 20px 18px; }
}
