/* ===== منوی انتخاب تم ===== */
.thov{position:fixed;inset:0;z-index:300;background:#000a;backdrop-filter:blur(6px);display:flex;align-items:flex-end;justify-content:center;animation:thfade .2s ease}
.thsh{width:100%;max-width:640px;max-height:88vh;overflow-y:auto;overscroll-behavior:contain;background:var(--card,#0f0f18);color:var(--tx,#f2f2fb);
  border-radius:28px 28px 0 0;padding:0 14px calc(18px + env(safe-area-inset-bottom));border:1px solid var(--line,#25253b);border-bottom:0;animation:thup .28s cubic-bezier(.2,.8,.2,1)}
.thhd{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;padding:16px 4px 12px;background:var(--card,#0f0f18)}
.thhd b{font-size:1.1rem}
.thx{width:38px;height:38px;border-radius:50%;border:1px solid var(--line,#25253b);background:transparent;color:inherit;display:grid;place-items:center;cursor:pointer}
.thgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.thc{all:unset;box-sizing:border-box;cursor:pointer;display:block;border-radius:24px;padding:10px 10px 12px;background:var(--tb);color:var(--tfg);
  border:1.5px solid color-mix(in srgb,var(--tfg) 14%,transparent);position:relative;transition:transform .15s,border-color .2s,box-shadow .25s}
.thc:active{transform:scale(.98)}
.thc.on{border-color:var(--c2);box-shadow:0 0 0 1px var(--c2) inset,0 0 18px color-mix(in srgb,var(--c1) 55%,transparent)}
.thp{display:block;height:64px;border-radius:18px 18px 18px 8px;background:linear-gradient(135deg,var(--c1),var(--c2));position:relative;overflow:hidden}
.tha{position:absolute;right:8px;bottom:8px;font-style:normal;font-weight:800;font-size:.72rem;padding:3px 9px;border-radius:999px;background:#000b;color:var(--c2);font-family:var(--font,inherit)}
.lt .tha{background:#fffc;color:var(--c1)}
.thl{position:absolute;left:10px;bottom:11px;width:34px;height:6px;border-radius:6px;background:#0006}
.thb{position:absolute;left:6px;top:6px;font-style:normal;font-size:.62rem;font-weight:700;padding:2px 8px;border-radius:999px;background:color-mix(in srgb,var(--c1) 70%,#000);color:#fff}
.thsw{display:flex;height:11px;margin:9px 0 7px;border-radius:99px;overflow:hidden}
.thsw i{flex:1}
.thsw i:nth-child(1){background:color-mix(in srgb,var(--c2) 55%,#fff)}.thsw i:nth-child(2){background:var(--c2)}
.thsw i:nth-child(3){background:color-mix(in srgb,var(--c1) 50%,var(--c2))}.thsw i:nth-child(4){background:var(--c1)}
.thsw i:nth-child(5){background:color-mix(in srgb,var(--c1) 55%,#000)}
.thdt{display:flex;justify-content:space-around;padding:6px 8px;border-radius:99px;background:color-mix(in srgb,var(--tfg) 8%,transparent);margin-bottom:8px}
.thdt i{width:7px;height:7px;border-radius:50%;background:color-mix(in srgb,var(--c1) 50%,transparent)}.thdt i:nth-child(3){background:var(--c2)}
.thn{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:.92rem}
.thn b{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.thn svg{width:18px;height:18px;color:var(--c2);opacity:0}.thc.on .thn svg{opacity:1}
@keyframes thup{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
@keyframes thfade{from{opacity:0}to{opacity:1}}

/* ===== v1.6.3: دسته‌بندی تم‌ها و چیدمان بهتر ===== */
.thg{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:8px;margin:14px 4px 2px;font-size:.84rem;font-weight:800;color:var(--mu,#8e8fa9)}
.thg:first-child{margin-top:4px}
.thg::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--a2,#b9aaff);box-shadow:0 0 10px var(--a2,#b9aaff);order:-1}
.thg small{margin-inline-start:auto;font-weight:600;opacity:.8}
.thsh{border-radius:26px 26px 0 0}
.thc{border-radius:18px}.thp{border-radius:13px 13px 13px 6px}
.thc.on{border-color:var(--c2)}
@media(min-width:520px){.thgrid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* ===== v1.8.2: همیشه ۳ تم در هر ردیف (موبایل هم)، کارت‌ها جمع‌وجورتر ===== */
.thgrid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px}
.thsh{padding-inline:10px}
.thc{border-radius:15px;padding:6px 6px 8px}
.thp{height:46px;border-radius:11px 11px 11px 5px}
.tha{right:5px;bottom:5px;font-size:.6rem;padding:2px 7px}
.thl{left:6px;bottom:8px;width:22px;height:4px}
.thb{left:4px;top:4px;font-size:.5rem;padding:1px 6px}
.thsw{height:8px;margin:7px 0 6px}
.thdt{padding:5px 6px;margin-bottom:6px}
.thdt i{width:5px;height:5px}
.thn{gap:3px;font-size:.74rem;align-items:flex-start;min-height:2.5em}
.thn b{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.25;font-size:.74rem}
.thn svg{width:14px;height:14px;flex:none;margin-top:1px}
.thg{margin:12px 2px 2px;font-size:.8rem}
@media(min-width:520px){.thc{padding:8px 8px 10px}.thp{height:56px}.thn,.thn b{font-size:.84rem}.thb{font-size:.58rem}}
