/* ============================================================
   ICARISE — design system v3
   A 66-day self-improvement journey.
   Dark (default) + light themes. Mobile-first.
   ============================================================ */

/* ---------- Fonts (bundled, works offline) ---------- */
@font-face { font-family: 'Manrope'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/manrope-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/manrope-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 600; font-style: normal; font-display: swap; src: url('../fonts/manrope-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/manrope-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-weight: 800; font-style: normal; font-display: swap; src: url('../fonts/manrope-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/instrument-serif-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-weight: 400; font-style: italic; font-display: swap; src: url('../fonts/instrument-serif-latin-400-italic.woff2') format('woff2'); }

/* Animatable number for progress rings */
@property --rp { syntax: '<number>'; inherits: false; initial-value: 0; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

/* ---------- Theme tokens ---------- */
:root {
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

/*THEMES:START — generated by tools/themes-gen.js, do not edit by hand*/
html { --page:#0D090B; }
html[data-theme="light"] { --page:#E2D3CB; }

/* Crimson (default) */
.scr {
  --bg:#1D1517;
  --bg2:#171012;
  --s1:#281D20;
  --s2:#33262A;
  --s3:#3E2E33;
  --line:#4D3B40;
  --soft:rgba(255,255,255,.09);
  --tx:#F8F0EC;
  --tx2:#D0BEB9;
  --tx3:#B3A19D;
  --red:#FF2E52;
  --red2:#E01B40;
  --hi:#FF8A9B;
  --onred:#FFFFFF;
  --tint:rgba(255,46,82,0.24);
  --tint2:rgba(255,46,82,0.14);
  --gold:#E9B44C;
  --goldf:#E9B44C;
  --ongold:#2A1B05;
  --goldt:rgba(233,180,76,0.16);
  --gold2:#A88237;
  --c1:#F4714F;
  --c2:#FF2E52;
  --c3:#EDC26C;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#531B25 0%,#281D20 58%);
  --scrim:rgba(9,6,7,0.66);
  --glow:0 10px 28px -8px rgba(255,46,82,0.75);
  --shadow:0 16px 36px -14px rgba(0,0,0,.7);
  --glowbg:rgba(255,46,82,0.4);
  --good:#7FD6A0;
  --heroA:rgba(233,180,76,0.3);
  --heroB:rgba(233,180,76,0.2);
  --heroC:rgba(233,180,76,0.18);
  --heroTop:#2C2224;
  --heroBot:#1D1517;
  --hexa:#F1CE8B;
  --hexb:#B68C3B;
  --av1:#FF6982;
  --av2:#941B30;
  --tx2h:#EFEFEF;
  --tx3h:#D6D5D5;
  --lineh:#777374;
  --softh:rgba(255,255,255,.2);
  font-family: 'Manrope', system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--tx); background: var(--bg);
  -webkit-font-smoothing: antialiased; line-height: 1.4;
}
.scr.light, html[data-theme="light"] .scr {
  --bg:#F7F0EB;
  --bg2:#ECE5E0;
  --s1:#FFFFFF;
  --s2:#F3E9E4;
  --s3:#E8DAD4;
  --line:#D9C6BF;
  --soft:rgba(49,48,47,0.1);
  --tx:#241719;
  --tx2:#58424A;
  --tx3:#6F565B;
  --red:#E01540;
  --red2:#B8122F;
  --hi:#C01030;
  --onred:#FFFFFF;
  --tint:rgba(224,21,64,0.16);
  --tint2:rgba(224,21,64,0.09);
  --gold:#80632B;
  --goldf:#EDB84F;
  --ongold:#2A1B05;
  --goldt:rgba(237,184,79,0.17);
  --gold2:#AB8439;
  --c1:#E76748;
  --c2:#E01540;
  --c3:#EDB84F;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#FBE1E6 0%,#FFFFFF 62%);
  --scrim:rgba(37,36,35,0.5);
  --glow:0 10px 24px -10px rgba(224,21,64,0.6);
  --shadow:0 16px 34px -16px rgba(49,48,47,0.35);
  --glowbg:rgba(224,21,64,0.18);
  --good:#1E8A52;
  --heroA:rgba(237,184,79,0.45);
  --heroB:rgba(237,184,79,0.22);
  --heroC:rgba(237,184,79,0.2);
  --heroTop:#F4D6D6;
  --heroBot:#F7F0EB;
  --hexa:#F3D18D;
  --hexb:#B9903E;
  --av1:#E95775;
  --av2:#820C25;
  --tx2h:#2A2928;
  --tx3h:#3B3A38;
  --lineh:#999592;
  --softh:rgba(49,48,47,0.22);
}

/* Sunset — inspired by Sunset Boulevard */
html[data-palette="sunset"] { --page:#0C1316; }
html[data-palette="sunset"][data-theme="light"] { --page:#E7DFD4; }
html[data-palette="sunset"] .scr {
  --bg:#1B2A31;
  --bg2:#152126;
  --s1:#26353B;
  --s2:#323F46;
  --s3:#3D4A50;
  --line:#525D62;
  --soft:rgba(255,255,255,.09);
  --tx:#F1F2F3;
  --tx2:#C8CCCE;
  --tx3:#B1B7B9;
  --red:#E76F51;
  --red2:#C25D44;
  --hi:#EC8F77;
  --onred:#16100F;
  --tint:rgba(231,111,81,0.24);
  --tint2:rgba(231,111,81,0.14);
  --gold:#E9C46A;
  --goldf:#E9C46A;
  --ongold:#2A1B05;
  --goldt:rgba(233,196,106,0.16);
  --gold2:#A88D4C;
  --c1:#E89A5E;
  --c2:#E76F51;
  --c3:#EDCF85;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#4C3B39 0%,#26353B 58%);
  --scrim:rgba(8,13,15,0.66);
  --glow:0 10px 28px -8px rgba(231,111,81,0.75);
  --shadow:0 16px 36px -14px rgba(0,0,0,.7);
  --glowbg:rgba(231,111,81,0.4);
  --good:#7FD6A0;
  --heroA:rgba(233,196,106,0.3);
  --heroB:rgba(244,162,97,0.2);
  --heroC:rgba(233,196,106,0.18);
  --heroTop:#2A393F;
  --heroBot:#1B2A31;
  --hexa:#F1D99E;
  --hexb:#B69953;
  --av1:#EE9782;
  --av2:#86402F;
  --tx2h:#EFF0F1;
  --tx3h:#D6D9DA;
  --lineh:#767F83;
  --softh:rgba(255,255,255,.2);
}
html[data-palette="sunset"][data-theme="light"] .scr, html[data-palette="sunset"] .scr.light {
  --bg:#FBF2E6;
  --bg2:#F0E7DC;
  --s1:#FFFFFF;
  --s2:#F3EBDF;
  --s3:#E6DDD2;
  --line:#D0C9BF;
  --soft:rgba(50,48,46,0.1);
  --tx:#171615;
  --tx2:#4B4945;
  --tx3:#64615C;
  --red:#D4552F;
  --red2:#B24727;
  --hi:#B24727;
  --onred:#16100F;
  --tint:rgba(212,85,47,0.16);
  --tint2:rgba(212,85,47,0.09);
  --gold:#796637;
  --goldf:#E9C46A;
  --ongold:#2A1B05;
  --goldt:rgba(233,196,106,0.17);
  --gold2:#A88D4C;
  --c1:#DF8D4D;
  --c2:#D4552F;
  --c3:#E9C46A;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#F9E9E4 0%,#FFFFFF 62%);
  --scrim:rgba(38,36,35,0.5);
  --glow:0 10px 24px -10px rgba(212,85,47,0.6);
  --shadow:0 16px 34px -16px rgba(50,48,46,0.35);
  --glowbg:rgba(212,85,47,0.18);
  --good:#1E8A52;
  --heroA:rgba(233,196,106,0.45);
  --heroB:rgba(244,162,97,0.22);
  --heroC:rgba(233,196,106,0.2);
  --heroTop:#F6DFD0;
  --heroBot:#FBF2E6;
  --hexa:#F1D99E;
  --hexb:#B69953;
  --av1:#E08569;
  --av2:#7B311B;
  --tx2h:#2B2927;
  --tx3h:#3C3A37;
  --lineh:#9C968F;
  --softh:rgba(50,48,46,0.22);
}

/* Ocean — inspired by Ocean Depths */
html[data-palette="ocean"] { --page:#0C1016; }
html[data-palette="ocean"][data-theme="light"] { --page:#DEE6DB; }
html[data-palette="ocean"] .scr {
  --bg:#1A2332;
  --bg2:#141B27;
  --s1:#252E3C;
  --s2:#313947;
  --s3:#3C4451;
  --line:#515863;
  --soft:rgba(255,255,255,.09);
  --tx:#F1F2F3;
  --tx2:#C8CACE;
  --tx3:#B1B4B9;
  --red:#2D9C9C;
  --red2:#268383;
  --hi:#57B0B0;
  --onred:#16100F;
  --tint:rgba(45,156,156,0.24);
  --tint2:rgba(45,156,156,0.14);
  --gold:#A8DADC;
  --goldf:#A8DADC;
  --ongold:#2A1B05;
  --goldt:rgba(168,218,220,0.16);
  --gold2:#799D9E;
  --c1:#6BBBBC;
  --c2:#2D9C9C;
  --c3:#B8E1E2;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#1F404B 0%,#252E3C 58%);
  --scrim:rgba(8,11,15,0.66);
  --glow:0 10px 28px -8px rgba(45,156,156,0.75);
  --shadow:0 16px 36px -14px rgba(0,0,0,.7);
  --glowbg:rgba(45,156,156,0.4);
  --good:#7FD6A0;
  --heroA:rgba(168,218,220,0.3);
  --heroB:rgba(168,218,220,0.2);
  --heroC:rgba(168,218,220,0.18);
  --heroTop:#293240;
  --heroBot:#1A2332;
  --hexa:#C6E7E8;
  --hexb:#83AAAC;
  --av1:#68B8B8;
  --av2:#1A5A5A;
  --tx2h:#EFF0F1;
  --tx3h:#D6D7DA;
  --lineh:#767B84;
  --softh:rgba(255,255,255,.2);
}
html[data-palette="ocean"][data-theme="light"] .scr, html[data-palette="ocean"] .scr.light {
  --bg:#F1FAEE;
  --bg2:#E6EFE3;
  --s1:#FFFFFF;
  --s2:#EAF3E7;
  --s3:#DDE5DA;
  --line:#C8D0C6;
  --soft:rgba(48,50,48,0.1);
  --tx:#161715;
  --tx2:#484B47;
  --tx3:#60645F;
  --red:#237F7F;
  --red2:#1E6D6D;
  --hi:#217777;
  --onred:#FFFFFF;
  --tint:rgba(35,127,127,0.16);
  --tint2:rgba(35,127,127,0.09);
  --gold:#577172;
  --goldf:#A8DADC;
  --ongold:#2A1B05;
  --goldt:rgba(168,218,220,0.17);
  --gold2:#799D9E;
  --c1:#66ADAE;
  --c2:#237F7F;
  --c3:#A8DADC;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#E2EEEE 0%,#FFFFFF 62%);
  --scrim:rgba(36,38,36,0.5);
  --glow:0 10px 24px -10px rgba(35,127,127,0.6);
  --shadow:0 16px 34px -16px rgba(48,50,48,0.35);
  --glowbg:rgba(35,127,127,0.18);
  --good:#1E8A52;
  --heroA:rgba(168,218,220,0.45);
  --heroB:rgba(168,218,220,0.22);
  --heroC:rgba(168,218,220,0.2);
  --heroTop:#D8EBE1;
  --heroBot:#F1FAEE;
  --hexa:#C6E7E8;
  --hexb:#83AAAC;
  --av1:#61A3A3;
  --av2:#144A4A;
  --tx2h:#292B28;
  --tx3h:#3A3C39;
  --lineh:#959B94;
  --softh:rgba(48,50,48,0.22);
}

/* Forest — inspired by Forest Canopy */
html[data-palette="forest"] { --page:#0A0E0C; }
html[data-palette="forest"][data-theme="light"] { --page:#E0E0D7; }
html[data-palette="forest"] .scr {
  --bg:#16201A;
  --bg2:#111914;
  --s1:#222B25;
  --s2:#2D3631;
  --s3:#39413C;
  --line:#4E5651;
  --soft:rgba(255,255,255,.09);
  --tx:#F1F2F1;
  --tx2:#C7C9C8;
  --tx3:#B0B3B1;
  --red:#7DB36A;
  --red2:#699659;
  --hi:#7DB36A;
  --onred:#16100F;
  --tint:rgba(125,179,106,0.24);
  --tint2:rgba(125,179,106,0.14);
  --gold:#D2C37C;
  --goldf:#D2C37C;
  --ongold:#2A1B05;
  --goldt:rgba(210,195,124,0.16);
  --gold2:#978C59;
  --c1:#A8BB73;
  --c2:#7DB36A;
  --c3:#DACE94;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#2F432D 0%,#222B25 58%);
  --scrim:rgba(7,10,8,0.66);
  --glow:0 10px 28px -8px rgba(125,179,106,0.75);
  --shadow:0 16px 36px -14px rgba(0,0,0,.7);
  --glowbg:rgba(125,179,106,0.4);
  --good:#7FD6A0;
  --heroA:rgba(210,195,124,0.3);
  --heroB:rgba(210,195,124,0.2);
  --heroC:rgba(210,195,124,0.18);
  --heroTop:#262F29;
  --heroBot:#16201A;
  --hexa:#E2D8AA;
  --hexb:#A49861;
  --av1:#A1C894;
  --av2:#49683D;
  --tx2h:#EFEFEF;
  --tx3h:#D5D7D6;
  --lineh:#737976;
  --softh:rgba(255,255,255,.2);
}
html[data-palette="forest"][data-theme="light"] .scr, html[data-palette="forest"] .scr.light {
  --bg:#F4F3EA;
  --bg2:#E9E8DF;
  --s1:#FFFFFF;
  --s2:#EDECE3;
  --s3:#DFDED6;
  --line:#CBCAC2;
  --soft:rgba(49,49,47,0.1);
  --tx:#161615;
  --tx2:#494946;
  --tx3:#62615E;
  --red:#2D4A2B;
  --red2:#274025;
  --hi:#2D4A2B;
  --onred:#FFFFFF;
  --tint:rgba(45,74,43,0.16);
  --tint2:rgba(45,74,43,0.09);
  --gold:#666B53;
  --goldf:#A4AC86;
  --ongold:#2A1B05;
  --goldt:rgba(164,172,134,0.17);
  --gold2:#767C60;
  --c1:#697B59;
  --c2:#2D4A2B;
  --c3:#A4AC86;
  --on1:#FFFFFF;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#E4E7E3 0%,#FFFFFF 62%);
  --scrim:rgba(37,36,35,0.5);
  --glow:0 10px 24px -10px rgba(45,74,43,0.6);
  --shadow:0 16px 34px -16px rgba(49,49,47,0.35);
  --glowbg:rgba(45,74,43,0.18);
  --good:#1E8A52;
  --heroA:rgba(164,172,134,0.45);
  --heroB:rgba(164,172,134,0.22);
  --heroC:rgba(164,172,134,0.2);
  --heroTop:#DCDFD3;
  --heroBot:#F4F3EA;
  --hexa:#C4C9B0;
  --hexb:#808669;
  --av1:#687D66;
  --av2:#1A2B19;
  --tx2h:#292928;
  --tx3h:#3B3A38;
  --lineh:#979791;
  --softh:rgba(49,49,47,0.22);
}

/* Golden Hour — inspired by Golden Hour */
html[data-palette="golden"] { --page:#100D0A; }
html[data-palette="golden"][data-theme="light"] { --page:#E4DCD0; }
html[data-palette="golden"] .scr {
  --bg:#241C17;
  --bg2:#1C1612;
  --s1:#2F2723;
  --s2:#3A332E;
  --s3:#453E3A;
  --line:#59524F;
  --soft:rgba(255,255,255,.09);
  --tx:#F2F1F1;
  --tx2:#CAC9C7;
  --tx3:#B5B2B0;
  --red:#F4A900;
  --red2:#CD8E00;
  --hi:#F4A900;
  --onred:#16100F;
  --tint:rgba(244,169,0,0.24);
  --tint2:rgba(244,169,0,0.14);
  --gold:#D98A8E;
  --goldf:#D98A8E;
  --ongold:#2A1B05;
  --goldt:rgba(217,138,142,0.16);
  --gold2:#9C6366;
  --c1:#E79A47;
  --c2:#F4A900;
  --c3:#E09FA2;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#563E11 0%,#2F2723 58%);
  --scrim:rgba(11,8,7,0.66);
  --glow:0 10px 28px -8px rgba(244,169,0,0.75);
  --shadow:0 16px 36px -14px rgba(0,0,0,.7);
  --glowbg:rgba(244,169,0,0.4);
  --good:#7FD6A0;
  --heroA:rgba(217,138,142,0.3);
  --heroB:rgba(217,138,142,0.2);
  --heroC:rgba(217,138,142,0.18);
  --heroTop:#332B27;
  --heroBot:#241C17;
  --hexa:#E6B3B6;
  --hexb:#A96C6F;
  --av1:#F7C147;
  --av2:#8E6200;
  --tx2h:#F0EFEF;
  --tx3h:#D8D6D5;
  --lineh:#7C7774;
  --softh:rgba(255,255,255,.2);
}
html[data-palette="golden"][data-theme="light"] .scr, html[data-palette="golden"] .scr.light {
  --bg:#F8EFE2;
  --bg2:#EDE4D8;
  --s1:#FFFFFF;
  --s2:#F1E8DB;
  --s3:#E3DBCF;
  --line:#CEC6BC;
  --soft:rgba(50,48,45,0.1);
  --tx:#161614;
  --tx2:#4A4844;
  --tx3:#63605A;
  --red:#E29A00;
  --red2:#BE8100;
  --hi:#8C5F00;
  --onred:#16100F;
  --tint:rgba(226,154,0,0.16);
  --tint2:rgba(226,154,0,0.09);
  --gold:#9A5256;
  --goldf:#C1666B;
  --ongold:#16100F;
  --goldt:rgba(193,102,107,0.17);
  --gold2:#8B494D;
  --c1:#D28036;
  --c2:#E29A00;
  --c3:#C1666B;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#FBF2DE 0%,#FFFFFF 62%);
  --scrim:rgba(37,36,34,0.5);
  --glow:0 10px 24px -10px rgba(226,154,0,0.6);
  --shadow:0 16px 34px -16px rgba(50,48,45,0.35);
  --glowbg:rgba(226,154,0,0.18);
  --good:#1E8A52;
  --heroA:rgba(193,102,107,0.45);
  --heroB:rgba(193,102,107,0.22);
  --heroC:rgba(193,102,107,0.2);
  --heroTop:#F5E5C7;
  --heroBot:#F8EFE2;
  --hexa:#D79C9F;
  --hexb:#975053;
  --av1:#EAB647;
  --av2:#835900;
  --tx2h:#2A2926;
  --tx3h:#3C3936;
  --lineh:#9A948C;
  --softh:rgba(50,48,45,0.22);
}

/* Arctic — inspired by Arctic Frost */
html[data-palette="arctic"] { --page:#0A0E13; }
html[data-palette="arctic"][data-theme="light"] { --page:#DEE2E8; }
html[data-palette="arctic"] .scr {
  --bg:#16202B;
  --bg2:#111922;
  --s1:#222B36;
  --s2:#2D3640;
  --s3:#39414B;
  --line:#4E565E;
  --soft:rgba(255,255,255,.09);
  --tx:#F1F2F2;
  --tx2:#C7C9CC;
  --tx3:#B0B3B7;
  --red:#6FA0DB;
  --red2:#5D86B8;
  --hi:#6FA0DB;
  --onred:#16100F;
  --tint:rgba(111,160,219,0.24);
  --tint2:rgba(111,160,219,0.14);
  --gold:#D4E4F7;
  --goldf:#D4E4F7;
  --ongold:#2A1B05;
  --goldt:rgba(212,228,247,0.16);
  --gold2:#99A4B2;
  --c1:#A2C2E9;
  --c2:#6FA0DB;
  --c3:#DCE9F8;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#2B3F55 0%,#222B36 58%);
  --scrim:rgba(7,10,13,0.66);
  --glow:0 10px 28px -8px rgba(111,160,219,0.75);
  --shadow:0 16px 36px -14px rgba(0,0,0,.7);
  --glowbg:rgba(111,160,219,0.4);
  --good:#7FD6A0;
  --heroA:rgba(212,228,247,0.3);
  --heroB:rgba(212,228,247,0.2);
  --heroC:rgba(212,228,247,0.18);
  --heroTop:#262F3A;
  --heroBot:#16202B;
  --hexa:#E3EDFA;
  --hexb:#A5B2C1;
  --av1:#97BBE5;
  --av2:#405D7F;
  --tx2h:#EFEFF0;
  --tx3h:#D5D7D9;
  --lineh:#737980;
  --softh:rgba(255,255,255,.2);
}
html[data-palette="arctic"][data-theme="light"] .scr, html[data-palette="arctic"] .scr.light {
  --bg:#F1F6FC;
  --bg2:#E6EBF1;
  --s1:#FFFFFF;
  --s2:#EAEFF4;
  --s3:#DDE1E7;
  --line:#C8CCD1;
  --soft:rgba(48,49,50,0.1);
  --tx:#161617;
  --tx2:#484A4C;
  --tx3:#606265;
  --red:#4A6FA5;
  --red2:#405F8E;
  --hi:#496DA2;
  --onred:#FFFFFF;
  --tint:rgba(74,111,165,0.16);
  --tint2:rgba(74,111,165,0.09);
  --gold:#606D7D;
  --goldf:#8697AE;
  --ongold:#2A1B05;
  --goldt:rgba(134,151,174,0.17);
  --gold2:#606D7D;
  --c1:#6883AA;
  --c2:#4A6FA5;
  --c3:#8697AE;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#E7ECF3 0%,#FFFFFF 62%);
  --scrim:rgba(36,37,38,0.5);
  --glow:0 10px 24px -10px rgba(74,111,165,0.6);
  --shadow:0 16px 34px -16px rgba(48,49,50,0.35);
  --glowbg:rgba(74,111,165,0.18);
  --good:#1E8A52;
  --heroA:rgba(134,151,174,0.45);
  --heroB:rgba(134,151,174,0.22);
  --heroC:rgba(134,151,174,0.2);
  --heroTop:#DDE6F2;
  --heroBot:#F1F6FC;
  --hexa:#B0BBCA;
  --hexb:#697688;
  --av1:#7D97BE;
  --av2:#2B4060;
  --tx2h:#292A2B;
  --tx3h:#3A3B3C;
  --lineh:#95999C;
  --softh:rgba(48,49,50,0.22);
}

/* Desert Rose — inspired by Desert Rose */
html[data-palette="desert"] { --page:#110C0E; }
html[data-palette="desert"][data-theme="light"] { --page:#E2D9D1; }
html[data-palette="desert"] .scr {
  --bg:#261B20;
  --bg2:#1E1519;
  --s1:#31262B;
  --s2:#3C3236;
  --s3:#473D41;
  --line:#5A5256;
  --soft:rgba(255,255,255,.09);
  --tx:#F2F1F2;
  --tx2:#CBC8C9;
  --tx3:#B5B1B3;
  --red:#DE9EA2;
  --red2:#BA8588;
  --hi:#DE9EA2;
  --onred:#16100F;
  --tint:rgba(222,158,162,0.24);
  --tint2:rgba(222,158,162,0.14);
  --gold:#E8D5C4;
  --goldf:#E8D5C4;
  --ongold:#2A1B05;
  --goldt:rgba(232,213,196,0.16);
  --gold2:#A7998D;
  --c1:#E3BAB3;
  --c2:#DE9EA2;
  --c3:#ECDDCF;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#523A3F 0%,#31262B 58%);
  --scrim:rgba(11,8,10,0.66);
  --glow:0 10px 28px -8px rgba(222,158,162,0.75);
  --shadow:0 16px 36px -14px rgba(0,0,0,.7);
  --glowbg:rgba(222,158,162,0.4);
  --good:#7FD6A0;
  --heroA:rgba(232,213,196,0.3);
  --heroB:rgba(232,213,196,0.2);
  --heroC:rgba(232,213,196,0.18);
  --heroTop:#352A2F;
  --heroBot:#261B20;
  --hexa:#F0E4D9;
  --hexb:#B5A699;
  --av1:#E7B9BC;
  --av2:#815C5E;
  --tx2h:#F0EFEF;
  --tx3h:#D8D6D7;
  --lineh:#7D7679;
  --softh:rgba(255,255,255,.2);
}
html[data-palette="desert"][data-theme="light"] .scr, html[data-palette="desert"] .scr.light {
  --bg:#F6ECE3;
  --bg2:#EBE1D9;
  --s1:#FFFFFF;
  --s2:#EFE5DC;
  --s3:#E1D8D0;
  --line:#CCC4BC;
  --soft:rgba(49,47,45,0.1);
  --tx:#161514;
  --tx2:#4A4744;
  --tx3:#625E5B;
  --red:#B5596A;
  --red2:#9C4D5B;
  --hi:#9F4E5D;
  --onred:#FFFFFF;
  --tint:rgba(181,89,106,0.16);
  --tint2:rgba(181,89,106,0.09);
  --gold:#885D51;
  --goldf:#B87D6D;
  --ongold:#16100F;
  --goldt:rgba(184,125,109,0.17);
  --gold2:#845A4E;
  --c1:#B76B6C;
  --c2:#B5596A;
  --c3:#B87D6D;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#F5E9EC 0%,#FFFFFF 62%);
  --scrim:rgba(37,35,34,0.5);
  --glow:0 10px 24px -10px rgba(181,89,106,0.6);
  --shadow:0 16px 34px -16px rgba(49,47,45,0.35);
  --glowbg:rgba(181,89,106,0.18);
  --good:#1E8A52;
  --heroA:rgba(184,125,109,0.45);
  --heroB:rgba(184,125,109,0.22);
  --heroC:rgba(184,125,109,0.2);
  --heroTop:#EEDAD4;
  --heroBot:#F6ECE3;
  --hexa:#D1ABA0;
  --hexb:#906255;
  --av1:#CA8794;
  --av2:#69343D;
  --tx2h:#2A2827;
  --tx3h:#3B3936;
  --lineh:#99928D;
  --softh:rgba(49,47,45,0.22);
}

/* Botanical — inspired by Botanical Garden */
html[data-palette="botanical"] { --page:#0A0F0C; }
html[data-palette="botanical"][data-theme="light"] { --page:#E1E0DA; }
html[data-palette="botanical"] .scr {
  --bg:#17211B;
  --bg2:#121A15;
  --s1:#232C26;
  --s2:#2E3732;
  --s3:#3A423D;
  --line:#4F5652;
  --soft:rgba(255,255,255,.09);
  --tx:#F1F2F1;
  --tx2:#C7CAC8;
  --tx3:#B0B4B1;
  --red:#5CA878;
  --red2:#4D8D65;
  --hi:#66AD80;
  --onred:#16100F;
  --tint:rgba(92,168,120,0.24);
  --tint2:rgba(92,168,120,0.14);
  --gold:#F9A620;
  --goldf:#F9A620;
  --ongold:#2A1B05;
  --goldt:rgba(249,166,32,0.16);
  --gold2:#B37817;
  --c1:#ABA74C;
  --c2:#5CA878;
  --c3:#FAB648;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#284131 0%,#232C26 58%);
  --scrim:rgba(7,10,8,0.66);
  --glow:0 10px 28px -8px rgba(92,168,120,0.75);
  --shadow:0 16px 36px -14px rgba(0,0,0,.7);
  --glowbg:rgba(92,168,120,0.4);
  --good:#7FD6A0;
  --heroA:rgba(249,166,32,0.3);
  --heroB:rgba(249,166,32,0.2);
  --heroC:rgba(249,166,32,0.18);
  --heroTop:#27302A;
  --heroBot:#17211B;
  --hexa:#FBC56E;
  --hexb:#C28119;
  --av1:#8AC09E;
  --av2:#356146;
  --tx2h:#EFEFEF;
  --tx3h:#D5D7D6;
  --lineh:#747A76;
  --softh:rgba(255,255,255,.2);
}
html[data-palette="botanical"][data-theme="light"] .scr, html[data-palette="botanical"] .scr.light {
  --bg:#F5F3ED;
  --bg2:#EAE8E2;
  --s1:#FFFFFF;
  --s2:#EEECE6;
  --s3:#E0DED9;
  --line:#CBCAC5;
  --soft:rgba(49,49,47,0.1);
  --tx:#161615;
  --tx2:#4A4947;
  --tx3:#62615F;
  --red:#4A7C59;
  --red2:#406B4D;
  --hi:#467554;
  --onred:#FFFFFF;
  --tint:rgba(74,124,89,0.16);
  --tint2:rgba(74,124,89,0.09);
  --gold:#906013;
  --goldf:#F9A620;
  --ongold:#2A1B05;
  --goldt:rgba(249,166,32,0.17);
  --gold2:#B37817;
  --c1:#A2913D;
  --c2:#4A7C59;
  --c3:#F9A620;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#E7EEE9 0%,#FFFFFF 62%);
  --scrim:rgba(37,36,36,0.5);
  --glow:0 10px 24px -10px rgba(74,124,89,0.6);
  --shadow:0 16px 34px -16px rgba(49,49,47,0.35);
  --glowbg:rgba(74,124,89,0.18);
  --good:#1E8A52;
  --heroA:rgba(249,166,32,0.45);
  --heroB:rgba(249,166,32,0.22);
  --heroC:rgba(249,166,32,0.2);
  --heroTop:#E0E5DB;
  --heroBot:#F5F3ED;
  --hexa:#FBC56E;
  --hexb:#C28119;
  --av1:#7DA187;
  --av2:#2B4834;
  --tx2h:#2A2928;
  --tx3h:#3B3A39;
  --lineh:#989793;
  --softh:rgba(49,49,47,0.22);
}

/* Midnight Galaxy — inspired by Midnight Galaxy */
html[data-palette="galaxy"] { --page:#0D0A16; }
html[data-palette="galaxy"][data-theme="light"] { --page:#E0DDE6; }
html[data-palette="galaxy"] .scr {
  --bg:#1D1630;
  --bg2:#171125;
  --s1:#28223A;
  --s2:#342D45;
  --s3:#3F394F;
  --line:#534E62;
  --soft:rgba(255,255,255,.09);
  --tx:#F1F1F3;
  --tx2:#C9C7CD;
  --tx3:#B2B0B9;
  --red:#9C84EE;
  --red2:#836FC8;
  --hi:#A089EF;
  --onred:#16100F;
  --tint:rgba(156,132,238,0.24);
  --tint2:rgba(156,132,238,0.14);
  --gold:#CDBDF2;
  --goldf:#CDBDF2;
  --ongold:#2A1B05;
  --goldt:rgba(205,189,242,0.16);
  --gold2:#9488AE;
  --c1:#B5A1F0;
  --c2:#9C84EE;
  --c3:#D6C9F4;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#3B305E 0%,#28223A 58%);
  --scrim:rgba(9,7,14,0.66);
  --glow:0 10px 28px -8px rgba(156,132,238,0.75);
  --shadow:0 16px 36px -14px rgba(0,0,0,.7);
  --glowbg:rgba(156,132,238,0.4);
  --good:#7FD6A0;
  --heroA:rgba(205,189,242,0.3);
  --heroB:rgba(205,189,242,0.2);
  --heroC:rgba(205,189,242,0.18);
  --heroTop:#2C263E;
  --heroBot:#1D1630;
  --hexa:#DFD4F7;
  --hexb:#A093BD;
  --av1:#B8A6F3;
  --av2:#5A4D8A;
  --tx2h:#EFEFF1;
  --tx3h:#D6D5DA;
  --lineh:#777383;
  --softh:rgba(255,255,255,.2);
}
html[data-palette="galaxy"][data-theme="light"] .scr, html[data-palette="galaxy"] .scr.light {
  --bg:#F3F0FA;
  --bg2:#E8E5EF;
  --s1:#FFFFFF;
  --s2:#ECE9F3;
  --s3:#DEDCE5;
  --line:#CAC7D0;
  --soft:rgba(49,48,50,0.1);
  --tx:#161617;
  --tx2:#49484B;
  --tx3:#616064;
  --red:#5E52C9;
  --red2:#5147AD;
  --hi:#5E52C9;
  --onred:#FFFFFF;
  --tint:rgba(94,82,201,0.16);
  --tint2:rgba(94,82,201,0.09);
  --gold:#706284;
  --goldf:#A490C2;
  --ongold:#2A1B05;
  --goldt:rgba(164,144,194,0.17);
  --gold2:#76688C;
  --c1:#8171C6;
  --c2:#5E52C9;
  --c3:#A490C2;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#EAE9F8 0%,#FFFFFF 62%);
  --scrim:rgba(36,36,38,0.5);
  --glow:0 10px 24px -10px rgba(94,82,201,0.6);
  --shadow:0 16px 34px -16px rgba(49,48,50,0.35);
  --glowbg:rgba(94,82,201,0.18);
  --good:#1E8A52;
  --heroA:rgba(164,144,194,0.45);
  --heroB:rgba(164,144,194,0.22);
  --heroC:rgba(164,144,194,0.2);
  --heroTop:#E1DDF4;
  --heroBot:#F3F0FA;
  --hexa:#C4B7D7;
  --hexb:#807097;
  --av1:#8B82D8;
  --av2:#373075;
  --tx2h:#29292B;
  --tx3h:#3A3A3C;
  --lineh:#97959B;
  --softh:rgba(49,48,50,0.22);
}

/* Minimal — inspired by Modern Minimalist */
html[data-palette="minimal"] { --page:#0C0E0F; }
html[data-palette="minimal"][data-theme="light"] { --page:#E0E1E2; }
html[data-palette="minimal"] .scr {
  --bg:#1A1E21;
  --bg2:#14171A;
  --s1:#25292C;
  --s2:#313537;
  --s3:#3C4042;
  --line:#515456;
  --soft:rgba(255,255,255,.09);
  --tx:#F1F2F2;
  --tx2:#C8C9CA;
  --tx3:#B1B3B4;
  --red:#9FB2C2;
  --red2:#8696A3;
  --hi:#9FB2C2;
  --onred:#16100F;
  --tint:rgba(159,178,194,0.24);
  --tint2:rgba(159,178,194,0.14);
  --gold:#D3D3D3;
  --goldf:#D3D3D3;
  --ongold:#2A1B05;
  --goldt:rgba(211,211,211,0.16);
  --gold2:#989898;
  --c1:#B9C3CB;
  --c2:#9FB2C2;
  --c3:#DBDBDB;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#3A4248 0%,#25292C 58%);
  --scrim:rgba(8,9,10,0.66);
  --glow:0 10px 28px -8px rgba(159,178,194,0.75);
  --shadow:0 16px 36px -14px rgba(0,0,0,.7);
  --glowbg:rgba(159,178,194,0.4);
  --good:#7FD6A0;
  --heroA:rgba(211,211,211,0.3);
  --heroB:rgba(211,211,211,0.2);
  --heroC:rgba(211,211,211,0.18);
  --heroTop:#292D30;
  --heroBot:#1A1E21;
  --hexa:#E2E2E2;
  --hexb:#A5A5A5;
  --av1:#BAC8D3;
  --av2:#5C6771;
  --tx2h:#EFEFEF;
  --tx3h:#D6D7D7;
  --lineh:#76787A;
  --softh:rgba(255,255,255,.2);
}
html[data-palette="minimal"][data-theme="light"] .scr, html[data-palette="minimal"] .scr.light {
  --bg:#F4F5F6;
  --bg2:#E9EAEB;
  --s1:#FFFFFF;
  --s2:#EDEEEF;
  --s3:#DFE0E1;
  --line:#CBCBCC;
  --soft:rgba(49,49,49,0.1);
  --tx:#161616;
  --tx2:#494A4A;
  --tx3:#626262;
  --red:#36454F;
  --red2:#2E3B44;
  --hi:#36454F;
  --onred:#FFFFFF;
  --tint:rgba(54,69,79,0.16);
  --tint2:rgba(54,69,79,0.09);
  --gold:#5E6C79;
  --goldf:#708090;
  --ongold:#16100F;
  --goldt:rgba(112,128,144,0.17);
  --gold2:#515C68;
  --c1:#536370;
  --c2:#36454F;
  --c3:#708090;
  --on1:#FFFFFF;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#E5E7E8 0%,#FFFFFF 62%);
  --scrim:rgba(37,37,37,0.5);
  --glow:0 10px 24px -10px rgba(54,69,79,0.6);
  --shadow:0 16px 34px -16px rgba(49,49,49,0.35);
  --glowbg:rgba(54,69,79,0.18);
  --good:#1E8A52;
  --heroA:rgba(112,128,144,0.45);
  --heroB:rgba(112,128,144,0.22);
  --heroC:rgba(112,128,144,0.2);
  --heroTop:#DDE0E2;
  --heroBot:#F4F5F6;
  --hexa:#A2ACB7;
  --hexb:#576470;
  --av1:#6E7980;
  --av2:#1F282E;
  --tx2h:#292A2A;
  --tx3h:#3B3B3B;
  --lineh:#979899;
  --softh:rgba(49,49,49,0.22);
}

/* Electric — inspired by Tech Innovation */
html[data-palette="tech"] { --page:#090B0E; }
html[data-palette="tech"][data-theme="light"] { --page:#DFE2E8; }
html[data-palette="tech"] .scr {
  --bg:#15181F;
  --bg2:#101318;
  --s1:#21242A;
  --s2:#2C2F35;
  --s3:#383B41;
  --line:#4D4F55;
  --soft:rgba(255,255,255,.09);
  --tx:#F1F1F2;
  --tx2:#C7C8C9;
  --tx3:#AFB0B3;
  --red:#3A84FF;
  --red2:#316FD6;
  --hi:#5695FF;
  --onred:#16100F;
  --tint:rgba(58,132,255,0.24);
  --tint2:rgba(58,132,255,0.14);
  --gold:#22D8E2;
  --goldf:#22D8E2;
  --ongold:#2A1B05;
  --goldt:rgba(34,216,226,0.16);
  --gold2:#189CA3;
  --c1:#2EAEF1;
  --c2:#3A84FF;
  --c3:#4ADFE7;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#1E3255 0%,#21242A 58%);
  --scrim:rgba(6,7,9,0.66);
  --glow:0 10px 28px -8px rgba(58,132,255,0.75);
  --shadow:0 16px 36px -14px rgba(0,0,0,.7);
  --glowbg:rgba(58,132,255,0.4);
  --good:#7FD6A0;
  --heroA:rgba(34,216,226,0.3);
  --heroB:rgba(34,216,226,0.2);
  --heroC:rgba(34,216,226,0.18);
  --heroTop:#25282E;
  --heroBot:#15181F;
  --hexa:#6FE6EC;
  --hexb:#1BA8B0;
  --av1:#71A6FF;
  --av2:#224D94;
  --tx2h:#EFEFEF;
  --tx3h:#D5D5D7;
  --lineh:#737479;
  --softh:rgba(255,255,255,.2);
}
html[data-palette="tech"][data-theme="light"] .scr, html[data-palette="tech"] .scr.light {
  --bg:#F2F6FC;
  --bg2:#E7EBF1;
  --s1:#FFFFFF;
  --s2:#EBEFF4;
  --s3:#DDE1E7;
  --line:#C9CCD1;
  --soft:rgba(48,49,50,0.1);
  --tx:#161617;
  --tx2:#494A4C;
  --tx3:#616265;
  --red:#0A5CE0;
  --red2:#094FC1;
  --hi:#0A5CE0;
  --onred:#FFFFFF;
  --tint:rgba(10,92,224,0.16);
  --tint2:rgba(10,92,224,0.09);
  --gold:#007582;
  --goldf:#00A3B4;
  --ongold:#2A1B05;
  --goldt:rgba(0,163,180,0.17);
  --gold2:#007582;
  --c1:#0580CA;
  --c2:#0A5CE0;
  --c3:#00A3B4;
  --on1:#16100F;
  --on3:#16100F;
  --cardhi:linear-gradient(155deg,#DFEAFB 0%,#FFFFFF 62%);
  --scrim:rgba(36,37,38,0.5);
  --glow:0 10px 24px -10px rgba(10,92,224,0.6);
  --shadow:0 16px 34px -16px rgba(48,49,50,0.35);
  --glowbg:rgba(10,92,224,0.18);
  --good:#1E8A52;
  --heroA:rgba(0,163,180,0.45);
  --heroB:rgba(0,163,180,0.22);
  --heroC:rgba(0,163,180,0.2);
  --heroTop:#D6E4F9;
  --heroBot:#F2F6FC;
  --hexa:#59C3CE;
  --hexb:#007F8C;
  --av1:#4F8AE9;
  --av2:#063582;
  --tx2h:#292A2B;
  --tx3h:#3A3B3C;
  --lineh:#96999C;
  --softh:rgba(48,49,50,0.22);
}

/* Higher contrast (all palettes) */
html[data-contrast="high"] .scr { --tx2:var(--tx2h); --tx3:var(--tx3h); --line:var(--lineh); --soft:var(--softh); }
/*THEMES:END*/

/* Text size (Settings → Appearance) */
html[data-text-size="small"] .body, html[data-text-size="small"] .onboard { zoom: .92; }
html[data-text-size="large"] .body, html[data-text-size="large"] .onboard { zoom: 1.1; }

/* ---------- App shell ---------- */
html, body { margin: 0; padding: 0; height: 100%; }
body { background: var(--page); color: #F8F0EC; min-height: 100dvh; }

.scr {
  position: relative; width: 100%; max-width: 480px; margin: 0 auto;
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; overflow: hidden; overflow: clip;
  touch-action: manipulation;
}
@media (min-width: 560px) {
  body { padding: 24px 0; display: flex; align-items: center; justify-content: center; }
  .scr { height: calc(100vh - 48px); height: calc(100dvh - 48px); border-radius: 34px;
         box-shadow: 0 40px 90px -30px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.04); }
}

/* ---------- Base element resets (zero specificity so components win) ---------- */
:where(.scr) button {
  font: inherit; color: inherit; border: 0; background: none; padding: 0; margin: 0;
  cursor: pointer; text-align: inherit; -webkit-tap-highlight-color: transparent;
}
:where(.scr) input, :where(.scr) textarea, :where(.scr) select { font: inherit; color: inherit; }
:where(.scr) p, :where(.scr) h1, :where(.scr) h2, :where(.scr) h3, :where(.scr) h4 { margin: 0; font-weight: inherit; }
:where(.scr) a { color: inherit; text-decoration: none; }
:where(.scr) svg { display: block; }
:where(.scr) button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--hi); outline-offset: 2px; }
.scr ::selection { background: var(--tint); }

/* ---------- Icon ---------- */
.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8;
     stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i.s { width: 18px; height: 18px; }
.i.xs { width: 14px; height: 14px; }
.i.m { width: 26px; height: 26px; }
.i.l { width: 32px; height: 32px; }
.i.f { fill: currentColor; stroke: none; }

/* ---------- Layout ---------- */
.row { display: flex; align-items: center; gap: 12px; }
.col { display: flex; flex-direction: column; }
.g4 { gap: 4px; } .g6 { gap: 6px; } .g8 { gap: 8px; } .g10 { gap: 10px; }
.g12 { gap: 12px; } .g14 { gap: 14px; } .g16 { gap: 16px; } .g20 { gap: 20px; }
.g24 { gap: 24px; } .g32 { gap: 32px; }
.grow { flex: 1; min-width: 0; }
.sp { margin-left: auto; }
.btw { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.ctr { text-align: center; align-items: center; }
.start { align-items: flex-start; }
.end { align-items: flex-end; }
.jc { justify-content: center; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ell { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.scrollx { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px; -webkit-overflow-scrolling: touch; }
.scrollx::-webkit-scrollbar { display: none; }
.scrollx > * { flex: none; }

.body { position: relative; flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
        padding: calc(var(--safe-t) + 26px) 20px 40px; overscroll-behavior: contain; }
.body.nn { padding-bottom: calc(var(--safe-b) + 40px); }
.body.tabs { padding-bottom: 36px; }
.onboard { position: relative; flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
           padding: calc(var(--safe-t) + 26px) 20px calc(var(--safe-b) + 28px); display: flex; flex-direction: column; overscroll-behavior: contain; }
.onboard > * { flex-shrink: 0; }
.hd { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.glow { position: absolute; left: -80px; right: -80px; top: -170px; height: 440px;
        background: radial-gradient(closest-side, var(--glowbg), transparent);
        pointer-events: none; animation: drift 14s ease-in-out infinite alternate; }
.z { position: relative; }
.mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mt20 { margin-top: 20px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }
.fill { flex: 1; }
.stack-end { margin-top: auto; }

/* ---------- Typography ---------- */
.disp { font-family: 'Instrument Serif', Georgia, 'Times New Roman', serif;
        font-weight: 400; letter-spacing: -0.01em; line-height: 1.02; }
.d1 { font-size: 46px; } .d2 { font-size: 36px; } .d3 { font-size: 28px; } .d4 { font-size: 22px; }
.disp em { font-style: italic; color: var(--hi); }
.eb { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tx3); }
.t1 { font-size: 17px; font-weight: 700; line-height: 1.3; }
.t2 { font-size: 15px; font-weight: 700; line-height: 1.3; }
.p { font-size: 15px; line-height: 1.5; color: var(--tx2); }
.sm { font-size: 13px; line-height: 1.45; color: var(--tx3); }
.xs { font-size: 11.5px; line-height: 1.4; color: var(--tx3); font-weight: 600; }
.num { font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -.02em; }
.big { font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.hi { color: var(--hi); } .gold { color: var(--gold); }
.mut { color: var(--tx2); } .dim { color: var(--tx3); } .wht { color: var(--tx); }
.sh { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 0 12px; }
.sh a, .sh button { font-size: 13px; font-weight: 700; color: var(--hi); }
.q { font-family: 'Instrument Serif', Georgia, serif; font-size: 30px; line-height: 1.12; letter-spacing: -.01em; }
.q em { font-style: italic; color: var(--hi); }
.sm.mut2 { color: var(--tx2); }

/* ---------- Surfaces ---------- */
.card { background: var(--s1); border: 1px solid var(--soft); border-radius: 22px; padding: 18px; display: block; width: 100%; text-align: left; }
.card.row, .card.col { display: flex; }
.card.hi { background: var(--cardhi); border-color: color-mix(in srgb, var(--red) 28%, transparent); }
.card.fl { background: var(--s2); border-color: transparent; }
.card.out { background: transparent; border: 1.5px dashed var(--line); }
.card.p0 { padding: 0; overflow: hidden; }
.card.sm { padding: 14px; border-radius: 18px; font-size: inherit; color: inherit; line-height: inherit; }
.lst { background: var(--s1); border: 1px solid var(--soft); border-radius: 22px; overflow: hidden; }
.li { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 16px; width: 100%; text-align: left; }
.li + .li { border-top: 1px solid var(--soft); }
.li[data-go], .li[data-act], .card[data-go], .card[data-act], .hab [data-go] { cursor: pointer; }
.pic { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center;
       background: var(--s2); color: var(--hi); flex: none; }
.pic.r { background: var(--tint); color: var(--hi); }
.pic.g { background: var(--goldt); color: var(--gold); }
.pic.sq { border-radius: 12px; }
.pic.sel { box-shadow: 0 0 0 2px var(--red); background: var(--tint); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
       height: 54px; padding: 0 26px; border-radius: 18px; font-weight: 700; font-size: 16px;
       white-space: nowrap; text-align: center !important; transition: transform .15s var(--ease), background .2s, opacity .2s, box-shadow .2s; }
.btn.blk { display: flex; width: 100%; }
.btn.pri { background: var(--red); color: var(--onred); box-shadow: var(--glow); }
.btn.sec { background: var(--s2); border: 1px solid var(--line); color: var(--tx); }
.btn.gh { color: var(--tx2); height: 48px; padding: 0 16px; }
.btn.gd { background: var(--goldf); color: var(--ongold); }
.btn.dng { border: 1.5px solid var(--hi); color: var(--hi); }
.btn.sm { height: 44px; padding: 0 18px; font-size: 14px; border-radius: 14px; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled, .btn.off { background: var(--s3); color: var(--tx3); box-shadow: none; opacity: .85; }
.ib { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
      background: var(--s2); border: 1px solid var(--soft); flex: none; transition: transform .15s var(--ease), background .2s; }
.ib:active { transform: scale(.92); }
.ib.nb { background: none; border-color: transparent; }
.ib.red { background: var(--red); border-color: var(--red); color: var(--onred); box-shadow: var(--glow); }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px;
        border-radius: 999px; background: var(--s1); border: 1.5px solid var(--line);
        font-weight: 600; font-size: 14px; color: var(--tx2); white-space: nowrap;
        transition: background .2s, border-color .2s, color .2s, transform .15s var(--ease), box-shadow .2s; }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--tint); border-color: var(--red); color: var(--tx); box-shadow: 0 0 0 2px var(--tint); }
.chip.sm { height: 36px; padding: 0 14px; font-size: 13px; }
.chip.cc { justify-content: center; height: 48px; padding: 0 6px; white-space: normal;
           text-align: center !important; font-size: 13px; line-height: 1.2; border-radius: 16px; }
.chip.dot { width: 44px; padding: 0; justify-content: center; border-radius: 50%; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
       border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--s3);
       color: var(--tx2); white-space: nowrap; }
.tag.r { background: var(--tint); color: var(--hi); }
.tag.g { background: var(--goldt); color: var(--gold); }
.opt { display: flex; align-items: center; gap: 14px; padding: 16px; min-height: 72px;
       border-radius: 20px; background: var(--s1); border: 1.5px solid var(--soft); width: 100%; text-align: left;
       transition: border-color .2s, background .2s, box-shadow .25s, transform .15s var(--ease); }
.opt:active { transform: scale(.985); }
.opt.on { border-color: var(--red); background: var(--tint2); box-shadow: 0 0 0 2px var(--tint); }
.rad { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line);
       flex: none; display: grid; place-items: center; color: var(--onred); transition: background .2s, border-color .2s, transform .3s var(--spring); }
.rad.on { background: var(--red); border-color: var(--red); transform: scale(1.06); }
.rad .i { width: 14px; height: 14px; stroke-width: 3; }
.rad.on .i { animation: pop .35s var(--spring) both; }
.tick { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line);
        display: grid; place-items: center; flex: none; color: transparent;
        transition: background .2s, border-color .2s, transform .3s var(--spring), color .15s; }
.tick:active { transform: scale(.88); }
.tick.on { background: var(--red); border-color: var(--red); color: var(--onred); }
.tick.on .i { animation: pop .38s var(--spring) both; }
.tick .i { width: 18px; height: 18px; stroke-width: 2.8; }
.tick.lock { color: var(--tx3); border-style: dashed; }
.hab { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 12px 16px;
       background: var(--s1); border: 1px solid var(--soft); border-radius: 20px; position: relative;
       transition: background .3s, border-color .3s, opacity .3s; }
.hab.done { background: var(--tint2); }
.hab.dim2 { opacity: .78; }
.hab .lbl-btn { text-align: left; }
.tg { width: 52px; height: 32px; border-radius: 99px; background: var(--s3);
      position: relative; flex: none; transition: background .25s ease; }
.tg::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px;
             border-radius: 50%; background: var(--tx2); transition: transform .3s var(--spring), background .2s; }
.tg.on { background: var(--red); }
.tg.on::after { transform: translateX(20px); background: var(--onred); }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--s1);
       border: 1px solid var(--soft); position: relative; }
.seg > * { flex: 1; height: 40px; border-radius: 12px; display: grid; place-items: center;
           font-size: 14px; font-weight: 700; color: var(--tx3); text-align: center !important;
           white-space: nowrap; padding: 0 6px; position: relative; z-index: 1; transition: color .2s, background .2s; }
.seg > .on { background: var(--red); color: var(--onred); box-shadow: 0 6px 16px -8px var(--red); }
.seg.js > .on { background: transparent; box-shadow: none; }
.seg.js::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 12px;
                  width: calc((100% - 8px - (var(--n, 2) - 1) * 4px) / var(--n, 2));
                  transform: translateX(calc(var(--i, 0) * (100% + 4px)));
                  background: var(--red); box-shadow: 0 6px 16px -8px var(--red);
                  transition: transform .32s var(--ease); }
.seg.js.noanim::before { transition: none; }
[data-set-theme].on > span:first-child { border-color: var(--red) !important; box-shadow: 0 0 0 3px var(--tint); }
[data-set-theme] > span:first-child { transition: border-color .2s, box-shadow .2s; }

/* ---------- Inputs ---------- */
.fld { display: flex; flex-direction: column; gap: 8px; }
.lbl { font-size: 13px; font-weight: 700; color: var(--tx2); }
.inp { width: 100%; height: 54px; border-radius: 16px; background: var(--s1);
       border: 1.5px solid var(--line); padding: 0 16px; font-size: 16px; outline: none; color: var(--tx);
       transition: border-color .2s, box-shadow .2s; }
.inp:focus, .inp.f { border-color: var(--red); box-shadow: 0 0 0 4px var(--tint); }
.inp.ta { height: auto; min-height: 120px; padding: 14px 16px; line-height: 1.5; resize: vertical; display: block; }
.inp::placeholder { color: var(--tx3); }
.inp.err { border-color: var(--hi); animation: shake .35s; }
.search { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px;
          border-radius: 16px; background: var(--s1); border: 1px solid var(--soft); color: var(--tx3); }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; font-size: 15px; color: var(--tx); }
.search input::placeholder { color: var(--tx3); }
.dob-input, .time-input { background: var(--s2); border: 1px solid var(--line); border-radius: 12px;
             padding: 8px 10px; color: var(--tx); font-size: 13px; font-weight: 600; flex: none; max-width: 100%; color-scheme: dark; }
.time-input { padding: 6px 8px; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; flex: none; max-width: 132px; min-width: 0; }
html[data-theme="light"] .dob-input, html[data-theme="light"] .time-input, .scr.light .dob-input, .scr.light .time-input { color-scheme: light; }
.inp[type="date"] { color-scheme: dark; }
html[data-theme="light"] .inp[type="date"] { color-scheme: light; }
.numinp { width: 84px; height: 46px; text-align: center; font-weight: 800; }

/* ---------- Progress ---------- */
.bar { height: 8px; border-radius: 99px; background: var(--s3); overflow: hidden; }
.bar > i { display: block; height: 100%; width: var(--p, 50%); border-radius: 99px;
           background: linear-gradient(90deg, var(--red), var(--hi));
           animation: barin .9s var(--ease) backwards; transition: width .6s var(--ease); }
.bar.g > i { background: linear-gradient(90deg, var(--gold2), var(--goldf)); }
.bar.t { height: 5px; }
.bar.k { height: 12px; }
.ring { --rp: 50; --sz: 96px; --th: 9px; --rb: var(--s1); width: var(--sz); height: var(--sz);
        border-radius: 50%;
        background: conic-gradient(from 0deg, var(--red2), var(--hi) calc(var(--rp) * 1%), var(--s3) 0);
        display: grid; place-items: center; flex: none; position: relative;
        animation: ringin 1.1s var(--ease) backwards; transition: --rp .7s var(--ease); }
.ring::after { content: ""; position: absolute; inset: var(--th); border-radius: 50%; background: var(--rb); }
.ring > * { position: relative; z-index: 1; }
.ring.g { background: conic-gradient(from 0deg, var(--gold2), var(--goldf) calc(var(--rp) * 1%), var(--s3) 0); }
.days { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 5px; }
.days i { aspect-ratio: 1; border-radius: 7px; background: var(--s2); display: grid; place-items: center;
          font-style: normal; font-size: 10px; font-weight: 700; color: var(--tx3);
          animation: cellin .4s var(--ease) backwards; animation-delay: calc(var(--d, 0) * 14ms); }
.days .k1 { background: var(--c1); color: var(--on1); }
.days .k2 { background: var(--c2); color: var(--onred); }
.days .k3 { background: var(--c3); color: var(--on3); }
.days .rest { background: var(--tint); color: var(--hi); }
.days .miss { background: transparent; border: 1.5px dashed var(--line); color: var(--tx3); }
.days .part { background: var(--tint); color: var(--tx); }
.days .cur { background: var(--bg); border: 2px solid var(--hi); color: var(--tx); box-shadow: 0 0 0 3px var(--tint); }
.dd { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--s3); flex: none; transition: background .3s; }
.dd.on { background: var(--red); }
.dd.n { background: transparent; border: 1.5px solid var(--line); }
.dd.m { background: var(--tint); border: 1.5px solid var(--line); }
.wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wk > div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0;
            border-radius: 16px; background: var(--s1); border: 1px solid var(--soft);
            font-size: 11px; font-weight: 700; color: var(--tx3); }
.wk > div b { font-size: 15px; color: var(--tx); }
.wk > .on { background: var(--tint); border-color: var(--red); }
.cbars { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.cbars > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
               height: 100%; justify-content: flex-end; }
.cbars i { display: block; width: 100%; border-radius: 9px 9px 4px 4px; background: var(--s3); height: var(--h);
           transform-origin: bottom; animation: growy .8s var(--ease) backwards; animation-delay: calc(var(--d, 0) * 50ms); }
.cbars .on i { background: linear-gradient(to top, var(--red2), var(--hi)); }

/* ---------- Calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal > button, .cal > div { min-height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 13px;
                            color: var(--tx); transition: transform .15s var(--ease), box-shadow .2s; }
.cal > button:active { transform: scale(.93); }
.cal .full { background: var(--red); color: var(--onred); }
.cal .done { background: color-mix(in srgb, var(--red) 80%, transparent); color: var(--onred); }
.cal .part { background: color-mix(in srgb, var(--red) 38%, transparent); }
.cal .rest { background: var(--goldt); border: 1.5px dashed var(--gold); color: var(--gold); }
.cal .miss { color: var(--tx3); border: 1.5px dashed var(--line); }
.cal .paused { color: var(--tx3); background: var(--s2); }
.cal .fut { color: var(--tx3); }
.cal .today { border: 2px solid var(--hi); background: var(--bg); box-shadow: 0 0 0 3px var(--tint); }
.cal .sel { outline: 2px solid var(--tx); outline-offset: 2px; }
.lg { display: block; width: 12px; height: 12px; border-radius: 4px; }

/* ---------- Nav ---------- */
.nav { flex: none; height: calc(66px + var(--safe-b)); padding: 6px 10px var(--safe-b);
       display: flex; background: var(--bg2); border-top: 1px solid var(--soft); view-transition-name: tabbar; position: relative; z-index: 4; }
.nv { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
      gap: 4px; font-size: 11px; font-weight: 700; color: var(--tx3); min-height: 54px;
      position: relative; text-align: center !important; transition: color .2s; }
.nv .i { transition: transform .3s var(--spring); }
.nv:active .i { transform: scale(.9); }
.nv.on { color: var(--hi); }
.nv.on .i { transform: translateY(-1px); }
.nv.on::before { content: ""; position: absolute; top: -7px; width: 26px; height: 3px;
                 border-radius: 3px; background: var(--red); animation: barx .4s var(--ease) both; }
.fab { position: absolute; right: 20px; bottom: calc(66px + var(--safe-b) + 18px); width: 58px; height: 58px; border-radius: 20px;
       background: var(--red); color: var(--onred); display: grid; place-items: center;
       box-shadow: var(--glow); z-index: 5; transition: transform .2s var(--spring); animation: pop .5s .35s var(--spring) both; }
.fab:active { transform: scale(.92) rotate(90deg); }
.fab .i { width: 28px; height: 28px; stroke-width: 2.2; }

/* ---------- Hero art ---------- */
.hero { position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 150px;
               background: linear-gradient(to top, var(--bg), transparent); }
.hero-art { position: absolute; inset: 0; }
.hero-art::before {
  content: ""; position: absolute; inset: -10%;
  background:
    radial-gradient(120% 90% at 80% 0%, var(--heroA), transparent 55%),
    radial-gradient(130% 100% at 15% 20%, color-mix(in srgb, var(--red) 55%, transparent), transparent 60%),
    linear-gradient(180deg, var(--heroTop), var(--heroBot));
  animation: drift 16s ease-in-out infinite alternate;
}
.hero-art::after {
  content: ""; position: absolute; left: -20%; right: -20%; bottom: -40%; height: 70%;
  background:
    radial-gradient(60% 60% at 30% 70%, var(--heroB), transparent 60%),
    radial-gradient(50% 50% at 75% 60%, var(--heroC), transparent 60%);
}
.hero-art .flare { position: absolute; inset: 0; opacity: .5;
                   background: radial-gradient(80% 70% at 50% 30%, transparent 40%, var(--scrim) 100%); }
.scr.light .hero-art::before, html[data-theme="light"] .hero-art::before {
  background:
    radial-gradient(120% 90% at 80% 0%, var(--heroA), transparent 55%),
    radial-gradient(130% 100% at 15% 20%, color-mix(in srgb, var(--red) 35%, transparent), transparent 60%),
    linear-gradient(180deg, var(--heroTop), var(--heroBot)); }

/* ---------- Badges / avatars ---------- */
.hex { width: 64px; height: 72px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
       background: var(--s3); display: grid; place-items: center; color: var(--tx3); flex: none; }
.hex.on { background: linear-gradient(160deg, var(--hexa), var(--hexb)); color: var(--ongold); }
.hex.sm { width: 48px; height: 54px; }
.hex.pop { animation: pop .6s var(--spring) both; }
.logo { display: flex; align-items: center; gap: 10px; font-family: 'Instrument Serif', Georgia, serif;
        font-size: 26px; letter-spacing: .14em; text-transform: uppercase; }
.logo .mark { width: 38px; height: 38px; border-radius: 12px; background: var(--red);
              display: grid; place-items: center; color: var(--onred); box-shadow: var(--glow); }
.mood { width: 56px; height: 56px; border-radius: 18px; background: var(--s1);
        border: 1.5px solid var(--soft); display: grid; place-items: center; color: var(--tx3); flex: none;
        transition: background .2s, border-color .2s, color .2s, transform .3s var(--spring); }
.mood.on { background: var(--tint); border-color: var(--red); color: var(--hi); transform: translateY(-3px) scale(1.06); }
.lvl { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
       border-radius: 14px; background: var(--goldf); color: var(--ongold); font-weight: 800; font-size: 18px; flex: none; }
.av { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(150deg, var(--red), var(--av2));
      display: grid; place-items: center; font-weight: 800; font-size: 19px; color: var(--onred); flex: none;
      background-size: cover; background-position: center; overflow: hidden; }
.av.l { width: 96px; height: 96px; font-size: 40px; }
.av.m { width: 64px; height: 64px; font-size: 26px; }
.av.pick { width: 100%; height: auto; aspect-ratio: 1; transition: box-shadow .25s, transform .25s var(--spring); }
.av.pick.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--red); transform: scale(1.04); }
.sep { height: 1px; background: var(--soft); margin: 16px 0; }
.bdg { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px;
       background: var(--red); color: var(--onred); font-size: 10px; font-weight: 800;
       display: grid; place-items: center; padding: 0 4px; }
.flame-live .i { animation: flicker 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
.empty { text-align: center; padding: 28px 18px; color: var(--tx3); font-size: 14px; border: 1.5px dashed var(--line); border-radius: 22px; }
.empty b { display: block; color: var(--tx2); font-size: 15px; margin-bottom: 4px; }

/* ---------- Overlays: sheets, dialogs ---------- */
.overlay { position: absolute; inset: 0; z-index: 60; display: flex; align-items: flex-end; }
.scrim { position: absolute; inset: 0; background: var(--scrim); animation: fade .22s both; }
.sheetb { position: relative; width: 100%; max-height: 92%; overflow-y: auto; z-index: 1;
          background: var(--s1); border-radius: 30px 30px 0 0; padding: 12px 20px calc(var(--safe-b) + 26px);
          border-top: 1px solid var(--line); box-shadow: var(--shadow); animation: rise .32s var(--ease) both; overscroll-behavior: contain; }
.grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 18px; }
.dlg { position: relative; width: calc(100% - 44px); max-width: 420px; margin: 0 auto; z-index: 1;
       background: var(--s1); border: 1px solid var(--line); border-radius: 28px;
       padding: 26px 22px 22px; box-shadow: var(--shadow); animation: pop .26s var(--spring) both; }
.overlay.centered { align-items: center; }
.overlay.closing .scrim { animation: fadeout .18s both; }
.overlay.closing .sheetb { animation: sink .2s var(--ease) both; }
.overlay.closing .dlg { animation: popout .18s both; }
.ico-lg { width: 72px; height: 72px; border-radius: 24px; display: grid; place-items: center; background: var(--tint); color: var(--hi); }
.ico-lg.g { background: var(--goldt); color: var(--gold); }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px;
         background: var(--s2); border: 1px solid var(--line); box-shadow: var(--shadow); }
.skel { background: linear-gradient(90deg, var(--s2), var(--s3), var(--s2)); background-size: 200% 100%;
        border-radius: 12px; animation: shimmer 1.4s ease infinite; }

.app-toast { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 90px); transform: translate(-50%, 16px) scale(.96);
             z-index: 90; background: var(--s2); color: var(--tx); border: 1px solid var(--line);
             padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px;
             box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--spring);
             max-width: calc(100% - 40px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.app-toast.top { bottom: auto; top: calc(var(--safe-t) + 18px); }

/* XP float + confetti */
.xpf { position: absolute; z-index: 80; pointer-events: none; font-weight: 800; font-size: 15px; color: var(--gold);
       text-shadow: 0 2px 10px rgba(0,0,0,.35); animation: floatup 1s var(--ease) both; }
.cf { position: absolute; z-index: 85; width: 8px; height: 12px; border-radius: 2px; pointer-events: none; opacity: 0;
      animation: confetti 1.4s var(--ease) forwards; }
.celebrate-ring { position: absolute; z-index: 84; border-radius: 50%; pointer-events: none; border: 2px solid var(--hi);
                  animation: burst .8s var(--ease) both; }

/* FAQ accordion */
.faq { border-top: 1px solid var(--soft); }
.faq:first-child { border-top: 0; }
.faq > button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 16px; text-align: left; }
.faq .chev { transition: transform .3s var(--ease); color: var(--tx3); }
.faq.open .chev { transform: rotate(180deg); color: var(--hi); }
.faq .ans { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.faq.open .ans { grid-template-rows: 1fr; }
.faq .ans > div { overflow: hidden; }
.faq .ans p { padding: 0 16px 18px; }

/* Keypad (PIN) */
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 260px; margin: 18px auto 0; }
.keypad button { height: 58px; border-radius: 18px; background: var(--s2); font-size: 22px; font-weight: 700; display: grid; place-items: center; transition: transform .12s, background .2s; }
.keypad button:active { transform: scale(.93); background: var(--s3); }
.pindots { display: flex; gap: 14px; justify-content: center; margin-top: 18px; }
.pindots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); transition: background .15s, border-color .15s, transform .2s var(--spring); }
.pindots i.on { background: var(--red); border-color: var(--red); transform: scale(1.15); }
.pindots.shake { animation: shake .4s; }
.lockscreen { position: absolute; inset: 0; z-index: 55; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; text-align: center; animation: fade .2s both; }

/* Page enter */
.body > *, .onboard > * { animation: enter .5s var(--ease) backwards; }
.body > *:nth-child(1), .onboard > *:nth-child(1) { animation-delay: 0ms; }
.body > *:nth-child(2), .onboard > *:nth-child(2) { animation-delay: 45ms; }
.body > *:nth-child(3), .onboard > *:nth-child(3) { animation-delay: 90ms; }
.body > *:nth-child(4), .onboard > *:nth-child(4) { animation-delay: 135ms; }
.body > *:nth-child(5), .onboard > *:nth-child(5) { animation-delay: 180ms; }
.body > *:nth-child(6), .onboard > *:nth-child(6) { animation-delay: 220ms; }
.body > *:nth-child(7), .onboard > *:nth-child(7) { animation-delay: 255ms; }
.body > *:nth-child(8), .onboard > *:nth-child(8) { animation-delay: 285ms; }
.body > *:nth-child(n+9), .onboard > *:nth-child(n+9) { animation-delay: 310ms; }
.glow { animation-name: drift; }
.body > .glow, .onboard > .glow { animation: drift 14s ease-in-out infinite alternate; }
body.leaving .scr > .body, body.leaving .scr > .onboard { opacity: 0; transform: translateY(-6px); transition: opacity .12s ease, transform .12s ease; }

[hidden] { display: none !important; }

/* ---------- Keyframes ---------- */
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeout { to { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sink { to { transform: translateY(40px); opacity: 0; } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes popout { to { transform: scale(.95); opacity: 0; } }
@keyframes barin { from { width: 0; } }
@keyframes ringin { from { --rp: 0; } }
@keyframes barx { from { transform: scaleX(0); } }
@keyframes growy { from { transform: scaleY(0); } }
@keyframes cellin { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes drift { from { transform: translate3d(-3%, -2%, 0) scale(1); } to { transform: translate3d(3%, 3%, 0) scale(1.06); } }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(0); } 30% { transform: scale(1.08) rotate(-3deg); } 60% { transform: scale(.97) rotate(2deg); } }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes floatup { 0% { opacity: 0; transform: translateY(6px) scale(.9); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-38px) scale(1.05); } }
@keyframes burst { from { transform: scale(.2); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
@keyframes confetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); } }
@keyframes breathe { 0%, 100% { box-shadow: var(--glow), 0 0 0 0 var(--tint); } 50% { box-shadow: var(--glow), 0 0 0 12px transparent; } }
.breathing { animation: breathe 2.4s ease-in-out infinite; }
.pulse-once { animation: pulse .6s var(--ease); }
@keyframes pulse { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }

/* ---------- Page transitions (cross-document, where supported) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
html[data-reduce-motion="1"] *, html[data-reduce-motion="1"] *::before, html[data-reduce-motion="1"] *::after {
  animation-duration: .001ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }

/* After the first paint, stop entrance animations from replaying on re-render */
.settled .bar > i, .settled .ring, .settled .cbars i, .settled .days i, .settled .body > *, .settled .onboard > * { animation: none; }


/* ---------- Theme picker (Settings → Appearance) ---------- */
.themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.thm { text-align: left; background: var(--s1); border: 1.5px solid var(--soft); border-radius: 18px; padding: 10px 10px 12px;
       display: flex; flex-direction: column; gap: 3px; color: var(--tx);
       transition: border-color .2s, background .2s, transform .3s var(--spring), box-shadow .2s; }
.thm:active { transform: scale(.97); }
.thm.on { border-color: var(--red); background: var(--tint2); box-shadow: 0 0 0 2px var(--tint); }
.thm .pv { display: flex; height: 64px; border-radius: 13px; overflow: hidden; margin-bottom: 8px; box-shadow: 0 0 0 1px var(--soft); }
.thm .half { flex: 1; position: relative; display: block; }
.thm .half .bar { position: absolute; left: 9px; right: 9px; top: 10px; height: 18px; border-radius: 6px; }
.thm .half .dots { position: absolute; left: 9px; bottom: 9px; display: flex; gap: 5px; }
.thm .half .dots i { width: 14px; height: 14px; border-radius: 50%; display: block; }
.thm .half .ln { position: absolute; right: 9px; bottom: 14px; width: 18px; height: 4px; border-radius: 4px; opacity: .8; }
.thm .nm { font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.thm .nm .i { width: 16px; height: 16px; color: var(--hi); flex: none; }
.thm .xs { line-height: 1.3; }

/* ---- Scroll time picker ---- */
.whw { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 4px; padding: 0 4px; }
.wh { flex: 1; max-width: 104px; text-align: center; }
.whl { font-size: 12px; font-weight: 700; color: var(--tx3); letter-spacing: .06em; text-transform: uppercase; height: 24px; }
.whc { height: 220px; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; outline: none;
       -webkit-mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); }
.whc::-webkit-scrollbar { display: none; }
.whi { height: 44px; line-height: 44px; scroll-snap-align: center; font-size: 22px; font-weight: 700; color: var(--tx3); font-variant-numeric: tabular-nums; cursor: pointer; transition: color .15s, transform .15s; }
.whi.on { color: var(--tx); transform: scale(1.12); }
.whsep { align-self: flex-end; height: 220px; line-height: 220px; font-size: 22px; font-weight: 800; color: var(--tx2); }
.whband { position: absolute; left: 0; right: 0; bottom: 88px; height: 44px; border-radius: 12px; background: var(--tint2); border: 1px solid var(--tint); pointer-events: none; z-index: 0; }
.whw .wh, .whw .whsep { position: relative; z-index: 1; }
.inp.ta { overflow-y: hidden; transition: height .12s var(--ease); }
.time-input { cursor: pointer; }
.time-input::-webkit-calendar-picker-indicator { display: none; }

/* Focus pill: shows on every other screen while a timer is running */
.fbar { position: absolute; left: 16px; bottom: calc(66px + var(--safe-b, 0px) + 20px); z-index: 60; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 112px); padding: 7px 14px 7px 12px; border-radius: 999px; border: 1px solid var(--red); background: var(--s2, var(--s3)); color: var(--tx); box-shadow: 0 8px 24px rgba(0,0,0,.35); font: inherit; cursor: pointer; animation: fbarIn .3s ease both; }
.fbar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hi, var(--acc)); flex: none; animation: fbarPulse 1.6s ease-in-out infinite; }
.fbar .ft { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.fbar .fl { font-size: 12px; color: var(--tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fbar.paused .dot { animation: none; background: var(--tx3); }
.fbar:active { transform: scale(.97); }
@keyframes fbarIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes fbarPulse { 50% { opacity: .35; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .fbar, .fbar .dot { animation: none; } }
