/* Rico.uz dizayn temalari: samarqand (asosiy) va telegram. html[data-theme] orqali almashadi. */
html[data-theme="samarqand"] {
    --color-amber-50: #fff8e1;
    --color-amber-100: #ffefb8;
    --color-amber-200: #fbe28a;
    --color-amber-300: #f6d77f;
    --color-amber-400: #efc552;
    --color-amber-500: #d9a431;
    --color-amber-600: #b9871f;
    --color-amber-700: #8f6716;
    --color-amber-800: #664a10;
    --color-amber-900: #46330b;
    --color-amber-950: #2a1e06;
    --color-yellow-50: #fff8e1;
    --color-yellow-100: #ffefb8;
    --color-yellow-200: #fbe28a;
    --color-yellow-300: #f6d77f;
    --color-yellow-400: #efc552;
    --color-yellow-500: #d9a431;
    --color-yellow-600: #b9871f;
    --color-yellow-700: #8f6716;
    --color-yellow-800: #664a10;
    --color-yellow-900: #46330b;
    --color-yellow-950: #2a1e06;
    --color-orange-50: #fff8e1;
    --color-orange-100: #ffefb8;
    --color-orange-200: #fbe28a;
    --color-orange-300: #f6d77f;
    --color-orange-400: #efc552;
    --color-orange-500: #d9a431;
    --color-orange-600: #b9871f;
    --color-orange-700: #8f6716;
    --color-orange-800: #664a10;
    --color-orange-900: #46330b;
    --color-orange-950: #2a1e06;
    --color-gold-50: #fff8e1;
    --color-gold-100: #ffefb8;
    --color-gold-200: #fbe28a;
    --color-gold-300: #f6d77f;
    --color-gold-400: #efc552;
    --color-gold-500: #d9a431;
    --color-gold-600: #b9871f;
    --color-gold-700: #8f6716;
    --color-gold-800: #664a10;
    --color-gold-900: #46330b;
    --color-gold-950: #2a1e06;
    --color-stone-50: #f3fbfb;
    --color-stone-100: #e4f3f4;
    --color-stone-200: #cbe5e8;
    --color-stone-300: #a9d0d6;
    --color-stone-400: #86b8c1;
    --color-stone-500: #5f9aa6;
    --color-stone-600: #3f7a8b;
    --color-stone-700: #215a70;
    --color-stone-800: #0d3d54;
    --color-stone-900: #082f44;
    --color-stone-950: #051f30;
    --color-zinc-50: #f3fbfb;
    --color-zinc-100: #e4f3f4;
    --color-zinc-200: #cbe5e8;
    --color-zinc-300: #a9d0d6;
    --color-zinc-400: #86b8c1;
    --color-zinc-500: #5f9aa6;
    --color-zinc-600: #3f7a8b;
    --color-zinc-700: #215a70;
    --color-zinc-800: #0d3d54;
    --color-zinc-900: #082f44;
    --color-zinc-950: #051f30;
    --color-slate-50: #f3fbfb;
    --color-slate-100: #e4f3f4;
    --color-slate-200: #cbe5e8;
    --color-slate-300: #a9d0d6;
    --color-slate-400: #86b8c1;
    --color-slate-500: #5f9aa6;
    --color-slate-600: #3f7a8b;
    --color-slate-700: #215a70;
    --color-slate-800: #0d3d54;
    --color-slate-900: #082f44;
    --color-slate-950: #051f30;
    --color-gray-50: #f3fbfb;
    --color-gray-100: #e4f3f4;
    --color-gray-200: #cbe5e8;
    --color-gray-300: #a9d0d6;
    --color-gray-400: #86b8c1;
    --color-gray-500: #5f9aa6;
    --color-gray-600: #3f7a8b;
    --color-gray-700: #215a70;
    --color-gray-800: #0d3d54;
    --color-gray-900: #082f44;
    --color-gray-950: #051f30;
    --color-neutral-50: #f3fbfb;
    --color-neutral-100: #e4f3f4;
    --color-neutral-200: #cbe5e8;
    --color-neutral-300: #a9d0d6;
    --color-neutral-400: #86b8c1;
    --color-neutral-500: #5f9aa6;
    --color-neutral-600: #3f7a8b;
    --color-neutral-700: #215a70;
    --color-neutral-800: #0d3d54;
    --color-neutral-900: #082f44;
    --color-neutral-950: #051f30;
    --color-emerald-50: #effcf9;
    --color-emerald-100: #cdf6ee;
    --color-emerald-200: #9aebdd;
    --color-emerald-300: #5fe0d1;
    --color-emerald-400: #34cdbb;
    --color-emerald-500: #1fb5a3;
    --color-emerald-600: #159288;
    --color-emerald-700: #14746e;
    --color-emerald-800: #135c58;
    --color-emerald-900: #124c49;
    --color-emerald-950: #062e2d;
    --color-green-50: #effcf9;
    --color-green-100: #cdf6ee;
    --color-green-200: #9aebdd;
    --color-green-300: #5fe0d1;
    --color-green-400: #34cdbb;
    --color-green-500: #1fb5a3;
    --color-green-600: #159288;
    --color-green-700: #14746e;
    --color-green-800: #135c58;
    --color-green-900: #124c49;
    --color-green-950: #062e2d;
    --color-teal-50: #effcf9;
    --color-teal-100: #cdf6ee;
    --color-teal-200: #9aebdd;
    --color-teal-300: #5fe0d1;
    --color-teal-400: #34cdbb;
    --color-teal-500: #1fb5a3;
    --color-teal-600: #159288;
    --color-teal-700: #14746e;
    --color-teal-800: #135c58;
    --color-teal-900: #124c49;
    --color-teal-950: #062e2d;
    --color-lime-50: #effcf9;
    --color-lime-100: #cdf6ee;
    --color-lime-200: #9aebdd;
    --color-lime-300: #5fe0d1;
    --color-lime-400: #34cdbb;
    --color-lime-500: #1fb5a3;
    --color-lime-600: #159288;
    --color-lime-700: #14746e;
    --color-lime-800: #135c58;
    --color-lime-900: #124c49;
    --color-lime-950: #062e2d;
    --color-cyan-50: #eef3ff;
    --color-cyan-100: #dbe6ff;
    --color-cyan-200: #bcd0ff;
    --color-cyan-300: #8fb4ff;
    --color-cyan-400: #5f90f5;
    --color-cyan-500: #3a6fe0;
    --color-cyan-600: #2b57c2;
    --color-cyan-700: #244699;
    --color-cyan-800: #213b7a;
    --color-cyan-900: #1f3363;
    --color-cyan-950: #141f3d;
    --color-sky-50: #eef3ff;
    --color-sky-100: #dbe6ff;
    --color-sky-200: #bcd0ff;
    --color-sky-300: #8fb4ff;
    --color-sky-400: #5f90f5;
    --color-sky-500: #3a6fe0;
    --color-sky-600: #2b57c2;
    --color-sky-700: #244699;
    --color-sky-800: #213b7a;
    --color-sky-900: #1f3363;
    --color-sky-950: #141f3d;
    --color-blue-50: #eef3ff;
    --color-blue-100: #dbe6ff;
    --color-blue-200: #bcd0ff;
    --color-blue-300: #8fb4ff;
    --color-blue-400: #5f90f5;
    --color-blue-500: #3a6fe0;
    --color-blue-600: #2b57c2;
    --color-blue-700: #244699;
    --color-blue-800: #213b7a;
    --color-blue-900: #1f3363;
    --color-blue-950: #141f3d;
    --color-indigo-50: #eef3ff;
    --color-indigo-100: #dbe6ff;
    --color-indigo-200: #bcd0ff;
    --color-indigo-300: #8fb4ff;
    --color-indigo-400: #5f90f5;
    --color-indigo-500: #3a6fe0;
    --color-indigo-600: #2b57c2;
    --color-indigo-700: #244699;
    --color-indigo-800: #213b7a;
    --color-indigo-900: #1f3363;
    --color-indigo-950: #141f3d;
    --color-violet-50: #eef3ff;
    --color-violet-100: #dbe6ff;
    --color-violet-200: #bcd0ff;
    --color-violet-300: #8fb4ff;
    --color-violet-400: #5f90f5;
    --color-violet-500: #3a6fe0;
    --color-violet-600: #2b57c2;
    --color-violet-700: #244699;
    --color-violet-800: #213b7a;
    --color-violet-900: #1f3363;
    --color-violet-950: #141f3d;
    --color-purple-50: #eef3ff;
    --color-purple-100: #dbe6ff;
    --color-purple-200: #bcd0ff;
    --color-purple-300: #8fb4ff;
    --color-purple-400: #5f90f5;
    --color-purple-500: #3a6fe0;
    --color-purple-600: #2b57c2;
    --color-purple-700: #244699;
    --color-purple-800: #213b7a;
    --color-purple-900: #1f3363;
    --color-purple-950: #141f3d;
    --color-fuchsia-50: #eef3ff;
    --color-fuchsia-100: #dbe6ff;
    --color-fuchsia-200: #bcd0ff;
    --color-fuchsia-300: #8fb4ff;
    --color-fuchsia-400: #5f90f5;
    --color-fuchsia-500: #3a6fe0;
    --color-fuchsia-600: #2b57c2;
    --color-fuchsia-700: #244699;
    --color-fuchsia-800: #213b7a;
    --color-fuchsia-900: #1f3363;
    --color-fuchsia-950: #141f3d;
    --color-red-50: #fff1ed;
    --color-red-100: #ffdfd6;
    --color-red-200: #ffc0af;
    --color-red-300: #ff9f7a;
    --color-red-400: #f98462;
    --color-red-500: #ee6a4a;
    --color-red-600: #d4503a;
    --color-red-700: #b03e2e;
    --color-red-800: #8c352a;
    --color-red-900: #732f27;
    --color-red-950: #3f1511;
    --color-rose-50: #fff1ed;
    --color-rose-100: #ffdfd6;
    --color-rose-200: #ffc0af;
    --color-rose-300: #ff9f7a;
    --color-rose-400: #f98462;
    --color-rose-500: #ee6a4a;
    --color-rose-600: #d4503a;
    --color-rose-700: #b03e2e;
    --color-rose-800: #8c352a;
    --color-rose-900: #732f27;
    --color-rose-950: #3f1511;
    --color-pink-50: #fff1ed;
    --color-pink-100: #ffdfd6;
    --color-pink-200: #ffc0af;
    --color-pink-300: #ff9f7a;
    --color-pink-400: #f98462;
    --color-pink-500: #ee6a4a;
    --color-pink-600: #d4503a;
    --color-pink-700: #b03e2e;
    --color-pink-800: #8c352a;
    --color-pink-900: #732f27;
    --color-pink-950: #3f1511;
    --color-obsidian-950: #051f30; --color-obsidian-900: #07253a; --color-obsidian-850: #0a3a52;
    --color-obsidian-800: #0f4c68; --color-obsidian-700: #166079;
    --color-board-light: #f6e7bd; --color-board-dark: #1b7f8f; --color-board-dark-highlight: #208b9c;
    --color-board-selected: #f6d77f; --color-board-valid: #5fe0d1; --color-board-capture: #ff9f7a;
    --night: #07253a; --night-2: #0a3a52; --night-3: #0f4c68; --lapis: #1b7f8f; --lapis-hi: #249aab;
    --brass: #d9a431; --brass-hi: #f6d77f; --brass-lo: #a07a1c;
    --line: rgb(240 200 110 / .30); --line-strong: rgb(240 200 110 / .62);
    --ivory: #fff6e0; --mist: #a9d0d6; --mist-dim: #6fa3ad;
    --turq: #5fe0d1; --alert: #ff9f7a;
    --r: 18px; --r-sm: 12px;
}
html[data-theme="telegram"] {
    --color-amber-50: #eef7ff;
    --color-amber-100: #d9ecff;
    --color-amber-200: #b8dbff;
    --color-amber-300: #8cc8ff;
    --color-amber-400: #6bb8fb;
    --color-amber-500: #4ea4f6;
    --color-amber-600: #2f84d9;
    --color-amber-700: #2468b0;
    --color-amber-800: #1d5189;
    --color-amber-900: #193f6a;
    --color-amber-950: #102844;
    --color-yellow-50: #eef7ff;
    --color-yellow-100: #d9ecff;
    --color-yellow-200: #b8dbff;
    --color-yellow-300: #8cc8ff;
    --color-yellow-400: #6bb8fb;
    --color-yellow-500: #4ea4f6;
    --color-yellow-600: #2f84d9;
    --color-yellow-700: #2468b0;
    --color-yellow-800: #1d5189;
    --color-yellow-900: #193f6a;
    --color-yellow-950: #102844;
    --color-orange-50: #eef7ff;
    --color-orange-100: #d9ecff;
    --color-orange-200: #b8dbff;
    --color-orange-300: #8cc8ff;
    --color-orange-400: #6bb8fb;
    --color-orange-500: #4ea4f6;
    --color-orange-600: #2f84d9;
    --color-orange-700: #2468b0;
    --color-orange-800: #1d5189;
    --color-orange-900: #193f6a;
    --color-orange-950: #102844;
    --color-gold-50: #eef7ff;
    --color-gold-100: #d9ecff;
    --color-gold-200: #b8dbff;
    --color-gold-300: #8cc8ff;
    --color-gold-400: #6bb8fb;
    --color-gold-500: #4ea4f6;
    --color-gold-600: #2f84d9;
    --color-gold-700: #2468b0;
    --color-gold-800: #1d5189;
    --color-gold-900: #193f6a;
    --color-gold-950: #102844;
    --color-stone-50: #f4f7fa;
    --color-stone-100: #e6ecf1;
    --color-stone-200: #cfd9e2;
    --color-stone-300: #aebdca;
    --color-stone-400: #8b9db0;
    --color-stone-500: #6c7f93;
    --color-stone-600: #4a5d70;
    --color-stone-700: #2e3f51;
    --color-stone-800: #1f2c3a;
    --color-stone-900: #17212b;
    --color-stone-950: #0e1621;
    --color-zinc-50: #f4f7fa;
    --color-zinc-100: #e6ecf1;
    --color-zinc-200: #cfd9e2;
    --color-zinc-300: #aebdca;
    --color-zinc-400: #8b9db0;
    --color-zinc-500: #6c7f93;
    --color-zinc-600: #4a5d70;
    --color-zinc-700: #2e3f51;
    --color-zinc-800: #1f2c3a;
    --color-zinc-900: #17212b;
    --color-zinc-950: #0e1621;
    --color-slate-50: #f4f7fa;
    --color-slate-100: #e6ecf1;
    --color-slate-200: #cfd9e2;
    --color-slate-300: #aebdca;
    --color-slate-400: #8b9db0;
    --color-slate-500: #6c7f93;
    --color-slate-600: #4a5d70;
    --color-slate-700: #2e3f51;
    --color-slate-800: #1f2c3a;
    --color-slate-900: #17212b;
    --color-slate-950: #0e1621;
    --color-gray-50: #f4f7fa;
    --color-gray-100: #e6ecf1;
    --color-gray-200: #cfd9e2;
    --color-gray-300: #aebdca;
    --color-gray-400: #8b9db0;
    --color-gray-500: #6c7f93;
    --color-gray-600: #4a5d70;
    --color-gray-700: #2e3f51;
    --color-gray-800: #1f2c3a;
    --color-gray-900: #17212b;
    --color-gray-950: #0e1621;
    --color-neutral-50: #f4f7fa;
    --color-neutral-100: #e6ecf1;
    --color-neutral-200: #cfd9e2;
    --color-neutral-300: #aebdca;
    --color-neutral-400: #8b9db0;
    --color-neutral-500: #6c7f93;
    --color-neutral-600: #4a5d70;
    --color-neutral-700: #2e3f51;
    --color-neutral-800: #1f2c3a;
    --color-neutral-900: #17212b;
    --color-neutral-950: #0e1621;
    --color-emerald-50: #effcf5;
    --color-emerald-100: #d3f7e4;
    --color-emerald-200: #a9eccb;
    --color-emerald-300: #7ddfb0;
    --color-emerald-400: #5ccf9a;
    --color-emerald-500: #3db880;
    --color-emerald-600: #2e9667;
    --color-emerald-700: #277853;
    --color-emerald-800: #226044;
    --color-emerald-900: #1d4e39;
    --color-emerald-950: #0e2b20;
    --color-green-50: #effcf5;
    --color-green-100: #d3f7e4;
    --color-green-200: #a9eccb;
    --color-green-300: #7ddfb0;
    --color-green-400: #5ccf9a;
    --color-green-500: #3db880;
    --color-green-600: #2e9667;
    --color-green-700: #277853;
    --color-green-800: #226044;
    --color-green-900: #1d4e39;
    --color-green-950: #0e2b20;
    --color-teal-50: #effcf5;
    --color-teal-100: #d3f7e4;
    --color-teal-200: #a9eccb;
    --color-teal-300: #7ddfb0;
    --color-teal-400: #5ccf9a;
    --color-teal-500: #3db880;
    --color-teal-600: #2e9667;
    --color-teal-700: #277853;
    --color-teal-800: #226044;
    --color-teal-900: #1d4e39;
    --color-teal-950: #0e2b20;
    --color-lime-50: #effcf5;
    --color-lime-100: #d3f7e4;
    --color-lime-200: #a9eccb;
    --color-lime-300: #7ddfb0;
    --color-lime-400: #5ccf9a;
    --color-lime-500: #3db880;
    --color-lime-600: #2e9667;
    --color-lime-700: #277853;
    --color-lime-800: #226044;
    --color-lime-900: #1d4e39;
    --color-lime-950: #0e2b20;
    --color-cyan-50: #f0f5ff;
    --color-cyan-100: #dde8ff;
    --color-cyan-200: #bfd3ff;
    --color-cyan-300: #98b8fb;
    --color-cyan-400: #7099f3;
    --color-cyan-500: #5a8dee;
    --color-cyan-600: #3f6fd1;
    --color-cyan-700: #3258a8;
    --color-cyan-800: #2b4888;
    --color-cyan-900: #273c6e;
    --color-cyan-950: #172344;
    --color-sky-50: #f0f5ff;
    --color-sky-100: #dde8ff;
    --color-sky-200: #bfd3ff;
    --color-sky-300: #98b8fb;
    --color-sky-400: #7099f3;
    --color-sky-500: #5a8dee;
    --color-sky-600: #3f6fd1;
    --color-sky-700: #3258a8;
    --color-sky-800: #2b4888;
    --color-sky-900: #273c6e;
    --color-sky-950: #172344;
    --color-blue-50: #f0f5ff;
    --color-blue-100: #dde8ff;
    --color-blue-200: #bfd3ff;
    --color-blue-300: #98b8fb;
    --color-blue-400: #7099f3;
    --color-blue-500: #5a8dee;
    --color-blue-600: #3f6fd1;
    --color-blue-700: #3258a8;
    --color-blue-800: #2b4888;
    --color-blue-900: #273c6e;
    --color-blue-950: #172344;
    --color-indigo-50: #f0f5ff;
    --color-indigo-100: #dde8ff;
    --color-indigo-200: #bfd3ff;
    --color-indigo-300: #98b8fb;
    --color-indigo-400: #7099f3;
    --color-indigo-500: #5a8dee;
    --color-indigo-600: #3f6fd1;
    --color-indigo-700: #3258a8;
    --color-indigo-800: #2b4888;
    --color-indigo-900: #273c6e;
    --color-indigo-950: #172344;
    --color-violet-50: #f0f5ff;
    --color-violet-100: #dde8ff;
    --color-violet-200: #bfd3ff;
    --color-violet-300: #98b8fb;
    --color-violet-400: #7099f3;
    --color-violet-500: #5a8dee;
    --color-violet-600: #3f6fd1;
    --color-violet-700: #3258a8;
    --color-violet-800: #2b4888;
    --color-violet-900: #273c6e;
    --color-violet-950: #172344;
    --color-purple-50: #f0f5ff;
    --color-purple-100: #dde8ff;
    --color-purple-200: #bfd3ff;
    --color-purple-300: #98b8fb;
    --color-purple-400: #7099f3;
    --color-purple-500: #5a8dee;
    --color-purple-600: #3f6fd1;
    --color-purple-700: #3258a8;
    --color-purple-800: #2b4888;
    --color-purple-900: #273c6e;
    --color-purple-950: #172344;
    --color-fuchsia-50: #f0f5ff;
    --color-fuchsia-100: #dde8ff;
    --color-fuchsia-200: #bfd3ff;
    --color-fuchsia-300: #98b8fb;
    --color-fuchsia-400: #7099f3;
    --color-fuchsia-500: #5a8dee;
    --color-fuchsia-600: #3f6fd1;
    --color-fuchsia-700: #3258a8;
    --color-fuchsia-800: #2b4888;
    --color-fuchsia-900: #273c6e;
    --color-fuchsia-950: #172344;
    --color-red-50: #fff1f1;
    --color-red-100: #ffe0e0;
    --color-red-200: #ffc2c2;
    --color-red-300: #ff9a9a;
    --color-red-400: #f98080;
    --color-red-500: #ef6464;
    --color-red-600: #d34a4a;
    --color-red-700: #ae3b3b;
    --color-red-800: #8c3333;
    --color-red-900: #732e2e;
    --color-red-950: #3f1515;
    --color-rose-50: #fff1f1;
    --color-rose-100: #ffe0e0;
    --color-rose-200: #ffc2c2;
    --color-rose-300: #ff9a9a;
    --color-rose-400: #f98080;
    --color-rose-500: #ef6464;
    --color-rose-600: #d34a4a;
    --color-rose-700: #ae3b3b;
    --color-rose-800: #8c3333;
    --color-rose-900: #732e2e;
    --color-rose-950: #3f1515;
    --color-pink-50: #fff1f1;
    --color-pink-100: #ffe0e0;
    --color-pink-200: #ffc2c2;
    --color-pink-300: #ff9a9a;
    --color-pink-400: #f98080;
    --color-pink-500: #ef6464;
    --color-pink-600: #d34a4a;
    --color-pink-700: #ae3b3b;
    --color-pink-800: #8c3333;
    --color-pink-900: #732e2e;
    --color-pink-950: #3f1515;
    --color-obsidian-950: #0e1621; --color-obsidian-900: #17212b; --color-obsidian-850: #1f2c3a;
    --color-obsidian-800: #2b3a4a; --color-obsidian-700: #364a5e;
    --color-board-light: #dfe6ee; --color-board-dark: #4a7fb5; --color-board-dark-highlight: #5189c0;
    --color-board-selected: #8cc8ff; --color-board-valid: #5ccf9a; --color-board-capture: #ff7b7b;
    --night: #17212b; --night-2: #1f2c3a; --night-3: #2b3a4a; --lapis: #2f7fd0; --lapis-hi: #4ea4f6;
    --brass: #4ea4f6; --brass-hi: #8cc8ff; --brass-lo: #2f84d9;
    --line: rgb(255 255 255 / .09); --line-strong: rgb(78 164 246 / .55);
    --ivory: #ffffff; --mist: #aebdca; --mist-dim: #7e92a8;
    --turq: #5ccf9a; --alert: #ff7b7b;
    --r: 12px; --r-sm: 8px;
}

/* ---------- Qattiq yozilgan ranglarni temaga bog'lash ---------- */
html[data-theme] .bg-\[\#0c1130\] { background-color: var(--night); }
html[data-theme] .bg-\[\#111846\] { background-color: var(--night-2); }
html[data-theme] .bg-\[\#19225a\] { background-color: var(--night-3); }
html[data-theme] .bg-\[\#0c1130\]\/80 { background-color: color-mix(in oklab, var(--night) 80%, transparent); }
html[data-theme] .from-\[\#19225a\] { --tw-gradient-from: var(--night-3); }
html[data-theme] .via-\[\#111846\] { --tw-gradient-via: var(--night-2); }
html[data-theme] .via-\[\#0c1130\] { --tw-gradient-via: var(--night); }
html[data-theme] .to-\[\#0a0e28\] { --tw-gradient-to: var(--color-obsidian-950); }
html[data-theme] .to-\[\#0c1130\] { --tw-gradient-to: var(--night); }
html[data-theme] .border-\[\#0c1130\] { border-color: var(--night); }
html[data-theme] .text-\[\#0c1130\] { color: var(--night); }
html[data-theme] .sq-dark { fill: var(--color-board-dark); }
html[data-theme] .sq-light { fill: var(--color-board-light); }
html[data-theme] .man-b, html[data-theme] .pc-b { fill: var(--color-obsidian-950); }
html[data-theme] .coord.on-dark { color: var(--brass-hi); }
html[data-theme] .coord.on-light { color: var(--color-board-dark); }
html[data-theme] .border-\[\#e3c277\] { border-color: var(--brass-hi); }
html[data-theme] .border-\[\#c9a24b\] { border-color: var(--brass); }

/* ---------- Shaklar (ikkala tema uchun umumiy) ---------- */
.seg, .play-card, .list, .online, .leaders, .duo-card, .cta, .tile, .moves-panel, .search-card, .btn, .btn-line,
.input, .notice, .sheet, .chip, .count, .search-btn, .pbtn, .btn-primary, .link-btn, .tabs a, .lang a, .theme-opt,
.field input, .hero .btn, .plate-tab { border-radius: var(--r-sm); }
.seg, .play-card, .list, .online, .leaders, .duo-card, .cta, .tile, .moves-panel, .search-card, .sheet { border-radius: var(--r); }
.seg, .list, .online, .leaders, .cta, .moves-panel { overflow: hidden; }
.cat-tab { border-radius: calc(var(--r-sm) - 2px); }
.gold-card, .gold-card-bright { border-radius: var(--r); }
.gold-btn-primary { border-radius: var(--r-sm); }
.seg { padding: 4px; gap: 4px; }
.seg .cat-tab { border-right: 0; }
.list-ico, .duo-ico, .cta-ico, .plate-icon, .snr-av, .pav, .app-avatar, .app-brand, .pill { border-radius: var(--r-sm); }
.pav, .snr-av { border-radius: 50%; }
.app-header .app-avatar { border-radius: 50%; }
.cta-ico { border-radius: var(--r); }
.found-mark, .radar-core { border-radius: 50%; }
.theme-opt { border-radius: var(--r); }

/* Avatar ranglari (rasmsiz o'yinchilar) */
.prow:nth-child(6n+1) .pav:not(:has(img)), .snr:nth-child(6n+1) .snr-av:not(:has(img)) { background: #ff7a59; color: #fff; border-color: transparent; }
.prow:nth-child(6n+2) .pav:not(:has(img)), .snr:nth-child(6n+2) .snr-av:not(:has(img)) { background: #8b5cf6; color: #fff; border-color: transparent; }
.prow:nth-child(6n+3) .pav:not(:has(img)), .snr:nth-child(6n+3) .snr-av:not(:has(img)) { background: #22a06b; color: #fff; border-color: transparent; }
.prow:nth-child(6n+4) .pav:not(:has(img)), .snr:nth-child(6n+4) .snr-av:not(:has(img)) { background: #0ea5c6; color: #fff; border-color: transparent; }
.prow:nth-child(6n+5) .pav:not(:has(img)), .snr:nth-child(6n+5) .snr-av:not(:has(img)) { background: #e0a020; color: #1a1305; border-color: transparent; }
.prow:nth-child(6n+6) .pav:not(:has(img)), .snr:nth-child(6n+6) .snr-av:not(:has(img)) { background: #e0559a; color: #fff; border-color: transparent; }

/* Kartalar */
.duo-card { border: 0; color: #fff; }
.duo-card small { color: rgb(255 255 255 / .82); }
.duo-card .duo-ico { background: rgb(255 255 255 / .2); border: 0; color: #fff; }
.pbtn { background: var(--brass); border-color: transparent; color: var(--night); }
.pbtn:hover { background: var(--brass-hi); color: var(--night); }
.pbtn-ico { background: transparent; border: 1px solid var(--line-strong); color: var(--mist); }
.tile:nth-child(1) > .ico { color: #f6d77f; } .tile:nth-child(2) > .ico { color: #5fe0d1; }
.tile:nth-child(3) > .ico { color: #ff9f7a; } .tile:nth-child(4) > .ico { color: #8fb4ff; }

/* Qo'shimcha: faqat Samarqand uchun bezaklar (Telegram temasida yashirin) */
.only-samarqand { display: none; }
.mark-doppi { display: none; }

/* ---------- Dizayn tanlash (sozlamalar) ---------- */
.theme-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-opt { display: grid; gap: 6px; justify-items: start; padding: 10px; text-align: left; background: var(--night-2); border: 1px solid var(--line); color: var(--ivory); cursor: pointer; transition: border-color .2s, background .2s; font-family: inherit; }
.theme-opt b { font-size: .88rem; font-weight: 600; line-height: 1.2; }
.theme-opt small { font-size: .72rem; color: var(--mist-dim); }
.theme-opt[aria-pressed="true"] { border-color: var(--brass); background: rgb(255 255 255 / .05); box-shadow: inset 0 0 0 1px var(--brass); }
.theme-sw { width: 100%; height: 44px; border-radius: 10px; display: block; position: relative; overflow: hidden; }
.theme-sw::after { content: ""; position: absolute; right: 8px; bottom: 8px; width: 22px; height: 10px; border-radius: 99px; }
.sw-samarqand { background: radial-gradient(120% 120% at 50% -20%, #12808c 0%, #0a4458 45%, #07253a 100%); }
.sw-samarqand::after { background: linear-gradient(135deg, #f8de8a, #d9a431); }
.sw-telegram { background: linear-gradient(135deg, #1f2c3a, #17212b); }
.sw-telegram::after { background: #4ea4f6; }
.theme-toggle { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: var(--r-sm); background: transparent; color: var(--brass-hi); cursor: pointer; }
.theme-toggle:hover { border-color: var(--brass); }
.theme-toggle svg { width: 18px; height: 18px; }
.foot .theme-switch { width: min(100%, 340px); margin-top: 14px; }

/* ============ SAMARQAND: firuza-ko'k fon, oltin, milliy naqsh ============ */
html[data-theme="samarqand"] { color-scheme: dark; }
html[data-theme="samarqand"] body {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'><g fill='none' stroke='%23f0c76a' stroke-opacity='.075' stroke-width='1.2'><path d='M32 6l7 19 19 7-19 7-7 19-7-19-19-7 19-7z'/><rect x='18' y='18' width='28' height='28' transform='rotate(45 32 32)'/></g></svg>"), radial-gradient(110% 46% at 50% -6%, #12808c 0%, #0a4458 40%, var(--night) 100%);
    background-size: 64px 64px, 100% 100%; background-repeat: repeat, no-repeat; background-attachment: scroll, fixed;
}
html[data-theme="samarqand"] .only-samarqand { display: block; }
html[data-theme="samarqand"] .mark-zij { display: none; }
html[data-theme="samarqand"] .mark-doppi { display: block; }
html[data-theme="samarqand"] .app-header, html[data-theme="samarqand"] .masthead, html[data-theme="samarqand"] .app-nav { background: rgb(5 31 48 / .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
html[data-theme="samarqand"] .app-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='8' viewBox='0 0 48 8'><rect width='48' height='8' fill='%230a3a52'/><g><path d='M0 4l4-3 4 3-4 3z' fill='%23f6d77f'/><path d='M12 4l4-3 4 3-4 3z' fill='%23ff9f7a'/><path d='M24 4l4-3 4 3-4 3z' fill='%235fe0d1'/><path d='M36 4l4-3 4 3-4 3z' fill='%23f6d77f'/><path d='M8 4h4M20 4h4M32 4h4M44 4h4' stroke='%23d9a431' stroke-width='1' opacity='.7'/></g></svg>"); background-size: 48px 6px; background-repeat: repeat-x; pointer-events: none; }
html[data-theme="samarqand"] .foot::before { content: ""; display: block; height: 8px; margin-bottom: 18px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='8' viewBox='0 0 48 8'><rect width='48' height='8' fill='%230a3a52'/><g><path d='M0 4l4-3 4 3-4 3z' fill='%23f6d77f'/><path d='M12 4l4-3 4 3-4 3z' fill='%23ff9f7a'/><path d='M24 4l4-3 4 3-4 3z' fill='%235fe0d1'/><path d='M36 4l4-3 4 3-4 3z' fill='%23f6d77f'/><path d='M8 4h4M20 4h4M32 4h4M44 4h4' stroke='%23d9a431' stroke-width='1' opacity='.7'/></g></svg>"); background-repeat: repeat-x; background-size: 48px 8px; opacity: .9; }
html[data-theme="samarqand"] .play-card, html[data-theme="samarqand"] .list, html[data-theme="samarqand"] .online, html[data-theme="samarqand"] .tile,
html[data-theme="samarqand"] .leaders, html[data-theme="samarqand"] .seg, html[data-theme="samarqand"] .moves-panel, html[data-theme="samarqand"] .search-card { background: rgb(8 64 86 / .58); }
html[data-theme="samarqand"] .cta { background: linear-gradient(135deg, #f8de8a, #d9a431); border-color: transparent; box-shadow: 0 10px 32px rgb(240 200 110 / .35); }
html[data-theme="samarqand"] .btn-primary, html[data-theme="samarqand"] .btn:not(.btn-line), html[data-theme="samarqand"] .cat-tab.is-active, html[data-theme="samarqand"] .search-btn-main { background: linear-gradient(135deg, #f8de8a, #d9a431); color: #07253a; }
html[data-theme="samarqand"] .pbtn { background: linear-gradient(135deg, #f8de8a, #d9a431); }
html[data-theme="samarqand"] .duo-card:nth-child(1) { background: linear-gradient(150deg, #1ea5b4, #0e6d7c); }
html[data-theme="samarqand"] .duo-card:nth-child(2) { background: linear-gradient(150deg, #2f66e0, #1b3a8f); }
html[data-theme="samarqand"] .radar-core { background: #07253a; }
.aside-doppi, .hero-emblem { width: 84px; height: 84px; margin-bottom: 18px; filter: drop-shadow(0 8px 18px rgb(0 0 0 / .35)); }
html[data-theme="samarqand"] .hero-emblem { width: 72px; height: 72px; margin-bottom: 22px; }
.empty-doppi { width: 56px; height: 56px; margin: 0 auto 10px; opacity: .9; }

/* ============ TELEGRAM: oddiy, tanish ko'rinish ============ */
html[data-theme="telegram"] { color-scheme: dark; }
html[data-theme="telegram"] body { background: var(--night); }
html[data-theme="telegram"] .app-header, html[data-theme="telegram"] .masthead, html[data-theme="telegram"] .app-nav { background: var(--night); }
html[data-theme="telegram"] .play-card, html[data-theme="telegram"] .list, html[data-theme="telegram"] .online, html[data-theme="telegram"] .tile,
html[data-theme="telegram"] .leaders, html[data-theme="telegram"] .seg, html[data-theme="telegram"] .moves-panel, html[data-theme="telegram"] .search-card { background: var(--night-2); border-color: var(--line); }
html[data-theme="telegram"] .cta { background: linear-gradient(135deg, #4ea4f6, #2f7fd0); border-color: transparent; box-shadow: 0 8px 22px rgb(47 127 208 / .35); color: #fff; }
html[data-theme="telegram"] .cta-ico { border-color: rgb(255 255 255 / .45); }
html[data-theme="telegram"] .cta-time { background: rgb(255 255 255 / .16); border-left-color: rgb(255 255 255 / .25); color: #fff; }
html[data-theme="telegram"] .btn-primary, html[data-theme="telegram"] .btn:not(.btn-line), html[data-theme="telegram"] .cat-tab.is-active, html[data-theme="telegram"] .search-btn-main { background: #2f7fd0; color: #fff; }
html[data-theme="telegram"] .pbtn { background: #2f7fd0; color: #fff; }
html[data-theme="telegram"] .pbtn:hover { background: #4ea4f6; color: #fff; }
html[data-theme="telegram"] .duo-card:nth-child(1) { background: linear-gradient(135deg, #2e6da4, #245685); }
html[data-theme="telegram"] .duo-card:nth-child(2) { background: linear-gradient(135deg, #3a8a6e, #2b6b55); }
html[data-theme="telegram"] .radar-core { background: var(--night); }
html[data-theme="telegram"] .hero-emblem, html[data-theme="telegram"] .aside-doppi { display: none; }
