/* 29 · 真心话大冒险题库 —— 粉紫翻牌卡堆 + 题库列表（独立布局） */
.tdb {
  --f34-a: #cf4b83; --f34-a2: #f293b5; --f34-soft: #fdeef5;
  --tdb-back: #e8d9f2;
}
:root[data-theme="dark"] .tdb {
  --f34-a: #f48bb7; --f34-a2: #ffb6d0; --f34-soft: rgba(215, 85, 145, .17);
  --tdb-back: #332a3f;
}
.tdb-hero { background: radial-gradient(600px 240px at 14% -20%, var(--f34-soft), transparent 70%), var(--f34-surface); }
.tdb-sel { width: 150px; }
.tdb-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(290px, .8fr); gap: 16px; margin-top: 18px; align-items: start; }
.tdb-deck, .tdb-filters, .tdb-add { min-width: 0; }
.tdb-aside { display: grid; gap: 16px; }
.tdb-card-stack { position: relative; height: 276px; display: grid; place-items: center; perspective: 1000px; }
.tdb-card-back { position: absolute; width: min(100%, 420px); height: 244px; border-radius: 18px; transform: rotate(-6deg) translate(-10px, 8px); background: repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in srgb, var(--f34-a) 12%, transparent) 10px 11px), var(--tdb-back); border: 1px solid var(--f34-line); }
.tdb-card-front {
  position: relative; z-index: 2; width: min(100%, 420px); min-height: 244px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px;
  padding: 26px 30px; text-align: center; border-radius: 18px;
  color: #fff; background: linear-gradient(145deg, var(--f34-a), #8e3f9e);
  box-shadow: 0 12px 30px rgba(160, 60, 130, .22);
  transform-origin: center left;
}
.tdb-card-front.is-flip { animation: tdbFlip .5s ease both; }
@keyframes tdbFlip { 0% { transform: rotateY(-75deg); opacity: .25; } 100% { transform: rotateY(0); opacity: 1; } }
.tdb-card-kind { padding: 5px 14px; font-size: 12px; font-weight: 700; letter-spacing: .08em; border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px; }
.tdb-card-text { max-width: 32ch; font-size: 20px; line-height: 1.85; font-weight: 650; }
.tdb-card-foot { font-size: 11.5px; opacity: .8; letter-spacing: .06em; }
.tdb-deck-actions { justify-content: center; }
.tdb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tdb-chips span { padding: 3px 9px; font-size: 11.5px; color: var(--f34-ink-2); background: var(--f34-surface-2); border: 1px solid var(--f34-line); border-radius: 999px; }
.tdb-bank { margin-top: 16px; }
.tdb-items { display: grid; gap: 7px; max-height: 320px; overflow: auto; }
.tdb-item { display: grid; grid-template-columns: 74px 66px minmax(0, 1fr) 62px; gap: 9px; align-items: center; padding: 9px 11px; border: 1px solid var(--f34-line); border-radius: 10px; background: var(--f34-surface-2); }
.tdb-item.is-fav { background: var(--f34-soft); border-color: color-mix(in srgb, var(--f34-a) 35%, var(--f34-line)); }
.tdb-item .tx { font-size: 13px; line-height: 1.7; color: var(--f34-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tdb-item button { padding: 3px 8px; font-size: 11.5px; cursor: pointer; color: var(--f34-a); background: transparent; border: 1px solid var(--f34-line); border-radius: 7px; }
.tdb-item button:hover { border-color: var(--f34-a); }
.tdb-history-btn { padding: 2px 8px; font-size: 11.5px; cursor: pointer; color: var(--f34-a); background: transparent; border: 1px solid var(--f34-line); border-radius: 7px; }

@media (max-width: 980px) {
  .tdb-layout { grid-template-columns: 1fr; }
  .tdb-sel { width: 130px; }
}
@media (max-width: 620px) {
  .tdb-card-text { font-size: 17px; }
  .tdb-item { grid-template-columns: 62px 54px minmax(0, 1fr) 52px; gap: 5px; padding: 7px; }
  .tdb-sel { width: 100%; }
}
