/* ── Корзина (лист 25, этап 1.1): экран удалённого ──
   Строки 56 R14 h-done + зачёркивание (канон Архива 03·2), «вернуть» — чип 32
   R8 с мишенью 40, футер «очистить» red dashed 40, пусто — ghost. */

#trash-dialog{
  width:min(420px, calc(100vw - 24px)); max-width:min(420px, calc(100vw - 24px));
  border:none; background:var(--paper); border-radius:16px; padding:0;
  color:var(--graphite);
}
#trash-dialog::backdrop{background:rgba(44,42,38,.3);}
#trash-dialog .trh-frame{
  position:relative; display:flex; flex-direction:column;
  max-height:min(640px, calc(100dvh - 48px)); padding:0 16px;
}
#trash-dialog .trh-frame::before{content:""; position:absolute; inset:0; pointer-events:none;
  border:2px solid var(--graphite); border-radius:16px; filter:url(#squiggle);}

/* шапка 56: заголовок Caveat 24 · счётчик 13 · ✕ 40 R10 */
.trh-head{display:flex; align-items:center; gap:8px; height:56px; flex:none;
  border-bottom:2px solid var(--graphite);}
.trh-head .ttl{font-family:'Caveat',cursive; font-weight:700; font-size:24px; flex:1; min-width:0;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.trh-head .n{font-size:13px; color:var(--graphite-soft); flex:none;}
.trh-hint{min-height:32px; display:flex; align-items:center; font-size:12px;
  color:var(--meta); flex:none;}

#trash-body{flex:1 1 auto; min-height:120px; overflow-y:auto; overscroll-behavior:contain;
  display:flex; flex-direction:column; gap:8px; padding:2px 2px 8px;}

/* секция caps 32 */
.trh-sec{min-height:32px; display:flex; align-items:center; font-size:12px;
  letter-spacing:1.5px; text-transform:uppercase; color:var(--meta);}

/* строка 56 R14: штриховка h-done + карандашный контур */
.trh{position:relative; display:flex; align-items:center; gap:12px; flex:none;
  min-height:56px; border-radius:14px; padding:0 12px 0 16px;
  background:var(--paper2);
  background-image:repeating-linear-gradient(-45deg, transparent 0 5px, rgba(139,133,120,.28) 5px 6.5px);
  transition:transform .3s ease-out, opacity .3s ease-out;}
.trh::before{content:""; position:absolute; inset:0; pointer-events:none;
  border:1.5px solid var(--graphite); border-radius:14px; filter:url(#squiggle);}
.trh > .ic{width:24px; height:24px; flex:none; color:var(--graphite-soft);
  fill:none; stroke:currentColor; stroke-width:2;}
.trh .col{flex:1; min-width:0; display:flex; flex-direction:column; gap:1px;}
.trh .t1{font-size:15px; line-height:1.25; color:var(--graphite-soft);
  text-decoration:line-through; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.trh .t2{font-size:12px; line-height:1.25; color:var(--meta); display:flex; gap:4px;
  align-items:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
/* ≤ 3 дней: red + «!» в круге 16 — цвет не единственный признак (37·2) */
.trh.soon .t2{color:var(--red-t);}
.trh .t2 .ex{flex:none; width:16px; height:16px; display:inline-flex; align-items:center;
  justify-content:center; border:1.5px solid var(--red-t); border-radius:50%;
  font-size:11px; font-weight:700; font-style:normal; color:var(--red-t);}
/* «вернуть» — чип 32 R8, мишень 40 (37·1) */
.trh .back{position:relative; flex:none; height:32px; padding:0 10px; border-radius:8px;
  background:var(--paper); border:1.5px solid var(--graphite); cursor:pointer;
  font-family:'Neucha',cursive; font-size:13px; color:var(--graphite);}
.trh .back::after{content:""; position:absolute; inset:-4px;}
/* уезд «вернулась»: translateX 48 + opacity 300 (25·2) */
.trh.bye{transform:translateX(48px); opacity:0;}

/* пусто: ghost 1.5 dashed · иконка 32 · Neucha 15 italic p (декоративная — 37·1) */
.trh-empty{position:relative; margin-top:8px; border-radius:16px; padding:20px 16px 22px;
  display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center;}
.trh-empty::before{content:""; position:absolute; inset:0; pointer-events:none;
  border:1.5px dashed var(--pencil); border-radius:16px; filter:url(#squiggle);}
.trh-empty svg{width:32px; height:32px; color:var(--pencil); fill:none;
  stroke:currentColor; stroke-width:2;}
.trh-empty .t{font-size:15px; font-style:italic; color:var(--pencil);}
.trh-empty .h{font-size:12px; color:var(--meta);}

/* футер: «очистить корзину» red dashed 40 R10 */
.trh-foot{flex:none; padding:8px 0 16px;}
#trash-clear{position:relative; width:100%; min-height:40px; border-radius:10px;
  background:none; border:none; cursor:pointer; display:flex; align-items:center;
  justify-content:center; gap:8px; font-family:'Neucha',cursive; font-size:14px;
  color:var(--red-t);}
#trash-clear::before{content:""; position:absolute; inset:0; pointer-events:none;
  border:1.5px dashed var(--red); border-radius:10px; filter:url(#squiggle);}
#trash-clear svg{width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2;}
#trash-clear:disabled{opacity:.45; cursor:default;}

/* вход: подвал Архива — ghost 32 «корзина · N» */
.trash-open{position:relative; margin:8px auto 0; min-height:32px; padding:0 14px;
  display:flex; align-items:center; gap:6px; background:none; border:none; cursor:pointer;
  font-family:'Neucha',cursive; font-size:13px; color:var(--meta);}
.trash-open::before{content:""; position:absolute; inset:0; pointer-events:none;
  border:1.5px dashed var(--pencil-faint); border-radius:8px; filter:url(#squiggle);}
.trash-open::after{content:""; position:absolute; inset:-4px;}   /* мишень 40 */
.trash-open svg{width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2;}
.trash-open b{font-weight:700;}
.trash-open b:empty{display:none;}

/* тёмная: штрих h-done светлеет .28 → .40 (лист 30·1) */
:root[data-theme="dark"] .trh{
  background-image:repeating-linear-gradient(-45deg, transparent 0 5px, rgba(196,187,168,.40) 5px 6.5px);
}
@media (prefers-reduced-motion:reduce){ .trh{transition:none;} }
