/* ============================================================
 * 值日Roll · style.css
 * 移动端优先 · 彩色粗野主义（New Brutalism）· 难度三色贯穿 🟢🟡🔴
 * ============================================================ */

:root {
  --c-bg: #F5F0E8;
  --c-card: #FFFFFF;
  --c-primary: #FF6B35;
  --c-primary-deep: #E55A2B;
  --c-text: #000000;
  --c-text2: #555555;
  --c-line: #000000;
  --c-green: #00C853;
  --c-yellow: #FFD600;
  --c-red: #FF1744;
  --c-danger: #FF1744;
  --radius: 0px;
  --radius-sm: 0px;
  --shadow: 4px 4px 0 #000;
  --brutal-blue: #1B98E0;
  --brutal-purple: #7B61FF;
  --brutal-pink: #FF6B9D;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.5;
  min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; font-size: 1rem; }
.hidden { display: none !important; }
.muted-text { color: var(--c-text2); font-size: .82rem; margin: 6px 0; line-height: 1.6; }
.warn-text { font-size: .9rem; line-height: 1.7; margin-bottom: 6px; }
b { font-weight: 800; }

/* ---------------- 布局骨架 ---------------- */
.view { max-width: 520px; margin: 0 auto; padding: 16px 16px 96px; }
@media (min-width: 760px) {
  .view { max-width: 720px; }
  .duty-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ---------------- 存储报警横幅（F3-2） ---------------- */
.storage-alert {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--c-red);
  color: #fff; font-size: .85rem; padding: 10px 14px;
  border-bottom: 3px solid #000;
}
.storage-alert-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  background: #FFFFFF; color: var(--c-text);
  font-size: .92rem; font-weight: 700;
  border: 2px solid #000;
  box-shadow: 3px 3px 0 #000;
  transition: transform .08s, box-shadow .08s, background .08s, color .08s;
  min-height: 42px;
}
.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 #000;
  background: #000; color: #fff;
}
.btn-primary {
  background: var(--c-primary); color: #fff;
  border: 3px solid #000;
  box-shadow: 4px 4px 0 #000;
}
.btn-primary:active {
  background: var(--c-primary-deep);
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 #000;
}
.btn-danger { background: var(--c-danger); color: #fff; border: 3px solid #000; box-shadow: 4px 4px 0 #000; }
.btn-danger:active { transform: translate(4px, 4px); box-shadow: 0 0 0 #000; }
.btn-danger-text { color: var(--c-danger); background: #FFFFFF; border: 2px solid var(--c-danger); }
.btn-white { background: #fff; color: var(--c-danger); font-weight: 700; border: 2px solid #000; box-shadow: 3px 3px 0 #000; }
.btn-ghost { background: transparent; border: 3px solid #000; box-shadow: 3px 3px 0 #000; }
.btn-ghost:active { transform: translate(3px, 3px); box-shadow: 0 0 0 #000; background: #000; color: #fff; }
.btn-sm { padding: 7px 12px; min-height: 34px; font-size: .84rem; }
.btn-lg { padding: 14px 20px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn.disabled { opacity: .4; pointer-events: none; }
.btn-col { display: flex; flex-direction: column; gap: 10px; }
.row-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.icon-btn {
  padding: 8px; border-radius: var(--radius-sm); font-size: .95rem; line-height: 1;
  opacity: .55; transition: opacity .15s, background .15s; flex-shrink: 0;
}
.icon-btn:active { background: var(--c-bg); opacity: 1; }
.icon-btn.danger:hover { opacity: 1; }

/* ---------------- ① 引导页 ---------------- */
.welcome-hero { text-align: center; padding: 40px 0 24px; }
.welcome-dice { font-size: 4rem; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-10px) rotate(6deg); } }
.welcome-hero h1 { font-size: 1.9rem; margin: 8px 0 4px; letter-spacing: 1px; font-weight: 900; text-transform: uppercase; }
.welcome-sub { color: var(--c-text2); font-size: .9rem; line-height: 1.7; }
.welcome-import { text-align: center; margin-top: 12px; }

/* ---------------- 卡片与表单 ---------------- */
.card {
  background: var(--c-card); border-radius: var(--radius);
  border: 3px solid #000; box-shadow: 5px 5px 0 #000;
  padding: 16px; margin-bottom: 16px;
}
.card-title {
  font-size: 1.1rem; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center;
  justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
.count-badge {
  background: var(--c-bg); color: var(--c-text); font-size: .75rem;
  padding: 2px 9px; border-radius: 0; font-weight: 700;
  border: 2px solid #000;
}
.form-card { padding: 20px; }
.field { display: block; margin-bottom: 14px; }
.field-label { display: block; font-size: .82rem; color: var(--c-text2); margin-bottom: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.field input[type="text"], .modal input[type="text"], textarea {
  width: 100%; padding: 11px 12px; border: 3px solid #000;
  border-radius: var(--radius-sm); outline: none; background: #FFFFFF;
  transition: border .15s, box-shadow .15s;
}
.field code, .modal-body code {
  background: var(--c-bg); padding: 1px 6px; border-radius: 0;
  font-size: .78em; word-break: break-all;
  border: 1px solid #000;
}
.field input:focus, textarea:focus {
  border-color: var(--c-primary); background: #fff;
  box-shadow: 4px 4px 0 var(--c-primary);
}
textarea { resize: vertical; }
.check-row { display: flex; align-items: flex-start; gap: 8px; font-size: .88rem; margin: 10px 0 16px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--c-primary); }

.icon-row, .color-row { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-opt {
  width: 42px; height: 42px; font-size: 1.3rem; border-radius: 0;
  background: var(--c-bg); transition: all .12s;
  border: 2px solid #000;
}
.icon-opt.active {
  background: var(--c-primary); transform: scale(1.08);
  box-shadow: 3px 3px 0 #000; border-color: #000;
}
.color-opt { width: 34px; height: 34px; border-radius: 0; border: 3px solid #000; transition: all .12s; }
.color-opt.round { border-radius: 50%; }
.color-opt.active { border-color: #000; transform: scale(1.12); box-shadow: 3px 3px 0 #000; }

/* ---------------- ② 组列表 ---------------- */
.page-header { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 18px; }
.page-title-wrap { display: flex; align-items: center; gap: 10px; }
.page-logo { font-size: 1.7rem; }
.page-header h1 { font-size: 1.5rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; }
.page-header-actions { display: flex; gap: 8px; }
.group-list { display: flex; flex-direction: column; gap: 12px; }
.group-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--c-card); border-radius: var(--radius);
  border: 3px solid #000; box-shadow: 5px 5px 0 #000;
  padding: 14px 16px; cursor: pointer; transition: transform .1s, box-shadow .1s;
}
.group-card:active {
  transform: translate(5px, 5px); box-shadow: 0 0 0 #000;
}
.group-card-icon {
  width: 46px; height: 46px; border-radius: 0; font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  border: 2px solid #000;
}
.group-card-main { flex: 1; min-width: 0; }
.group-card-name { font-weight: 800; font-size: 1rem; }
.group-card-meta { font-size: .78rem; color: var(--c-text2); margin-top: 2px; }
.set-info { display: flex; align-items: center; gap: 12px; }
.set-info .btn { margin-left: auto; }

/* ---------------- 组内顶部 ---------------- */
.app-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--c-bg);
  padding: 10px 0 8px;
  border-bottom: 3px solid #000;
}
#view-app { padding-top: 0; }
.group-switcher {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--c-card); border-radius: 0;
  border: 3px solid #000; box-shadow: 3px 3px 0 #000;
  padding: 8px 14px; max-width: 100%;
}
.gs-icon { font-size: 1.1rem; }
.gs-name { font-weight: 800; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-caret { color: var(--c-text2); font-size: .75rem; }
.group-menu {
  position: absolute; left: 16px; right: 16px; top: 52px;
  background: var(--c-card); border-radius: var(--radius);
  border: 3px solid #000; box-shadow: 6px 6px 0 #000;
  padding: 6px; z-index: 110;
}
.group-menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 12px; border-radius: 0; font-size: .95rem; text-align: left;
}
.group-menu-item:active { background: var(--c-bg); }
.group-menu-item.active { background: var(--c-primary); color: #fff; font-weight: 700; }
.gm-icon { font-size: 1.15rem; }
.gm-name { flex: 1; }
.gm-check { color: var(--c-primary); }
.group-menu-sep { height: 3px; background: #000; margin: 6px 8px; }

/* ---------------- ③ 准备页 ---------------- */
.pool-tip {
  background: var(--c-yellow); color: #000; border-radius: 0;
  padding: 9px 12px; font-size: .82rem; margin-bottom: 10px;
  border: 2px solid #000; font-weight: 700;
}
.task-row, .member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 3px solid #000; min-height: 52px;
}
.task-row:last-of-type, .member-row:last-of-type { border-bottom: none; }
.task-row-main, .member-main { flex: 1; min-width: 0; }
.task-row-name, .member-name { font-size: .95rem; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.task-row-sub, .member-sub { font-size: .78rem; color: var(--c-text2); margin-top: 2px; }
.assigned-names { color: var(--c-primary); font-weight: 700; }
.diff-dot { width: 10px; height: 10px; border-radius: 0; flex-shrink: 0; border: 2px solid #000; }
.tag {
  font-size: .68rem; padding: 1.5px 7px; border-radius: 0; font-weight: 700;
  border: 2px solid #000;
}
.tag-pending { background: var(--c-yellow); color: #000; }
.tag-duo { background: var(--c-primary); color: #fff; }
.tag-left { background: var(--c-bg); color: var(--c-text2); }
.tag-care { background: var(--c-green); color: #000; }
.avatar {
  width: 38px; height: 38px; border-radius: 0; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: .95rem; font-weight: 800;
  border: 2px solid #000;
}
.avatar-xs { width: 24px; height: 24px; font-size: .68rem; }
.member-left { opacity: .55; }
.dev-badge {
  font-size: .72rem; padding: 1px 6px; border-radius: 0;
  border: 2px solid #000; font-weight: 700;
}
.dev-low { background: var(--c-green); color: #000; }
.dev-mid { background: var(--c-yellow); color: #000; }
.dev-high { background: var(--c-red); color: #fff; }

/* 参与开关 */
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0; background: #D8DEEA; border-radius: 0;
  transition: background .2s; border: 2px solid #000;
}
.slider::before {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 0;
  background: #fff; top: 2px; left: 2px; transition: transform .2s;
  border: 2px solid #000;
}
.switch input:checked + .slider { background: var(--c-green); }
.switch input:checked + .slider::before { transform: translateX(20px); }

.add-task-form {
  border-top: 3px dashed #000; margin-top: 10px; padding-top: 12px;
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.add-task-form input {
  flex: 1 1 140px; padding: 9px 11px; border: 3px solid #000;
  border-radius: 0; outline: none; min-width: 0;
}
.add-task-form input:focus { border-color: var(--c-primary); box-shadow: 3px 3px 0 var(--c-primary); }
.diff-select, .hc-select { display: flex; gap: 5px; }
.diff-opt, .hc-opt {
  padding: 6px 9px; border-radius: 0; background: var(--c-bg);
  font-size: .78rem; font-weight: 700; transition: all .12s;
  border: 2px solid #000;
}
.diff-opt.active { border-color: currentColor; background: #fff; }
.diff-opt.d1 { color: var(--c-green); } .diff-opt.d2 { color: var(--c-yellow); } .diff-opt.d3 { color: var(--c-red); }
.hc-opt.active { background: var(--c-primary); color: #fff; }

/* 随机度 & Roll 按钮 */
.mode-block { margin: 4px 0 14px; }
.mode-seg { display: flex; background: var(--c-bg); border-radius: 0; padding: 4px; gap: 4px; border: 2px solid #000; }
.mode-opt {
  flex: 1; padding: 9px 0; border-radius: 0; font-size: .88rem; font-weight: 700;
  color: var(--c-text2); transition: all .15s;
}
.mode-opt.active { background: #fff; color: var(--c-text); box-shadow: 3px 3px 0 #000; }
.mode-desc { text-align: center; font-size: .78rem; color: var(--c-text2); margin-top: 8px; }
.btn-roll {
  width: 100%; padding: 17px; font-size: 1.18rem; font-weight: 900; color: #fff;
  background: var(--c-primary);
  border: 3px solid #000; border-radius: 0;
  box-shadow: 6px 6px 0 #000;
  letter-spacing: 2px; margin-bottom: 8px;
  text-transform: uppercase;
}
.btn-roll:active {
  transform: translate(6px, 6px); box-shadow: 0 0 0 #000;
  background: var(--c-primary-deep);
}
.roll-hint-tip { text-align: center; font-size: .8rem; color: var(--c-red); margin-bottom: 20px; font-weight: 700; }

/* ---------------- 洗牌动画 ---------------- */
.roll-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0, 0, 0, .90);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
}
.roll-dice { font-size: 3.6rem; animation: tumble .5s ease-in-out infinite; }
@keyframes tumble { 0%,100% { transform: rotate(-18deg) scale(1); } 50% { transform: rotate(18deg) scale(1.12); } }
.roll-shuffle-card {
  min-width: 200px; max-width: 80vw; padding: 20px 28px;
  background: #fff; border-radius: 0; font-size: 1.15rem; font-weight: 800;
  text-align: center; animation: cardflip .18s linear infinite alternate;
  border: 3px solid #000; box-shadow: 5px 5px 0 var(--c-primary);
}
@keyframes cardflip { from { transform: rotateY(14deg) scale(1); } to { transform: rotateY(-14deg) scale(.98); } }
.roll-hint { color: rgba(255,255,255,.75); font-size: .9rem; letter-spacing: 3px; }

/* ---------------- ④ 结果页 ---------------- */
.result-title { font-size: 1.25rem; font-weight: 900; margin: 4px 0 14px; text-transform: uppercase; letter-spacing: 1px; }
.result-time { font-size: .78rem; color: var(--c-text2); font-weight: 400; margin-left: 8px; }
.duty-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 14px; }
.duty-card {
  background: var(--c-card); border-radius: var(--radius);
  border: 3px solid #000; box-shadow: 5px 5px 0 #000;
  padding: 14px; animation: dealin .45s cubic-bezier(.2,.8,.3,1) both;
}
@keyframes dealin { from { opacity: 0; transform: translateY(16px) rotate(-1.5deg); } to { opacity: 1; transform: none; } }
.duty-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.duty-name { font-weight: 800; flex: 1; }
.pts-badge {
  background: var(--c-primary); color: #fff; font-size: .8rem; font-weight: 800;
  padding: 3px 10px; border-radius: 0; border: 2px solid #000;
}
.duty-item { display: flex; align-items: center; gap: 8px; font-size: .92rem; padding: 5px 0; color: #000; font-weight: 500; }
.duty-rest { color: var(--c-text2); font-size: .88rem; padding: 4px 0; }
.summary-bar {
  background: var(--c-primary); color: #fff;
  border-radius: 0; padding: 12px 16px; font-size: .85rem; line-height: 1.8;
  margin-bottom: 14px;
  border: 3px solid #000; box-shadow: 4px 4px 0 #000;
}
.result-actions { justify-content: center; margin-bottom: 24px; }
.revoked-banner {
  background: var(--c-red); color: #fff; border-radius: 0;
  padding: 10px 14px; font-size: .85rem; margin-bottom: 12px; text-align: center;
  border: 3px solid #000; font-weight: 700;
}

/* ---------------- ⑤ 账本页 ---------------- */
.board-seg { display: inline-flex; background: var(--c-bg); border-radius: 0; padding: 3px; gap: 2px; border: 2px solid #000; }
.seg-opt { padding: 5px 14px; border-radius: 0; font-size: .8rem; color: var(--c-text2); font-weight: 600; }
.seg-opt.active { background: #fff; color: var(--c-text); font-weight: 800; box-shadow: 2px 2px 0 #000; }
.board-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 3px solid #000; }
.board-row:last-of-type { border-bottom: none; }
.board-rank { width: 20px; text-align: center; color: var(--c-text2); font-size: .82rem; font-weight: 800; flex-shrink: 0; }
.board-main { flex: 1; min-width: 0; }
.board-name { font-weight: 700; font-size: .93rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.board-dev { font-size: .75rem; margin-top: 1px; }
.board-pts { font-size: 1.1rem; font-weight: 900; color: var(--c-primary); }
.board-pts small { font-size: .68rem; font-weight: 400; color: var(--c-text2); }
.foot-note { border-top: 3px dashed #000; padding-top: 8px; }

.settle-item { border: 3px solid #000; border-radius: 0; margin-bottom: 8px; overflow: hidden; box-shadow: 3px 3px 0 #000; }
.settle-item summary {
  list-style: none; padding: 11px 13px; font-size: .9rem; cursor: pointer;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: #FFFFFF;
  font-weight: 700;
}
.settle-item summary::-webkit-details-marker { display: none; }
.settle-detail { padding: 4px 13px 12px; font-size: .88rem; }
.settle-line { padding: 3px 0; }
.settle-choose { display: flex; gap: 10px; margin-top: 8px; }
.settle-opt {
  flex: 1; display: flex; flex-direction: column; gap: 3px; align-items: center;
  padding: 14px 8px; border-radius: 0; border: 3px solid #000;
  font-size: .92rem; font-weight: 700; transition: all .12s; background: #FFFFFF;
  box-shadow: 3px 3px 0 #000;
}
.settle-opt:active { transform: translate(3px, 3px); box-shadow: 0 0 0 #000; background: var(--c-primary); color: #fff; }
.settle-opt.danger { color: var(--c-danger); }
.settle-opt .so-desc { font-size: .72rem; color: var(--c-text2); font-weight: 400; }

.round-ledger { border: 3px solid #000; border-radius: 0; margin-bottom: 8px; overflow: hidden; box-shadow: 3px 3px 0 #000; }
.round-ledger > summary {
  list-style: none; padding: 11px 13px; cursor: pointer; background: #FFFFFF;
  display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 700;
}
.round-ledger > summary::-webkit-details-marker { display: none; }
.round-ledger.highlight { border-color: var(--c-primary); box-shadow: 4px 4px 0 var(--c-primary); }
.rl-label { font-weight: 800; flex: 1; }
.rl-time { color: var(--c-text2); font-size: .75rem; }
.rl-net { font-weight: 800; font-size: .82rem; color: var(--c-text2); }
.rl-net.pos { color: var(--c-primary); }
.rl-net.neg { color: var(--c-green); }
.round-ledger-body { padding: 6px 12px 10px; }
.ledger-line {
  display: flex; align-items: center; gap: 7px; padding: 7px 0;
  border-bottom: 3px dashed #000; font-size: .84rem; flex-wrap: wrap;
}
.ledger-line:last-child { border-bottom: none; }
.ll-time { color: var(--c-text2); font-size: .7rem; }
.ll-name { font-weight: 700; }
.ll-delta { font-weight: 800; min-width: 34px; text-align: right; }
.ll-delta.pos { color: var(--c-primary); }
.ll-delta.neg { color: var(--c-green); }
.ll-type {
  font-size: .68rem; padding: 1.5px 7px; border-radius: 0;
  background: var(--c-bg); color: var(--c-text2);
  border: 2px solid #000; font-weight: 700;
}
.type-assign { background: var(--c-primary); color: #fff; border-color: #000; }
.type-refund { background: var(--c-green); color: #000; border-color: #000; }
.type-transfer { background: var(--brutal-purple); color: #fff; border-color: #000; }
.type-manual { background: var(--c-yellow); color: #000; border-color: #000; }
.ll-task { color: var(--c-text2); font-size: .78rem; }
.ll-ref { font-size: .7rem; color: var(--c-danger); font-weight: 700; }
.ll-note { color: var(--c-text2); font-size: .72rem; width: 100%; padding-left: 4px; }

/* ---------------- ⑥ 历史页 ---------------- */
.history-top { margin: 4px 0 14px; }
.history-item {
  background: var(--c-card); border-radius: var(--radius);
  border: 3px solid #000; box-shadow: 5px 5px 0 #000;
  padding: 13px 16px; margin-bottom: 10px; cursor: pointer;
  transition: transform .1s, box-shadow .1s;
}
.history-item:active { transform: translate(5px, 5px); box-shadow: 0 0 0 #000; }
.history-item.revoked { opacity: .55; }
.hi-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hi-time { margin-left: auto; color: var(--c-text2); font-size: .75rem; }
.hi-sub { font-size: .8rem; color: var(--c-text2); margin-top: 4px; }

/* ---------------- ⑦ 设置页 ---------------- */
.radio-col { display: flex; flex-direction: column; gap: 12px; }
.radio-row { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .9rem; }
.radio-row input { margin-top: 3px; accent-color: var(--c-primary); width: 17px; height: 17px; }
.radio-row b { font-size: .92rem; font-weight: 800; }
.tpl-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; font-size: .9rem; border-bottom: 3px dashed #000; }
.tpl-row:last-of-type { border-bottom: none; }
.tpl-dot { width: 9px; height: 9px; border-radius: 0; border: 2px solid #000; }
.tpl-ok { margin-left: auto; color: var(--c-green); font-size: .8rem; font-weight: 700; }
.tpl-miss { margin-left: auto; color: var(--c-text2); font-size: .78rem; }
.danger-zone { border: 3px solid var(--c-danger); }

/* ---------------- Toast（F2-2） ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: #000; color: #fff;
  border-radius: 0; padding: 11px 18px; font-size: .88rem;
  display: flex; align-items: center; gap: 12px; z-index: 400;
  max-width: calc(100vw - 40px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border: 3px solid #000; box-shadow: 5px 5px 0 var(--c-primary);
  animation: toastin .25s cubic-bezier(.2,.8,.3,1.2);
  font-weight: 700;
}
@keyframes toastin { from { opacity: 0; transform: translateX(-50%) translateY(14px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.toast.toast-out { opacity: 0; transition: opacity .25s; }
.toast-undo {
  color: var(--c-primary); font-weight: 800; flex-shrink: 0;
  padding: 2px 6px; border-radius: 0;
}
.toast-undo:active { background: rgba(255,255,255,.12); }

/* ---------------- Modal ---------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0, 0, 0, .70);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadein .18s;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; width: 100%; max-width: 520px;
  border-radius: 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  border: 3px solid #000; box-shadow: 6px 6px 0 #000;
  animation: slideup .25s cubic-bezier(.2,.8,.3,1);
  max-height: 86vh; overflow-y: auto;
}
@keyframes slideup { from { transform: translateY(40%); opacity: .5; } to { transform: none; opacity: 1; } }
@media (min-width: 600px) {
  .modal-mask { align-items: center; padding: 20px; }
  .modal { border-radius: 0; }
}
.modal-title { font-size: 1.15rem; margin-bottom: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; }
.modal-body { font-size: .92rem; line-height: 1.7; }
.modal-body p { margin-bottom: 8px; }
.form-modal { margin-bottom: 6px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }
.modal-actions .btn-danger-text { flex: 0 0 auto; }

/* 兜底弹窗（6.4） */
.fallback-row { margin-bottom: 14px; }
.fallback-task { margin-bottom: 8px; font-size: .92rem; font-weight: 700; }
.fallback-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.fallback-opts .btn.active { outline: 3px solid var(--c-primary); outline-offset: 2px; }

/* ---------------- 空态 ---------------- */
.empty-tip { color: var(--c-text2); font-size: .86rem; text-align: center; padding: 18px 0; font-weight: 600; }
.empty-view { text-align: center; padding: 80px 0 40px; }
.empty-dice { font-size: 3.2rem; margin-bottom: 12px; }
.empty-view p { font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.empty-view .muted-text { margin-top: 6px; }

/* ---------------- TabBar ---------------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; z-index: 150;
  background: #FFFFFF;
  border-top: 3px solid #000;
  display: flex; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
@media (min-width: 760px) { .tabbar { max-width: 720px; } }
.tabbtn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: .68rem; color: var(--c-text2); padding: 5px 0; border-radius: 0;
  transition: color .15s; font-weight: 600;
}
.tabbtn .tabicon { font-size: 1.25rem; line-height: 1.2; }
.tabbtn.active { color: var(--c-primary); font-weight: 800; }
