/* 监督广场 + 任务模版 + 习惯打卡 */
.tq-subnav{
  display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px;padding:0;
}
.tq-subnav-btn{
  appearance:none;border:1px solid #111;background:#fffcf6;
  padding:8px 14px;font-family:var(--bb-serif,var(--font-zh),serif);
  font-size:13px;font-weight:600;cursor:pointer;color:#111;
  box-shadow:2px 2px 0 #111;
}
.tq-subnav-btn.is-active{background:#111;color:#fff}
.duty-panel[data-task-panel="plaza"]{display:none}
.duty-panel[data-task-panel="plaza"].is-active{display:block}
.duty-panel[data-task-panel="group"],
.duty-panel[data-task-panel="review"]{display:none}
.duty-panel[data-task-panel="group"].is-active,
.duty-panel[data-task-panel="review"].is-active{display:block}

.tq-plaza-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));
  gap:12px;
}
.tq-plaza-card{
  border:1px solid #111;background:#fff;padding:14px 14px 12px;
  box-shadow:3px 3px 0 #111;position:relative;overflow:hidden;cursor:pointer;
}
.tq-plaza-card::before{
  content:"";position:absolute;top:0;left:0;right:0;height:3px;background:var(--pc-accent,#111);
}
.tq-plaza-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.tq-plaza-av{
  width:32px;height:32px;border-radius:50%;border:1px solid #111;
  object-fit:cover;background:#f0ebe3;flex:0 0 auto;
}
.tq-plaza-user{font-size:12px;font-weight:700;line-height:1.2}
.tq-plaza-kind{
  font-size:10px;font-family:var(--bb-mono,monospace);letter-spacing:.08em;
  color:rgba(17,17,17,.55);text-transform:uppercase;
}
.tq-plaza-title{font-size:15px;font-weight:700;margin:0 0 6px;line-height:1.35}
.tq-plaza-meta{font-size:12px;color:rgba(17,17,17,.62);margin:0 0 10px;line-height:1.5}
.tq-plaza-bar{height:6px;background:#ece7df;border:1px solid #111;margin-bottom:8px}
.tq-plaza-bar>i{display:block;height:100%;background:#111;width:var(--pp,0%)}
.tq-plaza-foot{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px}
.tq-plaza-more{font-weight:700;opacity:.7}
.tq-plaza-empty{text-align:center;padding:36px 16px;opacity:.65;font-size:14px}

.tq-plaza-detail-overlay[hidden]{display:none!important}
.tq-plaza-detail-overlay{
  position:fixed;inset:0;z-index:9000;background:rgba(0,0,0,.45);
  display:flex;align-items:flex-end;justify-content:center;padding:0;
  /* 覆盖全局 .modal-overlay 的 opacity:0 / pointer-events:none */
  opacity:0;pointer-events:none;
}
.tq-plaza-detail-overlay.is-open{
  opacity:1;pointer-events:auto;
}
body.tq-plaza-modal-open{overflow:hidden}
.tq-plaza-detail-panel{
  width:min(100%,520px);max-height:88vh;overflow:auto;
  background:#fffcf6;border:1px solid #111;box-shadow:0 -4px 0 #111;
  border-radius:12px 12px 0 0;padding:0 0 16px;
}
.tq-plaza-detail-panel .dialog-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 16px;border-bottom:1px solid #111;position:sticky;top:0;background:#fffcf6;z-index:1;
}
.tq-plaza-detail-body{padding:14px 16px}
.tq-pd-head{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.tq-pd-title{font-size:17px;font-weight:800;margin:0 0 8px;line-height:1.35}
.tq-pd-content{font-size:13px;line-height:1.6;margin:0 0 12px;color:rgba(17,17,17,.78)}
.tq-pd-evidence{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.tq-pd-evidence img{width:72px;height:72px;object-fit:cover;border:1px solid #111;border-radius:4px}
.tq-pd-stats{font-size:12px;margin:0 0 10px;color:rgba(17,17,17,.65)}
.tq-pd-report{color:#b33;font-weight:700}
.tq-pd-hint{font-size:12px;opacity:.6;margin:0 0 10px}
.tq-pd-comments{list-style:none;margin:0;padding:0}
.tq-pd-comments li{border-top:1px dashed rgba(17,17,17,.2);padding:10px 0}
.tq-pd-comments p{margin:4px 0 0;font-size:13px;line-height:1.5}
.tq-pd-comments time{font-size:10px;opacity:.5;margin-left:6px}
.tq-plaza-detail-actions,.tq-plaza-comment-box{
  display:flex;flex-wrap:wrap;gap:8px;padding:0 16px;margin-top:8px;align-items:center;
}
.tq-plaza-comment-box textarea{
  flex:1 1 100%;min-height:56px;border:1px solid #111;padding:8px 10px;
  font-family:inherit;font-size:13px;resize:vertical;background:#fff;
}
.tq-sv-btn{
  appearance:none;border:1px solid #111;background:#111;color:#fff;
  padding:8px 14px;font-size:12px;font-weight:700;cursor:pointer;
  box-shadow:2px 2px 0 rgba(17,17,17,.25);
}
.tq-sv-btn.ghost{background:#fff;color:#111}
.tq-sv-btn.is-done,.tq-sv-btn:disabled{opacity:.55;cursor:default;box-shadow:none}

.mq-template-section{margin-top:4px}
.mq-tpl-cats{
  display:flex;gap:6px;overflow-x:auto;padding:2px 0 8px;
  -webkit-overflow-scrolling:touch;scrollbar-width:none;
}
.mq-tpl-cats::-webkit-scrollbar{display:none}
.mq-tpl-cat{
  flex:0 0 auto;border:1px solid #111;background:#fff;padding:6px 10px;
  font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap;
}
.mq-tpl-cat.is-active{background:#111;color:#fff}
.mq-tpl-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,140px),1fr));
  gap:8px;max-height:200px;overflow-y:auto;padding-right:2px;
}
.mq-tpl-card{
  border:1px solid #111;padding:10px 10px 8px;cursor:pointer;text-align:left;
  background:#fffcf6;min-height:88px;position:relative;
}
.mq-tpl-card[data-style="stripe"]{border-left:4px solid var(--tpl-accent,#111)}
.mq-tpl-card[data-style="dot"]::after{
  content:"";position:absolute;top:8px;right:8px;width:6px;height:6px;
  border-radius:50%;background:var(--tpl-accent,#111);
}
.mq-tpl-card[data-style="bold"]{box-shadow:3px 3px 0 var(--tpl-accent,#111)}
.mq-tpl-card[data-style="minimal"]{border-style:dashed;opacity:.92}
.mq-tpl-card.is-picked{outline:2px solid #111;outline-offset:1px}
.mq-tpl-card.mq-tpl-custom{
  border-style:dashed;background:#fffcf6;
}
.mq-tpl-name{font-size:12px;font-weight:700;line-height:1.3;margin:0 0 4px}
.mq-tpl-tag{font-size:10px;color:rgba(17,17,17,.55)}
.mq-type-row,.mq-public-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:8px}
.mq-type-row .mode-option input{position:absolute;opacity:0;pointer-events:none;width:0;height:0}
.mq-habit-days-wrap{display:none;margin-top:8px}
.mq-habit-days-wrap.is-on{display:block}
.habit-streak-badge{
  display:inline-block;font-size:10px;padding:2px 6px;border:1px solid #111;
  background:#fff3e0;margin-left:6px;font-weight:700;
}
.habit-days-note{font-size:12px;color:rgba(17,17,17,.72);margin:6px 0 0}
.goal-card.is-habit .gprog-pct{display:none}
.aimbar-habit .aimbar-fill{background:linear-gradient(90deg,#3d7a5f,#6b9b7a)}
.public-badge{
  display:inline-block;font-size:10px;padding:2px 6px;border:1px solid #111;
  background:#e8f4ff;margin-left:6px;
}
.tq-ecology-card{
  margin-top:12px;border:1px solid #111;background:#fffcf6;
  box-shadow:3px 3px 0 #111;padding:14px 16px;
}
.tq-eco-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;margin-bottom:8px}
.tq-eco-tag{
  font-size:10px;font-family:var(--bb-mono,monospace);letter-spacing:.08em;
  text-transform:uppercase;color:rgba(17,17,17,.55);
}
.tq-eco-link{font-size:11px;color:#111;text-decoration:none;font-weight:700}
.tq-eco-hint{font-size:12px;color:rgba(17,17,17,.62);margin:0 0 8px;line-height:1.5}
.tq-eco-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.tq-eco-list a{
  display:flex;justify-content:space-between;gap:10px;padding:8px 10px;
  border:1px dashed #111;text-decoration:none;font-size:12px;color:inherit;
}
.tq-eco-list span{color:rgba(17,17,17,.55);white-space:nowrap}
.kit-banner .kit-link-hint{font-size:11px;opacity:.75;margin-left:8px}
@media (max-width:640px){
  .mq-tpl-grid{grid-template-columns:1fr 1fr;max-height:240px}
  .tq-plaza-grid{grid-template-columns:1fr}
  .kit-board{flex-wrap:wrap!important}
  .kit-board>li{flex:1 1 100%!important;min-width:100%!important}
}
