/* 1.7.52 搜尋頁：一直往下翻、條件（可收合） */
.tll-library.tll-more-ready .tll-pagination{display:none}
.tll-more-foot{margin:22px 0 8px;padding:14px 0 70px;text-align:center;font-size:14px;color:var(--tll-dim,var(--tll-muted))}
.tll-more-foot:not(.is-end)::before{content:'';display:inline-block;width:13px;height:13px;margin-right:9px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-2px;animation:tll-more-spin 1s linear infinite}
.tll-more-foot a{text-decoration:underline!important;text-underline-offset:3px}
@keyframes tll-more-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.tll-more-foot::before{animation:none!important}}
.tll-more-bar{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(16px + env(safe-area-inset-bottom));z-index:40;display:flex;align-items:center;gap:12px;max-width:calc(100vw - 24px);padding:7px 8px 7px 18px;border:1px solid #46526a;border-radius:12px;background:#101724f2;color:#eef1f8;font:500 14px/1.3 system-ui,"Noto Sans TC","Microsoft JhengHei",sans-serif;white-space:nowrap;box-shadow:0 8px 26px #0008}
.tll-more-bar[hidden]{display:none}
.tll-more-bar b{font-size:16px}
.tll-more-bar button{min-height:40px;padding:0 14px;border:0;border-radius:8px;background:#ffd85a;color:#20202b;font:700 14px/1 inherit;cursor:pointer}
body.tll-m-sheet .tll-more-bar{display:none}
.tll-m-open{flex:none}
@media (max-width:420px){.tll-more-bar{gap:8px;padding-left:14px;font-size:13px}.tll-more-bar button{padding:0 11px}}

/* 條件還沒算好時，先把舊結果調淡 */
.tll-library[data-tll-conds="1"] .tll-result-region[data-state="loading"]{opacity:.45}

/* 條件：平常只有一行（展開鈕＋條件小標籤），展開才出現編輯區 */
.tll-conds-bar{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:8px;min-width:0}
form.tll-compact-ready>.tll-conds-bar{grid-column:1}
form.tll-conds-on>.tll-filter-compact-footer{grid-column:2!important;align-self:center}
.tll-conds-bar button,.tll-conds-panel button{font-family:inherit;cursor:pointer}
.tll-conds-toggle{display:inline-flex;align-items:center;gap:7px;min-height:40px;padding:0 14px!important;border:1px solid #46526a!important;border-radius:9px!important;background:transparent!important;color:var(--tll-bright,inherit)!important;font-size:14px!important;font-weight:700!important;line-height:1.2!important;white-space:nowrap}
.tll-conds-toggle i{font-style:normal;transition:transform .15s}
.tll-conds-toggle[aria-expanded=true] i{transform:rotate(180deg)}
.tll-conds-toggle em{font-style:normal;min-width:20px;padding:1px 6px;border-radius:9px;background:var(--tll-bright,#ffd85a);color:#20202b;font-size:12px;text-align:center}
.tll-conds-chips{display:flex;flex-wrap:wrap;gap:7px;min-width:0}
.tll-cond-chip{display:inline-flex;align-items:center;max-width:100%;min-height:36px;border:1px solid #4b6a8f;border-radius:8px;background:#1c2b41;color:#eef1f8;font-size:13px}
.tll-cond-chip>button:first-child{min-height:34px;padding:0 4px 0 11px!important;border:0!important;background:none!important;color:inherit!important;font-size:13px!important;font-weight:600!important;line-height:1.3!important;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:260px}
.tll-cond-chip>button:last-child{flex:none;width:34px;min-width:34px!important;min-height:34px;padding:0!important;border:0!important;background:none!important;color:#b9c8e2!important;font-size:13px!important;line-height:1!important}
.tll-conds-hit{font-size:13px;color:var(--tll-dim,inherit);white-space:nowrap}
.tll-conds-clear{min-height:36px;padding:0 6px!important;border:0!important;background:none!important;color:var(--tll-dim,inherit)!important;font-size:13px!important;text-decoration:underline;text-underline-offset:3px}
.tll-conds-panel{grid-column:1/-1;margin-top:8px;padding:14px;border:1px solid var(--tll-line,#333d50);border-radius:12px;background:#111825;color:#eef1f8;font-size:14px}
.tll-conds-panel[hidden]{display:none}
.tll-conds-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px}
.tll-conds-row+.tll-conds-row,.tll-conds-rules+.tll-conds-row{margin-top:10px}
.tll-conds-mode{display:inline-flex;border:1px solid #46526a;border-radius:9px;overflow:hidden}
.tll-conds-mode button{min-height:40px;padding:0 13px!important;border:0!important;border-radius:0!important;background:transparent!important;color:#cfd8ea!important;font-size:14px!important;font-weight:600!important;line-height:1.2!important}
.tll-conds-mode button[aria-pressed=true]{background:#6fd6c4!important;color:#06231f!important}
.tll-conds-rules{margin-top:12px;display:grid;gap:8px}
.tll-conds-panel .ct-rule{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:9px;border:1px solid var(--tll-line,#333d50);border-radius:10px;background:#ffffff08}
.tll-conds-panel select,.tll-conds-panel input[type=number],.tll-conds-panel input[type=text],.tll-conds-panel input[type=search]{width:auto!important;min-height:42px!important;height:42px!important;margin:0!important;padding:0 10px!important;border:1px solid #46526a!important;border-radius:8px!important;background:#0f1521!important;color:#eef1f8!important;font-size:15px!important}
.tll-conds-panel .ct-f{flex:0 1 220px;min-width:150px}
.tll-conds-panel .ct-rule input{flex:0 1 130px;min-width:84px}
.tll-conds-panel .ct-rule .ct-wide{flex:1 1 220px}
.tll-conds-panel .ct-range{color:#9fb0cc;font-size:12px}
.tll-conds-panel .ct-chips{order:3;flex:1 1 100%;display:flex;flex-wrap:wrap;gap:6px;max-height:168px;overflow:auto}
.tll-conds-panel .ct-chip{min-height:36px;padding:0 12px!important;border:1px solid #46526a!important;border-radius:8px!important;background:transparent!important;color:#dbe4f4!important;font-size:13px!important;line-height:1.2!important}
.tll-conds-panel .ct-chip[aria-pressed=true]{border-color:#6fd6c4!important;background:#6fd6c4!important;color:#06231f!important;font-weight:700!important}
.tll-conds-panel .ct-del{margin-left:auto;width:42px;min-width:42px!important;min-height:42px;padding:0!important;border:1px solid #8a4a4a!important;border-radius:8px!important;background:transparent!important;color:#ffb1a8!important;font-size:14px!important;line-height:1!important}
.tll-conds-add,.tll-conds-save,.tll-conds-done{min-height:42px;padding:0 15px!important;border-radius:9px!important;font-size:14px!important;font-weight:700!important;line-height:1.2!important}
.tll-conds-add{border:1px dashed #6fd6c4!important;background:transparent!important;color:#8fe3d4!important}
.tll-conds-save{border:1px solid #46526a!important;background:transparent!important;color:#eef1f8!important}
.tll-conds-done{border:0!important;background:#6fd6c4!important;color:#06231f!important}
.tll-conds-count{margin-right:auto;color:#b9c8e2}
.tll-conds-count b{color:#8fe3d4;font-size:18px;margin:0 3px}
.tll-conds-msg{color:#ffd85a;font-size:13px;min-height:0}
.tll-conds-panel .tll-more-filters{margin-top:12px!important;border-top:1px solid var(--tll-line,#333d50);padding-top:4px}
.tll-conds-panel .tll-more-filters input,.tll-conds-panel .tll-more-filters select{width:100%!important}
/* 沒有獨立頁外觀的內嵌短碼（淺色網站） */
body:not(.tll-standalone) .tll-conds-toggle{color:inherit!important}
body:not(.tll-standalone) .tll-conds-hit,body:not(.tll-standalone) .tll-conds-clear{color:#5c626b!important}

@media (max-width:767px),(pointer:coarse){
 /* 搜尋列黏在上面那一條：條件只留一行小標籤（左右滑），編輯區收進從下面拉出的篩選面板 */
 body.tll-m-ready:not(.tll-m-sheet) .tll-conds-toggle,body.tll-m-ready:not(.tll-m-sheet) .tll-conds-panel,body.tll-m-ready.tll-m-sheet .tll-conds-bar,body.tll-m-ready .tll-conds-bar.is-empty{display:none!important}
 body.tll-m-ready .tll-conds-bar{flex-wrap:nowrap;overflow-x:auto;margin-top:8px;scrollbar-width:none;grid-column:1/-1!important}
 body.tll-m-ready .tll-conds-bar::-webkit-scrollbar{display:none}
 body.tll-m-ready .tll-conds-chips{flex-wrap:nowrap}
 body.tll-m-ready .tll-cond-chip{flex:none}
 body.tll-m-ready.tll-m-sheet .tll-conds-panel{display:block!important;margin-top:12px;padding:12px;background:transparent}
 body.tll-m-ready.tll-m-sheet form.tll-conds-on>.tll-filter-compact-footer{grid-column:1/-1!important}
 body.tll-m-ready.tll-m-sheet .tll-conds-done{display:none}
 body.tll-m-ready.tll-m-sheet .tll-m-sheet-head{position:sticky;top:-14px;z-index:2;margin:-14px -16px 10px;padding:12px 16px 8px;background:#151b28;border-radius:16px 16px 0 0}
}
/* 還沒畫好的卡牌先寫盒號，往下翻很快時看得出翻到哪 */
.tll-library.lg-active.tll-grid-game .tll-card{position:relative}
.tll-library.lg-active.tll-grid-game .tll-card:not([data-lg-view]):not([data-lg-fail])::before{content:'#' attr(data-set-number);position:absolute;left:0;right:0;top:45%;z-index:1;text-align:center;font-size:15px;font-weight:700;letter-spacing:.04em;color:var(--tll-dim,#8b95a8);opacity:.75;pointer-events:none}
@media (max-width:560px){
 .tll-conds-panel .ct-f{flex:1 1 auto}
 .tll-conds-panel .ct-del{order:1}
 .tll-conds-panel .ct-rule>*:not(.ct-f):not(.ct-del):not(.ct-chips){order:2}
 .tll-conds-panel .ct-rule input{flex:1 1 90px}
}
.tll-conds-note { margin: 6px 0 0; font-size: 13.5px; line-height: 1.55; color: inherit; }
