/* Orata — the Themes page: Theme Discovery and your theme library (themes.js). The header and tabs are the Staff page's (.m-header, .staff-tab). */
.rail-btn.themes { color: var(--text); }
.rail-item.active .rail-btn.themes { background: var(--accent-grad); color: var(--on-accent); }

.themes-page { min-width: 0; display: flex; flex-direction: column; }
.themes-bar .grow { flex: 1; }
.themes-page .staff-tabs { flex: 0 1 auto; min-width: 0; }
.th-undo { margin-left: auto; flex: none; }
.themes-scroll { flex: 1; overflow-y: auto; padding: 20px 28px 48px; display: flex; flex-direction: column; gap: 22px; }
.themes-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.themes-more { display: flex; justify-content: center; padding: 4px 0; }

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 26px 22px; align-items: start; }
.tcard { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tcard-prev { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: rgb(var(--surface-rgb) / .08); box-shadow: 0 0 0 1px rgb(var(--surface-rgb) / .1), 0 10px 26px -14px rgb(0 0 0 / .6); transition: transform var(--t-med, .2s) var(--ease, ease), box-shadow var(--t-med, .2s); }
.tcard:hover .tcard-prev { transform: translateY(-2px); box-shadow: 0 0 0 1px rgb(var(--surface-rgb) / .18), 0 16px 30px -14px rgb(0 0 0 / .7); }
.tcard.worn .tcard-prev { box-shadow: 0 0 0 2px rgb(var(--accent-rgb) / .9), 0 10px 26px -14px rgb(var(--accent-rgb) / .6); }
.tcard-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tcard-none { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.tcard-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 0 2px; }
.tcard-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tcard-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard-vote { flex: none; display: inline-flex; align-items: center; gap: 3px; height: 26px; padding: 0 9px 0 6px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--text-2); background: rgb(var(--surface-rgb) / .08); transition: background var(--t-fast, .12s), color var(--t-fast, .12s), transform var(--t-fast, .12s); }
.tcard-vote:hover:not(:disabled) { background: rgb(var(--surface-rgb) / .16); color: var(--text); }
.tcard-vote:active:not(:disabled) { transform: scale(.94); }
.tcard-vote.on { background: rgb(var(--accent-rgb) / .28); color: var(--text); box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / .7); }
.tcard-vote:disabled { cursor: default; opacity: .75; }
.tcard-plus { flex: none; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--on-accent); background: var(--accent-grad); transition: transform var(--t-fast, .12s), filter var(--t-fast, .12s); }
.tcard-plus:hover { filter: brightness(1.12); transform: scale(1.08); }
.tcard-add { text-align: left; color: inherit; cursor: pointer; }
.tcard-add .tcard-prev { display: flex; align-items: center; justify-content: center; color: var(--text-3); background: rgb(var(--surface-rgb) / .04); box-shadow: inset 0 0 0 2px rgb(var(--surface-rgb) / .18); border-radius: var(--radius); }
.tcard-add:hover .tcard-prev { color: var(--text); background: rgb(var(--accent-rgb) / .12); box-shadow: inset 0 0 0 2px rgb(var(--accent-rgb) / .6); }
.tcard-add .tcard-name { flex: none; }
.pt-list { max-height: 300px; }
.pt-thumb { width: 64px; height: 36px; flex: none; border-radius: 8px; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; background: rgb(var(--surface-rgb) / .1); color: var(--text-3); }
.pt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-row.disabled { opacity: .5; pointer-events: none; }
.tcard-by { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard-by .avatar { flex: none; }
.tcard-who { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; font-size: 12.5px; color: var(--text-3); }
.tcard-poster { display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 0; color: inherit; font: inherit; border-radius: 6px; cursor: pointer; }
.tcard-poster span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard-poster:hover, .tcard-poster:focus-visible { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.tcard-dl { flex: none; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tcard-btn { width: 100%; }
.tcard-badge { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--accent-grad); color: var(--on-accent); box-shadow: 0 2px 8px rgb(0 0 0 / .35); }
.tcard-more { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgb(0 0 0 / .55); color: #fff; backdrop-filter: blur(6px); opacity: 0; transition: opacity var(--t-fast, .12s), background var(--t-fast, .12s); }
.tcard:hover .tcard-more, .tcard-more:focus-visible { opacity: 1; }
.tcard-more:hover { background: rgb(0 0 0 / .8); }
@media (hover: none) { .tcard-more { opacity: 1; } }

.tlib-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tlib-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .themes-page .m-title .name { display: none; }
  .themes-scroll { padding: 14px 14px 40px; gap: 16px; }
  .theme-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px 12px; }
}
