/* ==========================================
   THEME COLORS (generated)
   Light values are the original colors; dark values
   are their soft dark-mode counterparts.
========================================== */

:root {
    --t-border-3f72c5: #3F72C5;
    --t-border-4675d1: #4675D1;
    --t-border-48a868: #48A868;
    --t-border-4a80d8: #4A80D8;
    --t-border-5b8def: #5B8DEF;
    --t-border-8fa8c7: #8FA8C7;
    --t-border-c2cfdf: #C2CFDF;
    --t-border-c6d7ee: #C6D7EE;
    --t-border-d5e0ef: #D5E0EF;
    --t-border-d7e0ec: #D7E0EC;
    --t-border-d8e3f2: #D8E3F2;
    --t-border-d93636: #D93636;
    --t-border-d94a4a: #D94A4A;
    --t-border-d94a4a-a18: rgba(217, 74, 74, 0.18);
    --t-border-d9e1ec: #D9E1EC;
    --t-border-dce4f0: #DCE4F0;
    --t-border-dce4f0-a90: rgba(220, 228, 240, 0.9);
    --t-border-ddaaaa: #DDAAAA;
    --t-border-dee5ef: #DEE5EF;
    --t-border-e0e6ef: #E0E6EF;
    --t-border-e0e7f2: #E0E7F2;
    --t-border-e2c7c7: #E2C7C7;
    --t-border-e3e9f2: #E3E9F2;
    --t-border-e58a3f: #E58A3F;
    --t-border-e5b83f: #E5B83F;
    --t-border-e74c3c: #E74C3C;
    --t-border-eef2f6: #EEF2F6;
    --t-border-f3dce5: #F3DCE5;
    --t-border-ffffff: #FFFFFF;
    --t-border-ffffff-a25: rgba(255, 255, 255, 0.25);
    --t-border-ffffff-a30: rgba(255, 255, 255, 0.3);
    --t-border-ffffff-a35: rgba(255, 255, 255, 0.35);
    --t-shadow-000000-a15: rgba(0, 0, 0, 0.15);
    --t-shadow-000000-a18: rgba(0, 0, 0, 0.18);
    --t-shadow-000000-a20: rgba(0, 0, 0, 0.20);
    --t-shadow-000000-a25: rgba(0, 0, 0, 0.25);
    --t-shadow-26354a-a04: rgba(38, 53, 74, 0.04);
    --t-shadow-26354a-a05: rgba(38, 53, 74, 0.05);
    --t-shadow-26354a-a06: rgba(38, 53, 74, 0.06);
    --t-shadow-26354a-a08: rgba(38, 53, 74, 0.08);
    --t-shadow-26354a-a10: rgba(38, 53, 74, 0.10);
    --t-shadow-26354a-a12: rgba(38, 53, 74, 0.12);
    --t-shadow-26354a-a15: rgba(38, 53, 74, 0.15);
    --t-shadow-26354a-a16: rgba(38, 53, 74, 0.16);
    --t-shadow-26354a-a18: rgba(38, 53, 74, 0.18);
    --t-shadow-26354a-a20: rgba(38, 53, 74, 0.20);
    --t-shadow-26354a-a22: rgba(38, 53, 74, 0.22);
    --t-shadow-26354a-a25: rgba(38, 53, 74, 0.25);
    --t-shadow-39a96b-a12: rgba(57, 169, 107, 0.12);
    --t-shadow-3f72c5-a15: rgba(63, 114, 197, 0.15);
    --t-shadow-3f72c5-a18: rgba(63, 114, 197, 0.18);
    --t-shadow-3f72c5-a20: rgba(63, 114, 197, 0.20);
    --t-shadow-3f72c5-a22: rgba(63, 114, 197, 0.22);
    --t-shadow-3f72c5-a25: rgba(63, 114, 197, 0.25);
    --t-shadow-3f72c5-a28: rgba(63, 114, 197, 0.28);
    --t-shadow-3f72c5-a30: rgba(63, 114, 197, 0.30);
    --t-shadow-48a868-a08: rgba(72, 168, 104, 0.08);
    --t-shadow-48a868-a18: rgba(72, 168, 104, 0.18);
    --t-shadow-4a80d8-a10: rgba(74, 128, 216, 0.10);
    --t-shadow-8fa8c7-a13: rgba(143, 168, 199, 0.13);
    --t-shadow-d93636-a10: rgba(217, 54, 54, 0.10);
    --t-shadow-d93636-a20: rgba(217, 54, 54, 0.20);
    --t-shadow-d93636-a28: rgba(217, 54, 54, 0.28);
    --t-shadow-d94a4a-a12: rgba(217, 74, 74, 0.12);
    --t-shadow-d94a4a-a15: rgba(217, 74, 74, 0.15);
    --t-shadow-d94a4a-a40: rgba(217, 74, 74, 0.40);
    --t-shadow-e58a3f-a12: rgba(229, 138, 63, 0.12);
    --t-shadow-e58a3f-a30: rgba(229, 138, 63, 0.30);
    --t-shadow-e5b83f-a10: rgba(229, 184, 63, 0.10);
    --t-shadow-e5b83f-a12: rgba(229, 184, 63, 0.12);
    --t-shadow-e5b83f-a25: rgba(229, 184, 63, 0.25);
    --t-surface-000000-a18: rgba(0, 0, 0, 0.18);
    --t-surface-000000-a65: rgba(0, 0, 0, 0.65);
    --t-surface-26354a: #26354A;
    --t-surface-26354a-a55: rgba(38, 53, 74, 0.55);
    --t-surface-26354a-a72: rgba(38, 53, 74, 0.72);
    --t-surface-26354a-a80: rgba(38, 53, 74, 0.80);
    --t-surface-26354a-a82: rgba(38, 53, 74, 0.82);
    --t-surface-26354a-a92: rgba(38, 53, 74, 0.92);
    --t-surface-26354a-a94: rgba(38, 53, 74, 0.94);
    --t-surface-26354a-a95: rgba(38, 53, 74, 0.95);
    --t-surface-315faf: #315FAF;
    --t-surface-344966: #344966;
    --t-surface-396bc0: #396BC0;
    --t-surface-39a96b: #39A96B;
    --t-surface-3f72c5: #3F72C5;
    --t-surface-4675d1: #4675D1;
    --t-surface-4a80d8: #4A80D8;
    --t-surface-568be0: #568BE0;
    --t-surface-5b8def: #5B8DEF;
    --t-surface-b83232: #B83232;
    --t-surface-d63c2e: #D63C2E;
    --t-surface-d64545: #D64545;
    --t-surface-d6ecfa: #D6ECFA;
    --t-surface-d93636: #D93636;
    --t-surface-d94a4a: #D94A4A;
    --t-surface-dcebff: #DCEBFF;
    --t-surface-ddf0e4: #DDF0E4;
    --t-surface-e13e3e: #E13E3E;
    --t-surface-e4eaf2: #E4EAF2;
    --t-surface-e5b83f: #E5B83F;
    --t-surface-e5ebf4: #E5EBF4;
    --t-surface-e74c3c: #E74C3C;
    --t-surface-e7edf5: #E7EDF5;
    --t-surface-e8eef7: #E8EEF7;
    --t-surface-eaf2ff: #EAF2FF;
    --t-surface-eaf7ee: #EAF7EE;
    --t-surface-eeeeee: #EEEEEE;
    --t-surface-eef2f7: #EEF2F7;
    --t-surface-ef5350: #EF5350;
    --t-surface-f0f5ff: #F0F5FF;
    --t-surface-f0faf3: #F0FAF3;
    --t-surface-f15e5b: #F15E5B;
    --t-surface-f1e3e5: #F1E3E5;
    --t-surface-f1f4f8: #F1F4F8;
    --t-surface-f3f6fa: #F3F6FA;
    --t-surface-f4f7fc: #F4F7FC;
    --t-surface-f4f8fc: #F4F8FC;
    --t-surface-f5f8fd: #F5F8FD;
    --t-surface-f7e0e8: #F7E0E8;
    --t-surface-f7eff0: #F7EFF0;
    --t-surface-f7f9fc: #F7F9FC;
    --t-surface-f8e4eb: #F8E4EB;
    --t-surface-f8fafd: #F8FAFD;
    --t-surface-fbfcfe: #FBFCFE;
    --t-surface-fceef3: #FCEEF3;
    --t-surface-fde8e8: #FDE8E8;
    --t-surface-ffe8e8: #FFE8E8;
    --t-surface-fff0f0: #FFF0F0;
    --t-surface-fff1e6: #FFF1E6;
    --t-surface-fff3e8: #FFF3E8;
    --t-surface-fff5f5: #FFF5F5;
    --t-surface-fff9e8: #FFF9E8;
    --t-surface-ffffff: #FFFFFF;
    --t-surface-ffffff-a18: rgba(255, 255, 255, 0.18);
    --t-surface-ffffff-a92: rgba(255, 255, 255, 0.92);
    --t-surface-ffffff-a94: rgba(255, 255, 255, 0.94);
    --t-text-222222: #222222;
    --t-text-26354a: #26354A;
    --t-text-2e8d4b: #2E8D4B;
    --t-text-2ead5b: #2EAD5B;
    --t-text-333333: #333333;
    --t-text-34445a: #34445A;
    --t-text-39a96b: #39A96B;
    --t-text-3f72c5: #3F72C5;
    --t-text-526175: #526175;
    --t-text-5b8def: #5B8DEF;
    --t-text-666666: #666666;
    --t-text-677488: #677488;
    --t-text-718096: #718096;
    --t-text-758196: #758196;
    --t-text-7a8798: #7A8798;
    --t-text-7b8798: #7B8798;
    --t-text-8792a2: #8792A2;
    --t-text-8a70d6: #8A70D6;
    --t-text-8a95a5: #8A95A5;
    --t-text-9aa5b5: #9AA5B5;
    --t-text-a0aabb: #A0AABB;
    --t-text-a94442: #A94442;
    --t-text-b44747: #B44747;
    --t-text-b63737: #B63737;
    --t-text-c64545: #C64545;
    --t-text-d64545: #D64545;
    --t-text-d7e5fa: #D7E5FA;
    --t-text-d93636: #D93636;
    --t-text-e04747: #E04747;
    --t-text-eaf2ff: #EAF2FF;
    --t-text-ffffff: #FFFFFF;
}

:root[data-theme="dark"] {
    --t-border-3f72c5: #3F72C5;
    --t-border-4675d1: #4675D1;
    --t-border-48a868: #819C8A;
    --t-border-4a80d8: #4A80D8;
    --t-border-5b8def: #5B8DEF;
    --t-border-8fa8c7: #646E7B;
    --t-border-c2cfdf: #515861;
    --t-border-c6d7ee: #465161;
    --t-border-d5e0ef: #444D59;
    --t-border-d7e0ec: #464E57;
    --t-border-d8e3f2: #414B58;
    --t-border-d93636: #D93636;
    --t-border-d94a4a: #D94A4A;
    --t-border-d94a4a-a18: rgba(217, 74, 74, 0.252);
    --t-border-d9e1ec: #464D56;
    --t-border-dce4f0: #434A55;
    --t-border-dce4f0-a90: rgba(16, 20, 27, 0.9);
    --t-border-ddaaaa: #6D5454;
    --t-border-dee5ef: #444B54;
    --t-border-e0e6ef: #444A53;
    --t-border-e0e7f2: #414854;
    --t-border-e2c7c7: #5F4E4E;
    --t-border-e3e9f2: #414852;
    --t-border-e58a3f: #E58A3F;
    --t-border-e5b83f: #E5B83F;
    --t-border-e74c3c: #E74C3C;
    --t-border-eef2f6: #3F454B;
    --t-border-f3dce5: #564049;
    --t-border-ffffff: #333B47;
    --t-border-ffffff-a25: rgba(255, 255, 255, 0.25);
    --t-border-ffffff-a30: rgba(255, 255, 255, 0.3);
    --t-border-ffffff-a35: rgba(255, 255, 255, 0.35);
    --t-shadow-000000-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-000000-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-000000-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-000000-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-26354a-a04: rgba(0, 0, 0, 0.088);
    --t-shadow-26354a-a05: rgba(0, 0, 0, 0.11);
    --t-shadow-26354a-a06: rgba(0, 0, 0, 0.132);
    --t-shadow-26354a-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-26354a-a10: rgba(0, 0, 0, 0.22);
    --t-shadow-26354a-a12: rgba(0, 0, 0, 0.264);
    --t-shadow-26354a-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-26354a-a16: rgba(0, 0, 0, 0.352);
    --t-shadow-26354a-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-26354a-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-26354a-a22: rgba(0, 0, 0, 0.484);
    --t-shadow-26354a-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-39a96b-a12: rgba(57, 169, 107, 0.12);
    --t-shadow-3f72c5-a15: rgba(63, 114, 197, 0.15);
    --t-shadow-3f72c5-a18: rgba(63, 114, 197, 0.18);
    --t-shadow-3f72c5-a20: rgba(63, 114, 197, 0.2);
    --t-shadow-3f72c5-a22: rgba(63, 114, 197, 0.22);
    --t-shadow-3f72c5-a25: rgba(63, 114, 197, 0.25);
    --t-shadow-3f72c5-a28: rgba(63, 114, 197, 0.28);
    --t-shadow-3f72c5-a30: rgba(63, 114, 197, 0.3);
    --t-shadow-48a868-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-48a868-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-4a80d8-a10: rgba(74, 128, 216, 0.1);
    --t-shadow-8fa8c7-a13: rgba(0, 0, 0, 0.286);
    --t-shadow-d93636-a10: rgba(217, 54, 54, 0.1);
    --t-shadow-d93636-a20: rgba(217, 54, 54, 0.2);
    --t-shadow-d93636-a28: rgba(217, 54, 54, 0.28);
    --t-shadow-d94a4a-a12: rgba(217, 74, 74, 0.12);
    --t-shadow-d94a4a-a15: rgba(217, 74, 74, 0.15);
    --t-shadow-d94a4a-a40: rgba(217, 74, 74, 0.4);
    --t-shadow-e58a3f-a12: rgba(229, 138, 63, 0.12);
    --t-shadow-e58a3f-a30: rgba(229, 138, 63, 0.3);
    --t-shadow-e5b83f-a10: rgba(229, 184, 63, 0.1);
    --t-shadow-e5b83f-a12: rgba(229, 184, 63, 0.12);
    --t-shadow-e5b83f-a25: rgba(229, 184, 63, 0.25);
    --t-surface-000000-a18: rgba(0, 0, 0, 0.18);
    --t-surface-000000-a65: rgba(10, 13, 18, 0.65);
    --t-surface-26354a: #CED5DE;
    --t-surface-26354a-a55: rgba(10, 13, 18, 0.55);
    --t-surface-26354a-a72: rgba(10, 13, 18, 0.72);
    --t-surface-26354a-a80: rgba(10, 13, 18, 0.8);
    --t-surface-26354a-a82: rgba(10, 13, 18, 0.82);
    --t-surface-26354a-a92: rgba(10, 13, 18, 0.92);
    --t-surface-26354a-a94: rgba(10, 13, 18, 0.94);
    --t-surface-26354a-a95: rgba(10, 13, 18, 0.95);
    --t-surface-315faf: #315FAF;
    --t-surface-344966: #B6BFCB;
    --t-surface-396bc0: #396BC0;
    --t-surface-39a96b: #39A96B;
    --t-surface-3f72c5: #3F72C5;
    --t-surface-4675d1: #4675D1;
    --t-surface-4a80d8: #4A80D8;
    --t-surface-568be0: #568BE0;
    --t-surface-5b8def: #5B8DEF;
    --t-surface-b83232: #B83232;
    --t-surface-d63c2e: #D63C2E;
    --t-surface-d64545: #D64545;
    --t-surface-d6ecfa: #14181F;
    --t-surface-d93636: #D93636;
    --t-surface-d94a4a: #D94A4A;
    --t-surface-dcebff: #283443;
    --t-surface-ddf0e4: #334138;
    --t-surface-e13e3e: #E13E3E;
    --t-surface-e4eaf2: #32373D;
    --t-surface-e5b83f: #E5B83F;
    --t-surface-e5ebf4: #30353D;
    --t-surface-e74c3c: #E74C3C;
    --t-surface-e7edf5: #2F353C;
    --t-surface-e8eef7: #2D333C;
    --t-surface-eaf2ff: #252F3E;
    --t-surface-eaf7ee: #2D3B31;
    --t-surface-eeeeee: #2D343E;
    --t-surface-eef2f7: #2D3238;
    --t-surface-ef5350: #EF5350;
    --t-surface-f0f5ff: #242C3C;
    --t-surface-f0faf3: #2A392E;
    --t-surface-f15e5b: #F15E5B;
    --t-surface-f1e3e5: #3E3234;
    --t-surface-f1f4f8: #2D3137;
    --t-surface-f3f6fa: #2A3036;
    --t-surface-f4f7fc: #272E38;
    --t-surface-f4f8fc: #273038;
    --t-surface-f5f8fd: #262D38;
    --t-surface-f7e0e8: #412D34;
    --t-surface-f7eff0: #382D2F;
    --t-surface-f7f9fc: #282D35;
    --t-surface-f8e4eb: #3F2C33;
    --t-surface-f8fafd: #262D36;
    --t-surface-fbfcfe: #252A35;
    --t-surface-fceef3: #3C272E;
    --t-surface-fde8e8: #402626;
    --t-surface-ffe8e8: #3F2626;
    --t-surface-fff0f0: #3C2424;
    --t-surface-fff1e6: #403126;
    --t-surface-fff3e8: #3F3226;
    --t-surface-fff5f5: #3A2323;
    --t-surface-fff9e8: #3F3826;
    --t-surface-ffffff: #242A32;
    --t-surface-ffffff-a18: rgba(255, 255, 255, 0.18);
    --t-surface-ffffff-a92: rgba(16, 20, 27, 0.92);
    --t-surface-ffffff-a94: rgba(16, 20, 27, 0.94);
    --t-text-222222: #E1E1E1;
    --t-text-26354a: #CED5DE;
    --t-text-2e8d4b: #45C26B;
    --t-text-2ead5b: #56D282;
    --t-text-333333: #D9D9D9;
    --t-text-34445a: #C5CDD8;
    --t-text-39a96b: #64CB92;
    --t-text-3f72c5: #7A9DD7;
    --t-text-526175: #B6BFCB;
    --t-text-5b8def: #99B8F5;
    --t-text-666666: #BFBFBF;
    --t-text-677488: #ACB4C1;
    --t-text-718096: #A5AEBC;
    --t-text-758196: #A5ADBA;
    --t-text-7a8798: #A3ACB8;
    --t-text-7b8798: #A3ACB8;
    --t-text-8792a2: #9DA6B3;
    --t-text-8a70d6: #B8A8E6;
    --t-text-8a95a5: #9BA4B2;
    --t-text-9aa5b5: #909CAD;
    --t-text-a0aabb: #8B97AC;
    --t-text-a94442: #C77270;
    --t-text-b44747: #CB7C7C;
    --t-text-b63737: #D16868;
    --t-text-c64545: #D88080;
    --t-text-d64545: #E48484;
    --t-text-d7e5fa: #D7E5FA;
    --t-text-d93636: #E57676;
    --t-text-e04747: #EB8888;
    --t-text-eaf2ff: #EAF2FF;
    --t-text-ffffff: #FFFFFF;
}

/* ==== THEME PALETTES (generated) BEGIN ==== */

:root[data-theme="light"][data-palette="mint"] {
    --t-border-3f72c5: #40AB90;
    --t-border-4675d1: #3EC0A5;
    --t-border-4a80d8: #41C8A6;
    --t-border-5b8def: #50E0C3;
    --t-border-8fa8c7: #92C4B3;
    --t-border-c2cfdf: #C3DED5;
    --t-border-c6d7ee: #C9EBE1;
    --t-border-d5e0ef: #D7EDE7;
    --t-border-d7e0ec: #D9EAE5;
    --t-border-d8e3f2: #DAF0EA;
    --t-border-d9e1ec: #DAEBE5;
    --t-border-dce4f0: #DEEEEA;
    --t-border-dce4f0-a90: rgba(222, 238, 234, 0.9);
    --t-border-dee5ef: #DFEEE9;
    --t-border-e0e6ef: #E1EEEA;
    --t-border-e0e7f2: #E1F1ED;
    --t-border-e3e9f2: #E4F1ED;
    --t-border-eef2f6: #EEF6F3;
    --t-border-ffffff: #FFFFFF;
    --t-border-ffffff-a25: rgba(255, 255, 255, 0.25);
    --t-border-ffffff-a30: rgba(255, 255, 255, 0.3);
    --t-border-ffffff-a35: rgba(255, 255, 255, 0.35);
    --t-shadow-000000-a15: rgba(0, 0, 0, 0.15);
    --t-shadow-000000-a18: rgba(0, 0, 0, 0.18);
    --t-shadow-000000-a20: rgba(0, 0, 0, 0.20);
    --t-shadow-000000-a25: rgba(0, 0, 0, 0.25);
    --t-shadow-26354a-a04: rgba(40, 72, 61, 0.04);
    --t-shadow-26354a-a05: rgba(40, 72, 61, 0.05);
    --t-shadow-26354a-a06: rgba(40, 72, 61, 0.06);
    --t-shadow-26354a-a08: rgba(40, 72, 61, 0.08);
    --t-shadow-26354a-a10: rgba(40, 72, 61, 0.10);
    --t-shadow-26354a-a12: rgba(40, 72, 61, 0.12);
    --t-shadow-26354a-a15: rgba(40, 72, 61, 0.15);
    --t-shadow-26354a-a16: rgba(40, 72, 61, 0.16);
    --t-shadow-26354a-a18: rgba(40, 72, 61, 0.18);
    --t-shadow-26354a-a20: rgba(40, 72, 61, 0.20);
    --t-shadow-26354a-a22: rgba(40, 72, 61, 0.22);
    --t-shadow-26354a-a25: rgba(40, 72, 61, 0.25);
    --t-shadow-3f72c5-a15: rgba(64, 171, 144, 0.15);
    --t-shadow-3f72c5-a18: rgba(64, 171, 144, 0.18);
    --t-shadow-3f72c5-a20: rgba(64, 171, 144, 0.20);
    --t-shadow-3f72c5-a22: rgba(64, 171, 144, 0.22);
    --t-shadow-3f72c5-a25: rgba(64, 171, 144, 0.25);
    --t-shadow-3f72c5-a28: rgba(64, 171, 144, 0.28);
    --t-shadow-3f72c5-a30: rgba(64, 171, 144, 0.30);
    --t-shadow-4a80d8-a10: rgba(65, 200, 166, 0.10);
    --t-shadow-8fa8c7-a13: rgba(146, 196, 179, 0.13);
    --t-surface-000000-a18: rgba(0, 0, 0, 0.18);
    --t-surface-000000-a65: rgba(0, 0, 0, 0.65);
    --t-surface-26354a: #28483D;
    --t-surface-26354a-a55: rgba(40, 72, 61, 0.55);
    --t-surface-26354a-a72: rgba(40, 72, 61, 0.72);
    --t-surface-26354a-a80: rgba(40, 72, 61, 0.80);
    --t-surface-26354a-a82: rgba(40, 72, 61, 0.82);
    --t-surface-26354a-a92: rgba(40, 72, 61, 0.92);
    --t-surface-26354a-a94: rgba(40, 72, 61, 0.94);
    --t-surface-26354a-a95: rgba(40, 72, 61, 0.95);
    --t-surface-315faf: #34937D;
    --t-surface-344966: #376455;
    --t-surface-396bc0: #3CA38B;
    --t-surface-3f72c5: #40AB90;
    --t-surface-4675d1: #3EC0A5;
    --t-surface-4a80d8: #41C8A6;
    --t-surface-568be0: #4CD0AF;
    --t-surface-5b8def: #50E0C3;
    --t-surface-d6ecfa: #D9F7E9;
    --t-surface-dcebff: #DFFCF4;
    --t-surface-e4eaf2: #E5F1ED;
    --t-surface-e5ebf4: #E6F3EF;
    --t-surface-e7edf5: #E8F4F0;
    --t-surface-e8eef7: #E9F6F2;
    --t-surface-eaf2ff: #ECFDF9;
    --t-surface-eeeeee: #EEEEEE;
    --t-surface-eef2f7: #EFF6F4;
    --t-surface-f0f5ff: #F1FEFB;
    --t-surface-f1f4f8: #F1F8F6;
    --t-surface-f3f6fa: #F4F9F8;
    --t-surface-f4f7fc: #F5FBFA;
    --t-surface-f4f8fc: #F5FBF9;
    --t-surface-f5f8fd: #F6FCFB;
    --t-surface-f7f9fc: #F7FCFA;
    --t-surface-f8fafd: #F8FDFB;
    --t-surface-fbfcfe: #FBFEFD;
    --t-surface-ffffff: #FFFFFF;
    --t-surface-ffffff-a18: rgba(255, 255, 255, 0.18);
    --t-surface-ffffff-a92: rgba(255, 255, 255, 0.92);
    --t-surface-ffffff-a94: rgba(255, 255, 255, 0.94);
    --t-text-222222: #212322;
    --t-text-26354a: #28483D;
    --t-text-333333: #323433;
    --t-text-34445a: #36584D;
    --t-text-3f72c5: #40AB90;
    --t-text-526175: #547369;
    --t-text-5b8def: #50E0C3;
    --t-text-666666: #636967;
    --t-text-677488: #69867C;
    --t-text-718096: #739489;
    --t-text-758196: #77948A;
    --t-text-7a8798: #7B968E;
    --t-text-7b8798: #7C978E;
    --t-text-8792a2: #88A199;
    --t-text-8a95a5: #8BA49C;
    --t-text-9aa5b5: #9BB4AC;
    --t-text-a0aabb: #A1BAB2;
    --t-text-d7e5fa: #DAF7EF;
    --t-text-eaf2ff: #ECFDF9;
    --t-text-ffffff: #FFFFFF;
    --hm-text: #223F37;
    --hm-muted: #5D8074;
    --hm-glass: rgba(255, 255, 255, 0.72);
    --hm-glass-strong: rgba(255, 255, 255, 0.9);
    --hm-glass-border: rgba(255, 255, 255, 0.85);
    --hm-line: #DEEEEA;
    --hm-shadow: rgba(40, 72, 61, 0.10);
    --hm-shadow-strong: rgba(40, 72, 61, 0.18);
    --hm-dots: rgba(64, 171, 144, 0.16);
    --hm-blob-a: #72E9C4;
    --hm-blue: #40AB90;
    --pa-315faf: #34937D;
    --pa-3f72c5: #40AB90;
    --pa-4a80d8: #41C8A6;
    --pa-a9bef0: #9AE6D9;
    --pa-rgb-0f172a: 17, 40, 36;
    --pa-rgb-3f72c5: 64, 171, 144;
    --pa-rgb-4a80d8: 65, 200, 166;
}

:root[data-theme="light"][data-palette="peach"] {
    --t-border-3f72c5: #AE6F41;
    --t-border-4675d1: #C27C41;
    --t-border-4a80d8: #C97C45;
    --t-border-5b8def: #E19655;
    --t-border-8fa8c7: #C1AA95;
    --t-border-c2cfdf: #DCD0C5;
    --t-border-c6d7ee: #EBD6C9;
    --t-border-d5e0ef: #EDDFD7;
    --t-border-d7e0ec: #EADFD9;
    --t-border-d8e3f2: #F0E2DA;
    --t-border-d9e1ec: #EAE2DB;
    --t-border-dce4f0: #EEE4DE;
    --t-border-dce4f0-a90: rgba(238, 228, 222, 0.9);
    --t-border-dee5ef: #EDE6E0;
    --t-border-e0e6ef: #EDE7E2;
    --t-border-e0e7f2: #F1E8E1;
    --t-border-e3e9f2: #F1E9E4;
    --t-border-eef2f6: #F5F2EF;
    --t-border-ffffff: #FFFFFF;
    --t-border-ffffff-a25: rgba(255, 255, 255, 0.25);
    --t-border-ffffff-a30: rgba(255, 255, 255, 0.3);
    --t-border-ffffff-a35: rgba(255, 255, 255, 0.35);
    --t-shadow-000000-a15: rgba(0, 0, 0, 0.15);
    --t-shadow-000000-a18: rgba(0, 0, 0, 0.18);
    --t-shadow-000000-a20: rgba(0, 0, 0, 0.20);
    --t-shadow-000000-a25: rgba(0, 0, 0, 0.25);
    --t-shadow-26354a-a04: rgba(70, 55, 42, 0.04);
    --t-shadow-26354a-a05: rgba(70, 55, 42, 0.05);
    --t-shadow-26354a-a06: rgba(70, 55, 42, 0.06);
    --t-shadow-26354a-a08: rgba(70, 55, 42, 0.08);
    --t-shadow-26354a-a10: rgba(70, 55, 42, 0.10);
    --t-shadow-26354a-a12: rgba(70, 55, 42, 0.12);
    --t-shadow-26354a-a15: rgba(70, 55, 42, 0.15);
    --t-shadow-26354a-a16: rgba(70, 55, 42, 0.16);
    --t-shadow-26354a-a18: rgba(70, 55, 42, 0.18);
    --t-shadow-26354a-a20: rgba(70, 55, 42, 0.20);
    --t-shadow-26354a-a22: rgba(70, 55, 42, 0.22);
    --t-shadow-26354a-a25: rgba(70, 55, 42, 0.25);
    --t-shadow-3f72c5-a15: rgba(174, 111, 65, 0.15);
    --t-shadow-3f72c5-a18: rgba(174, 111, 65, 0.18);
    --t-shadow-3f72c5-a20: rgba(174, 111, 65, 0.20);
    --t-shadow-3f72c5-a22: rgba(174, 111, 65, 0.22);
    --t-shadow-3f72c5-a25: rgba(174, 111, 65, 0.25);
    --t-shadow-3f72c5-a28: rgba(174, 111, 65, 0.28);
    --t-shadow-3f72c5-a30: rgba(174, 111, 65, 0.30);
    --t-shadow-4a80d8-a10: rgba(201, 124, 69, 0.10);
    --t-shadow-8fa8c7-a13: rgba(193, 170, 149, 0.13);
    --t-surface-000000-a18: rgba(0, 0, 0, 0.18);
    --t-surface-000000-a65: rgba(0, 0, 0, 0.65);
    --t-surface-26354a: #46372A;
    --t-surface-26354a-a55: rgba(70, 55, 42, 0.55);
    --t-surface-26354a-a72: rgba(70, 55, 42, 0.72);
    --t-surface-26354a-a80: rgba(70, 55, 42, 0.80);
    --t-surface-26354a-a82: rgba(70, 55, 42, 0.82);
    --t-surface-26354a-a92: rgba(70, 55, 42, 0.92);
    --t-surface-26354a-a94: rgba(70, 55, 42, 0.94);
    --t-surface-26354a-a95: rgba(70, 55, 42, 0.95);
    --t-surface-315faf: #965F35;
    --t-surface-344966: #614C39;
    --t-surface-396bc0: #A76B3E;
    --t-surface-3f72c5: #AE6F41;
    --t-surface-4675d1: #C27C41;
    --t-surface-4a80d8: #C97C45;
    --t-surface-568be0: #D18650;
    --t-surface-5b8def: #E19655;
    --t-surface-d6ecfa: #F7DED9;
    --t-surface-dcebff: #FCEADF;
    --t-surface-e4eaf2: #F1EBE5;
    --t-surface-e5ebf4: #F3EBE6;
    --t-surface-e7edf5: #F4ECE8;
    --t-surface-e8eef7: #F6EEE9;
    --t-surface-eaf2ff: #FDF3EC;
    --t-surface-eeeeee: #EEEEEE;
    --t-surface-eef2f7: #F6F1EF;
    --t-surface-f0f5ff: #FEF7F1;
    --t-surface-f1f4f8: #F7F4F2;
    --t-surface-f3f6fa: #F9F6F4;
    --t-surface-f4f7fc: #FBF7F5;
    --t-surface-f4f8fc: #FBF7F5;
    --t-surface-f5f8fd: #FCF8F6;
    --t-surface-f7f9fc: #FCF9F7;
    --t-surface-f8fafd: #FDFAF8;
    --t-surface-fbfcfe: #FEFCFB;
    --t-surface-ffffff: #FFFFFF;
    --t-surface-ffffff-a18: rgba(255, 255, 255, 0.18);
    --t-surface-ffffff-a92: rgba(255, 255, 255, 0.92);
    --t-surface-ffffff-a94: rgba(255, 255, 255, 0.94);
    --t-text-222222: #232221;
    --t-text-26354a: #46372A;
    --t-text-333333: #343332;
    --t-text-34445a: #564638;
    --t-text-3f72c5: #AE6F41;
    --t-text-526175: #726356;
    --t-text-5b8def: #E19655;
    --t-text-666666: #686664;
    --t-text-677488: #85776A;
    --t-text-718096: #928375;
    --t-text-758196: #938578;
    --t-text-7a8798: #95887D;
    --t-text-7b8798: #95897E;
    --t-text-8792a2: #9F948A;
    --t-text-8a95a5: #A2978D;
    --t-text-9aa5b5: #B2A79D;
    --t-text-a0aabb: #B8ADA3;
    --t-text-d7e5fa: #F7E6DA;
    --t-text-eaf2ff: #FDF3EC;
    --t-text-ffffff: #FFFFFF;
    --hm-text: #3F2E22;
    --hm-muted: #7E6D5F;
    --hm-glass: rgba(255, 255, 255, 0.72);
    --hm-glass-strong: rgba(255, 255, 255, 0.9);
    --hm-glass-border: rgba(255, 255, 255, 0.85);
    --hm-line: #EEE4DE;
    --hm-shadow: rgba(70, 55, 42, 0.10);
    --hm-shadow-strong: rgba(70, 55, 42, 0.18);
    --hm-dots: rgba(174, 111, 65, 0.16);
    --hm-blob-a: #E9A076;
    --hm-blue: #AE6F41;
    --pa-315faf: #965F35;
    --pa-3f72c5: #AE6F41;
    --pa-4a80d8: #C97C45;
    --pa-a9bef0: #E7C39E;
    --pa-rgb-0f172a: 40, 29, 17;
    --pa-rgb-3f72c5: 174, 111, 65;
    --pa-rgb-4a80d8: 201, 124, 69;
}

:root[data-theme="light"][data-palette="lavender"] {
    --t-border-3f72c5: #764CB8;
    --t-border-4675d1: #8454C3;
    --t-border-4a80d8: #8458CA;
    --t-border-5b8def: #9D6AE0;
    --t-border-8fa8c7: #A492C4;
    --t-border-c2cfdf: #CDC3DE;
    --t-border-c6d7ee: #D5CAEA;
    --t-border-d5e0ef: #DFD8EC;
    --t-border-d7e0ec: #DFD9EA;
    --t-border-d8e3f2: #E2DBEF;
    --t-border-d9e1ec: #E0DAEB;
    --t-border-dce4f0: #E4DEEE;
    --t-border-dce4f0-a90: rgba(228, 222, 238, 0.9);
    --t-border-dee5ef: #E4DFEE;
    --t-border-e0e6ef: #E6E1EE;
    --t-border-e0e7f2: #E7E2F0;
    --t-border-e3e9f2: #E9E4F0;
    --t-border-eef2f6: #F1EEF6;
    --t-border-ffffff: #FFFFFF;
    --t-border-ffffff-a25: rgba(255, 255, 255, 0.25);
    --t-border-ffffff-a30: rgba(255, 255, 255, 0.3);
    --t-border-ffffff-a35: rgba(255, 255, 255, 0.35);
    --t-shadow-000000-a15: rgba(0, 0, 0, 0.15);
    --t-shadow-000000-a18: rgba(0, 0, 0, 0.18);
    --t-shadow-000000-a20: rgba(0, 0, 0, 0.20);
    --t-shadow-000000-a25: rgba(0, 0, 0, 0.25);
    --t-shadow-26354a-a04: rgba(52, 40, 72, 0.04);
    --t-shadow-26354a-a05: rgba(52, 40, 72, 0.05);
    --t-shadow-26354a-a06: rgba(52, 40, 72, 0.06);
    --t-shadow-26354a-a08: rgba(52, 40, 72, 0.08);
    --t-shadow-26354a-a10: rgba(52, 40, 72, 0.10);
    --t-shadow-26354a-a12: rgba(52, 40, 72, 0.12);
    --t-shadow-26354a-a15: rgba(52, 40, 72, 0.15);
    --t-shadow-26354a-a16: rgba(52, 40, 72, 0.16);
    --t-shadow-26354a-a18: rgba(52, 40, 72, 0.18);
    --t-shadow-26354a-a20: rgba(52, 40, 72, 0.20);
    --t-shadow-26354a-a22: rgba(52, 40, 72, 0.22);
    --t-shadow-26354a-a25: rgba(52, 40, 72, 0.25);
    --t-shadow-3f72c5-a15: rgba(118, 76, 184, 0.15);
    --t-shadow-3f72c5-a18: rgba(118, 76, 184, 0.18);
    --t-shadow-3f72c5-a20: rgba(118, 76, 184, 0.20);
    --t-shadow-3f72c5-a22: rgba(118, 76, 184, 0.22);
    --t-shadow-3f72c5-a25: rgba(118, 76, 184, 0.25);
    --t-shadow-3f72c5-a28: rgba(118, 76, 184, 0.28);
    --t-shadow-3f72c5-a30: rgba(118, 76, 184, 0.30);
    --t-shadow-4a80d8-a10: rgba(132, 88, 202, 0.10);
    --t-shadow-8fa8c7-a13: rgba(164, 146, 196, 0.13);
    --t-surface-000000-a18: rgba(0, 0, 0, 0.18);
    --t-surface-000000-a65: rgba(0, 0, 0, 0.65);
    --t-surface-26354a: #342848;
    --t-surface-26354a-a55: rgba(52, 40, 72, 0.55);
    --t-surface-26354a-a72: rgba(52, 40, 72, 0.72);
    --t-surface-26354a-a80: rgba(52, 40, 72, 0.80);
    --t-surface-26354a-a82: rgba(52, 40, 72, 0.82);
    --t-surface-26354a-a92: rgba(52, 40, 72, 0.92);
    --t-surface-26354a-a94: rgba(52, 40, 72, 0.94);
    --t-surface-26354a-a95: rgba(52, 40, 72, 0.95);
    --t-surface-315faf: #663EA2;
    --t-surface-344966: #473764;
    --t-surface-396bc0: #7146B3;
    --t-surface-3f72c5: #764CB8;
    --t-surface-4675d1: #8454C3;
    --t-surface-4a80d8: #8458CA;
    --t-surface-568be0: #8E64D2;
    --t-surface-5b8def: #9D6AE0;
    --t-surface-d6ecfa: #DEDAF6;
    --t-surface-dcebff: #E9E0FC;
    --t-surface-e4eaf2: #E9E5F1;
    --t-surface-e5ebf4: #EBE6F3;
    --t-surface-e7edf5: #ECE8F4;
    --t-surface-e8eef7: #EEEAF5;
    --t-surface-eaf2ff: #F3ECFD;
    --t-surface-eeeeee: #EEEEEE;
    --t-surface-eef2f7: #F1EFF6;
    --t-surface-f0f5ff: #F7F2FD;
    --t-surface-f1f4f8: #F4F1F8;
    --t-surface-f3f6fa: #F6F4F9;
    --t-surface-f4f7fc: #F7F5FB;
    --t-surface-f4f8fc: #F7F5FB;
    --t-surface-f5f8fd: #F8F6FC;
    --t-surface-f7f9fc: #F9F8FC;
    --t-surface-f8fafd: #FAF9FC;
    --t-surface-fbfcfe: #FCFBFE;
    --t-surface-ffffff: #FFFFFF;
    --t-surface-ffffff-a18: rgba(255, 255, 255, 0.18);
    --t-surface-ffffff-a92: rgba(255, 255, 255, 0.92);
    --t-surface-ffffff-a94: rgba(255, 255, 255, 0.94);
    --t-text-222222: #222123;
    --t-text-26354a: #342848;
    --t-text-333333: #333234;
    --t-text-34445a: #423658;
    --t-text-3f72c5: #764CB8;
    --t-text-526175: #5F5473;
    --t-text-5b8def: #9D6AE0;
    --t-text-666666: #656369;
    --t-text-677488: #746986;
    --t-text-718096: #7F7394;
    --t-text-758196: #827794;
    --t-text-7a8798: #857B96;
    --t-text-7b8798: #867C97;
    --t-text-8792a2: #9188A1;
    --t-text-8a95a5: #948BA4;
    --t-text-9aa5b5: #A49BB4;
    --t-text-a0aabb: #AAA1BA;
    --t-text-d7e5fa: #E5DAF6;
    --t-text-eaf2ff: #F3ECFD;
    --t-text-ffffff: #FFFFFF;
    --hm-text: #2D223F;
    --hm-muted: #6A5D80;
    --hm-glass: rgba(255, 255, 255, 0.72);
    --hm-glass-strong: rgba(255, 255, 255, 0.9);
    --hm-glass-border: rgba(255, 255, 255, 0.85);
    --hm-line: #E4DEEE;
    --hm-shadow: rgba(52, 40, 72, 0.10);
    --hm-shadow-strong: rgba(52, 40, 72, 0.18);
    --hm-dots: rgba(118, 76, 184, 0.16);
    --hm-blob-a: #AA8BE9;
    --hm-blue: #764CB8;
    --pa-315faf: #663EA2;
    --pa-3f72c5: #764CB8;
    --pa-4a80d8: #8458CA;
    --pa-a9bef0: #CBB0E9;
    --pa-rgb-0f172a: 28, 18, 39;
    --pa-rgb-3f72c5: 118, 76, 184;
    --pa-rgb-4a80d8: 132, 88, 202;
}

:root[data-theme="light"][data-palette="sand"] {
    --t-border-3f72c5: #9A7546;
    --t-border-4675d1: #AD8346;
    --t-border-4a80d8: #B98546;
    --t-border-5b8def: #D19F55;
    --t-border-8fa8c7: #BFB097;
    --t-border-c2cfdf: #DBD3C6;
    --t-border-c6d7ee: #E8DACC;
    --t-border-d5e0ef: #EBE2D9;
    --t-border-d7e0ec: #E9E2DA;
    --t-border-d8e3f2: #EEE5DC;
    --t-border-d9e1ec: #E9E4DC;
    --t-border-dce4f0: #EDE6DF;
    --t-border-dce4f0-a90: rgba(237, 230, 223, 0.9);
    --t-border-dee5ef: #ECE8E1;
    --t-border-e0e6ef: #EDE9E2;
    --t-border-e0e7f2: #EFEAE3;
    --t-border-e3e9f2: #F0EBE5;
    --t-border-eef2f6: #F5F3EF;
    --t-border-ffffff: #FFFFFF;
    --t-border-ffffff-a25: rgba(255, 255, 255, 0.25);
    --t-border-ffffff-a30: rgba(255, 255, 255, 0.3);
    --t-border-ffffff-a35: rgba(255, 255, 255, 0.35);
    --t-shadow-000000-a15: rgba(0, 0, 0, 0.15);
    --t-shadow-000000-a18: rgba(0, 0, 0, 0.18);
    --t-shadow-000000-a20: rgba(0, 0, 0, 0.20);
    --t-shadow-000000-a25: rgba(0, 0, 0, 0.25);
    --t-shadow-26354a-a04: rgba(69, 59, 43, 0.04);
    --t-shadow-26354a-a05: rgba(69, 59, 43, 0.05);
    --t-shadow-26354a-a06: rgba(69, 59, 43, 0.06);
    --t-shadow-26354a-a08: rgba(69, 59, 43, 0.08);
    --t-shadow-26354a-a10: rgba(69, 59, 43, 0.10);
    --t-shadow-26354a-a12: rgba(69, 59, 43, 0.12);
    --t-shadow-26354a-a15: rgba(69, 59, 43, 0.15);
    --t-shadow-26354a-a16: rgba(69, 59, 43, 0.16);
    --t-shadow-26354a-a18: rgba(69, 59, 43, 0.18);
    --t-shadow-26354a-a20: rgba(69, 59, 43, 0.20);
    --t-shadow-26354a-a22: rgba(69, 59, 43, 0.22);
    --t-shadow-26354a-a25: rgba(69, 59, 43, 0.25);
    --t-shadow-3f72c5-a15: rgba(154, 117, 70, 0.15);
    --t-shadow-3f72c5-a18: rgba(154, 117, 70, 0.18);
    --t-shadow-3f72c5-a20: rgba(154, 117, 70, 0.20);
    --t-shadow-3f72c5-a22: rgba(154, 117, 70, 0.22);
    --t-shadow-3f72c5-a25: rgba(154, 117, 70, 0.25);
    --t-shadow-3f72c5-a28: rgba(154, 117, 70, 0.28);
    --t-shadow-3f72c5-a30: rgba(154, 117, 70, 0.30);
    --t-shadow-4a80d8-a10: rgba(185, 133, 70, 0.10);
    --t-shadow-8fa8c7-a13: rgba(191, 176, 151, 0.13);
    --t-surface-000000-a18: rgba(0, 0, 0, 0.18);
    --t-surface-000000-a65: rgba(0, 0, 0, 0.65);
    --t-surface-26354a: #453B2B;
    --t-surface-26354a-a55: rgba(69, 59, 43, 0.55);
    --t-surface-26354a-a72: rgba(69, 59, 43, 0.72);
    --t-surface-26354a-a80: rgba(69, 59, 43, 0.80);
    --t-surface-26354a-a82: rgba(69, 59, 43, 0.82);
    --t-surface-26354a-a92: rgba(69, 59, 43, 0.92);
    --t-surface-26354a-a94: rgba(69, 59, 43, 0.94);
    --t-surface-26354a-a95: rgba(69, 59, 43, 0.95);
    --t-surface-315faf: #836339;
    --t-surface-344966: #5F523C;
    --t-surface-396bc0: #937042;
    --t-surface-3f72c5: #9A7546;
    --t-surface-4675d1: #AD8346;
    --t-surface-4a80d8: #B98546;
    --t-surface-568be0: #C28F50;
    --t-surface-5b8def: #D19F55;
    --t-surface-d6ecfa: #F5E4DB;
    --t-surface-dcebff: #FAEEE1;
    --t-surface-e4eaf2: #F0ECE6;
    --t-surface-e5ebf4: #F2EDE7;
    --t-surface-e7edf5: #F3EEE9;
    --t-surface-e8eef7: #F5F0EA;
    --t-surface-eaf2ff: #FCF5ED;
    --t-surface-eeeeee: #EEEEEE;
    --t-surface-eef2f7: #F6F2EF;
    --t-surface-f0f5ff: #FDF9F2;
    --t-surface-f1f4f8: #F7F5F2;
    --t-surface-f3f6fa: #F9F7F4;
    --t-surface-f4f7fc: #FBF8F5;
    --t-surface-f4f8fc: #FBF8F5;
    --t-surface-f5f8fd: #FCF9F6;
    --t-surface-f7f9fc: #FBFAF8;
    --t-surface-f8fafd: #FCFBF9;
    --t-surface-fbfcfe: #FEFDFB;
    --t-surface-ffffff: #FFFFFF;
    --t-surface-ffffff-a18: rgba(255, 255, 255, 0.18);
    --t-surface-ffffff-a92: rgba(255, 255, 255, 0.92);
    --t-surface-ffffff-a94: rgba(255, 255, 255, 0.94);
    --t-text-222222: #232221;
    --t-text-26354a: #453B2B;
    --t-text-333333: #343332;
    --t-text-34445a: #544B3A;
    --t-text-3f72c5: #9A7546;
    --t-text-526175: #706757;
    --t-text-5b8def: #D19F55;
    --t-text-666666: #686764;
    --t-text-677488: #837B6C;
    --t-text-718096: #908777;
    --t-text-758196: #91897A;
    --t-text-7a8798: #938C7E;
    --t-text-7b8798: #948C7F;
    --t-text-8792a2: #9E978B;
    --t-text-8a95a5: #A19A8E;
    --t-text-9aa5b5: #B1AA9E;
    --t-text-a0aabb: #B7B0A4;
    --t-text-d7e5fa: #F5E9DC;
    --t-text-eaf2ff: #FCF5ED;
    --t-text-ffffff: #FFFFFF;
    --hm-text: #3D3124;
    --hm-muted: #7C7261;
    --hm-glass: rgba(255, 255, 255, 0.72);
    --hm-glass-strong: rgba(255, 255, 255, 0.9);
    --hm-glass-border: rgba(255, 255, 255, 0.85);
    --hm-line: #EDE6DF;
    --hm-shadow: rgba(69, 59, 43, 0.10);
    --hm-shadow-strong: rgba(69, 59, 43, 0.18);
    --hm-dots: rgba(154, 117, 70, 0.16);
    --hm-blob-a: #DCA774;
    --hm-blue: #9A7546;
    --pa-315faf: #836339;
    --pa-3f72c5: #9A7546;
    --pa-4a80d8: #B98546;
    --pa-a9bef0: #DCC499;
    --pa-rgb-0f172a: 38, 31, 19;
    --pa-rgb-3f72c5: 154, 117, 70;
    --pa-rgb-4a80d8: 185, 133, 70;
}

:root[data-theme="light"][data-palette="rose"] {
    --t-border-3f72c5: #AF4B6E;
    --t-border-4675d1: #BD5071;
    --t-border-4a80d8: #C4547B;
    --t-border-5b8def: #DB6589;
    --t-border-8fa8c7: #C195A4;
    --t-border-c2cfdf: #DCC5CD;
    --t-border-c6d7ee: #E9CBD7;
    --t-border-d5e0ef: #ECD8E0;
    --t-border-d7e0ec: #E9DAE0;
    --t-border-d8e3f2: #EFDBE3;
    --t-border-d9e1ec: #EADBE0;
    --t-border-dce4f0: #EDDFE4;
    --t-border-dce4f0-a90: rgba(237, 223, 228, 0.9);
    --t-border-dee5ef: #EDE0E4;
    --t-border-e0e6ef: #EDE2E6;
    --t-border-e0e7f2: #F0E2E7;
    --t-border-e3e9f2: #F0E5E9;
    --t-border-eef2f6: #F5EFF1;
    --t-border-ffffff: #FFFFFF;
    --t-border-ffffff-a25: rgba(255, 255, 255, 0.25);
    --t-border-ffffff-a30: rgba(255, 255, 255, 0.3);
    --t-border-ffffff-a35: rgba(255, 255, 255, 0.35);
    --t-shadow-000000-a15: rgba(0, 0, 0, 0.15);
    --t-shadow-000000-a18: rgba(0, 0, 0, 0.18);
    --t-shadow-000000-a20: rgba(0, 0, 0, 0.20);
    --t-shadow-000000-a25: rgba(0, 0, 0, 0.25);
    --t-shadow-26354a-a04: rgba(70, 42, 51, 0.04);
    --t-shadow-26354a-a05: rgba(70, 42, 51, 0.05);
    --t-shadow-26354a-a06: rgba(70, 42, 51, 0.06);
    --t-shadow-26354a-a08: rgba(70, 42, 51, 0.08);
    --t-shadow-26354a-a10: rgba(70, 42, 51, 0.10);
    --t-shadow-26354a-a12: rgba(70, 42, 51, 0.12);
    --t-shadow-26354a-a15: rgba(70, 42, 51, 0.15);
    --t-shadow-26354a-a16: rgba(70, 42, 51, 0.16);
    --t-shadow-26354a-a18: rgba(70, 42, 51, 0.18);
    --t-shadow-26354a-a20: rgba(70, 42, 51, 0.20);
    --t-shadow-26354a-a22: rgba(70, 42, 51, 0.22);
    --t-shadow-26354a-a25: rgba(70, 42, 51, 0.25);
    --t-shadow-3f72c5-a15: rgba(175, 75, 110, 0.15);
    --t-shadow-3f72c5-a18: rgba(175, 75, 110, 0.18);
    --t-shadow-3f72c5-a20: rgba(175, 75, 110, 0.20);
    --t-shadow-3f72c5-a22: rgba(175, 75, 110, 0.22);
    --t-shadow-3f72c5-a25: rgba(175, 75, 110, 0.25);
    --t-shadow-3f72c5-a28: rgba(175, 75, 110, 0.28);
    --t-shadow-3f72c5-a30: rgba(175, 75, 110, 0.30);
    --t-shadow-4a80d8-a10: rgba(196, 84, 123, 0.10);
    --t-shadow-8fa8c7-a13: rgba(193, 149, 164, 0.13);
    --t-surface-000000-a18: rgba(0, 0, 0, 0.18);
    --t-surface-000000-a65: rgba(0, 0, 0, 0.65);
    --t-surface-26354a: #462A33;
    --t-surface-26354a-a55: rgba(70, 42, 51, 0.55);
    --t-surface-26354a-a72: rgba(70, 42, 51, 0.72);
    --t-surface-26354a-a80: rgba(70, 42, 51, 0.80);
    --t-surface-26354a-a82: rgba(70, 42, 51, 0.82);
    --t-surface-26354a-a92: rgba(70, 42, 51, 0.92);
    --t-surface-26354a-a94: rgba(70, 42, 51, 0.94);
    --t-surface-26354a-a95: rgba(70, 42, 51, 0.95);
    --t-surface-315faf: #983E5C;
    --t-surface-344966: #613946;
    --t-surface-396bc0: #A84768;
    --t-surface-3f72c5: #AF4B6E;
    --t-surface-4675d1: #BD5071;
    --t-surface-4a80d8: #C4547B;
    --t-surface-568be0: #CC6086;
    --t-surface-5b8def: #DB6589;
    --t-surface-d6ecfa: #F6DAEA;
    --t-surface-dcebff: #FBE0EB;
    --t-surface-e4eaf2: #F1E5E9;
    --t-surface-e5ebf4: #F2E7EB;
    --t-surface-e7edf5: #F3E9ED;
    --t-surface-e8eef7: #F5EAEE;
    --t-surface-eaf2ff: #FCEDF2;
    --t-surface-eeeeee: #EEEEEE;
    --t-surface-eef2f7: #F6EFF2;
    --t-surface-f0f5ff: #FDF2F5;
    --t-surface-f1f4f8: #F7F2F4;
    --t-surface-f3f6fa: #F9F4F6;
    --t-surface-f4f7fc: #FBF5F7;
    --t-surface-f4f8fc: #FBF5F8;
    --t-surface-f5f8fd: #FCF6F8;
    --t-surface-f7f9fc: #FBF8F9;
    --t-surface-f8fafd: #FCF9FA;
    --t-surface-fbfcfe: #FEFBFC;
    --t-surface-ffffff: #FFFFFF;
    --t-surface-ffffff-a18: rgba(255, 255, 255, 0.18);
    --t-surface-ffffff-a92: rgba(255, 255, 255, 0.92);
    --t-surface-ffffff-a94: rgba(255, 255, 255, 0.94);
    --t-text-222222: #232122;
    --t-text-26354a: #462A33;
    --t-text-333333: #343233;
    --t-text-34445a: #563842;
    --t-text-3f72c5: #AF4B6E;
    --t-text-526175: #72565F;
    --t-text-5b8def: #DB6589;
    --t-text-666666: #686465;
    --t-text-677488: #856A73;
    --t-text-718096: #92757F;
    --t-text-758196: #937881;
    --t-text-7a8798: #957D85;
    --t-text-7b8798: #957E86;
    --t-text-8792a2: #9F8A91;
    --t-text-8a95a5: #A28D94;
    --t-text-9aa5b5: #B29DA4;
    --t-text-a0aabb: #B8A3AA;
    --t-text-d7e5fa: #F6DBE5;
    --t-text-eaf2ff: #FCEDF2;
    --t-text-ffffff: #FFFFFF;
    --hm-text: #3E232D;
    --hm-muted: #7E5F69;
    --hm-glass: rgba(255, 255, 255, 0.72);
    --hm-glass-strong: rgba(255, 255, 255, 0.9);
    --hm-glass-border: rgba(255, 255, 255, 0.85);
    --hm-line: #EDDFE4;
    --hm-shadow: rgba(70, 42, 51, 0.10);
    --hm-shadow-strong: rgba(70, 42, 51, 0.18);
    --hm-dots: rgba(175, 75, 110, 0.16);
    --hm-blob-a: #E485AC;
    --hm-blue: #AF4B6E;
    --pa-315faf: #983E5C;
    --pa-3f72c5: #AF4B6E;
    --pa-4a80d8: #C4547B;
    --pa-a9bef0: #E5AAB9;
    --pa-rgb-0f172a: 39, 18, 24;
    --pa-rgb-3f72c5: 175, 75, 110;
    --pa-rgb-4a80d8: 196, 84, 123;
}

:root[data-theme="dark"][data-palette="midnight"] {
    --t-border-3f72c5: #3F6EC5;
    --t-border-4675d1: #4670D1;
    --t-border-4a80d8: #4A7BD8;
    --t-border-5b8def: #5B88EF;
    --t-border-8fa8c7: #696D76;
    --t-border-c2cfdf: #54575E;
    --t-border-c6d7ee: #4B505C;
    --t-border-d5e0ef: #464A53;
    --t-border-d7e0ec: #484B52;
    --t-border-d8e3f2: #434750;
    --t-border-d9e1ec: #474A50;
    --t-border-dce4f0: #43474E;
    --t-border-dce4f0-a90: rgba(9, 11, 13, 0.9);
    --t-border-dee5ef: #44474D;
    --t-border-e0e6ef: #44464C;
    --t-border-e0e7f2: #41444C;
    --t-border-e3e9f2: #40434A;
    --t-border-eef2f6: #3B3D41;
    --t-border-ffffff: #2E3138;
    --t-border-ffffff-a25: rgba(255, 255, 255, 0.25);
    --t-border-ffffff-a30: rgba(255, 255, 255, 0.3);
    --t-border-ffffff-a35: rgba(255, 255, 255, 0.35);
    --t-shadow-000000-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-000000-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-000000-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-000000-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-26354a-a04: rgba(0, 0, 0, 0.088);
    --t-shadow-26354a-a05: rgba(0, 0, 0, 0.11);
    --t-shadow-26354a-a06: rgba(0, 0, 0, 0.132);
    --t-shadow-26354a-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-26354a-a10: rgba(0, 0, 0, 0.22);
    --t-shadow-26354a-a12: rgba(0, 0, 0, 0.264);
    --t-shadow-26354a-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-26354a-a16: rgba(0, 0, 0, 0.352);
    --t-shadow-26354a-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-26354a-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-26354a-a22: rgba(0, 0, 0, 0.484);
    --t-shadow-26354a-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-3f72c5-a15: rgba(63, 110, 197, 0.15);
    --t-shadow-3f72c5-a18: rgba(63, 110, 197, 0.18);
    --t-shadow-3f72c5-a20: rgba(63, 110, 197, 0.2);
    --t-shadow-3f72c5-a22: rgba(63, 110, 197, 0.22);
    --t-shadow-3f72c5-a25: rgba(63, 110, 197, 0.25);
    --t-shadow-3f72c5-a28: rgba(63, 110, 197, 0.28);
    --t-shadow-3f72c5-a30: rgba(63, 110, 197, 0.3);
    --t-shadow-48a868-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-48a868-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-4a80d8-a10: rgba(74, 123, 216, 0.1);
    --t-shadow-8fa8c7-a13: rgba(0, 0, 0, 0.286);
    --t-surface-000000-a18: rgba(0, 0, 0, 0.18);
    --t-surface-000000-a65: rgba(5, 6, 8, 0.65);
    --t-surface-26354a: #D1D4DB;
    --t-surface-26354a-a55: rgba(5, 6, 8, 0.55);
    --t-surface-26354a-a72: rgba(5, 6, 8, 0.72);
    --t-surface-26354a-a80: rgba(5, 6, 8, 0.8);
    --t-surface-26354a-a82: rgba(5, 6, 8, 0.82);
    --t-surface-26354a-a92: rgba(5, 6, 8, 0.92);
    --t-surface-26354a-a94: rgba(5, 6, 8, 0.94);
    --t-surface-26354a-a95: rgba(5, 6, 8, 0.95);
    --t-surface-315faf: #315BAF;
    --t-surface-344966: #BABEC7;
    --t-surface-396bc0: #3966C0;
    --t-surface-3f72c5: #3F6EC5;
    --t-surface-4675d1: #4670D1;
    --t-surface-4a80d8: #4A7BD8;
    --t-surface-568be0: #5686E0;
    --t-surface-5b8def: #5B88EF;
    --t-surface-d6ecfa: #0C0D10;
    --t-surface-dcebff: #232730;
    --t-surface-e4eaf2: #292B2F;
    --t-surface-e5ebf4: #282A2E;
    --t-surface-e7edf5: #26282D;
    --t-surface-e8eef7: #25272C;
    --t-surface-eaf2ff: #1F232A;
    --t-surface-eeeeee: #26282D;
    --t-surface-eef2f7: #242528;
    --t-surface-f0f5ff: #1E2128;
    --t-surface-f1f4f8: #232528;
    --t-surface-f3f6fa: #212226;
    --t-surface-f4f7fc: #1F2126;
    --t-surface-f4f8fc: #1F2126;
    --t-surface-f5f8fd: #1E2026;
    --t-surface-f7f9fc: #1F2024;
    --t-surface-f8fafd: #1E2024;
    --t-surface-fbfcfe: #1C1F23;
    --t-surface-ffffff: #1B1D21;
    --t-surface-ffffff-a18: rgba(255, 255, 255, 0.18);
    --t-surface-ffffff-a92: rgba(9, 11, 13, 0.92);
    --t-surface-ffffff-a94: rgba(9, 11, 13, 0.94);
    --t-text-222222: #E0E1E2;
    --t-text-26354a: #D1D4DB;
    --t-text-333333: #D8D9DA;
    --t-text-34445a: #C9CCD4;
    --t-text-3f72c5: #7A9AD7;
    --t-text-526175: #BABEC7;
    --t-text-5b8def: #99B5F5;
    --t-text-666666: #BEBFC0;
    --t-text-677488: #B0B4BD;
    --t-text-718096: #AAAEB7;
    --t-text-758196: #A9ADB6;
    --t-text-7a8798: #A7ABB4;
    --t-text-7b8798: #A7ABB4;
    --t-text-8792a2: #A1A5AF;
    --t-text-8a95a5: #A0A4AD;
    --t-text-9aa5b5: #969BA7;
    --t-text-a0aabb: #9298A5;
    --t-text-d7e5fa: #D7E4FA;
    --t-text-eaf2ff: #EAF1FF;
    --t-text-ffffff: #FFFFFF;
    --hm-text: #E5E8ED;
    --hm-muted: #9A9FAA;
    --hm-glass: rgba(27, 29, 33, 0.68);
    --hm-glass-strong: rgba(32, 34, 39, 0.92);
    --hm-glass-border: rgba(255, 255, 255, 0.07);
    --hm-line: #373A41;
    --hm-shadow: rgba(0, 0, 0, 0.28);
    --hm-shadow-strong: rgba(0, 0, 0, 0.42);
    --hm-dots: rgba(150, 173, 215, 0.10);
    --hm-blob-a: #2B50A0;
    --hm-blue: #7A9AD7;
    --pa-315faf: #315BAF;
    --pa-3f72c5: #3F6EC5;
    --pa-4a80d8: #4A7BD8;
    --pa-a9bef0: #A9BCF0;
    --pa-rgb-0f172a: 9, 13, 24;
    --pa-rgb-3f72c5: 63, 110, 197;
    --pa-rgb-4a80d8: 74, 123, 216;
}

:root[data-theme="dark"][data-palette="grape"] {
    --t-border-3f72c5: #8650BE;
    --t-border-4675d1: #9458C9;
    --t-border-4a80d8: #955DD0;
    --t-border-5b8def: #AE6FE5;
    --t-border-8fa8c7: #6E637C;
    --t-border-c2cfdf: #585062;
    --t-border-c6d7ee: #524562;
    --t-border-d5e0ef: #4D435A;
    --t-border-d7e0ec: #4D4558;
    --t-border-d8e3f2: #4B4059;
    --t-border-d9e1ec: #4D4557;
    --t-border-dce4f0: #4B4256;
    --t-border-dce4f0-a90: rgba(21, 15, 28, 0.9);
    --t-border-dee5ef: #4B4355;
    --t-border-e0e6ef: #4A4354;
    --t-border-e0e7f2: #494055;
    --t-border-e3e9f2: #484053;
    --t-border-eef2f6: #443E4C;
    --t-border-ffffff: #3C3248;
    --t-border-ffffff-a25: rgba(255, 255, 255, 0.25);
    --t-border-ffffff-a30: rgba(255, 255, 255, 0.3);
    --t-border-ffffff-a35: rgba(255, 255, 255, 0.35);
    --t-shadow-000000-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-000000-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-000000-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-000000-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-26354a-a04: rgba(0, 0, 0, 0.088);
    --t-shadow-26354a-a05: rgba(0, 0, 0, 0.11);
    --t-shadow-26354a-a06: rgba(0, 0, 0, 0.132);
    --t-shadow-26354a-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-26354a-a10: rgba(0, 0, 0, 0.22);
    --t-shadow-26354a-a12: rgba(0, 0, 0, 0.264);
    --t-shadow-26354a-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-26354a-a16: rgba(0, 0, 0, 0.352);
    --t-shadow-26354a-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-26354a-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-26354a-a22: rgba(0, 0, 0, 0.484);
    --t-shadow-26354a-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-3f72c5-a15: rgba(134, 80, 190, 0.15);
    --t-shadow-3f72c5-a18: rgba(134, 80, 190, 0.18);
    --t-shadow-3f72c5-a20: rgba(134, 80, 190, 0.2);
    --t-shadow-3f72c5-a22: rgba(134, 80, 190, 0.22);
    --t-shadow-3f72c5-a25: rgba(134, 80, 190, 0.25);
    --t-shadow-3f72c5-a28: rgba(134, 80, 190, 0.28);
    --t-shadow-3f72c5-a30: rgba(134, 80, 190, 0.3);
    --t-shadow-48a868-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-48a868-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-4a80d8-a10: rgba(149, 93, 208, 0.1);
    --t-shadow-8fa8c7-a13: rgba(0, 0, 0, 0.286);
    --t-surface-000000-a18: rgba(0, 0, 0, 0.18);
    --t-surface-000000-a65: rgba(13, 10, 18, 0.65);
    --t-surface-26354a: #D5CDDF;
    --t-surface-26354a-a55: rgba(13, 10, 18, 0.55);
    --t-surface-26354a-a72: rgba(13, 10, 18, 0.72);
    --t-surface-26354a-a80: rgba(13, 10, 18, 0.8);
    --t-surface-26354a-a82: rgba(13, 10, 18, 0.82);
    --t-surface-26354a-a92: rgba(13, 10, 18, 0.92);
    --t-surface-26354a-a94: rgba(13, 10, 18, 0.94);
    --t-surface-26354a-a95: rgba(13, 10, 18, 0.95);
    --t-surface-315faf: #753DAD;
    --t-surface-344966: #BFB5CC;
    --t-surface-396bc0: #8148BB;
    --t-surface-3f72c5: #8650BE;
    --t-surface-4675d1: #9458C9;
    --t-surface-4a80d8: #955DD0;
    --t-surface-568be0: #9E68D8;
    --t-surface-5b8def: #AE6FE5;
    --t-surface-d6ecfa: #191320;
    --t-surface-dcebff: #342744;
    --t-surface-e4eaf2: #37313E;
    --t-surface-e5ebf4: #362F3E;
    --t-surface-e7edf5: #352E3D;
    --t-surface-e8eef7: #332C3D;
    --t-surface-eaf2ff: #30243F;
    --t-surface-eeeeee: #342C3F;
    --t-surface-eef2f7: #322C39;
    --t-surface-f0f5ff: #2E233D;
    --t-surface-f1f4f8: #312C38;
    --t-surface-f3f6fa: #2F2937;
    --t-surface-f4f7fc: #2E2639;
    --t-surface-f4f8fc: #2E2639;
    --t-surface-f5f8fd: #2E2539;
    --t-surface-f7f9fc: #2E2736;
    --t-surface-f8fafd: #2D2537;
    --t-surface-fbfcfe: #2C2436;
    --t-surface-ffffff: #2A2333;
    --t-surface-ffffff-a18: rgba(255, 255, 255, 0.18);
    --t-surface-ffffff-a92: rgba(21, 15, 28, 0.92);
    --t-surface-ffffff-a94: rgba(21, 15, 28, 0.94);
    --t-text-222222: #E1E0E2;
    --t-text-26354a: #D5CDDF;
    --t-text-333333: #D9D8DA;
    --t-text-34445a: #CDC4D9;
    --t-text-3f72c5: #AD88D3;
    --t-text-526175: #BFB5CC;
    --t-text-5b8def: #CEA9F0;
    --t-text-666666: #BFBDC1;
    --t-text-677488: #B5ABC2;
    --t-text-718096: #AFA4BD;
    --t-text-758196: #AEA4BB;
    --t-text-7a8798: #ACA2B9;
    --t-text-7b8798: #ACA2B9;
    --t-text-8792a2: #A69CB4;
    --t-text-8a95a5: #A59AB3;
    --t-text-9aa5b5: #9C8FAE;
    --t-text-a0aabb: #9989AE;
    --t-text-d7e5fa: #E8DAF7;
    --t-text-eaf2ff: #F4ECFD;
    --t-text-ffffff: #FFFFFF;
    --hm-text: #E8E2F0;
    --hm-muted: #A093B1;
    --hm-glass: rgba(42, 35, 51, 0.68);
    --hm-glass-strong: rgba(47, 39, 57, 0.92);
    --hm-glass-border: rgba(255, 255, 255, 0.07);
    --hm-line: #42394E;
    --hm-shadow: rgba(0, 0, 0, 0.28);
    --hm-shadow-strong: rgba(0, 0, 0, 0.42);
    --hm-dots: rgba(187, 162, 213, 0.10);
    --hm-blob-a: #6C369F;
    --hm-blue: #AD88D3;
    --pa-315faf: #753DAD;
    --pa-3f72c5: #8650BE;
    --pa-4a80d8: #955DD0;
    --pa-a9bef0: #D5B6ED;
    --pa-rgb-0f172a: 30, 17, 40;
    --pa-rgb-3f72c5: 134, 80, 190;
    --pa-rgb-4a80d8: 149, 93, 208;
}

:root[data-theme="dark"][data-palette="forest"] {
    --t-border-3f72c5: #50B481;
    --t-border-4675d1: #57C08E;
    --t-border-4a80d8: #5CC690;
    --t-border-5b8def: #6EDCA8;
    --t-border-8fa8c7: #667970;
    --t-border-c2cfdf: #535F59;
    --t-border-c6d7ee: #495E54;
    --t-border-d5e0ef: #46574E;
    --t-border-d7e0ec: #48554E;
    --t-border-d8e3f2: #43564C;
    --t-border-d9e1ec: #48544E;
    --t-border-dce4f0: #45534C;
    --t-border-dce4f0-a90: rgba(17, 26, 22, 0.9);
    --t-border-dee5ef: #46524C;
    --t-border-e0e6ef: #46524C;
    --t-border-e0e7f2: #43524A;
    --t-border-e3e9f2: #43504A;
    --t-border-eef2f6: #404A45;
    --t-border-ffffff: #35453D;
    --t-border-ffffff-a25: rgba(255, 255, 255, 0.25);
    --t-border-ffffff-a30: rgba(255, 255, 255, 0.3);
    --t-border-ffffff-a35: rgba(255, 255, 255, 0.35);
    --t-shadow-000000-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-000000-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-000000-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-000000-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-26354a-a04: rgba(0, 0, 0, 0.088);
    --t-shadow-26354a-a05: rgba(0, 0, 0, 0.11);
    --t-shadow-26354a-a06: rgba(0, 0, 0, 0.132);
    --t-shadow-26354a-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-26354a-a10: rgba(0, 0, 0, 0.22);
    --t-shadow-26354a-a12: rgba(0, 0, 0, 0.264);
    --t-shadow-26354a-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-26354a-a16: rgba(0, 0, 0, 0.352);
    --t-shadow-26354a-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-26354a-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-26354a-a22: rgba(0, 0, 0, 0.484);
    --t-shadow-26354a-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-3f72c5-a15: rgba(80, 180, 129, 0.15);
    --t-shadow-3f72c5-a18: rgba(80, 180, 129, 0.18);
    --t-shadow-3f72c5-a20: rgba(80, 180, 129, 0.2);
    --t-shadow-3f72c5-a22: rgba(80, 180, 129, 0.22);
    --t-shadow-3f72c5-a25: rgba(80, 180, 129, 0.25);
    --t-shadow-3f72c5-a28: rgba(80, 180, 129, 0.28);
    --t-shadow-3f72c5-a30: rgba(80, 180, 129, 0.3);
    --t-shadow-48a868-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-48a868-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-4a80d8-a10: rgba(92, 198, 144, 0.1);
    --t-shadow-8fa8c7-a13: rgba(0, 0, 0, 0.286);
    --t-surface-000000-a18: rgba(0, 0, 0, 0.18);
    --t-surface-000000-a65: rgba(11, 17, 14, 0.65);
    --t-surface-26354a: #D0DCD6;
    --t-surface-26354a-a55: rgba(11, 17, 14, 0.55);
    --t-surface-26354a-a72: rgba(11, 17, 14, 0.72);
    --t-surface-26354a-a80: rgba(11, 17, 14, 0.8);
    --t-surface-26354a-a82: rgba(11, 17, 14, 0.82);
    --t-surface-26354a-a92: rgba(11, 17, 14, 0.92);
    --t-surface-26354a-a94: rgba(11, 17, 14, 0.94);
    --t-surface-26354a-a95: rgba(11, 17, 14, 0.95);
    --t-surface-315faf: #419F70;
    --t-surface-344966: #B8C9C0;
    --t-surface-396bc0: #4AAF7C;
    --t-surface-3f72c5: #50B481;
    --t-surface-4675d1: #57C08E;
    --t-surface-4a80d8: #5CC690;
    --t-surface-568be0: #67CF99;
    --t-surface-5b8def: #6EDCA8;
    --t-surface-d6ecfa: #151E1A;
    --t-surface-dcebff: #2B4036;
    --t-surface-e4eaf2: #333C38;
    --t-surface-e5ebf4: #313C37;
    --t-surface-e7edf5: #303B36;
    --t-surface-e8eef7: #2E3A34;
    --t-surface-eaf2ff: #283C32;
    --t-surface-eeeeee: #2F3C36;
    --t-surface-eef2f7: #2E3733;
    --t-surface-f0f5ff: #263A30;
    --t-surface-f1f4f8: #2E3632;
    --t-surface-f3f6fa: #2B3530;
    --t-surface-f4f7fc: #293630;
    --t-surface-f4f8fc: #293630;
    --t-surface-f5f8fd: #28362F;
    --t-surface-f7f9fc: #29342F;
    --t-surface-f8fafd: #28342E;
    --t-surface-fbfcfe: #27332D;
    --t-surface-ffffff: #25312B;
    --t-surface-ffffff-a18: rgba(255, 255, 255, 0.18);
    --t-surface-ffffff-a92: rgba(17, 26, 22, 0.92);
    --t-surface-ffffff-a94: rgba(17, 26, 22, 0.94);
    --t-text-222222: #E0E2E1;
    --t-text-26354a: #D0DCD6;
    --t-text-333333: #D8DAD9;
    --t-text-34445a: #C7D6CE;
    --t-text-3f72c5: #86CBA8;
    --t-text-526175: #B8C9C0;
    --t-text-5b8def: #A4EAC9;
    --t-text-666666: #BDC1BF;
    --t-text-677488: #AEBFB6;
    --t-text-718096: #A7BAB0;
    --t-text-758196: #A7B8B0;
    --t-text-7a8798: #A5B6AE;
    --t-text-7b8798: #A5B6AE;
    --t-text-8792a2: #9FB1A8;
    --t-text-8a95a5: #9DB0A6;
    --t-text-9aa5b5: #93AA9E;
    --t-text-a0aabb: #8EA99C;
    --t-text-d7e5fa: #DBF6E8;
    --t-text-eaf2ff: #EDFCF4;
    --t-text-ffffff: #FFFFFF;
    --hm-text: #E4EEE9;
    --hm-muted: #97ADA2;
    --hm-glass: rgba(37, 49, 43, 0.68);
    --hm-glass-strong: rgba(42, 54, 48, 0.92);
    --hm-glass-border: rgba(255, 255, 255, 0.07);
    --hm-line: #3C4B44;
    --hm-shadow: rgba(0, 0, 0, 0.28);
    --hm-shadow-strong: rgba(0, 0, 0, 0.42);
    --hm-dots: rgba(158, 207, 182, 0.10);
    --hm-blob-a: #3A9167;
    --hm-blue: #86CBA8;
    --pa-315faf: #419F70;
    --pa-3f72c5: #50B481;
    --pa-4a80d8: #5CC690;
    --pa-a9bef0: #B2E7D0;
    --pa-rgb-0f172a: 18, 39, 30;
    --pa-rgb-3f72c5: 80, 180, 129;
    --pa-rgb-4a80d8: 92, 198, 144;
}

:root[data-theme="dark"][data-palette="ember"] {
    --t-border-3f72c5: #BB7149;
    --t-border-4675d1: #C77F50;
    --t-border-4a80d8: #CD7F55;
    --t-border-5b8def: #E49866;
    --t-border-8fa8c7: #786C67;
    --t-border-c2cfdf: #5F5753;
    --t-border-c6d7ee: #5D504A;
    --t-border-d5e0ef: #564C47;
    --t-border-d7e0ec: #544C49;
    --t-border-d8e3f2: #554944;
    --t-border-d9e1ec: #544C48;
    --t-border-dce4f0: #524946;
    --t-border-dce4f0-a90: rgba(25, 20, 18, 0.9);
    --t-border-dee5ef: #524A46;
    --t-border-e0e6ef: #514946;
    --t-border-e0e7f2: #514844;
    --t-border-e3e9f2: #4F4744;
    --t-border-eef2f6: #494341;
    --t-border-ffffff: #443A36;
    --t-border-ffffff-a25: rgba(255, 255, 255, 0.25);
    --t-border-ffffff-a30: rgba(255, 255, 255, 0.3);
    --t-border-ffffff-a35: rgba(255, 255, 255, 0.35);
    --t-shadow-000000-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-000000-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-000000-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-000000-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-26354a-a04: rgba(0, 0, 0, 0.088);
    --t-shadow-26354a-a05: rgba(0, 0, 0, 0.11);
    --t-shadow-26354a-a06: rgba(0, 0, 0, 0.132);
    --t-shadow-26354a-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-26354a-a10: rgba(0, 0, 0, 0.22);
    --t-shadow-26354a-a12: rgba(0, 0, 0, 0.264);
    --t-shadow-26354a-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-26354a-a16: rgba(0, 0, 0, 0.352);
    --t-shadow-26354a-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-26354a-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-26354a-a22: rgba(0, 0, 0, 0.484);
    --t-shadow-26354a-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-3f72c5-a15: rgba(187, 113, 73, 0.15);
    --t-shadow-3f72c5-a18: rgba(187, 113, 73, 0.18);
    --t-shadow-3f72c5-a20: rgba(187, 113, 73, 0.2);
    --t-shadow-3f72c5-a22: rgba(187, 113, 73, 0.22);
    --t-shadow-3f72c5-a25: rgba(187, 113, 73, 0.25);
    --t-shadow-3f72c5-a28: rgba(187, 113, 73, 0.28);
    --t-shadow-3f72c5-a30: rgba(187, 113, 73, 0.3);
    --t-shadow-48a868-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-48a868-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-4a80d8-a10: rgba(205, 127, 85, 0.1);
    --t-shadow-8fa8c7-a13: rgba(0, 0, 0, 0.286);
    --t-surface-000000-a18: rgba(0, 0, 0, 0.18);
    --t-surface-000000-a65: rgba(17, 13, 11, 0.65);
    --t-surface-26354a: #DCD4D0;
    --t-surface-26354a-a55: rgba(17, 13, 11, 0.55);
    --t-surface-26354a-a72: rgba(17, 13, 11, 0.72);
    --t-surface-26354a-a80: rgba(17, 13, 11, 0.8);
    --t-surface-26354a-a82: rgba(17, 13, 11, 0.82);
    --t-surface-26354a-a92: rgba(17, 13, 11, 0.92);
    --t-surface-26354a-a94: rgba(17, 13, 11, 0.94);
    --t-surface-26354a-a95: rgba(17, 13, 11, 0.95);
    --t-surface-315faf: #A6623A;
    --t-surface-344966: #C8BEB9;
    --t-surface-396bc0: #B66D43;
    --t-surface-3f72c5: #BB7149;
    --t-surface-4675d1: #C77F50;
    --t-surface-4a80d8: #CD7F55;
    --t-surface-568be0: #D68960;
    --t-surface-5b8def: #E49866;
    --t-surface-d6ecfa: #1D1816;
    --t-surface-dcebff: #3F322C;
    --t-surface-e4eaf2: #3B3634;
    --t-surface-e5ebf4: #3B3532;
    --t-surface-e7edf5: #3A3431;
    --t-surface-e8eef7: #3A322F;
    --t-surface-eaf2ff: #3A2E29;
    --t-surface-eeeeee: #3B3330;
    --t-surface-eef2f7: #36312F;
    --t-surface-f0f5ff: #382D28;
    --t-surface-f1f4f8: #36312F;
    --t-surface-f3f6fa: #342E2C;
    --t-surface-f4f7fc: #352D2A;
    --t-surface-f4f8fc: #352D2A;
    --t-surface-f5f8fd: #352C29;
    --t-surface-f7f9fc: #332D2A;
    --t-surface-f8fafd: #342C28;
    --t-surface-fbfcfe: #332B27;
    --t-surface-ffffff: #302926;
    --t-surface-ffffff-a18: rgba(255, 255, 255, 0.18);
    --t-surface-ffffff-a92: rgba(25, 20, 18, 0.92);
    --t-surface-ffffff-a94: rgba(25, 20, 18, 0.94);
    --t-text-222222: #E2E1E0;
    --t-text-26354a: #DCD4D0;
    --t-text-333333: #DAD9D8;
    --t-text-34445a: #D5CCC8;
    --t-text-3f72c5: #D09D81;
    --t-text-526175: #C8BEB9;
    --t-text-5b8def: #EEBFA0;
    --t-text-666666: #C0BEBE;
    --t-text-677488: #BEB4AF;
    --t-text-718096: #B9ADA8;
    --t-text-758196: #B7ADA8;
    --t-text-7a8798: #B5ABA6;
    --t-text-7b8798: #B5ABA6;
    --t-text-8792a2: #B0A5A0;
    --t-text-8a95a5: #AFA39E;
    --t-text-9aa5b5: #A99A94;
    --t-text-a0aabb: #A79790;
    --t-text-d7e5fa: #F7E4DA;
    --t-text-eaf2ff: #FDF2EC;
    --t-text-ffffff: #FFFFFF;
    --hm-text: #EDE7E5;
    --hm-muted: #AC9E98;
    --hm-glass: rgba(48, 41, 38, 0.68);
    --hm-glass-strong: rgba(54, 46, 42, 0.92);
    --hm-glass-border: rgba(255, 255, 255, 0.07);
    --hm-line: #4A413D;
    --hm-shadow: rgba(0, 0, 0, 0.28);
    --hm-shadow-strong: rgba(0, 0, 0, 0.42);
    --hm-dots: rgba(210, 174, 155, 0.10);
    --hm-blob-a: #975A34;
    --hm-blue: #D09D81;
    --pa-315faf: #A6623A;
    --pa-3f72c5: #BB7149;
    --pa-4a80d8: #CD7F55;
    --pa-a9bef0: #EBC9AE;
    --pa-rgb-0f172a: 40, 27, 17;
    --pa-rgb-3f72c5: 187, 113, 73;
    --pa-rgb-4a80d8: 205, 127, 85;
}

:root[data-theme="dark"][data-palette="ocean"] {
    --t-border-3f72c5: #46ACBE;
    --t-border-4675d1: #4DB2CA;
    --t-border-4a80d8: #51BDD1;
    --t-border-5b8def: #62CEE8;
    --t-border-8fa8c7: #63757C;
    --t-border-c2cfdf: #505D62;
    --t-border-c6d7ee: #455962;
    --t-border-d5e0ef: #43535A;
    --t-border-d7e0ec: #455258;
    --t-border-d8e3f2: #405259;
    --t-border-d9e1ec: #455257;
    --t-border-dce4f0: #425056;
    --t-border-dce4f0-a90: rgba(15, 24, 28, 0.9);
    --t-border-dee5ef: #435055;
    --t-border-e0e6ef: #434F54;
    --t-border-e0e7f2: #404F55;
    --t-border-e3e9f2: #404D53;
    --t-border-eef2f6: #3E484C;
    --t-border-ffffff: #324148;
    --t-border-ffffff-a25: rgba(255, 255, 255, 0.25);
    --t-border-ffffff-a30: rgba(255, 255, 255, 0.3);
    --t-border-ffffff-a35: rgba(255, 255, 255, 0.35);
    --t-shadow-000000-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-000000-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-000000-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-000000-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-26354a-a04: rgba(0, 0, 0, 0.088);
    --t-shadow-26354a-a05: rgba(0, 0, 0, 0.11);
    --t-shadow-26354a-a06: rgba(0, 0, 0, 0.132);
    --t-shadow-26354a-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-26354a-a10: rgba(0, 0, 0, 0.22);
    --t-shadow-26354a-a12: rgba(0, 0, 0, 0.264);
    --t-shadow-26354a-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-26354a-a16: rgba(0, 0, 0, 0.352);
    --t-shadow-26354a-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-26354a-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-26354a-a22: rgba(0, 0, 0, 0.484);
    --t-shadow-26354a-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-3f72c5-a15: rgba(70, 172, 190, 0.15);
    --t-shadow-3f72c5-a18: rgba(70, 172, 190, 0.18);
    --t-shadow-3f72c5-a20: rgba(70, 172, 190, 0.2);
    --t-shadow-3f72c5-a22: rgba(70, 172, 190, 0.22);
    --t-shadow-3f72c5-a25: rgba(70, 172, 190, 0.25);
    --t-shadow-3f72c5-a28: rgba(70, 172, 190, 0.28);
    --t-shadow-3f72c5-a30: rgba(70, 172, 190, 0.3);
    --t-shadow-48a868-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-48a868-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-4a80d8-a10: rgba(81, 189, 209, 0.1);
    --t-shadow-8fa8c7-a13: rgba(0, 0, 0, 0.286);
    --t-surface-000000-a18: rgba(0, 0, 0, 0.18);
    --t-surface-000000-a65: rgba(10, 16, 18, 0.65);
    --t-surface-26354a: #CDDADF;
    --t-surface-26354a-a55: rgba(10, 16, 18, 0.55);
    --t-surface-26354a-a72: rgba(10, 16, 18, 0.72);
    --t-surface-26354a-a80: rgba(10, 16, 18, 0.8);
    --t-surface-26354a-a82: rgba(10, 16, 18, 0.82);
    --t-surface-26354a-a92: rgba(10, 16, 18, 0.92);
    --t-surface-26354a-a94: rgba(10, 16, 18, 0.94);
    --t-surface-26354a-a95: rgba(10, 16, 18, 0.95);
    --t-surface-315faf: #3796A9;
    --t-surface-344966: #B5C5CC;
    --t-surface-396bc0: #40A5B9;
    --t-surface-3f72c5: #46ACBE;
    --t-surface-4675d1: #4DB2CA;
    --t-surface-4a80d8: #51BDD1;
    --t-surface-568be0: #5DC7D9;
    --t-surface-5b8def: #62CEE8;
    --t-surface-d6ecfa: #131C20;
    --t-surface-dcebff: #273B44;
    --t-surface-e4eaf2: #313A3E;
    --t-surface-e5ebf4: #2F393E;
    --t-surface-e7edf5: #2E383D;
    --t-surface-e8eef7: #2C383D;
    --t-surface-eaf2ff: #24373F;
    --t-surface-eeeeee: #2C393F;
    --t-surface-eef2f7: #2C3539;
    --t-surface-f0f5ff: #23353D;
    --t-surface-f1f4f8: #2C3438;
    --t-surface-f3f6fa: #293337;
    --t-surface-f4f7fc: #263339;
    --t-surface-f4f8fc: #263339;
    --t-surface-f5f8fd: #253339;
    --t-surface-f7f9fc: #273136;
    --t-surface-f8fafd: #253237;
    --t-surface-fbfcfe: #243136;
    --t-surface-ffffff: #232E33;
    --t-surface-ffffff-a18: rgba(255, 255, 255, 0.18);
    --t-surface-ffffff-a92: rgba(15, 24, 28, 0.92);
    --t-surface-ffffff-a94: rgba(15, 24, 28, 0.94);
    --t-text-222222: #E0E1E2;
    --t-text-26354a: #CDDADF;
    --t-text-333333: #D8DADA;
    --t-text-34445a: #C4D3D9;
    --t-text-3f72c5: #7FC5D2;
    --t-text-526175: #B5C5CC;
    --t-text-5b8def: #9EE0F0;
    --t-text-666666: #BDC0C1;
    --t-text-677488: #ABBBC2;
    --t-text-718096: #A4B6BD;
    --t-text-758196: #A4B4BB;
    --t-text-7a8798: #A2B2B9;
    --t-text-7b8798: #A2B2B9;
    --t-text-8792a2: #9CADB4;
    --t-text-8a95a5: #9AACB3;
    --t-text-9aa5b5: #8FA5AE;
    --t-text-a0aabb: #89A3AE;
    --t-text-d7e5fa: #D9F4F8;
    --t-text-eaf2ff: #EBFBFE;
    --t-text-ffffff: #FFFFFF;
    --hm-text: #E2ECF0;
    --hm-muted: #93A8B1;
    --hm-glass: rgba(35, 46, 51, 0.68);
    --hm-glass-strong: rgba(39, 52, 57, 0.92);
    --hm-glass-border: rgba(255, 255, 255, 0.07);
    --hm-line: #39484E;
    --hm-shadow: rgba(0, 0, 0, 0.28);
    --hm-shadow-strong: rgba(0, 0, 0, 0.42);
    --hm-dots: rgba(153, 203, 212, 0.10);
    --hm-blob-a: #31879A;
    --hm-blue: #7FC5D2;
    --pa-315faf: #3796A9;
    --pa-3f72c5: #46ACBE;
    --pa-4a80d8: #51BDD1;
    --pa-a9bef0: #ADDDEC;
    --pa-rgb-0f172a: 16, 35, 41;
    --pa-rgb-3f72c5: 70, 172, 190;
    --pa-rgb-4a80d8: 81, 189, 209;
}

/* ==== THEME PALETTES (generated) END ==== */


:root[data-theme="dark"] {
    color-scheme: dark;
}

html {
    background-color: var(--t-surface-d6ecfa);
}


/* ==========================================
   DARK MODE TWEAKS
========================================== */

:root[data-theme="dark"] #saveProfileButton {
    background:
        linear-gradient(
            135deg,
            var(--pa-4a80d8, #4A80D8),
            var(--pa-315faf, #315FAF)
        );
}


/* ==========================================
   THEME TOGGLE BUTTON
========================================== */

.theme-toggle {
    position: fixed;
    top: 20px;
    left: 81px;
    width: 46px;
    height: 46px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    border: 2px solid var(--t-border-dce4f0);
    border-radius: 10px;
    cursor: pointer;
    z-index: 9000;
    overflow: hidden;
    box-shadow:
        0 4px 14px var(--t-shadow-26354a-a12);
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow:
        0 6px 18px var(--t-shadow-26354a-a16);
}

.theme-toggle:active {
    transform: scale(0.94);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--pa-3f72c5, #3F72C5);
    outline-offset: 2px;
}

.theme-toggle-icon {
    position: absolute;
    width: 22px;
    height: 22px;
    transition:
        transform 0.5s cubic-bezier(0.34, 1.4, 0.64, 1),
        opacity 0.3s ease;
}

.theme-toggle-sun {
    color: #E5A23F;
    transform: rotate(0deg) scale(1);
    opacity: 1;
}

.theme-toggle-moon {
    color: var(--pa-a9bef0, #A9BEF0);
    transform: rotate(-90deg) scale(0.4);
    opacity: 0;
}

:root[data-theme="dark"] .theme-toggle-sun {
    transform: rotate(90deg) scale(0.4);
    opacity: 0;
}

:root[data-theme="dark"] .theme-toggle-moon {
    transform: rotate(0deg) scale(1);
    opacity: 1;
}

@media (max-width: 600px) {

    .theme-toggle {
        top: 15px;
        left: 67px;
        width: 42px;
        height: 42px;
    }

}


/* ==========================================
   PALETTE PICKER
========================================== */

.palette-picker {
    position: fixed;
    top: 20px;
    left: 193px;
    z-index: 9000;
    font-family: Arial, sans-serif;
}

.palette-toggle {
    width: 46px;
    height: 46px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--t-surface-ffffff);
    color: var(--t-text-3f72c5);
    border: 2px solid var(--t-border-dce4f0);
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px var(--t-shadow-26354a-a12);
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.palette-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--t-shadow-26354a-a16);
}

.palette-toggle:active {
    transform: scale(0.94);
}

.palette-toggle:focus-visible,
.palette-option:focus-visible {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 2px;
}

.palette-toggle-icon {
    width: 22px;
    height: 22px;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.palette-toggle:hover .palette-toggle-icon,
.palette-picker.open .palette-toggle-icon {
    transform: rotate(-30deg);
}

.palette-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 300px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
    background: var(--t-surface-ffffff);
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 14px;
    box-shadow: 0 14px 36px var(--t-shadow-26354a-a25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.96);
    transform-origin: top left;
    transition:
        opacity 0.2s ease,
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.2s ease;
}

.palette-picker.open .palette-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.palette-group-title {
    margin: 4px 4px 8px;
    color: var(--t-text-718096);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.palette-group + .palette-group-title {
    margin-top: 12px;
}

.palette-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.palette-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 4px 7px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--t-text-26354a);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.palette-option:hover {
    background: var(--t-surface-f3f6fa);
    transform: translateY(-1px);
}

.palette-option.active {
    border-color: var(--t-border-3f72c5);
    background: var(--t-surface-eaf2ff);
}

/* Little window preview: page colour, a card, and an accent dot */
.palette-swatch {
    position: relative;
    width: 100%;
    max-width: 72px;
    height: 42px;
    border-radius: 8px;
    background: var(--sw-page);
    box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.25);
    overflow: hidden;
}

.palette-swatch i {
    position: absolute;
    left: 9px;
    right: 9px;
    bottom: 0;
    height: 24px;
    border-radius: 6px 6px 0 0;
    background: var(--sw-card);
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.12);
}

.palette-swatch i::before,
.palette-swatch i::after {
    content: "";
    position: absolute;
    left: 7px;
    height: 3px;
    border-radius: 2px;
    background: var(--sw-text);
    opacity: 0.55;
}

.palette-swatch i::before {
    top: 7px;
    width: 26px;
}

.palette-swatch i::after {
    top: 14px;
    width: 16px;
}

.palette-swatch b {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--sw-accent);
    box-shadow: 0 0 0 2px var(--sw-page);
}

.palette-option-check {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 16px;
    height: 16px;
    padding: 2px;
    box-sizing: border-box;
    border-radius: 50%;
    background: var(--t-surface-3f72c5);
    color: #FFFFFF;
    opacity: 0;
    transform: scale(0.4);
    transition:
        opacity 0.2s ease,
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.palette-option.active .palette-option-check {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 600px) {

    .palette-picker {
        top: 15px;
        left: 171px;
    }

    .palette-toggle {
        width: 42px;
        height: 42px;
    }

    /* Keep the menu on screen on narrow phones */
    .palette-menu {
        position: fixed;
        top: 66px;
        left: 16px;
        right: 16px;
        width: auto;
        max-width: none;
    }

}

@media (prefers-reduced-motion: reduce) {

    .palette-menu,
    .palette-toggle-icon,
    .palette-option,
    .palette-option-check {
        transition-duration: 0.01ms !important;
    }

}


/* ==========================================
   THEME SWITCH ANIMATION
========================================== */

/* Circular reveal (browsers with View Transitions) */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

/* Fallback cross-fade for other browsers */
:root.theme-transition,
:root.theme-transition *:not(.theme-toggle-icon),
:root.theme-transition *::before,
:root.theme-transition *::after {
    transition:
        background-color 0.45s ease,
        color 0.45s ease,
        border-color 0.45s ease,
        box-shadow 0.45s ease !important;
}

@media (prefers-reduced-motion: reduce) {

    .theme-toggle-icon {
        transition: opacity 0.2s ease;
    }

}



/* ==========================================
   GLOBAL
========================================== */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    margin: 0;
    transform: none !important;
    filter: none !important;
    perspective: none !important;
    contain: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--t-surface-d6ecfa);
    font-family: Arial, sans-serif;
    color: var(--t-text-26354a);
    position: static !important;
    overflow-x: hidden;
}


/* ==========================================
   TOP BAR
========================================== */

.topbar {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 25px 40px;
}


/* ==========================================
   SCHOOL MANAGER LOGO
========================================== */

.logo-box {
    background-color: var(--t-surface-ffffff);
    padding: 12px 30px;
    border-radius: 18px;
    box-shadow:
        0 4px 15px var(--t-shadow-26354a-a08);
    transition:
        transform 0.3s ease;
}

.logo-box:hover {
    transform:
        translateY(-5px)
        rotate(-2deg);
}

.startingtitle {
    margin: 0;
    font-size: 36px;
    font-weight: 700;
    color: var(--t-text-3f72c5);
    text-decoration: none;
}


/* ==========================================
   ACCOUNT BUTTONS
========================================== */

.account-buttons {
    position: absolute;
    right: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1000;
}

.account-buttons button {
    padding: 11px 22px;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}


/* ==========================================
   SIGN IN
========================================== */

.signin-button {
    background-color: var(--t-surface-ffffff);
    color: var(--t-text-5b8def);
    box-shadow:
        0 3px 10px var(--t-shadow-26354a-a08);
}

.signin-button:hover {
    background-color: var(--t-surface-f4f8fc);
    transform:
        translateY(-2px);
}


/* ==========================================
   LOG IN
========================================== */

.login-button {
    background-color: var(--t-surface-5b8def);
    color: var(--t-text-ffffff);
}

.login-button:hover {
    background-color: var(--t-surface-4675d1);
    transform:
        translateY(-2px);
}


/* ==========================================
   ACCOUNT LINKS
========================================== */

.account-buttons a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 95px;
    height: 42px;
    padding: 0 20px;
    box-sizing: border-box;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.account-buttons a:hover {
    transform:
        translateY(-2px);
}


/* ==========================================
   SIGN IN LINK
========================================== */

.account-buttons .signin-button {
    background: transparent;
    color: var(--t-text-3f72c5);
    border: 1.5px solid var(--t-border-3f72c5);
}

.account-buttons .signin-button:hover {
    background: var(--t-surface-f0f5ff);
    box-shadow:
        0 5px 14px var(--t-shadow-3f72c5-a15);
}


/* ==========================================
   LOG IN LINK
========================================== */

.account-buttons .login-button {
    color: var(--t-text-ffffff);
    background:
        linear-gradient(
            135deg,
            var(--t-surface-4a80d8),
            var(--t-surface-315faf)
        );
    border:
        1.5px solid var(--t-border-3f72c5);
    box-shadow:
        0 4px 10px var(--t-shadow-3f72c5-a20);
}

.account-buttons .login-button:hover {
    background:
        linear-gradient(
            135deg,
            var(--t-surface-568be0),
            var(--t-surface-396bc0)
        );
    box-shadow:
        0 7px 16px var(--t-shadow-3f72c5-a28);
}


/* ==========================================
   LOG OUT
========================================== */

.account-buttons .logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--t-text-ffffff);
    background:
        linear-gradient(
            135deg,
            var(--t-surface-ef5350),
            var(--t-surface-d93636)
        );
    border:
        1.5px solid var(--t-border-d93636);
    box-shadow:
        0 4px 10px var(--t-shadow-d93636-a20);
}

.account-buttons .logout-button:hover {
    background:
        linear-gradient(
            135deg,
            var(--t-surface-f15e5b),
            var(--t-surface-e13e3e)
        );
    box-shadow:
        0 7px 16px var(--t-shadow-d93636-a28);
}


/* ==========================================
   WELCOME MESSAGE
========================================== */

.welcome-message {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 15px;
    border-radius: 12px;
    background: var(--t-surface-f4f7fc);
    border: 1px solid var(--t-border-e0e7f2);
    color: var(--t-text-26354a);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow:
        0 3px 8px var(--t-shadow-26354a-a06);
}


/* ==========================================
   FIXED PROFILE BUTTON
========================================== */

.profile-button {
    position: absolute !important;
    top: 35px !important;
    right: 310px !important;
    left: auto !important;
    bottom: auto !important;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    display: block !important;
    border: 2px solid var(--t-border-dce4f0) !important;
    border-radius: 50% !important;
    background-color: var(--t-surface-ffffff);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    cursor: pointer;
    z-index: 9000 !important;
    box-shadow: 0 4px 14px var(--t-shadow-26354a-a12);
    transform: none !important;
    transition:
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.profile-button:hover {
    background-color: var(--t-surface-f3f6fa);
    box-shadow: 0 6px 18px var(--t-shadow-26354a-a16);
    transform: none !important;
}

.profile-button:active {
    transform: none !important;
}


/* ==========================================
   DASHBOARD
========================================== */

.dashboard {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 100px;
    padding: 0 40px;
    animation:
        flyUp 0.8s ease-out;
}

.dashboard-card {
    width: 250px;
    min-height: 150px;
    padding: 25px;
    background-color: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    border-radius: 20px;
    text-decoration: none;
    box-shadow:
        0 5px 18px var(--t-shadow-26354a-a10);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.dashboard-card h2 {
    margin-top: 0;
    color: var(--t-text-3f72c5);
    font-size: 24px;
}

.dashboard-card p {
    font-size: 16px;
    line-height: 1.5;
}

.dashboard-card:hover {
    transform:
        translateY(-8px);
    box-shadow:
        0 10px 25px var(--t-shadow-26354a-a15);
}


/* ==========================================
   ANIMATION
========================================== */

@keyframes flyUp {
    from {
        opacity: 0;
        transform:
            translateY(80px);
    }

    to {
        opacity: 1;
        transform:
            translateY(0);
    }
}


/* ==========================================
   SCHEDULE TITLE
========================================== */

.schedule-title {
    text-align: center;
    margin-top: 60px;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 700;
    color: var(--t-text-26354a);
    animation:
        flyUp 0.8s ease-out;
}


/* ==========================================
   SCHEDULE CONTAINER
========================================== */

.schedule-container {
    width: 90%;
    max-width: 1100px;
    margin:
        0 auto 50px;
    padding: 25px;
    background-color: var(--t-surface-ffffff);
    border-radius: 20px;
    box-shadow:
        0 5px 18px var(--t-shadow-26354a-a10);
    overflow-x: auto;
    animation:
        flyUp 0.8s ease-out;
}


/* ==========================================
   SCHEDULE TABLE
========================================== */

.schedule {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: center;
    border-radius: 15px;
    overflow: hidden;
}


/* ==========================================
   TABLE HEADER
========================================== */

.schedule thead th {
    padding: 18px 12px;
    background-color: var(--t-surface-5b8def);
    color: var(--t-text-ffffff);
    font-size: 16px;
    font-weight: 700;
    border-bottom:
        3px solid var(--t-border-4675d1);
}

.schedule thead th:first-child {
    background-color:
        var(--t-surface-3f72c5);
}


/* ==========================================
   TIME COLUMN
========================================== */

.schedule tbody th {
    padding: 16px 12px;
    background-color:
        var(--t-surface-fceef3);
    color:
        var(--t-text-3f72c5);
    font-size:
        14px;
    font-weight:
        700;
    white-space:
        nowrap;
    border-right:
        2px solid var(--t-border-f3dce5);
    border-bottom:
        1px solid var(--t-border-f3dce5);
}


/* ==========================================
   SCHEDULE CELLS
========================================== */

.schedule tbody td {
    min-width:
        130px;
    padding:
        15px 12px;
    background-color:
        var(--t-surface-fceef3);
    color:
        var(--t-text-26354a);
    vertical-align:
        middle;
    border-right:
        1px solid var(--t-border-f3dce5);
    border-bottom:
        1px solid var(--t-border-f3dce5);
    transition:
        background-color 0.2s ease;
}

.schedule tbody td strong {
    display:
        block;
    margin-bottom:
        5px;
    color:
        var(--t-text-3f72c5);
    font-size:
        15px;
    font-weight:
        700;
    line-height:
        1.3;
}

.schedule tbody td small {
    display:
        block;
    color:
        var(--t-text-718096);
    font-size:
        12px;
    line-height:
        1.3;
}

.schedule tbody td hr {
    width:
        100%;
    margin:
        12px 0;
    border:
        none;
    border-top:
        2px solid var(--t-border-f3dce5);
}


/* ==========================================
   SCHEDULE HOVER
========================================== */

.schedule tbody tr:hover td,
.schedule tbody tr:hover th {
    background-color:
        var(--t-surface-f8e4eb);
}

.schedule tbody td:hover {
    background-color:
        var(--t-surface-f7e0e8);
}


/* ==========================================
   UPCOMING TESTS
========================================== */

.tests-container {
    width:
        90%;
    max-width:
        1000px;
    margin:
        0 auto 50px;
    display:
        flex;
    flex-direction:
        column;
    gap:
        20px;
}


/* ==========================================
   TEST CARD
========================================== */

.test-card {
    position:
        relative;
    padding:
        25px;
    background-color:
        var(--t-surface-ffffff);
    border-radius:
        18px;
    box-shadow:
        0 5px 18px var(--t-shadow-26354a-a10);
    border-left:
        6px solid var(--t-border-5b8def);
    animation:
        flyUp 0.6s ease-out;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.test-card h3 {
    margin:
        0 0 15px;
    color:
        var(--t-text-3f72c5);
    font-size:
        22px;
}

.test-card p {
    margin:
        8px 0;
    color:
        var(--t-text-26354a);
    font-size:
        15px;
}

.test-card p:first-of-type {
    font-weight:
        700;
}


/* ==========================================
   TEST URGENCY
========================================== */

.test-card.test-safe {
    border-left-color:
        var(--t-border-48a868);
    background-color:
        var(--t-surface-f0faf3);
    animation:
        safeGlow 4s ease-in-out infinite;
}

.test-card.test-warning {
    border-left-color:
        var(--t-border-e5b83f);
    background-color:
        var(--t-surface-fff9e8);
    animation:
        warningGlow 3s ease-in-out infinite;
}

.test-card.test-soon {
    border-left-color:
        var(--t-border-e58a3f);
    background-color:
        var(--t-surface-fff3e8);
    animation:
        soonGlow 2.5s ease-in-out infinite;
}

.test-card.test-today {
    border-left-color:
        var(--t-border-d94a4a);
    background-color:
        var(--t-surface-fff0f0);
    animation:
        todayGlow 2s ease-in-out infinite;
}


/* ==========================================
   TEST ANIMATIONS
========================================== */

@keyframes safeGlow {
    0%,
    100% {
        box-shadow:
            0 5px 18px
            var(--t-shadow-48a868-a08);
    }

    50% {
        box-shadow:
            0 7px 22px
            var(--t-shadow-48a868-a18);
    }
}

@keyframes warningGlow {
    0%,
    100% {
        box-shadow:
            0 5px 18px
            var(--t-shadow-e5b83f-a10);
    }

    50% {
        box-shadow:
            0 7px 23px
            var(--t-shadow-e5b83f-a25);
    }
}

@keyframes soonGlow {
    0%,
    100% {
        box-shadow:
            0 5px 18px
            var(--t-shadow-e58a3f-a12);
    }

    50% {
        box-shadow:
            0 8px 26px
            var(--t-shadow-e58a3f-a30);
    }
}

@keyframes todayGlow {
    0%,
    100% {
        box-shadow:
            0 5px 18px
            var(--t-shadow-d94a4a-a15);
    }

    50% {
        box-shadow:
            0 8px 30px
            var(--t-shadow-d94a4a-a40);
    }
}

.test-card:hover {
    transform:
        translateY(-3px);
}


/* ==========================================
   AUTH / LOGIN UI
========================================== */

.login-container {
    width:
        min(430px, calc(100% - 40px));
    margin:
        70px auto;
    padding:
        42px;
    box-sizing:
        border-box;
    background:
        var(--t-surface-ffffff-a92);
    border:
        1px solid var(--t-border-dce4f0-a90);
    border-radius:
        22px;
    box-shadow:
        0 20px 50px
        var(--t-shadow-26354a-a10),
        0 4px 12px
        var(--t-shadow-26354a-a04);
    backdrop-filter:
        blur(12px);
}


/* ==========================================
   AUTH TITLE
========================================== */

.login-container h2 {
    margin:
        0 0 8px;
    color:
        var(--t-text-26354a);
    font-size:
        30px;
    font-weight:
        700;
    letter-spacing:
        -0.5px;
    text-align:
        center;
}

.login-container h2::after {
    content:
        "Welcome back. Please enter your details.";
    display:
        block;
    margin-top:
        10px;
    color:
        var(--t-text-7b8798);
    font-size:
        14px;
    font-weight:
        400;
    letter-spacing:
        0;
}


/* ==========================================
   AUTH FORM
========================================== */

.login-container form {
    display:
        flex;
    flex-direction:
        column;
    gap:
        9px;
    margin-top:
        30px;
}


/* ==========================================
   AUTH LABELS
========================================== */

.login-container label {
    margin-top:
        10px;
    color:
        var(--t-text-34445a);
    font-size:
        13px;
    font-weight:
        600;
}


/* ==========================================
   AUTH INPUTS
========================================== */

.login-container input {
    width:
        100%;
    height:
        48px;
    padding:
        0 15px;
    box-sizing:
        border-box;
    border:
        1px solid var(--t-border-d9e1ec);
    border-radius:
        11px;
    background:
        var(--t-surface-f8fafd);
    color:
        var(--t-text-26354a);
    font-size:
        14px;
    outline:
        none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.login-container input::placeholder {
    color:
        var(--t-text-a0aabb);
}

.login-container input:focus {
    background:
        var(--t-surface-ffffff);
    border-color:
        var(--t-border-4a80d8);
    box-shadow:
        0 0 0 4px
        var(--t-shadow-4a80d8-a10);
}


/* ==========================================
   AUTH BUTTON
========================================== */

.login-container .login-button {
    width:
        100%;
    height:
        48px;
    margin-top:
        18px;
    border:
        none;
    border-radius:
        11px;
    background:
        linear-gradient(
            135deg,
            var(--t-surface-4a80d8),
            var(--t-surface-315faf)
        );
    color:
        var(--t-text-ffffff);
    font-size:
        14px;
    font-weight:
        600;
    letter-spacing:
        0.2px;
    cursor:
        pointer;
    box-shadow:
        0 7px 16px
        var(--t-shadow-3f72c5-a22);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.login-container .login-button:hover {
    transform:
        translateY(-2px);
    box-shadow:
        0 10px 22px
        var(--t-shadow-3f72c5-a30);
}

.login-container .login-button:active {
    transform:
        translateY(0);
}


/* ==========================================
   AUTH BOTTOM TEXT
========================================== */

.login-container > p {
    margin-top:
        24px;
    text-align:
        center;
    color:
        var(--t-text-7b8798);
    font-size:
        13px;
}

.login-container > p a {
    color:
        var(--t-text-3f72c5);
    font-weight:
        600;
    text-decoration:
        none;
}

.login-container > p a:hover {
    text-decoration:
        underline;
}


/* ==========================================
   FORM ERROR
========================================== */

.form-error {
    min-height:
        18px;
    margin:
        4px 0 0;
    color:
        var(--t-text-d93636);
    font-size:
        13px;
    font-weight:
        600;
    text-align:
        center;
}

.form-error-shake {
    animation:
        formShake 0.45s ease;
}

.form-error-shake input {
    border-color:
        var(--t-border-d93636);
    box-shadow:
        0 0 0 4px
        var(--t-shadow-d93636-a10);
}

@keyframes formShake {
    0% {
        transform:
            translateX(0);
    }

    20% {
        transform:
            translateX(-8px);
    }

    40% {
        transform:
            translateX(8px);
    }

    60% {
        transform:
            translateX(-6px);
    }

    80% {
        transform:
            translateX(6px);
    }

    100% {
        transform:
            translateX(0);
    }
}


/* ==========================================
   CHAT
========================================== */

.chat-container {
    width:
        min(1000px, calc(100% - 40px));
    height:
        650px;
    margin:
        50px auto;
    display:
        flex;
    flex-direction:
        column;
    background:
        var(--t-surface-ffffff-a94);
    border:
        1px solid var(--t-border-dce4f0);
    border-radius:
        22px;
    box-shadow:
        0 20px 50px
        var(--t-shadow-26354a-a10),
        0 4px 12px
        var(--t-shadow-26354a-a04);
    overflow:
        hidden;
}


/* ==========================================
   CHAT HEADER
========================================== */

.chat-header {
    display:
        flex;
    align-items:
        center;
    justify-content:
        space-between;
    gap:
        18px;
    padding:
        22px 26px;
    border-bottom:
        1px solid var(--t-border-e3e9f2);
    background:
        var(--t-surface-ffffff);
}

.chat-header h2 {
    margin:
        0;
    color:
        var(--t-text-26354a);
    font-size:
        22px;
}

.chat-header p {
    margin:
        5px 0 0;
    color:
        var(--t-text-7b8798);
    font-size:
        13px;
}

.chat-header-main {
    min-width:
        0;
    flex:
        1;
}

.chat-header-actions {
    display:
        flex;
    align-items:
        center;
    justify-content:
        flex-end;
    gap:
        10px;
    flex-shrink:
        0;
    flex-wrap:
        wrap;
}

.chat-status {
    color:
        var(--t-text-39a96b);
    font-size:
        13px;
    font-weight:
        600;
    white-space:
        nowrap;
}


/* ==========================================
   CHAT STATUS COLORS
========================================== */

.chat-status.status-online,
.chat-header-status.status-online,
.chat-user-status.status-online,
.status-text.status-online {
    color:
        var(--t-text-2ead5b);
}

.chat-status.status-dnd,
.chat-header-status.status-dnd,
.chat-user-status.status-dnd,
.status-text.status-dnd {
    color:
        var(--t-text-e04747);
}

.chat-status.status-asleep,
.chat-header-status.status-asleep,
.chat-user-status.status-asleep,
.status-text.status-asleep {
    color:
        var(--t-text-8a70d6);
}


/* ==========================================
   LEAVE GROUP BUTTON
========================================== */

.leave-group-button {
    display:
        inline-flex;
    align-items:
        center;
    justify-content:
        center;
    min-height:
        34px;
    padding:
        0 13px;
    border:
        1px solid var(--t-border-e2c7c7);
    border-radius:
        9px;
    background:
        var(--t-surface-fff5f5);
    color:
        var(--t-text-c64545);
    font-size:
        12px;
    font-weight:
        700;
    cursor:
        pointer;
    white-space:
        nowrap;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.leave-group-button:hover {
    background:
        var(--t-surface-fde8e8);
    border-color:
        var(--t-border-ddaaaa);
    color:
        var(--t-text-b63737);
    transform:
        translateY(-1px);
}

.leave-group-button:active {
    transform:
        translateY(0);
}

.leave-group-button:focus-visible {
    outline:
        3px solid var(--t-border-d94a4a-a18);
    outline-offset:
        2px;
}


/* ==========================================
   CHAT BODY
========================================== */

.chat-body {
    flex:
        1;
    min-height:
        0;
    display:
        flex;
    overflow:
        hidden;
}


/* ==========================================
   CHAT MAIN
========================================== */

.chat-main {
    flex:
        1;
    min-width:
        0;
    min-height:
        0;
    display:
        flex;
    flex-direction:
        column;
}


/* ==========================================
   MESSAGES
========================================== */

.chat-messages {
    flex:
        1;
    min-height:
        0;
    padding:
        25px;
    overflow-y:
        auto;
    display:
        flex;
    flex-direction:
        column;
    gap:
        14px;
    background:
        var(--t-surface-f7f9fc);
}


/* ==========================================
   MESSAGE ROW
========================================== */

.chat-message-row {
    display:
        flex;
    align-items:
        flex-start;
    gap:
        8px;
    width:
        fit-content;
    max-width:
        100%;
    align-self:
        flex-start;
}

.chat-message-row:has(.chat-message.own-message) {
    align-self:
        flex-end;
}


/* Follow-up messages from the same user: no avatar or name,
   but keep the avatar's space so the bubbles line up. */
.chat-message-row.chat-message-grouped {
    margin-top:
        -10px;
}

.chat-message-row.chat-message-grouped .chat-message-avatar {
    visibility:
        hidden;
    height:
        0;
    border:
        none;
    box-shadow:
        none;
}

.chat-message-row.chat-message-grouped .chat-username {
    display:
        none;
}


/* ==========================================
   MESSAGE
========================================== */

.chat-message {
    width:
        fit-content;
    max-width:
        70%;
    padding:
        10px 14px;
    border-radius:
        14px;
    background:
        var(--t-surface-ffffff);
    border:
        1px solid var(--t-border-e0e6ef);
    box-shadow:
        0 3px 8px
        var(--t-shadow-26354a-a05);
}

.chat-username {
    margin-bottom:
        4px;
    color:
        var(--t-text-3f72c5);
    font-size:
        12px;
    font-weight:
        700;
    cursor:
        pointer;
    width:
        fit-content;
    transition:
        color 0.15s ease,
        opacity 0.15s ease;
}

.chat-username:hover {
    opacity:
        0.85;
}

.chat-text {
    color:
        var(--t-text-26354a);
    font-size:
        14px;
    line-height:
        1.5;
    word-break:
        break-word;
}

.chat-time {
    margin-top:
        5px;
    color:
        var(--t-text-9aa5b5);
    font-size:
        10px;
    text-align:
        right;
}


/* ==========================================
   YOUR MESSAGE
========================================== */

.chat-message.own-message {
    background:
        var(--t-surface-4a80d8);
    border-color:
        var(--t-border-4a80d8);
}

.chat-message.own-message .chat-username {
    color:
        var(--t-text-eaf2ff);
}

.chat-message.own-message .chat-text {
    color:
        var(--t-text-ffffff);
}

.chat-message.own-message .chat-time {
    color:
        var(--t-text-d7e5fa);
}


/* ==========================================
   DELETE MESSAGE BUTTON
========================================== */

.delete-message-button {
    flex-shrink:
        0;
    width:
        34px;
    height:
        34px;
    display:
        flex;
    align-items:
        center;
    justify-content:
        center;
    padding:
        0;
    margin:
        0;
    border:
        none;
    border-radius:
        9px;
    background:
        var(--t-surface-d64545);
    color:
        var(--t-text-ffffff);
    cursor:
        pointer;
    opacity:
        0;
    visibility:
        hidden;
    pointer-events:
        none;
    transform:
        scale(0.8);
    box-shadow:
        0 4px 12px var(--t-shadow-000000-a15);
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease,
        background 0.2s ease;
}

.chat-message-row:hover .delete-message-button {
    opacity:
        1;
    visibility:
        visible;
    pointer-events:
        auto;
    transform:
        scale(1);
}

.delete-message-button:hover {
    background:
        var(--t-surface-b83232);
    transform:
        scale(1.1);
}

.delete-message-button:active {
    transform:
        scale(0.92);
}

.delete-icon {
    display:
        block;
    font-size:
        16px;
    line-height:
        1;
}


/* ==========================================
   CHAT FORM
========================================== */

.chat-form {
    display:
        flex;
    gap:
        10px;
    padding:
        16px;
    background:
        var(--t-surface-ffffff);
    border-top:
        1px solid var(--t-border-e3e9f2);
}

.chat-form input {
    flex:
        1;
    min-width:
        0;
    height:
        46px;
    padding:
        0 15px;
    box-sizing:
        border-box;
    border:
        1px solid var(--t-border-d9e1ec);
    border-radius:
        11px;
    background:
        var(--t-surface-f8fafd);
    color:
        var(--t-text-26354a);
    font-size:
        14px;
    outline:
        none;
}

.chat-form input:focus {
    background:
        var(--t-surface-ffffff);
    border-color:
        var(--t-border-4a80d8);
    box-shadow:
        0 0 0 4px
        var(--t-shadow-4a80d8-a10);
}

.chat-form button {
    height:
        46px;
    padding:
        0 22px;
    border:
        none;
    border-radius:
        11px;
    background:
        linear-gradient(
            135deg,
            var(--t-surface-4a80d8),
            var(--t-surface-315faf)
        );
    color:
        var(--t-text-ffffff);
    font-size:
        14px;
    font-weight:
        600;
    cursor:
        pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.chat-form button:hover {
    transform:
        translateY(-2px);
    box-shadow:
        0 7px 16px
        var(--t-shadow-3f72c5-a25);
}


/* ==========================================
   CHAT IMAGE
========================================== */

.chat-image {
    display:
        block;
    max-width:
        300px;
    max-height:
        300px;
    width:
        auto;
    height:
        auto;
    margin-top:
        5px;
    border-radius:
        10px;
    object-fit:
        contain;
}


/* ==========================================
   ATTACHMENT BUTTON
========================================== */

.image-button {
    width:
        46px;
    height:
        46px;
    flex-shrink:
        0;
    display:
        flex;
    align-items:
        center;
    justify-content:
        center;
    padding:
        0;
    border:
        none;
    border-radius:
        11px;
    background:
        var(--t-surface-4a80d8);
    cursor:
        pointer;
}

.image-button svg {
    display:
        block;
    width:
        28px;
    height:
        28px;
}

.image-button:hover {
    background:
        var(--t-surface-315faf);
}


/* ==========================================
   CHAT OPTIONS
========================================== */

.chat-options {
    position:
        relative;
    flex-shrink:
        0;
}

.chat-options .options-button {
    width:
        46px;
    height:
        46px;
    padding:
        0;
    border:
        none;
    border-radius:
        11px;
    background:
        var(--t-surface-4a80d8);
    color:
        var(--t-text-ffffff);
    font-size:
        26px;
    line-height:
        1;
    display:
        flex;
    align-items:
        center;
    justify-content:
        center;
    cursor:
        pointer;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.chat-options .options-button:hover {
    background:
        var(--t-surface-315faf);
    transform:
        translateY(-1px);
}


/* ==========================================
   OPTIONS MENU
========================================== */

.options-menu {
    position:
        absolute;
    bottom:
        56px;
    left:
        0;
    width:
        180px;
    padding:
        8px;
    background:
        var(--t-surface-ffffff);
    border:
        1px solid var(--t-border-dce4f0);
    border-radius:
        14px;
    box-shadow:
        0 12px 30px
        var(--t-shadow-26354a-a15);
    display:
        none;
    z-index:
        100;
}

.options-menu.visible {
    display:
        block;
}

.options-menu .option-item {
    width:
        100%;
    display:
        flex;
    align-items:
        center;
    gap:
        10px;
    padding:
        11px 12px;
    border:
        none;
    border-radius:
        9px;
    background:
        transparent;
    color:
        var(--t-text-26354a);
    font-size:
        14px;
    text-align:
        left;
    cursor:
        pointer;
}

.options-menu .option-item:hover {
    background:
        var(--t-surface-f3f6fa);
}

.option-icon {
    width:
        26px;
    text-align:
        center;
    font-size:
        18px;
}


/* ==========================================
   EMOJI PICKER
========================================== */

.emoji-picker-container {
    position:
        absolute;
    bottom:
        85px;
    left:
        20px;
    z-index:
        200;
    display:
        none !important;
}

.emoji-picker-container.visible {
    display:
        block !important;
}

emoji-picker {
    width:
        350px;
    height:
        450px;
    --background:
        var(--t-surface-ffffff);
    --border-color:
        var(--t-border-dce4f0);
    --border-radius:
        14px;
    --button-hover-background:
        var(--t-surface-f1f4f8);
    --button-active-background:
        var(--t-surface-e5ebf4);
}


/* ==========================================
   CHAT FILE
========================================== */

.chat-file {
    display:
        inline-flex;
    align-items:
        center;
    gap:
        6px;
    margin-top:
        5px;
    padding:
        9px 12px;
    border-radius:
        9px;
    background:
        var(--t-surface-f3f6fa);
    color:
        var(--t-text-3f72c5);
    text-decoration:
        none;
    font-size:
        13px;
    font-weight:
        600;
    word-break:
        break-word;
}

.chat-file:hover {
    background:
        var(--t-surface-e8eef7);
    text-decoration:
        underline;
}

.chat-message.own-message .chat-file {
    background:
        var(--t-surface-ffffff-a18);
    color:
        var(--t-text-ffffff);
}


/* ==========================================
   VOICE MESSAGE
========================================== */

.chat-audio {
    display:
        block;
    width:
        250px;
    max-width:
        100%;
    margin-top:
        5px;
}


/* ==========================================
   PRIVATE CONVERSATIONS SIDEBAR
========================================== */

.private-conversations-sidebar {
    width:
        220px;
    flex-shrink:
        0;
    display:
        flex;
    flex-direction:
        column;
    background:
        var(--t-surface-ffffff);
    border-right:
        1px solid var(--t-border-e3e9f2);
    overflow:
        hidden;
}


/* ==========================================
   PRIVATE CONVERSATIONS HEADER
========================================== */

.private-conversations-header {
    display:
        flex;
    align-items:
        center;
    justify-content:
        space-between;
    gap:
        8px;
    padding:
        14px 12px 10px 14px;
    border-bottom:
        1px solid var(--t-border-eef2f6);
}

.private-conversations-title {
    font-size:
        14px;
    font-weight:
        700;
    color:
        var(--t-text-26354a);
}


/* ==========================================
   CREATE GROUP BUTTON
========================================== */

.create-group-button {
    display:
        inline-flex;
    align-items:
        center;
    justify-content:
        center;
    min-height:
        30px;
    padding:
        0 9px;
    border:
        1px solid var(--t-border-d8e3f2);
    border-radius:
        8px;
    background:
        var(--t-surface-f5f8fd);
    color:
        var(--t-text-3f72c5);
    font-size:
        10px;
    font-weight:
        700;
    cursor:
        pointer;
    white-space:
        nowrap;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.create-group-button:hover {
    background:
        var(--t-surface-eaf2ff);
    border-color:
        var(--t-border-c6d7ee);
    transform:
        translateY(-1px);
}


/* ==========================================
   PRIVATE / GLOBAL BUTTONS
========================================== */

.private-conversation-global,
.private-conversation-item {
    width:
        100%;
    border:
        none;
    background:
        transparent;
    cursor:
        pointer;
    text-align:
        left;
    color:
        var(--t-text-26354a);
}

.private-conversation-global {
    display:
        flex;
    align-items:
        center;
    gap:
        10px;
    padding:
        10px;
}

.private-conversation-global:hover,
.private-conversation-item:hover {
    background:
        var(--t-surface-f3f6fa);
}

.private-conversation-global.active,
.private-conversation-item.active {
    background:
        var(--t-surface-eaf2ff);
    color:
        var(--t-text-3f72c5);
}


/* ==========================================
   GENERAL CHAT ICON
========================================== */

.private-conversation-global-icon {
    width:
        32px;
    height:
        32px;
    flex:
        0 0 32px;
    display:
        flex;
    align-items:
        center;
    justify-content:
        center;
    border-radius:
        50%;
    background:
        var(--t-surface-eaf2ff);
    color:
        var(--t-text-3f72c5);
    font-size:
        12px;
    font-weight:
        700;
}


/* ==========================================
   CONVERSATION SECTIONS
========================================== */

.private-conversations-section,
.group-conversations-section {
    display:
        flex;
    flex-direction:
        column;
    min-height:
        0;
}

.private-conversations-section {
    flex:
        1 1 auto;
}

.group-conversations-section {
    flex:
        0 0 auto;
    max-height:
        45%;
    border-top:
        1px solid var(--t-border-eef2f6);
}


/* ==========================================
   SECTION TITLES
========================================== */

.private-conversations-section-title,
.group-conversations-section-title {
    padding:
        9px 12px 6px;
    color:
        var(--t-text-8792a2);
    font-size:
        10px;
    font-weight:
        700;
    text-transform:
        uppercase;
    letter-spacing:
        0.5px;
}

.private-conversations-list,
.group-conversations-list {
    min-height:
        0;
    overflow-y:
        auto;
}

.private-conversations-list {
    flex:
        1;
    padding:
        4px 0 8px;
}

.group-conversations-list {
    flex:
        1;
    padding:
        0 0 8px;
}


/* ==========================================
   PRIVATE CONVERSATION ROW
========================================== */

.private-conversation-row {
    display:
        flex;
    align-items:
        center;
    width:
        100%;
    min-width:
        0;
}

.private-conversation-item {
    display:
        flex;
    align-items:
        center;
    gap:
        10px;
    padding:
        9px 8px 9px 10px;
    flex:
        1 1 auto;
    min-width:
        0;
}

.private-conversation-delete {
    flex:
        0 0 28px;
    width:
        28px;
    height:
        28px;
    min-width:
        28px;
    margin:
        0 3px 0 2px;
    padding:
        0;
    border:
        none;
    border-radius:
        50%;
    background:
        transparent;
    color:
        var(--t-text-7a8798);
    font-size:
        19px;
    line-height:
        1;
    display:
        flex;
    align-items:
        center;
    justify-content:
        center;
    cursor:
        pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.private-conversation-delete:hover {
    background:
        var(--t-surface-e7edf5);
    color:
        var(--t-text-d64545);
    transform:
        scale(1.05);
}


/* ==========================================
   PRIVATE CONVERSATION ICON
========================================== */

.private-conversation-icon {
    width:
        32px;
    height:
        32px;
    min-width:
        32px;
    min-height:
        32px;
    max-width:
        32px;
    max-height:
        32px;
    flex:
        0 0 32px;
    position:
        relative;
    display:
        flex;
    align-items:
        center;
    justify-content:
        center;
    border-radius:
        50%;
    overflow:
        hidden;
    background:
        var(--t-surface-e7edf5);
    color:
        var(--t-text-526175);
    font-size:
        12px;
    font-weight:
        700;
}

.private-conversation-icon img {
    width:
        100%;
    height:
        100%;
    object-fit:
        cover;
    border-radius:
        50%;
}


/* ==========================================
   PRIVATE CONVERSATION CONTENT
========================================== */

.private-conversation-content {
    min-width:
        0;
    flex:
        1;
    display:
        flex;
    flex-direction:
        column;
}

.private-conversation-name {
    overflow:
        hidden;
    text-overflow:
        ellipsis;
    white-space:
        nowrap;
    font-size:
        13px;
    font-weight:
        700;
}

.private-conversation-preview {
    margin-top:
        2px;
    overflow:
        hidden;
    text-overflow:
        ellipsis;
    white-space:
        nowrap;
    color:
        var(--t-text-8a95a5);
    font-size:
        11px;
}

.private-conversations-empty {
    padding:
        18px 12px;
    color:
        var(--t-text-9aa5b5);
    font-size:
        12px;
    text-align:
        center;
}


/* ==========================================
   GROUP CONVERSATION
========================================== */

.group-conversation-row {
    width:
        100%;
}

.group-conversation-item {
    width:
        100%;
    display:
        flex;
    align-items:
        center;
    gap:
        10px;
    padding:
        9px 10px;
    border:
        none;
    background:
        transparent;
    color:
        var(--t-text-26354a);
    text-align:
        left;
    cursor:
        pointer;
    transition:
        background-color 0.2s ease;
}

.group-conversation-item:hover {
    background:
        var(--t-surface-f3f6fa);
}

.group-conversation-item.active {
    background:
        var(--t-surface-eaf2ff);
    color:
        var(--t-text-3f72c5);
}


/* ==========================================
   GROUP ICON
========================================== */

.group-conversation-icon {
    width:
        32px;
    height:
        32px;
    min-width:
        32px;
    flex:
        0 0 32px;
    display:
        flex;
    align-items:
        center;
    justify-content:
        center;
    border-radius:
        50%;
    background:
        var(--t-surface-eaf2ff);
    color:
        var(--t-text-3f72c5);
    font-size:
        11px;
    font-weight:
        700;
}


/* ==========================================
   GROUP CONTENT
========================================== */

.group-conversation-content {
    min-width:
        0;
    flex:
        1;
    display:
        flex;
    flex-direction:
        column;
}

.group-conversation-name {
    overflow:
        hidden;
    text-overflow:
        ellipsis;
    white-space:
        nowrap;
    font-size:
        13px;
    font-weight:
        700;
}

.group-conversation-preview {
    margin-top:
        2px;
    overflow:
        hidden;
    text-overflow:
        ellipsis;
    white-space:
        nowrap;
    color:
        var(--t-text-8a95a5);
    font-size:
        11px;
}

.group-conversation-members {
    margin-top:
        2px;
    color:
        var(--t-text-9aa5b5);
    font-size:
        10px;
}

.group-conversations-empty {
    padding:
        10px 12px 14px;
    color:
        var(--t-text-9aa5b5);
    font-size:
        11px;
    text-align:
        center;
}


/* ==========================================
   GROUP LOADING
========================================== */

.private-chat-loading {
    padding:
        30px;
    color:
        var(--t-text-7b8798);
    font-size:
        13px;
    text-align:
        center;
}


/* ==========================================
   ONLINE USERS SIDEBAR
========================================== */

.chat-users-sidebar {
    width:
        210px;
    flex-shrink:
        0;
    display:
        flex;
    flex-direction:
        column;
    background:
        var(--t-surface-ffffff);
    border-left:
        1px solid var(--t-border-e3e9f2);
}


/* ==========================================
   ONLINE USERS HEADER
========================================== */

.chat-users-header {
    display:
        flex;
    align-items:
        center;
    justify-content:
        space-between;
    padding:
        18px 16px;
    border-bottom:
        1px solid var(--t-border-e3e9f2);
    background:
        var(--t-surface-ffffff);
}

.chat-users-title {
    color:
        var(--t-text-26354a);
    font-size:
        14px;
    font-weight:
        700;
}

.chat-users-count {
    min-width:
        24px;
    height:
        24px;
    display:
        flex;
    align-items:
        center;
    justify-content:
        center;
    padding:
        0 7px;
    box-sizing:
        border-box;
    border-radius:
        12px;
    background:
        var(--t-surface-eaf2ff);
    color:
        var(--t-text-3f72c5);
    font-size:
        12px;
    font-weight:
        700;
}


/* ==========================================
   ONLINE USERS LIST
========================================== */

.online-users-list {
    flex:
        1;
    overflow-y:
        auto;
    padding:
        10px;
}


/* ==========================================
   ONLINE USER
========================================== */

.online-user {
    display:
        flex;
    align-items:
        center;
    gap:
        9px;
    min-height:
        42px;
    padding:
        8px 10px;
    box-sizing:
        border-box;
    border-radius:
        10px;
    transition:
        background-color 0.2s ease;
}

.online-user:hover {
    background:
        var(--t-surface-f3f6fa);
}


/* ==========================================
   ONLINE DOT
========================================== */

.online-user-dot {
    width:
        9px;
    height:
        9px;
    flex-shrink:
        0;
    border-radius:
        50%;
    background:
        var(--t-surface-39a96b);
    box-shadow:
        0 0 0 3px
        var(--t-shadow-39a96b-a12);
}

.online-user-dot.status-online {
    background:
        var(--t-surface-39a96b);
    box-shadow:
        0 0 0 3px
        var(--t-shadow-39a96b-a12);
}

.online-user-dot.status-dnd {
    background:
        var(--t-surface-d94a4a);
    box-shadow:
        0 0 0 3px
        var(--t-shadow-d94a4a-a12);
}

.online-user-dot.status-asleep {
    background:
        var(--t-surface-e5b83f);
    box-shadow:
        0 0 0 3px
        var(--t-shadow-e5b83f-a12);
}


/* ==========================================
   CURRENT USER
========================================== */

.online-user-current {
    cursor:
        pointer;
}

.online-user-current:hover {
    background:
        var(--t-surface-eaf2ff);
}


/* ==========================================
   STATUS MENU
========================================== */

.status-menu {
    position:
        fixed;
    width:
        200px;
    padding:
        8px;
    box-sizing:
        border-box;
    background:
        var(--t-surface-ffffff);
    border:
        1px solid var(--t-border-dce4f0);
    border-radius:
        14px;
    box-shadow:
        0 12px 30px
        var(--t-shadow-26354a-a16);
    z-index:
        9999;
    display:
        none;
    animation:
        statusMenuAppear 0.15s ease-out;
}

.status-menu.visible {
    display:
        block;
}

@keyframes statusMenuAppear {
    from {
        opacity:
            0;
        transform:
            translateY(-5px)
            scale(0.97);
    }

    to {
        opacity:
            1;
        transform:
            translateY(0)
            scale(1);
    }
}


/* ==========================================
   STATUS OPTION
========================================== */

.status-option {
    width:
        100%;
    display:
        flex;
    align-items:
        center;
    gap:
        10px;
    padding:
        11px 12px;
    border:
        none;
    border-radius:
        9px;
    background:
        transparent;
    color:
        var(--t-text-26354a);
    font-size:
        13px;
    font-weight:
        600;
    text-align:
        left;
    cursor:
        pointer;
    transition:
        background-color 0.2s ease,
        transform 0.15s ease;
}

.status-option:hover {
    background:
        var(--t-surface-f3f6fa);
    transform:
        translateX(2px);
}

.status-option.selected {
    background:
        var(--t-surface-eaf2ff);
    color:
        var(--t-text-3f72c5);
}

.status-option-icon {
    width:
        24px;
    flex-shrink:
        0;
    display:
        flex;
    align-items:
        center;
    justify-content:
        center;
    font-size:
        15px;
}

.status-option-name {
    flex:
        1;
    white-space:
        nowrap;
}


/* ==========================================
   ONLINE USER NAME
========================================== */

.online-user-name {
    min-width:
        0;
    overflow:
        hidden;
    text-overflow:
        ellipsis;
    white-space:
        nowrap;
    color:
        var(--t-text-26354a);
    font-size:
        13px;
    font-weight:
        600;
}


/* ==========================================
   YOU LABEL
========================================== */

.online-user-you {
    margin-left:
        auto;
    padding:
        3px 6px;
    border-radius:
        6px;
    background:
        var(--t-surface-eaf2ff);
    color:
        var(--t-text-3f72c5);
    font-size:
        10px;
    font-weight:
        700;
}


/* ==========================================
   MULTIPLE CONNECTIONS
========================================== */

.online-user-count {
    margin-left:
        auto;
    color:
        var(--t-text-9aa5b5);
    font-size:
        11px;
    font-weight:
        600;
}


/* ==========================================
   EMPTY ONLINE USERS
========================================== */

.online-users-empty {
    padding:
        20px 10px;
    color:
        var(--t-text-9aa5b5);
    font-size:
        13px;
    text-align:
        center;
}


/* ==========================================
   DELETE MESSAGE MODAL
========================================== */

.delete-modal {
    position:
        fixed !important;
    top:
        0 !important;
    left:
        0 !important;
    right:
        0 !important;
    bottom:
        0 !important;
    width:
        100vw !important;
    height:
        100vh !important;
    display:
        flex !important;
    align-items:
        center !important;
    justify-content:
        center !important;
    box-sizing:
        border-box;
    padding:
        20px;
    background:
        var(--t-surface-000000-a65);
    z-index:
        99999 !important;
    opacity:
        0;
    visibility:
        hidden;
    pointer-events:
        none;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}

.delete-modal.visible {
    opacity:
        1;
    visibility:
        visible;
    pointer-events:
        auto;
}

.delete-modal-content {
    width:
        min(420px, 100%);
    padding:
        28px;
    box-sizing:
        border-box;
    background:
        var(--t-surface-ffffff);
    border-radius:
        16px;
    box-shadow:
        0 20px 60px
        var(--t-shadow-000000-a25);
    text-align:
        center;
}

.delete-modal-icon {
    width:
        52px;
    height:
        52px;
    margin:
        0 auto 14px;
    display:
        flex;
    align-items:
        center;
    justify-content:
        center;
    border-radius:
        50%;
    background:
        var(--t-surface-ffe8e8);
    font-size:
        24px;
}

.delete-modal-content h3 {
    margin:
        0 0 8px;
    font-size:
        21px;
    color:
        var(--t-text-222222);
}

.delete-modal-content p {
    margin:
        0 0 24px;
    color:
        var(--t-text-666666);
    font-size:
        14px;
    line-height:
        1.5;
}

.delete-modal-buttons {
    display:
        flex;
    justify-content:
        flex-end;
    gap:
        10px;
}

.delete-modal-buttons button {
    border:
        none;
    padding:
        10px 18px;
    border-radius:
        8px;
    font-size:
        14px;
    font-weight:
        600;
    cursor:
        pointer;
    transition:
        transform 0.15s ease,
        opacity 0.15s ease;
}

.delete-modal-buttons button:hover {
    transform:
        translateY(-1px);
}

.delete-modal-cancel {
    background:
        var(--t-surface-eeeeee);
    color:
        var(--t-text-333333);
}

.delete-modal-cancel:hover {
    opacity:
        0.85;
}

.delete-modal-confirm {
    background:
        var(--t-surface-e74c3c);
    color:
        var(--t-text-ffffff);
}

.delete-modal-confirm:hover {
    background:
        var(--t-surface-d63c2e);
}


/* ==========================================
   LEAVE GROUP MODAL
========================================== */

.leave-group-modal {
    backdrop-filter:
        blur(4px);
    -webkit-backdrop-filter:
        blur(4px);
}

.leave-group-modal .delete-modal-content {
    transform:
        translateY(12px) scale(0.96);
    opacity:
        0;
    transition:
        transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2),
        opacity 0.2s ease;
}

.leave-group-modal.visible .delete-modal-content {
    transform:
        translateY(0) scale(1);
    opacity:
        1;
}

.leave-group-modal-icon {
    background:
        var(--t-surface-fff1e6);
}

.leave-group-modal-name {
    color:
        var(--t-text-222222);
    word-break:
        break-word;
}

.leave-group-modal .delete-modal-buttons button:focus-visible {
    outline:
        2px solid var(--t-border-e74c3c);
    outline-offset:
        2px;
}


/* ==========================================
   CREATE GROUP MODAL
========================================== */

.create-group-modal {
    position:
        fixed;
    inset:
        0;
    display:
        flex;
    align-items:
        center;
    justify-content:
        center;
    padding:
        20px;
    background:
        var(--t-surface-26354a-a55);
    z-index:
        100000;
    opacity:
        0;
    visibility:
        hidden;
    pointer-events:
        none;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}

.create-group-modal.visible {
    opacity:
        1;
    visibility:
        visible;
    pointer-events:
        auto;
}


/* ==========================================
   CREATE GROUP CONTENT
========================================== */

.create-group-modal-content {
    width:
        min(500px, 100%);
    max-height:
        calc(100vh - 40px);
    display:
        flex;
    flex-direction:
        column;
    background:
        var(--t-surface-ffffff);
    border:
        1px solid var(--t-border-dce4f0);
    border-radius:
        18px;
    box-shadow:
        0 24px 70px
        var(--t-shadow-26354a-a25);
    overflow:
        hidden;
    animation:
        createGroupAppear 0.18s ease-out;
}

@keyframes createGroupAppear {
    from {
        opacity:
            0;
        transform:
            translateY(8px)
            scale(0.98);
    }

    to {
        opacity:
            1;
        transform:
            translateY(0)
            scale(1);
    }
}


/* ==========================================
   CREATE GROUP HEADER
========================================== */

.create-group-modal-header {
    display:
        flex;
    align-items:
        flex-start;
    justify-content:
        space-between;
    gap:
        15px;
    padding:
        22px 22px 16px;
    border-bottom:
        1px solid var(--t-border-eef2f6);
}

.create-group-modal-header h3 {
    margin:
        0;
    color:
        var(--t-text-26354a);
    font-size:
        21px;
}

.create-group-modal-header p {
    margin:
        5px 0 0;
    color:
        var(--t-text-7b8798);
    font-size:
        12px;
}

.create-group-close {
    flex:
        0 0 34px;
    width:
        34px;
    height:
        34px;
    padding:
        0;
    border:
        none;
    border-radius:
        50%;
    background:
        var(--t-surface-f3f6fa);
    color:
        var(--t-text-526175);
    font-size:
        20px;
    line-height:
        1;
    cursor:
        pointer;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.create-group-close:hover {
    background:
        var(--t-surface-e7edf5);
    transform:
        scale(1.05);
}


/* ==========================================
   CREATE GROUP FORM
========================================== */

.create-group-form {
    padding:
        18px 22px;
    overflow-y:
        auto;
}

.create-group-label {
    display:
        block;
    margin:
        0 0 7px;
    color:
        var(--t-text-34445a);
    font-size:
        12px;
    font-weight:
        700;
}

.create-group-name-input,
.create-group-search {
    width:
        100%;
    height:
        44px;
    padding:
        0 13px;
    box-sizing:
        border-box;
    border:
        1px solid var(--t-border-d9e1ec);
    border-radius:
        10px;
    background:
        var(--t-surface-f8fafd);
    color:
        var(--t-text-26354a);
    font-size:
        13px;
    outline:
        none;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.create-group-search {
    margin-top:
        6px;
}

.create-group-name-input:focus,
.create-group-search:focus {
    background:
        var(--t-surface-ffffff);
    border-color:
        var(--t-border-4a80d8);
    box-shadow:
        0 0 0 4px
        var(--t-shadow-4a80d8-a10);
}

.create-group-name-input::placeholder,
.create-group-search::placeholder {
    color:
        var(--t-text-a0aabb);
}


/* ==========================================
   GROUP SELECTED COUNT
========================================== */

.create-group-selected-count {
    margin:
        12px 0 8px;
    color:
        var(--t-text-3f72c5);
    font-size:
        12px;
    font-weight:
        700;
}


/* ==========================================
   GROUP USER LIST
========================================== */

.create-group-users {
    max-height:
        300px;
    overflow-y:
        auto;
    border:
        1px solid var(--t-border-e3e9f2);
    border-radius:
        12px;
    background:
        var(--t-surface-fbfcfe);
}

.create-group-user {
    display:
        flex;
    align-items:
        center;
    gap:
        10px;
    min-height:
        56px;
    padding:
        8px 11px;
    cursor:
        pointer;
    border-bottom:
        1px solid var(--t-border-eef2f6);
    transition:
        background-color 0.2s ease;
}

.create-group-user:last-child {
    border-bottom:
        none;
}

.create-group-user:hover {
    background:
        var(--t-surface-f3f6fa);
}

.create-group-user input[type="checkbox"] {
    flex:
        0 0 auto;
    width:
        16px;
    height:
        16px;
    margin:
        0;
    accent-color:
        var(--t-surface-4a80d8);
    cursor:
        pointer;
}


/* ==========================================
   CREATE GROUP USER AVATAR
========================================== */

.create-group-user-avatar {
    width:
        34px;
    height:
        34px;
    flex:
        0 0 34px;
    position:
        relative;
    display:
        flex;
    align-items:
        center;
    justify-content:
        center;
    overflow:
        hidden;
    border-radius:
        50%;
    background:
        var(--t-surface-e7edf5);
    color:
        var(--t-text-526175);
    font-size:
        12px;
    font-weight:
        700;
}

.create-group-user-avatar img {
    width:
        100%;
    height:
        100%;
    object-fit:
        cover;
    border-radius:
        50%;
}


/* ==========================================
   CREATE GROUP USER TEXT
========================================== */

.create-group-user-text {
    min-width:
        0;
    flex:
        1;
}

.create-group-user-username {
    overflow:
        hidden;
    text-overflow:
        ellipsis;
    white-space:
        nowrap;
    color:
        var(--t-text-26354a);
    font-size:
        13px;
    font-weight:
        700;
}

.create-group-user-display-name {
    margin-top:
        2px;
    overflow:
        hidden;
    text-overflow:
        ellipsis;
    white-space:
        nowrap;
    color:
        var(--t-text-8a95a5);
    font-size:
        11px;
}


/* ==========================================
   CREATE GROUP STATES
========================================== */

.create-group-loading,
.create-group-empty,
.create-group-error {
    padding:
        25px 15px;
    text-align:
        center;
    color:
        var(--t-text-8792a2);
    font-size:
        12px;
}

.create-group-error {
    color:
        var(--t-text-b44747);
}


/* ==========================================
   CREATE GROUP BUTTONS
========================================== */

.create-group-modal-buttons {
    display:
        flex;
    justify-content:
        flex-end;
    gap:
        10px;
    padding:
        15px 22px 20px;
    border-top:
        1px solid var(--t-border-eef2f6);
}

.create-group-cancel,
.create-group-submit {
    min-height:
        42px;
    padding:
        0 17px;
    border:
        none;
    border-radius:
        10px;
    font-size:
        13px;
    font-weight:
        700;
    cursor:
        pointer;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.create-group-cancel {
    background:
        var(--t-surface-eef2f7);
    color:
        var(--t-text-526175);
}

.create-group-cancel:hover {
    background:
        var(--t-surface-e4eaf2);
    transform:
        translateY(-1px);
}

.create-group-submit {
    background:
        linear-gradient(
            135deg,
            var(--t-surface-4a80d8),
            var(--t-surface-315faf)
        );
    color:
        var(--t-text-ffffff);
    box-shadow:
        0 5px 13px
        var(--t-shadow-3f72c5-a18);
}

.create-group-submit:hover {
    transform:
        translateY(-1px);
    box-shadow:
        0 8px 18px
        var(--t-shadow-3f72c5-a25);
}

.create-group-submit:disabled {
    opacity:
        0.6;
    cursor:
        not-allowed;
    transform:
        none;
    box-shadow:
        none;
}


/* ==========================================
   NOTIFICATION CENTER
========================================== */

.chat-notification-center {
    position:
        absolute;
    top:
        35px;
    right:
        370px;
    z-index:
        5000;
}

.chat-notification-button {
    position:
        relative;
    width:
        46px;
    height:
        46px;
    padding:
        0;
    display:
        flex;
    align-items:
        center;
    justify-content:
        center;
    border:
        2px solid var(--t-border-dce4f0);
    border-radius:
        50%;
    background:
        var(--t-surface-ffffff);
    color:
        var(--t-text-3f72c5);
    cursor:
        pointer;
    box-shadow:
        0 4px 14px var(--t-shadow-26354a-a12);
    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.chat-notification-button:hover {
    background:
        var(--t-surface-f3f6fa);
    box-shadow:
        0 6px 18px var(--t-shadow-26354a-a16);
    transform:
        translateY(-1px);
}

.chat-notification-icon {
    width:
        21px;
    height:
        21px;
    display:
        flex;
    align-items:
        center;
    justify-content:
        center;
}

.chat-notification-icon svg {
    width:
        21px;
    height:
        21px;
    fill:
        none;
    stroke:
        var(--t-text-526175);
    stroke-width:
        1.8;
    stroke-linecap:
        round;
    stroke-linejoin:
        round;
}


/* ==========================================
   NOTIFICATION BADGE
========================================== */

.chat-notification-badge {
    position:
        absolute;
    top:
        -4px;
    right:
        -4px;
    min-width:
        19px;
    height:
        19px;
    padding:
        0 5px;
    display:
        none;
    align-items:
        center;
    justify-content:
        center;
    border:
        2px solid var(--t-border-ffffff);
    border-radius:
        10px;
    background:
        var(--t-surface-d94a4a);
    color:
        var(--t-text-ffffff);
    font-size:
        9px;
    font-weight:
        700;
    line-height:
        1;
}

.chat-notification-badge.visible {
    display:
        flex;
}


/* ==========================================
   NOTIFICATION PANEL
========================================== */

.chat-notification-panel {
    position:
        absolute;
    top:
        56px;
    right:
        0;
    width:
        340px;
    max-width:
        calc(100vw - 30px);
    max-height:
        420px;
    display:
        none;
    flex-direction:
        column;
    background:
        var(--t-surface-ffffff);
    border:
        1px solid var(--t-border-dce4f0);
    border-radius:
        16px;
    box-shadow:
        0 18px 45px
        var(--t-shadow-26354a-a18);
    overflow:
        hidden;
}

.chat-notification-panel.visible {
    display:
        flex;
}


/* ==========================================
   NOTIFICATION HEADER
========================================== */

.chat-notification-header {
    padding:
        14px 16px;
    border-bottom:
        1px solid var(--t-border-eef2f6);
    color:
        var(--t-text-26354a);
    font-size:
        14px;
    font-weight:
        700;
}


/* ==========================================
   NOTIFICATION LIST
========================================== */

.chat-notification-list {
    display:
        flex;
    flex-direction:
        column;
    overflow-y:
        auto;
}

.chat-notification-empty {
    padding:
        25px 15px;
    text-align:
        center;
    color:
        var(--t-text-9aa5b5);
    font-size:
        12px;
}


/* ==========================================
   NOTIFICATION CARD
========================================== */

.chat-notification-card {
    padding:
        13px 15px;
    border-bottom:
        1px solid var(--t-border-eef2f6);
}

.chat-notification-card:last-child {
    border-bottom:
        none;
}

.chat-notification-title {
    color:
        var(--t-text-26354a);
    font-size:
        13px;
    font-weight:
        700;
}

.chat-notification-message {
    margin-top:
        5px;
    color:
        var(--t-text-677488);
    font-size:
        12px;
    line-height:
        1.5;
}


/* ==========================================
   NOTIFICATION BUTTONS
========================================== */

.chat-notification-buttons {
    display:
        flex;
    justify-content:
        flex-end;
    gap:
        8px;
    margin-top:
        11px;
}

.chat-notification-accept,
.chat-notification-decline {
    min-height:
        32px;
    padding:
        0 11px;
    border:
        none;
    border-radius:
        8px;
    font-size:
        11px;
    font-weight:
        700;
    cursor:
        pointer;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.chat-notification-accept {
    background:
        var(--t-surface-eaf7ee);
    color:
        var(--t-text-2e8d4b);
}

.chat-notification-accept:hover {
    background:
        var(--t-surface-ddf0e4);
    transform:
        translateY(-1px);
}

.chat-notification-decline {
    background:
        var(--t-surface-f7eff0);
    color:
        var(--t-text-b44747);
}

.chat-notification-decline:hover {
    background:
        var(--t-surface-f1e3e5);
    transform:
        translateY(-1px);
}


/* ==========================================
   PROFILE PAGE
========================================== */

.profile-page {
    max-width:
        920px;
    margin:
        55px auto 70px;
    padding:
        0 25px;
    box-sizing:
        border-box;
}

.profile-page h1 {
    margin:
        0 0 30px;
    color:
        var(--t-text-26354a);
    font-size:
        34px;
    font-weight:
        700;
    text-align:
        center;
    letter-spacing:
        -0.5px;
}


/* ==========================================
   PROFILE HEADER
========================================== */

.profile-header {
    position:
        relative;
    width:
        100%;
    padding-bottom:
        95px;
}


/* ==========================================
   PROFILE BANNER
========================================== */

.profile-banner {
    position:
        relative;
    width:
        100%;
    height:
        280px;
    background:
        linear-gradient(
            135deg,
            var(--t-surface-eaf2ff),
            var(--t-surface-dcebff)
        );
    border:
        1px solid var(--t-border-d5e0ef);
    border-radius:
        20px;
    box-shadow:
        0 12px 30px
        var(--t-shadow-26354a-a10);
    overflow:
        hidden;
    background-size:
        cover;
    background-position:
        center;
    background-repeat:
        no-repeat;
}

.profile-banner::after {
    content:
        "";
    position:
        absolute;
    left:
        0;
    right:
        0;
    bottom:
        0;
    height:
        90px;
    background:
        linear-gradient(
            to top,
            var(--t-surface-000000-a18),
            transparent
        );
    pointer-events:
        none;
}


/* ==========================================
   BANNER CHANGE BUTTON
========================================== */

.profile-banner-change-button {
    position:
        absolute;
    right:
        18px;
    bottom:
        18px;
    z-index:
        10;
    padding:
        10px 16px;
    border:
        1px solid var(--t-border-ffffff-a30);
    border-radius:
        10px;
    background:
        var(--t-surface-26354a-a80);
    backdrop-filter:
        blur(8px);
    color:
        var(--t-text-ffffff);
    font-size:
        13px;
    font-weight:
        600;
    cursor:
        pointer;
    box-shadow:
        0 5px 15px var(--t-shadow-000000-a15);
    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.profile-banner-change-button:hover {
    background:
        var(--t-surface-26354a-a94);
    transform:
        translateY(-2px);
    box-shadow:
        0 7px 18px var(--t-shadow-000000-a20);
}

.profile-banner-change-button:active {
    transform:
        translateY(0);
}

.profile-banner-change-button:disabled {
    opacity:
        0.6;
    cursor:
        not-allowed;
    transform:
        none;
}


/* ==========================================
   LARGE PROFILE PICTURE
========================================== */

.profile-picture-large {
    position:
        absolute;
    left:
        50%;
    bottom:
        18px;
    transform:
        translateX(-50%);
    width:
        160px;
    height:
        160px;
    background:
        var(--t-surface-ffffff);
    border:
        6px solid var(--t-border-ffffff);
    border-radius:
        50%;
    box-shadow:
        0 8px 25px
        var(--t-shadow-26354a-a20);
    box-sizing:
        border-box;
    overflow:
        hidden;
    z-index:
        20;
    background-size:
        cover;
    background-position:
        center;
    background-repeat:
        no-repeat;
}


/* ==========================================
   PROFILE PICTURE CHANGE BUTTON
========================================== */

.profile-picture-change-button {
    position:
        absolute;
    left:
        50%;
    bottom:
        12px;
    transform:
        translateX(-50%);
    padding:
        8px 15px;
    border:
        1px solid var(--t-border-ffffff-a25);
    border-radius:
        8px;
    background:
        var(--t-surface-26354a-a82);
    backdrop-filter:
        blur(8px);
    color:
        var(--t-text-ffffff);
    font-size:
        12px;
    font-weight:
        600;
    cursor:
        pointer;
    z-index:
        30;
    white-space:
        nowrap;
    box-shadow:
        0 4px 12px var(--t-shadow-000000-a18);
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.profile-picture-change-button:hover {
    background:
        var(--t-surface-26354a-a95);
    transform:
        translateX(-50%)
        translateY(-2px);
}

.profile-picture-change-button:active {
    transform:
        translateX(-50%);
}

.profile-picture-change-button:disabled {
    opacity:
        0.6;
    cursor:
        not-allowed;
}


/* ==========================================
   PROFILE INFORMATION CARD
========================================== */

.profile-info-card {
    width:
        100%;
    padding:
        32px;
    background:
        var(--t-surface-ffffff);
    border:
        1px solid var(--t-border-dce4f0);
    border-radius:
        18px;
    box-shadow:
        0 10px 28px
        var(--t-shadow-26354a-a08);
    box-sizing:
        border-box;
}


/* ==========================================
   PROFILE INFORMATION TITLE
========================================== */

.profile-info-card h2 {
    margin:
        0 0 28px;
    color:
        var(--t-text-26354a);
    font-size:
        22px;
    font-weight:
        700;
    letter-spacing:
        -0.2px;
}


/* ==========================================
   PROFILE FIELD
========================================== */

.profile-field {
    position:
        relative;
    margin-bottom:
        22px;
}

.profile-field label {
    display:
        block;
    margin-bottom:
        8px;
    color:
        var(--t-text-26354a);
    font-size:
        13px;
    font-weight:
        700;
}


/* ==========================================
   PROFILE INPUTS
========================================== */

.profile-field input,
.profile-field textarea {
    width:
        100%;
    padding:
        13px 15px;
    box-sizing:
        border-box;
    border:
        1px solid var(--t-border-d7e0ec);
    border-radius:
        10px;
    background:
        var(--t-surface-f8fafd);
    color:
        var(--t-text-26354a);
    font-size:
        14px;
    font-family:
        inherit;
    outline:
        none;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.profile-field input:hover,
.profile-field textarea:hover {
    border-color:
        var(--t-border-c2cfdf);
}

.profile-field input:focus,
.profile-field textarea:focus {
    background:
        var(--t-surface-ffffff);
    border-color:
        var(--t-border-8fa8c7);
    box-shadow:
        0 0 0 4px
        var(--t-shadow-8fa8c7-a13);
}


/* ==========================================
   READ ONLY PROFILE FIELDS
========================================== */

.profile-field input[readonly] {
    background:
        var(--t-surface-eef2f7);
    color:
        var(--t-text-758196);
    border-color:
        var(--t-border-dee5ef);
    cursor:
        not-allowed;
}


/* ==========================================
   BIO
========================================== */

.profile-field textarea {
    min-height:
        135px;
    line-height:
        1.5;
    resize:
        vertical;
}


/* ==========================================
   BIO COUNTER
========================================== */

.bio-counter {
    margin-top:
        7px;
    text-align:
        right;
    color:
        var(--t-text-8792a2);
    font-size:
        12px;
}


/* ==========================================
   PROFILE SAVE AREA
========================================== */

.profile-save-area {
    display:
        flex;
    align-items:
        center;
    gap:
        14px;
    margin-top:
        6px;
}


/* ==========================================
   SAVE BUTTON
========================================== */

#saveProfileButton {
    padding:
        12px 21px;
    border:
        none;
    border-radius:
        10px;
    background:
        linear-gradient(
            135deg,
            var(--t-surface-26354a),
            var(--t-surface-344966)
        );
    color:
        var(--t-text-ffffff);
    font-size:
        14px;
    font-weight:
        600;
    cursor:
        pointer;
    box-shadow:
        0 5px 14px
        var(--t-shadow-26354a-a16);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

#saveProfileButton:hover {
    transform:
        translateY(-2px);
    box-shadow:
        0 8px 18px
        var(--t-shadow-26354a-a22);
}

#saveProfileButton:active {
    transform:
        translateY(0);
}

#saveProfileButton:disabled {
    opacity:
        0.6;
    cursor:
        not-allowed;
    transform:
        none;
    box-shadow:
        none;
}


/* ==========================================
   SAVE STATUS
========================================== */

#profileSaveStatus {
    font-size:
        13px;
    font-weight:
        500;
}


/* ==========================================
   MINI PROFILE CARD
========================================== */

.chat-profile-card {
    position:
        absolute;
    top:
        calc(100% + 8px);
    left:
        0;
    width:
        300px;
    background:
        var(--t-surface-ffffff);
    border:
        1px solid var(--t-border-dce4f0);
    border-radius:
        16px;
    box-shadow:
        0 16px 35px
        var(--t-shadow-26354a-a18);
    overflow:
        hidden;
    z-index:
        5000;
    font-family:
        Arial, sans-serif;
    animation:
        chatProfileCardAppear 0.16s ease-out;
}

.chat-profile-card.profile-card-right {
    left:
        auto;
    right:
        0;
}

.chat-profile-card-banner {
    position:
        relative;
    width:
        100%;
    height:
        90px;
    background:
        linear-gradient(
            135deg,
            var(--t-surface-eaf2ff),
            var(--t-surface-dcebff)
        );
    background-size:
        cover;
    background-position:
        center;
    background-repeat:
        no-repeat;
}

.chat-profile-card-body {
    position:
        relative;
    padding:
        48px 18px
        18px 18px;
}

.chat-profile-card-picture {
    position:
        absolute;
    top:
        -42px;
    left:
        18px;
    width:
        84px;
    height:
        84px;
    border-radius:
        50%;
    border:
        4px solid var(--t-border-ffffff);
    background:
        var(--t-surface-f3f6fa);
    background-size:
        cover;
    background-position:
        center;
    background-repeat:
        no-repeat;
    box-shadow:
        0 5px 14px
        var(--t-shadow-26354a-a18);
}

.chat-profile-card-name {
    margin:
        0;
    color:
        var(--t-text-26354a);
    font-size:
        19px;
    font-weight:
        700;
    line-height:
        1.2;
    word-break:
        break-word;
}

.chat-profile-card-username {
    margin-top:
        4px;
    color:
        var(--t-text-7b8798);
    font-size:
        12px;
    font-weight:
        600;
}

.chat-profile-card-pronouns {
    margin-top:
        12px;
    color:
        var(--t-text-526175);
    font-size:
        12px;
    font-weight:
        600;
}

.chat-profile-card-bio {
    margin-top:
        10px;
    color:
        var(--t-text-34445a);
    font-size:
        13px;
    line-height:
        1.5;
    white-space:
        pre-wrap;
    word-break:
        break-word;
}

.chat-profile-card-bio.empty {
    color:
        var(--t-text-9aa5b5);
    font-style:
        italic;
}

.chat-profile-card-close {
    position:
        absolute;
    top:
        10px;
    right:
        10px;
    width:
        30px;
    height:
        30px;
    display:
        flex;
    align-items:
        center;
    justify-content:
        center;
    padding:
        0;
    border:
        1px solid var(--t-border-ffffff-a35);
    border-radius:
        50%;
    background:
        var(--t-surface-26354a-a72);
    color:
        var(--t-text-ffffff);
    font-size:
        16px;
    line-height:
        1;
    cursor:
        pointer;
    backdrop-filter:
        blur(6px);
    transition:
        background-color 0.15s ease,
        transform 0.15s ease;
}

.chat-profile-card-close:hover {
    background:
        var(--t-surface-26354a-a92);
    transform:
        scale(1.05);
}

.chat-profile-card-close:active {
    transform:
        scale(0.95);
}

.chat-profile-card-loading {
    padding:
        35px 18px;
    text-align:
        center;
    color:
        var(--t-text-7b8798);
    font-size:
        13px;
}

.chat-profile-card-error {
    padding:
        30px 18px;
    text-align:
        center;
    color:
        var(--t-text-a94442);
    font-size:
        13px;
    line-height:
        1.5;
}

.chat-profile-card-message {
    width:
        100%;
    margin-top:
        18px;
    padding:
        10px 14px;
    border:
        none;
    border-radius:
        10px;
    background:
        linear-gradient(
            135deg,
            var(--t-surface-4a80d8),
            var(--t-surface-315faf)
        );
    color:
        var(--t-text-ffffff);
    font-size:
        13px;
    font-weight:
        600;
    cursor:
        pointer;
}

@keyframes chatProfileCardAppear {
    from {
        opacity:
            0;
        transform:
            translateY(-6px)
            scale(0.98);
    }

    to {
        opacity:
            1;
        transform:
            translateY(0)
            scale(1);
    }
}


/* ==========================================
   CHAT MESSAGE PROFILE PICTURE
========================================== */

.chat-message-avatar {
    position:
        relative;
    width:
        38px;
    height:
        38px;
    flex:
        0 0 38px;
    display:
        flex;
    align-items:
        center;
    justify-content:
        center;
    flex-shrink:
        0;
    border-radius:
        50%;
    overflow:
        hidden;
    background:
        var(--t-surface-e7edf5);
    border:
        2px solid var(--t-border-ffffff);
    box-shadow:
        0 3px 8px
        var(--t-shadow-26354a-a12);
    align-self:
        flex-start;
    transform:
        translateY(-25px);
    margin:
        0;
    user-select:
        none;
}

.chat-message-avatar-image {
    position:
        absolute;
    top:
        0;
    left:
        0;
    width:
        100%;
    height:
        100%;
    display:
        block;
    object-fit:
        cover;
    object-position:
        center;
    border-radius:
        50%;
    max-width:
        none;
    max-height:
        none;
}

.chat-message-avatar-fallback {
    position:
        absolute;
    inset:
        0;
    width:
        100%;
    height:
        100%;
    display:
        flex;
    align-items:
        center;
    justify-content:
        center;
    color:
        var(--t-text-526175);
    font-size:
        14px;
    font-weight:
        700;
    font-family:
        Arial, sans-serif;
    background:
        var(--t-surface-e7edf5);
}


/* ==========================================
   MOBILE ACCOUNT
========================================== */

@media (max-width: 600px) {

    .topbar {
        padding:
            18px 15px 80px;
    }

    .startingtitle {
        font-size:
            28px;
    }

    .account-buttons {
        left:
            15px;
        right:
            15px;
        bottom:
            15px;
        justify-content:
            center;
        gap:
            7px;
    }

    .account-buttons a {
        min-width:
            78px;
        height:
            38px;
        padding:
            0 13px;
        border-radius:
            10px;
        font-size:
            13px;
    }

    .welcome-message {
        height:
            38px;
        padding:
            0 10px;
        font-size:
            12px;
        border-radius:
            10px;
    }

    .profile-button {
        top:
            35px !important;
        right:
            310px !important;
        width:
            46px !important;
        height:
            46px !important;
    }

    .chat-notification-center {
        top:
            18px;
        right:
            15px;
    }

    .chat-notification-panel {
        top:
            54px;
        right:
            0;
        width:
            min(340px, calc(100vw - 30px));
    }

}


/* ==========================================
   MOBILE PROFILE
========================================== */

@media (max-width: 700px) {

    .profile-page {
        margin-top:
            35px;
        padding:
            0 15px;
    }

    .profile-page h1 {
        font-size:
            28px;
        margin-bottom:
            22px;
    }

    .profile-banner {
        height:
            220px;
        border-radius:
            16px;
    }

    .profile-picture-large {
        width:
            130px;
        height:
            130px;
        border-width:
            5px;
    }

    .profile-info-card {
        padding:
            23px 20px;
        border-radius:
            15px;
    }

    .profile-info-card h2 {
        font-size:
            20px;
    }

    .profile-save-area {
        align-items:
            flex-start;
        flex-direction:
            column;
    }

}


/* ==========================================
   MOBILE CHAT
========================================== */

@media (max-width: 800px) {

    .chat-container {
        width:
            calc(100% - 25px);
    }

    .chat-users-sidebar {
        width:
            175px;
    }

    .private-conversations-sidebar {
        width:
            205px;
    }

}

@media (max-width: 600px) {

    .chat-container {
        width:
            calc(100% - 20px);
        height:
            calc(100vh - 100px);
        margin:
            20px auto;
        border-radius:
            16px;
    }

    .chat-header {
        padding:
            18px;
    }

    .chat-header-actions {
        gap:
            7px;
    }

    .chat-status {
        font-size:
            11px;
    }

    .leave-group-button {
        min-height:
            32px;
        padding:
            0 10px;
        font-size:
            10px;
    }

    .chat-messages {
        padding:
            16px;
    }

    .chat-message {
        max-width:
            85%;
    }

    .chat-form {
        padding:
            12px;
    }

    .chat-form button {
        padding:
            0 16px;
    }

    .delete-message-button {
        width:
            30px;
        height:
            30px;
    }

    .chat-body {
        flex-direction:
            column;
    }

    .private-conversations-sidebar {
        width:
            100%;
        height:
            180px;
        flex:
            0 0 180px;
        border-right:
            none;
        border-bottom:
            1px solid var(--t-border-e3e9f2);
    }

    .private-conversations-header {
        padding:
            10px 12px 8px;
    }

    .private-conversations-section {
        min-height:
            0;
    }

    .group-conversations-section {
        max-height:
            none;
        flex:
            0 0 75px;
    }

    .private-conversations-list,
    .group-conversations-list {
        overflow-x:
            auto;
        overflow-y:
            hidden;
    }

    .private-conversations-list {
        display:
            flex;
        gap:
            6px;
        padding:
            4px 8px 8px;
    }

    .private-conversation-row {
        flex:
            0 0 175px;
    }

    .private-conversation-item {
        padding:
            7px 8px;
    }

    .private-conversation-delete {
        flex:
            0 0 26px;
        width:
            26px;
        height:
            26px;
    }

    .group-conversations-list {
        display:
            flex;
            gap:
            6px;
        padding:
            0 8px 8px;
    }

    .group-conversation-row {
        flex:
            0 0 175px;
    }

    .group-conversations-empty {
        padding:
            8px;
    }

    .chat-users-sidebar {
        width:
            100%;
        height:
            120px;
        flex-shrink:
            0;
        border-left:
            none;
        border-top:
            1px solid var(--t-border-e3e9f2);
    }

    .chat-users-header {
        padding:
            10px 14px;
    }

    .online-users-list {
        display:
            flex;
        gap:
            6px;
        padding:
            6px 10px;
        overflow-x:
            auto;
        overflow-y:
            hidden;
    }

    .online-user {
        flex-shrink:
            0;
        min-width:
            110px;
    }

    .chat-audio {
        width:
            100%;
    }

    .emoji-picker-container {
        left:
            10px;
        right:
            10px;
        bottom:
            80px;
    }

    emoji-picker {
        width:
            100%;
        height:
            400px;
    }

    .delete-modal {
        padding:
            15px;
    }

    .delete-modal-content {
        padding:
            24px;
        border-radius:
            14px;
    }

    .delete-modal-buttons {
        flex-direction:
            column-reverse;
    }

    .delete-modal-buttons button {
        width:
            100%;
    }

    .create-group-modal {
        padding:
            12px;
    }

    .create-group-modal-content {
        max-height:
            calc(100vh - 24px);
        border-radius:
            15px;
    }

    .create-group-modal-header {
        padding:
            18px 17px 14px;
    }

    .create-group-form {
        padding:
            15px 17px;
    }

    .create-group-users {
        max-height:
            240px;
    }

    .create-group-modal-buttons {
        padding:
            13px 17px 17px;
    }

}


/* ==========================================
   VERY SMALL SCREENS
========================================== */

@media (max-width: 430px) {

    .chat-header {
        align-items:
            flex-start;
    }

    .chat-header-actions {
        flex-direction:
            column;
        align-items:
            flex-end;
    }

    .chat-header h2 {
        font-size:
            19px;
    }

    .chat-header p {
        font-size:
            11px;
    }

    .create-group-button {
        padding:
            0 7px;
        font-size:
            9px;
    }

    .chat-notification-panel {
        width:
            calc(100vw - 20px);
        right:
            -5px;
    }

}



/* ==========================================
   GROUP ADMIN
========================================== */

:root {
    --gs-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --gs-owner: #B7861A;
    --gs-owner-bg: #FFF4D6;
    --gs-switch-off: #CBD5E1;
}

:root[data-theme="dark"] {
    --gs-owner: #E9C25A;
    --gs-owner-bg: rgba(229, 184, 63, 0.14);
    --gs-switch-off: #4A5361;
}

.group-icon {
    display: block;
    flex-shrink: 0;
}

@keyframes gs-fade-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes gs-pop-in {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes gs-spin {
    to {
        transform: rotate(360deg);
    }
}


/* ---------- Header settings button ---------- */

.group-settings-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 9px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-526175);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.group-settings-button .group-icon {
    transition: transform 0.6s var(--gs-ease);
}

.group-settings-button:hover {
    background: var(--t-surface-eaf2ff);
    border-color: var(--t-border-3f72c5);
    color: var(--t-text-3f72c5);
}

.group-settings-button:hover .group-icon {
    transform: rotate(90deg);
}


/* ---------- Role badges ---------- */

.group-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 6px;
    padding: 1px 7px 1px 5px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 16px;
    vertical-align: middle;
}

.group-role-owner {
    background: var(--gs-owner-bg);
    color: var(--gs-owner);
}

.group-role-admin {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.chat-message.own-message .group-role-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}


/* ---------- System messages ---------- */

.chat-system-message {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 85%;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--t-surface-eef2f7);
    color: var(--t-text-526175);
    font-size: 12px;
    text-align: center;
    animation: gs-pop-in 0.4s var(--gs-ease) both;
}

.chat-system-time {
    color: var(--t-text-9aa5b5);
    font-size: 11px;
    white-space: nowrap;
}


/* ---------- Locked composer ---------- */

.chat-form.composer-locked input,
.chat-form.composer-slowmode input {
    cursor: not-allowed;
    background: var(--t-surface-f3f6fa);
}

.chat-form .send-button:disabled,
.chat-form .options-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.option-item.option-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}


/* ---------- Toasts ---------- */

.chat-toast-container {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 100001;
    pointer-events: none;
}

.chat-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 11px 16px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 12px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    box-shadow: 0 12px 32px var(--t-shadow-26354a-a25);
    font-size: 13.5px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(14px) scale(0.96);
    transition:
        opacity 0.3s ease,
        transform 0.4s var(--gs-ease);
}

.chat-toast.visible {
    opacity: 1;
    transform: none;
}

.chat-toast-error .group-icon {
    color: var(--t-text-d93636);
}

.chat-toast-success .group-icon {
    color: var(--t-text-39a96b);
}

.chat-toast-info .group-icon {
    color: var(--t-text-3f72c5);
}


/* ---------- Confirm dialog ---------- */

.confirm-dialog {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.confirm-dialog .delete-modal-content {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transition:
        transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2),
        opacity 0.2s ease;
}

.confirm-dialog.visible .delete-modal-content {
    opacity: 1;
    transform: none;
}

.confirm-dialog-icon {
    color: var(--t-text-d93636);
}

.confirm-dialog.confirm-dialog-safe .confirm-dialog-icon {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.confirm-dialog.confirm-dialog-safe .delete-modal-confirm {
    background: var(--t-surface-3f72c5);
}

.confirm-dialog.confirm-dialog-safe .delete-modal-confirm:hover {
    background: var(--t-surface-315faf);
}


/* ---------- Drawer ---------- */

.group-settings-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: var(--t-surface-26354a-a55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.group-settings-overlay.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.group-settings-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(430px, 100vw);
    display: flex;
    flex-direction: column;
    background: var(--t-surface-ffffff);
    box-shadow: -18px 0 48px var(--t-shadow-26354a-a25);
    transform: translateX(104%);
    transition: transform 0.45s var(--gs-ease);
    box-sizing: border-box;
}

.group-settings-overlay.visible .group-settings-drawer {
    transform: translateX(0);
}

.gs-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 20px 16px;
}

.gs-group-avatar {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    box-shadow: 0 6px 16px var(--t-shadow-3f72c5-a25);
    color: #FFFFFF;
    font-size: 21px;
    font-weight: 800;
}

.gs-heading {
    flex: 1;
    min-width: 0;
}

.gs-title {
    margin: 0;
    color: var(--t-text-26354a);
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gs-subtitle {
    margin: 3px 0 0;
    color: var(--t-text-7b8798);
    font-size: 12.5px;
}

.gs-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    padding: 0;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--t-text-7b8798);
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease;
}

.gs-icon-button:hover {
    background: var(--t-surface-eef2f7);
    color: var(--t-text-26354a);
}

.gs-icon-button:active {
    transform: scale(0.9);
}

.gs-icon-button.gs-icon-danger:hover {
    background: var(--t-surface-fff5f5);
    color: var(--t-text-d93636);
}

.gs-icon-button:focus-visible,
.gs-tab:focus-visible,
.gs-button:focus-visible,
.gs-action-card:focus-visible,
.gs-segment:focus-visible {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 2px;
}


/* ---------- Tabs ---------- */

.gs-tabs {
    position: relative;
    display: flex;
    gap: 4px;
    margin: 0 20px;
    padding: 4px;
    border-radius: 12px;
    background: var(--t-surface-f3f6fa);
}

.gs-tab {
    position: relative;
    z-index: 1;
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 6px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--t-text-7b8798);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.25s ease;
}

.gs-tab:hover,
.gs-tab.active {
    color: var(--t-text-26354a);
}

.gs-tab-count {
    min-width: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--t-surface-e5ebf4);
    font-size: 11px;
    line-height: 18px;
    box-sizing: border-box;
}

.gs-tab-indicator {
    position: absolute;
    z-index: 0;
    top: 4px;
    bottom: 4px;
    left: 0;
    width: 0;
    border-radius: 9px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 2px 8px var(--t-shadow-26354a-a10);
    transition:
        transform 0.4s var(--gs-ease),
        width 0.4s var(--gs-ease);
}


/* ---------- Body & sections ---------- */

.gs-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px 20px 24px;
}

.gs-body.gs-body-enter > * {
    animation: gs-fade-up 0.35s var(--gs-ease) both;
}

.gs-body.gs-body-enter .gs-stagger {
    animation: gs-fade-up 0.4s var(--gs-ease) both;
    animation-delay: calc(var(--i, 0) * 35ms + 60ms);
}

.gs-section {
    margin-bottom: 20px;
}

.gs-section-title {
    margin: 0 0 8px;
    color: var(--t-text-9aa5b5);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gs-section-desc {
    margin: -4px 0 10px;
    color: var(--t-text-7b8798);
    font-size: 12.5px;
}

.gs-label {
    display: block;
    margin-bottom: 6px;
    color: var(--t-text-526175);
    font-size: 12px;
    font-weight: 700;
}

.gs-name-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.gs-input {
    flex: 1;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.gs-input:focus {
    border-color: var(--t-border-3f72c5);
    background: var(--t-surface-ffffff);
    box-shadow: 0 0 0 3px var(--t-shadow-3f72c5-a20);
}


/* ---------- Buttons ---------- */

.gs-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border: none;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.gs-button:active:not(:disabled) {
    transform: scale(0.97);
}

.gs-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gs-button-primary {
    background: var(--t-surface-3f72c5);
    color: #FFFFFF;
    box-shadow: 0 4px 12px var(--t-shadow-3f72c5-a25);
}

.gs-button-primary:hover:not(:disabled) {
    background: var(--t-surface-315faf);
}

.gs-button-danger {
    background: var(--t-surface-e74c3c);
    color: #FFFFFF;
}

.gs-button-danger:hover {
    background: var(--t-surface-d63c2e);
}


/* ---------- Overview ---------- */

.gs-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.gs-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px;
    border: 1px solid var(--t-border-e3e9f2);
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
}

.gs-stat-value {
    color: var(--t-text-26354a);
    font-size: 20px;
    font-weight: 800;
}

.gs-stat-small {
    font-size: 13px;
    line-height: 24px;
}

.gs-stat-label {
    color: var(--t-text-7b8798);
    font-size: 11.5px;
    font-weight: 600;
}

.gs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gs-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    font-size: 12px;
    font-weight: 600;
}

.gs-action-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 8px;
    padding: 12px;
    border: 1px solid var(--t-border-e3e9f2);
    border-radius: 12px;
    background: var(--t-surface-ffffff);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.25s var(--gs-ease),
        box-shadow 0.2s ease;
}

.gs-action-card:hover {
    background: var(--t-surface-f7f9fc);
    box-shadow: 0 4px 14px var(--t-shadow-26354a-a10);
    transform: translateX(3px);
}

.gs-action-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.gs-action-icon-blue {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.gs-action-icon-red {
    background: var(--t-surface-fff5f5);
    color: var(--t-text-d93636);
}

.gs-action-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.gs-action-title {
    color: var(--t-text-26354a);
    font-size: 14px;
    font-weight: 700;
}

.gs-action-desc {
    color: var(--t-text-7b8798);
    font-size: 12.5px;
    line-height: 1.4;
}

.gs-danger-zone {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--t-border-e2c7c7);
    border-radius: 12px;
    background: var(--t-surface-fff5f5);
}

.gs-danger-zone .gs-action-title {
    color: var(--t-text-d93636);
}


/* ---------- Members & invites ---------- */

.gs-search {
    position: relative;
    margin-bottom: 12px;
}

.gs-search .group-icon {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: var(--t-text-9aa5b5);
    pointer-events: none;
}

.gs-search .gs-input {
    padding-left: 36px;
}

.gs-member-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gs-member {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 12px;
    transition: background-color 0.2s ease;
}

.gs-member:hover {
    background: var(--t-surface-f7f9fc);
}

.gs-member-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
}

.gs-member-avatar .chat-message-avatar {
    transform: none;
}

.gs-member-info {
    flex: 1;
    min-width: 0;
}

.gs-member-name {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    color: var(--t-text-26354a);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gs-you {
    padding: 0 6px;
    border-radius: 6px;
    background: var(--t-surface-eef2f7);
    color: var(--t-text-7b8798);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 16px;
}

.gs-member-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 3px;
}

.gs-member-tags:empty {
    display: none;
}

.gs-member-tags .group-role-badge {
    margin-left: 0;
}

.gs-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px 1px 5px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
}

.gs-tag-muted {
    background: var(--t-surface-fff5f5);
    color: var(--t-text-d93636);
}

.gs-member-actions {
    display: flex;
    gap: 2px;
    opacity: 0.55;
    transition: opacity 0.2s ease;
}

.gs-member:hover .gs-member-actions,
.gs-member-actions:focus-within {
    opacity: 1;
}

@media (hover: none) {

    .gs-member-actions {
        opacity: 1;
    }

}

.gs-invite-row {
    cursor: pointer;
}

.gs-invite-row:has(.gs-invite-check:checked) {
    background: var(--t-surface-f0f5ff);
}

.gs-invite-check {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gs-checkmark {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 2px solid var(--t-border-dce4f0);
    border-radius: 7px;
    color: transparent;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gs-invite-check:checked + .gs-checkmark {
    background: var(--t-surface-3f72c5);
    border-color: var(--t-border-3f72c5);
    color: #FFFFFF;
    transform: scale(1.08);
}

.gs-invite-check:focus-visible + .gs-checkmark {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 2px;
}

.gs-subheader {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.gs-sticky-footer {
    position: sticky;
    bottom: -24px;
    margin: 16px -20px -24px;
    padding: 14px 20px 20px;
    background: linear-gradient(to bottom, transparent, var(--t-surface-ffffff) 30%);
}

.gs-sticky-footer .gs-button {
    width: 100%;
}


/* ---------- Permissions ---------- */

.gs-toggle-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    padding: 12px;
    border: 1px solid var(--t-border-e3e9f2);
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.gs-toggle-row:hover {
    background: var(--t-surface-f7f9fc);
}

.gs-toggle-row.gs-disabled {
    cursor: default;
    opacity: 0.7;
}

.gs-toggle-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: var(--t-surface-eef2f7);
    color: var(--t-text-526175);
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
}

.gs-toggle-row:has(.gs-switch-input:checked) .gs-toggle-icon {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.gs-toggle-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gs-switch-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gs-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 42px;
    border-radius: 999px;
    background: var(--gs-switch-off);
    transition: background-color 0.3s ease;
}

.gs-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #FFFFFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition:
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        width 0.2s ease;
}

.gs-switch-input:checked + .gs-switch {
    background: var(--t-surface-3f72c5);
}

.gs-switch-input:checked + .gs-switch::after {
    transform: translateX(18px);
}

/* Knob stretches while pressed */
.gs-toggle-row:not(.gs-disabled):active .gs-switch::after {
    width: 22px;
}

.gs-toggle-row:not(.gs-disabled):active .gs-switch-input:checked + .gs-switch::after {
    transform: translateX(14px);
}

.gs-switch-input:focus-visible + .gs-switch {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 2px;
}

.gs-segmented {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--count), 1fr);
    padding: 4px;
    border-radius: 12px;
    background: var(--t-surface-f3f6fa);
}

.gs-segment-highlight {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc((100% - 8px) / var(--count));
    border-radius: 9px;
    background: var(--t-surface-3f72c5);
    box-shadow: 0 4px 12px var(--t-shadow-3f72c5-a25);
    transform: translateX(calc(100% * var(--index)));
    transition: transform 0.4s var(--gs-ease);
}

.gs-segment {
    position: relative;
    z-index: 1;
    padding: 8px 0;
    border: none;
    background: transparent;
    color: var(--t-text-526175);
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.3s ease;
}

.gs-segment.active {
    color: #FFFFFF;
}

.gs-segmented.gs-disabled .gs-segment {
    cursor: default;
}

.gs-segmented.gs-disabled {
    opacity: 0.7;
}


/* ---------- Notices ---------- */

.gs-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--t-surface-fff9e8);
    color: var(--t-text-526175);
    font-size: 13px;
    font-weight: 600;
}

.gs-footnote {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 14px 2px 0;
    color: var(--t-text-9aa5b5);
    font-size: 12px;
}

.gs-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 28px 10px;
    color: var(--t-text-7b8798);
    font-size: 13px;
    text-align: center;
}

.gs-spinner {
    width: 16px;
    height: 16px;
    box-sizing: border-box;
    border: 2px solid var(--t-border-dce4f0);
    border-top-color: var(--t-border-3f72c5);
    border-radius: 50%;
    animation: gs-spin 0.8s linear infinite;
}


/* ---------- Small screens & reduced motion ---------- */

@media (max-width: 480px) {

    .gs-tab .group-icon {
        display: none;
    }

    .gs-header {
        padding: 18px 16px 14px;
    }

    .gs-tabs {
        margin: 0 16px;
    }

    .gs-body {
        padding: 16px 16px 24px;
    }

    .gs-sticky-footer {
        margin: 16px -16px -24px;
        padding: 14px 16px 20px;
    }

    .gs-stats {
        gap: 8px;
    }

}

@media (prefers-reduced-motion: reduce) {

    .group-settings-drawer,
    .gs-tab-indicator,
    .gs-segment-highlight,
    .gs-switch::after,
    .chat-toast,
    .confirm-dialog .delete-modal-content {
        transition-duration: 0.01ms !important;
    }

    .gs-body-enter *,
    .chat-system-message {
        animation: none !important;
    }

}


/* ==========================================
   LANGUAGE PICKER
========================================== */

.language-picker {
    position: fixed;
    top: 20px;
    left: 137px;
    z-index: 9000;
    font-family: Arial, sans-serif;
}

.language-toggle {
    position: relative;
    width: 46px;
    height: 46px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    border: 2px solid var(--t-border-dce4f0);
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px var(--t-shadow-26354a-a12);
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.language-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--t-shadow-26354a-a16);
}

.language-toggle:active {
    transform: scale(0.94);
}

.language-toggle:focus-visible,
.language-option:focus-visible {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 2px;
}

.language-toggle-icon {
    width: 22px;
    height: 22px;
    color: var(--t-text-3f72c5);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.language-toggle:hover .language-toggle-icon,
.language-picker.open .language-toggle-icon {
    transform: rotate(-25deg);
}

/* Small language code badge in the corner */
.language-toggle-code {
    position: absolute;
    right: -6px;
    bottom: -6px;
    min-width: 20px;
    padding: 0 4px;
    box-sizing: border-box;
    border-radius: 6px;
    background: var(--t-surface-3f72c5);
    color: #FFFFFF;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 2px 6px var(--t-shadow-3f72c5-a25);
}

.language-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 180px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--t-surface-ffffff);
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 12px;
    box-shadow: 0 14px 36px var(--t-shadow-26354a-a25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.96);
    transform-origin: top left;
    transition:
        opacity 0.2s ease,
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.2s ease;
}

.language-picker.open .language-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--t-text-26354a);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.language-option:hover {
    background: var(--t-surface-f3f6fa);
}

.language-option.active {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.language-option-code {
    min-width: 28px;
    padding: 2px 0;
    border-radius: 6px;
    background: var(--t-surface-eef2f7);
    color: var(--t-text-526175);
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.language-option.active .language-option-code {
    background: var(--t-surface-3f72c5);
    color: #FFFFFF;
}

.language-option-label {
    flex: 1;
}

.language-option-check {
    width: 16px;
    height: 16px;
    opacity: 0;
    transform: scale(0.5);
    transition:
        opacity 0.2s ease,
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.language-option.active .language-option-check {
    opacity: 1;
    transform: scale(1);
}

/* Fade out before reloading, fade back in afterwards */
:root.language-switching body {
    opacity: 0;
    transform: translateY(4px);
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

:root.language-fade-in body {
    animation: language-fade-in 0.45s ease both;
}

@keyframes language-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 600px) {

    .language-picker {
        top: 15px;
        left: 119px;
    }

    .language-toggle {
        width: 42px;
        height: 42px;
    }

}

@media (prefers-reduced-motion: reduce) {

    .language-menu,
    .language-toggle-icon,
    .language-option-check {
        transition-duration: 0.01ms !important;
    }

    :root.language-fade-in body {
        animation: none;
    }

}


/* ==========================================
   BLOCKING (CHAT)
========================================== */

.chat-profile-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

.chat-profile-card-actions .chat-profile-card-message {
    flex: 1;
    width: auto;
    margin-top: 0;
}

.chat-profile-card-block {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border: 1px solid var(--t-border-e2c7c7);
    border-radius: 10px;
    background: var(--t-surface-fff5f5);
    color: var(--t-text-d93636);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.15s ease;
}

.chat-profile-card-block:hover {
    background: var(--t-surface-ffe8e8);
}

.chat-profile-card-block:active {
    transform: scale(0.96);
}

/* Unblock fills the row on its own */
.chat-profile-card-block.is-blocked {
    flex: 1;
    border-color: var(--t-border-dce4f0);
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-526175);
}

.chat-profile-card-block.is-blocked:hover {
    background: var(--t-surface-e5ebf4);
}

/* Collapsed message from a blocked user */
.blocked-message-cover {
    display: none;
    align-items: center;
    gap: 8px;
    color: var(--t-text-9aa5b5);
    font-size: 12.5px;
    font-style: italic;
}

.chat-message-row.blocked-message .blocked-message-cover {
    display: flex;
}

.chat-message-row.blocked-message:not(.revealed) .chat-message > :not(.blocked-message-cover) {
    display: none;
}

.chat-message-row.blocked-message:not(.revealed) .chat-message {
    background: var(--t-surface-f3f6fa);
    border-style: dashed;
    box-shadow: none;
}

.chat-message-row.blocked-message:not(.revealed) .chat-message-avatar {
    opacity: 0.4;
    filter: grayscale(1);
}

.chat-message-row.blocked-message.revealed .blocked-message-cover {
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--t-border-dce4f0);
}

.chat-message-row.blocked-message.revealed .chat-message > :not(.blocked-message-cover) {
    animation: gs-fade-up 0.3s var(--gs-ease) both;
}

.blocked-message-toggle {
    padding: 2px 9px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 999px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-3f72c5);
    font-size: 11.5px;
    font-weight: 700;
    font-style: normal;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.blocked-message-toggle:hover {
    background: var(--t-surface-eaf2ff);
}


/* ==========================================
   BLOCKED USERS (PROFILE PAGE)
========================================== */

.blocked-users-card {
    margin-top: 24px;
}

.blocked-users-description {
    margin: -6px 0 20px;
    color: var(--t-text-7b8798);
    font-size: 14px;
    line-height: 1.5;
}

.blocked-users-search {
    position: relative;
    margin-bottom: 18px;
}

.blocked-users-label {
    display: block;
    margin-bottom: 8px;
    color: var(--t-text-526175);
    font-size: 13px;
    font-weight: 700;
}

.blocked-users-search input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.blocked-users-search input:focus {
    border-color: var(--t-border-3f72c5);
    box-shadow: 0 0 0 3px var(--t-shadow-3f72c5-a20);
}

.blocked-search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 20;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--t-surface-ffffff);
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 12px;
    box-shadow: 0 14px 34px var(--t-shadow-26354a-a16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition:
        opacity 0.2s ease,
        transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.2s ease;
}

.blocked-search-results.visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.blocked-users-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.blocked-user,
.blocked-search-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    overflow: hidden;
}

.blocked-user {
    border: 1px solid var(--t-border-e3e9f2);
    background: var(--t-surface-f7f9fc);
    transition:
        height 0.3s ease,
        opacity 0.25s ease,
        transform 0.3s ease,
        padding 0.3s ease,
        margin 0.3s ease;
}

.blocked-user.entering {
    animation: gs-fade-up 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.blocked-user.leaving {
    height: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: -8px;
    opacity: 0;
    transform: translateX(16px);
}

.blocked-search-result:hover {
    background: var(--t-surface-f3f6fa);
}

.blocked-user-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--t-surface-e7edf5);
    background-size: cover;
    background-position: center;
    color: var(--t-text-526175);
    font-weight: 800;
}

.blocked-user-info {
    flex: 1;
    min-width: 0;
}

.blocked-user-name {
    overflow: hidden;
    color: var(--t-text-26354a);
    font-size: 14.5px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.blocked-user-username {
    margin-top: 2px;
    color: var(--t-text-7b8798);
    font-size: 12.5px;
    font-weight: 500;
}

.blocked-user-unblock,
.blocked-search-block {
    padding: 8px 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.15s ease;
}

.blocked-user-unblock {
    border: 1px solid var(--t-border-dce4f0);
    background: var(--t-surface-ffffff);
    color: var(--t-text-526175);
}

.blocked-user-unblock:hover {
    background: var(--t-surface-eef2f7);
}

.blocked-search-block {
    border: 1px solid var(--t-border-e2c7c7);
    background: var(--t-surface-fff5f5);
    color: var(--t-text-d93636);
}

.blocked-search-block:hover {
    background: var(--t-surface-ffe8e8);
}

.blocked-user-unblock:active,
.blocked-search-block:active {
    transform: scale(0.95);
}

.blocked-users-empty,
.blocked-search-empty {
    padding: 18px;
    color: var(--t-text-9aa5b5);
    font-size: 14px;
    text-align: center;
}

.blocked-users-empty {
    border: 1px dashed var(--t-border-dce4f0);
    border-radius: 12px;
}

.blocked-users-error {
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--t-surface-fff5f5);
    color: var(--t-text-d93636);
    font-size: 13px;
    font-weight: 600;
    animation: gs-fade-up 0.3s ease both;
}


/* ==========================================
   GROUP PICTURES
========================================== */

.group-conversation-icon.has-picture,
.gs-group-avatar.has-picture,
.chat-header-group-avatar.has-picture {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: transparent;
}

/* Chat header avatar (only while a group is open) */
.chat-header-group-avatar {
    display: none;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    margin-right: -4px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 14px;
    background-color: var(--t-surface-3f72c5);
    background-image: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    color: #FFFFFF;
    font-size: 19px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--t-shadow-3f72c5-a25);
    transition:
        transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.2s ease;
}

.chat-header.has-group-avatar .chat-header-group-avatar {
    display: inline-flex;
    animation: gs-pop-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.chat-header-group-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px var(--t-shadow-3f72c5-a30);
}

.chat-header-group-avatar:focus-visible {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 2px;
}

/* Settings drawer avatar */
.gs-group-avatar {
    position: relative;
    overflow: hidden;
    background-color: var(--t-surface-3f72c5);
}

.gs-group-avatar.editable {
    cursor: pointer;
}

.gs-avatar-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--pa-rgb-0f172a, 15, 23, 42), 0.5);
    color: #FFFFFF;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gs-group-avatar.editable:hover .gs-avatar-overlay {
    opacity: 1;
}

.gs-group-avatar.uploading::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: gs-spin 0.8s linear infinite;
}

.gs-group-avatar.uploading .gs-avatar-overlay {
    opacity: 1;
}

.gs-group-avatar.uploading .gs-avatar-overlay .group-icon {
    opacity: 0;
}

.gs-picture-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.gs-button-secondary {
    border: 1px solid var(--t-border-dce4f0);
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
}

.gs-button-secondary:hover {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.gs-button-ghost-danger {
    border: 1px solid transparent;
    background: transparent;
    color: var(--t-text-d93636);
}

.gs-button-ghost-danger:hover {
    background: var(--t-surface-fff5f5);
    border-color: var(--t-border-e2c7c7);
}


/* ==========================================
   CALCULATOR
========================================== */

:root {
    --calc-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --calc-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

.calc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
    max-width: 1060px;
    margin: 30px auto 60px;
    padding: 0 25px;
    box-sizing: border-box;
}

.calc-card,
.calc-history {
    background: var(--t-surface-ffffff);
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 22px;
    box-shadow: 0 14px 36px var(--t-shadow-26354a-a10);
    animation: gs-fade-up 0.5s var(--calc-ease) both;
}

.calc-card {
    padding: 22px;
}

.calc-history {
    position: sticky;
    top: 24px;
    padding: 20px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    animation-delay: 0.08s;
}


/* ---------- Display ---------- */

.calc-display {
    padding: 16px 20px 14px;
    border-radius: 16px;
    background: linear-gradient(160deg, var(--t-surface-f4f7fc), var(--t-surface-eaf2ff));
    border: 1px solid var(--t-border-e3e9f2);
    text-align: right;
    overflow: hidden;
}

.calc-display.shake {
    animation: calc-shake 0.4s ease;
}

@keyframes calc-shake {
    20% { transform: translateX(-6px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(2px); }
}

.calc-display-top {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
}

.calc-badge {
    padding: 1px 7px;
    border-radius: 6px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-3f72c5);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.calc-badge-memory {
    opacity: 0;
    transform: scale(0.6);
    transition:
        opacity 0.2s ease,
        transform 0.3s var(--calc-spring);
}

.calc-badge-memory.visible {
    opacity: 1;
    transform: none;
}

.calc-previous {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: var(--t-text-7b8798);
    font-size: 15px;
    white-space: nowrap;
    text-overflow: ellipsis;
    direction: rtl;
    text-align: right;
}

.calc-expression {
    margin-top: 6px;
    overflow-x: auto;
    color: var(--t-text-26354a);
    font-size: 44px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    white-space: nowrap;
    scrollbar-width: none;
    transition: font-size 0.2s ease;
}

.calc-expression::-webkit-scrollbar {
    display: none;
}

.calc-expression.is-long {
    font-size: 32px;
}

.calc-expression.is-very-long {
    font-size: 24px;
}

.calc-expression.result-in {
    animation: calc-result-in 0.4s var(--calc-ease);
}

@keyframes calc-result-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
}

.calc-preview-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-height: 28px;
}

.calc-preview {
    color: var(--t-text-9aa5b5);
    font-size: 17px;
    font-variant-numeric: tabular-nums;
}

.calc-preview.is-error {
    color: var(--t-text-d93636);
    font-weight: 600;
}

.calc-copy {
    position: relative;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--t-text-7b8798);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
    transition:
        opacity 0.2s ease,
        transform 0.25s var(--calc-spring),
        background-color 0.15s ease;
}

.calc-copy.visible {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.calc-copy:hover {
    background: var(--t-surface-ffffff);
    color: var(--t-text-3f72c5);
}

.calc-copy svg {
    position: absolute;
    inset: 6px;
    width: 18px;
    height: 18px;
    transition:
        opacity 0.2s ease,
        transform 0.3s var(--calc-spring);
}

.calc-copied-icon {
    color: var(--t-text-39a96b);
    opacity: 0;
    transform: scale(0.4);
}

.calc-copy.copied .calc-copy-icon {
    opacity: 0;
    transform: scale(0.4);
}

.calc-copy.copied .calc-copied-icon {
    opacity: 1;
    transform: none;
}


/* ---------- Toolbar ---------- */

.calc-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 14px;
    flex-wrap: wrap;
}

.calc-toggle {
    padding: 8px 14px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-526175);
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
}

.calc-toggle.active {
    border-color: var(--t-border-3f72c5);
    background: var(--t-surface-3f72c5);
    color: #FFFFFF;
}

.calc-angle {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 3px;
    border-radius: 10px;
    background: var(--t-surface-f3f6fa);
}

.calc-angle-highlight {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
    border-radius: 8px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 2px 6px var(--t-shadow-26354a-a10);
    transition: transform 0.35s var(--calc-ease);
}

.calc-angle.is-rad .calc-angle-highlight {
    transform: translateX(100%);
}

.calc-angle-option {
    position: relative;
    z-index: 1;
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: var(--t-text-7b8798);
    font-size: 12px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s ease;
}

.calc-angle-option.active {
    color: var(--t-text-3f72c5);
}

.calc-memory-keys {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.calc-mini {
    padding: 7px 9px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--t-text-7b8798);
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.calc-mini:hover {
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-3f72c5);
}


/* ---------- Keys ---------- */

.calc-keypad {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.calc-keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    align-content: start;
}

.calc-key {
    position: relative;
    min-height: 54px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--t-border-e3e9f2);
    border-radius: 14px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    font-size: 20px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 2px 0 var(--t-shadow-26354a-a08);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition:
        background-color 0.15s ease,
        transform 0.12s ease,
        box-shadow 0.12s ease;
}

.calc-key:hover {
    background: var(--t-surface-f7f9fc);
}

.calc-key:active,
.calc-key.pressed {
    transform: translateY(1px) scale(0.96);
    box-shadow: none;
}

/* Soft flash on press */
.calc-key::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.calc-key:active::after,
.calc-key.pressed::after {
    opacity: 0.1;
    transition: none;
}

.calc-key:focus-visible,
.calc-toggle:focus-visible,
.calc-angle-option:focus-visible,
.calc-mini:focus-visible {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 2px;
}

.calc-key svg {
    width: 24px;
    height: 24px;
}

.calc-keys-scientific .calc-key {
    min-height: 46px;
    font-size: 15px;
}

.calc-key-fn {
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-526175);
}

.calc-key-fn:hover {
    background: var(--t-surface-e7edf5);
}

.calc-key-op {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    font-size: 23px;
}

.calc-key-op:hover {
    background: var(--t-surface-dcebff);
}

.calc-key-clear {
    background: var(--t-surface-fff5f5);
    color: var(--t-text-d93636);
    font-size: 17px;
    font-weight: 800;
}

.calc-key-clear:hover {
    background: var(--t-surface-ffe8e8);
}

.calc-key-equals {
    border-color: transparent;
    background: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    color: #FFFFFF;
    font-size: 26px;
    box-shadow: 0 6px 16px var(--t-shadow-3f72c5-a30);
}

.calc-key-equals:hover {
    background: linear-gradient(135deg, var(--t-surface-568be0), var(--t-surface-396bc0));
}

.calc-key-wide {
    grid-column: span 2;
}

/* 2nd swaps labels with a quick flip */
.calc-label {
    display: inline-block;
    transition:
        opacity 0.12s ease,
        transform 0.12s ease;
}

.calc-label.swapping {
    opacity: 0;
    transform: translateY(-6px);
}


/* ---------- History ---------- */

.calc-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.calc-history-header h2 {
    margin: 0;
    color: var(--t-text-26354a);
    font-size: 18px;
}

.calc-history-clear {
    width: 34px;
    height: 34px;
    padding: 7px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--t-text-7b8798);
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.calc-history-clear:hover:not(:disabled) {
    background: var(--t-surface-fff5f5);
    color: var(--t-text-d93636);
}

.calc-history-clear:disabled {
    opacity: 0.35;
    cursor: default;
}

.calc-history-list {
    flex: 1;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.calc-history-list li.entering {
    animation: calc-history-in 0.4s var(--calc-ease) both;
}

.calc-history-list li.leaving {
    animation: calc-history-out 0.25s ease both;
}

@keyframes calc-history-in {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
}

@keyframes calc-history-out {
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

.calc-history-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 12px;
    background: transparent;
    font-family: inherit;
    text-align: right;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        transform 0.2s var(--calc-ease);
}

.calc-history-item:hover {
    background: var(--t-surface-f3f6fa);
    transform: translateX(-3px);
}

.calc-history-expression {
    max-width: 100%;
    overflow: hidden;
    color: var(--t-text-7b8798);
    font-size: 13px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.calc-history-result {
    color: var(--t-text-26354a);
    font-size: 19px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.calc-history-empty {
    margin: 10px 0;
    padding: 24px 12px;
    border: 1px dashed var(--t-border-dce4f0);
    border-radius: 12px;
    color: var(--t-text-9aa5b5);
    font-size: 14px;
    text-align: center;
}

.calc-history-empty.hidden {
    display: none;
}

.calc-shortcuts {
    margin: 14px 2px 0;
    color: var(--t-text-9aa5b5);
    font-size: 12px;
    line-height: 1.5;
}


/* ---------- Small screens ---------- */

@media (max-width: 900px) {

    .calc-layout {
        grid-template-columns: 1fr;
        max-width: 560px;
    }

    .calc-history {
        position: static;
        max-height: 360px;
    }

}

@media (max-width: 560px) {

    .calc-layout {
        margin-top: 16px;
        padding: 0 12px;
    }

    .calc-card {
        padding: 14px;
    }

    .calc-keypad {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .calc-expression {
        font-size: 36px;
    }

    .calc-memory-keys {
        margin-left: 0;
    }

}

@media (prefers-reduced-motion: reduce) {

    .calc-card,
    .calc-history,
    .calc-expression.result-in,
    .calc-display.shake,
    .calc-history-list li {
        animation: none !important;
    }

}


/* ==========================================
   WHITEBOARD
========================================== */

:root {
    --wb-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --wb-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --wb-paper-line: rgba(37, 99, 235, 0.16);
    --wb-paper-dot: rgba(37, 99, 235, 0.28);
    --wb-paper-margin: rgba(220, 38, 38, 0.35);
    --wb-unsaved: #D9772B;
}

:root[data-theme="dark"] {
    --wb-unsaved: #F0A56B;
}

.wb-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 22px;
    align-items: start;
    max-width: 1440px;
    margin: 24px auto 50px;
    padding: 0 25px;
    box-sizing: border-box;
}

.wb-workspace,
.wb-gallery {
    background: var(--t-surface-ffffff);
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 20px;
    box-shadow: 0 14px 36px var(--t-shadow-26354a-a10);
    animation: gs-fade-up 0.5s var(--wb-ease) both;
}

.wb-workspace {
    min-width: 0;
    padding: 16px;
}

.wb-gallery {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
    padding: 18px;
    box-sizing: border-box;
    animation-delay: 0.08s;
}


/* ---------- Top line ---------- */

.wb-topline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.wb-title {
    flex: 1;
    min-width: 160px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--t-text-26354a);
    font-size: 19px;
    font-weight: 700;
    font-family: inherit;
    outline: none;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.wb-title:hover {
    background: var(--t-surface-f7f9fc);
}

.wb-title:focus {
    border-color: var(--t-border-3f72c5);
    background: var(--t-surface-f7f9fc);
}

.wb-status {
    color: var(--t-text-9aa5b5);
    font-size: 12.5px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.wb-status.is-dirty {
    color: var(--wb-unsaved);
}

.wb-status.is-saved {
    color: var(--t-text-39a96b);
}

.wb-status:not(:empty)::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: currentColor;
    vertical-align: 1px;
}

.wb-actions {
    display: flex;
    gap: 8px;
}

.wb-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.wb-button:hover:not(:disabled) {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.wb-button:active:not(:disabled) {
    transform: scale(0.96);
}

.wb-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wb-button svg,
.wb-tool svg,
.wb-card-delete svg,
.wb-modal-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.wb-button-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    color: #FFFFFF;
    box-shadow: 0 4px 12px var(--t-shadow-3f72c5-a25);
}

.wb-button-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--t-surface-568be0), var(--t-surface-396bc0));
    color: #FFFFFF;
}

.wb-button-danger {
    border-color: transparent;
    background: var(--t-surface-e74c3c);
    color: #FFFFFF;
}

.wb-button-danger:hover:not(:disabled) {
    background: var(--t-surface-d63c2e);
    color: #FFFFFF;
}

.wb-button:focus-visible,
.wb-tool:focus-visible,
.wb-color:focus-visible,
.wb-size:focus-visible,
.wb-card-open:focus-visible,
.wb-card-delete:focus-visible {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 2px;
}


/* ---------- Toolbar ---------- */

.wb-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 14px;
    background: var(--t-surface-f3f6fa);
}

.wb-group {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border-radius: 11px;
    background: var(--t-surface-ffffff);
}

.wb-history-group {
    margin-left: auto;
}

.wb-divider {
    width: 1px;
    height: 22px;
    margin: 0 3px;
    background: var(--t-border-dce4f0);
}

.wb-tool {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--t-text-526175);
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s var(--wb-spring);
}

.wb-tool:hover:not(:disabled) {
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-26354a);
}

.wb-tool.active {
    background: var(--t-surface-3f72c5);
    color: #FFFFFF;
    transform: scale(1.06);
    box-shadow: 0 4px 10px var(--t-shadow-3f72c5-a25);
}

.wb-tool:disabled {
    opacity: 0.35;
    cursor: default;
}

.wb-tool-danger:hover:not(:disabled) {
    background: var(--t-surface-fff5f5);
    color: var(--t-text-d93636);
}

.wb-colors {
    gap: 5px;
    padding: 5px 7px;
}

.wb-color {
    position: relative;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 2px solid var(--t-surface-ffffff);
    border-radius: 50%;
    background: var(--swatch);
    box-shadow: 0 0 0 1px var(--t-border-dce4f0);
    cursor: pointer;
    transition:
        transform 0.25s var(--wb-spring),
        box-shadow 0.2s ease;
}

.wb-color:hover {
    transform: scale(1.12);
}

.wb-color.active {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px var(--swatch);
}

.wb-color-custom {
    --swatch: #0EA5E9;
    background: conic-gradient(#EF4444, #F59E0B, #22C55E, #06B6D4, #6366F1, #EC4899, #EF4444);
    overflow: hidden;
}

.wb-color-custom.active {
    background: var(--swatch);
}

.wb-color-custom input {
    position: absolute;
    inset: -6px;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
    opacity: 0;
    cursor: pointer;
}

.wb-size {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wb-size span {
    width: var(--dot);
    height: var(--dot);
    border-radius: 50%;
    background: var(--t-text-526175);
    transition:
        background-color 0.2s ease,
        transform 0.25s var(--wb-spring);
}

.wb-size:hover {
    background: var(--t-surface-f3f6fa);
}

.wb-size.active {
    background: var(--t-surface-eaf2ff);
}

.wb-size.active span {
    background: var(--t-text-3f72c5);
    transform: scale(1.15);
}

.wb-select {
    height: 34px;
    padding: 0 8px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--t-text-26354a);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}


/* ---------- Board ---------- */

.wb-stage {
    border-radius: 14px;
    background: var(--t-surface-e7edf5);
    padding: 10px;
}

.wb-paper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 10px;
    background-color: #FFFFFF;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.08),
        0 8px 24px rgba(0, 0, 0, 0.08);
    touch-action: none;
}

.wb-paper.swap-in {
    animation: wb-swap-in 0.45s var(--wb-ease);
}

@keyframes wb-swap-in {
    from {
        opacity: 0.2;
        transform: scale(0.985);
    }
}

/* Paper patterns: 40 board pixels apart (1600 × 1000 board) */
.paper-grid {
    background-image:
        linear-gradient(var(--wb-paper-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--wb-paper-line) 1px, transparent 1px);
    background-size: calc(100% / 40) calc(100% / 25);
}

.paper-lined {
    background-image:
        linear-gradient(90deg, transparent calc(6.25% - 1px), var(--wb-paper-margin) calc(6.25% - 1px), var(--wb-paper-margin) 6.25%, transparent 6.25%),
        linear-gradient(var(--wb-paper-line) 1px, transparent 1px);
    background-size: 100% 100%, 100% calc(100% / 25);
}

.paper-dots {
    background-image: radial-gradient(circle, var(--wb-paper-dot) 1.3px, transparent 1.6px);
    background-size: calc(100% / 40) calc(100% / 25);
    background-position: calc(-50% / 40) calc(-50% / 25);
}

.wb-paper canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: none;
}

#wbOverlay {
    pointer-events: none;
}

/* Brush-size cursor that follows the pointer */
.wb-cursor {
    position: absolute;
    top: 0;
    left: 0;
    border: 1.5px solid rgba(15, 23, 42, 0.55);
    border-radius: 50%;
    background: var(--cursor-color, transparent);
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.15s ease,
        width 0.15s ease,
        height 0.15s ease;
}

.wb-paper.show-cursor .wb-cursor {
    opacity: 0.65;
}

.wb-paper.is-drawing .wb-cursor {
    opacity: 0.35;
}

.wb-cursor.is-eraser {
    border-style: dashed;
    background: rgba(255, 255, 255, 0.6);
}


/* ---------- Gallery ---------- */

.wb-gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.wb-gallery-header h2 {
    margin: 0;
    color: var(--t-text-26354a);
    font-size: 17px;
}

.wb-gallery-count {
    min-width: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    box-sizing: border-box;
}

.wb-gallery-list {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 2px;
    overflow-y: auto;
    list-style: none;
}

.wb-card {
    position: relative;
    border: 1px solid var(--t-border-e3e9f2);
    border-radius: 14px;
    background: var(--t-surface-ffffff);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.25s var(--wb-ease),
        opacity 0.3s ease;
}

.wb-gallery-list.first-load .wb-card {
    animation: gs-fade-up 0.4s var(--wb-ease) both;
    animation-delay: calc(var(--i) * 45ms);
}

.wb-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--t-shadow-26354a-a10);
}

.wb-card.active {
    border-color: var(--t-border-3f72c5);
    box-shadow: 0 0 0 2px var(--t-shadow-3f72c5-a25);
}

.wb-card.just-saved {
    animation: wb-saved 0.7s var(--wb-spring);
}

@keyframes wb-saved {
    0% {
        opacity: 0;
        transform: translateY(-14px) scale(0.92);
    }
    60% {
        opacity: 1;
        transform: scale(1.02);
    }
}

.wb-card.leaving {
    opacity: 0;
    transform: translateX(24px) scale(0.96);
}

.wb-card-open {
    display: block;
    width: 100%;
    padding: 8px;
    border: none;
    background: transparent;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.wb-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 9px;
    background-color: #FFFFFF;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.wb-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wb-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 32px 2px 2px;
}

.wb-card-title {
    overflow: hidden;
    color: var(--t-text-26354a);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.wb-card-date {
    color: var(--t-text-9aa5b5);
    font-size: 12px;
}

.wb-card-delete {
    position: absolute;
    right: 8px;
    bottom: 10px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--t-text-9aa5b5);
    cursor: pointer;
    opacity: 0;
    transition:
        opacity 0.2s ease,
        background-color 0.15s ease,
        color 0.15s ease;
}

.wb-card:hover .wb-card-delete,
.wb-card-delete:focus-visible {
    opacity: 1;
}

@media (hover: none) {

    .wb-card-delete {
        opacity: 1;
    }

}

.wb-card-delete:hover {
    background: var(--t-surface-fff5f5);
    color: var(--t-text-d93636);
}

.wb-gallery-empty,
.wb-gallery-login {
    margin: 4px 0 0;
    padding: 24px 14px;
    border: 1px dashed var(--t-border-dce4f0);
    border-radius: 12px;
    color: var(--t-text-9aa5b5);
    font-size: 13.5px;
    line-height: 1.5;
    text-align: center;
}

.wb-gallery-empty.hidden,
.wb-gallery-login.hidden {
    display: none;
}


/* ---------- Dialog & toast ---------- */

.wb-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--t-surface-26354a-a55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}

.wb-modal.visible {
    opacity: 1;
    visibility: visible;
}

.wb-modal-card {
    width: min(420px, 100%);
    padding: 26px;
    box-sizing: border-box;
    border-radius: 18px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 20px 60px var(--t-shadow-26354a-a25);
    text-align: center;
    transform: translateY(12px) scale(0.96);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.wb-modal.visible .wb-modal-card {
    transform: none;
}

.wb-modal-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.wb-modal-icon svg {
    width: 24px;
    height: 24px;
}

.wb-modal-icon.is-danger {
    background: var(--t-surface-fff5f5);
    color: var(--t-text-d93636);
}

.wb-modal-card h3 {
    margin: 0 0 8px;
    color: var(--t-text-26354a);
    font-size: 20px;
}

.wb-modal-card p {
    margin: 0 0 22px;
    color: var(--t-text-7b8798);
    font-size: 14px;
    line-height: 1.5;
}

.wb-modal-buttons {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.wb-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 100001;
    padding: 11px 18px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 12px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    box-shadow: 0 12px 32px var(--t-shadow-26354a-a25);
    font-size: 13.5px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 14px) scale(0.96);
    transition:
        opacity 0.3s ease,
        transform 0.4s var(--wb-ease);
}

.wb-toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.wb-toast.is-success {
    border-left: 4px solid var(--t-border-48a868);
}

.wb-toast.is-error {
    border-left: 4px solid var(--t-border-d93636);
}


/* ---------- Small screens ---------- */

@media (max-width: 1000px) {

    .wb-layout {
        grid-template-columns: 1fr;
    }

    .wb-gallery {
        position: static;
        max-height: none;
    }

    .wb-gallery-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

}

@media (max-width: 600px) {

    .wb-layout {
        margin-top: 12px;
        padding: 0 10px;
    }

    .wb-workspace {
        padding: 10px;
    }

    .wb-actions .wb-button span {
        display: none;
    }

    .wb-history-group {
        margin-left: 0;
    }

}

@media (prefers-reduced-motion: reduce) {

    .wb-workspace,
    .wb-gallery,
    .wb-card,
    .wb-paper.swap-in {
        animation: none !important;
    }

    .wb-modal-card,
    .wb-toast,
    .wb-tool,
    .wb-color {
        transition-duration: 0.01ms !important;
    }

}


/* ==========================================
   CIRCUIT LAB
========================================== */

:root {
    --cl-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --cl-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --cl-board: #F3EFE6;
    --cl-board-edge: #DCD3C2;
    --cl-channel: #E5DECF;
    --cl-hole: #3F3F46;
    --cl-label: #A8A091;
    --graph-grid: #E8EDF4;
    --graph-text: #8792A2;
}

:root[data-theme="dark"] {
    --cl-board: #E7E2D6;
    --cl-board-edge: #BDB4A2;
    --cl-channel: #D6CFBF;
    --graph-grid: #2E3540;
    --graph-text: #8C97A8;
}

.cl-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) 280px;
    gap: 18px;
    align-items: start;
    max-width: 1600px;
    margin: 24px auto 50px;
    padding: 0 22px;
    box-sizing: border-box;
}

.cl-panel {
    background: var(--t-surface-ffffff);
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 18px;
    box-shadow: 0 14px 36px var(--t-shadow-26354a-a10);
    animation: gs-fade-up 0.5s var(--cl-ease) both;
}

.cl-panel h2 {
    margin: 0 0 12px;
    color: var(--t-text-26354a);
    font-size: 16px;
}

.cl-panel h3 {
    margin: 18px 0 8px;
    color: var(--t-text-526175);
    font-size: 13px;
}


/* ---------- Palette ---------- */

.cl-palette {
    position: sticky;
    top: 20px;
    padding: 16px;
}

.cl-palette-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cl-part-button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--t-border-e3e9f2);
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s var(--cl-ease),
        box-shadow 0.2s ease;
}

.cl-part-button svg {
    width: 40px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.3s var(--cl-spring);
}

.cl-part-button:hover {
    background: var(--t-surface-eaf2ff);
    transform: translateX(3px);
}

.cl-part-button:hover svg {
    transform: scale(1.1);
}

.cl-part-button.active {
    border-color: var(--t-border-3f72c5);
    background: var(--t-surface-eaf2ff);
    box-shadow: 0 0 0 3px var(--t-shadow-3f72c5-a20);
}

.cl-part-button.active span::after {
    content: " ·";
    color: var(--t-text-3f72c5);
    animation: cl-blink 1s ease infinite;
}

@keyframes cl-blink {
    50% {
        opacity: 0.2;
    }
}

.cl-help {
    margin: 14px 2px 10px;
    color: var(--t-text-7b8798);
    font-size: 12.5px;
    line-height: 1.5;
}

.cl-shortcuts {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--t-text-7b8798);
    font-size: 12px;
}

kbd {
    display: inline-block;
    min-width: 22px;
    margin-right: 6px;
    padding: 1px 5px;
    border: 1px solid var(--t-border-dce4f0);
    border-bottom-width: 2px;
    border-radius: 5px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-526175);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
}


/* ---------- Workspace & toolbar ---------- */

.cl-workspace {
    min-width: 0;
    padding: 14px;
    animation-delay: 0.05s;
}

.cl-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.cl-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.cl-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 13px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
}

.cl-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.cl-button:hover {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.cl-button:active {
    transform: scale(0.96);
}

.cl-button.is-active {
    border-color: var(--t-border-3f72c5);
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.cl-button-primary {
    border-color: transparent;
    background: var(--t-surface-39a96b);
    color: #FFFFFF;
}

.cl-button-primary:hover {
    background: var(--t-surface-39a96b);
    color: #FFFFFF;
    filter: brightness(1.08);
}

.cl-button-primary .cl-icon-play,
.cl-button-primary.is-paused .cl-icon-pause {
    display: none;
}

.cl-button-primary.is-paused .cl-icon-play {
    display: block;
    fill: currentColor;
}

.cl-button-primary.is-paused {
    background: var(--t-surface-e5b83f);
}

.cl-button-danger-ghost:hover {
    border-color: var(--t-border-e2c7c7);
    background: var(--t-surface-fff5f5);
    color: var(--t-text-d93636);
}

.cl-button:focus-visible,
.cl-part-button:focus-visible,
.cl-chip:focus-visible,
.cl-swatch:focus-visible,
.cl-select:focus-visible {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 2px;
}

.cl-time {
    min-width: 60px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-526175);
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.cl-select {
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}


/* ---------- Board ---------- */

/* The stage is a fixed window onto a pan-and-zoom world. */
.cl-board-scroll {
    position: relative;
    height: clamp(440px, 64vh, 820px);
    overflow: hidden;
    border-radius: 14px;
    background: var(--t-surface-e7edf5);
    cursor: grab;
}

.cl-board-scroll.is-panning {
    cursor: grabbing;
}

.cl-board {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    user-select: none;
}

.cl-board.is-placing {
    cursor: crosshair;
}

.cl-board-base {
    fill: var(--cl-board);
    stroke: var(--cl-board-edge);
    stroke-width: 1.5;
}

.cl-channel {
    fill: var(--cl-channel);
}

.cl-rail-line {
    stroke-width: 2;
}

.cl-rail-plus {
    stroke: #E11D48;
}

.cl-rail-minus {
    stroke: #2563EB;
}

.cl-rail-label {
    font-size: 15px;
    font-weight: 800;
    font-family: Arial, sans-serif;
}

.cl-rail-plus-text {
    fill: #E11D48;
}

.cl-rail-minus-text {
    fill: #2563EB;
}

.cl-board-label {
    fill: var(--cl-label);
    font-size: 10px;
    font-weight: 700;
    font-family: Arial, sans-serif;
}

.cl-hole {
    fill: var(--cl-hole);
    opacity: 0.85;
}

.cl-hole-highlight {
    fill: rgba(34, 197, 94, 0.28);
    stroke: rgba(22, 163, 74, 0.7);
    stroke-width: 1;
    animation: cl-hole-in 0.2s ease both;
    pointer-events: none;
}

.cl-hole-highlight.is-hovered {
    fill: rgba(34, 197, 94, 0.55);
}

@keyframes cl-hole-in {
    from {
        opacity: 0;
    }
}

.cl-tooltip {
    position: absolute;
    top: 0;
    left: 0;
    padding: 5px 9px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.88);
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 5;
}

.cl-tooltip.visible {
    opacity: 1;
}


/* ---------- Wires ---------- */

.cl-wire {
    cursor: pointer;
}

.cl-wire .cl-hit,
.cl-part .cl-hit {
    fill: none;
    stroke: transparent;
    stroke-width: 16;
    stroke-linecap: round;
}

.cl-wire-shadow {
    fill: none;
    stroke: rgba(0, 0, 0, 0.18);
    stroke-width: 6;
    stroke-linecap: round;
    transform: translate(1px, 2px);
}

.cl-wire-line {
    fill: none;
    stroke-width: 4.2;
    stroke-linecap: round;
    transition: stroke-width 0.15s ease;
}

/* Only the wire that was just drawn animates in. */
.cl-wire.is-new .cl-wire-line {
    stroke-dasharray: 2000;
    animation: cl-wire-draw 0.45s var(--cl-ease) both;
}

@keyframes cl-wire-draw {
    from {
        stroke-dashoffset: 2000;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.cl-wire:hover .cl-wire-line,
.cl-wire.is-selected .cl-wire-line {
    stroke-width: 5.5;
}

.cl-wire.is-selected .cl-wire-shadow {
    stroke: rgba(59, 130, 246, 0.45);
    stroke-width: 10;
}

.cl-wire-ghost {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 6 6;
    opacity: 0.6;
    pointer-events: none;
}

.cl-wire-ghost.is-valid {
    stroke-dasharray: none;
    opacity: 0.85;
}


/* ---------- Parts ---------- */

.cl-part {
    cursor: grab;
}

.cl-part.is-dragging {
    opacity: 0.35;
}

.cl-part.is-ghost {
    opacity: 0.6;
    pointer-events: none;
}

.cl-part.is-ghost.is-invalid {
    opacity: 0.45;
    filter: grayscale(1) sepia(1) hue-rotate(-50deg) saturate(4);
}

/* Animate the outer group: the body's own transform attribute positions it. */
.cl-part.pop-in {
    transform-box: fill-box;
    transform-origin: center;
    animation: cl-pop 0.4s var(--cl-spring);
}

#clPartLayer.example-in .cl-part {
    animation: gs-fade-up 0.45s var(--cl-ease) both;
}

@keyframes cl-pop {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
}

.cl-select-halo {
    stroke: transparent;
    stroke-width: 28;
    stroke-linecap: round;
    transition: stroke 0.2s ease;
}

.cl-part.is-selected .cl-select-halo {
    stroke: rgba(59, 130, 246, 0.22);
}

.cl-lead {
    stroke: #9CA3AF;
    stroke-width: 2.6;
    stroke-linecap: round;
}

.cl-leg {
    fill: #6B7280;
}

.cl-part-label {
    fill: #44403C;
    font-size: 10.5px;
    font-weight: 800;
    font-family: Arial, sans-serif;
    pointer-events: none;
}

.cl-battery-label {
    fill: #FBBF24;
    font-size: 9.5px;
}

.cl-battery-plus {
    fill: #E11D48;
    font-size: 13px;
    font-weight: 900;
    font-family: Arial, sans-serif;
    pointer-events: none;
}

.cl-resistor-body {
    fill: #E8D3A8;
    stroke: #C9B488;
    stroke-width: 0.8;
}

.cl-battery-body {
    fill: #1F2937;
}

.cl-battery-cap {
    fill: #D97706;
}

.cl-part-battery.is-shorted .cl-battery-body {
    animation: cl-hot 0.6s ease infinite alternate;
}

@keyframes cl-hot {
    to {
        fill: #B91C1C;
    }
}

.cl-capacitor-body {
    fill: #2563EB;
}

.cl-capacitor-stripe {
    fill: #93C5FD;
}

.cl-switch-base {
    fill: #4B5563;
}

.cl-switch-pin {
    fill: #D1D5DB;
}

.cl-switch-lever {
    stroke: #F3F4F6;
    stroke-width: 3.2;
    stroke-linecap: round;
    transition: transform 0.25s var(--cl-spring);
}

.cl-part-switch {
    cursor: pointer;
}

.cl-part-switch.is-closed .cl-switch-lever {
    stroke: #FDE68A;
}

.cl-led-dome {
    stroke: rgba(0, 0, 0, 0.15);
    stroke-width: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.cl-part-led.is-lit .cl-led-dome {
    opacity: 1;
}

.cl-led-glow {
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.cl-led-flat {
    fill: rgba(0, 0, 0, 0.18);
}

.cl-led-shine {
    fill: #FFFFFF;
    opacity: 0.5;
}

.cl-led-burnt {
    fill: none;
    stroke: #111827;
    stroke-width: 2.2;
    stroke-linecap: round;
    opacity: 0;
}

.cl-part-led.is-burnt .cl-led-dome {
    fill: #57534E;
    opacity: 0.9;
}

.cl-part-led.is-burnt .cl-led-burnt {
    opacity: 0.8;
}

.cl-flow {
    stroke: #FBBF24;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-dasharray: 2 9;
    pointer-events: none;
    transition: opacity 0.25s ease;
}


/* ---------- Graph ---------- */

.cl-graph {
    margin-top: 14px;
    padding: 12px 14px 10px;
    border: 1px solid var(--t-border-e3e9f2);
    border-radius: 14px;
}

.cl-graph-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}

.cl-graph-header h2 {
    margin: 0;
}

.cl-graph-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cl-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px 4px 8px;
    border: 1px solid var(--t-border-e3e9f2);
    border-radius: 999px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-526175);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    animation: gs-pop-in 0.3s var(--cl-ease) both;
    transition: background-color 0.15s ease;
}

.cl-legend-item::before {
    content: "";
    width: 10px;
    height: 3px;
    border-radius: 2px;
    background: var(--trace);
}

.cl-legend-item:hover {
    background: var(--t-surface-fff5f5);
    text-decoration: line-through;
}

.cl-legend-value {
    color: var(--t-text-26354a);
    font-variant-numeric: tabular-nums;
}

.cl-graph-body {
    position: relative;
}

#clGraph {
    display: block;
    width: 100%;
    height: 200px;
}

.cl-graph-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 30px;
    color: var(--t-text-9aa5b5);
    font-size: 13px;
    text-align: center;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.cl-graph-empty.hidden {
    opacity: 0;
}


/* ---------- Inspector ---------- */

.cl-inspector {
    position: sticky;
    top: 20px;
    padding: 18px;
    animation-delay: 0.1s;
}

.cl-inspector > * {
    animation: gs-fade-up 0.3s var(--cl-ease) both;
}

.cl-inspector-hint {
    margin: 0 0 14px;
    color: var(--t-text-7b8798);
    font-size: 13px;
    line-height: 1.5;
}

.cl-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.cl-summary div {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-7b8798);
    font-size: 12px;
    font-weight: 600;
}

.cl-summary span {
    color: var(--t-text-26354a);
    font-size: 20px;
    font-weight: 800;
}

.cl-notice {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--t-surface-fff9e8);
    color: var(--t-text-526175);
    font-size: 13px;
    font-weight: 600;
}

.cl-notice svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linejoin: round;
}

.cl-notice.is-error {
    background: var(--t-surface-fff5f5);
    color: var(--t-text-d93636);
}

.cl-link {
    padding: 0;
    border: none;
    background: none;
    color: var(--t-text-3f72c5);
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.cl-tips {
    margin: 0;
    padding-left: 18px;
    color: var(--t-text-7b8798);
    font-size: 12.5px;
    line-height: 1.6;
}

.cl-field-label {
    display: block;
    margin: 4px 0 6px;
    color: var(--t-text-526175);
    font-size: 12px;
    font-weight: 700;
}

.cl-value-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.cl-input {
    flex: 1;
    min-width: 0;
    padding: 9px 11px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.cl-input:focus {
    border-color: var(--t-border-3f72c5);
    box-shadow: 0 0 0 3px var(--t-shadow-3f72c5-a20);
}

.cl-input.is-invalid {
    border-color: var(--t-border-d93636);
    animation: calc-shake 0.4s ease;
}

.cl-unit {
    color: var(--t-text-7b8798);
    font-size: 15px;
    font-weight: 700;
}

.cl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}

.cl-chip {
    padding: 5px 9px;
    border: 1px solid var(--t-border-e3e9f2);
    border-radius: 999px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-526175);
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        transform 0.2s var(--cl-spring);
}

.cl-chip:hover {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.cl-chip.active {
    border-color: var(--t-border-3f72c5);
    background: var(--t-surface-3f72c5);
    color: #FFFFFF;
    transform: scale(1.05);
}

.cl-swatch {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 3px solid var(--t-surface-ffffff);
    border-radius: 50%;
    background: var(--swatch);
    box-shadow: 0 0 0 1px var(--t-border-dce4f0);
    cursor: pointer;
    transition: transform 0.25s var(--cl-spring), box-shadow 0.2s ease;
}

.cl-swatch:hover {
    transform: scale(1.1);
}

.cl-swatch.active {
    box-shadow: 0 0 0 2px var(--swatch);
    transform: scale(1.12);
}

.cl-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 0;
    border: none;
    background: none;
    color: var(--t-text-26354a);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.cl-toggle-track {
    position: relative;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: var(--gs-switch-off, #CBD5E1);
    transition: background-color 0.3s ease;
}

.cl-toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.35s var(--cl-spring);
}

.cl-toggle.is-on .cl-toggle-track {
    background: var(--t-surface-39a96b);
}

.cl-toggle.is-on .cl-toggle-knob {
    transform: translateX(20px);
}

.cl-readings {
    display: grid;
    gap: 6px;
    margin: 6px 0 14px;
}

.cl-reading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-7b8798);
    font-size: 12.5px;
    font-weight: 600;
}

.cl-reading strong {
    color: var(--t-text-26354a);
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.cl-plot-buttons,
.cl-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
}


/* ---------- Toast ---------- */

.cl-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 100001;
    max-width: min(460px, calc(100vw - 32px));
    padding: 11px 18px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 12px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    box-shadow: 0 12px 32px var(--t-shadow-26354a-a25);
    font-size: 13.5px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 14px) scale(0.96);
    transition:
        opacity 0.3s ease,
        transform 0.4s var(--cl-ease);
}

.cl-toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.cl-toast.is-error {
    border-left: 4px solid var(--t-border-d93636);
}


/* ---------- Small screens ---------- */

@media (max-width: 1200px) {

    .cl-layout {
        grid-template-columns: minmax(0, 1fr) 270px;
    }

    .cl-palette {
        position: static;
        grid-column: 1 / -1;
    }

    .cl-palette-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .cl-part-button {
        width: auto;
    }

    .cl-shortcuts {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 14px;
    }

}

@media (max-width: 860px) {

    .cl-layout {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .cl-inspector {
        position: static;
    }

}

@media (prefers-reduced-motion: reduce) {

    .cl-panel,
    .cl-inspector > *,
    .cl-wire-line,
    .cl-part,
    .cl-part-body,
    .cl-legend-item,
    .cl-hole-highlight {
        animation: none !important;
    }

    .cl-switch-lever,
    .cl-toggle-knob,
    .cl-toast {
        transition-duration: 0.01ms !important;
    }

}


/* ==========================================
   CIRCUIT LAB: WORKSPACE, ARDUINO & NEW PARTS
========================================== */

:root {
    --cl-grid-dot: rgba(100, 116, 139, 0.28);
    --code-bg: #FBFCFE;
    --code-text: #1F2937;
    --code-gutter: #A0AABB;
    --tok-keyword: #0E7C86;
    --tok-builtin: #C2410C;
    --tok-constant: #2563EB;
    --tok-number: #7C3AED;
    --tok-string: #16A34A;
    --tok-comment: #94A3B8;
    --tok-directive: #9333EA;
}

:root[data-theme="dark"] {
    --cl-grid-dot: rgba(148, 163, 184, 0.18);
    --code-bg: #171B22;
    --code-text: #E2E8F0;
    --code-gutter: #5B6577;
    --tok-keyword: #4FD1C5;
    --tok-builtin: #FDBA74;
    --tok-constant: #93C5FD;
    --tok-number: #C4B5FD;
    --tok-string: #86EFAC;
    --tok-comment: #64748B;
    --tok-directive: #D8B4FE;
}

.cl-grid-dot {
    fill: var(--cl-grid-dot);
}


/* ---------- Palette groups ---------- */

.cl-palette-group-title {
    margin: 14px 2px 6px;
    color: var(--t-text-9aa5b5);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cl-palette-group-title:first-of-type {
    margin-top: 0;
}


/* ---------- Zoom & sound ---------- */

.cl-zoom {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 10px;
    background: var(--t-surface-f3f6fa);
}

.cl-zoom-level {
    min-width: 46px;
    color: var(--t-text-526175);
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.cl-icon-button {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--t-text-526175);
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease;
}

.cl-icon-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cl-icon-button:hover {
    background: var(--t-surface-ffffff);
    color: var(--t-text-3f72c5);
}

.cl-icon-button:active {
    transform: scale(0.92);
}

.cl-icon-button:focus-visible {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 2px;
}

#clSound {
    border: 1px solid var(--t-border-dce4f0);
    background: var(--t-surface-f7f9fc);
    width: 36px;
    height: 36px;
}

#clSound .cl-icon-sound-off,
#clSound.is-muted .cl-icon-sound-on {
    display: none;
}

#clSound.is-muted .cl-icon-sound-off {
    display: block;
}

#clSound.is-muted {
    color: var(--t-text-d93636);
}

.cl-stage-hint {
    position: absolute;
    left: 50%;
    bottom: 14px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #FFFFFF;
    font-size: 12.5px;
    font-weight: 600;
    pointer-events: none;
    transform: translateX(-50%);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
    animation: gs-fade-up 0.5s 0.4s var(--cl-ease) both;
}

.cl-stage-hint.hidden {
    opacity: 0;
    transform: translate(-50%, 10px);
}


/* ---------- New breadboard parts ---------- */

.cl-button-base {
    fill: #1F2937;
}

.cl-button-dot {
    fill: #4B5563;
}

.cl-button-cap {
    fill: #9CA3AF;
    stroke: #6B7280;
    stroke-width: 1.5;
    transform-box: fill-box;
    transform-origin: center;
    transition:
        transform 0.12s ease,
        fill 0.12s ease;
}

/* (Not .cl-part-button: that's the palette.) */
.cl-part-pushbutton {
    cursor: pointer;
}

.cl-part-pushbutton.is-pressed .cl-button-cap {
    fill: #F97316;
    transform: scale(0.82);
}

.cl-pot-body {
    fill: #1D4ED8;
}

.cl-pot-knob {
    fill: #F5F0E1;
    stroke: #D6CFBA;
    stroke-width: 1.5;
}

.cl-pot-indicator {
    stroke: #1F2937;
    stroke-width: 3;
    stroke-linecap: round;
    transition: transform 0.15s ease;
}

.cl-part-potentiometer {
    cursor: ns-resize;
}

.cl-ldr-body {
    fill: color-mix(in srgb, #F59E0B calc(40% + var(--light, 0.6) * 60%), #57534E);
    stroke: #B45309;
    stroke-width: 1.2;
    transition: fill 0.2s ease;
}

.cl-ldr-track {
    fill: none;
    stroke: #7C2D12;
    stroke-width: 1.6;
    stroke-linejoin: round;
}

.cl-buzzer-body {
    fill: #111827;
}

.cl-buzzer-hole {
    fill: #374151;
}

.cl-buzzer-plus {
    fill: #F9FAFB;
    font-size: 9px;
    font-weight: 800;
    font-family: Arial, sans-serif;
}

.cl-buzzer-wave {
    fill: none;
    stroke: #F59E0B;
    stroke-width: 2.2;
    stroke-linecap: round;
    opacity: 0;
}

.cl-part-buzzer.is-sounding .cl-buzzer-wave {
    animation: cl-wave 0.5s ease-out infinite;
}

@keyframes cl-wave {
    0% {
        opacity: 0.9;
        transform: translateX(-4px);
    }
    100% {
        opacity: 0;
        transform: translateX(6px);
    }
}

.cl-motor-body {
    fill: #9CA3AF;
    stroke: #6B7280;
    stroke-width: 2;
}

.cl-motor-blade {
    fill: #374151;
}

.cl-motor-hub {
    fill: #E5E7EB;
}


/* ---------- Arduino Uno ---------- */

.cl-arduino {
    cursor: grab;
}

.cl-arduino.is-ghost {
    opacity: 0.55;
    pointer-events: none;
}

.cl-arduino.pop-in {
    transform-box: fill-box;
    transform-origin: center;
}

.cl-arduino.pop-in .cl-arduino-board {
    animation: cl-board-in 0.45s var(--cl-spring);
}

@keyframes cl-board-in {
    from {
        opacity: 0;
    }
}

.cl-arduino-halo {
    fill: none;
    stroke: transparent;
    stroke-width: 3;
    stroke-dasharray: 10 8;
    transition: stroke 0.2s ease;
}

.cl-arduino.is-selected .cl-arduino-halo {
    stroke: rgba(59, 130, 246, 0.7);
    animation: cl-march 1s linear infinite;
}

.cl-arduino.has-error .cl-arduino-halo {
    stroke: rgba(220, 38, 38, 0.8);
}

@keyframes cl-march {
    to {
        stroke-dashoffset: -18;
    }
}

.cl-arduino-board {
    fill: #0E7C86;
    stroke: #0A5E66;
    stroke-width: 2;
}

.cl-arduino-mount {
    fill: #E5E7EB;
    stroke: #C9A227;
    stroke-width: 3;
}

.cl-arduino-usb {
    fill: #C0C7CF;
    stroke: #8A939D;
    stroke-width: 1.5;
}

.cl-arduino-usb-inner {
    fill: #9AA3AD;
}

.cl-arduino-jack {
    fill: #1F2937;
}

.cl-arduino-reset {
    cursor: pointer;
}

.cl-arduino-reset-base {
    fill: #D1D5DB;
}

.cl-arduino-reset-cap {
    fill: #B91C1C;
    transition: fill 0.15s ease;
}

.cl-arduino-reset:hover .cl-arduino-reset-cap {
    fill: #DC2626;
}

.cl-arduino-brand {
    fill: #FFFFFF;
    font-size: 26px;
    font-weight: 700;
    font-style: italic;
    font-family: Arial, sans-serif;
    letter-spacing: 1px;
}

.cl-arduino-model {
    fill: #FFFFFF;
    font-size: 56px;
    font-weight: 800;
    font-family: Arial, sans-serif;
    letter-spacing: 2px;
}

.cl-arduino-logo {
    fill: #FFFFFF;
    font-size: 46px;
    font-family: Arial, sans-serif;
}

.cl-arduino-chip {
    fill: #111827;
}

.cl-arduino-chip-leg {
    fill: #C0C7CF;
}

.cl-arduino-chip-label {
    fill: #6B7280;
    font-size: 11px;
    font-family: Arial, sans-serif;
    letter-spacing: 1px;
}

.cl-arduino-crystal {
    fill: #D1D5DB;
    stroke: #9CA3AF;
}

.cl-arduino-header {
    fill: #1C1C1C;
}

.cl-arduino-small {
    fill: #E6FFFB;
    font-size: 11px;
    font-weight: 700;
    font-family: Arial, sans-serif;
}

.cl-arduino-pin-label {
    fill: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    font-family: Arial, sans-serif;
    pointer-events: none;
}

.cl-arduino-pin {
    cursor: crosshair;
}

.cl-arduino-pin-socket {
    fill: #2B2B2B;
    transition: fill 0.15s ease;
}

.cl-arduino-pin:hover .cl-arduino-pin-socket {
    fill: #16A34A;
}

.cl-arduino-pin-hole {
    fill: #C9A227;
}

.cl-arduino-led {
    stroke: rgba(0, 0, 0, 0.3);
    stroke-width: 1;
    transition: opacity 0.08s linear;
}

.cl-arduino-led-on {
    fill: #4ADE80;
    filter: drop-shadow(0 0 4px #4ADE80);
}

.cl-arduino-led-l,
.cl-arduino-led-tx,
.cl-arduino-led-rx {
    fill: #FACC15;
    filter: drop-shadow(0 0 3px #FACC15);
}


/* ---------- Inspector extras ---------- */

.cl-board-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-526175);
    font-size: 12.5px;
    font-weight: 700;
}

.cl-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--t-text-9aa5b5);
}

.cl-board-status.is-running {
    background: var(--t-surface-eaf7ee);
    color: var(--t-text-39a96b);
}

.cl-board-status.is-running .cl-status-dot {
    background: var(--t-surface-39a96b);
    animation: cl-pulse 1.4s ease infinite;
}

.cl-board-status.is-error {
    background: var(--t-surface-fff5f5);
    color: var(--t-text-d93636);
}

.cl-board-status.is-error .cl-status-dot {
    background: var(--t-text-d93636);
}

@keyframes cl-pulse {
    50% {
        box-shadow: 0 0 0 5px rgba(57, 169, 107, 0);
    }
    0% {
        box-shadow: 0 0 0 0 rgba(57, 169, 107, 0.5);
    }
}

.cl-board-buttons {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 6px;
    margin-bottom: 14px;
}

.cl-pin-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}

.cl-pin-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--t-surface-f7f9fc);
    font-size: 12.5px;
}

.cl-pin-name {
    color: var(--t-text-26354a);
    font-weight: 800;
}

.cl-pin-mode {
    padding: 1px 6px;
    border-radius: 5px;
    background: var(--t-surface-eef2f7);
    color: var(--t-text-7b8798);
    font-size: 10.5px;
    font-weight: 800;
}

.cl-pin-value {
    min-width: 52px;
    color: var(--t-text-7b8798);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
    transition: color 0.15s ease;
}

.cl-pin-value.is-high {
    color: var(--t-text-39a96b);
}

.cl-pin-empty {
    color: var(--t-text-9aa5b5);
    font-size: 12.5px;
}

.cl-serial-preview {
    min-height: 60px;
    max-height: 120px;
    margin: 0 0 12px;
    padding: 8px 10px;
    overflow: auto;
    border-radius: 10px;
    background: #0F172A;
    color: #A7F3D0;
    font-size: 11.5px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.cl-range {
    width: 100%;
    margin: 4px 0 8px;
    accent-color: var(--t-surface-3f72c5);
}

.cl-range-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--t-text-7b8798);
    font-size: 12px;
    font-weight: 600;
}

.cl-range-light {
    accent-color: #F59E0B;
}

.cl-hold-button {
    width: 100%;
    margin-bottom: 8px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #1F2937;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 0 #0B1220;
    transition:
        transform 0.08s ease,
        box-shadow 0.08s ease,
        background-color 0.1s ease;
    user-select: none;
}

.cl-hold-button.is-pressed {
    background: #F97316;
    transform: translateY(3px);
    box-shadow: 0 1px 0 #0B1220;
}


/* ---------- Code editor ---------- */

.cl-editor {
    position: fixed;
    inset: 0;
    z-index: 99995;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--t-surface-26354a-a55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}

.cl-editor.visible {
    opacity: 1;
    visibility: visible;
}

.cl-editor-window {
    width: min(1180px, 100%);
    height: min(780px, 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 30px 80px var(--t-shadow-26354a-a25);
    transform: translateY(24px) scale(0.97);
    transition: transform 0.4s var(--cl-ease);
}

.cl-editor.visible .cl-editor-window {
    transform: none;
}

.cl-editor-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--t-border-e3e9f2);
}

.cl-editor-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.cl-editor-title svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #0E7C86;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cl-editor-title h2 {
    margin: 0;
    color: var(--t-text-26354a);
    font-size: 17px;
}

.cl-editor-status {
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--t-surface-eaf7ee);
    color: var(--t-text-39a96b);
    font-size: 11.5px;
    font-weight: 700;
}

.cl-editor-status:empty {
    display: none;
}

.cl-editor-status.is-unsaved {
    background: var(--t-surface-fff9e8);
    color: var(--wb-unsaved);
}

.cl-editor-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

#clUpload {
    background: #0E7C86;
}

.cl-upload-progress {
    height: 3px;
    background: transparent;
}

.cl-upload-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #0E7C86, #4FD1C5);
}

.cl-upload-progress.is-uploading span {
    animation: cl-upload 0.65s ease-in-out forwards;
}

.cl-upload-progress.is-done span {
    width: 100%;
    animation: cl-upload-done 0.9s 0.3s ease forwards;
}

@keyframes cl-upload {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes cl-upload-done {
    to { opacity: 0; }
}

.cl-editor-body {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
}

.cl-code {
    display: flex;
    min-height: 0;
    background: var(--code-bg);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13.5px;
    line-height: 21px;
}

.cl-gutter {
    flex: 0 0 auto;
    min-width: 44px;
    padding: 14px 10px 14px 0;
    overflow: hidden;
    box-sizing: border-box;
    color: var(--code-gutter);
    text-align: right;
    white-space: pre;
    user-select: none;
    border-right: 1px solid var(--t-border-e3e9f2);
}

.cl-code-area {
    position: relative;
    flex: 1;
    min-width: 0;
}

.cl-highlight,
#clCode {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 14px 16px;
    box-sizing: border-box;
    font: inherit;
    line-height: inherit;
    tab-size: 2;
    white-space: pre;
    overflow: auto;
    word-wrap: normal;
}

.cl-highlight {
    color: var(--code-text);
    pointer-events: none;
    scrollbar-width: none;
}

.cl-highlight::-webkit-scrollbar {
    display: none;
}

#clCode {
    border: none;
    outline: none;
    resize: none;
    background: transparent;
    color: transparent;
    caret-color: var(--code-text);
}

#clCode::selection {
    background: rgba(14, 124, 134, 0.25);
    color: transparent;
}

.tok-keyword { color: var(--tok-keyword); font-weight: 700; }
.tok-builtin { color: var(--tok-builtin); }
.tok-constant { color: var(--tok-constant); font-weight: 700; }
.tok-number { color: var(--tok-number); }
.tok-string { color: var(--tok-string); }
.tok-comment { color: var(--tok-comment); font-style: italic; }
.tok-directive { color: var(--tok-directive); }

.cl-serial {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-left: 1px solid var(--t-border-e3e9f2);
    background: #0F172A;
}

.cl-serial-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cl-serial-header h3 {
    margin: 0;
    color: #E2E8F0;
    font-size: 13px;
}

.cl-serial-header .cl-link {
    color: #93C5FD;
}

.cl-serial-output {
    flex: 1;
    margin: 0;
    padding: 12px 14px;
    overflow: auto;
    color: #A7F3D0;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 12.5px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.cl-editor-error {
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    background: var(--t-surface-fff5f5);
    color: var(--t-text-d93636);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 12.5px;
    transition:
        max-height 0.3s ease,
        padding 0.3s ease;
}

.cl-editor-error.visible {
    max-height: 120px;
    padding: 10px 16px;
}

.cl-editor-error.shake {
    animation: calc-shake 0.4s ease;
}

.cl-editor-help {
    padding: 9px 16px;
    border-top: 1px solid var(--t-border-e3e9f2);
    color: var(--t-text-9aa5b5);
    font-size: 12px;
}

@media (max-width: 760px) {

    .cl-editor {
        padding: 0;
    }

    .cl-editor-window {
        height: 100%;
        border-radius: 0;
    }

    .cl-editor-body {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(0, 1.6fr) minmax(140px, 1fr);
    }

    .cl-serial {
        border-left: none;
        border-top: 1px solid var(--t-border-e3e9f2);
    }

}

@media (prefers-reduced-motion: reduce) {

    .cl-arduino.is-selected .cl-arduino-halo,
    .cl-part-buzzer.is-sounding .cl-buzzer-wave,
    .cl-board-status.is-running .cl-status-dot {
        animation: none !important;
    }

    .cl-editor-window {
        transition: none;
    }

}


/* ==========================================
   CIRCUIT LAB: LCD DISPLAY
========================================== */

.cl-lcd {
    cursor: grab;
}

.cl-lcd.is-ghost {
    opacity: 0.55;
    pointer-events: none;
}

.cl-lcd.is-selected .cl-arduino-halo {
    stroke: rgba(59, 130, 246, 0.7);
    animation: cl-march 1s linear infinite;
}

.cl-lcd.pop-in .cl-lcd-board {
    animation: cl-board-in 0.45s var(--cl-spring);
}

.cl-lcd-board {
    fill: #17663A;
    stroke: #0F4A29;
    stroke-width: 2;
}

.cl-lcd-trimmer {
    fill: #2563EB;
}

.cl-lcd-trimmer-knob {
    fill: #E5E7EB;
}

.cl-lcd-bezel {
    fill: #0B0F17;
}

/* Screen colours: unpowered → backlight off → backlight on */
.cl-lcd-screen {
    transition:
        fill 0.35s ease,
        filter 0.35s ease;
}

.cl-lcd.is-blue .cl-lcd-screen { fill: #0D1A3A; }
.cl-lcd.is-blue.is-powered .cl-lcd-screen { fill: #183A8C; }
.cl-lcd.is-blue.is-lit .cl-lcd-screen {
    fill: #2A5CF0;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.55));
}

.cl-lcd.is-green .cl-lcd-screen { fill: #3E4C1C; }
.cl-lcd.is-green.is-powered .cl-lcd-screen { fill: #6E8A2C; }
.cl-lcd.is-green.is-lit .cl-lcd-screen {
    fill: #A6D23C;
    filter: drop-shadow(0 0 10px rgba(163, 230, 53, 0.45));
}

.cl-lcd-cells {
    fill: transparent;
    transition: fill 0.35s ease;
}

.cl-lcd.is-blue.is-powered .cl-lcd-cells { fill: rgba(255, 255, 255, 0.05); }
.cl-lcd.is-blue.is-lit .cl-lcd-cells { fill: rgba(255, 255, 255, 0.09); }
.cl-lcd.is-green.is-powered .cl-lcd-cells { fill: rgba(0, 0, 0, 0.05); }
.cl-lcd.is-green.is-lit .cl-lcd-cells { fill: rgba(0, 0, 0, 0.07); }

.cl-lcd.is-blue .cl-lcd-ink { fill: rgba(225, 233, 255, 0.55); }
.cl-lcd.is-blue.is-lit .cl-lcd-ink { fill: #F2F6FF; }
.cl-lcd.is-green .cl-lcd-ink { fill: rgba(22, 32, 8, 0.75); }
.cl-lcd.is-green.is-lit .cl-lcd-ink { fill: #1E2A0B; }

.cl-lcd-glass {
    fill: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}


/* ---------- Wiring checklist ---------- */

.cl-checklist {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.cl-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 9px;
    font-size: 12.5px;
    line-height: 1.4;
    transition:
        background-color 0.25s ease,
        color 0.25s ease;
}

.cl-checklist li.is-ok {
    background: var(--t-surface-eaf7ee);
    color: var(--t-text-39a96b);
}

.cl-checklist li.is-missing {
    background: var(--t-surface-fff5f5);
    color: var(--t-text-d93636);
}

.cl-check-icon {
    flex: 0 0 auto;
    font-weight: 900;
}

.cl-checklist li.is-ok .cl-check-icon {
    animation: cl-check-pop 0.35s var(--cl-spring);
}

@keyframes cl-check-pop {
    from {
        transform: scale(0.3);
    }
}

@media (prefers-reduced-motion: reduce) {

    .cl-lcd.is-selected .cl-arduino-halo,
    .cl-checklist li.is-ok .cl-check-icon {
        animation: none !important;
    }

}


/* ==========================================
   CIRCUIT LAB: SEMICONDUCTORS & KEYPAD
========================================== */

.cl-diode-body {
    fill: #1F2937;
}

.cl-diode-band {
    fill: #D1D5DB;
}

.cl-zener-body {
    fill: #F59E0B;
    fill-opacity: 0.85;
    stroke: #D97706;
    stroke-width: 0.8;
}

.cl-zener-core {
    fill: #B45309;
    opacity: 0.55;
}

.cl-zener-band {
    fill: #111827;
}

.cl-transistor-body {
    fill: #1F2937;
}

.cl-transistor-text {
    fill: #E5E7EB;
    font-size: 8px;
    font-weight: 800;
    font-family: Arial, sans-serif;
    letter-spacing: 0.5px;
    pointer-events: none;
}

.cl-leg-letter {
    fill: #6B7280;
    font-size: 9px;
    font-weight: 800;
    font-family: Arial, sans-serif;
    pointer-events: none;
}

.cl-mosfet-tab {
    fill: #C0C7CF;
    stroke: #8A939D;
    stroke-width: 1;
}

.cl-mosfet-hole {
    fill: #6B7280;
}


/* ---------- Keypad ---------- */

.cl-keypad {
    cursor: grab;
}

.cl-keypad.is-ghost {
    opacity: 0.55;
    pointer-events: none;
}

.cl-keypad.is-selected .cl-arduino-halo {
    stroke: rgba(59, 130, 246, 0.7);
    animation: cl-march 1s linear infinite;
}

.cl-keypad.pop-in .cl-keypad-card {
    animation: cl-board-in 0.45s var(--cl-spring);
}

.cl-keypad-card {
    fill: #111827;
    stroke: #0B0F17;
    stroke-width: 2;
}

.cl-keypad-ribbon {
    fill: #374151;
}

.cl-keypad-pin-label {
    fill: #E5E7EB;
    font-size: 9px;
    font-weight: 800;
    font-family: Arial, sans-serif;
    pointer-events: none;
}

.cl-key {
    cursor: pointer;
}

.cl-key-face {
    stroke: rgba(0, 0, 0, 0.25);
    stroke-width: 1;
    transform-box: fill-box;
    transform-origin: center;
    transition:
        transform 0.08s ease,
        filter 0.08s ease;
    filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.55));
}

.cl-key-digit .cl-key-face { fill: #F3F4F6; }
.cl-key-letter .cl-key-face { fill: #EF4444; }
.cl-key-symbol .cl-key-face { fill: #3B82F6; }

.cl-key-label {
    font-size: 22px;
    font-weight: 800;
    font-family: Arial, sans-serif;
    pointer-events: none;
    transition: transform 0.08s ease;
}

.cl-key-digit .cl-key-label { fill: #111827; }
.cl-key-letter .cl-key-label,
.cl-key-symbol .cl-key-label { fill: #FFFFFF; }

.cl-key:hover .cl-key-face {
    filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.55)) brightness(1.06);
}

.cl-key.is-pressed .cl-key-face {
    transform: translateY(3px) scale(0.97);
    filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0)) brightness(0.88);
}

.cl-key.is-pressed .cl-key-label {
    transform: translateY(3px);
}

.cl-keypad-pressed {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
    margin-bottom: 10px;
    border-radius: 14px;
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-9aa5b5);
    font-size: 30px;
    font-weight: 800;
    transition:
        background-color 0.12s ease,
        color 0.12s ease,
        transform 0.12s ease;
}

.cl-keypad-pressed.is-pressed {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {

    .cl-keypad.is-selected .cl-arduino-halo {
        animation: none !important;
    }

}


/* ==========================================
   CIRCUIT LAB: FUNCTION GENERATOR & OSCILLOSCOPE
========================================== */

:root {
    --scope-ch1: #FACC15;
    --scope-ch2: #22D3EE;
}

.cl-instrument {
    cursor: grab;
}

.cl-instrument.is-ghost {
    opacity: 0.55;
    pointer-events: none;
}

.cl-instrument.is-selected .cl-arduino-halo {
    stroke: rgba(59, 130, 246, 0.7);
    animation: cl-march 1s linear infinite;
}

.cl-instrument.pop-in .cl-instrument-body {
    animation: cl-board-in 0.45s var(--cl-spring);
}

.cl-instrument-body {
    fill: #E3E8EE;
    stroke: #B8C2CE;
    stroke-width: 2;
}

.cl-instrument-brand {
    fill: #475569;
    font-size: 11px;
    font-weight: 800;
    font-family: Arial, sans-serif;
    letter-spacing: 1.5px;
}

.cl-instrument-label {
    fill: #475569;
    font-size: 10px;
    font-weight: 800;
    font-family: Arial, sans-serif;
    letter-spacing: 0.5px;
    pointer-events: none;
}


/* ---------- Knobs & buttons ---------- */

.cl-knob {
    cursor: ns-resize;
}

.cl-knob-base {
    fill: #374151;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
}

.cl-knob-grip {
    stroke: #6B7280;
    stroke-width: 2;
}

.cl-knob-cap {
    fill: #4B5563;
}

.cl-knob-indicator {
    stroke: #F9FAFB;
    stroke-width: 3;
    stroke-linecap: round;
    transition: transform 0.18s ease;
}

.cl-knob:hover .cl-knob-base {
    fill: #1F2937;
}

.cl-knob-ring {
    fill: none;
    stroke-width: 3;
}

.cl-ring-ch1 {
    stroke: var(--scope-ch1);
}

.cl-ring-ch2 {
    stroke: var(--scope-ch2);
}

.cl-instrument-button {
    cursor: pointer;
}

.cl-instrument-button-face {
    fill: #F8FAFC;
    stroke: #B8C2CE;
    stroke-width: 1.5;
    filter: drop-shadow(0 2px 0 rgba(15, 23, 42, 0.25));
    transform-box: fill-box;
    transform-origin: center;
    transition:
        fill 0.15s ease,
        stroke 0.15s ease,
        transform 0.1s ease;
}

.cl-instrument-button:hover .cl-instrument-button-face {
    fill: #FFFFFF;
}

.cl-instrument-button:active .cl-instrument-button-face {
    transform: translateY(1.5px);
    filter: none;
}

.cl-instrument-button.is-active .cl-instrument-button-face {
    fill: #DCFCE7;
    stroke: #22C55E;
}

.cl-instrument-button-icon {
    fill: none;
    stroke: #334155;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cl-instrument-button.is-active .cl-instrument-button-icon {
    stroke: #15803D;
}

.cl-instrument-button-text {
    fill: #334155;
    font-size: 11px;
    font-weight: 800;
    font-family: Arial, sans-serif;
    letter-spacing: 0.5px;
    pointer-events: none;
}

.cl-fgen-output.is-active .cl-instrument-button-text,
.cl-scope-run .cl-instrument-button-text {
    fill: #15803D;
}

.cl-scope-run.is-stopped .cl-instrument-button-face {
    fill: #FEE2E2;
    stroke: #EF4444;
}

.cl-scope-run.is-stopped .cl-instrument-button-text {
    fill: #B91C1C;
}

.cl-terminal {
    stroke-width: 4;
    fill: #9CA3AF;
}

.cl-terminal-red { stroke: #DC2626; }
.cl-terminal-black { stroke: #111827; }
.cl-terminal-ch1 { stroke: var(--scope-ch1); }
.cl-terminal-ch2 { stroke: var(--scope-ch2); }
.cl-terminal-gnd { stroke: #111827; }


/* ---------- Function generator ---------- */

.cl-fgen-display {
    fill: #0B1F17;
    stroke: #050F0B;
    stroke-width: 2;
}

.cl-fgen-frequency {
    fill: #4ADE80;
    font-size: 28px;
    font-weight: 700;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    opacity: 0.35;
    transition: opacity 0.2s ease;
}

.cl-fgen-detail {
    fill: #86EFAC;
    font-size: 12.5px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    opacity: 0.35;
    transition: opacity 0.2s ease;
}

.cl-fgen-wave {
    fill: none;
    stroke: #4ADE80;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.35;
    transition: opacity 0.2s ease;
}

.cl-fgen.is-on .cl-fgen-frequency,
.cl-fgen.is-on .cl-fgen-detail,
.cl-fgen.is-on .cl-fgen-wave {
    opacity: 1;
}


/* ---------- Oscilloscope ---------- */

.cl-scope-bezel {
    fill: #0B0F17;
}

.cl-scope-screen {
    fill: #03080D;
}

.cl-scope-grid {
    fill: none;
    stroke: rgba(148, 163, 184, 0.16);
    stroke-width: 1;
    stroke-dasharray: 2 3;
}

.cl-scope-axis {
    fill: none;
    stroke: rgba(148, 163, 184, 0.35);
    stroke-width: 1;
}

.cl-scope-trace {
    fill: none;
    stroke-width: 1.8;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.cl-scope-ch1 {
    stroke: var(--scope-ch1);
    filter: drop-shadow(0 0 2px rgba(250, 204, 21, 0.6));
}

.cl-scope-ch2 {
    stroke: var(--scope-ch2);
    filter: drop-shadow(0 0 2px rgba(34, 211, 238, 0.6));
}

.cl-scope-ch1-fill { fill: var(--scope-ch1); }
.cl-scope-ch2-fill { fill: var(--scope-ch2); }
.cl-scope-trigger-fill { fill: #F97316; }

.cl-scope-text {
    fill: #CBD5E1;
    font-size: 11px;
    font-weight: 700;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    pointer-events: none;
}

.cl-scope-ch1-text { fill: var(--scope-ch1); }
.cl-scope-ch2-text { fill: var(--scope-ch2); }

.cl-scope-status {
    fill: #4ADE80;
}

.cl-scope-status.is-stopped {
    fill: #F87171;
}


/* ---------- Slow motion label ---------- */

.cl-slowmo {
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--t-surface-fff9e8);
    color: var(--wb-unsaved);
    font-size: 12px;
    font-weight: 800;
    opacity: 0;
    transform: scale(0.9);
    transition:
        opacity 0.25s ease,
        transform 0.25s var(--cl-spring);
}

.cl-slowmo.visible {
    opacity: 1;
    transform: none;
}

.cl-slowmo:empty {
    display: none;
}


/* ---------- Inspector controls ---------- */

.cl-wave-chip {
    padding: 6px 10px;
}

.cl-wave-chip svg {
    display: block;
    width: 30px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cl-field-value {
    float: right;
    color: var(--t-text-3f72c5);
    font-variant-numeric: tabular-nums;
}

.cl-select-full {
    width: 100%;
    margin-bottom: 12px;
}

.cl-scope-channel {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    border-left: 4px solid var(--scope-ch1);
    border-radius: 10px;
    background: var(--t-surface-f7f9fc);
}

.cl-scope-channel-2 {
    border-left-color: var(--scope-ch2);
}

.cl-scope-channel .cl-toggle {
    margin-bottom: 0;
}

.cl-scope-channel .cl-range {
    grid-column: 1 / -1;
    margin: 0;
}

.cl-toggle-small .cl-toggle-track {
    width: 38px;
    height: 22px;
}

.cl-toggle-small .cl-toggle-knob {
    width: 16px;
    height: 16px;
}

.cl-toggle-small.is-on .cl-toggle-knob {
    transform: translateX(16px);
}

.cl-measure-table {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 12px;
    font-size: 12.5px;
}

.cl-measure-row {
    display: grid;
    grid-template-columns: 44px 1fr 1fr;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 7px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-7b8798);
    font-weight: 700;
}

.cl-measure-row strong {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cl-measure-head {
    background: transparent;
}

.cl-scope-ch1-ink { color: #B45309; }
.cl-scope-ch2-ink { color: #0E7490; }

:root[data-theme="dark"] .cl-scope-ch1-ink { color: #FACC15; }
:root[data-theme="dark"] .cl-scope-ch2-ink { color: #22D3EE; }

@media (prefers-reduced-motion: reduce) {

    .cl-instrument.is-selected .cl-arduino-halo {
        animation: none !important;
    }

    .cl-knob-indicator {
        transition: none;
    }

}


/* ==========================================
   GRADE TRACKER
========================================== */

:root {
    --gr-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --gr-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gr-layout {
    max-width: 1240px;
    margin: 24px auto 60px;
    padding: 0 24px;
    box-sizing: border-box;
}

.gr-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    animation: gs-fade-up 0.5s var(--gr-ease) both;
}

.gr-heading h1 {
    margin: 0;
    color: var(--t-text-26354a);
    font-size: 30px;
}

.gr-subtitle {
    margin: 6px 0 0;
    color: var(--t-text-7b8798);
    font-size: 14.5px;
}

.gr-save-status {
    color: var(--t-text-9aa5b5);
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.gr-save-status.is-saved { color: var(--t-text-39a96b); }
.gr-save-status.is-error { color: var(--t-text-d93636); }

.gr-card {
    background: var(--t-surface-ffffff);
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 18px;
    box-shadow: 0 10px 28px var(--t-shadow-26354a-a08);
}

.gr-layout .hidden {
    display: none !important;
}


/* ---------- Buttons & inputs ---------- */

.gr-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 16px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 11px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
}

.gr-button svg,
.gr-icon-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gr-button:active {
    transform: scale(0.97);
}

.gr-button-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    color: #FFFFFF;
    box-shadow: 0 6px 16px var(--t-shadow-3f72c5-a25);
}

.gr-button-primary:hover {
    box-shadow: 0 8px 20px var(--t-shadow-3f72c5-a30);
}

.gr-button-danger-ghost {
    width: 100%;
    margin-top: 6px;
    border-color: transparent;
    background: transparent;
    color: var(--t-text-d93636);
}

.gr-button-danger-ghost:hover {
    background: var(--t-surface-fff5f5);
}

.gr-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--t-text-7b8798);
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.gr-icon-button:hover {
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-26354a);
}

.gr-icon-button.gr-danger:hover {
    background: var(--t-surface-fff5f5);
    color: var(--t-text-d93636);
}

.gr-input,
.gr-select {
    padding: 9px 11px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.gr-input:focus,
.gr-select:focus {
    border-color: var(--t-border-3f72c5);
    box-shadow: 0 0 0 3px var(--t-shadow-3f72c5-a20);
}

.gr-button:focus-visible,
.gr-icon-button:focus-visible,
.gr-chip:focus-visible,
.gr-quick-grade:focus-visible,
.gr-mini:focus-visible,
.gr-color:focus-visible,
.gr-preset:focus-visible,
.gr-subject-head:focus-visible {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 2px;
}


/* ---------- Logged out & empty ---------- */

.gr-login,
.gr-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 46px 24px;
    text-align: center;
    animation: gs-fade-up 0.5s var(--gr-ease) both;
}

.gr-login svg,
.gr-empty svg {
    width: 48px;
    height: 48px;
    fill: none;
    stroke: var(--t-text-3f72c5);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gr-login h2,
.gr-empty h2 {
    margin: 6px 0 0;
    color: var(--t-text-26354a);
}

.gr-login p,
.gr-empty p {
    margin: 0 0 10px;
    color: var(--t-text-7b8798);
}


/* ---------- Summary ---------- */

.gr-summary {
    display: grid;
    grid-template-columns: minmax(260px, 320px) 1fr minmax(220px, 280px);
    gap: 16px;
    margin-bottom: 20px;
}

.gr-overall {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    animation: gs-fade-up 0.5s var(--gr-ease) both;
}

.gr-ring {
    width: 170px;
    height: 170px;
    transform: rotate(-90deg);
}

.gr-ring-track {
    fill: none;
    stroke: var(--t-surface-eef2f7);
    stroke-width: 11;
}

.gr-ring-fill {
    fill: none;
    stroke: var(--t-surface-3f72c5);
    stroke-width: 11;
    stroke-linecap: round;
    transition:
        stroke-dashoffset 0.9s var(--gr-ease),
        stroke 0.5s ease;
}

.gr-overall-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.gr-overall-label,
.gr-stat-label {
    color: var(--t-text-7b8798);
    font-size: 12px;
    font-weight: 700;
}

.gr-overall-value {
    color: var(--t-text-26354a);
    font-size: 38px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.gr-overall-grade {
    max-width: 150px;
    color: var(--t-text-526175);
    font-size: 12.5px;
    font-weight: 700;
}

.gr-overall-grade.is-failing {
    color: var(--t-text-d93636);
}

.gr-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.gr-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 16px 18px;
    animation: gs-fade-up 0.5s var(--gr-ease) both;
}

.gr-stat:nth-child(2) { animation-delay: 0.05s; }
.gr-stat:nth-child(3) { animation-delay: 0.1s; }
.gr-stat:nth-child(4) { animation-delay: 0.15s; }

.gr-stat-value {
    color: var(--t-text-26354a);
    font-size: 28px;
    font-weight: 800;
}

.gr-stat-small {
    overflow: hidden;
    font-size: 16px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gr-stat.is-warning {
    border-color: var(--t-border-e2c7c7);
    background: var(--t-surface-fff5f5);
}

.gr-stat.is-warning .gr-stat-value {
    color: var(--t-text-d93636);
}

.gr-distribution {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px;
    animation: gs-fade-up 0.5s 0.2s var(--gr-ease) both;
}

.gr-bars {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    min-height: 120px;
}

.gr-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.gr-bar-fill {
    width: 100%;
    max-width: 30px;
    height: max(4px, var(--height));
    border-radius: 7px 7px 3px 3px;
    background: var(--color);
    transform-origin: bottom;
    animation: gr-grow 0.7s var(--gr-ease) both;
    transition: height 0.5s var(--gr-ease);
}

@keyframes gr-grow {
    from {
        transform: scaleY(0);
    }
}

.gr-bar-count {
    color: var(--t-text-526175);
    font-size: 12px;
    font-weight: 800;
}

.gr-bar-label {
    color: var(--t-text-9aa5b5);
    font-size: 12px;
    font-weight: 800;
}


/* ---------- Toolbar ---------- */

.gr-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.gr-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--t-text-7b8798);
    font-size: 13px;
    font-weight: 700;
}

.gr-sort select {
    padding: 8px 10px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    font-family: inherit;
    font-weight: 700;
}


/* ---------- Subject cards ---------- */

.gr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.gr-subject {
    position: relative;
    overflow: hidden;
    padding: 16px 18px 14px 22px;
    animation: gs-fade-up 0.45s var(--gr-ease) both;
    animation-delay: calc(var(--i) * 40ms);
    transition:
        transform 0.25s var(--gr-ease),
        box-shadow 0.25s ease;
}

.gr-subject::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--subject);
}

.gr-subject:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px var(--t-shadow-26354a-a12);
}

.gr-subject-head {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.gr-subject-dot {
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    border-radius: 50%;
    background: var(--subject);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--subject) 20%, transparent);
}

.gr-subject-name {
    flex: 1;
    overflow: hidden;
    color: var(--t-text-26354a);
    font-size: 16.5px;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gr-trend svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gr-trend.is-up svg { stroke: #16A34A; }
.gr-trend.is-down svg { stroke: #DC2626; }

.gr-subject-score {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 10px;
}

.gr-subject-average {
    color: var(--t-text-26354a);
    font-size: 32px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.gr-final {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--color);
    color: #FFFFFF;
    font-size: 17px;
    font-weight: 900;
}

.gr-final.is-empty {
    background: var(--t-surface-eef2f7);
    color: var(--t-text-9aa5b5);
}

.gr-spark {
    flex: 1;
    height: 34px;
    min-width: 60px;
}

.gr-spark polyline {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.gr-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gr-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 9px;
    background: var(--color);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 900;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s var(--gr-spring);
}

.gr-chip:hover {
    transform: translateY(-2px) scale(1.08);
}

.gr-chip.is-new {
    animation: gr-pop 0.5s var(--gr-spring);
}

@keyframes gr-pop {
    0% { transform: scale(0.2); opacity: 0; }
    60% { transform: scale(1.25); }
}

.gr-chip-add {
    background: var(--t-surface-eef2f7);
    color: var(--t-text-7b8798);
}

.gr-chip-add svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    transition: transform 0.3s var(--gr-spring);
}

.gr-subject.is-adding .gr-chip-add {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.gr-subject.is-adding .gr-chip-add svg {
    transform: rotate(45deg);
}

/* Quick add slides open (0fr → 1fr) */
.gr-quick-add {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s var(--gr-ease);
}

.gr-subject.is-adding .gr-quick-add {
    grid-template-rows: 1fr;
}

.gr-quick-inner {
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gr-subject.is-adding .gr-quick-inner {
    padding-top: 12px;
}

.gr-quick-grades {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.gr-quick-grade {
    height: 42px;
    border: 2px solid var(--color);
    border-radius: 11px;
    background: color-mix(in srgb, var(--color) 12%, transparent);
    color: var(--color);
    font-size: 18px;
    font-weight: 900;
    font-family: inherit;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s var(--gr-spring);
}

.gr-quick-grade:hover {
    background: var(--color);
    color: #FFFFFF;
    transform: translateY(-2px);
}

.gr-quick-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}


/* ---------- Drawer ---------- */

.gr-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: var(--t-surface-26354a-a55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.gr-drawer-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.gr-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(440px, 100vw);
    overflow-y: auto;
    background: var(--t-surface-ffffff);
    box-shadow: -18px 0 48px var(--t-shadow-26354a-a25);
    transform: translateX(104%);
    transition: transform 0.45s var(--gr-ease);
}

.gr-drawer-overlay.visible .gr-drawer {
    transform: none;
}

.gr-drawer-body {
    padding: 20px 22px 30px;
}

.gr-drawer-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.gr-drawer-head h2 {
    flex: 1;
    margin: 0;
    overflow: hidden;
    color: var(--t-text-26354a);
    font-size: 21px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gr-drawer-score {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 10px;
    margin-bottom: 16px;
}

.gr-drawer-score > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
}

.gr-drawer-score strong {
    color: var(--t-text-26354a);
    font-size: 19px;
}

.gr-section {
    margin-bottom: 18px;
}

.gr-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: var(--t-text-26354a);
    font-size: 15px;
}

.gr-count {
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    font-size: 12px;
}

.gr-hint {
    margin: 0;
    color: var(--t-text-9aa5b5);
    font-size: 13px;
}

.gr-chart {
    width: 100%;
    height: auto;
}

.gr-chart-grid {
    stroke: var(--t-border-e3e9f2);
    stroke-width: 1;
}

.gr-chart-label {
    fill: var(--t-text-9aa5b5);
    font-size: 10px;
    font-weight: 700;
}

.gr-chart-line {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1000;
    animation: gr-draw 0.9s var(--gr-ease) both;
}

.gr-chart-average {
    fill: none;
    stroke: var(--t-text-9aa5b5);
    stroke-width: 2;
    stroke-dasharray: 5 5;
}

@keyframes gr-draw {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.gr-chart-dot {
    stroke: var(--t-surface-ffffff);
    stroke-width: 2;
    transform-box: fill-box;
    transform-origin: center;
    animation: gr-pop 0.45s var(--gr-spring) both;
    animation-delay: calc(var(--i) * 45ms + 0.2s);
}

.gr-chart-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--t-text-7b8798);
    font-size: 12px;
}

.gr-legend-line {
    width: 18px;
    height: 3px;
    border-radius: 2px;
}

.gr-legend-dashed {
    margin-left: 10px;
    background: repeating-linear-gradient(90deg, var(--t-text-9aa5b5) 0 4px, transparent 4px 7px);
}

.gr-need {
    padding: 14px;
    border-radius: 14px;
    background: var(--t-surface-f7f9fc);
    transition: background-color 0.3s ease;
}

.gr-need.is-good { background: var(--t-surface-eaf7ee); }
.gr-need.is-hard { background: var(--t-surface-fff9e8); }

.gr-need-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--t-text-526175);
    font-size: 13px;
    font-weight: 700;
}

.gr-need-controls label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gr-need-result {
    margin: 12px 0 0;
    color: var(--t-text-26354a);
    font-size: 15px;
    font-weight: 800;
    animation: gs-fade-up 0.3s var(--gr-ease);
}

.gr-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gr-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.gr-list-item.is-highlighted {
    box-shadow: 0 0 0 2px var(--t-border-3f72c5);
    animation: gr-flash 1.2s ease;
}

@keyframes gr-flash {
    30% {
        background: var(--t-surface-eaf2ff);
    }
}

.gr-list-item.is-leaving {
    opacity: 0;
    transform: translateX(20px);
}

.gr-list-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    color: var(--t-text-7b8798);
    font-size: 12.5px;
}

.gr-list-text strong {
    color: var(--t-text-26354a);
    font-size: 13.5px;
}

.gr-list-edit {
    display: flex;
    align-items: center;
    gap: 3px;
    opacity: 0.35;
    transition: opacity 0.2s ease;
}

.gr-list-item:hover .gr-list-edit,
.gr-list-edit:focus-within {
    opacity: 1;
}

@media (hover: none) {

    .gr-list-edit {
        opacity: 1;
    }

}

.gr-mini {
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1.5px solid var(--color);
    border-radius: 6px;
    background: transparent;
    color: var(--color);
    font-size: 11px;
    font-weight: 900;
    font-family: inherit;
    cursor: pointer;
}

.gr-mini.is-active,
.gr-mini:hover {
    background: var(--color);
    color: #FFFFFF;
}

.gr-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gr-color {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 3px solid var(--t-surface-ffffff);
    border-radius: 50%;
    background: var(--swatch);
    box-shadow: 0 0 0 1px var(--t-border-dce4f0);
    cursor: pointer;
    transition: transform 0.2s var(--gr-spring);
}

.gr-color:hover {
    transform: scale(1.1);
}

.gr-color.is-active {
    box-shadow: 0 0 0 2px var(--swatch);
    transform: scale(1.12);
}


/* ---------- Dialog ---------- */

.gr-modal-card {
    text-align: left;
}

.gr-modal-card h3 {
    margin: 0 0 14px;
    color: var(--t-text-26354a);
}

.gr-name-input {
    width: 100%;
    margin-bottom: 12px;
    font-size: 15px;
}

.gr-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 150px;
    margin-bottom: 18px;
    overflow-y: auto;
}

.gr-preset {
    padding: 6px 11px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 999px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-526175);
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.gr-preset:hover {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.wb-button-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    color: #FFFFFF;
}


/* ---------- Small screens ---------- */

@media (max-width: 1000px) {

    .gr-summary {
        grid-template-columns: 1fr 1fr;
    }

    .gr-distribution {
        grid-column: 1 / -1;
    }

}

@media (max-width: 640px) {

    .gr-layout {
        padding: 0 12px;
    }

    .gr-summary {
        grid-template-columns: 1fr;
    }

    .gr-heading {
        flex-direction: column;
        align-items: flex-start;
    }

}

@media (prefers-reduced-motion: reduce) {

    .gr-heading,
    .gr-overall,
    .gr-stat,
    .gr-distribution,
    .gr-subject,
    .gr-bar-fill,
    .gr-chip.is-new,
    .gr-chart-line,
    .gr-chart-dot,
    .gr-need-result {
        animation: none !important;
    }

}


/* ==========================================
   PLANNER
========================================== */

.pl-layout {
    max-width: 1300px;
    margin: 24px auto 60px;
    padding: 0 24px;
    box-sizing: border-box;
}

.pl-layout .pl-hidden {
    display: none !important;
}

.pl-layout .gr-login {
    margin-bottom: 20px;
}


/* ---------- Quick add ---------- */

.pl-add {
    margin-bottom: 18px;
    padding: 14px 16px;
    animation: gs-fade-up 0.45s var(--gr-ease) both;
}

.pl-add-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pl-add-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    fill: none;
    stroke: var(--t-text-3f72c5);
    stroke-width: 2.2;
    stroke-linecap: round;
}

.pl-add-input {
    flex: 1;
    min-width: 0;
    padding: 10px 4px;
    border: none;
    background: transparent;
    color: var(--t-text-26354a);
    font-size: 16px;
    font-family: inherit;
    outline: none;
}

.pl-add-options {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 14px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--t-border-e3e9f2);
}

.pl-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--t-text-7b8798);
    font-size: 11.5px;
    font-weight: 800;
}

.pl-parse-preview {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    min-height: 30px;
}

.pl-parse-label {
    color: var(--t-text-9aa5b5);
    font-size: 12px;
    font-weight: 700;
}

.pl-parse-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    font-size: 12px;
    font-weight: 700;
    animation: gr-pop 0.35s var(--gr-spring);
}

.pl-parse-chip svg,
.pl-tag svg,
.pl-day-item svg,
.pl-test-icon svg,
.pl-empty svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pl-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: var(--color);
}


/* ---------- Columns ---------- */

.pl-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 470px);
    gap: 18px;
    align-items: start;
}

.pl-tasks {
    padding: 14px;
    animation: gs-fade-up 0.45s 0.05s var(--gr-ease) both;
}

.pl-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 20px;
}


/* ---------- Filters ---------- */

.pl-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
    padding: 4px;
    border-radius: 12px;
    background: var(--t-surface-f3f6fa);
}

.pl-filter {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--t-text-7b8798);
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    white-space: nowrap;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.pl-filter:hover {
    color: var(--t-text-26354a);
}

.pl-filter.active {
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    box-shadow: 0 2px 8px var(--t-shadow-26354a-a10);
}

.pl-filter-count {
    min-width: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--t-surface-e5ebf4);
    font-size: 11px;
    line-height: 18px;
    box-sizing: border-box;
}

.pl-filter-count:empty {
    display: none;
}

.pl-filter.has-alert .pl-filter-count {
    background: var(--t-surface-e74c3c);
    color: #FFFFFF;
}


/* ---------- Task rows ---------- */

.pl-group {
    margin-bottom: 14px;
}

.pl-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 4px 8px;
    color: var(--t-text-526175);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.pl-group-title span {
    color: var(--t-text-9aa5b5);
}

.pl-group.is-overdue .pl-group-title {
    color: var(--t-text-d93636);
}

.pl-task {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    padding: 10px 10px 10px 12px;
    border: 1px solid var(--t-border-e3e9f2);
    border-radius: 13px;
    background: var(--t-surface-ffffff);
    animation: gs-fade-up 0.35s var(--gr-ease) both;
    animation-delay: calc(var(--i, 0) * 25ms);
    transition:
        transform 0.25s var(--gr-ease),
        box-shadow 0.2s ease,
        opacity 0.3s ease,
        background-color 0.3s ease;
}

.pl-task:hover {
    box-shadow: 0 6px 16px var(--t-shadow-26354a-a10);
}

.pl-task.is-high::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--t-surface-e74c3c);
}

.pl-task.is-low {
    opacity: 0.85;
}

.pl-task.is-new {
    animation: pl-new 0.6s var(--gr-spring) both;
}

@keyframes pl-new {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.96);
        background: var(--t-surface-eaf2ff);
    }
    60% {
        background: var(--t-surface-eaf2ff);
    }
}

.pl-task.is-leaving {
    opacity: 0;
    transform: translateX(30px);
}

.pl-task.is-dragging {
    opacity: 0.4;
}

.pl-check {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    padding: 0;
    border: 2px solid var(--t-border-dce4f0);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background-color 0.25s ease,
        transform 0.25s var(--gr-spring);
}

.pl-check:hover {
    border-color: var(--t-border-48a868);
    transform: scale(1.08);
}

.pl-check svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pl-check-mark {
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
    transition: stroke-dashoffset 0.35s 0.1s var(--gr-ease);
}

.pl-task.is-completing .pl-check,
.pl-task.is-done .pl-check {
    border-color: #22C55E;
    background: #22C55E;
    transform: scale(1.1);
}

.pl-task.is-completing .pl-check-mark,
.pl-task.is-done .pl-check-mark {
    stroke-dashoffset: 0;
}

.pl-task.is-completing {
    animation: pl-complete 0.65s var(--gr-ease) forwards;
}

@keyframes pl-complete {
    40% {
        background: var(--t-surface-eaf7ee);
    }
    100% {
        opacity: 0.4;
        transform: translateX(8px);
    }
}

.pl-task-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    border: none;
    background: none;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.pl-task-title {
    position: relative;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    color: var(--t-text-26354a);
    font-size: 14.5px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Strike-through draws across on completion */
.pl-task-title::after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 2px;
    background: var(--t-text-9aa5b5);
    transition: width 0.35s 0.15s var(--gr-ease);
}

.pl-task.is-completing .pl-task-title::after,
.pl-task.is-done .pl-task-title::after {
    width: 100%;
}

.pl-task.is-done .pl-task-title {
    color: var(--t-text-9aa5b5);
}

.pl-task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pl-task-meta:empty {
    display: none;
}

.pl-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-526175);
    font-size: 11.5px;
    font-weight: 700;
}

.pl-due.is-overdue { background: var(--t-surface-fff5f5); color: var(--t-text-d93636); }
.pl-due.is-today { background: var(--t-surface-fff9e8); color: var(--wb-unsaved); }
.pl-due.is-soon { background: var(--t-surface-eaf2ff); color: var(--t-text-3f72c5); }

.pl-flag {
    color: var(--t-text-d93636);
}

.pl-task-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pl-task:hover .pl-task-actions,
.pl-task-actions:focus-within {
    opacity: 1;
}

@media (hover: none) {

    .pl-task-actions {
        opacity: 1;
    }

}

.pl-school-test {
    border-style: dashed;
    border-color: var(--t-border-e2c7c7);
    background: var(--t-surface-fff5f5);
}

.pl-test-icon {
    display: flex;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--t-surface-e74c3c);
    color: #FFFFFF;
}

.pl-test-icon svg {
    width: 16px;
    height: 16px;
}

.pl-school-test .pl-task-body {
    cursor: default;
}

.pl-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 40px 16px;
    color: var(--t-text-9aa5b5);
    text-align: center;
    animation: gs-fade-up 0.4s var(--gr-ease) both;
}

.pl-empty svg {
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 50%;
    background: var(--t-surface-eaf7ee);
    color: var(--t-text-39a96b);
    stroke-width: 2.4;
}

.pl-empty .pl-check-mark {
    stroke-dashoffset: 0;
}

.pl-empty p {
    margin: 6px 0 0;
    font-size: 14px;
    font-weight: 600;
}


/* ---------- Progress ---------- */

.pl-progress {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    animation: gs-fade-up 0.45s 0.1s var(--gr-ease) both;
}

.pl-progress > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pl-ring {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    transform: rotate(-90deg);
}

.pl-ring .gr-ring-track {
    stroke-width: 10;
}

.pl-ring-fill {
    fill: none;
    stroke: var(--t-surface-3f72c5);
    stroke-width: 10;
    stroke-linecap: round;
    transition:
        stroke-dashoffset 0.7s var(--gr-ease),
        stroke 0.4s ease;
}

.pl-ring-fill.is-complete {
    stroke: #22C55E;
}

.pl-progress-value {
    color: var(--t-text-26354a);
    font-size: 24px;
    font-weight: 800;
}

.pl-progress-week {
    color: var(--t-text-9aa5b5);
    font-size: 12px;
    font-weight: 600;
}


/* ---------- Week view ---------- */

.pl-week {
    padding: 14px;
    animation: gs-fade-up 0.45s 0.15s var(--gr-ease) both;
}

.pl-week-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.pl-week-head h2 {
    flex: 1;
    margin: 0;
    color: var(--t-text-26354a);
    font-size: 15px;
    text-align: center;
}

.pl-today-button {
    padding: 6px 10px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 9px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-3f72c5);
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.pl-today-button.is-hidden {
    visibility: hidden;
}

.pl-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.pl-day {
    display: flex;
    flex-direction: column;
    min-height: 160px;
    padding: 6px 4px;
    border: 1px solid var(--t-border-e3e9f2);
    border-radius: 11px;
    background: var(--t-surface-f7f9fc);
    animation: gs-fade-up 0.35s var(--gr-ease) both;
    animation-delay: calc(var(--i) * 30ms);
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s var(--gr-ease);
}

.pl-day.is-past {
    opacity: 0.7;
}

.pl-day.is-today {
    border-color: var(--t-border-3f72c5);
    background: var(--t-surface-eaf2ff);
}

.pl-day.is-drop-target {
    border-color: #22C55E;
    border-style: dashed;
    background: var(--t-surface-eaf7ee);
    transform: scale(1.03);
}

.pl-day-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 6px;
    color: var(--t-text-7b8798);
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
}

.pl-day-head strong {
    color: var(--t-text-26354a);
    font-size: 16px;
}

.pl-day.is-today .pl-day-head strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--t-surface-3f72c5);
    color: #FFFFFF;
}

.pl-day-items {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pl-day-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 5px;
    overflow: hidden;
    border-radius: 6px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
    cursor: grab;
    box-shadow: 0 1px 2px var(--t-shadow-26354a-a08);
    transition: transform 0.15s ease;
}

.pl-day-item:hover {
    transform: translateY(-1px);
}

.pl-day-item > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.pl-day-item .pl-dot {
    width: 6px;
    height: 6px;
    flex-basis: 6px;
}

.pl-day-item.is-high {
    box-shadow: inset 2px 0 0 var(--t-surface-e74c3c), 0 1px 2px var(--t-shadow-26354a-a08);
}

.pl-day-item.is-done {
    color: var(--t-text-9aa5b5);
    text-decoration: line-through;
    cursor: pointer;
}

.pl-day-item.is-test {
    background: var(--t-surface-e74c3c);
    color: #FFFFFF;
    cursor: default;
}

.pl-day-item.is-test svg {
    width: 11px;
    height: 11px;
}

.pl-week-hint {
    margin-top: 10px;
    text-align: center;
}


/* ---------- Edit dialog ---------- */

.pl-edit {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.pl-edit .gr-input {
    width: 100%;
}

.pl-notes {
    resize: vertical;
    font-family: inherit;
}

.pl-edit-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.pl-edit-row .gr-input,
.pl-edit-row .gr-select {
    width: 100%;
}

.wb-button-danger-text {
    margin-right: auto;
    border-color: transparent;
    background: transparent;
    color: var(--t-text-d93636);
}

.wb-button-danger-text:hover {
    background: var(--t-surface-fff5f5);
}


/* ---------- Small screens ---------- */

@media (max-width: 1050px) {

    .pl-columns {
        grid-template-columns: 1fr;
    }

    .pl-side {
        position: static;
    }

}

@media (max-width: 640px) {

    .pl-layout {
        padding: 0 12px;
    }

    .pl-days {
        grid-template-columns: 1fr;
    }

    .pl-day {
        min-height: 0;
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
    }

    .pl-day-head {
        width: 44px;
        flex-shrink: 0;
    }

    .pl-day-items {
        flex: 1;
    }

    .pl-edit-row {
        grid-template-columns: 1fr;
    }

    .pl-parse-preview {
        margin-left: 0;
    }

}

@media (prefers-reduced-motion: reduce) {

    .pl-task,
    .pl-day,
    .pl-add,
    .pl-tasks,
    .pl-progress,
    .pl-week,
    .pl-parse-chip,
    .pl-empty {
        animation: none !important;
    }

}


/* ==========================================
   HOME PAGE
========================================== */

:root {
    --hm-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --hm-text: #1F2D42;
    --hm-muted: #5B6B82;
    --hm-glass: rgba(255, 255, 255, 0.72);
    --hm-glass-strong: rgba(255, 255, 255, 0.9);
    --hm-glass-border: rgba(255, 255, 255, 0.85);
    --hm-line: #DCE4F0;
    --hm-shadow: rgba(38, 53, 74, 0.10);
    --hm-shadow-strong: rgba(38, 53, 74, 0.18);
    --hm-dots: rgba(63, 114, 197, 0.16);
    --hm-blob-opacity: 0.55;
    --hm-blob-a: #7FB3F5;
    --hm-blob-b: #F5A3C7;
    --hm-blob-c: #8EE3C8;
    --hm-blob-d: #FFC98B;
    --hm-blue: #3F72C5;
    --hm-orange: #E07A2C;
    --hm-pink: #D9578F;
    --hm-teal: #1F9E8F;
    --hm-purple: #7C5CD6;
    --hm-green: #2F9E5B;
    --hm-red: #D93636;
}

:root[data-theme="dark"] {
    --hm-text: #E3E8EF;
    --hm-muted: #94A0B0;
    --hm-glass: rgba(36, 42, 50, 0.68);
    --hm-glass-strong: rgba(40, 47, 56, 0.92);
    --hm-glass-border: rgba(255, 255, 255, 0.07);
    --hm-line: #3A424D;
    --hm-shadow: rgba(0, 0, 0, 0.28);
    --hm-shadow-strong: rgba(0, 0, 0, 0.42);
    --hm-dots: rgba(150, 175, 215, 0.10);
    --hm-blob-opacity: 0.38;
    --hm-blob-a: #2B54A0;
    --hm-blob-b: #6E2F78;
    --hm-blob-c: #1E6458;
    --hm-blob-d: #7A5126;
    --hm-blue: #7A9DD7;
    --hm-orange: #F0A868;
    --hm-pink: #E88AB4;
    --hm-teal: #4CC3B4;
    --hm-purple: #A58CF0;
    --hm-green: #5BC98A;
    --hm-red: #F07575;
}


/* ---------- Background ---------- */

.hm-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.hm-blob-wrap {
    position: absolute;
    inset: 0;
    transition: transform 1.4s var(--hm-ease);
}

.hm-depth-1 { transform: translate3d(calc(var(--px, 0) * -24px), calc(var(--py, 0) * -24px), 0); }
.hm-depth-2 { transform: translate3d(calc(var(--px, 0) * 44px), calc(var(--py, 0) * 36px), 0); }
.hm-depth-3 { transform: translate3d(calc(var(--px, 0) * -70px), calc(var(--py, 0) * 60px), 0); }

.hm-blob {
    position: absolute;
    width: 46vmax;
    height: 46vmax;
    border-radius: 50%;
    opacity: var(--hm-blob-opacity);
    filter: blur(72px);
    will-change: transform;
    transition: background-color 0.6s ease, opacity 0.6s ease;
}

.hm-blob-a { top: -18vmax; left: -12vmax; background-color: var(--hm-blob-a); animation: hm-drift-a 28s ease-in-out infinite alternate; }
.hm-blob-b { top: -14vmax; right: -16vmax; background-color: var(--hm-blob-b); animation: hm-drift-b 34s ease-in-out infinite alternate; }
.hm-blob-c { bottom: -22vmax; left: 8vmax; background-color: var(--hm-blob-c); animation: hm-drift-c 31s ease-in-out infinite alternate; }
.hm-blob-d { top: 34vh; right: 4vmax; width: 30vmax; height: 30vmax; background-color: var(--hm-blob-d); animation: hm-drift-d 25s ease-in-out infinite alternate; }

@keyframes hm-drift-a { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
@keyframes hm-drift-b { to { transform: translate(-12vmax, 16vmax) scale(0.9); } }
@keyframes hm-drift-c { to { transform: translate(18vmax, -10vmax) scale(1.1); } }
@keyframes hm-drift-d { to { transform: translate(-16vmax, -8vmax) scale(1.2); } }

.hm-grain {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--hm-dots) 1px, transparent 1.5px);
    background-size: 24px 24px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 75%);
}

.home-page .topbar {
    z-index: 2;
}

.hm {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 8px 24px 90px;
    box-sizing: border-box;
    color: var(--hm-text);
}

.hm-hidden {
    display: none !important;
}


/* ---------- Entrance helpers ---------- */

.hm-reveal {
    animation: hm-rise 0.9s var(--hm-ease) var(--d, 0.1s) both;
}

@keyframes hm-rise {
    from { opacity: 0; translate: 0 16px; filter: blur(4px); }
    to { opacity: 1; translate: 0 0; filter: blur(0); }
}

.hm-fade-in {
    animation: hm-fade 0.5s var(--hm-ease) both;
}

@keyframes hm-fade {
    from { opacity: 0; translate: 0 6px; }
    to { opacity: 1; translate: 0 0; }
}

.hm-on-scroll {
    opacity: 0;
}

.hm-on-scroll.is-in {
    animation: hm-card-in 0.85s var(--hm-ease) var(--d, 0s) both;
}

@keyframes hm-card-in {
    from { opacity: 0; translate: 0 28px; scale: 0.97; }
    to { opacity: 1; translate: 0 0; scale: 1; }
}


/* ---------- Hero ---------- */

.hm-hero {
    text-align: center;
    padding: 34px 0 38px;
}

.hm-date {
    margin: 0 0 14px;
    color: var(--hm-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hm-greeting {
    margin: 0;
    min-height: 1.15em;
    color: var(--hm-text);
    font-size: clamp(34px, 5.6vw, 62px);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.12;
}

.hm-word {
    display: inline-block;
    white-space: nowrap;
}

.hm-letter {
    display: inline-block;
    animation: hm-letter-in 0.75s var(--hm-ease) calc(var(--i) * 26ms + 0.12s) both;
}

@keyframes hm-letter-in {
    from { opacity: 0; transform: translateY(0.5em) rotate(8deg); filter: blur(6px); }
    to { opacity: 1; transform: none; filter: blur(0); }
}

.hm-name .hm-letter {
    color: color-mix(in oklab, var(--hm-blue) calc(100% - var(--t, 0) * 100%), var(--hm-pink));
}

.hm-summary {
    max-width: 640px;
    min-height: 1.5em;
    margin: 16px auto 0;
    color: var(--hm-muted);
    font-size: 18px;
    line-height: 1.5;
}

.hm-cta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hm-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    overflow: hidden;
    border: 1px solid var(--hm-glass-border);
    border-radius: 999px;
    background: var(--hm-glass);
    color: var(--hm-text);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 22px var(--hm-shadow);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: transform 0.3s var(--hm-ease), box-shadow 0.3s ease;
}

.hm-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px var(--hm-shadow-strong);
}

.hm-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.3s var(--hm-ease);
}

.hm-button:hover svg {
    transform: translateX(4px);
}

.hm-button-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--pa-4a80d8, #4A80D8), #7C5CD6);
    color: #FFFFFF;
}

.hm-button-primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
    transform: translateX(-120%);
    animation: hm-shine 4.5s ease-in-out 1.6s infinite;
}

@keyframes hm-shine {
    0%, 70% { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}


/* ---------- Today widgets ---------- */

.hm-today {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    grid-template-areas:
        "tasks class tests"
        "tasks grades grades";
    gap: 18px;
    margin-bottom: 64px;
}

#hmTasks { grid-area: tasks; }
#hmClass { grid-area: class; }
#hmTests { grid-area: tests; }
#hmGrades { grid-area: grades; }

.hm-widget {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--hm-glass-border);
    border-radius: 22px;
    background: var(--hm-glass);
    box-shadow: 0 12px 32px var(--hm-shadow);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-sizing: border-box;
    transition: transform 0.35s var(--hm-ease), box-shadow 0.35s ease;
}

.hm-widget:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px var(--hm-shadow-strong);
}

.hm-widget-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.hm-widget-head h3 {
    flex: 1;
    margin: 0;
    color: var(--hm-text);
    font-size: 15px;
    font-weight: 700;
}

.hm-widget-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 11px;
    background: color-mix(in srgb, var(--tone) 15%, transparent);
    color: var(--tone);
}

.hm-tone-blue { --tone: var(--hm-blue); }
.hm-tone-orange { --tone: var(--hm-orange); }
.hm-tone-green { --tone: var(--hm-green); }
.hm-tone-purple { --tone: var(--hm-purple); }

.hm-widget svg,
.hm-card svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hm-widget-icon svg {
    width: 19px;
    height: 19px;
}

.hm-widget-link {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--hm-muted);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.3s var(--hm-ease);
}

.hm-widget-link svg {
    width: 17px;
    height: 17px;
}

.hm-widget-link:hover {
    background: color-mix(in srgb, var(--hm-blue) 12%, transparent);
    color: var(--hm-blue);
    transform: translateX(2px);
}

.hm-widget-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hm-skeleton {
    height: 14px;
    margin-bottom: 12px;
    border-radius: 7px;
    background: linear-gradient(90deg, var(--hm-line) 25%, color-mix(in srgb, var(--hm-line) 40%, transparent) 50%, var(--hm-line) 75%);
    background-size: 200% 100%;
    animation: hm-shimmer 1.3s linear infinite;
}

.hm-skeleton-short { width: 60%; }

.hm-skeleton-ring {
    width: 96px;
    height: 96px;
    border-radius: 50%;
}

@keyframes hm-shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.hm-empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    color: var(--hm-muted);
}

.hm-empty > svg {
    width: 26px;
    height: 26px;
    color: var(--hm-blue);
    opacity: 0.8;
}

.hm-empty p {
    margin: 2px 0 4px;
    font-size: 14.5px;
    line-height: 1.5;
}

.hm-text-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    padding-top: 8px;
    color: var(--hm-blue);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
}

.hm-text-link svg {
    width: 15px;
    height: 15px;
    transition: transform 0.3s var(--hm-ease);
}

.hm-text-link:hover svg {
    transform: translateX(4px);
}


/* Next class */

.hm-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hm-blue) 13%, transparent);
    color: var(--hm-blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.hm-badge svg {
    width: 14px;
    height: 14px;
}

.hm-badge-live {
    background: color-mix(in srgb, var(--hm-red) 13%, transparent);
    color: var(--hm-red);
}

.hm-badge-calm {
    background: color-mix(in srgb, var(--hm-green) 14%, transparent);
    color: var(--hm-green);
    letter-spacing: 0.02em;
    text-transform: none;
}

.hm-live-dot {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.hm-live-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: currentColor;
    animation: hm-ping 1.8s ease-out infinite;
}

@keyframes hm-ping {
    from { transform: scale(1); opacity: 0.6; }
    to { transform: scale(3); opacity: 0; }
}

.hm-class-subject {
    margin: 12px 0 4px;
    color: var(--hm-text);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.hm-class-subject.is-small {
    font-size: 21px;
}

.hm-class-meta,
.hm-countdown,
.hm-class-after {
    margin: 0;
    color: var(--hm-muted);
    font-size: 13.5px;
    line-height: 1.5;
}

.hm-countdown {
    margin-top: 6px;
    color: var(--hm-text);
    font-weight: 700;
}

.hm-class-after {
    margin-top: auto;
    padding-top: 10px;
}

.hm-progress {
    height: 8px;
    margin-top: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--hm-line);
}

.hm-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--hm-blue), var(--hm-teal));
    transform-origin: left center;
    transition: transform 1.3s var(--hm-ease);
}


/* Tests */

.hm-tests {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hm-test {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 14px;
    animation: hm-slide-in 0.55s var(--hm-ease) calc(var(--i, 0) * 70ms + 0.05s) both;
    transition: background-color 0.2s ease;
}

.hm-test:hover {
    background: color-mix(in srgb, var(--hm-orange) 8%, transparent);
}

@keyframes hm-slide-in {
    from { opacity: 0; translate: -10px 0; }
    to { opacity: 1; translate: 0 0; }
}

.hm-test-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 12px;
    background: color-mix(in srgb, var(--hm-orange) 12%, transparent);
    color: var(--hm-orange);
    line-height: 1.05;
}

.hm-test-date strong {
    font-size: 18px;
}

.hm-test-date span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.hm-test.is-next .hm-test-date {
    background: linear-gradient(140deg, #F0A050, #E06A2C);
    color: #FFFFFF;
    box-shadow: 0 6px 16px rgba(224, 122, 44, 0.32);
}

.hm-test-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.hm-test-text strong {
    color: var(--hm-text);
    font-size: 14.5px;
}

.hm-test-text span {
    overflow: hidden;
    color: var(--hm-muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hm-test-when {
    flex-shrink: 0;
    color: var(--hm-muted);
    font-size: 12.5px;
    font-weight: 700;
}

.hm-test.is-soon .hm-test-when {
    color: var(--hm-orange);
}


/* Tasks */

.hm-task-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.hm-task-progress .hm-progress {
    flex: 1;
    margin: 0;
}

.hm-task-progress .hm-progress-fill {
    background: linear-gradient(90deg, var(--hm-green), var(--hm-teal));
}

.hm-progress-fill.is-complete {
    background: linear-gradient(90deg, var(--hm-green), var(--hm-teal), var(--hm-green));
    background-size: 200% 100%;
    animation: hm-flow 2.4s linear infinite;
}

@keyframes hm-flow {
    to { background-position: -200% 0; }
}

.hm-task-count {
    color: var(--hm-muted);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.hm-tasks {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hm-task {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 8px;
    border-radius: 13px;
    animation: hm-slide-in 0.5s var(--hm-ease) both;
    transition: background-color 0.2s ease;
}

.hm-task:nth-child(2) { animation-delay: 0.06s; }
.hm-task:nth-child(3) { animation-delay: 0.12s; }
.hm-task:nth-child(4) { animation-delay: 0.18s; }
.hm-task:nth-child(5) { animation-delay: 0.24s; }
.hm-task:nth-child(6) { animation-delay: 0.30s; }

.hm-task:hover {
    background: color-mix(in srgb, var(--hm-green) 7%, transparent);
}

.hm-check {
    position: relative;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    padding: 0;
    border: 2px solid var(--hm-line);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s var(--hm-ease);
}

.hm-task.is-high .hm-check {
    border-color: color-mix(in srgb, var(--hm-red) 55%, var(--hm-line));
}

.hm-check:hover {
    border-color: var(--hm-green);
    transform: scale(1.08);
}

.hm-check svg {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    width: 15px;
    height: 15px;
    stroke: #FFFFFF;
    stroke-width: 2.6;
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
    transition: stroke-dashoffset 0.35s var(--hm-ease) 0.05s;
}

.hm-task.is-done .hm-check {
    border-color: var(--hm-green);
    background: var(--hm-green);
}

.hm-task.is-done .hm-check svg {
    stroke-dashoffset: 0;
}

.hm-task.is-popping .hm-check {
    animation: hm-pop 0.45s var(--hm-ease);
}

@keyframes hm-pop {
    40% { transform: scale(1.25); }
    to { transform: scale(1); }
}

.hm-burst {
    position: absolute;
    inset: 50% auto auto 50%;
    pointer-events: none;
}

.hm-burst i {
    position: absolute;
    top: -2.5px;
    left: -2.5px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--hm-green);
    opacity: 0;
}

.hm-burst i:nth-child(1) { --a: 0deg; }
.hm-burst i:nth-child(2) { --a: 45deg; background: var(--hm-teal); }
.hm-burst i:nth-child(3) { --a: 90deg; background: #EAB308; }
.hm-burst i:nth-child(4) { --a: 135deg; background: var(--hm-pink); }
.hm-burst i:nth-child(5) { --a: 180deg; }
.hm-burst i:nth-child(6) { --a: 225deg; background: var(--hm-blue); }
.hm-burst i:nth-child(7) { --a: 270deg; background: #EAB308; }
.hm-burst i:nth-child(8) { --a: 315deg; background: var(--hm-purple); }

.hm-task.is-popping .hm-burst i {
    animation: hm-burst 0.6s ease-out forwards;
}

@keyframes hm-burst {
    from { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); }
    to { opacity: 0; transform: rotate(var(--a)) translateY(-19px) scale(0.4); }
}

.hm-task-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.hm-task-title {
    align-self: flex-start;
    max-width: 100%;
    color: var(--hm-text);
    font-size: 14.5px;
    font-weight: 600;
    overflow-wrap: anywhere;
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0 55%;
    background-repeat: no-repeat;
    background-size: 0% 1.5px;
    transition: background-size 0.4s var(--hm-ease), color 0.3s ease, opacity 0.3s ease;
}

.hm-task.is-done .hm-task-title {
    background-size: 100% 1.5px;
    color: var(--hm-muted);
    opacity: 0.75;
}

.hm-task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
}

.hm-task-overdue {
    color: var(--hm-red);
    font-weight: 700;
    transition: opacity 0.3s ease;
}

.hm-task-overdue.is-hidden {
    opacity: 0.4;
}

.hm-task-subject {
    padding: 1px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color) 15%, transparent);
    color: var(--color);
    font-weight: 700;
}

.hm-task-flag {
    color: var(--hm-red);
}

.hm-task-flag svg {
    width: 15px;
    height: 15px;
}

#hmTasks.is-celebrating {
    animation: hm-celebrate 1.2s ease-out;
}

@keyframes hm-celebrate {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--hm-green) 45%, transparent), 0 12px 32px var(--hm-shadow); }
    100% { box-shadow: 0 0 0 18px transparent, 0 12px 32px var(--hm-shadow); }
}


/* Grades */

.hm-grades {
    display: flex;
    align-items: center;
    gap: 22px;
}

.hm-grade-ring {
    position: relative;
    display: grid;
    place-items: center;
    width: 108px;
    height: 108px;
    flex-shrink: 0;
}

.hm-grade-ring svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.hm-ring-track {
    fill: none;
    stroke: var(--hm-line);
    stroke-width: 9;
}

.hm-ring-fill {
    fill: none;
    stroke: var(--ring);
    stroke-width: 9;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.4s var(--hm-ease);
}

.hm-grade-value {
    color: var(--hm-text);
    font-size: 25px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.hm-grade-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.hm-grade-label {
    color: var(--hm-text);
    font-size: 18px;
    font-weight: 800;
}

.hm-grade-label.is-failing {
    color: var(--hm-red);
}

.hm-grade-sub {
    color: var(--hm-muted);
    font-size: 13px;
}

.hm-grade-latest {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    color: var(--hm-muted);
    font-size: 13px;
}

.hm-chip {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: var(--color);
    color: #FFFFFF;
    font-size: 12.5px;
    font-weight: 800;
}


/* ---------- Feature cards ---------- */

.hm-section-title {
    margin: 0 0 22px;
    color: var(--hm-text);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-align: center;
}

.hm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.hm-card {
    --mx: 50%;
    --my: 50%;
    --rx: 0deg;
    --ry: 0deg;
    --lift: 0px;
    position: relative;
    display: block;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--hm-glass-border);
    border-radius: 22px;
    background: var(--hm-glass);
    color: var(--hm-text);
    text-decoration: none;
    box-shadow: 0 10px 28px var(--hm-shadow);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--lift));
    transition: transform 0.25s var(--hm-ease), box-shadow 0.35s ease, border-color 0.35s ease;
}

.hm-card:hover,
.hm-card:focus-visible {
    --lift: -6px;
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    box-shadow: 0 20px 44px var(--hm-shadow-strong), 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
    outline: none;
}

.hm-card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(280px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.hm-card:hover .hm-card-glow {
    opacity: 1;
}

.hm-card-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    border-radius: 15px;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent);
    transition: transform 0.4s var(--hm-ease), background-color 0.3s ease;
}

.hm-card:hover .hm-card-icon {
    background: color-mix(in srgb, var(--accent) 22%, transparent);
    transform: translateY(-2px) scale(1.05);
}

.hm-card-icon svg {
    width: 26px;
    height: 26px;
    overflow: visible;
}

.hm-card h3 {
    position: relative;
    margin: 0 0 6px;
    color: var(--hm-text);
    font-size: 19px;
    font-weight: 800;
}

.hm-card p {
    position: relative;
    margin: 0;
    color: var(--hm-muted);
    font-size: 14.5px;
    line-height: 1.5;
}

/* Icon micro-animations on hover */

.hm-card[data-anim="flip"]:hover svg { animation: hm-icon-flip 0.8s var(--hm-ease); }
.hm-card[data-anim="wiggle"]:hover svg { animation: hm-icon-wiggle 0.7s ease; }
.hm-card[data-anim="bounce"]:hover svg { animation: hm-icon-bounce 0.7s var(--hm-ease); }
.hm-card[data-anim="write"]:hover svg { animation: hm-icon-write 0.9s ease; }
.hm-card[data-anim="pulse"]:hover svg { animation: hm-icon-pulse 1s ease; }

.hm-card .hm-bar {
    transform-box: fill-box;
    transform-origin: bottom;
}

.hm-card[data-anim="grow"]:hover .hm-bar { animation: hm-icon-grow 0.7s var(--hm-ease) both; }
.hm-card[data-anim="grow"]:hover .hm-bar-2 { animation-delay: 0.07s; }
.hm-card[data-anim="grow"]:hover .hm-bar-3 { animation-delay: 0.14s; }
.hm-card[data-anim="grow"]:hover .hm-bar-4 { animation-delay: 0.21s; }

.hm-card .hm-tick,
.hm-card .hm-draw {
    stroke-dasharray: 30;
    stroke-dashoffset: 0;
}

.hm-card:hover .hm-tick,
.hm-card:hover .hm-draw {
    animation: hm-icon-draw 0.8s var(--hm-ease) both;
}

@keyframes hm-icon-flip {
    from { transform: perspective(200px) rotateX(0); }
    to { transform: perspective(200px) rotateX(360deg); }
}

@keyframes hm-icon-wiggle {
    20% { transform: rotate(-12deg); }
    45% { transform: rotate(10deg); }
    70% { transform: rotate(-5deg); }
    to { transform: rotate(0); }
}

@keyframes hm-icon-bounce {
    30% { transform: translateY(-5px) scale(1.04, 0.96); }
    55% { transform: translateY(0) scale(0.96, 1.04); }
    75% { transform: translateY(-2px); }
    to { transform: none; }
}

@keyframes hm-icon-write {
    25% { transform: translate(-2px, 2px) rotate(-8deg); }
    50% { transform: translate(2px, -1px) rotate(4deg); }
    75% { transform: translate(-1px, 1px) rotate(-3deg); }
    to { transform: none; }
}

@keyframes hm-icon-pulse {
    30% { transform: scale(1.12); filter: drop-shadow(0 0 4px var(--accent)); }
    to { transform: none; filter: none; }
}

@keyframes hm-icon-grow {
    from { transform: scaleY(0.2); }
    to { transform: scaleY(1); }
}

@keyframes hm-icon-draw {
    from { stroke-dashoffset: 30; }
    to { stroke-dashoffset: 0; }
}


/* ---------- Responsive ---------- */

@media (max-width: 980px) {

    .hm-today {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "class tests"
            "tasks tasks"
            "grades grades";
    }

    .hm-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 640px) {

    .hm {
        padding: 0 16px 70px;
    }

    .hm-hero {
        padding: 20px 0 28px;
    }

    .hm-summary {
        font-size: 16px;
    }

    .hm-today {
        grid-template-columns: 1fr;
        grid-template-areas:
            "class"
            "tasks"
            "tests"
            "grades";
        margin-bottom: 44px;
    }

    .hm-grades {
        gap: 16px;
    }

    .hm-grid {
        gap: 12px;
    }

    .hm-card {
        padding: 16px;
        border-radius: 18px;
    }

    .hm-card-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 12px;
        border-radius: 13px;
    }

    .hm-card h3 {
        font-size: 16px;
    }

    .hm-card p {
        font-size: 13px;
    }

}


/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {

    .hm-blob,
    .hm-button-primary::after,
    .hm-live-dot::after,
    .hm-skeleton,
    .hm-progress-fill.is-complete {
        animation: none !important;
    }

    .hm-letter,
    .hm-reveal,
    .hm-fade-in,
    .hm-on-scroll.is-in,
    .hm-test,
    .hm-task,
    .hm-card svg,
    .hm-card svg * {
        animation: none !important;
    }

    .hm-on-scroll {
        opacity: 1;
    }

    .hm-card,
    .hm-widget {
        transform: none !important;
    }

}


/* ==========================================
   HOMEWORK
   (tick button and burst are shared with the home page: .hm-check)
========================================== */

.hw-layout {
    max-width: 920px;
    margin: 24px auto 70px;
    padding: 0 24px;
    box-sizing: border-box;
}

.hw-hidden {
    display: none !important;
}

.hw-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.hw-toolbar .pl-filters {
    margin: 0;
}

.hw-subject-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--t-text-7b8798);
    font-size: 13px;
    font-weight: 700;
}


/* ---------- Groups ---------- */

.hw-group + .hw-group {
    margin-top: 26px;
}

.hw-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px 4px;
    color: var(--t-text-7b8798);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hw-group-title span {
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--t-surface-f7f9fc);
    letter-spacing: 0;
}

.hw-group-title.is-alert {
    color: var(--t-text-d93636);
}

.hw-group-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


/* ---------- Item ---------- */

.hw-item {
    position: relative;
    display: flex;
    gap: 14px;
    padding: 18px 18px 16px 20px;
    overflow: hidden;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 18px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 8px 24px var(--t-shadow-26354a-a06);
    animation: hw-item-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) calc(min(var(--i, 0), 8) * 50ms) both;
    transition:
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.3s ease,
        opacity 0.45s ease;
}

.hw-item::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: var(--color);
}

.hw-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px var(--t-shadow-26354a-a10);
}

@keyframes hw-item-in {
    from { opacity: 0; translate: 0 12px; }
    to { opacity: 1; translate: 0 0; }
}

.hw-item.is-completing {
    animation: hw-item-out 0.7s ease forwards;
    pointer-events: none;
}

@keyframes hw-item-out {
    0%, 45% { opacity: 1; translate: 0 0; }
    100% { opacity: 0; translate: 24px 0; }
}

.hw-check {
    margin-top: 2px;
}

.hw-item.is-done .hm-check {
    border-color: var(--hm-green);
    background: var(--hm-green);
}

.hw-item.is-done .hm-check svg {
    stroke-dashoffset: 0;
}

.hw-item.is-popping .hm-check {
    animation: hm-pop 0.45s var(--hm-ease);
}

.hw-item.is-popping .hm-burst i {
    animation: hm-burst 0.6s ease-out forwards;
}

.hw-body {
    flex: 1;
    min-width: 0;
}

.hw-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.hw-subject {
    padding: 2px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color) 14%, transparent);
    color: var(--color);
    font-size: 12px;
    font-weight: 800;
}

.hw-due {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--t-text-7b8798);
    font-size: 12.5px;
    font-weight: 700;
}

.hw-due svg,
.hw-teacher svg,
.hw-chip svg,
.hw-file svg,
.hw-empty svg,
.hw-drop svg,
.hw-form-file-icon svg,
.hw-viewer svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hw-due svg {
    width: 14px;
    height: 14px;
}

.hw-due.is-today,
.hw-due.is-soon {
    color: var(--hm-orange);
}

.hw-due.is-overdue {
    color: var(--t-text-d93636);
}

.hw-item.is-done .hw-due {
    color: var(--t-text-9aa5b5);
}

.hw-title {
    display: inline;
    margin: 0;
    color: var(--t-text-26354a);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0 55%;
    background-repeat: no-repeat;
    background-size: 0% 1.5px;
    transition: background-size 0.4s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease;
}

.hw-item.is-done .hw-title {
    background-size: 100% 1.5px;
    color: var(--t-text-9aa5b5);
}

.hw-details {
    margin: 8px 0 0;
    color: var(--t-text-526175);
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-line;
    overflow-wrap: anywhere;
}


/* Attachments */

.hw-files {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.hw-thumb {
    width: 76px;
    height: 76px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    cursor: zoom-in;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.hw-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hw-thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px var(--t-shadow-26354a-a15);
}

.hw-thumb:hover img {
    transform: scale(1.08);
}

.hw-file {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 260px;
    padding: 8px 12px 8px 10px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.25s ease;
}

.hw-file:hover {
    border-color: var(--t-border-d93636);
    transform: translateY(-2px);
}

.hw-file svg {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    color: var(--t-text-d93636);
}

.hw-file span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hw-file strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hw-file small {
    color: var(--t-text-9aa5b5);
    font-size: 11.5px;
}


/* Footer */

.hw-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.hw-teacher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--t-text-7b8798);
    font-size: 13px;
}

.hw-teacher svg {
    width: 15px;
    height: 15px;
}

.hw-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.hw-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 999px;
    background: transparent;
    color: var(--t-text-3f72c5);
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.25s ease;
}

.hw-chip svg {
    width: 15px;
    height: 15px;
}

.hw-chip:hover:not(:disabled) {
    border-color: var(--t-border-5b8def);
    background: var(--t-surface-eaf2ff);
    transform: translateY(-1px);
}

.hw-chip:disabled {
    opacity: 0.6;
    cursor: progress;
}

.hw-chip.is-linked {
    border-color: transparent;
    background: color-mix(in srgb, var(--hm-green) 13%, transparent);
    color: var(--hm-green);
    animation: hw-linked 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes hw-linked {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: none; opacity: 1; }
}


/* ---------- Empty / loading ---------- */

.hw-empty {
    padding: 44px 24px;
    text-align: center;
    color: var(--t-text-7b8798);
}

.hw-empty svg {
    width: 38px;
    height: 38px;
    color: var(--t-text-3f72c5);
}

.hw-empty.is-happy svg {
    color: var(--hm-green);
    animation: hw-sparkle 2.4s ease-in-out infinite;
}

@keyframes hw-sparkle {
    50% { transform: rotate(45deg) scale(1.12); }
}

.hw-empty h2 {
    margin: 12px 0 6px;
    color: var(--t-text-26354a);
    font-size: 20px;
}

.hw-empty p {
    margin: 6px 0 0;
    font-size: 14.5px;
}

.hw-skeletons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hw-skeleton {
    height: 110px;
    background: linear-gradient(90deg, var(--t-surface-ffffff) 25%, var(--t-surface-f7f9fc) 50%, var(--t-surface-ffffff) 75%);
    background-size: 200% 100%;
    animation: hm-shimmer 1.3s linear infinite;
}


/* ---------- Form ---------- */

.hw-modal-card {
    width: min(560px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.hw-modal-card.is-shaking {
    animation: hw-shake 0.4s ease;
}

@keyframes hw-shake {
    20%, 60% { translate: -6px 0; }
    40%, 80% { translate: 6px 0; }
}

.hw-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.hw-form .gr-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 14.5px;
}

.hw-form-row {
    display: flex;
    gap: 12px;
}

.hw-grow {
    flex: 1;
}

.hw-form-details {
    resize: vertical;
    min-height: 74px;
    font-family: inherit;
}

.hw-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 18px;
    border: 2px dashed var(--t-border-c2cfdf);
    border-radius: 14px;
    color: var(--t-text-7b8798);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.hw-drop svg {
    width: 26px;
    height: 26px;
    color: var(--t-text-3f72c5);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.hw-drop strong {
    color: var(--t-text-26354a);
    font-size: 13.5px;
}

.hw-drop small {
    font-size: 12px;
    font-weight: 600;
}

.hw-drop:hover,
.hw-drop.is-over {
    border-color: var(--t-border-5b8def);
    background: var(--t-surface-eaf2ff);
}

.hw-drop.is-over {
    transform: scale(1.01);
}

.hw-drop:hover svg,
.hw-drop.is-over svg {
    transform: translateY(-3px);
}

.hw-form-files {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.hw-form-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 6px 6px 8px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 12px;
    animation: hw-item-in 0.3s ease both;
}

.hw-form-file img,
.hw-form-file-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 8px;
    object-fit: cover;
}

.hw-form-file-icon {
    display: grid;
    place-items: center;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-d93636);
}

.hw-form-file-icon svg {
    width: 22px;
    height: 22px;
}

.hw-form-file-name {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    color: var(--t-text-26354a);
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hw-form-file-name small {
    color: var(--t-text-9aa5b5);
    font-size: 11.5px;
    font-weight: 600;
}

.hw-form-error {
    min-height: 1em;
    margin: 0;
    color: var(--t-text-d93636);
    font-size: 13px;
    font-weight: 700;
}

.wb-button.is-busy {
    position: relative;
    color: transparent !important;
}

.wb-button.is-busy::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: hw-spin 0.7s linear infinite;
}

@keyframes hw-spin {
    to { transform: rotate(360deg); }
}


/* ---------- Attachment viewer ---------- */

.hw-viewer {
    position: fixed;
    inset: 0;
    z-index: 100002;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    background: rgba(10, 14, 20, 0.86);
    opacity: 0;
    visibility: hidden;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hw-viewer.visible {
    opacity: 1;
    visibility: visible;
}

.hw-viewer-figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: min(1100px, 100%);
    margin: 0;
}

.hw-viewer-figure img {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.hw-viewer-figure img.is-in {
    opacity: 1;
    transform: none;
}

.hw-viewer-figure figcaption {
    color: #D6DEE8;
    font-size: 13.5px;
}

.hw-viewer-close,
.hw-viewer-nav {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.hw-viewer-close:hover,
.hw-viewer-nav:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.06);
}

.hw-viewer-close {
    position: absolute;
    top: 20px;
    right: 20px;
}

.hw-viewer svg {
    width: 22px;
    height: 22px;
}

.hw-viewer.is-single .hw-viewer-nav {
    visibility: hidden;
}


/* ---------- Small screens / motion ---------- */

@media (max-width: 640px) {

    .hw-layout {
        padding: 0 16px;
    }

    .hw-item {
        padding: 14px 14px 14px 16px;
    }

    .hw-form-row {
        flex-direction: column;
    }

    .hw-viewer-nav {
        position: absolute;
        bottom: 24px;
    }

    .hw-viewer-nav.is-prev { left: calc(50% - 56px); }
    .hw-viewer-nav.is-next { right: calc(50% - 56px); }

}

@media (prefers-reduced-motion: reduce) {

    .hw-item,
    .hw-item.is-completing,
    .hw-empty.is-happy svg,
    .hw-skeleton,
    .hw-form-file,
    .hw-modal-card.is-shaking {
        animation: none !important;
    }

}


/* ==========================================
   HEADER LAYOUT FIXES
   The profile picture lives in the account row (see navigation.js),
   and on phones the title moves below the corner buttons.
========================================== */

.account-buttons .profile-button.is-inline {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    flex-shrink: 0;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    margin-right: 4px !important;
    z-index: auto !important;
    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    animation: header-profile-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.account-buttons .profile-button.is-inline:hover {
    border-color: var(--t-border-5b8def) !important;
    transform: scale(1.06) !important;
}

@keyframes header-profile-in {
    from { opacity: 0; scale: 0.7; }
    to { opacity: 1; scale: 1; }
}

@media (max-width: 600px) {

    .topbar {
        padding-top: 70px;
    }

    .account-buttons {
        flex-wrap: nowrap;
    }

    .account-buttons .profile-button.is-inline {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        margin-right: 0 !important;
    }

    .welcome-message {
        min-width: 0;
        max-width: 48vw;
        overflow: hidden;
    }

}

@media (prefers-reduced-motion: reduce) {

    .account-buttons .profile-button.is-inline {
        animation: none;
    }

}

.hw-form-files:empty,
.hw-form-error:empty {
    display: none;
}


/* ==========================================
   ADMIN PANEL
========================================== */

:root {
    --adm-blue: var(--hm-blue);
    --adm-orange: var(--hm-orange);
    --adm-pink: var(--hm-pink);
    --adm-green: var(--hm-green);
    --adm-red: var(--hm-red);
    --adm-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.admin-page svg,
.admin-login-page svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.adm-hidden {
    display: none !important;
}

.adm-layout {
    max-width: 1120px;
    margin: 12px auto 80px;
    padding: 0 24px;
    box-sizing: border-box;
    color: var(--t-text-26354a);
}

.adm-rise {
    animation: adm-rise 0.7s var(--adm-ease) var(--d, 0s) both;
}

@keyframes adm-rise {
    from { opacity: 0; translate: 0 16px; }
    to { opacity: 1; translate: 0 0; }
}

.is-shaking {
    animation: adm-shake 0.42s ease;
}

@keyframes adm-shake {
    20%, 60% { translate: -7px 0; }
    40%, 80% { translate: 7px 0; }
}


/* Top bar link */

.account-buttons .adm-top-link {
    gap: 7px;
    min-width: 0;
    border: 1.5px solid var(--t-border-dce4f0);
    background: var(--t-surface-ffffff);
    color: var(--t-text-3f72c5);
    box-shadow: 0 3px 10px var(--t-shadow-26354a-a08);
}

.account-buttons .adm-top-link svg {
    width: 17px;
    height: 17px;
}

.account-buttons .adm-top-link:hover {
    background: var(--t-surface-f0f5ff);
}


/* ---------- Hero ---------- */

.adm-hero {
    padding: 18px 0 26px;
}

.adm-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--adm-blue) 13%, transparent);
    color: var(--adm-blue);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.adm-badge svg {
    width: 16px;
    height: 16px;
}

.adm-hero h1 {
    margin: 12px 0 6px;
    font-size: clamp(30px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.adm-hero p {
    margin: 0;
    color: var(--t-text-7b8798);
    font-size: 16px;
}


/* ---------- Stats ---------- */

.adm-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.adm-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 18px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 8px 24px var(--t-shadow-26354a-a06);
    transition: transform 0.3s var(--adm-ease), box-shadow 0.3s ease;
}

.adm-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px var(--t-shadow-26354a-a10);
}

.adm-stat-icon,
.adm-card-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 14px;
    background: color-mix(in srgb, var(--tone) 14%, transparent);
    color: var(--tone);
}

.adm-stat-icon svg,
.adm-card-icon svg {
    width: 24px;
    height: 24px;
}

.adm-stat-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.adm-stat-label {
    color: var(--t-text-7b8798);
    font-size: 12.5px;
    font-weight: 700;
}

.adm-stat-value {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
}

.adm-stat.is-missing .adm-stat-value {
    color: var(--adm-orange);
    font-size: 20px;
}

.adm-stat-sub {
    overflow: hidden;
    color: var(--t-text-9aa5b5);
    font-size: 12.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ---------- Cards ---------- */

.adm-card {
    position: relative;
    padding: 22px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 20px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 10px 28px var(--t-shadow-26354a-a08);
    box-sizing: border-box;
    min-width: 0;
}

.adm-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 22px;
    right: 22px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, var(--tone), color-mix(in srgb, var(--tone) 20%, transparent));
}

.adm-card-wide {
    margin-bottom: 20px;
}

.adm-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.adm-card-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.adm-card-head > div {
    flex: 1;
    min-width: 0;
}

.adm-card-head h2 {
    margin: 2px 0 3px;
    font-size: 19px;
    font-weight: 800;
}

.adm-card-head p {
    margin: 0;
    color: var(--t-text-7b8798);
    font-size: 13.5px;
    line-height: 1.45;
}

.adm-note {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-7b8798);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    cursor: help;
}

.adm-note.is-shared {
    background: color-mix(in srgb, var(--adm-green) 12%, transparent);
    color: var(--adm-green);
    cursor: default;
}

.adm-note svg {
    width: 14px;
    height: 14px;
}


/* ---------- Buttons & inputs ---------- */

.adm-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font-size: 14.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.25s var(--adm-ease), box-shadow 0.25s ease, opacity 0.2s ease, filter 0.2s ease;
}

.adm-button svg {
    width: 18px;
    height: 18px;
}

.adm-button-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--pa-4a80d8, #4A80D8), var(--pa-315faf, #315FAF));
    color: #FFFFFF;
    box-shadow: 0 6px 16px rgba(var(--pa-rgb-3f72c5, 63, 114, 197), 0.28);
}

.adm-button-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(var(--pa-rgb-3f72c5, 63, 114, 197), 0.34);
    filter: brightness(1.06);
}

.adm-button-primary:active:not(:disabled) {
    transform: translateY(0);
}

.adm-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.adm-button-full {
    width: 100%;
    margin-top: 4px;
}

.adm-button.is-busy {
    color: transparent;
    pointer-events: none;
}

.adm-button.is-busy::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 18px;
    height: 18px;
    margin: auto;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: hw-spin 0.7s linear infinite;
}

.adm-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.adm-row {
    display: flex;
    gap: 12px;
}

.adm-grow {
    flex: 1;
    min-width: 0;
}

.adm-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--t-text-7b8798);
    font-size: 12px;
    font-weight: 800;
}

.adm-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 11px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font-size: 14.5px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.adm-input:focus {
    outline: none;
    border-color: var(--t-border-5b8def);
    background: var(--t-surface-ffffff);
    box-shadow: 0 0 0 4px var(--t-shadow-3f72c5-a15);
}

.adm-input.is-invalid {
    border-color: var(--t-border-d93636);
    box-shadow: 0 0 0 4px var(--t-shadow-d93636-a10);
}

.adm-icon-button {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--t-text-9aa5b5);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.adm-icon-button svg {
    width: 17px;
    height: 17px;
}

.adm-item:hover .adm-icon-button,
.adm-icon-button:focus-visible {
    opacity: 1;
}

.adm-icon-button:hover {
    background: color-mix(in srgb, var(--adm-red) 12%, transparent);
    color: var(--adm-red);
}

@media (hover: none) {
    .adm-icon-button {
        opacity: 1;
    }
}

.adm-text-button {
    padding: 0;
    border: none;
    background: none;
    color: var(--t-text-3f72c5);
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    text-align: right;
    text-decoration: none;
    cursor: pointer;
}

.adm-text-button:hover {
    text-decoration: underline;
}


/* ---------- Timetable upload ---------- */

.adm-upload {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.adm-drop {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 14px 16px;
    border: 2px dashed var(--t-border-c2cfdf);
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.25s var(--adm-ease);
}

.adm-drop:hover,
.adm-drop.is-over {
    border-color: var(--t-border-5b8def);
    background: var(--t-surface-eaf2ff);
}

.adm-drop.is-over {
    transform: scale(1.01);
}

.adm-drop.has-file {
    border-style: solid;
    border-color: color-mix(in srgb, var(--adm-green) 55%, transparent);
    background: color-mix(in srgb, var(--adm-green) 7%, transparent);
}

.adm-drop-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    background: color-mix(in srgb, var(--adm-blue) 12%, transparent);
    color: var(--adm-blue);
    transition: transform 0.3s var(--adm-ease);
}

.adm-drop:hover .adm-drop-icon {
    transform: translateY(-3px);
}

.adm-drop.has-file .adm-drop-icon {
    background: color-mix(in srgb, var(--adm-green) 14%, transparent);
    color: var(--adm-green);
}

.adm-drop-icon svg {
    width: 21px;
    height: 21px;
}

.adm-drop-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.adm-drop-text strong {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adm-drop-text small {
    color: var(--t-text-9aa5b5);
    font-size: 12.5px;
}

.adm-status {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 0;
    margin: 0;
    font-size: 13.5px;
    font-weight: 700;
}

.adm-status:not(:empty) {
    margin-top: 12px;
    animation: hm-fade 0.35s ease both;
}

.adm-status svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.adm-status.is-success { color: var(--adm-green); }
.adm-status.is-error { color: var(--adm-red); }


/* Week preview */

.adm-preview:not(:empty) {
    margin-top: 18px;
    overflow-x: auto;
}

.adm-week {
    display: grid;
    grid-template-columns: 70px repeat(var(--cols), minmax(110px, 1fr));
    gap: 5px;
    min-width: 620px;
}

.adm-week-corner {
    display: block;
}

.adm-week-day {
    padding: 6px;
    color: var(--t-text-7b8798);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.adm-week-day.is-today {
    border-radius: 8px;
    background: color-mix(in srgb, var(--adm-blue) 13%, transparent);
    color: var(--adm-blue);
}

.adm-week-time {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--t-text-9aa5b5);
    font-size: 11.5px;
    line-height: 1.2;
}

.adm-week-time strong {
    color: var(--t-text-7b8798);
    font-size: 13px;
}

.adm-week-cell {
    padding: 8px 9px;
    overflow: hidden;
    border-radius: 9px;
    background: color-mix(in srgb, var(--adm-blue) 8%, var(--t-surface-ffffff));
    color: var(--t-text-26354a);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.3;
    text-overflow: ellipsis;
}

.adm-week-cell.is-today {
    background: color-mix(in srgb, var(--adm-blue) 16%, var(--t-surface-ffffff));
}

.adm-week-cell.is-free {
    background: transparent;
    color: var(--t-text-9aa5b5);
    font-weight: 400;
    text-align: center;
}

.adm-week.is-new .adm-week-cell {
    animation: adm-pop 0.45s var(--adm-ease) calc(var(--i) * 25ms) both;
}

@keyframes adm-pop {
    from { opacity: 0; scale: 0.85; }
    to { opacity: 1; scale: 1; }
}


/* ---------- Lists ---------- */

.adm-list-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 22px 0 8px;
    padding-top: 16px;
    border-top: 1px solid var(--t-border-dce4f0);
}

.adm-list-head h3 {
    margin: 0;
    color: var(--t-text-7b8798);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.adm-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.adm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 13px;
    transition: background-color 0.2s ease, opacity 0.25s ease, translate 0.25s ease;
}

.adm-item:hover {
    background: var(--t-surface-f7f9fc);
}

.adm-item.is-new {
    animation: adm-new 1.6s ease;
}

@keyframes adm-new {
    0% { opacity: 0; translate: 0 -6px; background: color-mix(in srgb, var(--tone) 18%, transparent); }
    20% { opacity: 1; translate: 0 0; }
    100% { background: transparent; }
}

.adm-item.is-leaving {
    opacity: 0;
    translate: 16px 0;
}

.adm-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 11px;
    background: color-mix(in srgb, var(--tone) 12%, transparent);
    color: var(--tone);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.05;
    text-transform: uppercase;
}

.adm-date strong {
    font-size: 17px;
}

.adm-item.is-soon .adm-date {
    background: var(--tone);
    color: #FFFFFF;
}

.adm-item-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.adm-item-text strong {
    font-size: 14px;
}

.adm-item-text > span {
    overflow: hidden;
    color: var(--t-text-7b8798);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adm-files {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: var(--t-text-9aa5b5);
}

.adm-files svg {
    width: 13px;
    height: 13px;
}

.adm-when {
    flex-shrink: 0;
    color: var(--t-text-9aa5b5);
    font-size: 12px;
    font-weight: 700;
}

.adm-item.is-soon .adm-when {
    color: var(--tone);
}

.adm-empty {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 14px 8px;
    color: var(--t-text-9aa5b5);
    font-size: 14px;
}

.adm-empty svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.adm-more {
    padding: 6px 8px 0;
    font-size: 13px;
    font-weight: 700;
}

.adm-more a {
    color: var(--t-text-3f72c5);
}


/* ---------- Responsive ---------- */

@media (max-width: 900px) {

    .adm-columns {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 640px) {

    .adm-layout {
        padding: 0 16px;
    }

    .adm-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .adm-card {
        padding: 18px 16px;
    }

    .adm-card-head {
        flex-wrap: wrap;
    }

    .adm-card-head > div {
        flex-basis: calc(100% - 60px);
    }

    .adm-note {
        margin-left: 60px;
        margin-top: -6px;
    }

    .adm-stat {
        padding: 12px 14px;
    }

    .adm-stat-icon {
        width: 40px;
        height: 40px;
    }

    .adm-stat-value {
        font-size: 20px;
    }

    .adm-upload,
    .adm-row {
        flex-direction: column;
    }

    .account-buttons .adm-top-link span {
        display: none;
    }

}


/* ==========================================
   ADMIN LOGIN
========================================== */

.al-wrap {
    display: flex;
    justify-content: center;
    padding: 20px 16px 80px;
}

.al-card {
    width: min(400px, 100%);
    padding: 34px 30px 26px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 24px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 24px 60px var(--t-shadow-26354a-a15);
    box-sizing: border-box;
    text-align: center;
    animation: adm-rise 0.7s var(--adm-ease) both;
}

.al-card.is-shaking {
    animation: adm-rise 0.7s var(--adm-ease) both, adm-shake 0.42s ease 0.5s;
}

.al-icon {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--pa-4a80d8, #4A80D8), #7C5CD6);
    color: #FFFFFF;
    box-shadow: 0 12px 26px rgba(var(--pa-rgb-4a80d8, 74, 128, 216), 0.35);
    animation: al-float 4s ease-in-out infinite;
}

.al-icon svg {
    width: 32px;
    height: 32px;
}

@keyframes al-float {
    50% { transform: translateY(-4px) rotate(-3deg); }
}

.al-card h1 {
    margin: 18px 0 6px;
    color: var(--t-text-26354a);
    font-size: 26px;
    font-weight: 800;
}

.al-sub {
    margin: 0 0 24px;
    color: var(--t-text-7b8798);
    font-size: 14px;
}

.al-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.al-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--t-text-7b8798);
    font-size: 12.5px;
    font-weight: 800;
}

.al-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.al-input-wrap > svg {
    position: absolute;
    left: 13px;
    width: 18px;
    height: 18px;
    color: var(--t-text-9aa5b5);
    pointer-events: none;
    transition: color 0.2s ease;
}

.al-input-wrap:focus-within > svg {
    color: var(--t-text-3f72c5);
}

.al-input-wrap input {
    width: 100%;
    padding: 12px 44px 12px 40px;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.al-input-wrap input:focus {
    outline: none;
    border-color: var(--t-border-5b8def);
    background: var(--t-surface-ffffff);
    box-shadow: 0 0 0 4px var(--t-shadow-3f72c5-a15);
}

.al-eye {
    position: absolute;
    right: 6px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--t-text-9aa5b5);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.al-eye:hover {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.al-eye svg {
    width: 18px;
    height: 18px;
}

.al-eye .al-eye-closed,
.al-eye.is-showing .al-eye-open {
    display: none;
}

.al-eye.is-showing .al-eye-closed {
    display: block;
}

.al-error {
    min-height: 0;
    margin: 0;
    color: var(--t-text-d93636);
    font-size: 13.5px;
    font-weight: 700;
    text-align: center;
}

.al-error:empty {
    display: none;
}

.al-submit {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    padding: 13px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pa-4a80d8, #4A80D8), var(--pa-315faf, #315FAF));
    color: #FFFFFF;
    font-size: 15.5px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(var(--pa-rgb-3f72c5, 63, 114, 197), 0.3);
    transition: transform 0.25s var(--adm-ease), box-shadow 0.25s ease, filter 0.2s ease;
}

.al-submit svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s var(--adm-ease);
}

.al-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(var(--pa-rgb-3f72c5, 63, 114, 197), 0.36);
    filter: brightness(1.06);
}

.al-submit:hover svg {
    transform: translateX(4px);
}

.al-submit.is-busy {
    color: transparent;
    pointer-events: none;
}

.al-submit.is-busy::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 18px;
    height: 18px;
    margin: auto;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: hw-spin 0.7s linear infinite;
}

.al-foot {
    margin: 22px 0 0;
    color: var(--t-text-7b8798);
    font-size: 13.5px;
}

.al-foot a {
    color: var(--t-text-3f72c5);
    font-weight: 700;
    text-decoration: none;
}

.al-foot a:hover {
    text-decoration: underline;
}


@media (prefers-reduced-motion: reduce) {

    .adm-rise,
    .adm-item.is-new,
    .adm-week.is-new .adm-week-cell,
    .al-card,
    .al-card.is-shaking,
    .al-icon,
    .is-shaking {
        animation: none !important;
    }

}


/* ==========================================
   CHANGE PASSWORD (profile)
========================================== */

.password-card {
    margin-top: 24px;
}

.password-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.password-form .profile-field input.is-invalid {
    border-color: var(--t-border-d93636);
    box-shadow: 0 0 0 4px var(--t-shadow-d93636-a10);
}

.password-meter {
    height: 5px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--t-border-dce4f0);
}

.password-meter span {
    display: block;
    height: 100%;
    width: calc(var(--level, 0) * 25%);
    border-radius: inherit;
    background: var(--color, transparent);
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s ease;
}

.password-meter-label {
    display: block;
    min-height: 16px;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
}

.password-button {
    padding: 12px 21px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--pa-4a80d8, #4A80D8), var(--pa-315faf, #315FAF));
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(var(--pa-rgb-3f72c5, 63, 114, 197), 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.password-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(var(--pa-rgb-3f72c5, 63, 114, 197), 0.32);
}

.password-button:disabled {
    opacity: 0.6;
    cursor: progress;
}

#passwordStatus {
    font-size: 13px;
    font-weight: 600;
}

#passwordStatus.is-ok {
    color: var(--t-text-39a96b);
}

#passwordStatus.is-error {
    color: var(--t-text-d93636);
}

@media (max-width: 640px) {

    .password-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

}


/* ==========================================
   QUIZZES (students)
========================================== */

.qz-layout {
    max-width: 960px;
    margin: 18px auto 80px;
    padding: 0 24px;
    box-sizing: border-box;
    color: var(--t-text-26354a);
}

.qz-hidden {
    display: none !important;
}

.qz-layout svg:not(.ps-deco-svg):not(.qz-flame-svg) {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.qz-enter {
    animation: qz-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes qz-enter {
    from { opacity: 0; translate: 0 14px; }
    to { opacity: 1; translate: 0 0; }
}

.qz-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 22px;
}

.qz-head h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.qz-sub {
    margin: 6px 0 0;
    color: var(--t-text-7b8798);
    font-size: 15px;
}

.qz-search {
    position: relative;
    display: flex;
    align-items: center;
    width: min(320px, 100%);
}

.qz-search svg {
    position: absolute;
    left: 13px;
    width: 18px;
    height: 18px;
    color: var(--t-text-9aa5b5);
    pointer-events: none;
}

.qz-search input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 12px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    font-size: 14.5px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.qz-search input:focus {
    outline: none;
    border-color: var(--t-border-5b8def);
    box-shadow: 0 0 0 4px var(--t-shadow-3f72c5-a15);
}


/* Professors */

.qz-professors {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.qz-professor {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 18px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    text-decoration: none;
    box-shadow: 0 8px 22px var(--t-shadow-26354a-a06);
    animation: qz-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) calc(min(var(--i, 0), 10) * 45ms) both;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.qz-professor::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(240px circle at 0% 0%, color-mix(in srgb, var(--color) 14%, transparent), transparent 70%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.qz-professor:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--color) 45%, transparent);
    box-shadow: 0 16px 34px var(--t-shadow-26354a-a12);
}

.qz-professor:hover::before {
    opacity: 1;
}

.qz-avatar {
    position: relative;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 16px;
    background: linear-gradient(140deg, var(--color), color-mix(in srgb, var(--color) 60%, #000));
    color: #FFFFFF;
    font-size: 17px;
    font-weight: 800;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--color) 35%, transparent);
}

.qz-avatar.is-large {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    font-size: 24px;
}

.qz-professor-text {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.qz-professor-text strong {
    font-size: 16px;
}

.qz-professor-text span {
    color: var(--color);
    font-size: 13.5px;
    font-weight: 700;
}

.qz-professor-meta {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    color: var(--t-text-9aa5b5);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.qz-mini-progress {
    width: 64px;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--t-border-dce4f0);
}

.qz-mini-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--color);
}

.qz-chevron {
    position: relative;
    color: var(--t-text-9aa5b5);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease;
}

.qz-chevron svg {
    width: 18px;
    height: 18px;
}

.qz-professor:hover .qz-chevron {
    color: var(--color);
    transform: translateX(3px);
}


/* Professor page */

.qz-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 16px;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    color: var(--t-text-7b8798);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.qz-back svg {
    width: 18px;
    height: 18px;
    transition: transform 0.25s ease;
}

.qz-back:hover {
    background: var(--t-surface-ffffff);
    color: var(--t-text-3f72c5);
}

.qz-back:hover svg {
    transform: translateX(-3px);
}

.qz-professor-hero {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 26px;
    padding: 22px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 22px;
    background:
        radial-gradient(500px circle at 0% 0%, color-mix(in srgb, var(--color) 16%, transparent), transparent 70%),
        var(--t-surface-ffffff);
    box-shadow: 0 10px 28px var(--t-shadow-26354a-a08);
}

.qz-professor-hero h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
}

.qz-professor-hero p {
    margin: 2px 0 0;
    color: var(--color);
    font-size: 15px;
    font-weight: 700;
}

.qz-hero-stats {
    display: flex;
    gap: 22px;
    margin-left: auto;
}

.qz-hero-stats span {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--t-text-9aa5b5);
    font-size: 12px;
    font-weight: 700;
}

.qz-hero-stats strong {
    color: var(--t-text-26354a);
    font-size: 22px;
}

.qz-chapter {
    margin-bottom: 24px;
    animation: qz-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) calc(min(var(--i, 0), 8) * 60ms) both;
}

.qz-chapter-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 800;
}

.qz-chapter-number {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 9px;
    background: var(--t-surface-ffffff);
    border: 1px solid var(--t-border-dce4f0);
    color: var(--t-text-7b8798);
    font-size: 13px;
}

.qz-chapter-count {
    margin-left: auto;
    color: var(--t-text-9aa5b5);
    font-size: 12.5px;
    font-weight: 700;
}

.qz-chapter-empty {
    margin: 0;
    padding: 14px 16px;
    border: 1px dashed var(--t-border-c2cfdf);
    border-radius: 14px;
    color: var(--t-text-9aa5b5);
    font-size: 14px;
}

.qz-quizzes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qz-quiz {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 16px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    text-decoration: none;
    box-shadow: 0 6px 18px var(--t-shadow-26354a-a05);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.qz-quiz:hover {
    transform: translateX(4px);
    border-color: color-mix(in srgb, var(--color) 40%, transparent);
    box-shadow: 0 12px 26px var(--t-shadow-26354a-a10);
}

.qz-quiz-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 13px;
    background: color-mix(in srgb, var(--color) 13%, transparent);
    color: var(--color);
}

.qz-quiz-icon svg {
    width: 22px;
    height: 22px;
}

.qz-quiz-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.qz-quiz-text strong {
    font-size: 15.5px;
}

.qz-quiz-text span {
    overflow: hidden;
    color: var(--t-text-7b8798);
    font-size: 13.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qz-quiz-text small {
    color: var(--t-text-9aa5b5);
    font-size: 12.5px;
    font-weight: 700;
}

.qz-quiz-side {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.qz-score {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 800;
}

.qz-score svg {
    width: 14px;
    height: 14px;
}

.qz-score.is-new { background: var(--t-surface-f7f9fc); color: var(--t-text-9aa5b5); font-weight: 700; }
.qz-score.is-great { background: color-mix(in srgb, #16A34A 15%, transparent); color: #16A34A; }
.qz-score.is-good { background: color-mix(in srgb, #65A30D 15%, transparent); color: #65A30D; }
.qz-score.is-okay { background: color-mix(in srgb, #D97706 15%, transparent); color: #D97706; }
.qz-score.is-low { background: color-mix(in srgb, #DC2626 13%, transparent); color: #DC2626; }

.qz-start {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 11px;
    background: var(--color);
    color: #FFFFFF;
    font-size: 13.5px;
    font-weight: 800;
    transition: filter 0.2s ease;
}

.qz-start svg {
    width: 15px;
    height: 15px;
}

.qz-quiz:hover .qz-start {
    filter: brightness(1.08);
}


/* Shared card + buttons */

.qz-card {
    padding: 30px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 24px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 16px 40px var(--t-shadow-26354a-a10);
    box-sizing: border-box;
}

.qz-eyebrow {
    margin: 0 0 8px;
    color: var(--color);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.qz-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 13px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    font-size: 15px;
    font-weight: 800;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, filter 0.2s ease;
}

.qz-button svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.qz-button:hover {
    transform: translateY(-2px);
}

.qz-button-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--color, var(--pa-3f72c5, #3F72C5)), color-mix(in srgb, var(--color, var(--pa-3f72c5, #3F72C5)) 70%, #000));
    color: #FFFFFF;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--color, var(--pa-3f72c5, #3F72C5)) 35%, transparent);
}

.qz-button-primary:hover {
    filter: brightness(1.07);
    box-shadow: 0 12px 26px color-mix(in srgb, var(--color, var(--pa-3f72c5, #3F72C5)) 42%, transparent);
}

.qz-button-primary:hover svg:last-child {
    transform: translateX(3px);
}

.qz-hint {
    margin: 14px 0 0;
    color: var(--t-text-9aa5b5);
    font-size: 13px;
}


/* Intro */

.qz-intro {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
}

.qz-intro-icon {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
    border-radius: 20px;
    background: linear-gradient(140deg, var(--color), color-mix(in srgb, var(--color) 60%, #000));
    color: #FFFFFF;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--color) 35%, transparent);
    animation: al-float 4s ease-in-out infinite;
}

.qz-intro-icon svg {
    width: 32px;
    height: 32px;
}

.qz-intro h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 800;
}

.qz-intro-text {
    margin: 0 0 14px;
    color: var(--t-text-7b8798);
    font-size: 15px;
    line-height: 1.5;
}

.qz-intro-facts {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 6px 0 24px;
}

.qz-intro-facts span {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-526175);
    font-size: 13px;
    font-weight: 700;
}


/* Playing */

.qz-play {
    max-width: 720px;
    margin: 0 auto;
}

.qz-play-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.qz-quit {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 12px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-7b8798);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.qz-quit:hover {
    border-color: var(--t-border-d93636);
    color: var(--t-text-d93636);
}

.qz-quit svg {
    width: 18px;
    height: 18px;
}

.qz-progress {
    flex: 1;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--t-border-dce4f0);
}

.qz-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--color), color-mix(in srgb, var(--color) 60%, #FFFFFF));
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.qz-counter {
    color: var(--t-text-7b8798);
    font-size: 14px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.qz-question-text {
    margin: 0 0 22px;
    font-size: clamp(19px, 2.6vw, 23px);
    font-weight: 800;
    line-height: 1.4;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.qz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qz-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--t-border-dce4f0);
    border-radius: 15px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    font-size: 15.5px;
    font-weight: 600;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    animation: qz-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i) * 55ms + 0.1s) both;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, opacity 0.3s ease;
}

.qz-option:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--color) 55%, transparent);
    background: color-mix(in srgb, var(--color) 6%, var(--t-surface-ffffff));
    transform: translateX(3px);
}

.qz-option:disabled {
    cursor: default;
}

.qz-letter {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-7b8798);
    font-size: 14px;
    font-weight: 800;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.qz-option-text {
    flex: 1;
    overflow-wrap: anywhere;
}

.qz-mark {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.qz-option.is-picked {
    border-color: var(--color);
}

.qz-option.is-picked .qz-letter {
    background: var(--color);
    color: #FFFFFF;
}

.qz-option.is-correct {
    border-color: #16A34A;
    background: color-mix(in srgb, #16A34A 9%, var(--t-surface-ffffff));
    animation: qz-correct 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.qz-option.is-correct .qz-letter {
    background: #16A34A;
    color: #FFFFFF;
}

.qz-option.is-wrong {
    border-color: #DC2626;
    background: color-mix(in srgb, #DC2626 8%, var(--t-surface-ffffff));
    animation: qz-wrong 0.45s ease;
}

.qz-option.is-wrong .qz-letter {
    background: #DC2626;
    color: #FFFFFF;
}

.qz-mark svg {
    display: none;
    width: 22px;
    height: 22px;
    stroke-width: 2.4;
}

.qz-option.is-correct .qz-mark svg:first-child {
    display: block;
    color: #16A34A;
}

.qz-option.is-wrong .qz-mark svg:last-child {
    display: block;
    color: #DC2626;
}

.qz-option.is-dimmed {
    opacity: 0.5;
}

@keyframes qz-correct {
    40% { transform: scale(1.025); }
    to { transform: none; }
}

@keyframes qz-wrong {
    20%, 60% { translate: -6px 0; }
    40%, 80% { translate: 6px 0; }
}

.qz-feedback:not(:empty) {
    margin-top: 20px;
    animation: qz-enter 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.qz-verdict {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
}

.qz-verdict.is-correct {
    background: color-mix(in srgb, #16A34A 11%, transparent);
    color: #15803D;
}

.qz-verdict.is-wrong {
    background: color-mix(in srgb, #DC2626 10%, transparent);
    color: #B91C1C;
}

:root[data-theme="dark"] .qz-verdict.is-correct { color: #4ADE80; }
:root[data-theme="dark"] .qz-verdict.is-wrong { color: #F87171; }

.qz-verdict div {
    display: flex;
    flex-direction: column;
}

.qz-verdict strong {
    font-size: 16px;
}

.qz-verdict span {
    font-size: 14px;
}

.qz-verdict-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background: currentColor;
}

.qz-verdict-icon svg {
    width: 19px;
    height: 19px;
    stroke: #FFFFFF;
    stroke-width: 2.6;
}

.qz-explanation {
    display: flex;
    gap: 10px;
    margin: 12px 0 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-526175);
    font-size: 14.5px;
    line-height: 1.5;
    white-space: pre-line;
}

.qz-explanation svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #D97706;
}

.qz-feedback .qz-button {
    width: 100%;
    margin-top: 16px;
}


/* Results */

.qz-results {
    max-width: 720px;
    margin: 0 auto;
}

.qz-score-card {
    position: relative;
    overflow: hidden;
    text-align: center;
}

.qz-score-card h1 {
    margin: 16px 0 4px;
    font-size: 26px;
    font-weight: 800;
}

.qz-results-sub {
    margin: 0;
    color: var(--t-text-7b8798);
    font-size: 15px;
}

.qz-ring {
    position: relative;
    display: grid;
    place-items: center;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.qz-ring svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.qz-ring-track {
    stroke: var(--t-border-dce4f0);
    stroke-width: 10;
}

.qz-ring-fill {
    stroke: var(--ring-color, var(--color));
    stroke-width: 10;
    transition: stroke-dashoffset 1.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.qz-score-card.is-great { --ring-color: #16A34A; }
.qz-score-card.is-good { --ring-color: #65A30D; }
.qz-score-card.is-okay { --ring-color: #D97706; }
.qz-score-card.is-low { --ring-color: #DC2626; }

.qz-ring-value {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qz-ring-value strong {
    font-size: 34px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.qz-ring-value small {
    color: var(--t-text-9aa5b5);
    font-size: 13.5px;
    font-weight: 700;
}

.qz-new-best {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
    color: #FFFFFF;
    font-size: 13.5px;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
    animation: qz-pop 0.6s cubic-bezier(0.22, 1.6, 0.36, 1) 0.9s both;
}

.qz-new-best svg {
    width: 16px;
    height: 16px;
}

@keyframes qz-pop {
    from { opacity: 0; scale: 0.5; }
    to { opacity: 1; scale: 1; }
}

.qz-result-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.qz-confetti i {
    position: absolute;
    top: -12px;
    left: calc(var(--x) * 1%);
    width: 8px;
    height: 12px;
    border-radius: 2px;
    background: var(--c);
    opacity: 0;
    animation: qz-fall 1.8s cubic-bezier(0.3, 0.6, 0.5, 1) var(--delay) forwards;
    pointer-events: none;
}

.qz-confetti i:nth-child(6n + 1) { --c: var(--pa-3f72c5, #3F72C5); }
.qz-confetti i:nth-child(6n + 2) { --c: #F59E0B; }
.qz-confetti i:nth-child(6n + 3) { --c: #D9578F; }
.qz-confetti i:nth-child(6n + 4) { --c: #16A34A; }
.qz-confetti i:nth-child(6n + 5) { --c: #7C5CD6; }
.qz-confetti i:nth-child(6n + 6) { --c: #0E8FB8; }

.qz-confetti i:nth-child(1) { --x: 6; --delay: 0.5s; --r: 220deg; }
.qz-confetti i:nth-child(2) { --x: 14; --delay: 0.7s; --r: -160deg; }
.qz-confetti i:nth-child(3) { --x: 21; --delay: 0.55s; --r: 300deg; }
.qz-confetti i:nth-child(4) { --x: 28; --delay: 0.8s; --r: -240deg; }
.qz-confetti i:nth-child(5) { --x: 35; --delay: 0.6s; --r: 180deg; }
.qz-confetti i:nth-child(6) { --x: 42; --delay: 0.9s; --r: -280deg; }
.qz-confetti i:nth-child(7) { --x: 49; --delay: 0.5s; --r: 260deg; }
.qz-confetti i:nth-child(8) { --x: 56; --delay: 0.75s; --r: -200deg; }
.qz-confetti i:nth-child(9) { --x: 63; --delay: 0.65s; --r: 320deg; }
.qz-confetti i:nth-child(10) { --x: 70; --delay: 0.85s; --r: -180deg; }
.qz-confetti i:nth-child(11) { --x: 77; --delay: 0.55s; --r: 240deg; }
.qz-confetti i:nth-child(12) { --x: 84; --delay: 0.7s; --r: -300deg; }
.qz-confetti i:nth-child(13) { --x: 91; --delay: 0.6s; --r: 200deg; }
.qz-confetti i:nth-child(14) { --x: 10; --delay: 1s; --r: -220deg; }
.qz-confetti i:nth-child(15) { --x: 32; --delay: 1.05s; --r: 280deg; }
.qz-confetti i:nth-child(16) { --x: 53; --delay: 0.95s; --r: -260deg; }
.qz-confetti i:nth-child(17) { --x: 74; --delay: 1.1s; --r: 230deg; }
.qz-confetti i:nth-child(18) { --x: 95; --delay: 0.9s; --r: -190deg; }

@keyframes qz-fall {
    0% { opacity: 1; transform: translateY(0) rotate(0); }
    100% { opacity: 0; transform: translateY(380px) rotate(var(--r)); }
}

.qz-review-title {
    margin: 30px 0 12px;
    font-size: 18px;
    font-weight: 800;
}

.qz-review {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.qz-review-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--t-border-dce4f0);
    border-left: 4px solid;
    border-radius: 14px;
    background: var(--t-surface-ffffff);
    animation: qz-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i) * 50ms + 0.4s) both;
}

.qz-review-item.is-correct { border-left-color: #16A34A; }
.qz-review-item.is-wrong { border-left-color: #DC2626; }

.qz-review-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.4;
}

.qz-review-item.is-correct .qz-review-icon { color: #16A34A; }
.qz-review-item.is-wrong .qz-review-icon { color: #DC2626; }

.qz-review-question {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    white-space: pre-line;
}

.qz-review-answer {
    margin: 2px 0 0;
    font-size: 14px;
}

.qz-review-answer.is-correct { color: #15803D; }
.qz-review-answer.is-wrong { color: #B91C1C; }

:root[data-theme="dark"] .qz-review-answer.is-correct { color: #4ADE80; }
:root[data-theme="dark"] .qz-review-answer.is-wrong { color: #F87171; }

.qz-review-explanation {
    margin: 6px 0 0;
    color: var(--t-text-7b8798);
    font-size: 13.5px;
    line-height: 1.5;
    white-space: pre-line;
}


/* Empty + loading */

.qz-empty {
    padding: 34px 24px;
    text-align: center;
    color: var(--t-text-7b8798);
}

.qz-empty svg {
    width: 34px;
    height: 34px;
    color: var(--t-text-3f72c5);
}

.qz-empty.is-big {
    padding: 50px 24px;
}

.qz-empty h2 {
    margin: 12px 0 6px;
    color: var(--t-text-26354a);
    font-size: 20px;
}

.qz-empty p {
    margin: 8px 0 0;
    font-size: 14.5px;
}

.qz-loading {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 80px 0;
}

.qz-loading span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--t-text-3f72c5);
    animation: qz-dot 1s ease-in-out infinite;
}

.qz-loading span:nth-child(2) { animation-delay: 0.15s; }
.qz-loading span:nth-child(3) { animation-delay: 0.3s; }

@keyframes qz-dot {
    0%, 100% { opacity: 0.25; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-6px); }
}


@media (max-width: 640px) {

    .qz-layout {
        padding: 0 16px;
    }

    .qz-card {
        padding: 22px 18px;
    }

    .qz-hero-stats {
        width: 100%;
        justify-content: space-around;
        margin-left: 0;
    }

    .qz-quiz {
        flex-wrap: wrap;
    }

    .qz-quiz-side {
        width: 100%;
        justify-content: space-between;
    }

}

@media (prefers-reduced-motion: reduce) {

    .qz-enter,
    .qz-professor,
    .qz-chapter,
    .qz-option,
    .qz-option.is-correct,
    .qz-option.is-wrong,
    .qz-feedback:not(:empty),
    .qz-review-item,
    .qz-new-best,
    .qz-intro-icon,
    .qz-loading span {
        animation: none !important;
    }

}


/* ==========================================
   ADMIN: QUIZZES
========================================== */

:root {
    --adm-purple: var(--hm-purple);
}

.adm-quizzes {
    margin-top: 20px;
}

.adm-icon-button.is-visible {
    opacity: 1;
}

.adm-icon-button:disabled {
    opacity: 0.3;
    cursor: default;
    background: none;
}

.aq-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.aq-toolbar a.adm-button {
    text-decoration: none;
}

.aq-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

.aq-empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    border: 1px dashed var(--t-border-c2cfdf);
    border-radius: 14px;
    color: var(--t-text-9aa5b5);
    font-size: 14px;
}

.aq-empty p {
    margin: 0;
}

.aq-empty svg {
    width: 20px;
    height: 20px;
}

.aq-professor {
    padding: 14px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 16px;
    background: var(--t-surface-f7f9fc);
    animation: hm-fade 0.4s ease both;
}

.aq-professor-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.aq-avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    background: var(--color);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 800;
}

.aq-professor-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.aq-professor-text strong {
    font-size: 15px;
}

.aq-professor-text > span {
    color: var(--t-text-7b8798);
    font-size: 12.5px;
}

.aq-chapters {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aq-chapter {
    padding: 10px;
    border-radius: 12px;
    background: var(--t-surface-ffffff);
}

.aq-chapter-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aq-chapter-head strong {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 13.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aq-chapter-number {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 7px;
    background: color-mix(in srgb, var(--color, var(--adm-purple)) 14%, transparent);
    color: var(--color, var(--adm-purple));
    font-size: 12px;
    font-weight: 800;
}

.aq-add-quiz {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    padding: 5px 10px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 999px;
    background: transparent;
    color: var(--t-text-3f72c5);
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.aq-add-quiz svg {
    width: 14px;
    height: 14px;
}

.aq-add-quiz:hover {
    border-color: var(--t-border-5b8def);
    background: var(--t-surface-eaf2ff);
}

.aq-quiz {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    padding: 6px 4px 6px 8px;
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.aq-quiz:hover {
    background: var(--t-surface-f7f9fc);
}

.aq-quiz-icon {
    color: var(--color);
}

.aq-quiz-icon svg {
    width: 18px;
    height: 18px;
}

.aq-quiz-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.aq-quiz-text strong {
    overflow: hidden;
    font-size: 13.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aq-quiz-text span {
    color: var(--t-text-9aa5b5);
    font-size: 12px;
}

.aq-no-chapters {
    margin: 0;
    color: var(--t-text-9aa5b5);
    font-size: 13.5px;
}


/* Professor dialog */

.aq-modal-card {
    width: min(520px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    text-align: left;
}

.aq-modal-card h3 {
    margin: 0 0 16px;
}

.aq-professor-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.aq-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aq-color {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 3px solid var(--t-surface-ffffff);
    border-radius: 50%;
    background: var(--swatch);
    box-shadow: 0 0 0 1px var(--t-border-dce4f0);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.aq-color:hover {
    transform: scale(1.1);
}

.aq-color.is-active {
    box-shadow: 0 0 0 2px var(--swatch);
    transform: scale(1.12);
}

.aq-chapter-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.aq-chapter-row {
    display: flex;
    align-items: center;
    gap: 6px;
    animation: hm-fade 0.3s ease both;
}

.aq-chapter-row .adm-input {
    padding: 8px 10px;
    font-size: 14px;
}

.aq-add-chapter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
    margin-top: 4px;
}

.aq-add-chapter svg {
    width: 15px;
    height: 15px;
}

.aq-form-error,
.aq-editor-error {
    margin: 0;
    color: var(--t-text-d93636);
    font-size: 13.5px;
    font-weight: 700;
}

.aq-form-error:empty {
    display: none;
}


/* Quiz editor (side panel) */

.aq-editor {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    justify-content: flex-end;
    background: rgba(var(--pa-rgb-0f172a, 15, 23, 42), 0.45);
    opacity: 0;
    visibility: hidden;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.aq-editor.visible {
    opacity: 1;
    visibility: visible;
}

.aq-editor-panel {
    display: flex;
    flex-direction: column;
    width: min(760px, 100%);
    height: 100%;
    background: var(--t-surface-d6ecfa);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.2);
    transform: translateX(40px);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.aq-editor.visible .aq-editor-panel {
    transform: none;
}

.aq-editor-head,
.aq-editor-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 22px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
}

.aq-editor-head {
    border-bottom: 1px solid var(--t-border-dce4f0);
}

.aq-editor-head h2 {
    flex: 1;
    margin: 0;
    font-size: 20px;
    font-weight: 800;
}

.aq-editor-foot {
    border-top: 1px solid var(--t-border-dce4f0);
}

.aq-editor-error {
    flex: 1;
}

.aq-editor-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 22px 40px;
    color: var(--t-text-26354a);
}

body.aq-no-scroll {
    overflow: hidden;
}

.aq-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 16px;
    background: var(--t-surface-ffffff);
}

.aq-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--t-text-526175);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.aq-switch input {
    position: absolute;
    opacity: 0;
}

.aq-switch-track {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--t-border-c2cfdf);
    transition: background-color 0.25s ease;
}

.aq-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.aq-switch input:checked + .aq-switch-track {
    background: var(--adm-purple);
}

.aq-switch input:checked + .aq-switch-track::after {
    transform: translateX(18px);
}

.aq-switch input:focus-visible + .aq-switch-track {
    box-shadow: 0 0 0 3px var(--t-shadow-3f72c5-a25);
}

.aq-questions-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 24px 0 12px;
}

.aq-questions-head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
}

.aq-questions-head h3 span {
    margin-left: 6px;
    color: var(--t-text-9aa5b5);
    font-size: 13px;
    font-weight: 700;
}

.aq-import {
    position: relative;
    cursor: pointer;
}

.aq-import.is-busy {
    opacity: 0.6;
    pointer-events: none;
}

.aq-questions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.aq-question {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 16px;
    background: var(--t-surface-ffffff);
    animation: hm-fade 0.3s ease both;
    transition: border-color 0.25s ease, opacity 0.2s ease, translate 0.2s ease;
}

.aq-question.has-error {
    border-color: var(--t-border-d93636);
    box-shadow: 0 0 0 4px var(--t-shadow-d93636-a10);
}

.aq-question.is-leaving {
    opacity: 0;
    translate: 20px 0;
}

.aq-question.is-moved {
    animation: adm-pop 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.aq-question-head {
    display: flex;
    align-items: center;
    gap: 6px;
}

.aq-question-number {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--adm-purple);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 800;
}

.aq-question-label {
    flex: 1;
    color: var(--t-text-7b8798);
    font-size: 12.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.aq-question-text {
    resize: vertical;
    font-weight: 600;
}

.aq-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.aq-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aq-option .adm-input {
    padding: 9px 11px;
    font-size: 14px;
}

.aq-option.is-correct .adm-input {
    border-color: #16A34A;
    background: color-mix(in srgb, #16A34A 6%, var(--t-surface-ffffff));
}

.aq-correct {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    padding: 0;
    border: 2px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-7b8798);
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.aq-correct:hover {
    border-color: #16A34A;
    color: #16A34A;
}

.aq-option.is-correct .aq-correct {
    border-color: #16A34A;
    background: #16A34A;
    color: #FFFFFF;
    transform: scale(1.06);
}

.aq-option-spacer {
    width: 32px;
    flex-shrink: 0;
}

.aq-question-foot {
    display: flex;
    align-items: center;
    gap: 12px;
}

.aq-question-foot .adm-text-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.aq-question-foot svg {
    width: 15px;
    height: 15px;
}

.aq-correct-hint {
    color: #D97706;
    font-size: 12.5px;
    font-weight: 700;
}

.aq-explanation {
    font-size: 13.5px !important;
}

.aq-add-question {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    padding: 14px;
    border: 2px dashed var(--t-border-c2cfdf);
    border-radius: 16px;
    background: transparent;
    color: var(--t-text-3f72c5);
    font-size: 14.5px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.aq-add-question svg {
    width: 18px;
    height: 18px;
}

.aq-add-question:hover {
    border-color: var(--t-border-5b8def);
    background: var(--t-surface-eaf2ff);
}

@media (max-width: 640px) {

    .aq-list {
        grid-template-columns: 1fr;
    }

    .aq-editor-body,
    .aq-editor-head,
    .aq-editor-foot {
        padding-left: 14px;
        padding-right: 14px;
    }

    .aq-editor-foot {
        flex-wrap: wrap;
    }

    .aq-editor-error {
        flex-basis: 100%;
    }

}

@media (prefers-reduced-motion: reduce) {

    .aq-professor,
    .aq-question,
    .aq-question.is-moved,
    .aq-chapter-row {
        animation: none !important;
    }

    .aq-editor-panel {
        transition: none;
    }

}


/* ==========================================
   UNIT CONVERTER
========================================== */

.cv-layout {
    max-width: 1180px;
    margin: 18px auto 80px;
    padding: 0 24px;
    box-sizing: border-box;
    color: var(--t-text-26354a);
}

.cv-layout svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cv-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 22px;
}

.cv-head h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.cv-sub {
    margin: 6px 0 0;
    color: var(--t-text-7b8798);
    font-size: 15px;
}


/* Search */

.cv-search {
    position: relative;
    display: flex;
    align-items: center;
    width: min(340px, 100%);
}

.cv-search > svg {
    position: absolute;
    left: 13px;
    width: 18px;
    height: 18px;
    color: var(--t-text-9aa5b5);
    pointer-events: none;
}

.cv-search input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 12px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    font-size: 14.5px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cv-search input:focus {
    outline: none;
    border-color: var(--t-border-5b8def);
    box-shadow: 0 0 0 4px var(--t-shadow-3f72c5-a15);
}

.cv-search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 50;
    margin: 0;
    padding: 6px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 14px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 18px 40px var(--t-shadow-26354a-a18);
    list-style: none;
    animation: cv-drop 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cv-drop {
    from { opacity: 0; translate: 0 -6px; }
    to { opacity: 1; translate: 0 0; }
}

.cv-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
}

.cv-search-item.active,
.cv-search-item:hover {
    background: var(--t-surface-eaf2ff);
}

.cv-search-symbol {
    min-width: 54px;
    color: var(--t-text-3f72c5);
    font-weight: 800;
}

.cv-search-name {
    flex: 1;
    font-size: 14px;
}

.cv-search-category {
    color: var(--t-text-9aa5b5);
    font-size: 12px;
    font-weight: 700;
}

.cv-search-empty {
    padding: 10px;
    color: var(--t-text-9aa5b5);
    font-size: 14px;
}


/* Layout */

.cv-body {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 20px;
    align-items: start;
}

.cv-categories {
    position: sticky;
    top: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: calc(100vh - 32px);
    padding: 14px 10px;
    overflow-y: auto;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 20px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 10px 28px var(--t-shadow-26354a-a06);
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--t-border-dce4f0) transparent;
}

.cv-categories::-webkit-scrollbar {
    width: 6px;
}

.cv-categories::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--t-border-dce4f0);
}

.cv-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cv-group-title {
    margin: 0 0 4px 10px;
    color: var(--t-text-9aa5b5);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cv-category {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 11px;
    background: transparent;
    color: var(--t-text-526175);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cv-category:hover {
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
}

.cv-category-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 9px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-7b8798);
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.cv-category-icon svg {
    width: 17px;
    height: 17px;
}

.cv-category:hover .cv-category-icon {
    transform: scale(1.08);
}

.cv-category.active {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    font-weight: 800;
}

.cv-category.active .cv-category-icon {
    background: linear-gradient(135deg, var(--pa-4a80d8, #4A80D8), var(--pa-315faf, #315FAF));
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(var(--pa-rgb-3f72c5, 63, 114, 197), 0.3);
}

.cv-main {
    min-width: 0;
}

.cv-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cv-panel[hidden] {
    display: none;
}

.cv-enter {
    animation: cv-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cv-enter {
    from { opacity: 0; translate: 0 12px; }
    to { opacity: 1; translate: 0 0; }
}

.cv-card {
    padding: 24px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 22px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 12px 32px var(--t-shadow-26354a-a08);
    box-sizing: border-box;
}

.cv-title {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 800;
}


/* From ⇄ To */

.cv-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 14px;
}

.cv-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.cv-label {
    color: var(--t-text-7b8798);
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cv-input-wrap {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 16px;
    background: var(--t-surface-f7f9fc);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cv-input-wrap:focus-within {
    border-color: var(--t-border-5b8def);
    box-shadow: 0 0 0 4px var(--t-shadow-3f72c5-a15);
}

.cv-input-wrap.is-result {
    background: color-mix(in srgb, var(--pa-3f72c5, #3F72C5) 7%, var(--t-surface-ffffff));
}

.cv-input,
.cv-result {
    width: 100%;
    min-height: 62px;
    padding: 12px 16px 4px;
    border: none;
    background: transparent;
    color: var(--t-text-26354a);
    font-size: 28px;
    font-weight: 800;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

.cv-input:focus {
    outline: none;
}

.cv-input.is-invalid {
    color: var(--t-text-d93636);
}

.cv-result {
    display: flex;
    align-items: center;
    color: var(--t-text-3f72c5);
}

.cv-result.is-new {
    animation: cv-pop 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cv-pop {
    from { opacity: 0.35; translate: 0 4px; }
    to { opacity: 1; translate: 0 0; }
}

.cv-select {
    width: 100%;
    margin: 0;
    padding: 9px 14px 12px;
    border: none;
    border-top: 1px solid var(--t-border-dce4f0);
    background: transparent;
    color: var(--t-text-526175);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.cv-select:focus {
    outline: none;
}

.cv-select option {
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
}

.cv-swap {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 30px;
    padding: 0;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 50%;
    background: var(--t-surface-ffffff);
    color: var(--t-text-3f72c5);
    cursor: pointer;
    box-shadow: 0 6px 16px var(--t-shadow-26354a-a08);
    transition: border-color 0.2s ease, transform 0.25s ease;
}

.cv-swap svg {
    width: 20px;
    height: 20px;
}

.cv-swap:hover {
    border-color: var(--t-border-5b8def);
    transform: scale(1.06);
}

.cv-swap.is-spinning svg {
    animation: cv-spin 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cv-spin {
    from { transform: rotate(0); }
    to { transform: rotate(180deg); }
}

.cv-answer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
}

.cv-answer-text {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.cv-copy,
.cv-clear {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 8px 14px;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 11px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-526175);
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cv-copy svg,
.cv-clear svg {
    width: 16px;
    height: 16px;
}

.cv-copy:hover:not(:disabled),
.cv-clear:hover {
    border-color: var(--t-border-5b8def);
    color: var(--t-text-3f72c5);
    transform: translateY(-1px);
}

.cv-copy:disabled {
    opacity: 0.4;
    cursor: default;
}

.cv-formula {
    margin: 8px 0 0;
    color: var(--t-text-7b8798);
    font-size: 14px;
}

.cv-formula:empty,
.cv-error:empty {
    display: none;
}

.cv-error {
    margin: 10px 0 0;
    color: var(--t-text-d93636);
    font-size: 13.5px;
    font-weight: 700;
}


/* Every unit */

.cv-all h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
}

.cv-hint {
    margin: 4px 0 14px;
    color: var(--t-text-9aa5b5);
    font-size: 13px;
}

.cv-table {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 6px;
}

.cv-table-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.cv-table-row:hover {
    border-color: var(--t-border-5b8def);
    transform: translateY(-1px);
}

.cv-table-row.is-source {
    cursor: default;
    opacity: 0.6;
    transform: none;
    border-color: transparent;
}

.cv-table-row.is-target {
    border-color: var(--t-border-5b8def);
    background: var(--t-surface-eaf2ff);
}

.cv-table-name {
    color: var(--t-text-7b8798);
    font-size: 13px;
    font-weight: 600;
}

.cv-table-value {
    font-size: 14.5px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-align: right;
    overflow-wrap: anywhere;
}

.cv-table-symbol {
    color: var(--t-text-3f72c5);
}


/* Ohm's law */

.cv-ohm-intro {
    margin-top: -10px;
}

.cv-ohm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.cv-ohm-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.cv-ohm-field .cv-label strong {
    color: var(--t-text-3f72c5);
    font-size: 14px;
}

.cv-ohm-field .cv-input {
    min-height: 54px;
    font-size: 24px;
}

.cv-ohm-badge {
    position: absolute;
    top: 0;
    right: 0;
    padding: 2px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, #16A34A 14%, transparent);
    color: #16A34A;
    font-size: 11px;
    font-weight: 800;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22, 1.4, 0.36, 1);
}

.cv-ohm-field.is-calculated .cv-ohm-badge {
    opacity: 1;
    transform: none;
}

.cv-ohm-field.is-calculated .cv-input-wrap {
    border-color: color-mix(in srgb, #16A34A 45%, transparent);
    background: color-mix(in srgb, #16A34A 6%, var(--t-surface-ffffff));
}

.cv-ohm-field.is-calculated .cv-input {
    color: #15803D;
}

:root[data-theme="dark"] .cv-ohm-field.is-calculated .cv-input {
    color: #4ADE80;
}

.cv-ohm-field.is-new .cv-input {
    animation: cv-pop 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.cv-ohm-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
}

.cv-ohm-foot .cv-formula {
    margin: 0;
    font-weight: 700;
}

.cv-ohm-diagram svg {
    display: block;
    width: min(320px, 100%);
    margin: 0 auto;
}

.cv-ohm-diagram text {
    fill: var(--t-text-7b8798);
    stroke: none;
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
}

.cv-wire {
    stroke: var(--t-border-c2cfdf);
    stroke-width: 3;
}

.cv-battery-gap {
    fill: var(--t-surface-ffffff);
    stroke: none;
}

.cv-battery {
    stroke: var(--t-text-26354a);
    stroke-width: 3;
}

.cv-resistor {
    fill: var(--t-surface-ffffff);
    stroke: #E07A2C;
    stroke-width: 3;
}

.cv-flow {
    stroke: var(--pa-3f72c5, #3F72C5);
    stroke-width: 3;
    stroke-dasharray: 6 10;
    animation: cv-flow 1s linear infinite;
}

@keyframes cv-flow {
    to { stroke-dashoffset: -16; }
}


/* Small screens */

@media (max-width: 860px) {

    .cv-body {
        grid-template-columns: 1fr;
    }

    .cv-categories {
        position: static;
        flex-direction: row;
        gap: 6px;
        max-height: none;
        padding: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }

    .cv-group {
        flex-direction: row;
        gap: 6px;
    }

    .cv-group-title {
        display: none;
    }

    .cv-category {
        width: auto;
        padding: 6px 12px 6px 6px;
    }

}

@media (max-width: 640px) {

    .cv-layout {
        padding: 0 16px;
    }

    .cv-card {
        padding: 18px 16px;
    }

    .cv-row {
        grid-template-columns: 1fr;
    }

    .cv-swap {
        margin: -4px auto;
        transform: rotate(90deg);
    }

    .cv-swap:hover {
        transform: rotate(90deg) scale(1.06);
    }

    .cv-input,
    .cv-result {
        font-size: 24px;
    }

    .cv-ohm-grid {
        grid-template-columns: 1fr;
    }

}

@media (prefers-reduced-motion: reduce) {

    .cv-enter,
    .cv-result.is-new,
    .cv-swap.is-spinning svg,
    .cv-search-results,
    .cv-ohm-field.is-new .cv-input,
    .cv-flow {
        animation: none !important;
    }

}


/* ==========================================
   CHAT NICKNAMES
========================================== */

/* A name you renamed: a small tag shows it's your nickname. */
.has-nickname {
    font-style: normal;
}

.nick-tag {
    display: inline-block;
    width: 11px;
    height: 11px;
    margin-left: 5px;
    vertical-align: -1px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.6;
}

.chat-profile-card-nickname {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    font-size: 12.5px;
    animation: gs-fade-up 0.3s ease both;
}

.chat-profile-card-nickname strong {
    font-weight: 800;
}

.chat-profile-card-nickname-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-3f72c5);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.chat-profile-card-nickname-button:hover {
    border-color: var(--t-border-5b8def);
    background: var(--t-surface-eaf2ff);
}

.chat-profile-card-nickname-button:active {
    transform: scale(0.96);
}

/* Dialog */

.nickname-dialog .delete-modal-content {
    width: min(400px, calc(100vw - 32px));
}

.nickname-input {
    width: 100%;
    margin: 4px 0 18px;
    padding: 12px 14px;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.nickname-input:focus {
    outline: none;
    border-color: var(--t-border-5b8def);
    background: var(--t-surface-ffffff);
    box-shadow: 0 0 0 4px var(--t-shadow-3f72c5-a15);
}

.nickname-remove {
    margin-right: auto;
    background: transparent !important;
    color: var(--t-text-d93636) !important;
}

.nickname-remove:hover {
    text-decoration: underline;
}

.nickname-remove[hidden] {
    display: none;
}

@media (prefers-reduced-motion: reduce) {

    .chat-profile-card-nickname {
        animation: none;
    }

}


/* ==========================================
   CODE LAB
========================================== */

:root {
    --cx-editor-bg: #FFFFFF;
    --cx-editor-gutter: #F5F7FB;
    --cx-editor-text: #24292F;
    --cx-editor-line: #F3F7FF;
    --cx-editor-select: #D6E4FF;
    --cx-syntax-keyword: #8B3FD9;
    --cx-syntax-string: #0A7D45;
    --cx-syntax-number: #C2410C;
    --cx-syntax-comment: #8792A2;
    --cx-syntax-type: #0F6FBF;
    --cx-syntax-def: #A3420B;
    --cx-syntax-meta: #B45309;
    --cx-output-bg: #0F1720;
    --cx-output-text: #D7DEE8;
}

:root[data-theme="dark"] {
    --cx-editor-bg: #1A1F27;
    --cx-editor-gutter: #161A21;
    --cx-editor-text: #D6DEEB;
    --cx-editor-line: #222936;
    --cx-editor-select: #2D3B55;
    --cx-syntax-keyword: #C792EA;
    --cx-syntax-string: #A5D6A7;
    --cx-syntax-number: #F78C6C;
    --cx-syntax-comment: #6B7686;
    --cx-syntax-type: #82AAFF;
    --cx-syntax-def: #FFCB6B;
    --cx-syntax-meta: #F2C66D;
    --cx-output-bg: #0B0F15;
}

.cx-layout {
    max-width: 1280px;
    margin: 18px auto 70px;
    padding: 0 24px;
    box-sizing: border-box;
    color: var(--t-text-26354a);
}

.cx-layout svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cx-layout [hidden] {
    display: none !important;
}

.cx-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.cx-head h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.cx-sub {
    margin: 6px 0 0;
    color: var(--t-text-7b8798);
    font-size: 15px;
}


/* Tabs */

.cx-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 14px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 6px 18px var(--t-shadow-26354a-a06);
}

.cx-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 8px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--t-text-526175);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cx-tab:hover {
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
}

.cx-tab-badge {
    display: grid;
    place-items: center;
    min-width: 28px;
    height: 24px;
    padding: 0 5px;
    border-radius: 7px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-7b8798);
    font-size: 11.5px;
    font-weight: 800;
    font-family: Consolas, "Courier New", monospace;
    box-sizing: border-box;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cx-tab.active {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.cx-tab.active .cx-tab-badge {
    background: linear-gradient(135deg, var(--pa-4a80d8, #4A80D8), var(--pa-315faf, #315FAF));
    color: #FFFFFF;
}

.cx-tab[data-language="dos"].active .cx-tab-badge {
    background: #000000;
    color: #C0C0C0;
}


/* Workspace */

.cx-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
    gap: 18px;
    align-items: stretch;
    animation: cx-enter 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cx-enter {
    from { opacity: 0; translate: 0 10px; }
    to { opacity: 1; translate: 0 0; }
}

.cx-card {
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 18px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 10px 28px var(--t-shadow-26354a-a08);
    box-sizing: border-box;
    min-width: 0;
}

.cx-editor-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cx-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--t-border-dce4f0);
}

.cx-spacer {
    flex: 1;
}

.cx-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border: none;
    border-radius: 11px;
    color: #FFFFFF;
    font-size: 14.5px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.cx-button svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.cx-run {
    background: linear-gradient(135deg, #22A55B, #16803F);
    box-shadow: 0 6px 16px rgba(34, 165, 91, 0.3);
}

.cx-stop {
    background: linear-gradient(135deg, #E5484D, #C02B30);
    box-shadow: 0 6px 16px rgba(229, 72, 77, 0.3);
    animation: cx-pulse 1.4s ease-in-out infinite;
}

@keyframes cx-pulse {
    50% { box-shadow: 0 6px 22px rgba(229, 72, 77, 0.55); }
}

.cx-button:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.cx-button:disabled {
    opacity: 0.6;
    cursor: progress;
}

.cx-examples {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cx-examples svg {
    position: absolute;
    left: 10px;
    width: 16px;
    height: 16px;
    color: var(--t-text-7b8798);
    pointer-events: none;
}

.cx-examples select {
    padding: 8px 12px 8px 33px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.cx-status {
    color: var(--t-text-9aa5b5);
    font-size: 13px;
    font-weight: 700;
}

.cx-status:empty {
    display: none;
}

.cx-status.is-busy { color: var(--t-text-3f72c5); }
.cx-status.is-ok { color: #16A34A; }
.cx-status.is-warn { color: #D97706; }
.cx-status.is-error { color: var(--t-text-d93636); }

.cx-status.is-busy::before {
    content: "";
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 7px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -1px;
    animation: hw-spin 0.8s linear infinite;
}

.cx-icon-button,
.cx-text-button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-526175);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.cx-icon-button svg {
    width: 17px;
    height: 17px;
}

.cx-icon-button:hover,
.cx-text-button:hover {
    border-color: var(--t-border-5b8def);
    color: var(--t-text-3f72c5);
}

.cx-text-button {
    width: auto;
    height: auto;
    margin-left: auto;
    padding: 4px 10px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
}

.cx-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--t-border-dce4f0);
    background: var(--t-surface-eaf2ff);
    animation: cx-enter 0.3s ease both;
}

.cx-progress-bar {
    flex: 0 0 180px;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--t-surface-ffffff);
}

.cx-progress-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--pa-4a80d8, #4A80D8), #7C5CD6);
    transition: width 0.25s ease;
}

.cx-progress.is-indeterminate .cx-progress-bar span {
    width: 35% !important;
    animation: cx-indeterminate 1.2s ease-in-out infinite;
}

@keyframes cx-indeterminate {
    from { transform: translateX(-100%); }
    to { transform: translateX(300%); }
}

.cx-progress-text {
    color: var(--t-text-3f72c5);
    font-size: 13px;
    font-weight: 700;
}


/* Editor */

.cx-editor {
    flex: 1;
    min-height: 460px;
}

.cx-editor .CodeMirror,
.cx-plain-editor {
    height: 100%;
    min-height: 460px;
    background: var(--cx-editor-bg);
    color: var(--cx-editor-text);
    font-family: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
    font-size: 14.5px;
    line-height: 1.55;
}

.cx-plain-editor {
    width: 100%;
    padding: 12px;
    border: none;
    resize: none;
    box-sizing: border-box;
    tab-size: 4;
}

.cx-editor .CodeMirror-gutters {
    border-right: 1px solid var(--t-border-dce4f0);
    background: var(--cx-editor-gutter);
}

.cx-editor .CodeMirror-linenumber {
    padding: 0 10px 0 6px;
    color: var(--cx-syntax-comment);
}

.cx-editor .CodeMirror-cursor {
    border-left: 2px solid var(--t-text-3f72c5);
}

.cx-editor .CodeMirror-activeline-background {
    background: var(--cx-editor-line);
}

.cx-editor .CodeMirror-selected,
.cx-editor .CodeMirror-focused .CodeMirror-selected {
    background: var(--cx-editor-select);
}

.cx-editor .CodeMirror-matchingbracket {
    color: inherit !important;
    background: var(--cx-editor-select);
    outline: 1px solid var(--t-border-5b8def);
}

.cx-editor .cm-keyword { color: var(--cx-syntax-keyword); font-weight: 600; }
.cx-editor .cm-string,
.cx-editor .cm-string-2 { color: var(--cx-syntax-string); }
.cx-editor .cm-number,
.cx-editor .cm-atom { color: var(--cx-syntax-number); }
.cx-editor .cm-comment { color: var(--cx-syntax-comment); font-style: italic; }
.cx-editor .cm-type,
.cx-editor .cm-variable-3,
.cx-editor .cm-builtin { color: var(--cx-syntax-type); }
.cx-editor .cm-def { color: var(--cx-syntax-def); }
.cx-editor .cm-meta { color: var(--cx-syntax-meta); }
.cx-editor .cm-operator { color: inherit; }
.cx-editor .cm-property { color: var(--cx-syntax-type); }

.cx-editor .cx-error-line {
    background: rgba(229, 72, 77, 0.14);
    box-shadow: inset 3px 0 0 #E5484D;
}

.cx-editor-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 14px;
    border-top: 1px solid var(--t-border-dce4f0);
    color: var(--t-text-9aa5b5);
    font-size: 12px;
    font-weight: 600;
}

.cx-editor-foot span:first-child {
    font-family: Consolas, "Courier New", monospace;
}


/* Side: input + output */

.cx-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.cx-input-card,
.cx-output-card {
    padding: 14px;
}

.cx-output-card {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.cx-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 800;
}

.cx-card-title svg {
    width: 18px;
    height: 18px;
    color: var(--t-text-3f72c5);
}

.cx-hint {
    margin: 0 0 8px;
    color: var(--t-text-9aa5b5);
    font-size: 12.5px;
    line-height: 1.4;
}

.cx-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 11px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font-size: 14px;
    font-family: Consolas, "Courier New", monospace;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cx-input:focus {
    outline: none;
    border-color: var(--t-border-5b8def);
    box-shadow: 0 0 0 4px var(--t-shadow-3f72c5-a15);
}

.cx-output {
    flex: 1;
    min-height: 240px;
    max-height: 520px;
    margin: 0;
    padding: 12px 14px;
    overflow: auto;
    border-radius: 12px;
    background: var(--cx-output-bg);
    color: var(--cx-output-text);
    font-size: 13.5px;
    font-family: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.cx-out-stdin { color: #7DD3FC; font-style: italic; }
.cx-out-stderr,
.cx-out-error { color: #FF8A8A; }
.cx-out-info { color: #8B97A8; font-style: italic; }
.cx-out-compile { color: #D7DEE8; }
.cx-out-compile.is-bold { font-weight: 700; }
.cx-out-compile.is-red { color: #FF6B6B; }
.cx-out-compile.is-magenta { color: #E0A1FF; }
.cx-out-compile.is-green { color: #6EE7A0; }
.cx-out-compile.is-cyan { color: #67E8F9; }
.cx-out-compile.is-yellow { color: #FDE68A; }

.cx-jump {
    display: inline;
    padding: 0;
    border: none;
    border-bottom: 1px dashed currentColor;
    background: none;
    color: #93C5FD;
    font: inherit;
    cursor: pointer;
}

.cx-jump:hover {
    color: #BFDBFE;
}


/* ---------- MS-DOS ---------- */

.cx-dos-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
    align-items: start;
    animation: cx-enter 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cx-dos-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid #2A2F37;
    border-radius: 16px;
    background: #000000;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.cx-dos-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    background: linear-gradient(180deg, #2B3038, #1C2026);
    color: #C8CDD5;
    font-size: 13px;
    font-weight: 700;
}

.cx-dos-lights {
    display: inline-flex;
    gap: 6px;
}

.cx-dos-lights i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #FF5F57;
}

.cx-dos-lights i:nth-child(2) { background: #FEBC2E; }
.cx-dos-lights i:nth-child(3) { background: #28C840; }

.cx-dos-reset {
    margin-left: auto;
    padding: 4px 10px;
    border: 1px solid #3A414B;
    border-radius: 8px;
    background: transparent;
    color: #AEB6C2;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.cx-dos-reset:hover {
    border-color: #FF8A8A;
    color: #FF8A8A;
}

.cx-dos {
    position: relative;
    height: 540px;
    padding: 14px 16px;
    overflow-y: auto;
    background: #000000;
    color: #C0C0C0;
    font-family: "Perfect DOS VGA 437", "Px437 IBM VGA8", Consolas, "Lucida Console", "Courier New", monospace;
    font-size: 15px;
    line-height: 1.35;
    cursor: text;
    box-sizing: border-box;
    scrollbar-color: #444 #000;
}

.cx-dos:focus {
    outline: none;
}

.cx-dos-output,
.cx-dos-line {
    margin: 0;
    font: inherit;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.cx-dos-line[hidden] {
    display: none;
}

.cx-dos-cursor {
    background: #C0C0C0;
    color: #000000;
    animation: cx-blink 1.05s steps(1) infinite;
}

@keyframes cx-blink {
    50% { background: transparent; color: #C0C0C0; }
}

.cx-dos-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    padding: 0;
    border: none;
    opacity: 0;
    pointer-events: none;
}

/* Blue MS-DOS EDIT */

.cx-edit {
    position: absolute;
    inset: 37px 0 0;
    display: flex;
    flex-direction: column;
    background: #0000AA;
    color: #FFFFFF;
    font-family: Consolas, "Lucida Console", "Courier New", monospace;
    font-size: 15px;
    animation: cx-enter 0.2s ease both;
}

.cx-edit-menu {
    display: flex;
    gap: 18px;
    padding: 3px 12px;
    background: #AAAAAA;
    color: #000000;
}

.cx-edit-menu span::first-letter {
    color: #FFFFFF;
}

.cx-edit-help {
    margin-left: auto;
}

.cx-edit-title {
    padding: 2px 0;
    border-bottom: 2px double #FFFFFF;
    text-align: center;
}

.cx-edit-text {
    flex: 1;
    width: 100%;
    margin: 0;
    padding: 8px 12px;
    border: none;
    background: #0000AA;
    color: #FFFFFF;
    font: inherit;
    line-height: 1.35;
    resize: none;
    box-sizing: border-box;
    caret-color: #FFFF55;
}

.cx-edit-text:focus {
    outline: none;
}

.cx-edit-text::selection {
    background: #AAAAAA;
    color: #0000AA;
}

.cx-edit-status {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 3px 12px;
    background: #00AAAA;
    color: #000000;
}

.cx-edit-status button {
    padding: 0;
    border: none;
    background: none;
    color: #000000;
    font: inherit;
    cursor: pointer;
}

.cx-edit-status button:hover {
    color: #FFFFFF;
}

#cxEditPos {
    margin-left: auto;
}

/* Help panel */

.cx-dos-help {
    padding: 16px;
}

.cx-dos-help h2 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 800;
}

.cx-dos-help h3 {
    margin: 16px 0 6px;
    color: var(--t-text-7b8798);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cx-dos-help ul {
    margin: 0;
    padding-left: 18px;
    color: var(--t-text-526175);
    font-size: 13px;
    line-height: 1.55;
}

.cx-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cx-chip {
    padding: 5px 9px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 8px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font-size: 12.5px;
    font-weight: 700;
    font-family: Consolas, "Courier New", monospace;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

.cx-chip:hover {
    border-color: var(--t-border-5b8def);
    background: var(--t-surface-eaf2ff);
}

.cx-chip:active {
    transform: scale(0.96);
}


/* Small screens */

@media (max-width: 960px) {

    .cx-workspace,
    .cx-dos-area {
        grid-template-columns: 1fr;
    }

    .cx-editor,
    .cx-editor .CodeMirror,
    .cx-plain-editor {
        min-height: 340px;
    }

}

@media (max-width: 640px) {

    .cx-layout {
        padding: 0 12px;
    }

    .cx-tab {
        padding: 6px 10px 6px 6px;
        font-size: 13px;
    }

    .cx-tab span:last-child {
        display: none;
    }

    .cx-dos {
        height: 440px;
        font-size: 13px;
    }

    .cx-keys {
        display: none;
    }

}

@media (prefers-reduced-motion: reduce) {

    .cx-workspace,
    .cx-dos-area,
    .cx-stop,
    .cx-progress,
    .cx-edit,
    .cx-dos-cursor {
        animation: none !important;
    }

}


/* ==========================================
   PERIODIC TABLE (neon)
========================================== */

.pt-layout {
    max-width: 1320px;
    margin: 18px auto 70px;
    padding: 0 24px;
    box-sizing: border-box;
    color: var(--t-text-26354a);
}

.pt-layout svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pt-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.pt-head h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.pt-sub {
    margin: 6px 0 0;
    color: var(--t-text-7b8798);
    font-size: 15px;
}

.pt-search {
    position: relative;
    display: flex;
    align-items: center;
    width: min(340px, 100%);
}

.pt-search svg {
    position: absolute;
    left: 13px;
    width: 18px;
    height: 18px;
    color: var(--t-text-9aa5b5);
    pointer-events: none;
}

.pt-search input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 12px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    font-size: 14.5px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pt-search input:focus {
    outline: none;
    border-color: var(--t-border-5b8def);
    box-shadow: 0 0 0 4px var(--t-shadow-3f72c5-a15);
}


/* Legend */

.pt-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.pt-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px 6px 9px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 999px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-526175);
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.pt-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--neon);
    box-shadow: 0 0 6px var(--neon), 0 0 12px color-mix(in srgb, var(--neon) 50%, transparent);
}

.pt-legend-item:hover,
.pt-legend-item.is-active {
    border-color: var(--neon);
    box-shadow: 0 0 0 1px var(--neon), 0 4px 14px color-mix(in srgb, var(--neon) 30%, transparent);
    transform: translateY(-1px);
}


/* The dark neon board */

.pt-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid #1E2638;
    border-radius: 22px;
    background:
        radial-gradient(900px 400px at 15% 0%, rgba(80, 60, 255, 0.16), transparent 70%),
        radial-gradient(700px 400px at 90% 100%, rgba(255, 46, 140, 0.12), transparent 70%),
        #070B16;
    box-shadow: 0 20px 50px rgba(5, 8, 20, 0.35);
}

.pt-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(120, 140, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 140, 255, 0.05) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.pt-scroll {
    position: relative;
    overflow-x: auto;
    padding: 18px 18px 22px;
    scrollbar-color: #2A3350 transparent;
}

.pt-grid {
    display: grid;
    grid-template-columns: 22px repeat(18, minmax(52px, 1fr));
    grid-template-rows: 22px repeat(7, auto) 14px repeat(2, auto);
    gap: 5px;
    min-width: 1020px;
}

.pt-label {
    display: grid;
    place-items: center;
    color: #5E6A85;
    font-size: 11px;
    font-weight: 700;
}

.pt-placeholder {
    display: grid;
    place-items: center;
    border: 1px dashed color-mix(in srgb, var(--neon) 50%, transparent);
    border-radius: 9px;
    color: var(--neon);
    font-size: 11px;
    font-weight: 700;
    opacity: 0.7;
}


/* One element */

.pt-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 62px;
    padding: 5px 2px 4px;
    border: 1px solid color-mix(in srgb, var(--neon) 55%, transparent);
    border-radius: 9px;
    background: color-mix(in srgb, var(--neon) 9%, #0B1020);
    color: #E6EAF5;
    font-family: inherit;
    line-height: 1.05;
    cursor: pointer;
    box-shadow: inset 0 0 10px color-mix(in srgb, var(--neon) 12%, transparent);
    animation: pt-power-on 0.9s ease both;
    animation-delay: calc(var(--i) * 18ms);
    transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease, opacity 0.25s ease, filter 0.25s ease, border-color 0.2s ease;
}

/* Neon tube switching on: a couple of flickers, then steady. */
@keyframes pt-power-on {
    0% { opacity: 0; }
    30% { opacity: 1; }
    38% { opacity: 0.25; }
    50% { opacity: 1; }
    58% { opacity: 0.55; }
    70%, 100% { opacity: 1; }
}

.pt-number {
    position: absolute;
    top: 4px;
    left: 5px;
    color: color-mix(in srgb, var(--neon) 70%, #FFFFFF);
    font-size: 9.5px;
    font-weight: 700;
    opacity: 0.85;
}

.pt-symbol {
    margin-top: 6px;
    color: var(--neon);
    font-size: 19px;
    font-weight: 800;
    text-shadow: 0 0 6px var(--neon), 0 0 14px color-mix(in srgb, var(--neon) 55%, transparent);
}

.pt-name {
    max-width: 100%;
    margin-top: 3px;
    overflow: hidden;
    color: #C9D1E4;
    font-size: 8.5px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pt-mass {
    margin-top: 1px;
    color: #7E8AA6;
    font-size: 8px;
}

.pt-cell:hover,
.pt-cell:focus-visible {
    z-index: 2;
    border-color: var(--neon);
    outline: none;
    transform: scale(1.14);
    box-shadow:
        0 0 0 1px var(--neon),
        0 0 14px var(--neon),
        0 0 32px color-mix(in srgb, var(--neon) 45%, transparent),
        inset 0 0 14px color-mix(in srgb, var(--neon) 30%, transparent);
}

.pt-cell.is-selected {
    z-index: 1;
    border-color: var(--neon);
    background: color-mix(in srgb, var(--neon) 22%, #0B1020);
    box-shadow:
        0 0 0 2px var(--neon),
        0 0 18px var(--neon),
        0 0 40px color-mix(in srgb, var(--neon) 45%, transparent);
    animation: pt-selected 2.4s ease-in-out infinite;
}

@keyframes pt-selected {
    50% {
        box-shadow:
            0 0 0 2px var(--neon),
            0 0 26px var(--neon),
            0 0 56px color-mix(in srgb, var(--neon) 55%, transparent);
    }
}

/* Legend / search: matches glow, the rest fades back. */
.pt-grid.is-filtering .pt-cell:not(.is-match) {
    opacity: 0.16;
    filter: saturate(0.3);
}

.pt-grid.is-filtering .pt-cell.is-match {
    box-shadow: 0 0 0 1px var(--neon), 0 0 12px var(--neon), 0 0 26px color-mix(in srgb, var(--neon) 40%, transparent);
}


/* Info card in the gap above the transition metals */

.pt-detail {
    position: relative;
    grid-row: 2 / 5;
    grid-column: 4 / 14;
    display: flex;
    margin: 0 6px;
    padding: 14px 16px;
    border: 1px solid #222B42;
    border-radius: 14px;
    background: rgba(11, 16, 32, 0.82);
    color: #E6EAF5;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.pt-detail-close {
    display: none;
}

.pt-detail-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    color: #7E8AA6;
    font-size: 15px;
    font-weight: 600;
}

.pt-detail-empty svg {
    width: 44px;
    height: 44px;
    color: #8C7CFF;
    filter: drop-shadow(0 0 8px rgba(140, 124, 255, 0.7));
    animation: pt-spin 14s linear infinite;
}

@keyframes pt-spin {
    to { transform: rotate(360deg); }
}

.pt-detail-empty[hidden],
.pt-detail-body[hidden] {
    display: none;
}

.pt-detail-body {
    display: flex;
    gap: 18px;
    width: 100%;
    min-width: 0;
}

.pt-detail-body.is-new {
    animation: pt-detail-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes pt-detail-in {
    from { opacity: 0; translate: 0 6px; }
    to { opacity: 1; translate: 0 0; }
}

.pt-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 118px;
    height: 128px;
    flex-shrink: 0;
    border: 2px solid var(--neon);
    border-radius: 16px;
    background: color-mix(in srgb, var(--neon) 14%, #0B1020);
    box-shadow: 0 0 18px var(--neon), 0 0 40px color-mix(in srgb, var(--neon) 40%, transparent), inset 0 0 18px color-mix(in srgb, var(--neon) 25%, transparent);
}

.pt-tile-number {
    position: absolute;
    top: 8px;
    left: 10px;
    color: color-mix(in srgb, var(--neon) 70%, #FFFFFF);
    font-size: 14px;
    font-weight: 800;
}

.pt-tile-symbol {
    color: var(--neon);
    font-size: 48px;
    font-weight: 800;
    text-shadow: 0 0 10px var(--neon), 0 0 26px color-mix(in srgb, var(--neon) 60%, transparent);
}

.pt-tile-mass {
    color: #AEB8D0;
    font-size: 12px;
    font-weight: 600;
}

.pt-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.pt-info-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
}

.pt-info h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: #FFFFFF;
}

.pt-info-other {
    color: #7E8AA6;
    font-size: 14px;
    font-weight: 600;
}

.pt-family {
    align-self: flex-start;
    padding: 2px 10px;
    border: 1px solid var(--neon);
    border-radius: 999px;
    color: var(--neon);
    font-size: 12px;
    font-weight: 800;
    text-shadow: 0 0 6px color-mix(in srgb, var(--neon) 60%, transparent);
}

.pt-fact {
    margin: 2px 0 0;
    color: #D6DCEB;
    font-size: 14px;
    line-height: 1.5;
}

.pt-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 4px 0 0;
}

.pt-facts div {
    display: flex;
    gap: 5px;
    font-size: 12.5px;
}

.pt-facts dt {
    color: #7E8AA6;
}

.pt-facts dd {
    margin: 0;
    color: #FFFFFF;
    font-weight: 700;
}


/* Phones: the info opens as a sheet at the bottom */

@media (max-width: 900px) {

    .pt-layout {
        padding: 0 12px;
    }

    .pt-scroll {
        padding: 14px;
    }

    .pt-detail {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        z-index: 9500;
        margin: 0;
        padding: 16px;
        border-color: #2A3350;
        background: rgba(9, 13, 26, 0.96);
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.45);
        transform: translateY(130%);
        transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .pt-detail.is-open {
        transform: none;
    }

    .pt-detail-empty {
        display: none !important;
    }

    .pt-detail-close {
        position: absolute;
        top: 8px;
        right: 8px;
        display: grid;
        place-items: center;
        width: 32px;
        height: 32px;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: #1A2238;
        color: #C9D1E4;
        cursor: pointer;
    }

    .pt-detail-close svg {
        width: 16px;
        height: 16px;
    }

    .pt-detail-body {
        gap: 14px;
    }

    .pt-tile {
        width: 86px;
        height: 96px;
    }

    .pt-tile-symbol {
        font-size: 36px;
    }

    .pt-info h2 {
        font-size: 20px;
    }

}

@media (prefers-reduced-motion: reduce) {

    .pt-cell,
    .pt-cell.is-selected,
    .pt-detail-body.is-new,
    .pt-detail-empty svg {
        animation: none !important;
    }

}


/* ==========================================
   PROFILE LOOK (shared: profile page + chat card)
   Accent colours, avatar rings and profile details.
========================================== */

.ps-accent-blue   { --ps-accent: #3F72C5; }
.ps-accent-sky    { --ps-accent: #0E94D0; }
.ps-accent-teal   { --ps-accent: #0F9488; }
.ps-accent-green  { --ps-accent: #2F9E5B; }
.ps-accent-lime   { --ps-accent: #5E960D; }
.ps-accent-amber  { --ps-accent: #C98A06; }
.ps-accent-orange { --ps-accent: #E07A2C; }
.ps-accent-red    { --ps-accent: #D93636; }
.ps-accent-pink   { --ps-accent: #D9578F; }
.ps-accent-purple { --ps-accent: #7C5CD6; }
.ps-accent-indigo { --ps-accent: #4F46E5; }
.ps-accent-slate  { --ps-accent: #5B6B80; }

:root[data-theme="dark"] .ps-accent-blue   { --ps-accent: #7A9DD7; }
:root[data-theme="dark"] .ps-accent-sky    { --ps-accent: #5CC8F5; }
:root[data-theme="dark"] .ps-accent-teal   { --ps-accent: #3CC9B8; }
:root[data-theme="dark"] .ps-accent-green  { --ps-accent: #5BC98A; }
:root[data-theme="dark"] .ps-accent-lime   { --ps-accent: #A3D64A; }
:root[data-theme="dark"] .ps-accent-amber  { --ps-accent: #F2C14E; }
:root[data-theme="dark"] .ps-accent-orange { --ps-accent: #F0A868; }
:root[data-theme="dark"] .ps-accent-red    { --ps-accent: #F07575; }
:root[data-theme="dark"] .ps-accent-pink   { --ps-accent: #E88AB4; }
:root[data-theme="dark"] .ps-accent-purple { --ps-accent: #A58CF0; }
:root[data-theme="dark"] .ps-accent-indigo { --ps-accent: #8B85F5; }
:root[data-theme="dark"] .ps-accent-slate  { --ps-accent: #9AA8BA; }

/* No picture: the person's initial on an accent gradient */
.ps-avatar.ps-no-picture {
    background-image:
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--ps-accent, #3F72C5) 70%, #FFFFFF),
            var(--ps-accent, #3F72C5)
        );
}

.ps-avatar.ps-no-picture::before {
    content: attr(data-initial);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-family: Arial, sans-serif;
    font-weight: 800;
    font-size: var(--ps-initial-size, 34px);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

/* Rings sit just outside the picture (and its border) */
.ps-avatar::after {
    content: "";
    position: absolute;
    inset: calc(-1 * var(--ps-ring-out, 8px));
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
}

.ps-ring-accent::after,
.ps-ring-gradient::after,
.ps-ring-glow::after,
.ps-ring-rainbow::after {
    opacity: 1;
}

.ps-ring-accent::after {
    background: var(--ps-accent, #3F72C5);
}

.ps-ring-gradient::after {
    background:
        conic-gradient(
            from 200deg,
            var(--ps-accent, #3F72C5),
            color-mix(in srgb, var(--ps-accent, #3F72C5) 35%, #FFFFFF),
            color-mix(in srgb, var(--ps-accent, #3F72C5) 60%, #FF6FB5),
            var(--ps-accent, #3F72C5)
        );
}

.ps-ring-glow::after {
    -webkit-mask: none;
    mask: none;
    border: 2px solid color-mix(in srgb, var(--ps-accent, #3F72C5) 80%, #FFFFFF);
    box-shadow:
        0 0 14px 2px color-mix(in srgb, var(--ps-accent, #3F72C5) 65%, transparent),
        inset 0 0 10px color-mix(in srgb, var(--ps-accent, #3F72C5) 45%, transparent);
    animation: ps-glow 2.8s ease-in-out infinite;
}

.ps-ring-rainbow::after {
    background: conic-gradient(#FF5E5E, #FFB347, #FFE45E, #5EE07A, #5EC8FF, #8A7CFF, #FF6FD8, #FF5E5E);
    animation: ps-spin 4s linear infinite;
}

@keyframes ps-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes ps-glow {
    50% {
        box-shadow:
            0 0 22px 5px color-mix(in srgb, var(--ps-accent, #3F72C5) 55%, transparent),
            inset 0 0 12px color-mix(in srgb, var(--ps-accent, #3F72C5) 50%, transparent);
    }
}

/* Status, class, subject and interests */
.ps-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.ps-details:empty {
    display: none;
}

.ps-details svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ps-status {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    border-left: 3px solid var(--ps-accent, #3F72C5);
    background: color-mix(in srgb, var(--ps-accent, #3F72C5) 10%, transparent);
    color: var(--t-text-26354a);
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.ps-status svg {
    margin-top: 1px;
    color: var(--ps-accent, #3F72C5);
}

.ps-facts,
.ps-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ps-fact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid var(--t-border-dce4f0);
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-34445a);
    font-size: 12.5px;
    font-weight: 700;
}

.ps-fact svg {
    color: var(--ps-accent, #3F72C5);
}

.ps-tag {
    padding: 4px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ps-accent, #3F72C5) 14%, transparent);
    color: color-mix(in srgb, var(--ps-accent, #3F72C5) 80%, var(--t-text-26354a));
    font-size: 12px;
    font-weight: 700;
}


/* ==========================================
   PROFILE PAGE
========================================== */

.pf-page {
    max-width: 1140px;
    margin: 0 auto;
    padding: 96px 24px 140px;
    box-sizing: border-box;
    color: var(--t-text-26354a);
}

.pf-page svg:not(.ps-deco-svg) {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pf-head {
    margin-bottom: 26px;
    animation: pf-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pf-head h1 {
    margin: 0 0 6px;
    font-size: 32px;
    letter-spacing: -0.02em;
}

.pf-head p {
    margin: 0;
    color: var(--t-text-526175);
    font-size: 15px;
}

.pf-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.pf-page.is-loading .pf-layout {
    opacity: 0.4;
    pointer-events: none;
}

.pf-page.is-ready .pf-layout {
    transition: opacity 0.3s ease;
}

@keyframes pf-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

/* ----- Preview ----- */

.pf-preview-column {
    position: sticky;
    top: 24px;
    animation: pf-rise 0.55s 0.05s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pf-preview-label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 10px 4px;
    color: var(--t-text-718096);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pf-preview-label svg {
    width: 16px;
    height: 16px;
}

.pf-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: var(--t-surface-ffffff);
    border: 1px solid var(--t-border-e3e9f2);
    box-shadow:
        0 18px 44px var(--t-shadow-26354a-a12),
        0 0 0 1px color-mix(in srgb, var(--ps-accent) 0%, transparent);
    transition: box-shadow 0.4s ease;
}

.pf-card-banner {
    position: relative;
    height: 132px;
    background-color: var(--t-surface-eaf2ff);
    background-size: cover;
    background-position: center;
    transition: background-image 0.4s ease;
}

.pf-banner-edit {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(15, 20, 30, 0.45);
    color: #FFFFFF;
    cursor: pointer;
    backdrop-filter: blur(6px);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
}

.pf-banner-edit svg {
    width: 19px;
    height: 19px;
}

.pf-card:hover .pf-banner-edit,
.pf-banner-edit:focus-visible {
    opacity: 1;
    transform: none;
}

.pf-banner-edit:hover {
    background: rgba(15, 20, 30, 0.65);
}

.pf-card-banner.is-drop,
.pf-card-avatar.is-drop {
    outline: 3px dashed var(--ps-accent);
    outline-offset: -6px;
}

.pf-card-banner.is-uploading::after,
.pf-card-avatar.is-uploading .pf-avatar-overlay {
    opacity: 1;
}

.pf-card-banner.is-uploading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    background-size: 200% 100%;
    animation: pf-shimmer 1.1s linear infinite;
}

@keyframes pf-shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.pf-card-body {
    position: relative;
    padding: 0 22px 22px;
}

.pf-card-avatar {
    --ps-ring-out: 10px;
    --ps-initial-size: 40px;
    position: relative;
    display: block;
    width: 104px;
    height: 104px;
    margin: -54px 0 10px;
    padding: 0;
    border-radius: 50%;
    border: 5px solid var(--t-surface-ffffff);
    background-color: var(--t-surface-f3f6fa);
    background-size: cover;
    background-position: center;
    box-shadow: 0 6px 18px var(--t-shadow-26354a-a18);
    cursor: pointer;
    font: inherit;
}

.pf-avatar-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(15, 20, 30, 0.5);
    color: #FFFFFF;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pf-avatar-overlay svg {
    width: 28px;
    height: 28px;
}

.pf-card-avatar:hover .pf-avatar-overlay,
.pf-card-avatar:focus-visible .pf-avatar-overlay {
    opacity: 1;
}

.pf-card-avatar.is-uploading .pf-avatar-overlay svg {
    animation: pf-pulse 0.9s ease-in-out infinite;
}

@keyframes pf-pulse {
    50% { transform: scale(0.85); opacity: 0.6; }
}

.pf-card-name {
    margin: 0;
    color: color-mix(in srgb, var(--ps-accent) 70%, var(--t-text-26354a));
    font-size: 23px;
    line-height: 1.2;
    overflow-wrap: anywhere;
    transition: color 0.3s ease;
}

.pf-card-handle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
    color: var(--t-text-718096);
    font-size: 14px;
}

.pf-card-pronouns {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-526175);
    font-size: 12px;
    font-weight: 700;
}

.pf-card-section-title {
    margin: 16px 0 6px;
    padding-top: 14px;
    border-top: 1px solid var(--t-border-e3e9f2);
    color: var(--t-text-718096);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.pf-card-bio {
    margin: 0;
    color: var(--t-text-34445a);
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.pf-card-bio.empty {
    color: var(--t-text-8a95a5);
    font-style: italic;
}

.pf-preview-hint {
    margin: 12px 4px 0;
    color: var(--t-text-718096);
    font-size: 12.5px;
    text-align: center;
}

/* ----- Tabs ----- */

.pf-settings {
    min-width: 0;
    animation: pf-rise 0.55s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pf-tabs {
    position: relative;
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    padding: 5px;
    border-radius: 14px;
    background: var(--t-surface-ffffff);
    border: 1px solid var(--t-border-e3e9f2);
    box-shadow: 0 6px 18px var(--t-shadow-26354a-a06);
}

.pf-tab {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--t-text-526175);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.25s ease;
}

.pf-tab svg {
    width: 18px;
    height: 18px;
}

.pf-tab:hover {
    color: var(--t-text-26354a);
}

.pf-tab.active {
    color: #FFFFFF;
}

.pf-tab:focus-visible {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 2px;
}

.pf-tab-indicator {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 0;
    width: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    box-shadow: 0 6px 14px var(--t-shadow-3f72c5-a25);
}

.pf-tabs.ready .pf-tab-indicator {
    transition:
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.pf-panel.active {
    animation: pf-panel-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes pf-panel-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* ----- Boxes and fields ----- */

.pf-box {
    margin-bottom: 16px;
    padding: 22px;
    border-radius: 16px;
    background: var(--t-surface-ffffff);
    border: 1px solid var(--t-border-e3e9f2);
    box-shadow: 0 6px 18px var(--t-shadow-26354a-a06);
}

.pf-box-title {
    margin: 0 0 4px;
    font-size: 16px;
}

.pf-hint {
    margin: 0 0 14px;
    color: var(--t-text-718096);
    font-size: 13px;
    line-height: 1.45;
}

.pf-field .pf-hint {
    margin: 6px 0 0;
}

.pf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pf-field {
    position: relative;
    margin-bottom: 16px;
}

.pf-box > .pf-field:last-child,
.pf-row:last-child .pf-field {
    margin-bottom: 0;
}

.pf-field label {
    display: block;
    margin-bottom: 7px;
    color: var(--t-text-34445a);
    font-size: 13px;
    font-weight: 700;
}

.pf-field input,
.pf-field textarea,
.pf-tag-input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 13px;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-f8fafd);
    color: var(--t-text-26354a);
    font-family: inherit;
    font-size: 14.5px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.pf-field textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.pf-field input::placeholder,
.pf-field textarea::placeholder {
    color: var(--t-text-9aa5b5);
}

.pf-field input:hover,
.pf-field textarea:hover,
.pf-tag-input:hover {
    border-color: var(--t-border-c2cfdf);
}

.pf-field input:focus,
.pf-field textarea:focus,
.pf-tag-input:focus-within {
    outline: none;
    border-color: var(--t-border-4a80d8);
    background: var(--t-surface-ffffff);
    box-shadow: 0 0 0 4px var(--t-shadow-3f72c5-a15);
}

.pf-field input[readonly] {
    background: var(--t-surface-f1f4f8);
    color: var(--t-text-526175);
    cursor: default;
}

.pf-field input[readonly]:focus {
    box-shadow: none;
    border-color: var(--t-border-dce4f0);
}

.password-form .pf-field input.is-invalid {
    border-color: var(--t-border-d93636);
    box-shadow: 0 0 0 4px var(--t-shadow-d93636-a10);
}

.pf-input-icon {
    position: relative;
}

.pf-input-icon > svg {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: var(--t-text-8a95a5);
    pointer-events: none;
    transition: color 0.2s ease;
}

.pf-input-icon:focus-within > svg {
    color: var(--t-text-3f72c5);
}

.pf-field .pf-input-icon input {
    padding-left: 40px;
}

.pf-input-icon .pf-count {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.pf-input-icon input#pfStatus {
    padding-right: 64px;
}

.pf-count {
    color: var(--t-text-9aa5b5);
    font-size: 11.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    transition: color 0.2s ease;
}

.pf-count.is-near {
    color: var(--t-text-e04747);
}

.pf-count-below {
    display: block;
    margin-top: 5px;
    text-align: right;
}

/* ----- Interests ----- */

.pf-tag-input {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 7px 8px;
    min-height: 46px;
    cursor: text;
}

.pf-tag-list {
    display: contents;
}

.pf-field .pf-tag-input input {
    flex: 1;
    min-width: 140px;
    width: auto;
    padding: 4px 4px;
    border: none;
    background: transparent;
    box-shadow: none;
}

.pf-field .pf-tag-input input:focus {
    box-shadow: none;
}

.pf-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 4px 4px 11px;
    border-radius: 999px;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    font-size: 13px;
    font-weight: 700;
    animation: pf-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.pf-tag.leaving {
    animation: pf-unpop 0.16s ease forwards;
}

.pf-tag button {
    width: 20px;
    height: 20px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.pf-tag button:hover {
    background: var(--t-shadow-3f72c5-a20);
}

.pf-tag button svg {
    width: 13px;
    height: 13px;
    stroke-width: 2.2;
}

@keyframes pf-pop {
    from { opacity: 0; transform: scale(0.6); }
}

@keyframes pf-unpop {
    to { opacity: 0; transform: scale(0.6); }
}

.shake {
    animation: pf-shake 0.4s ease;
}

@keyframes pf-shake {
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* ----- Buttons ----- */

.pf-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.pf-button:active:not(:disabled) {
    transform: scale(0.96);
}

.pf-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pf-button:focus-visible {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 2px;
}

.pf-button-primary {
    background: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    color: #FFFFFF;
    box-shadow: 0 5px 14px var(--t-shadow-3f72c5-a25);
}

.pf-button-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px var(--t-shadow-3f72c5-a30);
}

.pf-button-soft {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.pf-button-soft:hover:not(:disabled) {
    background: var(--t-surface-dcebff);
}

.pf-button-ghost {
    background: transparent;
    color: var(--t-text-526175);
    box-shadow: inset 0 0 0 1.5px var(--t-border-dce4f0);
}

.pf-button-ghost:hover:not(:disabled) {
    background: var(--t-surface-f3f6fa);
}

.pf-button-danger {
    background: var(--t-surface-d93636);
    color: #FFFFFF;
    box-shadow: 0 5px 14px var(--t-shadow-d93636-a20);
}

.pf-button.is-busy {
    opacity: 0.7;
    cursor: progress;
}

.pf-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
}

/* ----- Appearance ----- */

.pf-media-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.pf-media {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    border: 1px solid var(--t-border-e3e9f2);
}

.pf-media-thumb {
    flex: 0 0 auto;
    position: relative;
    background-color: var(--t-surface-eaf2ff);
    background-size: cover;
    background-position: center;
}

.pf-media-avatar {
    --ps-initial-size: 22px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
}

/* The thumbnail shows the picture only; the ring is shown on the card. */
.pf-media-avatar::after {
    display: none;
}

.pf-media-banner {
    width: 96px;
    height: 58px;
    border-radius: 10px;
}

.pf-media-text strong {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

.pf-media-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pf-media-buttons .pf-button {
    padding: 7px 12px;
    font-size: 13px;
}

.pf-choice-check {
    position: absolute;
    width: 18px;
    height: 18px;
    padding: 3px;
    box-sizing: border-box;
    border-radius: 50%;
    background: #FFFFFF;
    color: #1F2733;
    stroke-width: 3 !important;
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.active > .pf-choice-check {
    opacity: 1;
    transform: scale(1);
}

.pf-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pf-swatch {
    position: relative;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: var(--ps-accent);
    cursor: pointer;
    box-shadow: 0 0 0 0 var(--ps-accent);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.pf-swatch:hover {
    transform: scale(1.1);
}

.pf-swatch.active {
    box-shadow: 0 0 0 3px var(--t-surface-ffffff), 0 0 0 5.5px var(--ps-accent);
}

.pf-swatch .pf-choice-check {
    position: static;
    background: transparent;
    color: #FFFFFF;
}

.pf-swatch:focus-visible,
.pf-banner-choice:focus-visible,
.pf-ring-choice:focus-visible {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 3px;
}

.pf-banners {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 10px;
}

.pf-banner-choice,
.pf-ring-choice {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 6px 6px 8px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-34445a);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.pf-banner-choice:hover,
.pf-ring-choice:hover {
    transform: translateY(-2px);
}

.pf-banner-choice.active,
.pf-ring-choice.active {
    border-color: var(--t-border-4a80d8);
    background: var(--t-surface-eaf2ff);
}

.pf-banner-sample {
    width: 100%;
    height: 46px;
    border-radius: 8px;
    background-size: cover;
}

.pf-banner-choice .pf-choice-check,
.pf-ring-choice .pf-choice-check {
    top: 10px;
    right: 10px;
}

.pf-rings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 10px;
}

.pf-ring-choice {
    padding-top: 14px;
}

.pf-ring-sample {
    --ps-ring-out: 6px;
    --ps-initial-size: 18px;
    position: relative;
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
    border-radius: 50%;
    background-color: var(--t-surface-eaf2ff);
    background-size: cover;
    background-position: center;
}

.pf-site-theme {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pf-site-theme .pf-hint {
    margin: 0;
}

/* ----- Save bar ----- */

.pf-savebar {
    position: fixed;
    left: 50%;
    bottom: 22px;
    z-index: 8000;
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(640px, calc(100vw - 32px));
    box-sizing: border-box;
    padding: 10px 10px 10px 18px;
    border-radius: 14px;
    background: #1F2733;
    color: #FFFFFF;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
    transform: translate(-50%, 150%);
    opacity: 0;
    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.3s ease;
}

:root[data-theme="dark"] .pf-savebar {
    background: #0E1116;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.pf-savebar.visible {
    transform: translate(-50%, 0);
    opacity: 1;
}

.pf-savebar.shake {
    animation: pf-bar-shake 0.4s ease;
}

@keyframes pf-bar-shake {
    20%, 60% { transform: translate(calc(-50% - 6px), 0); }
    40%, 80% { transform: translate(calc(-50% + 6px), 0); }
}

.pf-savebar-text {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 700;
}

.pf-savebar svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: #F2C14E;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.pf-savebar .pf-button-ghost {
    color: #DDE3EC;
    box-shadow: none;
}

.pf-savebar .pf-button-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ----- Toast ----- */

.pf-toast {
    position: fixed;
    left: 50%;
    bottom: 96px;
    z-index: 8100;
    display: flex;
    align-items: center;
    gap: 9px;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
    padding: 11px 16px;
    border-radius: 12px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    border: 1px solid var(--t-border-e3e9f2);
    box-shadow: 0 14px 34px var(--t-shadow-26354a-a20);
    font-size: 14px;
    font-weight: 700;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 16px) scale(0.96);
    transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.pf-toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.pf-toast svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pf-toast.is-ok svg {
    color: var(--t-text-39a96b);
}

.pf-toast.is-error svg {
    color: var(--t-text-d93636);
}

/* ----- Confirm dialog ----- */

.pf-dialog {
    position: fixed;
    inset: 0;
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(10, 14, 22, 0.45);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.pf-dialog.open {
    opacity: 1;
    visibility: visible;
}

.pf-dialog-card {
    width: min(380px, 100%);
    padding: 22px;
    border-radius: 16px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(12px) scale(0.96);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.pf-dialog.open .pf-dialog-card {
    transform: none;
}

.pf-dialog-card h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.pf-dialog-card p {
    margin: 0 0 20px;
    color: var(--t-text-526175);
    font-size: 14px;
    line-height: 1.5;
}

.pf-dialog-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ----- Account tab: existing password + blocked users pieces ----- */

.pf-panel .password-card {
    margin-top: 0;
}

.pf-panel .password-button {
    padding: 10px 18px;
}

/* ----- Chat profile card extras ----- */

.chat-profile-card-picture.ps-avatar {
    --ps-ring-out: 9px;
    --ps-initial-size: 32px;
}

.chat-profile-card-name.ps-accent-name {
    color: color-mix(in srgb, var(--ps-accent, #3F72C5) 70%, var(--t-text-26354a));
}

.chat-profile-card .ps-details {
    margin: 8px 0 4px;
}

/* ----- Small screens ----- */

@media (max-width: 920px) {

    .pf-layout {
        grid-template-columns: 1fr;
    }

    .pf-preview-column {
        position: static;
        max-width: 440px;
        width: 100%;
        margin: 0 auto;
    }

}

@media (max-width: 600px) {

    .pf-page {
        padding: 80px 16px 140px;
    }

    .pf-head h1 {
        font-size: 26px;
    }

    .pf-row,
    .pf-media-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .pf-media-row {
        gap: 10px;
    }

    .pf-row .pf-field {
        margin-bottom: 16px;
    }

    .pf-box {
        padding: 18px 16px;
    }

    .pf-tab span {
        font-size: 13px;
    }

    .pf-tab svg {
        display: none;
    }

    .pf-site-theme {
        flex-direction: column;
        align-items: flex-start;
    }

    .pf-savebar-text span {
        font-size: 13px;
    }

    .pf-savebar .pf-button {
        padding: 9px 12px;
    }

}

@media (prefers-reduced-motion: reduce) {

    .pf-page *,
    .pf-savebar,
    .pf-toast,
    .pf-dialog,
    .pf-dialog-card,
    .ps-avatar::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

}

/* Profile page spacing tweaks */
.pf-box-title + .pf-row,
.pf-box-title + form {
    margin-top: 16px;
}

.pf-panel .blocked-users-card {
    margin-top: 0;
}

.password-form .pf-actions {
    margin-top: 6px;
}

/* Chat profile card: room for Message / Nickname / Block, and never taller than the window */
.chat-profile-card-actions {
    flex-wrap: wrap;
}

.chat-profile-card-actions .chat-profile-card-message {
    flex: 1 1 100%;
}

.chat-profile-card-actions > button:not(.chat-profile-card-message) {
    flex: 1 1 0;
    justify-content: center;
}

.chat-profile-card {
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    overscroll-behavior: contain;
}


/* ==========================================
   PROFILE FRAMES (anime + school subject drawings)
   The drawing box is 150% of the picture, centred on it.
========================================== */

.ps-deco {
    position: absolute;
    top: -25%;
    left: -25%;
    width: 150%;
    height: 150%;
    z-index: 2;
    pointer-events: none;
    animation: ps-deco-in 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.ps-deco-svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

@keyframes ps-deco-in {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
}

/* Thumbnails next to the upload buttons show just the picture */
.pf-media-avatar .ps-deco {
    display: none;
}

/* The camera overlay on your own card stays above the drawing */
.pf-card-avatar .pf-avatar-overlay {
    z-index: 3;
}

.pf-ring-group-title {
    grid-column: 1 / -1;
    margin: 6px 2px 0;
    color: var(--t-text-718096);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pf-ring-group-title:first-child {
    margin-top: 0;
}

.pf-ring-choice {
    padding-top: 18px;
}

.pf-ring-sample {
    margin: 4px 0 8px;
}

@media (prefers-reduced-motion: reduce) {

    .ps-deco {
        animation: none;
    }

}

/* Bigger previews so the frames read at a glance */
.pf-ring-sample {
    --ps-initial-size: 22px;
    width: 54px;
    height: 54px;
    margin: 10px 0 12px;
}

.pf-rings {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
}

/* Chat card: leave room for frames that reach past the picture */
.chat-profile-card-picture.ps-avatar:has(> .ps-deco) {
    left: 26px;
}


/* ==========================================
   CHAT: NO PUBLIC ROOM
   Empty state, "New message" button and people picker.
========================================== */

body.chat-nothing-open #chatForm,
body.chat-nothing-open .typing-indicator {
    display: none !important;
}

.chat-new-message-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 24px);
    margin: 12px 12px 6px;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    color: #FFFFFF;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 14px var(--t-shadow-3f72c5-a22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-new-message-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px var(--t-shadow-3f72c5-a28);
}

.chat-new-message-button:active {
    transform: scale(0.97);
}

.chat-new-message-button:focus-visible {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 2px;
}

/* Empty state in the message area */
.chat-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    box-sizing: border-box;
    padding: 40px 24px;
    text-align: center;
    color: var(--t-text-26354a);
    animation: chat-empty-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.chat-empty-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    margin-bottom: 18px;
    border-radius: 28px;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    animation: chat-empty-float 4s ease-in-out infinite;
}

.chat-empty-art::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 34px;
    border: 2px dashed var(--t-border-c6d7ee);
    opacity: 0.8;
}

.chat-empty-state h3 {
    margin: 0 0 8px;
    font-size: 21px;
}

.chat-empty-state p {
    max-width: 340px;
    margin: 0 0 22px;
    color: var(--t-text-526175);
    font-size: 14.5px;
    line-height: 1.5;
}

.chat-empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.chat-empty-primary,
.chat-empty-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 11px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.chat-empty-primary {
    border: none;
    background: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    color: #FFFFFF;
    box-shadow: 0 6px 16px var(--t-shadow-3f72c5-a25);
}

.chat-empty-secondary {
    border: 1.5px solid var(--t-border-dce4f0);
    background: var(--t-surface-ffffff);
    color: var(--t-text-34445a);
}

.chat-empty-primary:hover,
.chat-empty-secondary:hover {
    transform: translateY(-2px);
}

.chat-empty-secondary:hover {
    background: var(--t-surface-f3f6fa);
}

.chat-empty-primary:focus-visible,
.chat-empty-secondary:focus-visible {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 2px;
}

@keyframes chat-empty-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
}

@keyframes chat-empty-float {
    50% {
        transform: translateY(-6px);
    }
}

/* People picker */
.chat-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 9600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(10, 14, 22, 0.45);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.chat-picker-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.chat-picker {
    display: flex;
    flex-direction: column;
    width: min(440px, 100%);
    max-height: min(620px, calc(100vh - 32px));
    padding: 20px;
    box-sizing: border-box;
    border-radius: 18px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(14px) scale(0.96);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.chat-picker-overlay.visible .chat-picker {
    transform: none;
}

.chat-picker-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.chat-picker-head h3 {
    margin: 0 0 3px;
    font-size: 19px;
}

.chat-picker-head p {
    margin: 0;
    color: var(--t-text-718096);
    font-size: 13.5px;
}

.chat-picker-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    flex: 0 0 auto;
    border: none;
    border-radius: 50%;
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-526175);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.chat-picker-close:hover {
    background: var(--t-surface-e7edf5);
    transform: rotate(90deg);
}

.chat-picker-search {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    padding: 0 12px;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 11px;
    background: var(--t-surface-f8fafd);
    color: var(--t-text-8a95a5);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-picker-search:focus-within {
    border-color: var(--t-border-4a80d8);
    box-shadow: 0 0 0 4px var(--t-shadow-3f72c5-a15);
    color: var(--t-text-3f72c5);
}

.chat-picker-search input {
    flex: 1;
    min-width: 0;
    padding: 11px 0;
    border: none;
    background: transparent;
    color: var(--t-text-26354a);
    font-family: inherit;
    font-size: 14.5px;
    outline: none;
}

.chat-picker-list {
    flex: 1;
    min-height: 120px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-y: auto;
}

.chat-picker-user {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: 11px;
    background: transparent;
    color: inherit;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.chat-picker-user:hover,
.chat-picker-user:focus-visible {
    background: var(--t-surface-f0f5ff);
    outline: none;
}

.chat-picker-avatar {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--t-surface-dcebff);
    background-size: cover;
    background-position: center;
    color: var(--t-text-3f72c5);
    font-weight: 800;
}

.chat-picker-online {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #3BB273;
    border: 2px solid var(--t-surface-ffffff);
}

.chat-picker-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.chat-picker-text strong {
    overflow: hidden;
    font-size: 14.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-picker-text span {
    color: var(--t-text-718096);
    font-size: 12.5px;
}

.chat-picker-go {
    color: var(--t-text-9aa5b5);
    transform: scaleX(-1);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.chat-picker-user:hover .chat-picker-go,
.chat-picker-user:focus-visible .chat-picker-go {
    opacity: 1;
}

.chat-picker-empty {
    padding: 28px 10px;
    color: var(--t-text-718096);
    font-size: 14px;
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {

    .chat-empty-state,
    .chat-empty-art,
    .chat-picker,
    .chat-picker-overlay {
        animation: none !important;
        transition: none !important;
    }

}


/* ==========================================
   QUIZ STREAK FIRE, POINTS AND LEADERBOARD
========================================== */

/* ----- The fire ----- */

.qz-flame {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: var(--size, 40px);
    height: calc(var(--size, 40px) * 1.125);
    transition: width 0.6s cubic-bezier(0.34, 1.4, 0.64, 1), height 0.6s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.qz-flame-svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.qz-flame-body {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: qz-flame-sway 2.2s ease-in-out infinite;
}

.qz-flame-outer,
.qz-flame-middle,
.qz-flame-core {
    transform-box: fill-box;
    transform-origin: 50% 100%;
}

.qz-flame-outer {
    animation: qz-flame-flicker 1.1s ease-in-out infinite alternate;
}

.qz-flame-middle {
    animation: qz-flame-flicker 0.8s ease-in-out infinite alternate-reverse;
}

.qz-flame-core {
    animation: qz-flame-flicker 0.6s ease-in-out infinite alternate;
}

.qz-flame-glow {
    opacity: 0.35;
    filter: blur(3px);
    animation: qz-flame-glow 1.4s ease-in-out infinite alternate;
}

.qz-spark {
    opacity: 0;
    transform-box: fill-box;
    animation: qz-spark 1.8s ease-out infinite;
    animation-delay: var(--d, 0s);
}

/* Higher streaks burn brighter */
.qz-flame-2 .qz-flame-svg { filter: drop-shadow(0 0 3px rgba(255, 140, 0, 0.45)); }
.qz-flame-3 .qz-flame-svg { filter: drop-shadow(0 0 5px rgba(255, 64, 129, 0.5)); }
.qz-flame-4 .qz-flame-svg { filter: drop-shadow(0 0 7px rgba(138, 63, 252, 0.55)); }

.qz-flame.is-rainbow .qz-flame-svg {
    animation: qz-flame-rainbow 2.4s ease-in-out infinite alternate;
}

/* No streak: a still, grey ember */
.qz-flame.is-out .qz-flame-body,
.qz-flame.is-out .qz-flame-outer,
.qz-flame.is-out .qz-flame-middle,
.qz-flame.is-out .qz-flame-core,
.qz-flame.is-out .qz-flame-glow {
    animation: none;
}

.qz-flame.is-out {
    opacity: 0.65;
}

@keyframes qz-flame-sway {
    0%, 100% { transform: skewX(0deg); }
    30% { transform: skewX(-3deg); }
    70% { transform: skewX(3deg); }
}

@keyframes qz-flame-flicker {
    from { transform: scale(1, 1); }
    to { transform: scale(0.94, 1.07); }
}

@keyframes qz-flame-glow {
    to { opacity: 0.6; }
}

@keyframes qz-spark {
    0% { opacity: 0; transform: translate(0, 0); }
    15% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--x, 0), -38px); }
}

@keyframes qz-flame-rainbow {
    from { filter: hue-rotate(-25deg) drop-shadow(0 0 6px rgba(124, 77, 255, 0.55)); }
    to { filter: hue-rotate(25deg) drop-shadow(0 0 10px rgba(255, 61, 154, 0.55)); }
}

/* ----- Stats strip on the quizzes page ----- */

.qz-stats {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 22px;
}

.qz-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 16px 18px;
    border-radius: 16px;
    background: var(--t-surface-ffffff);
    border: 1px solid var(--t-border-e3e9f2);
    box-shadow: 0 6px 18px var(--t-shadow-26354a-a06);
    color: var(--t-text-26354a);
    text-decoration: none;
    animation: qz-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.qz-stat:nth-child(2) { animation-delay: 0.05s; }
.qz-stat:nth-child(3) { animation-delay: 0.1s; }

.qz-stat-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.qz-stat-text strong {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.qz-stat-text span {
    color: var(--t-text-718096);
    font-size: 13px;
    line-height: 1.35;
}

.qz-stat-text small {
    color: var(--t-text-8a95a5);
    font-size: 12px;
    font-weight: 700;
}

.qz-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.qz-stat-icon svg {
    width: 24px;
    height: 24px;
}

.qz-points .qz-stat-icon {
    background: rgba(242, 185, 27, 0.16);
    color: #D99A06;
}

.qz-points .qz-stat-icon svg {
    fill: rgba(242, 185, 27, 0.35);
}

.qz-streak {
    position: relative;
    overflow: hidden;
}

.qz-streak.is-pending::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px dashed rgba(255, 138, 31, 0.55);
    pointer-events: none;
}

.qz-streak.is-done {
    background:
        linear-gradient(135deg, rgba(255, 138, 31, 0.12), rgba(255, 64, 129, 0.08)),
        var(--t-surface-ffffff);
    border-color: rgba(255, 138, 31, 0.35);
}

.qz-rank {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.qz-rank:hover {
    transform: translateY(-2px);
    border-color: var(--t-border-c6d7ee);
    box-shadow: 0 10px 24px var(--t-shadow-26354a-a10);
}

.qz-rank .qz-chevron {
    margin-left: auto;
}

/* ----- Results reward ----- */

.qz-reward {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    max-width: 520px;
    margin: 16px auto 4px;
    text-align: left;
}

.qz-reward-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--t-surface-f7f9fc);
    border: 1px solid var(--t-border-e3e9f2);
    animation: qz-pop-in 0.55s 0.6s cubic-bezier(0.34, 1.5, 0.64, 1) both;
}

.qz-reward-streak {
    animation-delay: 0.8s;
}

.qz-reward-item > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.qz-reward-item strong {
    font-size: 18px;
    font-weight: 800;
}

.qz-reward-item span {
    color: var(--t-text-718096);
    font-size: 12.5px;
    line-height: 1.35;
}

.qz-reward-item .qz-stat-icon {
    width: 40px;
    height: 40px;
}

.qz-reward-points .qz-stat-icon {
    background: rgba(242, 185, 27, 0.16);
    color: #D99A06;
}

.qz-reward-points.is-up strong {
    color: #D99A06;
}

.qz-reward-streak.is-up {
    border-color: rgba(255, 138, 31, 0.45);
    background:
        linear-gradient(135deg, rgba(255, 138, 31, 0.12), rgba(255, 64, 129, 0.08)),
        var(--t-surface-f7f9fc);
}

.qz-reward-streak.is-up .qz-flame {
    animation: qz-flame-grow 0.9s 1s cubic-bezier(0.34, 1.6, 0.64, 1) both;
}

@keyframes qz-pop-in {
    from { opacity: 0; transform: translateY(10px) scale(0.92); }
}

@keyframes qz-flame-grow {
    0% { transform: scale(0.4); }
    60% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* ----- Leaderboard ----- */

.qz-rules {
    margin-bottom: 22px;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--t-surface-ffffff);
    border: 1px solid var(--t-border-e3e9f2);
    color: var(--t-text-34445a);
    font-size: 14px;
}

.qz-rules summary {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.qz-rules summary::-webkit-details-marker {
    display: none;
}

.qz-rules summary svg {
    width: 18px;
    height: 18px;
    color: var(--t-text-3f72c5);
}

.qz-rules ul {
    margin: 10px 0 2px;
    padding-left: 22px;
    line-height: 1.6;
    color: var(--t-text-526175);
}

.qz-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 14px;
    margin: 10px 0 26px;
}

.qz-podium-place {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(200px, 32%);
    animation: qz-pop-in 0.6s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.qz-podium-place.is-1 { animation-delay: 0.25s; }
.qz-podium-place.is-2 { animation-delay: 0.1s; }
.qz-podium-place.is-3 { animation-delay: 0.4s; }

.qz-podium-person {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    margin-bottom: 12px;
    text-align: center;
}

.qz-podium-person > strong {
    max-width: 100%;
    margin-top: 10px;
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qz-podium-person > span {
    color: var(--t-text-718096);
    font-size: 13px;
}

.qz-podium-person > span strong {
    color: var(--t-text-26354a);
    font-size: 16px;
}

.qz-podium-avatar {
    --ps-ring-out: 6px;
    --ps-initial-size: 26px;
    position: relative;
    display: block;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background-color: var(--t-surface-dcebff);
    background-size: cover;
    background-position: center;
    box-shadow: 0 6px 16px var(--t-shadow-26354a-a16);
}

.qz-podium-place.is-1 .qz-podium-avatar {
    --ps-initial-size: 32px;
    width: 82px;
    height: 82px;
}

.qz-podium-crown {
    position: absolute;
    top: -26px;
    z-index: 3;
    color: #F2B91B;
    animation: qz-crown 2.4s ease-in-out infinite;
}

.qz-podium-crown svg {
    width: 26px;
    height: 26px;
    fill: #FFD54F;
}

@keyframes qz-crown {
    50% { transform: translateY(-4px) rotate(-6deg); }
}

.qz-podium-streak,
.qz-board-streak {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #E8710A;
    font-size: 13px;
    font-weight: 800;
}

.qz-podium-block {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    padding-top: 12px;
    border-radius: 14px 14px 6px 6px;
    color: #FFFFFF;
    font-size: 30px;
    font-weight: 900;
    box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.12);
}

.qz-podium-place.is-1 .qz-podium-block {
    height: 120px;
    background: linear-gradient(180deg, #FFD54F, #F2A900);
}

.qz-podium-place.is-2 .qz-podium-block {
    height: 88px;
    background: linear-gradient(180deg, #CFD8E3, #9AA8BA);
}

.qz-podium-place.is-3 .qz-podium-block {
    height: 66px;
    background: linear-gradient(180deg, #F0B27A, #C77C3A);
}

.qz-podium-place.is-me .qz-podium-person > strong {
    color: var(--t-text-3f72c5);
}

.qz-board {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.qz-board-me {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 2px dashed var(--t-border-dce4f0);
}

.qz-board-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--t-surface-ffffff);
    border: 1px solid var(--t-border-e3e9f2);
    animation: qz-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--i, 0) * 0.03s);
}

.qz-board-row.is-me {
    border-color: var(--t-border-5b8def);
    background:
        linear-gradient(90deg, var(--t-surface-eaf2ff), transparent 70%),
        var(--t-surface-ffffff);
}

.qz-board-rank {
    width: 30px;
    flex: 0 0 auto;
    color: var(--t-text-8a95a5);
    font-size: 16px;
    font-weight: 800;
    text-align: center;
}

.qz-board-avatar {
    --ps-ring-out: 4px;
    --ps-initial-size: 16px;
    position: relative;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--t-surface-dcebff);
    background-size: cover;
    background-position: center;
}

.qz-board-avatar .ps-deco {
    display: none;
}

.qz-board-name {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.qz-board-name strong {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qz-board-name em {
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--t-surface-3f72c5);
    color: #FFFFFF;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
    vertical-align: 2px;
}

.qz-board-name > span {
    overflow: hidden;
    color: var(--t-text-718096);
    font-size: 12.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qz-board-streak {
    width: 46px;
    flex: 0 0 auto;
    justify-content: flex-end;
}

.qz-board-points {
    width: 80px;
    flex: 0 0 auto;
    text-align: right;
}

.qz-board-points strong {
    font-size: 17px;
    font-weight: 800;
}

.qz-board-points small {
    margin-left: 3px;
    color: var(--t-text-8a95a5);
    font-size: 12px;
    font-weight: 700;
}

.qz-board-note {
    margin-top: 16px;
    color: var(--t-text-718096);
    text-align: center;
}

@media (max-width: 760px) {

    .qz-stats {
        grid-template-columns: 1fr 1fr;
    }

    .qz-streak {
        grid-column: 1 / -1;
    }

    .qz-reward {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 520px) {

    .qz-stats {
        grid-template-columns: 1fr;
    }

    .qz-podium {
        gap: 8px;
    }

    .qz-podium-avatar {
        width: 52px;
        height: 52px;
    }

    .qz-podium-place.is-1 .qz-podium-avatar {
        width: 64px;
        height: 64px;
    }

    .qz-board-row {
        gap: 10px;
        padding: 10px 12px;
    }

    .qz-board-streak {
        display: none;
    }

    .qz-board-points {
        width: auto;
    }

}

@media (prefers-reduced-motion: reduce) {

    .qz-flame *,
    .qz-flame,
    .qz-flame-svg,
    .qz-stat,
    .qz-reward-item,
    .qz-podium-place,
    .qz-podium-crown,
    .qz-board-row {
        animation: none !important;
        transition: none !important;
    }

}

/* Filled stars (the general quiz icon rule draws outlines only) */
.qz-layout .qz-podium-crown svg {
    fill: #FFD54F !important;
    stroke: #E0A100 !important;
}

.qz-layout .qz-points .qz-stat-icon svg,
.qz-layout .qz-reward-points .qz-stat-icon svg {
    fill: rgba(242, 185, 27, 0.35) !important;
}


/* ==========================================
   GROUP LANGUAGE FILTER
========================================== */

.gs-segmented-wide .gs-segment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 6px;
    line-height: 1.2;
}

.gs-segmented-wide .gs-segment svg {
    flex: 0 0 auto;
}

/* Small shield after a message whose words were hidden */
.chat-filtered-tag {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    vertical-align: -1px;
    opacity: 0.55;
    cursor: help;
    transition: opacity 0.2s ease;
}

.chat-filtered-tag:hover {
    opacity: 0.95;
}

@media (max-width: 520px) {

    .gs-segmented-wide .gs-segment svg {
        display: none;
    }

    .gs-segmented-wide .gs-segment {
        font-size: 12px;
    }

}


/* ==========================================
   GROUP POLLS
========================================== */

/* Poll bubbles are always a light card, also for your own polls */
.chat-message.chat-poll-message {
    width: 360px;
    max-width: min(82%, 72vw);
    box-sizing: border-box;
    background: var(--t-surface-ffffff);
    border-color: var(--t-border-dce4f0);
}

.chat-message.own-message.chat-poll-message {
    background: var(--t-surface-ffffff);
    border-color: var(--t-border-5b8def);
    box-shadow: 0 6px 18px var(--t-shadow-3f72c5-a15);
}

.chat-message.own-message.chat-poll-message .chat-username {
    color: var(--t-text-3f72c5);
}

.chat-message.own-message.chat-poll-message .chat-time {
    color: var(--t-text-8a95a5);
}

.chat-poll {
    margin-top: 2px;
    color: var(--t-text-26354a);
}

.chat-poll-head {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
    color: var(--t-text-718096);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.chat-poll-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.chat-poll.is-closed .chat-poll-icon {
    background: var(--t-surface-eef2f7);
    color: var(--t-text-718096);
}

.chat-poll-question {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: break-word;
}

.chat-poll-options {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.chat-poll-option {
    --pct: 0%;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    overflow: hidden;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 11px;
    background: var(--t-surface-f8fafd);
    color: var(--t-text-26354a);
    font-family: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    isolation: isolate;
    animation: poll-option-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--i, 0) * 0.04s);
    transition: border-color 0.2s ease, transform 0.15s ease, background-color 0.2s ease;
}

.chat-poll-option:hover:not(:disabled) {
    border-color: var(--t-border-5b8def);
}

.chat-poll-option:active:not(:disabled) {
    transform: scale(0.985);
}

.chat-poll-option:focus-visible {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 2px;
}

.chat-poll-option:disabled {
    cursor: default;
}

/* The result bar */
.chat-poll-fill {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: -1;
    width: var(--pct);
    background: var(--t-surface-e5ebf4);
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.chat-poll-option.is-mine .chat-poll-fill {
    background: color-mix(in srgb, var(--t-surface-4a80d8) 22%, transparent);
}

.chat-poll-option.is-mine {
    border-color: var(--t-border-4a80d8);
}

.chat-poll-option.is-winner {
    border-color: #E0A100;
}

.chat-poll-option.is-winner .chat-poll-fill {
    background: rgba(242, 185, 27, 0.25);
}

/* Radio (one answer) or checkbox (several) */
.chat-poll-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border: 2px solid var(--t-border-c2cfdf);
    border-radius: 50%;
    color: #FFFFFF;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.chat-poll.is-multiple .chat-poll-mark {
    border-radius: 5px;
}

.chat-poll-mark svg {
    opacity: 0;
    transform: scale(0.4);
    stroke-width: 3;
    transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.34, 1.6, 0.64, 1);
}

.chat-poll-option.is-mine .chat-poll-mark {
    border-color: var(--t-border-4a80d8);
    background: var(--t-surface-4a80d8);
}

.chat-poll-option.is-mine .chat-poll-mark svg {
    opacity: 1;
    transform: scale(1);
}

.chat-poll-text {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    overflow-wrap: break-word;
}

.chat-poll-option.is-winner .chat-poll-text {
    font-weight: 800;
}

.chat-poll-voters {
    display: flex;
    flex: 0 0 auto;
}

.chat-poll-voter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: -6px;
    border: 2px solid var(--t-surface-ffffff);
    border-radius: 50%;
    background: var(--t-surface-dcebff);
    color: var(--t-text-3f72c5);
    font-size: 9.5px;
    font-weight: 800;
}

.chat-poll-voter:first-child {
    margin-left: 0;
}

.chat-poll-percent {
    flex: 0 0 auto;
    min-width: 34px;
    color: var(--t-text-526175);
    font-size: 13px;
    font-weight: 800;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.chat-poll-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    margin-top: 10px;
    color: var(--t-text-718096);
    font-size: 12.5px;
}

.chat-poll-total {
    font-weight: 700;
}

.chat-poll-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.chat-poll-hint {
    font-style: italic;
}

.chat-poll-link {
    padding: 0;
    border: none;
    background: none;
    color: var(--t-text-3f72c5);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}

.chat-poll-link:hover {
    text-decoration: underline;
}

.chat-poll-link.is-end {
    color: var(--t-text-d93636);
}

@keyframes poll-option-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
}

/* ----- Creating a poll ----- */

.poll-create {
    width: min(480px, 100%);
    padding: 0;
    overflow: hidden;
}

.poll-create .chat-picker-head {
    padding: 20px 20px 0;
}

.poll-create-body {
    flex: 1;
    min-height: 0;
    padding: 4px 20px 8px;
    overflow-y: auto;
}

.poll-create-label {
    display: block;
    margin: 12px 0 7px;
    color: var(--t-text-34445a);
    font-size: 13px;
    font-weight: 800;
}

.poll-create-question-wrap {
    position: relative;
}

.poll-create-question,
.poll-create-option input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-f8fafd);
    color: var(--t-text-26354a);
    font-family: inherit;
    font-size: 14.5px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.poll-create-question {
    padding-bottom: 22px;
    resize: none;
    font-weight: 700;
}

.poll-create-question:focus,
.poll-create-option input:focus {
    outline: none;
    border-color: var(--t-border-4a80d8);
    box-shadow: 0 0 0 4px var(--t-shadow-3f72c5-a15);
}

.poll-create-count {
    position: absolute;
    right: 10px;
    bottom: 8px;
    color: var(--t-text-9aa5b5);
    font-size: 11px;
    font-weight: 700;
}

.poll-create-options {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.poll-create-option {
    display: flex;
    align-items: center;
    gap: 8px;
    animation: poll-option-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.poll-create-option.leaving {
    animation: poll-option-out 0.16s ease forwards;
}

@keyframes poll-option-out {
    to {
        opacity: 0;
        transform: translateX(10px);
    }
}

.poll-create-dot {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    border: 2px solid var(--t-border-c2cfdf);
    border-radius: 50%;
}

.poll-create-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--t-text-8a95a5);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.poll-create-remove:hover:not(:disabled) {
    background: var(--t-surface-fde8e8);
    color: var(--t-text-d93636);
}

.poll-create-remove:disabled {
    opacity: 0.3;
    cursor: default;
}

.poll-create-add {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 9px 0 6px 20px;
    padding: 7px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--t-text-3f72c5);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
}

.poll-create-add:hover:not(:disabled) {
    background: var(--t-surface-eaf2ff);
}

.poll-create-add:disabled {
    opacity: 0.4;
    cursor: default;
}

.poll-create-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 10px;
    padding: 11px 13px;
    border: 1px solid var(--t-border-e3e9f2);
    border-radius: 12px;
    cursor: pointer;
}

.poll-create-toggle > span:first-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.poll-create-toggle strong {
    font-size: 14px;
}

.poll-create-toggle small {
    color: var(--t-text-718096);
    font-size: 12.5px;
}

.poll-create-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--t-border-e3e9f2);
}

.poll-create-problem {
    flex: 1;
    min-width: 140px;
    color: var(--t-text-718096);
    font-size: 12.5px;
}

.poll-create-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Line icons in the composer's "..." menu */
.options-menu .option-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--t-text-3f72c5);
}

@media (prefers-reduced-motion: reduce) {

    .chat-poll-option,
    .chat-poll-fill,
    .chat-poll-mark svg,
    .poll-create-option {
        animation: none !important;
        transition: none !important;
    }

}

/* Thin scrollbar in theme colours for the chat message list */
#chatMessages,
.private-conversations-sidebar,
.private-conversations-list,
.group-conversations-list {
    scrollbar-width: thin;
    scrollbar-color: var(--t-border-c2cfdf) transparent;
}

/* Phones: the chat sidebar has a fixed height, so keep "New message" compact */
@media (max-width: 600px) {

    /* Size to the content: header, button, then one scrolling row per list */
    .private-conversations-sidebar {
        height: auto;
        flex: 0 0 auto;
        max-height: 46vh;
        overflow-y: auto;
    }

    .private-conversations-section,
    .group-conversations-section {
        flex: 0 0 auto;
        min-height: 0;
        max-height: none;
    }

    .chat-new-message-button {
        width: calc(100% - 20px);
        margin: 6px 10px 4px;
        padding: 7px 10px;
        font-size: 13px;
        box-shadow: none;
    }

}


/* ==========================================
   SITE OWNER: name shimmer + badge
   (frame drawing lives in js/profile-style.js, "owner")
========================================== */

.ps-owner-name {
    background:
        linear-gradient(
            90deg,
            #F2A900 0%,
            #FF4FD8 25%,
            #7C4DFF 45%,
            #00B8E6 65%,
            #F2A900 85%,
            #FF4FD8 100%
        );
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 6px rgba(255, 196, 0, 0.45));
    animation: ps-owner-shimmer 4s linear infinite;
}

:root[data-theme="dark"] .ps-owner-name {
    background-image:
        linear-gradient(
            90deg,
            #FFD54F 0%,
            #FF7AE0 25%,
            #B39DFF 45%,
            #7DF9FF 65%,
            #FFD54F 85%,
            #FF7AE0 100%
        );
    filter: drop-shadow(0 0 8px rgba(255, 213, 79, 0.55));
}

@keyframes ps-owner-shimmer {
    to {
        background-position: -220% 0;
    }
}

.ps-owner-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    padding: 2px 8px 2px 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #FFE27A, #F2A900);
    color: #5A3300;
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1.4;
    text-transform: uppercase;
    vertical-align: middle;
    box-shadow: 0 0 0 1px rgba(154, 91, 0, 0.35), 0 2px 10px rgba(242, 169, 0, 0.45);
    -webkit-text-fill-color: #5A3300;
}

.ps-owner-badge svg {
    width: 12px;
    height: 12px;
    fill: #FFF6C8;
    stroke: #9A5B00;
    stroke-width: 1.6;
    stroke-linejoin: round;
}

/* Inside chat messages the label is small, keep the badge tidy */
.chat-username .ps-owner-badge {
    margin-left: 5px;
    padding: 1px 6px 1px 5px;
    font-size: 9px;
}

.chat-username .ps-owner-badge svg {
    width: 10px;
    height: 10px;
}

/* Profile page and chat card: name + badge on one line when it fits */
.pf-card-name + .ps-owner-badge,
.chat-profile-card-name + .ps-owner-badge {
    margin: 0 0 4px 10px;
    vertical-align: 4px;
}

.pf-card-name.ps-owner-name,
.chat-profile-card-name.ps-owner-name {
    display: inline-block;
}

/* The owner's picture sits a little further in so the frame fits */
.chat-profile-card-picture.ps-ring-owner {
    --ps-ring-out: 9px;
}

@media (prefers-reduced-motion: reduce) {

    .ps-owner-name {
        animation: none;
    }

}


/* ==========================================
   FRAMES ON SMALL CHAT AVATARS (still)
========================================== */

.chat-message-avatar.ps-framed,
.private-conversation-icon.ps-framed {
    overflow: visible;
}

.chat-message-avatar.ps-framed > img,
.chat-message-avatar.ps-framed > span,
.private-conversation-icon.ps-framed > img,
.private-conversation-icon.ps-framed > span {
    border-radius: 50%;
    overflow: hidden;
}

.chat-message-avatar.ps-avatar {
    --ps-ring-out: 5px;
}

.private-conversation-icon.ps-avatar {
    --ps-ring-out: 3.5px;
}

/* Keep it still: no spinning rings or moving drawings */
.ps-still::after,
.ps-still .ps-deco,
.ps-still .ps-deco * {
    animation: none !important;
}


/* ==========================================
   COINS + FRAME SHOP
========================================== */

/* Quizzes page: four cards now */
.qz-stats {
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
}

.qz-coins,
.qz-reward-coins .qz-stat-icon {
    color: inherit;
}

.qz-coins {
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.qz-coins:hover {
    transform: translateY(-2px);
    border-color: rgba(242, 169, 0, 0.5);
    box-shadow: 0 10px 24px var(--t-shadow-26354a-a10);
}

.qz-coins .qz-stat-icon,
.qz-reward-coins .qz-stat-icon {
    background: rgba(242, 169, 0, 0.16);
    color: #D99A06;
}

.qz-layout .qz-coins .qz-stat-icon svg,
.qz-layout .qz-reward-coins .qz-stat-icon svg {
    fill: rgba(255, 213, 79, 0.45) !important;
}

.qz-reward {
    grid-template-columns: repeat(3, 1fr);
    max-width: 680px;
}

.qz-reward-coins {
    animation-delay: 0.7s;
}

.qz-reward-coins.is-up strong {
    color: #D99A06;
}

@media (max-width: 960px) {

    .qz-stats {
        grid-template-columns: 1fr 1fr;
    }

    .qz-streak {
        grid-column: 1 / -1;
    }

}

@media (max-width: 760px) {

    .qz-reward {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 520px) {

    .qz-stats {
        grid-template-columns: 1fr;
    }

}

/* Profile: coin balance + prices on Legendary frames */
.pf-frame-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.pf-frame-head .pf-box-title {
    margin: 0;
}

.pf-coins {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 8px;
    border-radius: 999px;
    background: rgba(242, 169, 0, 0.14);
    border: 1px solid rgba(242, 169, 0, 0.4);
    color: #B57A00;
    font-size: 13px;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

:root[data-theme="dark"] .pf-coins {
    color: #FFD54F;
}

.pf-coins:hover {
    transform: translateY(-1px);
    background: rgba(242, 169, 0, 0.22);
}

.pf-coins svg,
.pf-price svg {
    width: 16px;
    height: 16px;
    fill: rgba(255, 213, 79, 0.5);
    stroke: #C98A00;
    stroke-width: 1.7;
    stroke-linecap: round;
}

.pf-coins strong {
    font-size: 14px;
    font-weight: 900;
}

.pf-price {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
    padding: 2px 8px 2px 5px;
    border-radius: 999px;
    background: rgba(242, 169, 0, 0.14);
    color: #B57A00;
    font-size: 11.5px;
    font-weight: 800;
}

:root[data-theme="dark"] .pf-price {
    color: #FFD54F;
}

.pf-price svg {
    width: 13px;
    height: 13px;
}

.pf-price.is-owned {
    background: rgba(47, 158, 91, 0.14);
    color: var(--t-text-2e8d4b);
}

.pf-price.is-owned svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
}

/* Locked frames: dimmed preview with a padlock until bought */
.pf-ring-choice.is-locked .pf-ring-sample {
    filter: saturate(0.55) brightness(0.92);
    opacity: 0.8;
}

.pf-ring-choice.is-locked:hover .pf-ring-sample,
.pf-ring-choice.is-locked:focus-visible .pf-ring-sample {
    filter: none;
    opacity: 1;
}

.pf-ring-choice.is-locked::before {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round'%3E%3Crect x='6' y='11' width='12' height='9' rx='2'/%3E%3Cpath d='M9 11V8.5a3 3 0 0 1 6 0V11'/%3E%3C/svg%3E") center / 13px no-repeat,
        rgba(20, 24, 31, 0.7);
}

.pf-ring-choice.is-locked.is-affordable::before {
    background-color: #D99A06;
    box-shadow: 0 0 10px rgba(242, 169, 0, 0.6);
}


/* ==========================================
   SIGNATURE (bottom of every page)
========================================== */

.site-signature {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-basis: 100%;
    width: 100%;
    box-sizing: border-box;
    margin: 28px 0 0;
    padding: 6px 16px 26px;
    color: var(--t-text-718096);
    font-family: Arial, sans-serif;
    font-size: 13px;
    text-align: center;
    pointer-events: none;
}

.site-signature-line {
    width: min(320px, 60%);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--t-border-c2cfdf), transparent);
}

.site-signature-body {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 10px;
    pointer-events: auto;
}

.site-signature-copy {
    letter-spacing: 0.02em;
}

.site-signature-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--t-border-c2cfdf);
}

.site-signature-made {
    opacity: 0.85;
}

.site-signature-name {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 12px 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(242, 169, 0, 0.35);
    background: rgba(242, 169, 0, 0.07);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform 0.3s cubic-bezier(0.34, 1.5, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.site-signature-name svg {
    width: 15px;
    height: 15px;
    fill: #FFD54F;
    stroke: #B57A00;
    stroke-width: 1.4;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 4px rgba(255, 196, 0, 0.6));
}

/* Same shimmer as the owner's name in chat */
.site-signature-name span {
    background: linear-gradient(90deg, #F2A900 0%, #FF4FD8 25%, #7C4DFF 45%, #00B8E6 65%, #F2A900 85%, #FF4FD8 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: ps-owner-shimmer 5s linear infinite;
}

:root[data-theme="dark"] .site-signature-name span {
    background-image: linear-gradient(90deg, #FFD54F 0%, #FF7AE0 25%, #B39DFF 45%, #7DF9FF 65%, #FFD54F 85%, #FF7AE0 100%);
}

.site-signature-name:hover {
    transform: translateY(-2px) scale(1.04);
    border-color: rgba(242, 169, 0, 0.7);
    box-shadow: 0 0 18px rgba(255, 196, 0, 0.35), 0 0 34px rgba(255, 79, 216, 0.18);
}

@media (prefers-reduced-motion: reduce) {

    .site-signature-name span {
        animation: none;
    }

    .site-signature-name {
        transition: none;
    }

}


/* ==========================================
   COIN CHIP (top left, every page)
========================================== */

.coin-chip {
    position: fixed;
    top: 20px;
    left: 249px;
    z-index: 9000;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 46px;
    padding: 0 15px 0 11px;
    box-sizing: border-box;
    border: 2px solid rgba(242, 169, 0, 0.45);
    border-radius: 10px;
    background: var(--t-surface-ffffff);
    color: #9A6400;
    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 4px 14px var(--t-shadow-26354a-a12);
    animation: coin-chip-in 0.5s cubic-bezier(0.34, 1.4, 0.64, 1) both;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

:root[data-theme="dark"] .coin-chip {
    color: #FFD54F;
}

.coin-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(242, 169, 0, 0.8);
    box-shadow: 0 6px 18px var(--t-shadow-26354a-a16), 0 0 16px rgba(255, 196, 0, 0.25);
}

.coin-chip:active {
    transform: scale(0.95);
}

.coin-chip:focus-visible {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 2px;
}

.coin-chip-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    fill: rgba(255, 213, 79, 0.55);
    stroke: #C98A00;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.6s cubic-bezier(0.34, 1.5, 0.64, 1);
}

.coin-chip:hover .coin-chip-icon {
    transform: rotateY(180deg);
}

.coin-chip-value {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

.coin-chip.is-owner .coin-chip-value {
    font-size: 22px;
    line-height: 1;
    background: linear-gradient(90deg, #F2A900, #FF4FD8, #7C4DFF, #00B8E6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* A little jump + glow when coins come in */
.coin-chip.is-bump {
    animation: coin-chip-bump 0.7s cubic-bezier(0.34, 1.6, 0.64, 1);
}

.coin-chip.is-bump .coin-chip-icon {
    animation: coin-chip-spin 0.8s ease;
}

@keyframes coin-chip-in {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.9);
    }
}

@keyframes coin-chip-bump {
    40% {
        transform: scale(1.12);
        box-shadow: 0 0 22px rgba(255, 196, 0, 0.55);
    }
}

@keyframes coin-chip-spin {
    to {
        transform: rotateY(360deg);
    }
}

@media (max-width: 600px) {

    .coin-chip {
        top: 15px;
        left: 223px;
        height: 42px;
        padding: 0 11px 0 9px;
        font-size: 14px;
    }

    .coin-chip-icon {
        width: 19px;
        height: 19px;
    }

}

@media (prefers-reduced-motion: reduce) {

    .coin-chip,
    .coin-chip.is-bump,
    .coin-chip.is-bump .coin-chip-icon,
    .coin-chip-icon {
        animation: none;
        transition: none;
    }

}


/* ==========================================
   EMOJI REACTIONS
========================================== */

.chat-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 7px;
}

.chat-reactions[hidden] {
    display: none;
}

.chat-reaction {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 26px;
    padding: 0 9px 0 7px;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 999px;
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-34445a);
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.chat-reaction:hover {
    transform: translateY(-1px);
    border-color: var(--t-border-5b8def);
}

.chat-reaction:active {
    transform: scale(0.92);
}

.chat-reaction.is-mine {
    border-color: var(--t-border-4a80d8);
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.chat-reaction-emoji {
    font-size: 15px;
    line-height: 1;
}

.chat-reaction-count {
    font-size: 12px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.chat-reaction.is-new {
    animation: reaction-pop 0.4s cubic-bezier(0.34, 1.7, 0.64, 1);
}

@keyframes reaction-pop {
    from {
        transform: scale(0.4);
        opacity: 0;
    }
}

/* Inside your own (blue) bubbles */
.chat-message.own-message:not(.chat-poll-message) .chat-reaction {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.16);
    color: #FFFFFF;
}

.chat-message.own-message:not(.chat-poll-message) .chat-reaction.is-mine {
    border-color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.32);
}

/* "Add reaction" button: shows on hover like the delete button */
.react-message-button {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 9px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-718096);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.chat-message-row:hover .react-message-button,
.react-message-button:focus-visible {
    opacity: 1;
    visibility: visible;
}

.react-message-button:hover {
    color: #D99A06;
    transform: scale(1.08);
}

/* Touch screens have no hover: keep it faintly visible */
@media (hover: none) {

    .react-message-button {
        opacity: 0.55;
        visibility: visible;
    }

}

.delete-icon {
    display: inline-flex;
}

/* Emoji picker popover */
.reaction-picker {
    position: fixed;
    z-index: 9500;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 18px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 14px 34px var(--t-shadow-26354a-a22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px) scale(0.94);
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.reaction-picker.visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.reaction-picker-quick {
    display: flex;
    align-items: center;
    gap: 2px;
}

.reaction-picker-emoji,
.reaction-picker-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.34, 1.6, 0.64, 1), background-color 0.15s ease;
}

.reaction-picker-emoji:hover,
.reaction-picker-emoji:focus-visible {
    transform: scale(1.28);
    background: var(--t-surface-f3f6fa);
    outline: none;
}

.reaction-picker-more {
    color: var(--t-text-718096);
    background: var(--t-surface-f3f6fa);
}

.reaction-picker-more svg {
    transition: transform 0.25s ease;
}

.reaction-picker.is-expanded .reaction-picker-more svg {
    transform: rotate(45deg);
}

.reaction-picker-grid {
    display: none;
    /* same width as the quick row (6 emojis + the "+" button) */
    grid-template-columns: repeat(7, 36px);
    gap: 2px;
    max-height: 200px;
    padding-top: 6px;
    border-top: 1px solid var(--t-border-e3e9f2);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--t-border-c2cfdf) transparent;
}

.reaction-picker.is-expanded {
    border-radius: 16px;
}

.reaction-picker.is-expanded .reaction-picker-grid {
    display: grid;
}

@media (prefers-reduced-motion: reduce) {

    .chat-reaction,
    .chat-reaction.is-new,
    .reaction-picker,
    .reaction-picker-emoji {
        animation: none;
        transition: none;
    }

}


/* ==========================================
   FRIENDS PANEL (chat sidebar)
========================================== */

.chat-users-title {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.chat-users-title svg {
    color: var(--t-text-3f72c5);
}

.friends-add {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
    margin: 4px 10px 10px;
}

.friends-add-field {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
    padding: 0 8px 0 10px;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-f8fafd);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.friends-add-field:focus-within {
    border-color: var(--t-border-4a80d8);
    box-shadow: 0 0 0 3px var(--t-shadow-3f72c5-a15);
}

.friends-add-at {
    color: var(--t-text-9aa5b5);
    font-weight: 800;
}

.friends-add-field input {
    flex: 1;
    min-width: 0;
    padding: 8px 0;
    border: none;
    background: transparent;
    color: var(--t-text-26354a);
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.friends-add-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    color: #FFFFFF;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.friends-add-button:hover {
    transform: translateY(-1px);
}

.friends-add-button:disabled {
    opacity: 0.6;
    cursor: progress;
}

.friends-add-message {
    grid-column: 1 / -1;
    min-height: 0;
    font-size: 12px;
    line-height: 1.35;
}

.friends-add-message:empty {
    display: none;
}

.friends-add-message.is-ok {
    color: var(--t-text-2e8d4b);
}

.friends-add-message.is-error {
    color: var(--t-text-d93636);
}

.friends-section-title {
    margin: 12px 14px 4px;
    color: var(--t-text-8a95a5);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.online-user.friend-row,
.friend-request {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1px 6px;
    padding: 6px 8px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.online-user.friend-row:hover,
.online-user.friend-row:focus-visible,
.friend-request:hover {
    background: var(--t-surface-f3f6fa);
    outline: none;
}

.friend-request {
    cursor: default;
    background: var(--t-surface-f0f5ff);
}

.friend-avatar {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--t-surface-e7edf5);
    color: var(--t-text-526175);
    font-size: 12px;
    font-weight: 800;
}

.friend-avatar.ps-avatar {
    --ps-ring-out: 3px;
}

.friend-avatar img,
.friend-avatar-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.friend-avatar img[hidden],
.friend-avatar-fallback[hidden] {
    display: none;
}

.friend-status-dot {
    position: absolute;
    right: -2px;
    bottom: -2px;
    z-index: 3;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid var(--t-surface-ffffff);
    background: #9AA5B5;
}

.friend-status-dot.status-online {
    background: #3BB273;
}

.friend-status-dot.status-dnd {
    background: #E04747;
}

.friend-status-dot.status-asleep {
    background: #8A70D6;
}

.friend-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.friend-text .online-user-name {
    overflow: hidden;
    color: var(--t-text-26354a);
    font-size: 13.5px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.friend-state {
    color: var(--t-text-8a95a5);
    font-size: 11.5px;
}

.friend-row.is-online .friend-state {
    color: var(--t-text-2e8d4b);
}

.friend-row.is-dnd .friend-state {
    color: var(--t-text-d64545);
}

.friend-row.is-offline .friend-avatar {
    filter: grayscale(0.6);
    opacity: 0.75;
}

.friend-row.is-offline .online-user-name {
    color: var(--t-text-7b8798);
}

.friend-action {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--t-text-718096);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.friend-row:hover .friend-action,
.friend-row:focus-within .friend-action,
.friend-request .friend-action {
    opacity: 1;
}

.friend-action:hover {
    background: var(--t-surface-e7edf5);
    color: var(--t-text-3f72c5);
}

.friend-request-actions {
    display: flex;
    gap: 2px;
}

.friend-action.is-accept {
    color: var(--t-text-2e8d4b);
}

.friend-action.is-accept:hover {
    background: var(--t-surface-eaf7ee);
}

.friend-action.is-decline:hover {
    background: var(--t-surface-fde8e8);
    color: var(--t-text-d93636);
}

.friend-me {
    margin-bottom: 6px;
}

.friends-empty {
    margin: 10px 14px;
    color: var(--t-text-8a95a5);
    font-size: 12.5px;
    line-height: 1.45;
}

@media (hover: none) {

    .friend-action {
        opacity: 1;
    }

}

/* Friend button on the chat profile card */
.chat-profile-card-friend {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 0;
    padding: 9px 10px;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-34445a);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.chat-profile-card-friend.is-none,
.chat-profile-card-friend.is-incoming {
    border-color: transparent;
    background: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    color: #FFFFFF;
}

.chat-profile-card-friend.is-incoming {
    background: linear-gradient(135deg, #3BB273, #2E8D4B);
}

.chat-profile-card-friend.is-friends:hover {
    border-color: var(--t-border-d93636);
    color: var(--t-text-d93636);
}

.chat-profile-card-friend.is-outgoing {
    color: var(--t-text-718096);
}

.chat-profile-card-friend:disabled {
    opacity: 0.6;
    cursor: progress;
}

/* "Invite @name" (group creation, invite panel) */
.create-group-exact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    border: 1.5px dashed var(--t-border-c2cfdf);
    border-radius: 10px;
    background: transparent;
    color: var(--t-text-3f72c5);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.create-group-exact:hover {
    border-color: var(--t-border-4a80d8);
    background: var(--t-surface-f0f5ff);
}

/* Profile: block by exact username */
.blocked-search-exact {
    flex-wrap: wrap;
    gap: 6px;
}

.blocked-search-exact-label {
    flex: 1 1 100%;
    color: var(--t-text-718096);
    font-size: 12.5px;
}


/* ==========================================
   YOUR NAME IN EACH CHAT
========================================== */

.pf-chat-names-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.pf-chat-names-row[hidden] {
    display: none;
}

.pf-select {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
}

.pf-select > svg:first-child {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--t-text-8a95a5);
    pointer-events: none;
}

.pf-select select {
    width: 100%;
    padding: 11px 38px 11px 40px;
    border: 1.5px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-f8fafd);
    color: var(--t-text-26354a);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pf-select select:focus {
    outline: none;
    border-color: var(--t-border-4a80d8);
    box-shadow: 0 0 0 4px var(--t-shadow-3f72c5-a15);
}

.pf-select-arrow {
    position: absolute;
    right: 12px;
    width: 18px;
    height: 18px;
    color: var(--t-text-718096);
    pointer-events: none;
}

.pf-chat-name-field {
    flex: 1;
    margin-bottom: 0 !important;
}

.pf-chat-name-field input {
    padding-right: 60px !important;
}

.pf-chat-names-empty {
    margin: 10px 0 0;
    color: var(--t-text-8a95a5);
    font-size: 13.5px;
}

/* Group settings: hint under "Your name in this group" */
.gs-hint {
    margin: 6px 2px 14px;
    color: var(--t-text-8a95a5);
    font-size: 12px;
    line-height: 1.4;
}


/* ==========================================
   MENTIONS (@username)
========================================== */

/* Sidebar entry blinks until you open the chat */
.private-conversation-item.has-mention,
.group-conversation-item.has-mention {
    position: relative;
    border-radius: 10px;
    animation: mention-blink 1.4s ease-in-out infinite;
}

@keyframes mention-blink {
    0%, 100% {
        background-color: rgba(242, 169, 0, 0.1);
        box-shadow: inset 0 0 0 1.5px rgba(242, 169, 0, 0.35);
    }
    50% {
        background-color: rgba(242, 169, 0, 0.32);
        box-shadow: inset 0 0 0 1.5px rgba(242, 169, 0, 0.9), 0 0 14px rgba(255, 196, 0, 0.35);
    }
}

.mention-badge {
    position: absolute;
    top: 50%;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD54F, #F2A900);
    color: #5A3300;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 2px 8px rgba(242, 169, 0, 0.5);
    transform: translateY(-50%);
    animation: mention-badge-pop 0.45s cubic-bezier(0.34, 1.7, 0.64, 1);
    pointer-events: none;
}

@keyframes mention-badge-pop {
    from {
        transform: translateY(-50%) scale(0.2);
    }
}

/* @names inside messages */
.chat-mention {
    padding: 0 4px;
    border-radius: 5px;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    font-weight: 700;
    cursor: default;
}

.chat-mention.is-me {
    background: rgba(242, 169, 0, 0.22);
    color: #9A6400;
}

:root[data-theme="dark"] .chat-mention.is-me {
    color: #FFD54F;
}

.chat-message.own-message .chat-mention {
    background: rgba(255, 255, 255, 0.22);
    color: #FFFFFF;
}

/* A message that mentions you */
.chat-message.mentions-me:not(.own-message) {
    border-color: rgba(242, 169, 0, 0.55);
    background:
        linear-gradient(90deg, rgba(242, 169, 0, 0.14), rgba(242, 169, 0, 0.04)),
        var(--t-surface-ffffff);
    box-shadow: inset 3px 0 0 #F2A900, 0 3px 8px var(--t-shadow-26354a-a05);
}

/* "@" autocomplete above the message box */
#chatForm {
    position: relative;
}

.mention-menu {
    position: absolute;
    left: 60px;
    bottom: calc(100% + 8px);
    z-index: 200;
    display: none;
    flex-direction: column;
    gap: 2px;
    width: min(300px, calc(100% - 80px));
    padding: 6px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 14px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 14px 34px var(--t-shadow-26354a-a22);
}

.mention-menu.visible {
    display: flex;
    animation: mention-menu-in 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes mention-menu-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
}

.mention-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 10px;
    cursor: pointer;
}

.mention-option.active,
.mention-option:hover {
    background: var(--t-surface-eaf2ff);
}

.mention-option-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mention-option-text strong {
    overflow: hidden;
    color: var(--t-text-26354a);
    font-size: 13.5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mention-option-text span {
    color: var(--t-text-8a95a5);
    font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {

    .private-conversation-item.has-mention,
    .group-conversation-item.has-mention {
        animation: none;
        background-color: rgba(242, 169, 0, 0.22);
        box-shadow: inset 0 0 0 1.5px rgba(242, 169, 0, 0.8);
    }

    .mention-badge,
    .mention-menu.visible {
        animation: none;
    }

}


/* ==========================================
   CODE CHALLENGES
========================================== */

.ch-layout {
    max-width: 1200px;
    margin: 18px auto 80px;
    padding: 0 24px;
    box-sizing: border-box;
    color: var(--t-text-26354a);
}

.ch-hidden {
    display: none !important;
}

.ch-layout svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ch-enter {
    animation: qz-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ch-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 20px;
}

.ch-head h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ch-sub {
    margin: 6px 0 0;
    color: var(--t-text-7b8798);
    font-size: 15px;
}

.ch-wallet {
    display: flex;
    gap: 8px;
}

.ch-wallet > span,
.ch-wallet > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 13px;
    border-radius: 999px;
    border: 1px solid var(--t-border-e3e9f2);
    background: var(--t-surface-ffffff);
    color: var(--t-text-526175);
    font-size: 13px;
    text-decoration: none;
}

.ch-wallet strong {
    color: var(--t-text-26354a);
    font-size: 15px;
}

.ch-wallet svg {
    width: 17px;
    height: 17px;
    color: #D99A06;
}

/* Language tabs */
.ch-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.ch-tab {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 2px solid var(--t-border-e3e9f2);
    border-radius: 14px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-34445a);
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ch-tab:hover {
    transform: translateY(-2px);
}

.ch-tab.active {
    border-color: var(--t-border-4a80d8);
    box-shadow: 0 8px 20px var(--t-shadow-3f72c5-a15);
}

.ch-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 30px;
    padding: 0 6px;
    border-radius: 9px;
    background: #F7DF1E;
    color: #222222;
    font-size: 13px;
    font-weight: 900;
}

.ch-tab[data-language="cpp"] .ch-tab-badge {
    background: #00599C;
    color: #FFFFFF;
}

.ch-tab-count {
    margin-left: auto;
    color: var(--t-text-8a95a5);
    font-size: 13px;
}

.ch-progress {
    height: 8px;
    margin-bottom: 18px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--t-border-dce4f0);
}

.ch-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3BB273, #00B8E6, #7C4DFF);
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Daily challenge */
.ch-daily {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin-bottom: 26px;
    padding: 16px 18px;
    border: 1.5px solid rgba(242, 169, 0, 0.45);
    border-radius: 16px;
    background:
        linear-gradient(120deg, rgba(242, 169, 0, 0.14), rgba(255, 79, 216, 0.08)),
        var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ch-daily:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(242, 169, 0, 0.2);
}

.ch-daily.is-done {
    border-color: rgba(59, 178, 115, 0.45);
    background:
        linear-gradient(120deg, rgba(59, 178, 115, 0.12), transparent),
        var(--t-surface-ffffff);
}

.ch-daily-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(242, 169, 0, 0.18);
    color: #D99A06;
}

.ch-daily.is-done .ch-daily-icon {
    background: rgba(59, 178, 115, 0.18);
    color: #2E8D4B;
}

.ch-daily-icon svg {
    width: 24px;
    height: 24px;
}

.ch-daily-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ch-daily-label {
    color: #B57A00;
    font-size: 11.5px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

:root[data-theme="dark"] .ch-daily-label {
    color: #FFD54F;
}

.ch-daily-text strong {
    font-size: 16px;
}

.ch-daily-text > span:last-child {
    color: var(--t-text-718096);
    font-size: 13px;
}

.ch-daily-go svg {
    width: 20px;
    height: 20px;
    color: var(--t-text-718096);
}

/* The level path: a winding trail */
.ch-path {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 640px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.ch-path::before {
    content: "";
    position: absolute;
    top: 30px;
    bottom: 30px;
    left: 50%;
    width: 4px;
    border-radius: 2px;
    background: repeating-linear-gradient(to bottom, var(--t-border-c6d7ee) 0 10px, transparent 10px 18px);
    transform: translateX(-50%);
}

.ch-tier {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    margin: 18px 0 6px;
}

.ch-tier span {
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--t-surface-ffffff);
    border: 1.5px solid var(--t-border-dce4f0);
    color: var(--t-text-526175);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.ch-tier.is-beginner span { border-color: #3BB273; color: #2E8D4B; }
.ch-tier.is-easy span { border-color: #00B8E6; color: #0B86A8; }
.ch-tier.is-medium span { border-color: #F2A900; color: #B57A00; }
.ch-tier.is-hard span { border-color: #E04747; color: #C0392B; }

.ch-node {
    position: relative;
    z-index: 1;
    display: flex;
    animation: qz-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--i, 0) * 0.04s);
}

.ch-node.is-left {
    justify-content: flex-start;
    padding-right: 50%;
}

.ch-node.is-right {
    justify-content: flex-end;
    padding-left: 50%;
}

.ch-node-button {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: calc(100% + 32px);
    padding: 10px 14px;
    border: 1.5px solid var(--t-border-e3e9f2);
    border-radius: 16px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 6px 16px var(--t-shadow-26354a-a06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ch-node.is-left .ch-node-button {
    margin-right: -32px;
    flex-direction: row-reverse;
    text-align: right;
}

.ch-node.is-right .ch-node-button {
    margin-left: -32px;
}

.ch-node-button:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: var(--t-border-5b8def);
    box-shadow: 0 12px 24px var(--t-shadow-26354a-a10);
}

.ch-node-button:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.ch-node-circle {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--t-surface-eef2f7);
    color: var(--t-text-718096);
    font-size: 18px;
    font-weight: 900;
}

.ch-node-circle svg {
    width: 22px;
    height: 22px;
}

.ch-node.is-done .ch-node-circle {
    background: linear-gradient(135deg, #3BB273, #2E8D4B);
    color: #FFFFFF;
}

.ch-node.is-done .ch-node-circle svg {
    stroke-width: 3;
}

.ch-node.is-current .ch-node-circle {
    background: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    color: #FFFFFF;
    animation: ch-current 1.8s ease-in-out infinite;
}

.ch-node.is-current .ch-node-button {
    border-color: var(--t-border-4a80d8);
}

@keyframes ch-current {
    50% {
        box-shadow: 0 0 0 8px var(--t-shadow-3f72c5-a15);
    }
}

.ch-node-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ch-node-text strong {
    font-size: 15px;
}

.ch-node-text span {
    color: var(--t-text-718096);
    font-size: 12.5px;
}

.ch-node.is-done .ch-node-text span {
    color: var(--t-text-2e8d4b);
}

.ch-node-daily {
    position: absolute;
    top: -9px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD54F, #F2A900);
    color: #5A3300;
    box-shadow: 0 3px 10px rgba(242, 169, 0, 0.45);
}

.ch-node.is-left .ch-node-daily { left: -9px; }
.ch-node.is-right .ch-node-daily { right: -9px; }

.ch-node-daily svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.2;
}

/* One level */
.ch-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    color: var(--t-text-526175);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.ch-back svg {
    width: 18px;
    height: 18px;
}

.ch-level {
    display: grid;
    grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
    gap: 20px;
    align-items: start;
}

.ch-brief h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 0 16px;
    font-size: clamp(24px, 3vw, 30px);
    letter-spacing: -0.01em;
}

.ch-level-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    color: #FFFFFF;
    font-size: 19px;
}

.ch-brief-top {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ch-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--t-surface-eef2f7);
    color: var(--t-text-526175);
    font-size: 12px;
    font-weight: 800;
}

.ch-badge svg {
    width: 13px;
    height: 13px;
}

.ch-badge.is-beginner { background: rgba(59, 178, 115, 0.15); color: #2E8D4B; }
.ch-badge.is-easy { background: rgba(0, 184, 230, 0.15); color: #0B86A8; }
.ch-badge.is-medium { background: rgba(242, 169, 0, 0.18); color: #B57A00; }
.ch-badge.is-hard { background: rgba(224, 71, 71, 0.15); color: #C0392B; }
.ch-badge.is-daily { background: linear-gradient(135deg, #FFE27A, #F2A900); color: #5A3300; }

:root[data-theme="dark"] .ch-badge.is-beginner { color: #5BC98A; }
:root[data-theme="dark"] .ch-badge.is-easy { color: #5CC8F5; }
:root[data-theme="dark"] .ch-badge.is-medium { color: #FFD54F; }
:root[data-theme="dark"] .ch-badge.is-hard { color: #F07575; }

.ch-card {
    margin-bottom: 12px;
    padding: 16px 18px;
    border-radius: 16px;
    background: var(--t-surface-ffffff);
    border: 1px solid var(--t-border-e3e9f2);
    box-shadow: 0 6px 18px var(--t-shadow-26354a-a06);
}

.ch-card p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.55;
}

.ch-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--t-text-526175);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ch-card-title svg {
    width: 17px;
    height: 17px;
    color: var(--t-text-3f72c5);
}

.ch-card-count {
    margin-left: auto;
    color: var(--t-text-8a95a5);
}

.ch-error {
    border-color: rgba(224, 71, 71, 0.35);
    background:
        linear-gradient(90deg, rgba(224, 71, 71, 0.08), transparent),
        var(--t-surface-ffffff);
}

.ch-error .ch-card-title svg {
    color: #E04747;
}

.ch-error pre,
.ch-solution pre,
.ch-output {
    margin: 0;
    padding: 10px 12px;
    overflow-x: auto;
    border-radius: 10px;
    font-family: Consolas, "Cascadia Code", Menlo, monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.ch-error pre {
    background: #1E1416;
    color: #FF9C9C;
}

.ch-reward {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px !important;
    color: #B57A00;
    font-weight: 800;
}

:root[data-theme="dark"] .ch-reward {
    color: #FFD54F;
}

.ch-reward.is-done {
    color: var(--t-text-2e8d4b);
}

.ch-reward svg {
    width: 17px;
    height: 17px;
}

/* Hints */
.ch-hints {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
}

.ch-hint {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(242, 169, 0, 0.1);
    font-size: 14px;
    line-height: 1.45;
    animation: qz-enter 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ch-hint-number {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #F2A900;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 900;
}

.ch-solution {
    margin-top: 12px;
}

.ch-solution-head {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
    font-weight: 800;
}

.ch-solution-head svg {
    width: 17px;
    height: 17px;
}

.ch-solution pre {
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-26354a);
}

/* Buttons */
.ch-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 15px;
    border: none;
    border-radius: 11px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease, background-color 0.2s ease;
}

.ch-button svg {
    width: 17px;
    height: 17px;
}

.ch-button small {
    margin-left: 4px;
    opacity: 0.75;
    font-size: 11.5px;
    font-weight: 700;
}

.ch-button:active:not(:disabled) {
    transform: scale(0.96);
}

.ch-button:disabled {
    opacity: 0.55;
    cursor: progress;
}

.ch-button-primary {
    background: linear-gradient(135deg, #3BB273, #2E8D4B);
    color: #FFFFFF;
    box-shadow: 0 6px 16px rgba(46, 141, 75, 0.3);
}

.ch-button-primary:hover:not(:disabled) {
    transform: translateY(-1px);
}

.ch-button-soft {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.ch-hint-card .ch-button-soft {
    background: rgba(242, 169, 0, 0.15);
    color: #9A6400;
}

:root[data-theme="dark"] .ch-hint-card .ch-button-soft {
    color: #FFD54F;
}

.ch-button-ghost {
    background: transparent;
    color: var(--t-text-526175);
    box-shadow: inset 0 0 0 1.5px var(--t-border-dce4f0);
}

.ch-text-button {
    margin-left: auto;
    padding: 0;
    border: none;
    background: none;
    color: var(--t-text-3f72c5);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.ch-icon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-526175);
    cursor: pointer;
}

.ch-icon-button svg {
    width: 18px;
    height: 18px;
}

/* Editor */
.ch-editor-card {
    padding: 0;
    overflow: hidden;
}

.ch-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--t-border-e3e9f2);
}

.ch-spacer {
    flex: 1;
}

.ch-editor .CodeMirror {
    height: auto;
    min-height: 260px;
    max-height: 520px;
    font-family: Consolas, "Cascadia Code", Menlo, monospace;
    font-size: 14px;
    background: var(--t-surface-fbfcfe);
    color: var(--t-text-26354a);
}

.ch-editor .CodeMirror-scroll {
    min-height: 260px;
    max-height: 520px;
}

.ch-editor .CodeMirror-gutters {
    border-right: 1px solid var(--t-border-e3e9f2);
    background: var(--t-surface-f3f6fa);
}

:root[data-theme="dark"] .ch-editor .CodeMirror {
    background: #161B22;
    color: #D6DEEB;
}

:root[data-theme="dark"] .ch-editor .CodeMirror-gutters {
    background: #11161C;
    border-color: #2A313B;
}

:root[data-theme="dark"] .ch-editor .CodeMirror-cursor {
    border-color: #FFFFFF;
}

:root[data-theme="dark"] .ch-editor .cm-keyword { color: #C792EA; }
:root[data-theme="dark"] .ch-editor .cm-string { color: #ECC48D; }
:root[data-theme="dark"] .ch-editor .cm-number { color: #F78C6C; }
:root[data-theme="dark"] .ch-editor .cm-comment { color: #637777; }
:root[data-theme="dark"] .ch-editor .cm-def,
:root[data-theme="dark"] .ch-editor .cm-variable-2 { color: #82AAFF; }
:root[data-theme="dark"] .ch-editor .cm-meta { color: #FFCB6B; }
:root[data-theme="dark"] .ch-editor .CodeMirror-activeline-background { background: #1C2430; }

.ch-editor-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 14px;
    border-top: 1px solid var(--t-border-e3e9f2);
    color: var(--t-text-8a95a5);
    font-size: 12px;
}

.ch-loading {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--t-border-e3e9f2);
    color: var(--t-text-526175);
    font-size: 13px;
}

.ch-loading[hidden] {
    display: none;
}

.ch-loading-bar {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--t-border-dce4f0);
}

.ch-loading-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--t-surface-4a80d8), #7C5CD6);
    transition: width 0.3s ease;
}

/* Output + test results */
.ch-placeholder,
.ch-checking {
    color: var(--t-text-8a95a5);
    font-size: 14px;
}

.ch-io-label {
    margin: 10px 0 4px !important;
    color: var(--t-text-8a95a5);
    font-size: 11.5px !important;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ch-output {
    background: #0F1720;
    color: #D6DEEB;
}

.ch-output.is-input {
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-526175);
}

.ch-output.is-expected {
    background: rgba(59, 178, 115, 0.12);
    color: var(--t-text-26354a);
}

.ch-output.is-error {
    margin-top: 8px;
    background: #1E1416;
    color: #FF9C9C;
}

.ch-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 800;
}

.ch-summary svg {
    width: 20px;
    height: 20px;
}

.ch-summary.is-pass {
    background: rgba(59, 178, 115, 0.15);
    color: var(--t-text-2e8d4b);
}

.ch-summary.is-fail {
    background: rgba(224, 71, 71, 0.12);
    color: var(--t-text-d93636);
}

.ch-tests {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.ch-test {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--t-border-e3e9f2);
    animation: qz-enter 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--i, 0) * 0.08s);
}

.ch-test-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ch-test-head svg {
    width: 18px;
    height: 18px;
}

.ch-test.is-pass .ch-test-head {
    color: var(--t-text-2e8d4b);
}

.ch-test.is-fail .ch-test-head {
    color: var(--t-text-d93636);
}

.ch-test-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.ch-loading-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 30px 0;
}

.ch-loading-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--t-surface-4a80d8);
    animation: ch-dots 0.9s ease-in-out infinite;
}

.ch-loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.ch-loading-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes ch-dots {
    50% {
        transform: translateY(-6px);
        opacity: 0.5;
    }
}

/* Reward dialog */
.ch-modal-card {
    position: relative;
    overflow: hidden;
}

.ch-reward-modal {
    position: relative;
    text-align: center;
}

.ch-confetti {
    position: absolute;
    inset: -20px 0 0;
    pointer-events: none;
}

.ch-reward-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3BB273, #2E8D4B);
    color: #FFFFFF;
    animation: qz-pop 0.6s cubic-bezier(0.22, 1.6, 0.36, 1) both;
}

.ch-reward-icon svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ch-reward-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 14px 0 6px;
    padding: 0;
    list-style: none;
}

.ch-reward-list li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(242, 169, 0, 0.14);
    color: #9A6400;
    font-weight: 800;
    font-size: 14px;
    animation: qz-pop 0.5s cubic-bezier(0.22, 1.6, 0.36, 1) both;
}

:root[data-theme="dark"] .ch-reward-list li {
    color: #FFD54F;
}

.ch-reward-list li:nth-child(2) { animation-delay: 0.1s; }
.ch-reward-list li:nth-child(3) { animation-delay: 0.2s; }
.ch-reward-list li:nth-child(4) { animation-delay: 0.3s; }

.ch-reward-list svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 900px) {

    .ch-level {
        grid-template-columns: 1fr;
    }

    .ch-test-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 560px) {

    .ch-layout {
        padding: 0 14px;
    }

    .ch-tabs {
        flex-direction: column;
    }

    .ch-node.is-left,
    .ch-node.is-right {
        padding: 0;
        justify-content: stretch;
    }

    .ch-node.is-left .ch-node-button,
    .ch-node.is-right .ch-node-button {
        width: 100%;
        margin: 0;
        flex-direction: row;
        text-align: left;
    }

    .ch-path::before {
        left: 37px;
    }

    .ch-node.is-left .ch-node-daily {
        left: auto;
        right: -9px;
    }

    .ch-editor-foot {
        flex-direction: column;
    }

}

@media (prefers-reduced-motion: reduce) {

    .ch-enter,
    .ch-node,
    .ch-node.is-current .ch-node-circle,
    .ch-hint,
    .ch-test,
    .ch-loading-dots span,
    .ch-reward-icon,
    .ch-reward-list li {
        animation: none !important;
    }

}


/* ==========================================
   SCHEDULE (timetable per class)
   Subject colours come from --h (a hue) set per lesson in js/schedule.js.
========================================== */

:root {
    --sc-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --sc-bg-s: 80%;
    --sc-bg-l: 96%;
    --sc-stripe-s: 62%;
    --sc-stripe-l: 52%;
    --sc-text-s: 55%;
    --sc-text-l: 30%;
}

:root[data-theme="dark"] {
    --sc-bg-s: 26%;
    --sc-bg-l: 18%;
    --sc-stripe-s: 62%;
    --sc-stripe-l: 62%;
    --sc-text-s: 70%;
    --sc-text-l: 82%;
}

.sc-layout {
    max-width: 1240px;
    margin: 18px auto 70px;
    padding: 0 24px;
    box-sizing: border-box;
    color: var(--t-text-26354a);
}

.sc-layout svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.sc-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 18px;
    animation: qz-enter 0.5s var(--sc-ease) both;
}

.sc-head h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.sc-sub {
    margin: 6px 0 0;
    min-height: 1.2em;
    color: var(--t-text-7b8798);
    font-size: 15px;
}


/* ---------- Class dropdown ---------- */

.sc-picker {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sc-picker-label {
    color: var(--t-text-7b8798);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sc-select {
    position: relative;
    display: flex;
    align-items: center;
    color: var(--t-text-3f72c5);
}

.sc-select > svg {
    position: absolute;
    left: 13px;
    width: 19px;
    height: 19px;
    pointer-events: none;
}

.sc-select > .sc-chevron {
    left: auto;
    right: 12px;
    width: 17px;
    height: 17px;
    color: var(--t-text-7b8798);
    transition: transform 0.25s var(--sc-ease);
}

.sc-select:focus-within > .sc-chevron {
    transform: rotate(180deg);
}

.sc-select select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 190px;
    padding: 11px 40px 11px 42px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 13px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px var(--t-shadow-26354a-a08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sc-select select:hover {
    border-color: var(--t-border-5b8def);
}

.sc-select select:focus {
    outline: none;
    border-color: var(--t-border-3f72c5);
    box-shadow: 0 0 0 3px var(--t-shadow-3f72c5-a20);
}

.sc-select option {
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    font-weight: 600;
}


/* ---------- Now / next ---------- */

.sc-now {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    animation: qz-enter 0.5s var(--sc-ease) 0.05s both;
}

.sc-now[hidden] {
    display: none;
}

.sc-now-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 260px;
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 14px;
    background: var(--t-surface-ffffff);
    font-size: 14px;
    color: var(--t-text-526175);
}

.sc-now-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--t-text-26354a);
    font-size: 15px;
}

.sc-now-item.is-current {
    border-color: var(--t-border-5b8def);
    background: var(--t-surface-eaf2ff);
}

.sc-now-item.is-done {
    color: var(--t-text-7b8798);
}

.sc-now-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-7b8798);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.is-current .sc-now-label {
    background: var(--t-surface-3f72c5);
    color: var(--t-text-ffffff);
}

.sc-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    animation: sc-pulse 1.6s ease-in-out infinite;
}

@keyframes sc-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.7); }
}


/* ---------- The card ---------- */

.sc-card {
    padding: 14px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 20px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 10px 28px var(--t-shadow-26354a-a08);
    animation: qz-enter 0.55s var(--sc-ease) 0.08s both;
}

.sc-grid {
    display: grid;
    grid-template-columns: 82px repeat(5, minmax(0, 1fr));
    grid-template-rows: auto repeat(var(--periods), minmax(68px, auto));
    gap: 6px;
}

.sc-corner {
    grid-column: 1;
    grid-row: 1;
}

.sc-day-head {
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 6px 12px;
    border-radius: 12px;
    color: var(--t-text-526175);
    font-size: 14px;
    font-weight: 800;
    text-transform: capitalize;
}

.sc-day-head.is-today {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.sc-day-head em {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--t-surface-3f72c5);
    color: var(--t-text-ffffff);
    font-size: 10.5px;
    font-style: normal;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sc-time {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1px;
    padding: 0 6px 0 10px;
    border-radius: 12px;
    color: var(--t-text-9aa5b5);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.sc-time strong {
    color: var(--t-text-526175);
    font-size: 15px;
}

.sc-time.is-now {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.sc-time.is-now strong {
    color: var(--t-text-3f72c5);
}

.sc-free {
    border-radius: 12px;
    background: repeating-linear-gradient(-45deg, transparent 0 7px, var(--t-surface-f3f6fa) 7px 9px);
}

.sc-free.is-today {
    background-color: var(--t-surface-f8fafd);
}


/* ---------- Lessons ---------- */

.sc-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 7px;
    border-radius: 13px;
    background: var(--t-surface-f7f9fc);
    border: 1px solid var(--t-border-e3e9f2);
    transition: transform 0.2s var(--sc-ease), box-shadow 0.2s var(--sc-ease);
}

.sc-card.is-animated .sc-block {
    animation: qz-enter 0.45s var(--sc-ease) both;
    animation-delay: calc(var(--i, 0) * 14ms + 0.1s);
}

.sc-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--t-shadow-26354a-a10);
}

.sc-block:not(.is-split) {
    padding: 0;
    border: none;
    background: none;
}

.sc-block.is-now {
    outline: 2px solid var(--t-border-3f72c5);
    outline-offset: 2px;
}

.sc-block-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.sc-block:not(.is-split) .sc-block-tags {
    position: absolute;
    right: 8px;
    bottom: 8px;
}

.sc-block:not(.is-split) {
    position: relative;
}

.sc-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--t-surface-ffffff);
    border: 1px solid var(--t-border-e3e9f2);
    color: var(--t-text-7b8798);
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
}

.sc-entries {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.sc-entry {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 11px 10px 13px;
    border-radius: 11px;
    border-left: 4px solid hsl(var(--h) var(--sc-stripe-s) var(--sc-stripe-l));
    background: hsl(var(--h) var(--sc-bg-s) var(--sc-bg-l));
}

.sc-block.is-long:not(.is-split) .sc-entry {
    padding-bottom: 28px;
}

.sc-subject {
    color: hsl(var(--h) var(--sc-text-s) var(--sc-text-l));
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: break-word;
    hyphens: auto;
}

.sc-teacher {
    color: var(--t-text-526175);
    font-size: 12px;
    line-height: 1.3;
}

.sc-room {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--t-text-9aa5b5);
    font-size: 11px;
    font-weight: 600;
}

.sc-entry.is-unknown {
    border-left-style: dashed;
    border-left-color: var(--t-border-c2cfdf);
    background: var(--t-surface-f3f6fa);
}

.sc-entry.is-unknown .sc-subject {
    color: var(--t-text-7b8798);
    font-style: italic;
}


/* ---------- Empty ---------- */

.sc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 50px 20px;
    color: var(--t-text-9aa5b5);
    text-align: center;
}

.sc-empty p {
    margin: 0;
    color: var(--t-text-7b8798);
    font-size: 15px;
}


/* ---------- Phone: day tabs + one day ---------- */

.sc-days,
.sc-agendas {
    display: none;
}

.sc-day-tab {
    flex: 1;
    padding: 9px 4px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 12px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-526175);
    font: inherit;
    font-size: 13.5px;
    font-weight: 800;
    text-transform: capitalize;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sc-day-tab.is-today {
    border-color: var(--t-border-5b8def);
}

.sc-day-tab.is-active {
    background: var(--t-surface-3f72c5);
    border-color: var(--t-border-3f72c5);
    color: var(--t-text-ffffff);
}

.sc-agenda {
    display: none;
    flex-direction: column;
    gap: 8px;
}

.sc-agenda.is-active {
    display: flex;
    animation: qz-enter 0.35s var(--sc-ease) both;
}

.sc-agenda-row {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.sc-agenda-time {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    color: var(--t-text-9aa5b5);
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
}

.sc-agenda-time strong {
    color: var(--t-text-526175);
    font-size: 14px;
}

.sc-agenda-free {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border-radius: 11px;
    border: 1px dashed var(--t-border-dce4f0);
    color: var(--t-text-9aa5b5);
    font-size: 13px;
}

@media (max-width: 760px) {

    .sc-layout {
        padding: 0 16px;
    }

    .sc-head {
        align-items: stretch;
        flex-direction: column;
    }

    .sc-select select {
        width: 100%;
    }

    .sc-days {
        display: flex;
        gap: 6px;
        margin-bottom: 12px;
    }

    .sc-grid {
        display: none;
    }

    .sc-agendas {
        display: block;
    }

    .sc-card {
        padding: 12px;
    }

    .sc-now-item strong {
        white-space: normal;
    }

}

@media (prefers-reduced-motion: reduce) {

    .sc-head,
    .sc-now,
    .sc-card,
    .sc-card.is-animated .sc-block,
    .sc-agenda.is-active,
    .sc-pulse {
        animation: none !important;
    }

}


/* ---------- Admin: class tabs above the timetable preview ---------- */

.adm-class-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.adm-class-tab {
    padding: 6px 14px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 999px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-526175);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.adm-class-tab:hover {
    border-color: var(--t-border-5b8def);
}

.adm-class-tab.is-active {
    background: var(--t-surface-3f72c5);
    border-color: var(--t-border-3f72c5);
    color: var(--t-text-ffffff);
}


/* ==========================================
   ASSIGNMENTS (hand-in folders)
========================================== */

:root {
    --as-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --as-green: #2E8D4B;
    --as-green-bg: #EAF7EE;
    --as-amber: #B7741A;
    --as-amber-bg: #FFF4E0;
    --as-red: #D93636;
    --as-red-bg: #FFF1F1;
}

:root[data-theme="dark"] {
    --as-green: #5FD08A;
    --as-green-bg: rgba(72, 168, 104, 0.16);
    --as-amber: #F0B45A;
    --as-amber-bg: rgba(240, 180, 90, 0.14);
    --as-red: #FF7A7A;
    --as-red-bg: rgba(255, 110, 110, 0.13);
}

.as-layout {
    max-width: 1180px;
    margin: 18px auto 80px;
    padding: 0 24px;
    box-sizing: border-box;
    color: var(--t-text-26354a);
}

.as-layout svg,
.as-modal-card svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.as-layout .gr-button svg {
    width: 17px;
    height: 17px;
}

.as-enter {
    animation: qz-enter 0.5s var(--as-ease) both;
}

.as-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 20px;
}

.as-head h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.as-sub {
    margin: 6px 0 0;
    color: var(--t-text-7b8798);
    font-size: 15px;
}

.as-head .as-meta {
    margin-top: 10px;
}


/* ---------- Cards ---------- */

.as-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 16px;
    align-items: start;
}

.as-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 18px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 10px 28px var(--t-shadow-26354a-a08);
    animation: qz-enter 0.5s var(--as-ease) both;
    animation-delay: calc(var(--i, 0) * 50ms);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--as-ease);
}

.as-card.is-flash {
    animation: qz-enter 0.5s var(--as-ease) both, as-flash 1.6s ease 0.4s 2;
}

@keyframes as-flash {
    50% {
        border-color: var(--t-border-5b8def);
        box-shadow: 0 0 0 4px var(--t-shadow-3f72c5-a20);
    }
}

.as-card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.as-seal {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.as-teacher-card.is-sealed .as-seal {
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-7b8798);
}

.as-teacher-card.is-open .as-seal {
    background: var(--as-green-bg);
    color: var(--as-green);
}

.as-card-title {
    flex: 1;
    min-width: 0;
}

.as-card-title h3 {
    margin: 2px 0 6px;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.as-card-tools {
    display: flex;
    gap: 2px;
    margin: -4px -6px 0 0;
}

.as-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.as-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-526175);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.as-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.as-chip.is-link:hover {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.as-chip.is-warn {
    background: var(--as-amber-bg);
    color: var(--as-amber);
}

.as-deadline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--t-text-526175);
    font-size: 13.5px;
    font-weight: 600;
}

.as-deadline span::first-letter {
    text-transform: uppercase;
}

.as-deadline em {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.as-deadline.is-soon em {
    background: var(--as-amber-bg);
    color: var(--as-amber);
}

.as-deadline.is-past em {
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-7b8798);
}

.as-instructions {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-34445a);
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}


/* ---------- Teacher card ---------- */

.as-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--t-text-7b8798);
    font-size: 13px;
}

.as-progress strong {
    color: var(--t-text-26354a);
    font-size: 15px;
}

.as-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--t-surface-f3f6fa);
    overflow: hidden;
}

.as-progress-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    transition: width 0.8s var(--as-ease);
}

.as-late-text {
    color: var(--as-amber);
}

.as-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.as-sealed-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--t-text-7b8798);
    font-size: 13px;
    font-weight: 600;
}


/* ---------- Student card ---------- */

.as-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.as-status.is-done {
    background: var(--as-green-bg);
    color: var(--as-green);
}

.as-status.is-late,
.as-status.is-soon {
    background: var(--as-amber-bg);
    color: var(--as-amber);
}

.as-status.is-missing {
    background: var(--as-red-bg);
    color: var(--as-red);
}

.as-student-card.is-done .as-seal {
    background: var(--as-green-bg);
    color: var(--as-green);
}

.as-student-card.is-missing {
    border-color: color-mix(in srgb, var(--as-red) 35%, transparent);
}

.as-student-card.is-dragging {
    border-color: var(--t-border-5b8def);
    box-shadow: 0 0 0 4px var(--t-shadow-3f72c5-a20);
    transform: translateY(-2px);
}

.as-submitted {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.as-submitted-time {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
    color: var(--t-text-526175);
    font-size: 13.5px;
    font-weight: 600;
}

.as-submitted-time svg {
    color: var(--as-green);
}

.is-late .as-submitted-time svg {
    color: var(--as-amber);
}

.as-tag {
    display: inline-flex;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-7b8798);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.as-tag.is-late {
    background: var(--as-amber-bg);
    color: var(--as-amber);
}

.as-tag.is-on-time {
    background: var(--as-green-bg);
    color: var(--as-green);
}

.as-tag.is-missing {
    background: var(--as-red-bg);
    color: var(--as-red);
}

.as-files {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.as-file {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--t-border-e3e9f2);
    border-radius: 11px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-7b8798);
}

.as-file.is-pending {
    border-style: dashed;
}

.as-file.is-none {
    border-style: dashed;
    background: none;
    font-size: 13px;
}

.as-file-name {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    color: var(--t-text-26354a);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

a.as-file-name:hover {
    color: var(--t-text-3f72c5);
}

.as-file-name small {
    color: var(--t-text-9aa5b5);
    font-size: 11.5px;
    font-weight: 600;
}

.as-file .gr-icon-button {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.as-drop {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    border: 1.5px dashed var(--t-border-dce4f0);
    border-radius: 14px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.is-dragging .as-drop {
    border-color: var(--t-border-5b8def);
    background: var(--t-surface-eaf2ff);
}

.as-drop-hint {
    flex: 1 1 150px;
    color: var(--t-text-9aa5b5);
    font-size: 12.5px;
}

.as-unsubmit {
    width: auto;
    margin: 0;
    padding: 8px 12px;
}

.as-pending {
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: qz-enter 0.35s var(--as-ease) both;
}

.as-pending-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.as-upload-bar {
    height: 6px;
    border-radius: 999px;
    background: var(--t-surface-f3f6fa);
    overflow: hidden;
}

.as-upload-bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    transition: width 0.2s linear;
}

.as-late-warning {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 9px 12px;
    border-radius: 11px;
    background: var(--as-amber-bg);
    color: var(--as-amber);
    font-size: 13px;
    font-weight: 700;
}


/* ---------- One folder (teacher) ---------- */

.as-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    padding: 7px 12px 7px 8px;
    border-radius: 10px;
    color: var(--t-text-526175);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.as-back:hover {
    background: var(--t-surface-ffffff);
    color: var(--t-text-3f72c5);
}

.as-layout > .as-view > .as-instructions {
    margin-bottom: 16px;
    background: var(--t-surface-ffffff);
    border: 1px solid var(--t-border-dce4f0);
}

.as-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.as-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 16px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-7b8798);
    font-size: 13px;
    font-weight: 700;
}

.as-stat strong {
    font-size: 28px;
    line-height: 1.1;
}

.as-stat.is-done strong {
    color: var(--as-green);
}

.as-stat.is-late strong {
    color: var(--as-amber);
}

.as-stat.is-missing strong {
    color: var(--as-red);
}

.as-roster {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.as-row {
    display: grid;
    grid-template-columns: 42px minmax(140px, 1fr) minmax(190px, auto) minmax(0, 1.6fr);
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--t-border-dce4f0);
    border-left: 4px solid var(--as-green);
    border-radius: 14px;
    background: var(--t-surface-ffffff);
    animation: qz-enter 0.45s var(--as-ease) both;
    animation-delay: calc(var(--i, 0) * 35ms);
}

.as-row.is-late {
    border-left-color: var(--as-amber);
}

.as-row.is-missing {
    border-left-color: var(--as-red);
}

.as-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    font-size: 17px;
    font-weight: 800;
}

.as-row-who {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.as-row-who strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
}

.as-row-who span {
    color: var(--t-text-9aa5b5);
    font-size: 12.5px;
}

.as-row-when {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.as-row-when time {
    color: var(--t-text-26354a);
    font-size: 13.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.as-row-when small {
    color: var(--t-text-9aa5b5);
    font-size: 11.5px;
}


/* ---------- Form ---------- */

.as-modal-card {
    width: min(560px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    text-align: left;
}

.as-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.as-form-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.as-form-head .wb-modal-icon {
    margin: 0;
}

.as-form-head h3 {
    margin: 0;
}

.as-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.as-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.as-field > span {
    color: var(--t-text-526175);
    font-size: 13px;
    font-weight: 700;
}

.as-field small {
    color: var(--t-text-9aa5b5);
    font-size: 12px;
}

.as-field .gr-input,
.as-field .gr-select {
    width: 100%;
    font-size: 14.5px;
}

.as-field textarea {
    resize: vertical;
    min-height: 90px;
}

.as-modal-card p.as-form-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-7b8798);
    font-size: 13px;
    line-height: 1.45;
}

.as-modal-card p.as-form-error {
    margin: 0;
    min-height: 0;
    color: var(--as-red);
    font-size: 13.5px;
    font-weight: 700;
}

.as-modal-card p.as-form-error:empty {
    display: none;
}


/* ---------- Empty + loading ---------- */

.as-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 50px 20px;
    border: 1.5px dashed var(--t-border-dce4f0);
    border-radius: 18px;
    color: var(--t-text-9aa5b5);
    text-align: center;
    animation: qz-enter 0.5s var(--as-ease) both;
}

.as-empty p {
    max-width: 420px;
    margin: 0;
    color: var(--t-text-7b8798);
    font-size: 15px;
}

.as-loading {
    width: 34px;
    height: 34px;
    margin: 80px auto;
    border: 3px solid var(--t-border-dce4f0);
    border-top-color: var(--t-border-3f72c5);
    border-radius: 50%;
    animation: as-spin 0.8s linear infinite;
}

@keyframes as-spin {
    to {
        transform: rotate(360deg);
    }
}


@media (max-width: 860px) {

    .as-row {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .as-row-when,
    .as-row-files {
        grid-column: 1 / -1;
    }

    .as-row-when {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

}

@media (max-width: 560px) {

    .as-layout {
        padding: 0 16px;
    }

    .as-form-row {
        grid-template-columns: 1fr;
    }

    .as-stat {
        padding: 12px;
    }

    .as-stat strong {
        font-size: 22px;
    }

}

@media (prefers-reduced-motion: reduce) {

    .as-enter,
    .as-card,
    .as-card.is-flash,
    .as-row,
    .as-pending,
    .as-empty {
        animation: none !important;
    }

}


/* Homework: "Turn in" jumps to the hand-in folder. */
.hw-chip.is-turn-in {
    border-color: transparent;
    background: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    color: var(--t-text-ffffff);
}

.hw-chip.is-turn-in:hover {
    background: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    box-shadow: 0 6px 16px var(--t-shadow-3f72c5-a25);
}


/* Admin: teachers card */
.adm-teachers {
    margin-top: 20px;
}

.adm-teacher-form {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.adm-teacher-form .adm-field {
    flex: 1 1 220px;
}

.adm-date.adm-initial strong {
    font-size: 18px;
}

a.adm-note {
    text-decoration: none;
}


/* ==========================================
   FORGOT PASSWORD
========================================== */

.pw-card h2::after {
    content: none;
}

.pw-card form {
    margin-top: 18px;
}

.pw-card form[hidden],
.pw-done[hidden],
.form-success[hidden] {
    display: none;
}

.pw-intro {
    margin: 0 0 4px;
    color: var(--t-text-7b8798);
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

.pw-forgot-link {
    align-self: flex-end;
    margin-top: 2px;
    color: var(--t-text-3f72c5);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.pw-forgot-link:hover {
    text-decoration: underline;
}

.form-success {
    margin: 6px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--t-surface-eaf7ee);
    color: var(--t-text-2e8d4b);
    font-size: 13.5px;
    font-weight: 700;
    text-align: center;
}

.pw-done {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    text-align: center;
    animation: qz-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.pw-done-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.pw-done.is-bad .pw-done-icon {
    background: var(--t-surface-fff5f5);
    color: var(--t-text-d93636);
}

.pw-done-icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pw-done h3 {
    margin: 4px 0 0;
    color: var(--t-text-26354a);
    font-size: 19px;
}

.pw-done p {
    margin: 0;
    color: var(--t-text-526175);
    font-size: 14px;
    line-height: 1.5;
}

.pw-done p.pw-small {
    color: var(--t-text-9aa5b5);
    font-size: 13px;
}

.login-container .pw-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    margin-top: 8px;
    text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
    .pw-done {
        animation: none;
    }
}

.adm-link-box {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.adm-link-box[hidden] {
    display: none;
}

.adm-link-box .adm-input {
    flex: 1;
    min-width: 0;
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 12.5px;
}


/* ==========================================
   PC BUILDER
   The builder follows the site theme; the monitor shows the PC's own
   screens (BIOS, installers, desktops), so those keep fixed colours.
========================================== */

:root {
    --pc-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --pc-ok: #2E8D4B;
    --pc-ok-bg: #EAF7EE;
    --pc-warn: #B7741A;
    --pc-warn-bg: #FFF4E0;
    --pc-bad: #D93636;
    --pc-bad-bg: #FFF1F1;
    --pc-board: #1E5B3A;
    --pc-board-line: #2F7D52;
    --pc-inside: #1B1F27;
    --pc-inside-light: #DCE2EA;
}

:root[data-theme="dark"] {
    --pc-ok: #5FD08A;
    --pc-ok-bg: rgba(72, 168, 104, 0.16);
    --pc-warn: #F0B45A;
    --pc-warn-bg: rgba(240, 180, 90, 0.14);
    --pc-bad: #FF7A7A;
    --pc-bad-bg: rgba(255, 110, 110, 0.13);
}

.pc-layout {
    max-width: 1320px;
    margin: 18px auto 70px;
    padding: 0 24px;
    box-sizing: border-box;
    color: var(--t-text-26354a);
}

.pc-layout svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.pc-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    animation: qz-enter 0.5s var(--pc-ease) both;
}

.pc-head h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.pc-head p {
    margin: 6px 0 0;
    color: var(--t-text-7b8798);
    font-size: 15px;
}

.pc-small-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 11px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-526175);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.pc-small-button:hover {
    border-color: var(--t-border-5b8def);
    color: var(--t-text-3f72c5);
}


/* ---------- Steps ---------- */

.pc-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    animation: qz-enter 0.5s var(--pc-ease) 0.05s both;
}

.pc-step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 8px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 999px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-526175);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pc-step:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pc-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--t-surface-f3f6fa);
    font-size: 13px;
}

.pc-step.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    color: var(--t-text-ffffff);
}

.pc-step.is-active .pc-step-number {
    background: rgba(255, 255, 255, 0.22);
}

.pc-step-line {
    flex: 0 1 40px;
    height: 2px;
    border-radius: 2px;
    background: var(--t-border-dce4f0);
}

.pc-body {
    animation: qz-enter 0.45s var(--pc-ease) both;
}


/* ---------- Step 1: parts ---------- */

.pc-parts {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr) 330px;
    gap: 18px;
    align-items: start;
}

.pc-tabs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: sticky;
    top: 16px;
}

.pc-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: none;
    color: var(--t-text-526175);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.pc-tab span {
    flex: 1;
}

.pc-tab:hover {
    background: var(--t-surface-ffffff);
}

.pc-tab.is-active {
    border-color: var(--t-border-dce4f0);
    background: var(--t-surface-ffffff);
    color: var(--t-text-3f72c5);
    box-shadow: 0 6px 18px var(--t-shadow-26354a-a08);
}

.pc-tab b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    box-sizing: border-box;
    border-radius: 999px;
    background: var(--pc-ok-bg);
    color: var(--pc-ok);
    font-size: 11.5px;
}

.pc-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 12px;
    padding: 11px 14px;
    border-radius: 13px;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.pc-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pc-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 16px;
    background: var(--t-surface-ffffff);
    animation: qz-enter 0.4s var(--pc-ease) both;
    animation-delay: calc(var(--i, 0) * 35ms);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pc-item.is-chosen {
    border-color: var(--t-border-5b8def);
    box-shadow: 0 0 0 3px var(--t-shadow-3f72c5-a20);
}

.pc-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-526175);
}

.pc-item.is-chosen .pc-item-icon {
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
}

.pc-item-body {
    flex: 1;
    min-width: 0;
}

.pc-item-body h3 {
    margin: 0 0 7px;
    font-size: 15.5px;
    font-weight: 800;
}

.pc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.pc-chip {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-526175);
    font-size: 11.5px;
    font-weight: 700;
}

.pc-item-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.pc-item-side strong {
    font-size: 16px;
}

.pc-pick {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-3f72c5);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pc-pick:hover {
    border-color: var(--t-border-5b8def);
}

.pc-pick.is-chosen {
    border-color: transparent;
    background: var(--pc-ok-bg);
    color: var(--pc-ok);
}

.pc-qty {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 11px;
}

.pc-qty span {
    min-width: 22px;
    text-align: center;
    font-weight: 800;
}

.pc-qty button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-3f72c5);
    cursor: pointer;
}

.pc-qty button:disabled {
    opacity: 0.4;
    cursor: default;
}

.pc-summary {
    position: sticky;
    top: 16px;
    padding: 18px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 18px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 10px 28px var(--t-shadow-26354a-a08);
}

.pc-summary h2,
.pc-tray h2,
.pc-cables h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 800;
}

.pc-tray h2 span,
.pc-cables h2 span {
    color: var(--t-text-9aa5b5);
    font-size: 13px;
}

.pc-summary-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.pc-summary-list li {
    display: flex;
    gap: 9px;
    color: var(--t-text-9aa5b5);
}

.pc-summary-list li.is-set {
    color: var(--t-text-3f72c5);
}

.pc-summary-icon {
    padding-top: 2px;
}

.pc-summary-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--t-text-26354a);
}

.pc-summary-text small {
    color: var(--t-text-9aa5b5);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pc-summary-text em {
    color: var(--t-text-9aa5b5);
    font-weight: 600;
}

.pc-totals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.pc-totals span {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-7b8798);
    font-size: 12px;
    font-weight: 700;
}

.pc-totals strong {
    color: var(--t-text-26354a);
    font-size: 18px;
}

.pc-notes {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.pc-notes li {
    display: flex;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.pc-notes li svg {
    margin-top: 1px;
}

.pc-notes .is-error { background: var(--pc-bad-bg); color: var(--pc-bad); }
.pc-notes .is-warn { background: var(--pc-warn-bg); color: var(--pc-warn); }
.pc-notes .is-info { background: var(--t-surface-eaf2ff); color: var(--t-text-3f72c5); }
.pc-notes .is-ok { background: var(--pc-ok-bg); color: var(--pc-ok); }

.pc-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    color: var(--t-text-ffffff);
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px var(--t-shadow-3f72c5-a25);
    transition: transform 0.2s var(--pc-ease), box-shadow 0.2s ease;
}

.pc-cta:hover:not(:disabled) {
    transform: translateY(-1px);
}

.pc-cta:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.pc-cta-note {
    margin: 8px 0 0;
    color: var(--t-text-9aa5b5);
    font-size: 12.5px;
    text-align: center;
}


/* ---------- Step 2: build ---------- */

.pc-build {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 290px;
    gap: 18px;
    align-items: start;
}

.pc-tray,
.pc-cables {
    padding: 16px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 18px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 10px 28px var(--t-shadow-26354a-a08);
}

.pc-tray-hint {
    margin: -4px 0 12px;
    color: var(--t-text-7b8798);
    font-size: 13px;
    line-height: 1.4;
}

.pc-tray-list,
.pc-cable-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pc-tray-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--t-border-e3e9f2);
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s var(--pc-ease);
}

.pc-tray-item:hover {
    border-color: var(--t-border-5b8def);
}

.pc-tray-item.is-selected {
    border-color: var(--t-border-3f72c5);
    background: var(--t-surface-eaf2ff);
    box-shadow: 0 0 0 3px var(--t-shadow-3f72c5-a20);
    transform: translateX(3px);
}

.pc-tray-item.is-done {
    opacity: 0.75;
}

.pc-tray-icon {
    color: var(--t-text-3f72c5);
}

.pc-tray-name {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.pc-tray-state {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--pc-ok);
    font-size: 11.5px;
}

.pc-tray-warn {
    display: flex;
    gap: 7px;
    margin: 10px 0 0;
    padding: 9px 11px;
    border-radius: 11px;
    background: var(--pc-warn-bg);
    color: var(--pc-warn);
    font-size: 13px;
    font-weight: 600;
}

.pc-auto {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 10px;
    padding: 9px;
    border: 1px dashed var(--t-border-5b8def);
    border-radius: 11px;
    background: none;
    color: var(--t-text-3f72c5);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.pc-stage {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.pc-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-height: 40px;
    padding: 10px 14px;
    box-sizing: border-box;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.pc-message:empty {
    visibility: hidden;
}

.pc-message.is-ok { background: var(--pc-ok-bg); color: var(--pc-ok); }
.pc-message.is-warn { background: var(--pc-warn-bg); color: var(--pc-warn); }
.pc-message.is-error { background: var(--pc-bad-bg); color: var(--pc-bad); animation: formShake 0.4s ease; }
.pc-message.is-info { background: var(--t-surface-eaf2ff); color: var(--t-text-3f72c5); }

.pc-case-wrap {
    padding: 12px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 20px;
    background: var(--t-surface-ffffff);
}

.pc-case-svg {
    display: block;
    width: 100%;
    height: auto;
}

.pc-case-svg * {
    stroke-width: 1.5;
}

.pc-case-shell {
    fill: var(--case);
    stroke: rgba(0, 0, 0, 0.25);
}

.pc-case-inside {
    fill: var(--pc-inside);
    stroke: none;
}

.pc-case-inside.is-light {
    fill: var(--pc-inside-light);
}

.pc-shroud {
    fill: rgba(0, 0, 0, 0.28);
    stroke: none;
}

.pc-svg-label {
    fill: rgba(255, 255, 255, 0.45);
    stroke: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pc-case-inside.is-light ~ .pc-svg-label {
    fill: rgba(0, 0, 0, 0.4);
}

.pc-svg-label.is-center {
    fill: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.04em;
}

.pc-svg-tiny {
    fill: rgba(255, 255, 255, 0.75);
    stroke: none;
    font-size: 9px;
    font-weight: 700;
}

.pc-svg-tiny.is-light {
    fill: #FFFFFF;
}

.pc-board > rect:first-child {
    fill: var(--pc-board);
    stroke: rgba(0, 0, 0, 0.4);
}

.pc-traces {
    stroke: var(--pc-board-line);
}

.pc-io {
    fill: #9AA4B2;
    stroke: #6B7482;
}

.pc-board-ghost,
.pc-psu-ghost,
.pc-bay {
    fill: rgba(255, 255, 255, 0.05);
    stroke: rgba(255, 255, 255, 0.35);
    stroke-dasharray: 6 5;
}

.pc-socket {
    fill: #C9CED6;
    stroke: #8D96A3;
}

.pc-ram-slot,
.pc-pcie,
.pc-m2 {
    fill: #10161D;
    stroke: #3B4757;
}

.pc-ram-slot.is-b {
    fill: #1F2833;
}

.pc-connector {
    fill: #E8E8E8;
    stroke: #8D96A3;
}

.pc-connector.is-on {
    fill: #FFD84A;
}

.pc-case-svg .is-target {
    fill: rgba(91, 141, 239, 0.45);
    stroke: #8FB4FF;
    stroke-width: 2.5;
    stroke-dasharray: none;
    cursor: pointer;
    animation: pc-target 1.1s ease-in-out infinite;
}

@keyframes pc-target {
    50% { fill: rgba(91, 141, 239, 0.15); }
}

.pc-case-svg [data-remove] {
    cursor: pointer;
    animation: pc-drop 0.45s var(--pc-ease) both;
}

/* While placing a part, clicks go through installed parts to the slot below. */
.pc-case-wrap.is-placing [data-remove] {
    pointer-events: none;
}

/* Slots sit inside the motherboard group, so switch them back on. */
.pc-case-wrap.is-placing [data-target] {
    pointer-events: visiblePainted;
}

.pc-case-svg [data-remove]:hover {
    filter: brightness(1.25);
}

@keyframes pc-drop {
    from { opacity: 0; transform: translateY(-14px); }
}

.pc-cpu rect { fill: #B8BEC8; stroke: #6B7482; }
.pc-cpu text { fill: #2B2F38; }
.pc-paste { fill: #D7DCE2; stroke: #9AA4B2; }
.pc-cooler-body { fill: #3A4250; stroke: #20252E; }
.pc-fins { stroke: #5C6676; }
.pc-fan { fill: #1E232B; stroke: #4D5766; }
.pc-blade { stroke: #8D96A3; stroke-width: 3; }
.pc-fan-blades.is-spinning { animation: pc-spin 0.5s linear infinite; }
.pc-radiator { fill: #2D3440; stroke: #1A1E25; }
.pc-tube { stroke: #111; stroke-width: 5; }
.pc-pump { fill: #2A303A; stroke: #444E5C; }
.pc-pump-logo { fill: #5B8DEF; stroke: none; }
.pc-stick { fill: #2C5BC9; stroke: #1B3E8E; }
.pc-nvme { fill: #2E3A48; stroke: #11161D; }
.pc-gpu > rect:first-child { fill: #2B313C; stroke: #12161C; }
.pc-gpu-fan { fill: #161A20; stroke: #59636F; }
.pc-drive > rect { fill: #4B5563; stroke: #1F242C; }
.pc-drive.is-hdd > rect { fill: #6B7482; }
.pc-psu > rect { fill: #262B33; stroke: #0F1216; }

.pc-cable {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
    opacity: 0.92;
    animation: pc-cable 0.6s var(--pc-ease) both;
    stroke-dasharray: 1200;
}

.pc-case-svg .pc-cable { stroke-width: 6; }
.pc-case-svg .pc-cable.is-sata,
.pc-case-svg .pc-cable.is-sata-power,
.pc-case-svg .pc-cable.is-front { stroke-width: 3; }

.pc-cable.is-atx { stroke: #2A2A2A; }
.pc-cable.is-eps { stroke: #3B3B3B; }
.pc-cable.is-gpu { stroke: #444; }
.pc-cable.is-front { stroke: #E54848; }
.pc-cable.is-sata { stroke: #D33A3A; }
.pc-cable.is-sata-power { stroke: #1F1F1F; }

@keyframes pc-cable {
    from { stroke-dashoffset: 1200; }
    to { stroke-dashoffset: 0; }
}

@keyframes pc-spin {
    to { transform: rotate(360deg); }
}

.pc-cable-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--t-border-e3e9f2);
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.pc-cable-item:hover:not(:disabled) {
    border-color: var(--t-border-5b8def);
}

.pc-cable-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pc-switch {
    position: relative;
    flex-shrink: 0;
    width: 34px;
    height: 20px;
    margin-top: 1px;
    border-radius: 999px;
    background: var(--t-border-c2cfdf);
    transition: background-color 0.2s ease;
}

.pc-switch i {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #FFFFFF;
    transition: transform 0.25s var(--pc-ease);
}

.pc-cable-item.is-on .pc-switch {
    background: var(--pc-ok);
}

.pc-cable-item.is-on .pc-switch i {
    transform: translateX(14px);
}

.pc-cable-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pc-cable-text strong {
    font-size: 13px;
}

.pc-cable-text small {
    color: var(--t-text-9aa5b5);
    font-size: 11.5px;
    line-height: 1.35;
}

.pc-monitor-port {
    margin: 14px 0;
}

.pc-monitor-port h3 {
    margin: 0 0 8px;
    font-size: 14px;
}

.pc-segment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: var(--t-surface-f3f6fa);
}

.pc-segment button {
    padding: 8px 6px;
    border: none;
    border-radius: 9px;
    background: none;
    color: var(--t-text-526175);
    font: inherit;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
}

.pc-segment button.is-on {
    background: var(--t-surface-ffffff);
    color: var(--t-text-3f72c5);
    box-shadow: 0 2px 8px var(--t-shadow-26354a-a10);
}

.pc-segment button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}


/* ---------- Step 3: power ---------- */

.pc-power {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
    align-items: start;
}

.pc-monitor-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.pc-monitor {
    position: relative;
    width: 100%;
    padding: 14px 14px 24px;
    box-sizing: border-box;
    border-radius: 18px;
    background: #14171C;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.pc-monitor-led {
    position: absolute;
    right: 22px;
    bottom: 9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #E8A33A;
}

.pc-monitor-led.is-on {
    background: #4ADE80;
}

.pc-monitor-stand {
    width: 120px;
    height: 46px;
    background: linear-gradient(#22262E, #14171C);
    clip-path: polygon(30% 0, 70% 0, 82% 100%, 18% 100%);
}

.pc-screen {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 6px;
    background: #050608;
    color: #E6E6E6;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 13px;
    container-type: inline-size;
}

.pc-screen svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.pc-off-msg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
}

.pc-nosignal {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 26px;
    border: 1px solid #333;
    border-radius: 6px;
    background: #0B0D10;
    color: #AAB;
    transform: translate(-50%, -50%);
    animation: pc-float 6s ease-in-out infinite alternate;
}

@keyframes pc-float {
    from { transform: translate(-70%, -80%); }
    to { transform: translate(-30%, -20%); }
}

.pc-post,
.pc-noboot,
.pc-bootmenu {
    position: absolute;
    inset: 0;
    padding: 4% 5%;
    font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
    font-size: clamp(10px, 2cqi, 14px);
    color: #D7D7D7;
    line-height: 1.6;
}

.pc-post p,
.pc-noboot p {
    margin: 0;
}

.pc-post-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    color: #FFF;
}

.pc-post-head strong {
    color: #FFC24A;
    font-size: 1.4em;
}

.pc-post-keys,
.pc-usb-pick {
    position: absolute;
    left: 5%;
    right: 5%;
    bottom: 6%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.pc-screen button {
    font: inherit;
    cursor: pointer;
}

.pc-post-keys button,
.pc-usb-pick button,
.pc-bootmenu button,
.pc-bios button {
    padding: 5px 12px;
    border: 1px solid #555;
    border-radius: 3px;
    background: #1C1F24;
    color: #E6E6E6;
}

.pc-post-keys button:hover,
.pc-usb-pick button:hover,
.pc-bootmenu button:hover,
.pc-bios button:hover {
    border-color: #FFC24A;
    color: #FFC24A;
}

.pc-usb-pick span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #FFC24A;
}

.pc-bootmenu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #0C1A33;
}

.pc-bootmenu h4 {
    margin: 0 0 8px;
    color: #FFF;
}

.pc-bootmenu button {
    text-align: left;
}

.pc-bios {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 3%;
    background: radial-gradient(circle at 20% 0%, #1B2B4A, #0A0F1A 70%);
    color: #DDE6F5;
    font-size: clamp(10px, 1.8cqi, 13px);
}

.pc-bios-head {
    display: flex;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid #2B3E63;
}

.pc-bios-head strong {
    color: #6FB2FF;
}

.pc-bios-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3%;
    flex: 1;
    margin-top: 3%;
}

.pc-bios section {
    padding: 10px 12px;
    border: 1px solid #22355A;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.pc-bios h4 {
    margin: 0 0 6px;
    color: #6FB2FF;
    font-size: 1em;
}

.pc-bios p {
    margin: 0 0 3px;
}

.pc-bios small {
    display: block;
    margin-top: 5px;
    color: #8296B8;
}

.pc-bios-toggle.is-on {
    border-color: #4ADE80 !important;
    color: #4ADE80 !important;
}

.pc-boot-row {
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

.pc-bios-foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 2%;
}

[data-temp].is-hot {
    color: #FF6B6B;
    font-weight: 800;
}

.pc-boot {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 34px;
}

.pc-boot.is-linux {
    background: #2C001E;
}

.pc-boot small {
    color: #AAA;
}

.pc-win-logo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    width: 64px;
    height: 64px;
}

.pc-win-logo i {
    background: linear-gradient(135deg, #39B4F2, #1E7BD9);
    border-radius: 2px;
}

.pc-win-logo.is-small {
    width: 18px;
    height: 18px;
    gap: 2px;
}

.pc-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #FFF;
    border-radius: 50%;
    animation: pc-spin 0.9s linear infinite;
}

.pc-linux-logo svg {
    width: 80px;
    height: 80px;
    stroke: none;
}

.pc-dots {
    display: flex;
    gap: 8px;
}

.pc-dots i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #E95420;
    animation: pc-dot 1.2s ease-in-out infinite;
}

.pc-dots i:nth-child(2) { animation-delay: 0.2s; }
.pc-dots i:nth-child(3) { animation-delay: 0.4s; }

@keyframes pc-dot {
    50% { opacity: 0.25; transform: scale(0.7); }
}


/* Installers */

.pc-win-setup,
.pc-linux-setup {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4%;
}

.pc-win-setup {
    background: linear-gradient(135deg, #0F3B7A, #1565C0 55%, #2C8FE0);
}

.pc-linux-setup {
    background: linear-gradient(135deg, #3B0A2C, #77216F 60%, #E95420);
}

.pc-win-card,
.pc-linux-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(440px, 92%);
    max-height: 92%;
    overflow-y: auto;
    padding: 20px 22px;
    box-sizing: border-box;
    border-radius: 8px;
    background: #F3F3F3;
    color: #1B1B1B;
    font-size: clamp(11px, 1.9cqi, 14px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.pc-linux-card {
    border-radius: 14px;
    background: #FAFAFA;
}

.pc-win-card h3,
.pc-linux-card h3 {
    margin: 0 0 4px;
    font-size: 1.35em;
    font-weight: 600;
}

.pc-win-card p,
.pc-linux-card p {
    margin: 0;
}

.pc-win-card label,
.pc-linux-card label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.92em;
}

.pc-win-card select,
.pc-win-card input[type="text"],
.pc-linux-card select,
.pc-linux-card input[type="text"] {
    padding: 6px 8px;
    border: 1px solid #BBB;
    border-radius: 4px;
    background: #FFF;
    color: #111;
    font: inherit;
}

.pc-screen input.is-invalid {
    border-color: #D93636 !important;
    box-shadow: 0 0 0 2px rgba(217, 54, 54, 0.25);
}

.pc-win-card .pc-radio,
.pc-linux-card .pc-radio {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.pc-disks {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pc-win-card .pc-disk,
.pc-linux-card .pc-disk {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 4px 8px;
    padding: 8px 10px;
    border: 1px solid #CCC;
    border-radius: 6px;
    background: #FFF;
    cursor: pointer;
}

.pc-disk.is-on {
    border-color: #1E7BD9 !important;
    background: #E8F2FD !important;
}

.pc-disk em {
    grid-column: 2 / -1;
    color: #B45309;
    font-size: 0.85em;
}

.pc-os-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}

.pc-os-actions button,
.pc-app-bench button {
    padding: 7px 16px;
    border: 1px solid #BBB;
    border-radius: 4px;
    background: #FFF;
    color: #111;
}

.pc-os-actions button.is-primary {
    border-color: #1E7BD9;
    background: #1E7BD9;
    color: #FFF;
}

.pc-linux-card .pc-os-actions button.is-primary {
    border-color: #E95420;
    background: #E95420;
}

.pc-os-actions button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pc-os-error {
    color: #C62828;
    font-weight: 600;
}

.pc-os-small {
    color: #666;
    font-size: 0.85em;
}

.pc-os-slide {
    min-height: 3em;
}

.pc-os-bar {
    height: 8px;
    border-radius: 999px;
    background: #DDD;
    overflow: hidden;
}

.pc-os-bar i {
    display: block;
    height: 100%;
    background: #1E7BD9;
    transition: width 0.3s linear;
}

.pc-linux-card .pc-os-bar i {
    background: #E95420;
}

.pc-steps-list {
    margin: 0;
    padding-left: 18px;
    color: #888;
}

.pc-steps-list .is-done {
    color: #111;
}


/* Login + desktops */

.pc-login {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #FFF;
}

.pc-login.is-windows {
    background: radial-gradient(circle at 30% 20%, #4C7BD9, #12305F 70%);
}

.pc-login.is-linux {
    background: #2C2C2C;
}

.pc-login-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    font-size: 34px;
    font-weight: 600;
}

.pc-login strong {
    font-size: 1.4em;
    font-weight: 500;
}

.pc-login button {
    padding: 7px 26px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
    color: #FFF;
}

.pc-login.is-linux button {
    border-color: #E95420;
    background: #E95420;
}

.pc-desk {
    position: absolute;
    inset: 0;
    overflow: hidden;
    font-size: clamp(10px, 1.6cqi, 13px);
}

.pc-desk.is-windows {
    background: radial-gradient(ellipse at 70% 40%, #8FB8F5 0%, #3A6FD0 35%, #142E6B 80%);
}

.pc-desk.is-linux {
    background: radial-gradient(circle at 70% 60%, #E95420 0%, #77216F 45%, #2C001E 90%);
}

.pc-desk-icons {
    position: absolute;
    top: 3%;
    left: 1.5%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pc-desk-icons button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 76px;
    padding: 6px 4px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: none;
    color: #FFF;
    font-size: 0.85em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.pc-desk-icons button:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
}

.pc-taskbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 9%;
    min-height: 30px;
    background: rgba(24, 28, 40, 0.86);
    backdrop-filter: blur(10px);
}

.pc-taskbar button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 80%;
    border: none;
    border-radius: 5px;
    background: none;
    color: #E6ECF7;
}

.pc-taskbar button:hover,
.pc-taskbar button.is-open {
    background: rgba(255, 255, 255, 0.12);
}

.pc-tray-clock {
    position: absolute;
    right: 12px;
    color: #FFF;
    font-size: 0.9em;
}

.pc-start {
    position: absolute;
    left: 50%;
    bottom: 11%;
    width: min(380px, 70%);
    padding: 14px;
    border-radius: 10px;
    background: rgba(32, 36, 48, 0.95);
    color: #FFF;
    transform: translateX(-50%);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
    animation: qz-enter 0.25s var(--pc-ease) both;
    z-index: 999;
}

.pc-start-title {
    margin: 0 0 8px;
    font-weight: 600;
}

.pc-start-apps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.pc-start-apps button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border: none;
    border-radius: 6px;
    background: none;
    color: #FFF;
    font-size: 0.85em;
}

.pc-start-apps button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.pc-start-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.pc-start-foot button,
.pc-power-menu button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
    padding: 4px 9px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 5px;
    background: none;
    color: #FFF;
}

.pc-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 6%;
    min-height: 20px;
    padding: 0 10px;
    background: #111;
    color: #FFF;
    font-weight: 600;
    z-index: 998;
}

.pc-topbar button {
    display: flex;
    border: none;
    background: none;
    color: #FFF;
}

.pc-power-menu {
    position: absolute;
    top: 7%;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    border-radius: 10px;
    background: #2D2D2D;
    z-index: 999;
}

.pc-dock {
    position: absolute;
    left: 0;
    top: 6%;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 7%;
    min-width: 36px;
    padding-top: 8px;
    align-items: center;
    background: rgba(0, 0, 0, 0.45);
}

.pc-dock button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80%;
    aspect-ratio: 1;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #FFF;
}

.pc-dock button.is-open {
    box-shadow: inset 3px 0 0 #E95420;
}

.pc-win {
    position: absolute;
    display: flex;
    flex-direction: column;
    width: 56%;
    max-height: 78%;
    overflow: hidden;
    border-radius: 8px;
    background: #FFFFFF;
    color: #1B1B1B;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
    animation: pc-open 0.2s var(--pc-ease) both;
}

.is-linux .pc-win {
    border-radius: 12px;
    background: #FAFAFA;
}

@keyframes pc-open {
    from { opacity: 0; transform: scale(0.94); }
}

.pc-win.is-active {
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

.pc-win-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 6px 6px 12px;
    background: #F0F0F0;
    font-weight: 600;
    cursor: move;
    user-select: none;
    touch-action: none;
}

.is-linux .pc-win-title {
    background: #EBEBEB;
    justify-content: center;
    position: relative;
}

.is-linux .pc-win-title button {
    position: absolute;
    right: 6px;
}

.pc-win-title button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 22px;
    border: none;
    border-radius: 4px;
    background: none;
    color: #333;
}

.pc-win-title button:hover {
    background: #E81123;
    color: #FFF;
}

.pc-win-body {
    overflow: auto;
    padding: 12px;
}

.pc-app-about h4 {
    margin: 0 0 8px;
    font-size: 1.2em;
}

.pc-app-about dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    margin: 0;
}

.pc-app-about dt {
    color: #666;
}

.pc-app-about dd {
    margin: 0;
    font-weight: 600;
}

.pc-app-note {
    margin: 10px 0 0;
    color: #1E7BD9;
    font-weight: 600;
}

.pc-app-task {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pc-app-task div {
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
    border: 1px solid #DDD;
    border-radius: 6px;
}

.pc-app-task span {
    color: #666;
}

.pc-app-task strong {
    font-size: 1.4em;
}

.pc-app-task small {
    color: #888;
    font-size: 0.8em;
}

.pc-notepad {
    width: 100%;
    min-height: 140px;
    box-sizing: border-box;
    border: none;
    outline: none;
    background: none;
    color: #111;
    font: inherit;
    font-family: Consolas, ui-monospace, monospace;
    resize: vertical;
}

.pc-app-bench table {
    width: 100%;
    margin-bottom: 8px;
    border-collapse: collapse;
}

.pc-app-bench th,
.pc-app-bench td {
    padding: 4px 6px;
    border-bottom: 1px solid #EEE;
    text-align: left;
}

.pc-app-bench td strong {
    font-size: 1.3em;
}

.pc-bench-limit {
    color: #888;
    font-size: 0.85em;
}

.pc-bench-scene {
    position: relative;
    height: 90px;
    overflow: hidden;
    border-radius: 6px;
    background: linear-gradient(#0B1A3A, #20406F);
}

.pc-bench-scene i {
    position: absolute;
    bottom: 10px;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    background: #FFC24A;
    animation: pc-bench 1.4s linear infinite;
}

.pc-bench-scene i:nth-child(2) { animation-delay: -0.5s; background: #5B8DEF; }
.pc-bench-scene i:nth-child(3) { animation-delay: -1s; background: #4ADE80; }

@keyframes pc-bench {
    from { left: -30px; transform: rotate(0); }
    to { left: 110%; transform: rotate(360deg); }
}

.pc-term {
    margin: -12px;
    background: #300A24;
    color: #EEE;
    font-family: ui-monospace, "Ubuntu Mono", Menlo, monospace;
    font-size: 0.95em;
}

.pc-term-out {
    max-height: 260px;
    min-height: 160px;
    overflow-y: auto;
    padding: 8px 10px;
    white-space: pre-wrap;
    word-break: break-word;
}

.pc-term-prompt,
.pc-term-line span {
    color: #8AE234;
    font-weight: 700;
}

.pc-term-line {
    display: flex;
    gap: 6px;
}

.pc-term-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: none;
    color: #EEE;
    font: inherit;
}

.pc-neofetch {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 4px 0;
    white-space: normal;
}

.pc-neo-logo svg {
    width: 70px;
    height: 70px;
    stroke: none;
}

.pc-neofetch b {
    color: #E95420;
}


/* Side panel */

.pc-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pc-tower {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 130px;
    margin: 0 auto;
    padding: 18px 0 22px;
    border-radius: 14px;
    background: var(--case);
    box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.18), 0 14px 30px rgba(0, 0, 0, 0.25);
}

.pc-power-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: #1A1D22;
    color: #9AA4B2;
    cursor: pointer;
    transition: color 0.2s ease, box-shadow 0.3s ease, transform 0.15s ease;
}

.pc-power-button:active {
    transform: scale(0.92);
}

.pc-power-button.is-on {
    color: #5BE2FF;
    box-shadow: 0 0 0 4px rgba(91, 226, 255, 0.2), 0 0 22px rgba(91, 226, 255, 0.55);
}

.pc-tower-fan {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: repeating-radial-gradient(circle, #111 0 3px, #2A2E36 3px 6px);
}

.pc-tower-fan i {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: conic-gradient(#5B6472 0 20deg, transparent 20deg 72deg, #5B6472 72deg 92deg, transparent 92deg 144deg, #5B6472 144deg 164deg, transparent 164deg 216deg, #5B6472 216deg 236deg, transparent 236deg 288deg, #5B6472 288deg 308deg, transparent 308deg);
}

.pc-tower.is-running .pc-tower-fan i {
    animation: pc-spin 0.35s linear infinite;
}

.pc-leds-box,
.pc-diag,
.pc-diag-idle {
    padding: 14px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 16px;
    background: var(--t-surface-ffffff);
}

.pc-leds-box h3 {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--t-text-7b8798);
}

.pc-leds {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.pc-led {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--t-text-9aa5b5);
    font-size: 11px;
    font-weight: 800;
}

.pc-led i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #3A1A1A;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.pc-led.is-on i {
    background: #FF4141;
    box-shadow: 0 0 10px #FF4141;
}

.pc-led.is-on {
    color: var(--pc-bad);
}

.pc-diag {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-color: color-mix(in srgb, var(--pc-warn) 40%, transparent);
    background: var(--pc-warn-bg);
    color: var(--pc-warn);
    animation: qz-enter 0.35s var(--pc-ease) both;
}

.pc-diag.is-ok {
    border-color: color-mix(in srgb, var(--pc-ok) 40%, transparent);
    background: var(--pc-ok-bg);
    color: var(--pc-ok);
}

.pc-diag strong,
.pc-diag p {
    display: flex;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
}

.pc-diag p {
    color: var(--t-text-26354a);
    font-weight: 600;
}

.pc-hint-button {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid currentColor;
    border-radius: 10px;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.pc-diag-idle {
    margin: 0;
    color: var(--t-text-7b8798);
    font-size: 14px;
}

.pc-side-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


/* ---------- Smaller screens ---------- */

@media (max-width: 1100px) {

    .pc-parts {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .pc-tabs {
        grid-column: 1 / -1;
        position: static;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .pc-tab {
        flex-shrink: 0;
    }

    .pc-build {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .pc-cables {
        grid-column: 1 / -1;
    }

    .pc-power {
        grid-template-columns: 1fr;
    }

    .pc-side {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: start;
    }

    .pc-tower {
        grid-row: span 3;
    }

}

@media (max-width: 760px) {

    .pc-layout {
        padding: 0 16px;
    }

    .pc-parts,
    .pc-build {
        grid-template-columns: 1fr;
    }

    .pc-summary {
        position: static;
    }

    .pc-stage {
        order: -1;
    }

    .pc-item {
        flex-wrap: wrap;
    }

    .pc-item-side {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }

    .pc-step span:not(.pc-step-number) {
        display: none;
    }

    .pc-side {
        grid-template-columns: 1fr;
    }

    .pc-tower {
        grid-row: auto;
    }

    .pc-win {
        width: 86%;
    }

}

@media (prefers-reduced-motion: reduce) {

    .pc-head,
    .pc-stepper,
    .pc-body,
    .pc-item,
    .pc-case-svg [data-remove],
    .pc-cable,
    .pc-case-svg .is-target,
    .pc-nosignal,
    .pc-start,
    .pc-win,
    .pc-diag {
        animation: none !important;
    }

}


/* PC Builder: dragging parts into the case */
.pc-tray-item:not(.is-done) {
    cursor: grab;
    touch-action: none;
}

.pc-tray-item.is-dragging {
    opacity: 0.35;
    border-style: dashed;
}

.pc-drag-ghost {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 200px;
    padding: 7px 11px;
    opacity: 0.92;
    box-sizing: border-box;
    border: 1px solid var(--t-border-5b8def);
    border-radius: 12px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 18px 40px var(--t-shadow-26354a-a25);
    pointer-events: none;
    cursor: grabbing;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.pc-drag-ghost svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: var(--t-text-3f72c5);
}

.pc-drag-ghost.is-over {
    border-color: var(--pc-ok);
    box-shadow: 0 0 0 4px var(--pc-ok-bg), 0 18px 40px var(--t-shadow-26354a-a25);
}

.pc-drag-ghost.is-returning {
    transition: transform 0.28s var(--pc-ease), opacity 0.28s ease;
    opacity: 0;
}

.pc-case-svg .is-target.is-hover {
    fill: rgba(74, 222, 128, 0.5);
    stroke: #4ADE80;
    animation: none;
}

.pc-case-wrap.is-dragging {
    border-color: var(--t-border-5b8def);
    box-shadow: 0 0 0 4px var(--t-shadow-3f72c5-a20);
}


/* ==========================================
   CPU LAB (SM-8 assembly)
========================================== */

:root {
    --cpu-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --cpu-code-bg: #FBFCFE;
    --cpu-op: #2F5FD0;
    --cpu-reg: #9333EA;
    --cpu-num: #C2410C;
    --cpu-str: #15803D;
    --cpu-label: #0F766E;
    --cpu-ref: #0E7490;
    --cpu-com: #94A3B8;
    --cpu-current: rgba(250, 204, 21, 0.28);
    --cpu-error: rgba(239, 68, 68, 0.14);
    --cpu-break: #E5484D;
    --cpu-mem-code: #E3EDFF;
    --cpu-mem-stack: #FCE7F3;
    --cpu-mem-screen: #ECFDF5;
    --cpu-mem-pc: #FACC15;
    --cpu-mem-write: #F97316;
    --cpu-ok: #2E8D4B;
    --cpu-ok-bg: #EAF7EE;
    --cpu-warn: #B7741A;
    --cpu-warn-bg: #FFF4E0;
    --cpu-bad: #D93636;
    --cpu-bad-bg: #FFF1F1;
}

:root[data-theme="dark"] {
    --cpu-code-bg: #12161D;
    --cpu-op: #7AA7FF;
    --cpu-reg: #D19BFF;
    --cpu-num: #FDBA74;
    --cpu-str: #86EFAC;
    --cpu-label: #5EEAD4;
    --cpu-ref: #67E8F9;
    --cpu-com: #64748B;
    --cpu-current: rgba(250, 204, 21, 0.16);
    --cpu-error: rgba(239, 68, 68, 0.2);
    --cpu-mem-code: rgba(91, 141, 239, 0.22);
    --cpu-mem-stack: rgba(236, 72, 153, 0.22);
    --cpu-mem-screen: rgba(16, 185, 129, 0.16);
    --cpu-ok: #5FD08A;
    --cpu-ok-bg: rgba(72, 168, 104, 0.16);
    --cpu-warn: #F0B45A;
    --cpu-warn-bg: rgba(240, 180, 90, 0.14);
    --cpu-bad: #FF7A7A;
    --cpu-bad-bg: rgba(255, 110, 110, 0.13);
}

.cpu-layout {
    max-width: 1320px;
    margin: 18px auto 70px;
    padding: 0 24px;
    box-sizing: border-box;
    color: var(--t-text-26354a);
}

.cpu-layout svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.cpu-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 12px;
    animation: qz-enter 0.5s var(--cpu-ease) both;
}

.cpu-head h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.cpu-head p {
    margin: 6px 0 0;
    color: var(--t-text-7b8798);
    font-size: 15px;
}

.cpu-head-tools {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.cpu-select,
.cpu-speed {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--t-text-7b8798);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.cpu-select select,
.cpu-speed select {
    padding: 8px 10px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.cpu-speed {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.cpu-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 11px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.15s ease, background-color 0.2s ease;
}

.cpu-button:hover {
    border-color: var(--t-border-5b8def);
}

.cpu-button:active {
    transform: scale(0.97);
}

.cpu-button.is-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--t-surface-4a80d8), var(--t-surface-315faf));
    color: var(--t-text-ffffff);
}

.cpu-button.is-running {
    border-color: var(--cpu-warn);
    background: var(--cpu-warn-bg);
    color: var(--cpu-warn);
}

.cpu-icon-only {
    padding: 9px 10px;
}

.cpu-lesson {
    margin: 0 0 16px;
    padding: 11px 14px;
    border-radius: 13px;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    font-size: 14px;
    line-height: 1.45;
    animation: qz-enter 0.5s var(--cpu-ease) 0.04s both;
}

.cpu-lesson b {
    margin-right: 6px;
}

.cpu-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 16px;
    align-items: start;
}

.cpu-card {
    padding: 16px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 18px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 10px 28px var(--t-shadow-26354a-a08);
    animation: qz-enter 0.5s var(--cpu-ease) 0.08s both;
}

.cpu-card h2 {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 800;
}

.cpu-card h2 small {
    color: var(--t-text-9aa5b5);
    font-size: 12px;
    font-weight: 700;
}

.cpu-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}


/* ---------- Editor ---------- */

.cpu-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.cpu-editor {
    --line: 22px;
    display: flex;
    height: 440px;
    overflow: hidden;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 13px;
    background: var(--cpu-code-bg);
    font-family: ui-monospace, "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;
    font-size: 14px;
}

.cpu-gutter {
    flex-shrink: 0;
    width: 70px;
    overflow: hidden;
    padding: 10px 0;
    box-sizing: border-box;
    border-right: 1px solid var(--t-border-e3e9f2);
    background: var(--t-surface-f7f9fc);
}

.cpu-gutter-line {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: var(--line);
    padding: 0 8px 0 18px;
    box-sizing: border-box;
    border: none;
    background: none;
    color: var(--t-text-9aa5b5);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.cpu-addr {
    color: var(--t-text-a0aabb);
    font-size: 10.5px;
}

.cpu-gutter-line::before {
    content: "";
    position: absolute;
    left: 5px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: transparent;
    transition: background-color 0.15s ease;
}

.cpu-gutter-line:hover::before {
    background: color-mix(in srgb, var(--cpu-break) 35%, transparent);
}

.cpu-gutter-line.is-break::before {
    background: var(--cpu-break);
}

.cpu-gutter-line.is-current .cpu-num {
    color: var(--t-text-26354a);
    font-weight: 800;
}

.cpu-gutter-line.is-error .cpu-num {
    color: var(--cpu-bad);
    font-weight: 800;
}

.cpu-code-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.cpu-highlight,
.cpu-code-wrap textarea {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 10px 12px;
    box-sizing: border-box;
    border: none;
    font: inherit;
    line-height: var(--line);
    white-space: pre;
    tab-size: 8;
    overflow: auto;
}

.cpu-highlight {
    overflow: hidden;
    color: var(--t-text-26354a);
    pointer-events: none;
}

.cpu-code-wrap textarea {
    resize: none;
    outline: none;
    background: transparent;
    color: transparent;
    caret-color: var(--t-text-26354a);
}

.cpu-code-wrap textarea::selection {
    background: rgba(91, 141, 239, 0.3);
    color: transparent;
}

.cpu-line {
    display: block;
    margin: 0 -12px;
    padding: 0 12px;
    min-height: var(--line);
}

.cpu-line.is-current {
    background: var(--cpu-current);
    box-shadow: inset 3px 0 0 #EAB308;
}

.cpu-line.is-error {
    background: var(--cpu-error);
    box-shadow: inset 3px 0 0 var(--cpu-bad);
}

.cpu-line.is-break {
    box-shadow: inset 3px 0 0 var(--cpu-break);
}

.t-op { color: var(--cpu-op); font-weight: 700; }
.t-reg { color: var(--cpu-reg); font-weight: 700; }
.t-num { color: var(--cpu-num); }
.t-str { color: var(--cpu-str); }
.t-label { color: var(--cpu-label); font-weight: 700; }
.t-ref { color: var(--cpu-ref); }
.t-com { color: var(--cpu-com); font-style: italic; }

.cpu-problems {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.cpu-problem {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 12px;
    border: none;
    border-radius: 11px;
    background: var(--cpu-bad-bg);
    color: var(--cpu-bad);
    font: inherit;
    font-size: 13.5px;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}

.cpu-problem.is-warning {
    background: var(--cpu-warn-bg);
    color: var(--cpu-warn);
}

.cpu-problem b {
    margin-right: 4px;
}

.cpu-ok {
    margin: 0;
    padding: 9px 12px;
    border-radius: 11px;
    background: var(--cpu-ok-bg);
    color: var(--cpu-ok);
    font-size: 13.5px;
    font-weight: 700;
}

.cpu-tip {
    margin: 8px 0 0;
    color: var(--t-text-9aa5b5);
    font-size: 12.5px;
}


/* ---------- CPU chip ---------- */

.cpu-chip-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cpu-chip-head h2 {
    margin: 0;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    letter-spacing: 0.06em;
}

.cpu-status {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.cpu-status.is-idle { background: var(--t-surface-f3f6fa); color: var(--t-text-7b8798); }
.cpu-status.is-run { background: var(--t-surface-eaf2ff); color: var(--t-text-3f72c5); }
.cpu-status.is-ok { background: var(--cpu-ok-bg); color: var(--cpu-ok); }
.cpu-status.is-warn { background: var(--cpu-warn-bg); color: var(--cpu-warn); }
.cpu-status.is-bad { background: var(--cpu-bad-bg); color: var(--cpu-bad); }

.cpu-now {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-7b8798);
    font-size: 12px;
    font-weight: 700;
}

.cpu-now code {
    color: var(--t-text-26354a);
    font-size: 15px;
}

.cpu-now p {
    display: flex;
    gap: 7px;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.cpu-crash { color: var(--cpu-bad); }
.cpu-wait { color: var(--cpu-warn); }

.cpu-registers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.cpu-reg {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px;
    border: 1px solid var(--t-border-e3e9f2);
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    font-family: ui-monospace, Menlo, Consolas, monospace;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.cpu-reg.is-changed {
    border-color: #EAB308;
    background: var(--cpu-current);
}

.cpu-reg-name {
    color: var(--t-text-9aa5b5);
    font-size: 11px;
    font-weight: 800;
}

.cpu-reg strong {
    font-size: 22px;
    line-height: 1.2;
}

.cpu-reg-dec {
    color: var(--t-text-526175);
    font-size: 12px;
}

.cpu-reg-bin {
    color: var(--t-text-9aa5b5);
    font-size: 10.5px;
}

.cpu-flags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 12px;
}

.cpu-flag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--t-text-9aa5b5);
    font-size: 12px;
}

.cpu-flag b {
    color: var(--t-text-526175);
    font-family: ui-monospace, Menlo, Consolas, monospace;
}

.cpu-flag i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--t-border-dce4f0);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.cpu-flag.is-on i {
    background: #22C55E;
    box-shadow: 0 0 8px #22C55E;
}

.cpu-flag.is-changed b {
    color: #CA8A04;
}

.cpu-steps {
    margin-left: auto;
    color: var(--t-text-9aa5b5);
    font-size: 12px;
    font-weight: 700;
}


/* ---------- Output + screen ---------- */

.cpu-output {
    height: 120px;
    margin: 0 0 10px;
    padding: 10px 12px;
    overflow: auto;
    border-radius: 12px;
    background: #0F1419;
    color: #A6F4C5;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 13.5px;
    white-space: pre-wrap;
    word-break: break-word;
}

.cpu-output.is-empty::before {
    content: "…";
    color: #4B5563;
}

.cpu-input {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--t-text-7b8798);
    font-size: 12px;
    font-weight: 700;
}

.cpu-input input {
    padding: 8px 10px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 10px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 14px;
}

.cpu-screen {
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    gap: 2px;
    width: min(100%, 260px);
    aspect-ratio: 1;
    margin: 0 auto;
    padding: 8px;
    box-sizing: border-box;
    border-radius: 12px;
    background: #0B1A12;
}

.cpu-screen i {
    border-radius: 2px;
    background: #12291C;
    transition: background-color 0.12s ease, box-shadow 0.12s ease;
}

.cpu-screen i.is-on {
    background: #4ADE80;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.7);
}


/* ---------- Memory ---------- */

.cpu-memory-card {
    grid-column: 1 / -1;
}

.cpu-memory-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.cpu-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.cpu-legend span {
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 800;
}

.cpu-legend .is-code { background: var(--cpu-mem-code); color: var(--t-text-3f72c5); }
.cpu-legend .is-pc { background: var(--cpu-mem-pc); color: #3F2F00; }
.cpu-legend .is-stack { background: var(--cpu-mem-stack); color: #BE185D; }
.cpu-legend .is-screen { background: var(--cpu-mem-screen); color: #047857; }
.cpu-legend .is-write { background: var(--cpu-mem-write); color: #FFF; }

.cpu-memory {
    display: grid;
    grid-template-columns: 34px repeat(16, minmax(0, 1fr));
    gap: 3px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 12.5px;
}

.cpu-memory.is-flash .is-code {
    animation: cpu-flash 0.6s ease;
}

@keyframes cpu-flash {
    from { background: var(--t-surface-5b8def); color: #FFF; }
}

.cpu-mem-head {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--t-text-9aa5b5);
    font-size: 11px;
    font-weight: 800;
}

.cpu-mem {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    border-radius: 6px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    cursor: default;
    transition: background-color 0.2s ease;
}

.cpu-mem.is-zero {
    color: var(--t-text-a0aabb);
}

.cpu-mem.is-code { background: var(--cpu-mem-code); color: var(--t-text-26354a); }
.cpu-mem.is-screen { background: var(--cpu-mem-screen); }
.cpu-mem.is-stack { background: var(--cpu-mem-stack); color: var(--t-text-26354a); }
.cpu-mem.is-sp { box-shadow: inset 0 0 0 2px #EC4899; }
.cpu-mem.is-pc { background: var(--cpu-mem-pc); color: #3F2F00; font-weight: 800; }
.cpu-mem.is-read { box-shadow: inset 0 0 0 2px #3B82F6; }
.cpu-mem.is-write { background: var(--cpu-mem-write); color: #FFF; font-weight: 800; animation: cpu-pop 0.35s ease; }

.cpu-mem:hover {
    outline: 2px solid var(--t-border-5b8def);
}

@keyframes cpu-pop {
    50% { transform: scale(1.2); }
}

.cpu-memory-info {
    min-height: 1.4em;
    margin: 10px 0 0;
    color: var(--t-text-526175);
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 13px;
}


/* ---------- Help ---------- */

.cpu-help {
    width: min(720px, 100%);
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    text-align: left;
}

.cpu-help-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cpu-help-head h3 {
    margin: 0;
}

.cpu-help-body {
    overflow-y: auto;
    margin-top: 10px;
    color: var(--t-text-526175);
    font-size: 14px;
    line-height: 1.5;
}

.cpu-help-body p {
    text-align: left;
    color: var(--t-text-526175);
}

.cpu-help-table {
    width: 100%;
    border-collapse: collapse;
}

.cpu-help-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--t-border-e3e9f2);
    vertical-align: top;
}

.cpu-help-table code {
    color: var(--cpu-op);
    font-weight: 700;
    white-space: nowrap;
}


@media (max-width: 1000px) {

    .cpu-grid {
        grid-template-columns: 1fr;
    }

    .cpu-side {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }

}

@media (max-width: 640px) {

    .cpu-layout {
        padding: 0 16px;
    }

    .cpu-editor {
        height: 360px;
        font-size: 13px;
    }

    .cpu-gutter {
        width: 56px;
    }

    .cpu-addr {
        display: none;
    }

    .cpu-memory {
        grid-template-columns: 26px repeat(16, minmax(0, 1fr));
        font-size: 9.5px;
        gap: 2px;
    }

    .cpu-mem {
        height: 20px;
        border-radius: 4px;
    }

    .cpu-speed {
        margin-left: 0;
    }

}

@media (prefers-reduced-motion: reduce) {

    .cpu-head,
    .cpu-lesson,
    .cpu-card,
    .cpu-memory.is-flash .is-code,
    .cpu-mem.is-write {
        animation: none !important;
    }

}

.cpu-code-wrap textarea,
.cpu-output {
    scrollbar-width: thin;
    scrollbar-color: var(--t-border-c2cfdf) transparent;
}

:root[data-theme="dark"] .cpu-legend .is-stack { color: #F9A8D4; }
:root[data-theme="dark"] .cpu-legend .is-screen { color: #6EE7B7; }
:root[data-theme="dark"] .cpu-legend .is-code { color: #A9C5FF; }


/* Class chips (homework, tests) */
.adm-class-chip,
.cls-chip {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    font-size: 11px;
    font-weight: 800;
    vertical-align: middle;
    white-space: nowrap;
}

.adm-class-chip.is-all,
.cls-chip.is-all {
    background: var(--t-surface-f3f6fa);
    color: var(--t-text-7b8798);
}


/* ==========================================
   TESTS PAGE
========================================== */

.ts-layout {
    max-width: 920px;
    margin: 18px auto 70px;
    padding: 0 24px;
    box-sizing: border-box;
    color: var(--t-text-26354a);
}

.ts-layout svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.ts-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 18px;
    animation: qz-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ts-head h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.ts-sub {
    margin: 6px 0 0;
    color: var(--t-text-7b8798);
    font-size: 15px;
}

.ts-filter[hidden] {
    display: none;
}

.ts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ts-card {
    --tone: var(--t-text-3f72c5);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--t-border-dce4f0);
    border-left: 5px solid var(--tone);
    border-radius: 16px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 8px 22px var(--t-shadow-26354a-a08);
    animation: qz-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--i, 0) * 45ms);
}

.ts-card.is-today { --tone: #D93636; }
.ts-card.is-soon { --tone: #E8811E; }
.ts-card.is-week { --tone: #D4A017; }
.ts-card.is-later { --tone: #2E8D4B; }

.ts-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 58px;
    padding: 6px 0;
    border-radius: 12px;
    background: var(--t-surface-f3f6fa);
    line-height: 1.1;
}

.ts-date strong {
    color: var(--tone);
    font-size: 22px;
}

.ts-date span {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ts-date small {
    color: var(--t-text-9aa5b5);
    font-size: 11px;
}

.ts-body {
    flex: 1;
    min-width: 0;
}

.ts-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.ts-top h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
}

.ts-topic {
    margin: 4px 0 0;
    color: var(--t-text-34445a);
    font-size: 14.5px;
    overflow-wrap: anywhere;
}

.ts-teacher {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 6px 0 0;
    color: var(--t-text-7b8798);
    font-size: 13px;
}

.ts-teacher svg {
    width: 15px;
    height: 15px;
}

.ts-when {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    padding: 5px 11px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--tone) 13%, transparent);
    color: var(--tone);
    font-size: 13px;
    font-weight: 800;
}

.ts-when svg {
    width: 15px;
    height: 15px;
}

.ts-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 50px 20px;
    border: 1.5px dashed var(--t-border-dce4f0);
    border-radius: 18px;
    color: var(--t-text-9aa5b5);
    text-align: center;
}

.ts-empty svg {
    width: 40px;
    height: 40px;
}

.ts-empty p {
    margin: 0;
    color: var(--t-text-7b8798);
    font-size: 15px;
}

@media (max-width: 560px) {

    .ts-layout {
        padding: 0 16px;
    }

    .ts-card {
        flex-wrap: wrap;
    }

    .ts-when {
        margin-left: 74px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .ts-head,
    .ts-card {
        animation: none;
    }
}

.hw-class-notice {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 14px;
    padding: 11px 14px;
    border-radius: 13px;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    font-size: 14px;
    font-weight: 600;
}

.hw-class-notice[hidden] {
    display: none;
}

.hw-class-notice svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hw-class-notice span {
    flex: 1;
    min-width: 200px;
}

.hw-class-notice a {
    color: inherit;
    font-weight: 800;
}


/* ==========================================
   LEGENDARY THEMES (bought with coins)
   Palettes made from Grape (dark) / Lavender (light) with the hue
   turned to each theme; the animated background is .legend-bg,
   added by js/theme.js. Ownership is checked by the server.
========================================== */

:root[data-theme="dark"][data-palette="aurora"] {
    --t-border-3f72c5: #3DD1B2;
    --t-border-4675d1: #44DDC3;
    --t-border-4a80d8: #49E4C3;
    --t-border-5b8def: #5AFADF;
    --t-border-8fa8c7: #5C7D75;
    --t-border-c2cfdf: #4B625C;
    --t-border-c6d7ee: #3E645A;
    --t-border-d5e0ef: #3D5B53;
    --t-border-d7e0ec: #405851;
    --t-border-d8e3f2: #3A5A52;
    --t-border-d9e1ec: #405751;
    --t-border-dce4f0: #3C5650;
    --t-border-dce4f0-a90: rgba(13, 30, 26, 0.9);
    --t-border-dee5ef: #3E554F;
    --t-border-e0e6ef: #3E544E;
    --t-border-e0e7f2: #3A564E;
    --t-border-e3e9f2: #3B534C;
    --t-border-eef2f6: #394C47;
    --t-border-ffffff: #2C4942;
    --t-border-ffffff-a25: rgba(255, 255, 255, 0.25);
    --t-border-ffffff-a30: rgba(255, 255, 255, 0.3);
    --t-border-ffffff-a35: rgba(255, 255, 255, 0.35);
    --t-shadow-000000-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-000000-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-000000-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-000000-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-26354a-a04: rgba(0, 0, 0, 0.088);
    --t-shadow-26354a-a05: rgba(0, 0, 0, 0.11);
    --t-shadow-26354a-a06: rgba(0, 0, 0, 0.132);
    --t-shadow-26354a-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-26354a-a10: rgba(0, 0, 0, 0.22);
    --t-shadow-26354a-a12: rgba(0, 0, 0, 0.264);
    --t-shadow-26354a-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-26354a-a16: rgba(0, 0, 0, 0.352);
    --t-shadow-26354a-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-26354a-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-26354a-a22: rgba(0, 0, 0, 0.484);
    --t-shadow-26354a-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-3f72c5-a15: rgba(61, 209, 178, 0.15);
    --t-shadow-3f72c5-a18: rgba(61, 209, 178, 0.18);
    --t-shadow-3f72c5-a20: rgba(61, 209, 178, 0.2);
    --t-shadow-3f72c5-a22: rgba(61, 209, 178, 0.22);
    --t-shadow-3f72c5-a25: rgba(61, 209, 178, 0.25);
    --t-shadow-3f72c5-a28: rgba(61, 209, 178, 0.28);
    --t-shadow-3f72c5-a30: rgba(61, 209, 178, 0.3);
    --t-shadow-48a868-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-48a868-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-4a80d8-a10: rgba(73, 228, 195, 0.1);
    --t-shadow-8fa8c7-a13: rgba(0, 0, 0, 0.286);
    --t-surface-000000-a18: rgba(0, 0, 0, 0.18);
    --t-surface-000000-a65: rgba(9, 19, 16, 0.65);
    --t-surface-26354a: #C7E0DA;
    --t-surface-26354a-a55: rgba(9, 19, 16, 0.55);
    --t-surface-26354a-a72: rgba(9, 19, 16, 0.72);
    --t-surface-26354a-a80: rgba(9, 19, 16, 0.8);
    --t-surface-26354a-a82: rgba(9, 19, 16, 0.82);
    --t-surface-26354a-a92: rgba(9, 19, 16, 0.92);
    --t-surface-26354a-a94: rgba(9, 19, 16, 0.94);
    --t-surface-26354a-a95: rgba(9, 19, 16, 0.95);
    --t-surface-315faf: #29C1A2;
    --t-surface-344966: #AECEC6;
    --t-surface-396bc0: #34CFAF;
    --t-surface-3f72c5: #3DD1B2;
    --t-surface-4675d1: #44DDC3;
    --t-surface-4a80d8: #49E4C3;
    --t-surface-568be0: #54ECCB;
    --t-surface-5b8def: #5AFADF;
    --t-surface-d6ecfa: #0F1F1B;
    --t-surface-dcebff: #22493F;
    --t-surface-e4eaf2: #2D3D39;
    --t-surface-e5ebf4: #2A3E39;
    --t-surface-e7edf5: #293D38;
    --t-surface-e8eef7: #273D37;
    --t-surface-eaf2ff: #1F443A;
    --t-surface-eeeeee: #273F38;
    --t-surface-eef2f7: #283834;
    --t-surface-f0f5ff: #1E4238;
    --t-surface-f1f4f8: #283733;
    --t-surface-f3f6fa: #253632;
    --t-surface-f4f7fc: #213932;
    --t-surface-f4f8fc: #213932;
    --t-surface-f5f8fd: #203933;
    --t-surface-f7f9fc: #223631;
    --t-surface-f8fafd: #203731;
    --t-surface-fbfcfe: #1F3630;
    --t-surface-ffffff: #1E332D;
    --t-surface-ffffff-a18: rgba(255, 255, 255, 0.18);
    --t-surface-ffffff-a92: rgba(13, 30, 26, 0.92);
    --t-surface-ffffff-a94: rgba(13, 30, 26, 0.94);
    --t-text-222222: #DDE0DF;
    --t-text-26354a: #C7E0DA;
    --t-text-333333: #D5D8D7;
    --t-text-34445a: #BDDBD3;
    --t-text-3f72c5: #7BE0CB;
    --t-text-526175: #AECEC6;
    --t-text-5b8def: #9DFCEB;
    --t-text-666666: #BABFBE;
    --t-text-677488: #A4C4BB;
    --t-text-718096: #9DBFB6;
    --t-text-758196: #9DBDB4;
    --t-text-7a8798: #9BBBB2;
    --t-text-7b8798: #9BBBB2;
    --t-text-8792a2: #95B6AD;
    --t-text-8a95a5: #93B5AC;
    --t-text-9aa5b5: #86B1A5;
    --t-text-a0aabb: #7FB3A5;
    --t-text-d7e5fa: #D5FCF4;
    --t-text-eaf2ff: #EAFFFA;
    --t-text-ffffff: #FFFFFF;
    --hm-text: #E0F2ED;
    --hm-muted: #8BB4A9;
    --hm-glass: rgba(30, 51, 45, 0.68);
    --hm-glass-strong: rgba(34, 57, 51, 0.92);
    --hm-glass-border: rgba(255, 255, 255, 0.07);
    --hm-line: #334F47;
    --hm-shadow: rgba(0, 0, 0, 0.28);
    --hm-shadow-strong: rgba(0, 0, 0, 0.42);
    --hm-dots: rgba(153, 222, 207, 0.10);
    --hm-blob-a: #24B197;
    --hm-blue: #7BE0CB;
    --pa-315faf: #29C1A2;
    --pa-3f72c5: #3DD1B2;
    --pa-4a80d8: #49E4C3;
    --pa-a9bef0: #ACF7EC;
    --pa-rgb-0f172a: 13, 44, 40;
    --pa-rgb-3f72c5: 61, 209, 178;
    --pa-rgb-4a80d8: 73, 228, 195;
}


:root[data-theme="dark"][data-palette="inferno"] {
    --t-border-3f72c5: #D76037;
    --t-border-4675d1: #E26F3F;
    --t-border-4a80d8: #EA6D43;
    --t-border-5b8def: #FF8855;
    --t-border-8fa8c7: #7F635B;
    --t-border-c2cfdf: #634F4A;
    --t-border-c6d7ee: #65453D;
    --t-border-d5e0ef: #5C423C;
    --t-border-d7e0ec: #59443F;
    --t-border-d8e3f2: #5B4038;
    --t-border-d9e1ec: #58443F;
    --t-border-dce4f0: #57423B;
    --t-border-dce4f0-a90: rgba(31, 16, 12, 0.9);
    --t-border-dee5ef: #56423D;
    --t-border-e0e6ef: #55413D;
    --t-border-e0e7f2: #573F39;
    --t-border-e3e9f2: #543F3A;
    --t-border-eef2f6: #4C3C39;
    --t-border-ffffff: #4A322B;
    --t-border-ffffff-a25: rgba(255, 255, 255, 0.25);
    --t-border-ffffff-a30: rgba(255, 255, 255, 0.3);
    --t-border-ffffff-a35: rgba(255, 255, 255, 0.35);
    --t-shadow-000000-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-000000-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-000000-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-000000-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-26354a-a04: rgba(0, 0, 0, 0.088);
    --t-shadow-26354a-a05: rgba(0, 0, 0, 0.11);
    --t-shadow-26354a-a06: rgba(0, 0, 0, 0.132);
    --t-shadow-26354a-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-26354a-a10: rgba(0, 0, 0, 0.22);
    --t-shadow-26354a-a12: rgba(0, 0, 0, 0.264);
    --t-shadow-26354a-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-26354a-a16: rgba(0, 0, 0, 0.352);
    --t-shadow-26354a-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-26354a-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-26354a-a22: rgba(0, 0, 0, 0.484);
    --t-shadow-26354a-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-3f72c5-a15: rgba(215, 96, 55, 0.15);
    --t-shadow-3f72c5-a18: rgba(215, 96, 55, 0.18);
    --t-shadow-3f72c5-a20: rgba(215, 96, 55, 0.2);
    --t-shadow-3f72c5-a22: rgba(215, 96, 55, 0.22);
    --t-shadow-3f72c5-a25: rgba(215, 96, 55, 0.25);
    --t-shadow-3f72c5-a28: rgba(215, 96, 55, 0.28);
    --t-shadow-3f72c5-a30: rgba(215, 96, 55, 0.3);
    --t-shadow-48a868-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-48a868-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-4a80d8-a10: rgba(234, 109, 67, 0.1);
    --t-shadow-8fa8c7-a13: rgba(0, 0, 0, 0.286);
    --t-surface-000000-a18: rgba(0, 0, 0, 0.18);
    --t-surface-000000-a65: rgba(20, 10, 8, 0.65);
    --t-surface-26354a: #E1CBC6;
    --t-surface-26354a-a55: rgba(20, 10, 8, 0.55);
    --t-surface-26354a-a72: rgba(20, 10, 8, 0.72);
    --t-surface-26354a-a80: rgba(20, 10, 8, 0.8);
    --t-surface-26354a-a82: rgba(20, 10, 8, 0.82);
    --t-surface-26354a-a92: rgba(20, 10, 8, 0.92);
    --t-surface-26354a-a94: rgba(20, 10, 8, 0.94);
    --t-surface-26354a-a95: rgba(20, 10, 8, 0.95);
    --t-surface-315faf: #C64F24;
    --t-surface-344966: #CFB4AD;
    --t-surface-396bc0: #D55A2E;
    --t-surface-3f72c5: #D76037;
    --t-surface-4675d1: #E26F3F;
    --t-surface-4a80d8: #EA6D43;
    --t-surface-568be0: #F1774F;
    --t-surface-5b8def: #FF8855;
    --t-surface-d6ecfa: #231410;
    --t-surface-dcebff: #4B2A20;
    --t-surface-e4eaf2: #3E302C;
    --t-surface-e5ebf4: #3E2E2A;
    --t-surface-e7edf5: #3D2D29;
    --t-surface-e8eef7: #3E2A26;
    --t-surface-eaf2ff: #45261E;
    --t-surface-eeeeee: #402B26;
    --t-surface-eef2f7: #392B27;
    --t-surface-f0f5ff: #43241D;
    --t-surface-f1f4f8: #382A27;
    --t-surface-f3f6fa: #372824;
    --t-surface-f4f7fc: #3A2520;
    --t-surface-f4f8fc: #3A2520;
    --t-surface-f5f8fd: #3A251F;
    --t-surface-f7f9fc: #362622;
    --t-surface-f8fafd: #38241F;
    --t-surface-fbfcfe: #37231E;
    --t-surface-ffffff: #33221E;
    --t-surface-ffffff-a18: rgba(255, 255, 255, 0.18);
    --t-surface-ffffff-a92: rgba(31, 16, 12, 0.92);
    --t-surface-ffffff-a94: rgba(31, 16, 12, 0.94);
    --t-text-222222: #E0DEDD;
    --t-text-26354a: #E1CBC6;
    --t-text-333333: #D8D6D5;
    --t-text-34445a: #DCC2BC;
    --t-text-3f72c5: #E49377;
    --t-text-526175: #CFB4AD;
    --t-text-5b8def: #FFB79A;
    --t-text-666666: #BFBBB9;
    --t-text-677488: #C5AAA3;
    --t-text-718096: #C1A39B;
    --t-text-758196: #BEA39C;
    --t-text-7a8798: #BCA19A;
    --t-text-7b8798: #BCA19A;
    --t-text-8792a2: #B79A94;
    --t-text-8a95a5: #B79991;
    --t-text-9aa5b5: #B38D85;
    --t-text-a0aabb: #B4887D;
    --t-text-d7e5fa: #FEDED3;
    --t-text-eaf2ff: #FFEFEA;
    --t-text-ffffff: #FFFFFF;
    --hm-text: #F3E3DF;
    --hm-muted: #B69289;
    --hm-glass: rgba(51, 34, 30, 0.68);
    --hm-glass-strong: rgba(58, 38, 33, 0.92);
    --hm-glass-border: rgba(255, 255, 255, 0.07);
    --hm-line: #503832;
    --hm-shadow: rgba(0, 0, 0, 0.28);
    --hm-shadow-strong: rgba(0, 0, 0, 0.42);
    --hm-dots: rgba(224, 170, 151, 0.10);
    --hm-blob-a: #B7491E;
    --hm-blue: #E49377;
    --pa-315faf: #C64F24;
    --pa-3f72c5: #D76037;
    --pa-4a80d8: #EA6D43;
    --pa-a9bef0: #F9C4AA;
    --pa-rgb-0f172a: 45, 23, 12;
    --pa-rgb-3f72c5: 215, 96, 55;
    --pa-rgb-4a80d8: 234, 109, 67;
}


:root[data-theme="dark"][data-palette="galaxy"] {
    --t-border-3f72c5: #4F3DD1;
    --t-border-4675d1: #5D44DD;
    --t-border-4a80d8: #5C49E4;
    --t-border-5b8def: #755AFA;
    --t-border-8fa8c7: #5E5B7C;
    --t-border-c2cfdf: #4B4A61;
    --t-border-c6d7ee: #403D62;
    --t-border-d5e0ef: #3E3C59;
    --t-border-d7e0ec: #403E57;
    --t-border-d8e3f2: #3B3959;
    --t-border-d9e1ec: #403F56;
    --t-border-dce4f0: #3D3B55;
    --t-border-dce4f0-a90: rgba(14, 13, 30, 0.9);
    --t-border-dee5ef: #3E3D54;
    --t-border-e0e6ef: #3E3D53;
    --t-border-e0e7f2: #3B3954;
    --t-border-e3e9f2: #3B3A52;
    --t-border-eef2f6: #39384A;
    --t-border-ffffff: #2E2B47;
    --t-border-ffffff-a25: rgba(255, 255, 255, 0.25);
    --t-border-ffffff-a30: rgba(255, 255, 255, 0.3);
    --t-border-ffffff-a35: rgba(255, 255, 255, 0.35);
    --t-shadow-000000-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-000000-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-000000-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-000000-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-26354a-a04: rgba(0, 0, 0, 0.088);
    --t-shadow-26354a-a05: rgba(0, 0, 0, 0.11);
    --t-shadow-26354a-a06: rgba(0, 0, 0, 0.132);
    --t-shadow-26354a-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-26354a-a10: rgba(0, 0, 0, 0.22);
    --t-shadow-26354a-a12: rgba(0, 0, 0, 0.264);
    --t-shadow-26354a-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-26354a-a16: rgba(0, 0, 0, 0.352);
    --t-shadow-26354a-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-26354a-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-26354a-a22: rgba(0, 0, 0, 0.484);
    --t-shadow-26354a-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-3f72c5-a15: rgba(79, 61, 209, 0.15);
    --t-shadow-3f72c5-a18: rgba(79, 61, 209, 0.18);
    --t-shadow-3f72c5-a20: rgba(79, 61, 209, 0.2);
    --t-shadow-3f72c5-a22: rgba(79, 61, 209, 0.22);
    --t-shadow-3f72c5-a25: rgba(79, 61, 209, 0.25);
    --t-shadow-3f72c5-a28: rgba(79, 61, 209, 0.28);
    --t-shadow-3f72c5-a30: rgba(79, 61, 209, 0.3);
    --t-shadow-48a868-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-48a868-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-4a80d8-a10: rgba(92, 73, 228, 0.1);
    --t-shadow-8fa8c7-a13: rgba(0, 0, 0, 0.286);
    --t-surface-000000-a18: rgba(0, 0, 0, 0.18);
    --t-surface-000000-a65: rgba(9, 9, 19, 0.65);
    --t-surface-26354a: #C7C5DF;
    --t-surface-26354a-a55: rgba(9, 9, 19, 0.55);
    --t-surface-26354a-a72: rgba(9, 9, 19, 0.72);
    --t-surface-26354a-a80: rgba(9, 9, 19, 0.8);
    --t-surface-26354a-a82: rgba(9, 9, 19, 0.82);
    --t-surface-26354a-a92: rgba(9, 9, 19, 0.92);
    --t-surface-26354a-a94: rgba(9, 9, 19, 0.94);
    --t-surface-26354a-a95: rgba(9, 9, 19, 0.95);
    --t-surface-315faf: #3E29C1;
    --t-surface-344966: #AEACCD;
    --t-surface-396bc0: #4834CF;
    --t-surface-3f72c5: #4F3DD1;
    --t-surface-4675d1: #5D44DD;
    --t-surface-4a80d8: #5C49E4;
    --t-surface-568be0: #6654EC;
    --t-surface-5b8def: #755AFA;
    --t-surface-d6ecfa: #100E1D;
    --t-surface-dcebff: #252249;
    --t-surface-e4eaf2: #2D2C3C;
    --t-surface-e5ebf4: #2B293C;
    --t-surface-e7edf5: #2A283B;
    --t-surface-e8eef7: #27263B;
    --t-surface-eaf2ff: #221F44;
    --t-surface-eeeeee: #27263E;
    --t-surface-eef2f7: #282737;
    --t-surface-f0f5ff: #201E42;
    --t-surface-f1f4f8: #272736;
    --t-surface-f3f6fa: #252335;
    --t-surface-f4f7fc: #212037;
    --t-surface-f4f8fc: #212037;
    --t-surface-f5f8fd: #211F38;
    --t-surface-f7f9fc: #232134;
    --t-surface-f8fafd: #211F35;
    --t-surface-fbfcfe: #201E34;
    --t-surface-ffffff: #1F1D31;
    --t-surface-ffffff-a18: rgba(255, 255, 255, 0.18);
    --t-surface-ffffff-a92: rgba(14, 13, 30, 0.92);
    --t-surface-ffffff-a94: rgba(14, 13, 30, 0.94);
    --t-text-222222: #DCDCDF;
    --t-text-26354a: #C7C5DF;
    --t-text-333333: #D4D4D7;
    --t-text-34445a: #BDBBDA;
    --t-text-3f72c5: #887BE0;
    --t-text-526175: #AEACCD;
    --t-text-5b8def: #AB9DFC;
    --t-text-666666: #B9B8BE;
    --t-text-677488: #A5A2C3;
    --t-text-718096: #9E9BBE;
    --t-text-758196: #9E9BBC;
    --t-text-7a8798: #9C99BA;
    --t-text-7b8798: #9C99BA;
    --t-text-8792a2: #9593B5;
    --t-text-8a95a5: #9491B4;
    --t-text-9aa5b5: #8785B0;
    --t-text-a0aabb: #817EB2;
    --t-text-d7e5fa: #D9D5FC;
    --t-text-eaf2ff: #ECEAFF;
    --t-text-ffffff: #FFFFFF;
    --hm-text: #E1E0F2;
    --hm-muted: #8C89B3;
    --hm-glass: rgba(31, 29, 49, 0.68);
    --hm-glass-strong: rgba(35, 33, 55, 0.92);
    --hm-glass-border: rgba(255, 255, 255, 0.07);
    --hm-line: #34324D;
    --hm-shadow: rgba(0, 0, 0, 0.28);
    --hm-shadow-strong: rgba(0, 0, 0, 0.42);
    --hm-dots: rgba(162, 153, 222, 0.10);
    --hm-blob-a: #3924B1;
    --hm-blue: #887BE0;
    --pa-315faf: #3E29C1;
    --pa-3f72c5: #4F3DD1;
    --pa-4a80d8: #5C49E4;
    --pa-a9bef0: #BBACF7;
    --pa-rgb-0f172a: 19, 13, 44;
    --pa-rgb-3f72c5: 79, 61, 209;
    --pa-rgb-4a80d8: 92, 73, 228;
}


:root[data-theme="dark"][data-palette="cyberpunk"] {
    --t-border-3f72c5: #E42AAE;
    --t-border-4675d1: #F130B1;
    --t-border-4a80d8: #F835C0;
    --t-border-5b8def: #FF55C6;
    --t-border-8fa8c7: #7F5675;
    --t-border-c2cfdf: #62455B;
    --t-border-c6d7ee: #66375A;
    --t-border-d5e0ef: #5C3753;
    --t-border-d7e0ec: #593A52;
    --t-border-d8e3f2: #5B3452;
    --t-border-d9e1ec: #573B50;
    --t-border-dce4f0: #57374F;
    --t-border-dce4f0-a90: rgba(33, 10, 27, 0.9);
    --t-border-dee5ef: #55394E;
    --t-border-e0e6ef: #54394E;
    --t-border-e0e7f2: #56354E;
    --t-border-e3e9f2: #53354D;
    --t-border-eef2f6: #4B3546;
    --t-border-ffffff: #492740;
    --t-border-ffffff-a25: rgba(255, 255, 255, 0.25);
    --t-border-ffffff-a30: rgba(255, 255, 255, 0.3);
    --t-border-ffffff-a35: rgba(255, 255, 255, 0.35);
    --t-shadow-000000-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-000000-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-000000-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-000000-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-26354a-a04: rgba(0, 0, 0, 0.088);
    --t-shadow-26354a-a05: rgba(0, 0, 0, 0.11);
    --t-shadow-26354a-a06: rgba(0, 0, 0, 0.132);
    --t-shadow-26354a-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-26354a-a10: rgba(0, 0, 0, 0.22);
    --t-shadow-26354a-a12: rgba(0, 0, 0, 0.264);
    --t-shadow-26354a-a15: rgba(0, 0, 0, 0.33);
    --t-shadow-26354a-a16: rgba(0, 0, 0, 0.352);
    --t-shadow-26354a-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-26354a-a20: rgba(0, 0, 0, 0.44);
    --t-shadow-26354a-a22: rgba(0, 0, 0, 0.484);
    --t-shadow-26354a-a25: rgba(0, 0, 0, 0.55);
    --t-shadow-3f72c5-a15: rgba(228, 42, 174, 0.15);
    --t-shadow-3f72c5-a18: rgba(228, 42, 174, 0.18);
    --t-shadow-3f72c5-a20: rgba(228, 42, 174, 0.2);
    --t-shadow-3f72c5-a22: rgba(228, 42, 174, 0.22);
    --t-shadow-3f72c5-a25: rgba(228, 42, 174, 0.25);
    --t-shadow-3f72c5-a28: rgba(228, 42, 174, 0.28);
    --t-shadow-3f72c5-a30: rgba(228, 42, 174, 0.3);
    --t-shadow-48a868-a08: rgba(0, 0, 0, 0.176);
    --t-shadow-48a868-a18: rgba(0, 0, 0, 0.396);
    --t-shadow-4a80d8-a10: rgba(248, 53, 192, 0.1);
    --t-shadow-8fa8c7-a13: rgba(0, 0, 0, 0.286);
    --t-surface-000000-a18: rgba(0, 0, 0, 0.18);
    --t-surface-000000-a65: rgba(21, 7, 18, 0.65);
    --t-surface-26354a: #E5C7DE;
    --t-surface-26354a-a55: rgba(21, 7, 18, 0.55);
    --t-surface-26354a-a72: rgba(21, 7, 18, 0.72);
    --t-surface-26354a-a80: rgba(21, 7, 18, 0.8);
    --t-surface-26354a-a82: rgba(21, 7, 18, 0.82);
    --t-surface-26354a-a92: rgba(21, 7, 18, 0.92);
    --t-surface-26354a-a94: rgba(21, 7, 18, 0.94);
    --t-surface-26354a-a95: rgba(21, 7, 18, 0.95);
    --t-surface-315faf: #D4169B;
    --t-surface-344966: #D1A6C7;
    --t-surface-396bc0: #E320A9;
    --t-surface-3f72c5: #E42AAE;
    --t-surface-4675d1: #F130B1;
    --t-surface-4a80d8: #F835C0;
    --t-surface-568be0: #FF41C9;
    --t-surface-5b8def: #FF55C6;
    --t-surface-d6ecfa: #250E1F;
    --t-surface-dcebff: #4E1D42;
    --t-surface-e4eaf2: #3C2837;
    --t-surface-e5ebf4: #3D2637;
    --t-surface-e7edf5: #3C2536;
    --t-surface-e8eef7: #3C2237;
    --t-surface-eaf2ff: #481B3D;
    --t-surface-eeeeee: #3F2239;
    --t-surface-eef2f7: #372332;
    --t-surface-f0f5ff: #461A3C;
    --t-surface-f1f4f8: #362432;
    --t-surface-f3f6fa: #362031;
    --t-surface-f4f7fc: #391C32;
    --t-surface-f4f8fc: #391C32;
    --t-surface-f5f8fd: #401E37;
    --t-surface-f7f9fc: #351E2F;
    --t-surface-f8fafd: #371B30;
    --t-surface-fbfcfe: #351A2F;
    --t-surface-ffffff: #321A2C;
    --t-surface-ffffff-a18: rgba(255, 255, 255, 0.18);
    --t-surface-ffffff-a92: rgba(33, 10, 27, 0.92);
    --t-surface-ffffff-a94: rgba(33, 10, 27, 0.94);
    --t-text-222222: #DEDADD;
    --t-text-26354a: #E5C7DE;
    --t-text-333333: #D6D2D5;
    --t-text-34445a: #E0BDD8;
    --t-text-3f72c5: #ED6EC8;
    --t-text-526175: #D1A6C7;
    --t-text-5b8def: #FF9ADF;
    --t-text-666666: #BEB6BB;
    --t-text-677488: #C69CBC;
    --t-text-718096: #C295B7;
    --t-text-758196: #BF96B5;
    --t-text-7a8798: #BD94B3;
    --t-text-7b8798: #BD94B3;
    --t-text-8792a2: #B88DAF;
    --t-text-8a95a5: #B88BAD;
    --t-text-9aa5b5: #B57EA9;
    --t-text-a0aabb: #B775A8;
    --t-text-d7e5fa: #FFD2F2;
    --t-text-eaf2ff: #FFEAF9;
    --t-text-ffffff: #FFFFFF;
    --hm-text: #F5DDEF;
    --hm-muted: #B882AB;
    --hm-glass: rgba(50, 26, 44, 0.68);
    --hm-glass-strong: rgba(57, 29, 50, 0.92);
    --hm-glass-border: rgba(255, 255, 255, 0.07);
    --hm-line: #4F2E47;
    --hm-shadow: rgba(0, 0, 0, 0.28);
    --hm-shadow-strong: rgba(0, 0, 0, 0.42);
    --hm-dots: rgba(231, 144, 206, 0.10);
    --hm-blob-a: #C4118C;
    --hm-blue: #ED6EC8;
    --pa-315faf: #D4169B;
    --pa-3f72c5: #E42AAE;
    --pa-4a80d8: #F835C0;
    --pa-a9bef0: #FFA4DE;
    --pa-rgb-0f172a: 48, 9, 34;
    --pa-rgb-3f72c5: 228, 42, 174;
    --pa-rgb-4a80d8: 248, 53, 192;
}


:root[data-theme="light"][data-palette="sakura"] {
    --t-border-3f72c5: #C63E6F;
    --t-border-4675d1: #D14672;
    --t-border-4a80d8: #D84A7E;
    --t-border-5b8def: #EF5B8A;
    --t-border-8fa8c7: #CA8CA4;
    --t-border-c2cfdf: #E1C0CC;
    --t-border-c6d7ee: #EEC6D6;
    --t-border-d5e0ef: #EED5DF;
    --t-border-d7e0ec: #ECD7DF;
    --t-border-d8e3f2: #F2D8E2;
    --t-border-d9e1ec: #EDD8E0;
    --t-border-dce4f0: #F0DCE3;
    --t-border-dce4f0-a90: rgba(240, 220, 227, 0.9);
    --t-border-dee5ef: #F0DDE5;
    --t-border-e0e6ef: #F0DFE5;
    --t-border-e0e7f2: #F2E0E7;
    --t-border-e3e9f2: #F2E3E8;
    --t-border-eef2f6: #F7EDF1;
    --t-border-ffffff: #FFFFFF;
    --t-border-ffffff-a25: rgba(255, 255, 255, 0.25);
    --t-border-ffffff-a30: rgba(255, 255, 255, 0.3);
    --t-border-ffffff-a35: rgba(255, 255, 255, 0.35);
    --t-shadow-000000-a15: rgba(0, 0, 0, 0.15);
    --t-shadow-000000-a18: rgba(0, 0, 0, 0.18);
    --t-shadow-000000-a20: rgba(0, 0, 0, 0.20);
    --t-shadow-000000-a25: rgba(0, 0, 0, 0.25);
    --t-shadow-26354a-a04: rgba(76, 36, 51, 0.04);
    --t-shadow-26354a-a05: rgba(76, 36, 51, 0.05);
    --t-shadow-26354a-a06: rgba(76, 36, 51, 0.06);
    --t-shadow-26354a-a08: rgba(76, 36, 51, 0.08);
    --t-shadow-26354a-a10: rgba(76, 36, 51, 0.10);
    --t-shadow-26354a-a12: rgba(76, 36, 51, 0.12);
    --t-shadow-26354a-a15: rgba(76, 36, 51, 0.15);
    --t-shadow-26354a-a16: rgba(76, 36, 51, 0.16);
    --t-shadow-26354a-a18: rgba(76, 36, 51, 0.18);
    --t-shadow-26354a-a20: rgba(76, 36, 51, 0.20);
    --t-shadow-26354a-a22: rgba(76, 36, 51, 0.22);
    --t-shadow-26354a-a25: rgba(76, 36, 51, 0.25);
    --t-shadow-3f72c5-a15: rgba(198, 62, 111, 0.15);
    --t-shadow-3f72c5-a18: rgba(198, 62, 111, 0.18);
    --t-shadow-3f72c5-a20: rgba(198, 62, 111, 0.20);
    --t-shadow-3f72c5-a22: rgba(198, 62, 111, 0.22);
    --t-shadow-3f72c5-a25: rgba(198, 62, 111, 0.25);
    --t-shadow-3f72c5-a28: rgba(198, 62, 111, 0.28);
    --t-shadow-3f72c5-a30: rgba(198, 62, 111, 0.30);
    --t-shadow-4a80d8-a10: rgba(216, 74, 126, 0.10);
    --t-shadow-8fa8c7-a13: rgba(202, 140, 164, 0.13);
    --t-surface-000000-a18: rgba(0, 0, 0, 0.18);
    --t-surface-000000-a65: rgba(0, 0, 0, 0.65);
    --t-surface-26354a: #4C2433;
    --t-surface-26354a-a55: rgba(76, 36, 51, 0.55);
    --t-surface-26354a-a72: rgba(76, 36, 51, 0.72);
    --t-surface-26354a-a80: rgba(76, 36, 51, 0.80);
    --t-surface-26354a-a82: rgba(76, 36, 51, 0.82);
    --t-surface-26354a-a92: rgba(76, 36, 51, 0.92);
    --t-surface-26354a-a94: rgba(76, 36, 51, 0.94);
    --t-surface-26354a-a95: rgba(76, 36, 51, 0.95);
    --t-surface-315faf: #AE325D;
    --t-surface-344966: #6A3148;
    --t-surface-396bc0: #C13869;
    --t-surface-3f72c5: #C63E6F;
    --t-surface-4675d1: #D14672;
    --t-surface-4a80d8: #D84A7E;
    --t-surface-568be0: #E05689;
    --t-surface-5b8def: #EF5B8A;
    --t-surface-d6ecfa: #FAD6EC;
    --t-surface-dcebff: #FFDDEC;
    --t-surface-e4eaf2: #F2E4EA;
    --t-surface-e5ebf4: #F5E4EA;
    --t-surface-e7edf5: #F5E7ED;
    --t-surface-e8eef7: #F6E9EE;
    --t-surface-eaf2ff: #FFEAF1;
    --t-surface-eeeeee: #EEEEEE;
    --t-surface-eef2f7: #F7EEF2;
    --t-surface-f0f5ff: #FEF1F5;
    --t-surface-f1f4f8: #F9F0F3;
    --t-surface-f3f6fa: #FAF3F6;
    --t-surface-f4f7fc: #FCF4F7;
    --t-surface-f4f8fc: #FCF4F7;
    --t-surface-f5f8fd: #FDF5F8;
    --t-surface-f7f9fc: #FDF7FA;
    --t-surface-f8fafd: #FCF9FA;
    --t-surface-fbfcfe: #FEFBFC;
    --t-surface-ffffff: #FFFFFF;
    --t-surface-ffffff-a18: rgba(255, 255, 255, 0.18);
    --t-surface-ffffff-a92: rgba(255, 255, 255, 0.92);
    --t-surface-ffffff-a94: rgba(255, 255, 255, 0.94);
    --t-text-222222: #232121;
    --t-text-26354a: #4C2433;
    --t-text-333333: #343232;
    --t-text-34445a: #5C3243;
    --t-text-3f72c5: #C63E6F;
    --t-text-526175: #77505F;
    --t-text-5b8def: #EF5B8A;
    --t-text-666666: #6A6265;
    --t-text-677488: #8A6573;
    --t-text-718096: #986F7F;
    --t-text-758196: #987381;
    --t-text-7a8798: #997884;
    --t-text-7b8798: #9A7985;
    --t-text-8792a2: #A48591;
    --t-text-8a95a5: #A78894;
    --t-text-9aa5b5: #B798A4;
    --t-text-a0aabb: #BD9EAA;
    --t-text-d7e5fa: #FAD6E3;
    --t-text-eaf2ff: #FFEAF1;
    --t-text-ffffff: #FFFFFF;
    --hm-text: #431E2C;
    --hm-muted: #845969;
    --hm-glass: rgba(255, 255, 255, 0.72);
    --hm-glass-strong: rgba(255, 255, 255, 0.9);
    --hm-glass-border: rgba(255, 255, 255, 0.85);
    --hm-line: #F0DCE3;
    --hm-shadow: rgba(76, 36, 51, 0.10);
    --hm-shadow-strong: rgba(76, 36, 51, 0.18);
    --hm-dots: rgba(198, 62, 111, 0.16);
    --hm-blob-a: #F57FB1;
    --hm-blue: #C63E6F;
    --pa-315faf: #AE325D;
    --pa-3f72c5: #C63E6F;
    --pa-4a80d8: #D84A7E;
    --pa-a9bef0: #F0A9BD;
    --pa-rgb-0f172a: 42, 15, 23;
    --pa-rgb-3f72c5: 198, 62, 111;
    --pa-rgb-4a80d8: 216, 74, 126;
}


:root[data-theme="light"][data-palette="lagoon"] {
    --t-border-3f72c5: #3CB5C8;
    --t-border-4675d1: #43B9D4;
    --t-border-4a80d8: #47C7DB;
    --t-border-5b8def: #58D6F2;
    --t-border-8fa8c7: #8AC4CC;
    --t-border-c2cfdf: #BFDEE2;
    --t-border-c6d7ee: #C5EBEF;
    --t-border-d5e0ef: #D5ECEF;
    --t-border-d7e0ec: #D6EAED;
    --t-border-d8e3f2: #D8EFF2;
    --t-border-d9e1ec: #D7EBEE;
    --t-border-dce4f0: #DCEEF0;
    --t-border-dce4f0-a90: rgba(220, 238, 240, 0.9);
    --t-border-dee5ef: #DDEFF0;
    --t-border-e0e6ef: #DFEEF0;
    --t-border-e0e7f2: #E0F0F2;
    --t-border-e3e9f2: #E2EFF2;
    --t-border-eef2f6: #EDF6F7;
    --t-border-ffffff: #FFFFFF;
    --t-border-ffffff-a25: rgba(255, 255, 255, 0.25);
    --t-border-ffffff-a30: rgba(255, 255, 255, 0.3);
    --t-border-ffffff-a35: rgba(255, 255, 255, 0.35);
    --t-shadow-000000-a15: rgba(0, 0, 0, 0.15);
    --t-shadow-000000-a18: rgba(0, 0, 0, 0.18);
    --t-shadow-000000-a20: rgba(0, 0, 0, 0.20);
    --t-shadow-000000-a25: rgba(0, 0, 0, 0.25);
    --t-shadow-26354a-a04: rgba(35, 72, 77, 0.04);
    --t-shadow-26354a-a05: rgba(35, 72, 77, 0.05);
    --t-shadow-26354a-a06: rgba(35, 72, 77, 0.06);
    --t-shadow-26354a-a08: rgba(35, 72, 77, 0.08);
    --t-shadow-26354a-a10: rgba(35, 72, 77, 0.10);
    --t-shadow-26354a-a12: rgba(35, 72, 77, 0.12);
    --t-shadow-26354a-a15: rgba(35, 72, 77, 0.15);
    --t-shadow-26354a-a16: rgba(35, 72, 77, 0.16);
    --t-shadow-26354a-a18: rgba(35, 72, 77, 0.18);
    --t-shadow-26354a-a20: rgba(35, 72, 77, 0.20);
    --t-shadow-26354a-a22: rgba(35, 72, 77, 0.22);
    --t-shadow-26354a-a25: rgba(35, 72, 77, 0.25);
    --t-shadow-3f72c5-a15: rgba(60, 181, 200, 0.15);
    --t-shadow-3f72c5-a18: rgba(60, 181, 200, 0.18);
    --t-shadow-3f72c5-a20: rgba(60, 181, 200, 0.20);
    --t-shadow-3f72c5-a22: rgba(60, 181, 200, 0.22);
    --t-shadow-3f72c5-a25: rgba(60, 181, 200, 0.25);
    --t-shadow-3f72c5-a28: rgba(60, 181, 200, 0.28);
    --t-shadow-3f72c5-a30: rgba(60, 181, 200, 0.30);
    --t-shadow-4a80d8-a10: rgba(71, 199, 219, 0.10);
    --t-shadow-8fa8c7-a13: rgba(138, 196, 204, 0.13);
    --t-surface-000000-a18: rgba(0, 0, 0, 0.18);
    --t-surface-000000-a65: rgba(0, 0, 0, 0.65);
    --t-surface-26354a: #23484D;
    --t-surface-26354a-a55: rgba(35, 72, 77, 0.55);
    --t-surface-26354a-a72: rgba(35, 72, 77, 0.72);
    --t-surface-26354a-a80: rgba(35, 72, 77, 0.80);
    --t-surface-26354a-a82: rgba(35, 72, 77, 0.82);
    --t-surface-26354a-a92: rgba(35, 72, 77, 0.92);
    --t-surface-26354a-a94: rgba(35, 72, 77, 0.94);
    --t-surface-26354a-a95: rgba(35, 72, 77, 0.95);
    --t-surface-315faf: #2F9DB1;
    --t-surface-344966: #30656B;
    --t-surface-396bc0: #36AFC3;
    --t-surface-3f72c5: #3CB5C8;
    --t-surface-4675d1: #43B9D4;
    --t-surface-4a80d8: #47C7DB;
    --t-surface-568be0: #53D0E2;
    --t-surface-5b8def: #58D6F2;
    --t-surface-d6ecfa: #D6FAF6;
    --t-surface-dcebff: #DDFDFF;
    --t-surface-e4eaf2: #E3F2F3;
    --t-surface-e5ebf4: #E4F3F5;
    --t-surface-e7edf5: #E6F4F6;
    --t-surface-e8eef7: #E8F5F7;
    --t-surface-eaf2ff: #EAFCFF;
    --t-surface-eeeeee: #EEEEEE;
    --t-surface-eef2f7: #EEF7F7;
    --t-surface-f0f5ff: #F0FCFF;
    --t-surface-f1f4f8: #F0F7F9;
    --t-surface-f3f6fa: #F3F9FA;
    --t-surface-f4f7fc: #F4FBFC;
    --t-surface-f4f8fc: #F4FBFC;
    --t-surface-f5f8fd: #F5FCFD;
    --t-surface-f7f9fc: #F7FDFD;
    --t-surface-f8fafd: #F9FCFC;
    --t-surface-fbfcfe: #FBFEFE;
    --t-surface-ffffff: #FFFFFF;
    --t-surface-ffffff-a18: rgba(255, 255, 255, 0.18);
    --t-surface-ffffff-a92: rgba(255, 255, 255, 0.92);
    --t-surface-ffffff-a94: rgba(255, 255, 255, 0.94);
    --t-text-222222: #212323;
    --t-text-26354a: #23484D;
    --t-text-333333: #323434;
    --t-text-34445a: #31595D;
    --t-text-3f72c5: #3CB5C8;
    --t-text-526175: #4F7378;
    --t-text-5b8def: #58D6F2;
    --t-text-666666: #62696A;
    --t-text-677488: #65858A;
    --t-text-718096: #6E9499;
    --t-text-758196: #739398;
    --t-text-7a8798: #77969A;
    --t-text-7b8798: #78979B;
    --t-text-8792a2: #84A1A5;
    --t-text-8a95a5: #87A4A8;
    --t-text-9aa5b5: #97B4B8;
    --t-text-a0aabb: #9DBABE;
    --t-text-d7e5fa: #D6F5FA;
    --t-text-eaf2ff: #EAFCFF;
    --t-text-ffffff: #FFFFFF;
    --hm-text: #1E3E43;
    --hm-muted: #588085;
    --hm-glass: rgba(255, 255, 255, 0.72);
    --hm-glass-strong: rgba(255, 255, 255, 0.9);
    --hm-glass-border: rgba(255, 255, 255, 0.85);
    --hm-line: #DCEEF0;
    --hm-shadow: rgba(35, 72, 77, 0.10);
    --hm-shadow-strong: rgba(35, 72, 77, 0.18);
    --hm-dots: rgba(60, 181, 200, 0.16);
    --hm-blob-a: #7DEDF7;
    --hm-blue: #3CB5C8;
    --pa-315faf: #2F9DB1;
    --pa-3f72c5: #3CB5C8;
    --pa-4a80d8: #47C7DB;
    --pa-a9bef0: #A7E1F2;
    --pa-rgb-0f172a: 15, 36, 42;
    --pa-rgb-3f72c5: 60, 181, 200;
    --pa-rgb-4a80d8: 71, 199, 219;
}


:root[data-theme="dark"][data-palette="aurora"] { --legend-a: #5AFADF; --legend-b: #A78BFA; }
:root[data-theme="dark"][data-palette="inferno"] { --legend-a: #FFB347; --legend-b: #FF4D2E; }
:root[data-theme="dark"][data-palette="galaxy"] { --legend-a: #A5B4FC; --legend-b: #F0ABFC; }
:root[data-theme="dark"][data-palette="cyberpunk"] { --legend-a: #FF3EC8; --legend-b: #22E5FF; }
:root[data-theme="light"][data-palette="sakura"] { --legend-a: #E0457B; --legend-b: #F59EBB; }
:root[data-theme="light"][data-palette="lagoon"] { --legend-a: #0E9FB5; --legend-b: #2BC7A0; }

/* The page shows through behind the content. */
:root[data-legend] body {
    background-color: transparent;
}

:root[data-legend] .startingtitle {
    background: linear-gradient(90deg, var(--legend-a), var(--legend-b), var(--legend-a));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: legend-title 6s linear infinite;
}

@keyframes legend-title {
    to { background-position: -200% 0; }
}

.legend-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.legend-bg i,
.legend-bg b,
.legend-bg span {
    position: absolute;
    display: block;
}

/* ---------- Galaxy ---------- */

.legend-bg.is-galaxy {
    background:
        radial-gradient(ellipse 60% 45% at 18% 12%, rgba(120, 90, 255, 0.32), transparent 70%),
        radial-gradient(ellipse 55% 50% at 88% 78%, rgba(240, 80, 210, 0.2), transparent 70%),
        radial-gradient(ellipse 70% 60% at 50% 50%, rgba(40, 60, 170, 0.22), transparent 75%);
}

.is-galaxy i {
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 0 6px rgba(200, 210, 255, 0.9);
    animation: legend-twinkle var(--t) ease-in-out var(--d) infinite;
}

.is-galaxy b {
    top: var(--y);
    left: var(--x);
    width: 140px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), transparent);
    transform: rotate(-24deg);
    opacity: 0;
    animation: legend-shoot 9s ease-in var(--d) infinite;
}

@keyframes legend-twinkle {
    0%, 100% { opacity: 0.25; transform: scale(0.7); }
    50% { opacity: 1; transform: scale(1.15); }
}

@keyframes legend-shoot {
    0%, 88% { opacity: 0; transform: rotate(-24deg) translateX(0); }
    90% { opacity: 1; }
    100% { opacity: 0; transform: rotate(-24deg) translateX(-420px); }
}

/* ---------- Inferno ---------- */

.legend-bg.is-inferno {
    background:
        radial-gradient(ellipse 80% 45% at 50% 115%, rgba(255, 96, 20, 0.42), transparent 70%),
        radial-gradient(ellipse 40% 35% at 8% 105%, rgba(255, 160, 40, 0.22), transparent 70%),
        radial-gradient(ellipse 40% 35% at 94% 105%, rgba(255, 60, 30, 0.22), transparent 70%);
}

.is-inferno i {
    left: var(--x);
    bottom: -12px;
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    background: radial-gradient(circle, #FFE29A, #FF8A1E 55%, rgba(255, 60, 0, 0));
    box-shadow: 0 0 10px rgba(255, 140, 30, 0.8);
    animation: legend-rise var(--t) linear var(--d) infinite;
}

@keyframes legend-rise {
    0% { opacity: 0; transform: translate(0, 0) scale(1); }
    10% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--drift), -105vh) scale(0.4); }
}

/* ---------- Cyberpunk ---------- */

.legend-bg.is-cyberpunk {
    background: linear-gradient(180deg, #0B0518 0%, #1B0830 45%, #3A0A4A 62%, #0B0518 63%);
}

.is-cyberpunk .legend-sun {
    left: 50%;
    top: 30%;
    width: min(46vw, 420px);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        repeating-linear-gradient(180deg, transparent 0 56%, #0B0518 56% 60%, transparent 60% 66%, #0B0518 66% 70%, transparent 70% 76%, #0B0518 76% 81%, transparent 81%),
        linear-gradient(180deg, #FFD23F, #FF3EC8 70%);
    box-shadow: 0 0 80px rgba(255, 62, 200, 0.55);
    transform: translateX(-50%);
    opacity: 0.6;
}

.is-cyberpunk .legend-grid {
    left: -50%;
    right: -50%;
    bottom: 0;
    height: 38%;
    overflow: hidden;
    background: none;
    transform: perspective(320px) rotateX(62deg);
    transform-origin: 50% 0;
    mask-image: linear-gradient(180deg, transparent, #000 35%);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 35%);
}

/* The lines live on a taller inner layer that slides (GPU only). */
.is-cyberpunk .legend-grid::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -60px;
    bottom: 0;
    background-image:
        linear-gradient(rgba(34, 229, 255, 0.55) 2px, transparent 2px),
        linear-gradient(90deg, rgba(255, 62, 200, 0.55) 2px, transparent 2px);
    background-size: 60px 60px;
    animation: legend-grid 1.6s linear infinite;
    will-change: transform;
}

.is-cyberpunk .legend-scan {
    inset: 0;
    background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
}

@keyframes legend-grid {
    from { transform: translateY(0); }
    to { transform: translateY(60px); }
}

/* ---------- Aurora ---------- */

.legend-bg.is-aurora {
    background: linear-gradient(180deg, #04131A 0%, #0A1F24 60%, #0D1A20 100%);
}

.is-aurora .legend-ribbon {
    left: -20%;
    width: 140%;
    height: 42%;
    border-radius: 50%;
    filter: blur(48px);
    opacity: 0.5;
    mix-blend-mode: screen;
    animation: legend-wave var(--t) ease-in-out var(--d) infinite alternate;
}

.is-aurora .legend-ribbon:nth-of-type(1) { top: 2%; background: linear-gradient(90deg, transparent, #22F2B0, #2DD4BF, transparent); }
.is-aurora .legend-ribbon:nth-of-type(2) { top: 14%; background: linear-gradient(90deg, transparent, #34D399, #818CF8, transparent); }
.is-aurora .legend-ribbon:nth-of-type(3) { top: 26%; background: linear-gradient(90deg, transparent, #A78BFA, #22D3EE, transparent); opacity: 0.35; }

.is-aurora i {
    left: var(--x);
    top: var(--y);
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    background: #E6FFFA;
    animation: legend-twinkle var(--t) ease-in-out var(--d) infinite;
}

@keyframes legend-wave {
    0% { transform: translateX(-6%) skewY(-4deg) scaleY(0.8); }
    50% { transform: translateX(4%) skewY(3deg) scaleY(1.1); }
    100% { transform: translateX(8%) skewY(-2deg) scaleY(0.9); }
}

/* ---------- Sakura ---------- */

.legend-bg.is-sakura {
    background:
        radial-gradient(ellipse 60% 40% at 85% 0%, rgba(255, 182, 210, 0.55), transparent 70%),
        radial-gradient(ellipse 50% 40% at 0% 100%, rgba(255, 210, 225, 0.6), transparent 70%);
}

.is-sakura i {
    left: var(--x);
    top: -24px;
    width: var(--s);
    height: calc(var(--s) * 0.8);
    border-radius: 85% 0 85% 0;
    background: linear-gradient(135deg, #FFD1E1, #F48FB1);
    opacity: 0.85;
    animation: legend-fall var(--t) linear var(--d) infinite;
}

@keyframes legend-fall {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(calc(var(--drift) * 0.5), 28vh) rotate(140deg); }
    50% { transform: translate(var(--drift), 55vh) rotate(260deg); }
    75% { transform: translate(calc(var(--drift) * 0.4), 80vh) rotate(380deg); }
    100% { transform: translate(var(--drift), 108vh) rotate(520deg); }
}

/* ---------- Lagoon ---------- */

.legend-bg.is-lagoon {
    background:
        linear-gradient(180deg, rgba(186, 244, 255, 0.55), rgba(140, 226, 230, 0.25) 60%, rgba(120, 214, 200, 0.35));
}

.is-lagoon .legend-rays {
    left: 50%;
    top: -30%;
    width: 160vmax;
    height: 160vmax;
    background: repeating-conic-gradient(from 160deg at 50% 0%, rgba(255, 255, 255, 0.45) 0deg 4deg, transparent 4deg 13deg);
    mask-image: radial-gradient(circle at 50% 0%, #000, transparent 60%);
    -webkit-mask-image: radial-gradient(circle at 50% 0%, #000, transparent 60%);
    transform: translateX(-50%);
    transform-origin: 50% 0;
    opacity: 0.55;
    animation: legend-sway 14s ease-in-out infinite alternate;
}

.is-lagoon i {
    left: var(--x);
    bottom: -20px;
    width: var(--s);
    height: var(--s);
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.08) 45%, transparent 70%);
    animation: legend-rise var(--t) ease-in var(--d) infinite;
}

@keyframes legend-sway {
    from { transform: translateX(-50%) rotate(-6deg); }
    to { transform: translateX(-50%) rotate(6deg); }
}

@media (prefers-reduced-motion: reduce) {

    .legend-bg *,
    .legend-bg *::before,
    :root[data-legend] .startingtitle {
        animation: none !important;
    }

    .is-inferno i,
    .is-sakura i,
    .is-lagoon i,
    .is-galaxy b {
        display: none !important;
    }

}


/* ---------- Picker: the Legendary group ---------- */

.palette-group.is-legendary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.legend-option {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 12px;
    background: var(--t-surface-ffffff);
    color: var(--t-text-26354a);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.legend-option:hover {
    transform: translateY(-2px);
    border-color: var(--t-border-5b8def);
    box-shadow: 0 8px 20px var(--t-shadow-26354a-a12);
}

.legend-option.active {
    border-color: var(--t-border-3f72c5);
    box-shadow: 0 0 0 3px var(--t-shadow-3f72c5-a25);
}

.legend-preview {
    position: relative;
    height: 54px;
    overflow: hidden;
    border-radius: 8px;
}

.legend-preview .legend-bg {
    position: absolute;
    z-index: 0;
}

.legend-preview.is-galaxy,
.legend-preview.is-aurora,
.legend-preview.is-inferno,
.legend-preview.is-cyberpunk { background: #0B0E16; }
.legend-preview.is-galaxy { background: #0E0B22; }
.legend-preview.is-inferno { background: #1C0D08; }
.legend-preview.is-sakura { background: #FFF0F5; }
.legend-preview.is-lagoon { background: #E6FBFF; }

.legend-preview .is-cyberpunk .legend-sun {
    top: 18%;
    width: 46px;
}

.legend-preview .is-cyberpunk .legend-grid::before {
    background-size: 14px 14px;
}

.legend-option-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 0 2px 2px;
    font-size: 12.5px;
    font-weight: 800;
}

.legend-price {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #B7861A;
    font-size: 11px;
    font-weight: 800;
}

.legend-price svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.legend-option.is-owned .legend-price {
    color: var(--t-text-2e8d4b);
}

.legend-option.is-locked .legend-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(10, 12, 18, 0.35) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E") center / 20px no-repeat;
}

.legend-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 6px;
    padding: 2px 9px;
    border-radius: 999px;
    background: linear-gradient(90deg, #F5C451, #E58A1F);
    color: #3B2300;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Buy dialog */
.legend-dialog .legend-preview {
    height: 130px;
    margin-bottom: 14px;
    border-radius: 12px;
}

.legend-dialog .legend-cost {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin: -8px 0 18px;
    font-size: 13px;
    color: var(--t-text-7b8798);
}

.legend-dialog .legend-cost strong {
    display: block;
    color: var(--t-text-26354a);
    font-size: 18px;
}

.legend-dialog .legend-cost .is-short {
    color: var(--t-text-d93636);
}

.legend-dialog .legend-preview {
    display: block;
}

.legend-dialog a.wb-button {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.legend-option .legend-preview {
    display: block;
}


/* Previews in the palette menu only move while the menu is open. */
.palette-picker:not(.open) .legend-preview *,
.palette-picker:not(.open) .legend-preview *::before {
    animation-play-state: paused !important;
}

/* Lighter on phones and small screens: fewer particles, softer effects. */
@media (max-width: 760px), (pointer: coarse) {

    body > .legend-bg i:nth-of-type(2n) {
        display: none;
    }

    .is-aurora .legend-ribbon {
        filter: blur(28px);
        mix-blend-mode: normal;
    }

    .is-aurora .legend-ribbon:nth-of-type(3) {
        display: none;
    }

    .is-lagoon .legend-rays {
        animation: none;
    }

}


/* ==========================================
   STUDY TIMER
========================================== */

.fc-layout {
    --fc-tone: var(--t-text-3f72c5);
    max-width: 1080px;
    margin: 18px auto 70px;
    padding: 0 24px;
    box-sizing: border-box;
    color: var(--t-text-26354a);
}

body[data-focus-mode="short"] .fc-layout { --fc-tone: #2E9E6A; }
body[data-focus-mode="long"] .fc-layout { --fc-tone: #8A5CD6; }

.fc-layout svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fc-head h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.fc-head p {
    margin: 6px 0 18px;
    color: var(--t-text-7b8798);
    font-size: 15px;
}

.fc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.fc-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.fc-card {
    padding: 20px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 20px;
    background: var(--t-surface-ffffff);
    box-shadow: 0 10px 28px var(--t-shadow-26354a-a08);
    animation: qz-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fc-card h2 {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 800;
}

.fc-timer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.fc-modes {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: var(--t-surface-f3f6fa);
}

.fc-mode {
    padding: 8px 14px;
    border: none;
    border-radius: 10px;
    background: none;
    color: var(--t-text-526175);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.fc-mode.is-active {
    background: var(--t-surface-ffffff);
    color: var(--fc-tone);
    box-shadow: 0 2px 8px var(--t-shadow-26354a-a10);
}

.fc-ring-wrap {
    position: relative;
    width: min(300px, 72vw);
    aspect-ratio: 1;
}

.fc-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.fc-ring-track {
    stroke: var(--t-border-e3e9f2);
    stroke-width: 12;
}

.fc-ring-bar {
    stroke: var(--fc-tone);
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s linear, stroke 0.4s ease;
    filter: drop-shadow(0 0 6px color-mix(in srgb, var(--fc-tone) 45%, transparent));
}

.fc-time {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.fc-time strong {
    font-size: clamp(46px, 11vw, 64px);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.fc-time span {
    color: var(--fc-tone);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fc-dots {
    display: flex;
    gap: 8px;
}

.fc-dots i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--t-border-dce4f0);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.fc-dots i.is-done {
    background: var(--fc-tone);
}

.fc-dots i.is-now {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--fc-tone) 30%, transparent);
    transform: scale(1.15);
}

.fc-subject {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: min(100%, 360px);
    color: var(--t-text-7b8798);
    font-size: 12.5px;
    font-weight: 700;
}

.fc-subject input,
.fc-settings input[type="number"] {
    padding: 10px 12px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 11px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-26354a);
    font: inherit;
    font-size: 14.5px;
}

.fc-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fc-start {
    min-width: 150px;
    padding: 14px 28px;
    border: none;
    border-radius: 999px;
    background: var(--fc-tone);
    color: #FFFFFF;
    font: inherit;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--fc-tone) 35%, transparent);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.4s ease;
}

.fc-start:active {
    transform: scale(0.96);
}

.fc-start.is-running {
    background: var(--t-surface-ffffff);
    color: var(--fc-tone);
    box-shadow: inset 0 0 0 2px var(--fc-tone);
}

.fc-icon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--t-border-dce4f0);
    border-radius: 50%;
    background: var(--t-surface-ffffff);
    color: var(--t-text-526175);
    cursor: pointer;
}

.fc-icon-button svg {
    width: 20px;
    height: 20px;
}

.fc-icon-button:hover {
    color: var(--fc-tone);
    border-color: var(--fc-tone);
}

.fc-settings {
    width: 100%;
    border-top: 1px solid var(--t-border-e3e9f2);
    padding-top: 12px;
    color: var(--t-text-526175);
    font-size: 14px;
}

.fc-settings summary {
    cursor: pointer;
    font-weight: 800;
}

.fc-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.fc-settings-grid label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 700;
}

.fc-settings-grid label span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fc-settings input[type="number"] {
    width: 70px;
    padding: 7px 9px;
}

.fc-settings-grid .fc-check {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.fc-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.fc-stats div {
    display: flex;
    flex-direction: column;
    padding: 12px;
    border-radius: 14px;
    background: var(--t-surface-f7f9fc);
    color: var(--t-text-7b8798);
    font-size: 12px;
    font-weight: 700;
}

.fc-stats strong {
    color: var(--t-text-26354a);
    font-size: 19px;
}

.fc-chart {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    height: 130px;
}

.fc-bar {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
}

.fc-bar-fill {
    width: 100%;
    height: var(--h);
    min-height: 4px;
    border-radius: 8px 8px 4px 4px;
    background: color-mix(in srgb, var(--t-text-3f72c5) 35%, transparent);
    transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.fc-bar.is-today .fc-bar-fill {
    background: var(--t-text-3f72c5);
}

.fc-bar small {
    color: var(--t-text-9aa5b5);
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
}

.fc-board {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.fc-board li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 12px;
    background: var(--t-surface-f7f9fc);
    font-size: 14px;
}

.fc-board li.is-me {
    box-shadow: inset 0 0 0 2px var(--t-border-5b8def);
}

.fc-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--t-surface-eaf2ff);
    color: var(--t-text-3f72c5);
    font-size: 12px;
    font-weight: 800;
}

.fc-board li:nth-child(1) .fc-rank { background: #FDE68A; color: #92400E; }
.fc-board li:nth-child(2) .fc-rank { background: #E5E7EB; color: #374151; }
.fc-board li:nth-child(3) .fc-rank { background: #FED7AA; color: #9A3412; }

.fc-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.fc-board-empty {
    color: var(--t-text-7b8798);
    justify-content: center;
}

@media (max-width: 860px) {

    .fc-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 520px) {

    .fc-layout {
        padding: 0 16px;
    }

    .fc-settings-grid {
        grid-template-columns: 1fr 1fr;
    }

}

@media (prefers-reduced-motion: reduce) {
    .fc-card,
    .fc-ring-bar,
    .fc-bar-fill {
        animation: none;
        transition: none;
    }
}

/* Admin overview tiles jump to their section when clicked. */
.adm-stat[data-goto] {
    cursor: pointer;
}

.adm-stat[data-goto]:hover,
.adm-stat[data-goto]:focus-visible {
    filter: brightness(1.04);
    outline: 2px solid var(--tone);
    outline-offset: 2px;
}

/* Leaves room for the top bar when a section is jumped to. */
.admin-page .adm-card {
    scroll-margin-top: 90px;
}
