/*!
 * 谁是卧底在线 · who-is-spy
 * 独立设计系统「聚会身份卡」：酒红 + 香槟金 + 深紫 + 奶油
 * 字体层级：优雅衬线标题 + 等宽编号；卡片为烫金边圆角牌
 */
.wis-page, .wis-modal, .wis-toast {
    --wis-bg: #faf4ec;
    --wis-card: #fffdf8;
    --wis-card2: #f3ebe0;
    --wis-line: #e3d4c4;
    --wis-ink: #2c1b2c;
    --wis-ink2: #7a6a76;
    --wis-wine: #76223e;
    --wis-gold: #b48a46;
    --wis-gold-soft: rgba(180, 138, 70, .14);
    --wis-purple: #443052;
    --wis-serif: Georgia, "Songti SC", "SimSun", serif;
    --wis-num: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
:root[data-theme="dark"] .wis-page, :root[data-theme="dark"] .wis-modal, :root[data-theme="dark"] .wis-toast {
    --wis-bg: #141017;
    --wis-card: #1e1720;
    --wis-card2: #271d2b;
    --wis-line: #413244;
    --wis-ink: #f6edf1;
    --wis-ink2: #b9a4b3;
    --wis-wine: #e0799b;
    --wis-gold: #e0bd7b;
    --wis-gold-soft: rgba(224, 189, 123, .15);
    --wis-purple: #b79bd1;
}
.wis-page { background: var(--wis-bg); color: var(--wis-ink); font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-size: 15px; line-height: 1.8; }
.wis-page *, .wis-page *::before, .wis-page *::after { box-sizing: border-box; }
.wis-wrap { max-width: 1160px; margin: 0 auto; padding: 20px 16px 12px; }
.wis-page .detail-breadcrumb { margin: 0 0 16px; font-size: 13px; color: var(--wis-ink2); }
.wis-page .detail-breadcrumb a { color: var(--wis-wine); text-decoration: none; }
.wis-page .detail-breadcrumb .sep { margin: 0 8px; opacity: .6; }

/* ---------- Hero ---------- */
.wis-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 22px; align-items: center; padding: 28px 32px; border: 1px solid var(--wis-line); border-radius: 4px; background: radial-gradient(100% 130% at 100% 0, var(--wis-gold-soft), transparent 58%), linear-gradient(145deg, var(--wis-card), var(--wis-card2)); box-shadow: 0 20px 42px -32px rgba(44, 27, 44, .8); }
.wis-kicker { font: 700 11px var(--wis-num); letter-spacing: .26em; color: var(--wis-gold); }
.wis-hero h1 { margin: 10px 0 6px; font: 700 clamp(29px, 3.5vw, 42px)/1.2 var(--wis-serif); letter-spacing: .06em; }
.wis-sub { margin: 0 0 18px; color: var(--wis-ink2); font-size: 15px; }
.wis-sub b { color: var(--wis-wine); }
.wis-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.wis-cta { cursor: pointer; border: 1px solid #5c1730; border-radius: 3px; padding: 11px 26px; font-size: 15px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #8d2b49, #651b35); box-shadow: 0 8px 20px -12px rgba(101, 27, 53, .95); }
.wis-cta:hover { filter: brightness(1.12); }
.wis-ghost, .wis-mini { cursor: pointer; border: 1px solid var(--wis-line); border-radius: 3px; background: var(--wis-card); color: var(--wis-ink); font-size: 13px; font-weight: 700; padding: 10px 18px; }
.wis-mini { padding: 8px 12px; font-size: 12px; }
.wis-mini:disabled { opacity: .45; cursor: not-allowed; }
.wis-ghost:hover, .wis-mini:hover:not(:disabled) { border-color: var(--wis-gold); color: var(--wis-wine); }
.wis-hero-note { margin: 14px 0 0; font-size: 12px; color: var(--wis-ink2); }
.wis-cards { position: relative; justify-self: center; width: 230px; height: 155px; }
.wis-card { position: absolute; width: 96px; height: 134px; display: grid; place-items: center; border-radius: 12px; border: 1.5px solid var(--wis-gold); background: linear-gradient(160deg, var(--wis-purple), #2a1b33); color: var(--wis-gold); font: 700 34px var(--wis-serif); box-shadow: 0 12px 24px -14px rgba(0,0,0,.8); }
.wis-card span { position: absolute; bottom: 8px; font: 10px var(--wis-num); letter-spacing: .18em; }
.wis-card-a { left: 0; top: 12px; transform: rotate(-15deg); }
.wis-card-b { left: 66px; top: 2px; transform: rotate(-2deg); }
.wis-card-c { left: 132px; top: 14px; transform: rotate(13deg); background: linear-gradient(160deg, #8d2b49, #4f172f); color: #ffe6b0; }

/* ---------- 面板 ---------- */
.wis-panel { margin-top: 18px; border: 1px solid var(--wis-line); border-radius: 4px; background: var(--wis-card); overflow: hidden; }
.wis-topbar { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--wis-line); background: var(--wis-gold-soft); }
.wis-metric { padding: 11px 15px; border-right: 1px solid var(--wis-line); }
.wis-metric:last-child { border-right: 0; }
.wis-metric span { display: block; font-size: 11px; color: var(--wis-ink2); }
.wis-metric b { font: 700 19px var(--wis-serif); color: var(--wis-wine); }
.wis-main { display: grid; grid-template-columns: minmax(0, 1fr) 310px; }
.wis-table-area { min-width: 0; padding: 18px; }
.wis-table-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 13px; color: var(--wis-ink2); }
.wis-table-head b { color: var(--wis-ink); }
.wis-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
.wis-id { position: relative; min-height: 116px; border: 1.5px solid var(--wis-gold); border-radius: 10px; background: linear-gradient(160deg, var(--wis-purple), #2a1b33); color: #f4e6cf; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; }
:root[data-theme="dark"] .wis-id { background: linear-gradient(160deg, #3a2844, #24182c); }
.wis-id:hover { transform: translateY(-2px); }
.wis-id .no { font: 700 11px var(--wis-num); letter-spacing: .2em; color: var(--wis-gold); }
.wis-id .nm { font-weight: 800; font-size: 14px; }
.wis-id .mark { font-size: 22px; }
.wis-id.is-out { opacity: .42; filter: grayscale(1); cursor: default; text-decoration: line-through; }
.wis-id.is-viewed { outline: 2px solid var(--wis-gold); outline-offset: 2px; }
.wis-reveal { margin-top: 14px; padding: 18px; border: 1.5px dashed var(--wis-gold); border-radius: 10px; text-align: center; background: var(--wis-card2); }
.wis-reveal[hidden] { display: none !important; }
.wis-reveal-no { font: 700 11px var(--wis-num); letter-spacing: .2em; color: var(--wis-gold); }
.wis-reveal b { display: block; font-size: 17px; }
.wis-reveal p { margin: 6px 0 2px; font-size: 12px; color: var(--wis-ink2); }
.wis-reveal strong { display: block; font: 700 26px var(--wis-serif); color: var(--wis-wine); margin-bottom: 12px; }
.wis-vote { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--wis-line); }
.wis-vote h2 { margin: 0 0 10px; font: 700 16px var(--wis-serif); }
.wis-inline { display: flex; gap: 8px; }
.wis-inline .wis-input { flex: 1; }
.wis-rounds { margin: 12px 0 0; padding-left: 20px; font-size: 12px; color: var(--wis-ink2); max-height: 110px; overflow: auto; }

/* ---------- 侧栏 ---------- */
.wis-side { min-width: 0; padding: 18px; border-left: 1px solid var(--wis-line); background: var(--wis-card2); }
.wis-side-title { margin: 0 0 10px; font: 700 14px var(--wis-serif); color: var(--wis-wine); border-bottom: 1px solid var(--wis-line); padding-bottom: 5px; }
.wis-side-title:not(:first-child) { margin-top: 20px; }
.wis-l { display: block; margin: 9px 0 4px; font-size: 12px; color: var(--wis-ink2); }
.wis-input { width: 100%; min-width: 0; border: 1px solid var(--wis-line); border-radius: 4px; padding: 8px 9px; background: var(--wis-card); color: var(--wis-ink); font: 13px/1.6 inherit; }
.wis-input:focus { outline: 2px solid var(--wis-gold); outline-offset: 1px; }
.wis-ta { resize: vertical; font-family: var(--wis-num); font-size: 12px; }
.wis-dims { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wis-validate, .wis-check { min-height: 20px; margin: 6px 0 0; font-size: 12px; color: var(--wis-wine); white-space: pre-wrap; }
.wis-row { display: flex; gap: 7px; margin-top: 9px; flex-wrap: wrap; }
.wis-ai-btn { width: 100%; cursor: pointer; border: 1px solid var(--wis-gold); border-radius: 4px; padding: 10px; font-size: 13px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #8d2b49, var(--wis-purple)); }
.wis-btn-ai:hover { filter: brightness(1.12); }
.wis-ai-out { margin-top: 10px; padding: 12px; border-radius: 6px; background: var(--wis-card); border: 1px solid var(--wis-line); font-size: 12px; line-height: 1.9; white-space: pre-wrap; max-height: 220px; overflow: auto; }
.wis-ai-out[hidden] { display: none !important; }
.wis-ai-note { margin: 8px 0 0; font-size: 11px; color: var(--wis-ink2); }
.wis-pair { font: 13px/1.9 var(--wis-serif); color: var(--wis-ink2); }
.wis-dim { margin: 0; font-size: 12px; color: var(--wis-ink2); }

/* ---------- 实验室 ---------- */
.wis-lab { margin-top: 18px; padding: 22px; border: 1px solid var(--wis-line); border-radius: 4px; background: var(--wis-card); }
.wis-lab-head h2 { margin: 0 0 4px; font: 700 20px var(--wis-serif); }
.wis-lab-head p { margin: 0 0 16px; font-size: 13px; color: var(--wis-ink2); }
.wis-lab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wis-lab-box { min-width: 0; padding: 16px; border: 1px dashed var(--wis-line); border-radius: 4px; background: var(--wis-card2); }
.wis-lab-box label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.wis-lib { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; max-height: 150px; overflow: auto; font: 11px/1.9 var(--wis-num); }
.wis-lib span { padding: 3px 6px; border: 1px solid var(--wis-line); background: var(--wis-card); }
.wis-lab-note { margin: 10px 0 0; font-size: 12px; color: var(--wis-ink2); }
.wis-lab-note code { font-family: var(--wis-num); background: var(--wis-gold-soft); padding: 1px 4px; }

/* ---------- 弹窗 / toast ---------- */
.wis-modal { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(28, 16, 28, .68); }
.wis-modal[hidden] { display: none !important; }
.wis-modal-box { position: relative; width: min(420px, 100%); padding: 28px; border: 2px solid var(--wis-gold); border-radius: 8px; background: var(--wis-card); text-align: center; }
.wis-modal-x { position: absolute; right: 12px; top: 6px; border: 0; background: transparent; font-size: 25px; color: var(--wis-ink2); cursor: pointer; }
.wis-modal-badge { font: 700 11px var(--wis-num); letter-spacing: .2em; color: var(--wis-gold); }
.wis-modal-box h2 { margin: 10px 0 6px; font: 700 25px var(--wis-serif); }
.wis-modal-box p { margin: 0 0 14px; color: var(--wis-ink2); font-size: 13px; }
.wis-modal-list { margin-bottom: 18px; font: 12px/2 var(--wis-num); text-align: left; }
.wis-modal-list div { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--wis-line); }
.wis-toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 9500; padding: 10px 18px; border-radius: 4px; background: var(--wis-ink); color: var(--wis-card); font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .25s; }
.wis-toast.on { opacity: 1; }

@media (max-width: 940px) {
    .wis-hero { grid-template-columns: 1fr; }
    .wis-cards { display: none; }
    .wis-main { grid-template-columns: 1fr; }
    .wis-side { border-left: 0; border-top: 1px solid var(--wis-line); }
    .wis-lab-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .wis-topbar { grid-template-columns: repeat(2, 1fr); }
    .wis-metric:nth-child(2) { border-right: 0; }
    .wis-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .wis-id { min-height: 96px; }
    .wis-hero h1 { font-size: 29px; }
}
