@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root, [data-theme="silk"] {
  --bg-top: #fdfbf7; --bg-bottom: #eee6df;
  --text-main: #3e3a37; --text-muted: #8a7f78;
  --card-bg: rgba(255, 255, 255, 0.75); --card-border: rgba(255, 255, 255, 0.9);
  --accent: #3e3a37; --accent-text: #ffffff;
  --shadow: rgba(138, 115, 105, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.5); --glass-border: rgba(255, 255, 255, 0.85); --glass-sheen: rgba(255, 255, 255, 0.45);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.3), 0 10px 30px rgba(62, 58, 55, 0.12);
  --glass-blur: blur(18px) saturate(180%); --pill-bg: rgba(255, 255, 255, 0.95); --glare-color: rgba(255, 255, 255, 0.9);
  --bg-art: none;
}

[data-theme="midnight"] {
  --bg-top: #121212; --bg-bottom: #0a0a0a;
  --text-main: #f3f3f3; --text-muted: #888888;
  --card-bg: rgba(30, 30, 30, 0.6); --card-border: rgba(50, 50, 50, 0.4);
  --accent: #ffffff; --accent-text: #000000;
  --shadow: rgba(0, 0, 0, 0.5);
  --glass-bg: rgba(38, 38, 38, 0.55); --glass-border: rgba(255, 255, 255, 0.08); --glass-sheen: rgba(255, 255, 255, 0.08);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(18px) saturate(160%); --pill-bg: rgba(255, 255, 255, 0.14); --glare-color: rgba(255, 255, 255, 0.35);
}

[data-theme="matcha"] {
  --bg-top: #f3f6f0; --bg-bottom: #dce3d4;
  --text-main: #2c3625; --text-muted: #6b7a5d;
  --card-bg: rgba(255, 255, 255, 0.6); --card-border: rgba(255, 255, 255, 0.7);
  --accent: #7b8f68; --accent-text: #ffffff;
  --shadow: rgba(123, 143, 104, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.45); --glass-border: rgba(255, 255, 255, 0.8); --glass-sheen: rgba(255, 255, 255, 0.4);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(255, 255, 255, 0.25), 0 10px 30px rgba(123, 143, 104, 0.15);
  --glass-blur: blur(18px) saturate(170%); --pill-bg: rgba(255, 255, 255, 0.9); --glare-color: rgba(255, 255, 255, 0.8);
}

/* ===== GENERATED THEMES (scripts/gen-themes.js) ===== */
[data-theme="mogra"] {
  --card-bg: rgba(255, 255, 255, 0.74);
  --card-border: rgba(255, 255, 255, 0.88);
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-sheen: rgba(255, 255, 255, 0.45);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.3), 0 10px 30px rgba(0, 0, 0, 0.1);
  --glass-blur: blur(18px) saturate(180%);
  --pill-bg: rgba(255, 255, 255, 0.95);
  --glare-color: rgba(255, 255, 255, 0.9);
  --bg-top: #F4F2EC;
  --bg-bottom: #e8e6e0;
  --text-main: #24262B;
  --text-muted: #5F636B;
  --accent: #2F6B4F;
  --accent-text: #F4F2EC;
  --shadow: rgba(47, 107, 79, 0.1);
  --bg-art: radial-gradient(rgba(47, 107, 79, 0.07) 1px, transparent 1.6px) 0 0 / 22px 22px, radial-gradient(circle at 85% 8%, rgba(255, 255, 255, 0.9), transparent 40%);
}

[data-theme="haldi"] {
  --card-bg: rgba(255, 252, 240, 0.74);
  --card-border: rgba(255, 255, 255, 0.88);
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-sheen: rgba(255, 255, 255, 0.45);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.3), 0 10px 30px rgba(0, 0, 0, 0.1);
  --glass-blur: blur(18px) saturate(180%);
  --pill-bg: rgba(255, 255, 255, 0.95);
  --glare-color: rgba(255, 255, 255, 0.9);
  --bg-top: #FFF5D6;
  --bg-bottom: #f3e9c9;
  --text-main: #3A2A05;
  --text-muted: #6B5418;
  --accent: #B35F00;
  --accent-text: #FFF5D6;
  --shadow: rgba(179, 95, 0, 0.1);
  --bg-art: radial-gradient(circle at 80% 0%, rgba(244, 163, 0, 0.22), transparent 55%), radial-gradient(circle at 0% 100%, rgba(179, 95, 0, 0.1), transparent 50%);
}

[data-theme="mehendi"] {
  --card-bg: rgba(250, 249, 238, 0.74);
  --card-border: rgba(255, 255, 255, 0.88);
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-sheen: rgba(255, 255, 255, 0.45);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.3), 0 10px 30px rgba(0, 0, 0, 0.1);
  --glass-blur: blur(18px) saturate(180%);
  --pill-bg: rgba(255, 255, 255, 0.95);
  --glare-color: rgba(255, 255, 255, 0.9);
  --bg-top: #EFEEDC;
  --bg-bottom: #e3e2d0;
  --text-main: #252E18;
  --text-muted: #575F3E;
  --accent: #8A3B1E;
  --accent-text: #EFEEDC;
  --shadow: rgba(138, 59, 30, 0.1);
  --bg-art: radial-gradient(circle, rgba(138, 59, 30, 0.06) 1.2px, transparent 1.8px) 0 0 / 18px 18px, radial-gradient(circle at 50% 0%, rgba(87, 95, 62, 0.12), transparent 60%);
}

[data-theme="sindoor"] {
  --card-bg: rgba(61, 17, 23, 0.55);
  --card-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-sheen: rgba(255, 255, 255, 0.08);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(18px) saturate(160%);
  --pill-bg: rgba(255, 255, 255, 0.16);
  --glare-color: rgba(255, 255, 255, 0.35);
  --bg-top: #2A0A0E;
  --bg-bottom: #1b0709;
  --text-main: #FBEDE3;
  --text-muted: #D9B8A8;
  --accent: #E0B05A;
  --accent-text: #2A0A0E;
  --shadow: rgba(0, 0, 0, 0.5);
  --bg-art: radial-gradient(ellipse at 50% -10%, rgba(224, 176, 90, 0.22), transparent 55%), radial-gradient(ellipse at 50% 120%, rgba(179, 18, 46, 0.35), transparent 60%);
}

[data-theme="taare"] {
  --card-bg: rgba(21, 28, 59, 0.55);
  --card-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-sheen: rgba(255, 255, 255, 0.08);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(18px) saturate(160%);
  --pill-bg: rgba(255, 255, 255, 0.16);
  --glare-color: rgba(255, 255, 255, 0.35);
  --bg-top: #0B1026;
  --bg-bottom: #070a19;
  --text-main: #F2EEE3;
  --text-muted: #AEB3CC;
  --accent: #E9C46A;
  --accent-text: #0B1026;
  --shadow: rgba(0, 0, 0, 0.5);
  --bg-art: radial-gradient(1.5px 1.5px at 12% 18%, #e9c46a, transparent), radial-gradient(1px 1px at 72% 12%, #f2eee3, transparent), radial-gradient(1.5px 1.5px at 38% 46%, #f2eee3, transparent), radial-gradient(1px 1px at 86% 38%, #e9c46a, transparent), radial-gradient(1px 1px at 22% 72%, #f2eee3, transparent), radial-gradient(1.5px 1.5px at 64% 82%, #e9c46a, transparent), radial-gradient(1px 1px at 92% 70%, #f2eee3, transparent), radial-gradient(1px 1px at 52% 26%, #aeb3cc, transparent), radial-gradient(ellipse at 50% 0%, rgba(233, 196, 106, 0.12), transparent 55%);
}

[data-theme="mor"] {
  --card-bg: rgba(12, 49, 60, 0.55);
  --card-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-sheen: rgba(255, 255, 255, 0.08);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(18px) saturate(160%);
  --pill-bg: rgba(255, 255, 255, 0.16);
  --glare-color: rgba(255, 255, 255, 0.35);
  --bg-top: #06222B;
  --bg-bottom: #04161c;
  --text-main: #E9F4F2;
  --text-muted: #9EC3C0;
  --accent: #3CC4B5;
  --accent-text: #06222B;
  --shadow: rgba(0, 0, 0, 0.5);
  --bg-art: radial-gradient(circle at 15% 10%, rgba(60, 196, 181, 0.22), transparent 50%), radial-gradient(circle at 90% 85%, rgba(217, 180, 74, 0.14), transparent 45%);
}

[data-theme="baarish"] {
  --card-bg: rgba(34, 54, 60, 0.55);
  --card-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-sheen: rgba(255, 255, 255, 0.08);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(18px) saturate(160%);
  --pill-bg: rgba(255, 255, 255, 0.16);
  --glare-color: rgba(255, 255, 255, 0.35);
  --bg-top: #18262B;
  --bg-bottom: #10191c;
  --text-main: #E8F1F2;
  --text-muted: #A3BCC0;
  --accent: #7FD1C7;
  --accent-text: #18262B;
  --shadow: rgba(0, 0, 0, 0.5);
  --bg-art: repeating-linear-gradient(104deg, rgba(232, 241, 242, 0.035) 0 1px, transparent 1px 13px), radial-gradient(ellipse at 50% 0%, rgba(127, 209, 199, 0.12), transparent 60%);
}

[data-theme="polaroid"] {
  --card-bg: rgba(251, 248, 242, 0.74);
  --card-border: rgba(255, 255, 255, 0.88);
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-sheen: rgba(255, 255, 255, 0.45);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.3), 0 10px 30px rgba(0, 0, 0, 0.1);
  --glass-blur: blur(18px) saturate(180%);
  --pill-bg: rgba(255, 255, 255, 0.95);
  --glare-color: rgba(255, 255, 255, 0.9);
  --bg-top: #EEE8DD;
  --bg-bottom: #e2dcd2;
  --text-main: #2A2622;
  --text-muted: #635B52;
  --accent: #B4472F;
  --accent-text: #EEE8DD;
  --shadow: rgba(180, 71, 47, 0.1);
  --bg-art: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.05'/></svg>"), radial-gradient(circle at 92% 6%, rgba(232, 168, 124, 0.25), transparent 35%);
}

[data-theme="kasavu"] {
  --card-bg: rgba(255, 251, 242, 0.74);
  --card-border: rgba(255, 255, 255, 0.88);
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-sheen: rgba(255, 255, 255, 0.45);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.3), 0 10px 30px rgba(0, 0, 0, 0.1);
  --glass-blur: blur(18px) saturate(180%);
  --pill-bg: rgba(255, 255, 255, 0.95);
  --glare-color: rgba(255, 255, 255, 0.9);
  --bg-top: #F7F1E3;
  --bg-bottom: #ebe5d7;
  --text-main: #2E2414;
  --text-muted: #665634;
  --accent: #8C6A12;
  --accent-text: #F7F1E3;
  --shadow: rgba(140, 106, 18, 0.1);
  --bg-art: linear-gradient(180deg, rgba(201, 162, 39, 0.18) 0 3px, transparent 3px), radial-gradient(circle at 50% 0%, rgba(201, 162, 39, 0.08), transparent 55%);
}

[data-theme="gulabi"] {
  --card-bg: rgba(252, 241, 236, 0.74);
  --card-border: rgba(255, 255, 255, 0.88);
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-sheen: rgba(255, 255, 255, 0.45);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.3), 0 10px 30px rgba(0, 0, 0, 0.1);
  --glass-blur: blur(18px) saturate(180%);
  --pill-bg: rgba(255, 255, 255, 0.95);
  --glare-color: rgba(255, 255, 255, 0.9);
  --bg-top: #F5E1D7;
  --bg-bottom: #ead5cc;
  --text-main: #3B1F1A;
  --text-muted: #76463B;
  --accent: #A9472F;
  --accent-text: #F5E1D7;
  --shadow: rgba(169, 71, 47, 0.1);
  --bg-art: radial-gradient(ellipse at 50% 112%, rgba(169, 71, 47, 0.16), transparent 55%), radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.5), transparent 45%);
}

[data-theme="aurora"] {
  --card-bg: rgba(20, 27, 48, 0.55);
  --card-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-sheen: rgba(255, 255, 255, 0.08);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(18px) saturate(160%);
  --pill-bg: rgba(255, 255, 255, 0.16);
  --glare-color: rgba(255, 255, 255, 0.35);
  --bg-top: #0A0F1F;
  --bg-bottom: #070a14;
  --text-main: #EEF2FF;
  --text-muted: #A9B3D1;
  --accent: #7CF0C8;
  --accent-text: #0A0F1F;
  --shadow: rgba(0, 0, 0, 0.5);
  --bg-art: radial-gradient(ellipse at 20% 0%, rgba(124, 240, 200, 0.2), transparent 55%), radial-gradient(ellipse at 85% 25%, rgba(185, 162, 255, 0.18), transparent 50%);
}

[data-theme="meadow"] {
  --card-bg: rgba(251, 246, 234, 0.74);
  --card-border: rgba(255, 255, 255, 0.88);
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-sheen: rgba(255, 255, 255, 0.45);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.3), 0 10px 30px rgba(0, 0, 0, 0.1);
  --glass-blur: blur(18px) saturate(180%);
  --pill-bg: rgba(255, 255, 255, 0.95);
  --glare-color: rgba(255, 255, 255, 0.9);
  --bg-top: #F3EAD7;
  --bg-bottom: #e7dfcd;
  --text-main: #2B3A2C;
  --text-muted: #55624F;
  --accent: #3F6E4C;
  --accent-text: #F3EAD7;
  --shadow: rgba(63, 110, 76, 0.1);
  --bg-art: linear-gradient(180deg, rgba(156, 197, 217, 0.35) 0%, transparent 38%), radial-gradient(ellipse at 50% 108%, rgba(232, 168, 124, 0.22), transparent 55%);
}

[data-theme="gulkand"] {
  --card-bg: rgba(255, 245, 247, 0.74);
  --card-border: rgba(255, 255, 255, 0.88);
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-sheen: rgba(255, 255, 255, 0.45);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.3), 0 10px 30px rgba(0, 0, 0, 0.1);
  --glass-blur: blur(18px) saturate(180%);
  --pill-bg: rgba(255, 255, 255, 0.95);
  --glare-color: rgba(255, 255, 255, 0.9);
  --bg-top: #FBE8EC;
  --bg-bottom: #efdbe0;
  --text-main: #3A1622;
  --text-muted: #7A4656;
  --accent: #A8325A;
  --accent-text: #FBE8EC;
  --shadow: rgba(168, 50, 90, 0.1);
  --bg-art: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.7), transparent 40%), radial-gradient(circle at 80% 90%, rgba(168, 50, 90, 0.1), transparent 50%);
}

[data-theme="diya"] {
  --card-bg: rgba(34, 22, 12, 0.55);
  --card-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-sheen: rgba(255, 255, 255, 0.08);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(18px) saturate(160%);
  --pill-bg: rgba(255, 255, 255, 0.16);
  --glare-color: rgba(255, 255, 255, 0.35);
  --bg-top: #140C06;
  --bg-bottom: #0d0804;
  --text-main: #FFF1DC;
  --text-muted: #CDB28E;
  --accent: #FFB347;
  --accent-text: #140C06;
  --shadow: rgba(0, 0, 0, 0.5);
  --bg-art: radial-gradient(ellipse at 50% 112%, rgba(255, 179, 71, 0.3), transparent 55%), radial-gradient(circle, rgba(242, 193, 78, 0.1) 1.2px, transparent 1.8px) 0 0 / 26px 26px;
}

[data-theme="holi"] {
  --card-bg: rgba(255, 255, 255, 0.74);
  --card-border: rgba(255, 255, 255, 0.88);
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-sheen: rgba(255, 255, 255, 0.45);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.3), 0 10px 30px rgba(0, 0, 0, 0.1);
  --glass-blur: blur(18px) saturate(180%);
  --pill-bg: rgba(255, 255, 255, 0.95);
  --glare-color: rgba(255, 255, 255, 0.9);
  --bg-top: #FFF8F2;
  --bg-bottom: #f2ebe6;
  --text-main: #2A1B2E;
  --text-muted: #65566A;
  --accent: #C21F66;
  --accent-text: #FFF8F2;
  --shadow: rgba(194, 31, 102, 0.1);
  --bg-art: radial-gradient(circle at 12% 10%, rgba(194, 31, 102, 0.12), transparent 26%), radial-gradient(circle at 88% 22%, rgba(244, 163, 0, 0.14), transparent 24%), radial-gradient(circle at 70% 92%, rgba(31, 158, 143, 0.12), transparent 26%);
}

[data-theme="lalpaar"] {
  --card-bg: rgba(255, 255, 255, 0.74);
  --card-border: rgba(255, 255, 255, 0.88);
  --glass-bg: rgba(255, 255, 255, 0.5);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-sheen: rgba(255, 255, 255, 0.45);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.3), 0 10px 30px rgba(0, 0, 0, 0.1);
  --glass-blur: blur(18px) saturate(180%);
  --pill-bg: rgba(255, 255, 255, 0.95);
  --glare-color: rgba(255, 255, 255, 0.9);
  --bg-top: #FBF7F2;
  --bg-bottom: #eee9e5;
  --text-main: #1E1414;
  --text-muted: #6A5450;
  --accent: #B3121F;
  --accent-text: #FBF7F2;
  --shadow: rgba(179, 18, 31, 0.1);
  --bg-art: linear-gradient(180deg, rgba(179, 18, 31, 0.85) 0 3px, transparent 3px), radial-gradient(circle at 50% 0%, rgba(179, 18, 31, 0.06), transparent 55%);
}

[data-theme="noel"] {
  --card-bg: rgba(22, 48, 31, 0.55);
  --card-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-sheen: rgba(255, 255, 255, 0.08);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(18px) saturate(160%);
  --pill-bg: rgba(255, 255, 255, 0.16);
  --glare-color: rgba(255, 255, 255, 0.35);
  --bg-top: #0E2219;
  --bg-bottom: #091610;
  --text-main: #F5EFE3;
  --text-muted: #BFC9B8;
  --accent: #E0B354;
  --accent-text: #0E2219;
  --shadow: rgba(0, 0, 0, 0.5);
  --bg-art: radial-gradient(1.5px 1.5px at 18% 22%, rgba(255, 255, 255, 0.7), transparent), radial-gradient(1px 1px at 68% 14%, rgba(255, 255, 255, 0.6), transparent), radial-gradient(1.5px 1.5px at 42% 58%, rgba(255, 255, 255, 0.5), transparent), radial-gradient(1px 1px at 84% 66%, rgba(255, 255, 255, 0.6), transparent), radial-gradient(ellipse at 50% 0%, rgba(224, 179, 84, 0.14), transparent 55%);
}

[data-theme="lantern"] {
  --card-bg: rgba(61, 17, 17, 0.55);
  --card-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-sheen: rgba(255, 255, 255, 0.08);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(18px) saturate(160%);
  --pill-bg: rgba(255, 255, 255, 0.16);
  --glare-color: rgba(255, 255, 255, 0.35);
  --bg-top: #2B0A0A;
  --bg-bottom: #1c0707;
  --text-main: #FBEFE0;
  --text-muted: #E0BFA8;
  --accent: #F2B33D;
  --accent-text: #2B0A0A;
  --shadow: rgba(0, 0, 0, 0.5);
  --bg-art: radial-gradient(circle at 85% 6%, rgba(242, 179, 61, 0.28), transparent 32%), radial-gradient(circle at 12% 30%, rgba(255, 122, 69, 0.14), transparent 30%), radial-gradient(ellipse at 50% 115%, rgba(242, 179, 61, 0.18), transparent 55%);
}

[data-theme="crescent"] {
  --card-bg: rgba(22, 34, 74, 0.55);
  --card-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-sheen: rgba(255, 255, 255, 0.08);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(255, 255, 255, 0.04), 0 10px 30px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(18px) saturate(160%);
  --pill-bg: rgba(255, 255, 255, 0.16);
  --glare-color: rgba(255, 255, 255, 0.35);
  --bg-top: #0D1630;
  --bg-bottom: #080e1f;
  --text-main: #F3F0E6;
  --text-muted: #B7BCD3;
  --accent: #E8C67A;
  --accent-text: #0D1630;
  --shadow: rgba(0, 0, 0, 0.5);
  --bg-art: radial-gradient(circle at 81% 10.5%, #0d1630 0 17px, transparent 18px), radial-gradient(circle at 78% 12%, rgba(232, 198, 122, 0.55) 0 18px, transparent 19px), radial-gradient(1px 1px at 20% 30%, #f3f0e6, transparent), radial-gradient(1px 1px at 60% 50%, #b7bcd3, transparent), radial-gradient(ellipse at 50% 0%, rgba(232, 198, 122, 0.1), transparent 55%);
}
/* ===== END GENERATED THEMES ===== */

html, body {
  height: 100%; height: 100dvh; width: 100%; overflow: hidden;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  background: var(--bg-art), linear-gradient(145deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  color: var(--text-main); display: flex; flex-direction: column;
}

::-webkit-scrollbar { display: none; }

.soft-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-radius: 24px; box-shadow: 0 12px 40px var(--shadow);
}

/* Liquid Glass: controls only (tab bar, sheets, toast, full-chat bars); content stays solid */
.glass {
  background: linear-gradient(180deg, var(--glass-sheen) 0%, rgba(255, 255, 255, 0) 42%), var(--glass-bg);
  border: 1px solid var(--glass-border); box-shadow: var(--glass-edge);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}

.soft-input {
  background: var(--card-bg); border: 1px solid var(--card-border); 
  color: var(--text-main); border-radius: 16px; transition: all 0.3s ease;
}
.soft-input:focus { outline: none; border-color: var(--text-muted); }

.bg-theme-accent { background: var(--accent); color: var(--accent-text); }
.text-theme-muted { color: var(--text-muted); }
.border-theme-muted { border-color: var(--text-muted); }

#app-container { display: flex; flex-direction: column; height: 100%; width: 100%; overflow: hidden; }
#fixed-top { flex-shrink: 0; z-index: 20; padding-bottom: 8px; }
#dynamic-bottom { flex-grow: 1; overflow: hidden; position: relative; z-index: 10; display: flex; flex-direction: column; }

.nav-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-muted); transition: all 0.2s ease; width: 60px; }
.nav-btn.active { color: var(--text-main); font-weight: 700; transform: translateY(-2px); }
.view-section { display: none; opacity: 0; transition: none; height: 100%; flex-direction: column; padding-bottom: 80px; overflow-y: auto; }
.view-section.active { display: flex; opacity: 1; }

.btn-press { transition: transform 0.1s ease, opacity 0.2s ease; cursor: pointer; }
.btn-press:active { transform: scale(0.94); }
.hide-scroll::-webkit-scrollbar { display: none; }

.frosted-secret { filter: blur(12px) grayscale(0.2); opacity: 0.9; transition: filter 0.5s ease, opacity 0.5s ease; user-select: none; background: rgba(255,255,255,0.2); border-radius: 12px; }
.frosted-secret.revealed { filter: blur(0px) grayscale(0); opacity: 1; }
.bg-half-done { background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); }
.lens-natural { filter: none; }
.lens-warm { filter: sepia(0.3) saturate(1.3) brightness(1.05); }
.lens-focus { filter: grayscale(1) contrast(1.2); }

@keyframes beat { 0%, 100% { transform: scale(1); } 25% { transform: scale(1.15); } 50% { transform: scale(1); } 75% { transform: scale(1.25); } }
.beating-heart { animation: beat 0.8s ease-in-out infinite; }

.reaction-badge { background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); border-radius: 99px; padding: 3px 6px; font-size: 12px; box-shadow: 0 4px 10px var(--shadow); }
@keyframes bounce-in { 0% { transform: scale(0); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
.animate-bounce-in { animation: bounce-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
.app-modal { position: fixed; inset: 0; z-index: 150; background: var(--bg-top); display: flex; flex-direction: column; transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.app-modal.open { transform: translateY(0); }
.nightlight-active { opacity: 0.4; filter: grayscale(0.5); }

.hold-ring { transition: stroke-dashoffset 0.1s linear; }
.sync-pulse { animation: sync-pulse 1.5s infinite; }
@keyframes sync-pulse { 
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(212, 140, 140, 0.7); } 
    70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(212, 140, 140, 0); } 
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(212, 140, 140, 0); } 
}

.typing-dot { animation: typing-bounce 1.4s infinite ease-in-out both; background: var(--text-muted); }
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typing-bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }

.stickman-wrapper { 
    position: absolute; bottom: 0; z-index: 20;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    transform: translateY(120%); opacity: 0; pointer-events: none;
}
.stickman-wrapper.active { transform: translateY(0); opacity: 1; }
.stickman-local { right: 16px; }
.stickman-remote { left: 16px; }
.anim-gentle-pulse { animation: gentle-pulse 1s infinite alternate ease-in-out; transform-origin: center; }
@keyframes gentle-pulse { 0% { transform: scale(1); } 100% { transform: scale(1.15); } }
.anim-angry-shake { animation: angry-shake 0.3s infinite; }
@keyframes angry-shake { 0% { transform: translateX(0); } 25% { transform: translateX(-2px) rotate(-2deg); } 50% { transform: translateX(2px) rotate(2deg); } 75% { transform: translateX(-2px) rotate(-2deg); } 100% { transform: translateX(0); } }
.anim-laugh-bounce { animation: laugh-bounce 0.4s infinite alternate ease-in-out; }
@keyframes laugh-bounce { 0% { transform: translateY(0); } 100% { transform: translateY(-4px); } }
/* Haptic shake feedback (body gets the class; animate the app, not body, so fixed layers stay put) */
@keyframes app-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-3px); } 40% { transform: translateX(3px); } 60% { transform: translateX(-2px); } 80% { transform: translateX(2px); } }
.app-vibrate #app-container { animation: app-shake 0.4s ease; }
.app-vibrate-continuous #app-container { animation: app-shake 0.25s linear infinite; }
@media (prefers-reduced-motion: reduce) { .app-vibrate #app-container, .app-vibrate-continuous #app-container, .beating-heart { animation: none; } }

/* Floating glass tab bar; clears the iPhone home indicator and stays within the 80px the pages reserve */
#tabbar { left: 14px; right: 14px; bottom: calc(10px + env(safe-area-inset-bottom)); height: 64px; max-width: 30rem; margin: 0 auto; padding: 0 6px; border-radius: 28px; }
#tabbar .nav-btn { position: relative; z-index: 1; height: var(--pill-h, 50px); gap: 3px; }
#tabbar .nav-btn.active { transform: none; }   /* content stays centered inside the bubble */
#tabbar .nav-btn > svg, #tabbar .nav-btn > i { margin-bottom: 0; }
#tabbar .nav-btn:focus-visible { outline: 2px solid var(--text-main); outline-offset: 2px; border-radius: 20px; }
#nav-pill { position: absolute; top: 6px; height: 50px; left: 0; width: 0; border-radius: 21px; background: var(--pill-bg);
  box-shadow: 0 1px 4px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.5); pointer-events: none; }
.view-section { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }

/* ---------- Us tab ---------- */
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: 0.7; } }
.breathe { animation: breathe 2.4s ease-in-out infinite; }
#arc-partner-dot.online { fill: #34d399; animation: breathe 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.arc-heart { transform-box: fill-box; transform-origin: center; animation: beat 1.6s ease-in-out infinite; }
.arc-traveller { opacity: 0.25; }
#together-card.online .arc-traveller { opacity: 1; }

.mood-status { background: rgba(127, 127, 127, 0.08); border: 1px solid var(--card-border); min-height: 64px; }
.mood-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 0 8px; border-radius: 16px; border: 1px solid var(--card-border); background: var(--card-bg); transition: transform 0.15s ease, background 0.2s ease; }
.mood-btn span:first-child { font-size: 22px; line-height: 1; }
.mood-btn span:last-child { font-size: 8px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.mood-btn.selected { background: var(--accent); border-color: var(--accent); }
.mood-btn.selected span:last-child { color: var(--accent-text); }

.answer-card { background: rgba(127, 127, 127, 0.08); border: 1px solid var(--card-border); border-radius: 16px; padding: 12px 14px; }
.answer-locked { filter: blur(6px); user-select: none; }
@keyframes reveal-in { 0% { opacity: 0; transform: translateY(8px) scale(0.97); filter: blur(6px); } 100% { opacity: 1; transform: none; filter: none; } }
.reveal-in { animation: reveal-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* ---------- Touch pad ---------- */
.touch-pad { background: radial-gradient(circle at 50% 50%, rgba(244, 63, 94, 0.10), rgba(127, 127, 127, 0.06) 70%); border: 1px dashed var(--card-border); touch-action: none; -webkit-user-select: none; }
.touch-pad.pressed { background: radial-gradient(circle at 50% 50%, rgba(244, 63, 94, 0.22), rgba(127, 127, 127, 0.08) 70%); }
.touch-ripple { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 9999px; background: rgba(244, 63, 94, 0.55); pointer-events: none; animation: touch-ripple 0.9s ease-out forwards; }
.touch-ripple.remote { background: rgba(99, 102, 241, 0.55); }
@keyframes touch-ripple { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(9); opacity: 0; } }

/* Header status lines: unknown values are empty and vanish; dots only sit between real values */
.hud-line { display: flex; gap: 6px; align-items: center; min-height: 1em; }
.hud-line.hidden, .hud-line > span:empty { display: none; }
.hud-line > span:not(:empty) ~ span:not(:empty)::before { content: '•'; margin-right: 6px; }
/* Phone width: the five header buttons leave little room, so the line wraps instead of running under them */
header .hud-line { flex-wrap: wrap; row-gap: 1px; max-width: 100%; white-space: normal; }
header .hud-line > span { white-space: nowrap; }

/* ---------- Intro (js/intro.js) — iOS 26 look, scoped so nothing leaks into the app ---------- */
#intro {
  --io-bg: #f5f5f7; --io-text: #1d1d1f; --io-muted: #86868b; --io-shape: #1d1d1f;
  --io-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --io-glass: rgba(255, 255, 255, 0.42); --io-glass-tint: rgba(29, 29, 31, 0.78); --io-on-tint: #fff;
  --io-edge: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.35), inset 0 0 0 0.5px rgba(255, 255, 255, 0.6), 0 10px 30px rgba(0, 0, 0, 0.08);
  --io-warm: 32 95% 72%; --io-cool: 250 85% 80%; --io-pool: 0.7;
  position: fixed; inset: 0; z-index: 999; overflow: hidden; color: var(--io-text); touch-action: none;
  font-family: -apple-system, 'SF Pro Display', Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  #intro { --io-bg: #000; --io-text: #f5f5f7; --io-muted: #8e8e93; --io-shape: #f5f5f7;
    --io-glass: rgba(255, 255, 255, 0.1); --io-glass-tint: rgba(245, 245, 247, 0.86); --io-on-tint: #1d1d1f;
    --io-edge: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -1px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 0.5px rgba(255, 255, 255, 0.18), 0 10px 30px rgba(0, 0, 0, 0.4);
    --io-warm: 28 80% 45%; --io-cool: 250 65% 50%; --io-pool: 0.55; }
}
#intro.leaving { pointer-events: none; }
#intro .io-bg { position: absolute; inset: 0; background: var(--io-bg); transition: opacity 0.7s var(--io-ease); }
#intro.leaving .io-bg, #intro.leaving .io-pool, #intro.leaving .io-title { opacity: 0 !important; }
#intro .io-pool { position: absolute; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; pointer-events: none; transition: opacity 0.8s var(--io-ease); will-change: transform; }
#intro #io-pool-you { background: radial-gradient(circle, hsl(var(--io-warm) / var(--io-pool)) 0%, hsl(var(--io-warm) / 0) 62%); }
#intro #io-pool-them { background: radial-gradient(circle, hsl(var(--io-cool) / var(--io-pool)) 0%, hsl(var(--io-cool) / 0) 62%); }
#intro .io-title { position: absolute; left: 24px; right: 24px; top: calc(env(safe-area-inset-top) + 64px); pointer-events: none; transition: opacity 0.4s var(--io-ease); }
#intro .io-title h1 { margin: 0; font-size: 34px; line-height: 1.12; font-weight: 700; letter-spacing: -0.025em; white-space: pre-line; }
#intro .io-title p { margin: 10px 0 0; font-size: 17px; line-height: 1.35; color: var(--io-muted); letter-spacing: -0.01em; }
#intro .io-title > * { transition: opacity 0.28s var(--io-ease), transform 0.5s var(--io-ease), filter 0.28s var(--io-ease); }
#intro .io-title.out > * { opacity: 0; transform: translateY(-6px); filter: blur(4px); }
#intro .io-arc { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#intro .io-arc path { fill: none; stroke: var(--io-muted); stroke-width: 1.5; stroke-dasharray: 2 7; stroke-linecap: round; transition: opacity 0.4s var(--io-ease); }
#intro .io-shapes { position: absolute; inset: 0; pointer-events: none; }
#intro .io-shapes.goo { filter: url(#io-goo); }
#intro .io-shape { position: absolute; left: 0; top: 0; background: var(--io-shape); will-change: transform, width, height; transition: opacity 0.35s var(--io-ease), background-color 0.6s var(--io-ease); }
#intro .io-ring { position: absolute; left: 0; top: 0; border: 2px solid var(--io-shape); border-radius: 50%; pointer-events: none; transition: border-color 0.6s var(--io-ease); }
#intro .io-label { position: absolute; font-size: 13px; font-weight: 600; color: var(--io-muted); transform: translateX(-50%); white-space: nowrap; transition: opacity 0.3s var(--io-ease); pointer-events: none; }
#intro .io-label.named { color: var(--io-text); }
#intro .io-over { position: absolute; left: 0; top: 0; display: flex; align-items: center; color: var(--io-text); pointer-events: none; overflow: hidden; transition: background-color 0.35s var(--io-ease), box-shadow 0.35s var(--io-ease); }
#intro .io-over.glass { border: 0; background: var(--io-glass); box-shadow: var(--io-edge); -webkit-backdrop-filter: blur(18px) saturate(190%); backdrop-filter: blur(18px) saturate(190%); }
#intro .io-over.glass::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 42%); }
#intro .io-over.glass.tint { background: var(--io-glass-tint); color: var(--io-on-tint); }
#intro .io-over.glass.tint::before { opacity: 0.12; }
/* A dark shape gets a soft edge: the bright top highlight read as a stray white line on it. */
#intro .io-over.glass.tint { box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.1), 0 10px 30px rgba(0, 0, 0, 0.12); }
#intro .io-pane { position: absolute; inset: 0; display: flex; align-items: center; opacity: 0; transition: opacity 0.22s var(--io-ease); pointer-events: none; }
#intro .io-pane.on { opacity: 1; transition-delay: 0.14s; pointer-events: auto; }
#intro .io-field { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; padding: 0 0 0 22px; font: 500 17px/1 -apple-system, Inter, system-ui, sans-serif; color: inherit; letter-spacing: -0.01em; }
#intro .io-field::placeholder { color: currentColor; opacity: 0.4; }
#intro .io-field.code { letter-spacing: 0.08em; font-variant-numeric: tabular-nums; text-transform: uppercase; }
#intro .io-go { flex: none; width: 44px; height: 44px; margin-right: 6px; border: 0; border-radius: 50%; background: var(--io-text); color: var(--io-bg); display: grid; place-items: center; cursor: pointer; transition: opacity 0.2s var(--io-ease), transform 0.2s var(--io-ease); }
#intro .io-go:disabled { opacity: 0.2; cursor: default; }
#intro .io-go:active { transform: scale(0.92); }
#intro .io-opt { width: 100%; height: 100%; border: 0; background: transparent; color: inherit; font: 600 17px -apple-system, Inter, system-ui, sans-serif; letter-spacing: -0.01em; cursor: pointer; }
#intro .io-card { flex-direction: column; align-items: stretch; padding: 22px; }
#intro .io-card small { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; opacity: 0.55; text-transform: uppercase; }
#intro .io-code { margin: 8px 0 6px; font-size: clamp(20px, 6.6vw, 28px); font-weight: 600; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
#intro .io-card p { margin: 0 0 18px; font-size: 14px; line-height: 1.4; opacity: 0.6; }
#intro .io-row { display: flex; gap: 10px; margin-top: auto; }
#intro .io-pill { flex: 1; height: 44px; border: 0; border-radius: 22px; font: 600 15px -apple-system, Inter, system-ui, sans-serif; cursor: pointer; transition: transform 0.2s var(--io-ease); }
#intro .io-pill:active { transform: scale(0.96); }
#intro .io-pill.quiet { background: color-mix(in srgb, currentColor 10%, transparent); color: inherit; box-shadow: inset 0 0 0 0.5px color-mix(in srgb, currentColor 18%, transparent); }
#intro .io-pill.main { background: var(--io-text); color: var(--io-bg); }
#intro .io-pill.io-wa { flex: 0 0 58px; display: flex; align-items: center; justify-content: center; }   /* the WhatsApp logo alone, no word */
#intro .io-link { position: absolute; left: 0; right: 0; text-align: center; font: 500 15px -apple-system, Inter, system-ui, sans-serif; color: var(--io-muted); background: none; border: 0; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 0.3s var(--io-ease); }
#intro .io-link.on { opacity: 1; pointer-events: auto; }

/* ---------- Full chat (js/chat.js) ---------- */
/* Sized to the visual viewport so the composer rides just above the phone keyboard */
.chat-full { position: fixed; left: 0; right: 0; top: var(--vv-top, 0px); height: var(--vvh, 100dvh); z-index: 60;
  display: flex; flex-direction: column; background: linear-gradient(145deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  transform: translateY(24px); opacity: 0; pointer-events: none; transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s ease; }
.chat-full.open { transform: none; opacity: 1; pointer-events: auto; }
.chat-full-bar { display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 14px 10px 6px;
  border-width: 0 0 1px; }  /* surface comes from .glass */
.cf-dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--text-muted); flex: none; transition: all 0.3s ease; }
.cf-dot.online { background: #34d399; border-color: #34d399; box-shadow: 0 0 10px rgba(52, 211, 153, 0.7); }
.cf-nudge { display: flex; align-items: center; gap: 8px; margin: 10px 12px 0; padding: 8px 8px 8px 14px; border-radius: 18px;
  background: var(--card-bg); border: 1px solid var(--card-border); box-shadow: 0 8px 24px var(--shadow); }
.cf-nudge.hidden { display: none; }
.chat-full #chat-log { max-width: 42rem; width: 100%; margin: 0 auto; }
.chat-full #cf-composer form { max-width: 42rem; margin: 0 auto; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
.chat-open #btn-chat-full { display: none; }

/* Moments: quiet lines that turn actions into a shared timeline */
.moment { display: flex; justify-content: center; margin: 4px 0 10px; }
.moment span { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--text-muted);
  padding: 5px 12px; border-radius: 99px; background: rgba(127, 127, 127, 0.08); }

/* Empty message box: the send button becomes a heart (tap = a beat, hold = keep it going) */
.quick-heart { background: rgba(244, 63, 94, 0.1); border: 1px solid rgba(244, 63, 94, 0.18); cursor: pointer; touch-action: none; transition: transform 0.15s ease; }
.quick-heart.beating { transform: scale(0.9); animation: beat 0.9s ease-in-out infinite; }
.quick-heart.hidden { display: none; }
#btn-send:not(.hidden) { display: flex; }

/* + sheet */
.chat-sheet { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, 0.28); opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
  display: flex; align-items: flex-end; justify-content: center; }
.chat-sheet.open { opacity: 1; pointer-events: auto; }
.chat-sheet-panel { width: 100%; max-width: 30rem; border-radius: 28px 28px 0 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom));
  max-height: 86dvh; overflow-y: auto; transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1); }
.chat-sheet.open .chat-sheet-panel { transform: none; }
.chat-sheet-grip { width: 38px; height: 5px; border-radius: 3px; background: var(--text-muted); opacity: 0.35; margin: 2px auto 12px; }
.sheet-group + .sheet-group { margin-top: 14px; }
.sheet-group h6 { margin: 0 0 8px 4px; font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); }
.sheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sheet-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px 8px; border-radius: 18px; border: 1px solid var(--card-border);
  background: var(--card-bg); color: var(--text-main); cursor: pointer; transition: transform 0.12s ease, opacity 0.2s ease; touch-action: none; -webkit-user-select: none; user-select: none; }
.sheet-tile:active, .sheet-tile.holding { transform: scale(0.94); }
.sheet-tile > span { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(127, 127, 127, 0.08); }
.sheet-tile b { font-size: 10px; font-weight: 800; line-height: 1.15; text-align: center; }
.sheet-tile small { font-size: 8.5px; font-weight: 700; color: var(--text-muted); min-height: 1em; text-align: center; line-height: 1.15; }
.sheet-tile.highlight { border-color: rgba(244, 63, 94, 0.45); box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.12); }
.sheet-tile.away { opacity: 0.42; }
#sheet-panel-slot > .soft-card { box-shadow: none; }

/* Video stage (js/depth.js Depth.stage): springs open/shut from its top edge; lifts off the page while something plays */
#stage-box { --stage-lift: 0; transform-origin: 50% 0;
  box-shadow: 0 calc(12px + var(--stage-lift) * 12px) calc(40px + var(--stage-lift) * 28px) var(--shadow), 0 0 0 calc(var(--stage-lift) * 1px) var(--glass-border); }

@media (prefers-reduced-motion: reduce) { .breathe, #arc-partner-dot.online, .arc-heart, .reveal-in, .touch-ripple { animation: none; } }

/* Co-regulation orb (js/orb.js sets the --orb-* vars every frame) */
.orb-stage { height: 232px; touch-action: none; cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  --orb-core: 230 150 90; --orb-rim: 255 214 160; --orb-glow: 0.5; --orb-scale: 1; }
.orb-backdrop { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 80% at 50% 52%, rgb(var(--orb-rim) / calc(var(--orb-glow) * 0.5)) 0%, rgb(var(--orb-rim) / 0) 72%); }
/* No WebGL: a flat heart with the same colours, glow and breathing (same params as the 3D one) */
.orb-fallback { position: absolute; left: 50%; top: 52%; width: 150px; height: 140px; pointer-events: none;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 30'><path d='M16 29C9 23.6 1 17.4 1 9.4 1 4.8 4.6 1 9 1c3 0 5.4 1.6 7 4.2C17.6 2.6 20 1 23 1c4.4 0 8 3.8 8 8.4 0 8-8 14.2-15 19.6z'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 30'><path d='M16 29C9 23.6 1 17.4 1 9.4 1 4.8 4.6 1 9 1c3 0 5.4 1.6 7 4.2C17.6 2.6 20 1 23 1c4.4 0 8 3.8 8 8.4 0 8-8 14.2-15 19.6z'/></svg>") center / contain no-repeat;
  transform: translate(-50%, -50%) scale(var(--orb-scale));
  background: radial-gradient(circle at 34% 30%, rgb(var(--orb-rim)) 0%, rgb(var(--orb-core)) 55%, rgb(var(--orb-core) / 0.8) 100%);
  box-shadow: 0 0 calc(30px + var(--orb-glow) * 60px) rgb(var(--orb-rim) / calc(var(--orb-glow) * 0.75)), inset -12px -16px 32px rgb(0 0 0 / 0.18); }
.orb-webgl .orb-fallback { display: none; }
.orb-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* Bond halo: breathes with the heart; the orb's spring sets its opacity (partner holding 0.35, both 1) */
.orb-halo { position: absolute; left: 50%; top: 52%; width: 190px; height: 190px; margin: -95px 0 0 -95px; border-radius: 50%; pointer-events: none; opacity: 0;
  transform: scale(calc(var(--orb-scale) * 1.05));   /* a soft glow behind the heart, no ring: the hands frame it now */
  background: radial-gradient(circle, rgb(var(--orb-rim) / 0.5) 0%, rgb(var(--orb-rim) / 0.2) 42%, transparent 70%); }
.dial-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 16px;
  background: var(--card-bg); border: 1px solid var(--card-border); font-size: 10px; font-weight: 800; letter-spacing: 0.04em; transition: all 0.2s ease; }
.dial-btn span:first-child { font-size: 18px; line-height: 1.1; }
.dial-btn.selected { background: var(--accent); color: var(--accent-text); border-color: var(--accent); transform: translateY(-2px); }

/* Card depth (js/motion.js): tilt toward the finger, lift, and a glare that follows it.
   The spring owns transform, so CSS transform transitions / :active scales are switched off here. */
[data-tilt] { position: relative; --glare: 0; --lift: 0; transition-property: opacity, background-color, border-color, color !important; }
[data-tilt].soft-card { box-shadow: 0 calc(12px + var(--lift) * 10px) calc(40px + var(--lift) * 24px) var(--shadow); }
[data-tilt]::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: var(--glare);
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), var(--glare-color), rgba(255, 255, 255, 0) 55%); mix-blend-mode: soft-light; }

/* Depth moments (js/depth.js) */
.flip-slot { display: inline-block; white-space: pre; transform-origin: 50% 60%; backface-visibility: hidden; }
.flip-card { transform-style: preserve-3d; position: relative; }
.flip-card > :not(.flip-back) { backface-visibility: hidden; }
.flip-back { position: absolute; inset: 0; border-radius: inherit; transform: rotateY(180deg); backface-visibility: hidden; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(244, 63, 94, 0.35) 0 14px, transparent 15px), linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #f43f5e)); }
#hug-wave { position: fixed; inset: 0; pointer-events: none; z-index: 240; perspective: 700px; perspective-origin: 50% 40%; overflow: hidden; }
.hug-ring { position: absolute; left: 50%; top: 45%; width: 70vmin; height: 70vmin; border-radius: 50%; opacity: 0;
  border: 2px solid rgba(244, 63, 94, 0.6); box-shadow: 0 0 40px rgba(244, 63, 94, 0.35), inset 0 0 30px rgba(244, 63, 94, 0.25); }
/* Sprung touch ripples (js/us.js): a core plus a trailing ring, driven by springs instead of the keyframe */
.touch-ripple.sprung { animation: none; }
.touch-ripple.ring { background: transparent; border: 1.5px solid rgba(244, 63, 94, 0.6); }
.touch-ripple.ring.remote { border-color: rgba(99, 102, 241, 0.6); }

/* Sealed-drop envelope (js/depth.js): a flap + wax seal over the frosted secret; clicks pass through to revealFrost */
.frost-envelope { position: absolute; inset: 0; z-index: 15; pointer-events: none; display: none; border-radius: inherit;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.18)); }   /* on the wrapper: the flap's clip-path would cut its own shadow off */
#frost-container.enveloped .frost-envelope { display: block; }
.env-flap { position: absolute; left: 0; right: 0; top: 0; height: 55%; transform-origin: 50% 0; backface-visibility: hidden;
  clip-path: polygon(0 0, 100% 0, 50% 100%); background: linear-gradient(180deg, var(--card-bg), color-mix(in srgb, var(--accent) 18%, var(--card-bg))); }
.env-seal { position: absolute; left: 50%; top: 55%; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  transform: translate(-50%, -50%); font-size: 15px; color: #fff; background: radial-gradient(circle at 35% 30%, #fb7185, #be123c);
  box-shadow: 0 3px 8px rgba(190, 18, 60, 0.45), inset 0 -2px 4px rgba(0, 0, 0, 0.25); }
#frost-container.enveloped #frost-tap-text { align-items: flex-end; padding-bottom: 12px; background: rgba(0, 0, 0, 0.08);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6), 0 0 10px rgba(0, 0, 0, 0.35); }   /* readable on the lighter wash */
/* Moments read as a small stack of cards */
.moment span { box-shadow: 0 1px 0 rgba(127, 127, 127, 0.14), 0 4px 0 -1px rgba(127, 127, 127, 0.12), 0 7px 0 -2px rgba(127, 127, 127, 0.08); }
/* Calls (Cycle 4): the waiting text breathes only while ringing/connecting (a status, not a transition); tiles sit deeper once connected */
#remote-waiting.call-waiting { animation: call-wait 1.8s ease-in-out infinite; }
@keyframes call-wait { 0%, 100% { color: var(--text-muted); } 50% { color: color-mix(in srgb, var(--text-muted) 40%, transparent); } }
@keyframes call-wait-soft { 0%, 100% { color: var(--text-muted); } 50% { color: color-mix(in srgb, var(--text-muted) 70%, transparent); } }
@media (prefers-reduced-motion: reduce) { #remote-waiting.call-waiting { animation-name: call-wait-soft; } }
#call-grid.call-live > .soft-card { box-shadow: 0 18px 50px var(--shadow), 0 0 0 1px var(--glass-border); }
/* Watch Explore (js/explore.js): search / category rows, result cards, Up next, Watched together */
.ex-head { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 8px; font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); }
.ex-chip { flex-shrink: 0; padding: 8px 14px; border-radius: 999px; font-size: 11px; font-weight: 800; border: 1px solid var(--card-border); background: var(--card-bg); color: var(--text-main); }
.ex-chip[aria-selected="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.ex-retry { display: block; margin: 8px auto 0; padding: 7px 16px; border-radius: 999px; font-weight: 800; border: 1px solid var(--card-border); background: var(--card-bg); color: var(--text-main); }
.yt-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 6px; border-radius: 18px; background: var(--card-bg); border: 1px solid var(--card-border); cursor: pointer; text-align: left; -webkit-user-select: none; user-select: none; }
.yt-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 13px; overflow: hidden; background: rgba(127, 127, 127, 0.14); }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-dur { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 800; color: #fff; background: rgba(0, 0, 0, 0.72); }
.yt-add { position: absolute; left: 6px; top: 6px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; font-weight: 700; line-height: 1; color: #fff; background: rgba(0, 0, 0, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.yt-title { padding: 0 2px; font-size: 12px; font-weight: 800; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.yt-channel { padding: 0 2px 2px; font-size: 10px; font-weight: 700; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-card.skeleton { cursor: default; }
.yt-card.skeleton .yt-title, .yt-card.skeleton .yt-channel { height: 10px; margin: 2px; border-radius: 6px; background: rgba(127, 127, 127, 0.14); }
.yt-card.skeleton .yt-channel { width: 55%; }
.yt-mini { width: 152px; flex-shrink: 0; }
.yt-row { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 16px; background: var(--card-bg); border: 1px solid var(--card-border); cursor: pointer; }
.yt-row .yt-thumb { width: 112px; flex-shrink: 0; }
.yt-row .yt-meta { flex: 1; min-width: 0; }
.yt-x { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: var(--text-muted); }
.ex-more { display: block; width: 100%; margin-top: 4px; padding: 12px; border-radius: 16px; font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; border: 1px solid var(--card-border); background: var(--card-bg); color: var(--text-main); }
.ex-more.hidden { display: none; }
.ex-more:disabled { opacity: 0.6; }
/* Voice calls (voice + Focus Sync): avatars instead of video that glow while that person speaks; mute next to End */
.voice-tile { display: none; }
#call-grid.call-voice .voice-tile { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--card-bg); }
#call-grid.call-voice video { opacity: 0; }
#call-grid.call-voice #btn-lens { display: none; }
#call-grid.call-voice #local-cam-name, #call-grid.call-voice #remote-cam-name { z-index: 6; }
.voice-avatar { --voice: 0; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; font-weight: 800; color: var(--accent-text); background: var(--accent);
  transform: scale(calc(1 + var(--voice) * 0.08)); box-shadow: 0 0 0 calc(var(--voice) * 16px) color-mix(in srgb, var(--accent) 22%, transparent), 0 0 calc(var(--voice) * 30px) color-mix(in srgb, var(--accent) 45%, transparent); }
.voice-meta { font-size: 9px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.call-controls { position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); z-index: 30; display: flex; gap: 8px; white-space: nowrap; }
#btn-mute .i-off { display: none; }
#btn-mute.muted { background: #f43f5e; color: #fff; border-color: #f43f5e; }
#btn-mute.muted .i-on { display: none; }
#btn-mute.muted .i-off { display: inline; }
/* Living Heart (js/bond.js): bond meter under the heart, the sheet, skins */
.bond-meter { display: flex; align-items: center; gap: 10px; width: calc(100% - 32px); margin: 0 16px 14px; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--card-border); background: var(--card-bg); text-align: left; color: var(--text-main); }
.bond-emoji { font-size: 20px; line-height: 1; }
.bond-text { display: flex; flex-direction: column; min-width: 78px; }
.bond-text b { font-size: 12px; font-weight: 800; }
.bond-text small { font-size: 9px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.04em; }
.bond-bar { position: relative; flex: 1; height: 6px; border-radius: 999px; background: rgba(127, 127, 127, 0.16); overflow: hidden; }
.bond-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #fb7185, var(--accent)); }
.ls-how { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ls-how li { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--card-bg); border: 1px solid var(--card-border); font-size: 12px; font-weight: 700; }
.ls-how b { color: #f43f5e; font-weight: 800; }
.skin-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 18px; border: 1px solid var(--card-border); background: var(--card-bg); color: var(--text-main); }
.skin-card.current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.skin-card.locked .skin-swatch { filter: grayscale(0.7); opacity: 0.6; }
.skin-card b { font-size: 10px; font-weight: 800; text-align: center; line-height: 1.15; }
.skin-card small { font-size: 9px; font-weight: 700; color: var(--text-muted); }
.skin-swatch { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.18); }
.plus-pill { padding: 1px 7px; border-radius: 999px; font-size: 8px !important; font-weight: 800 !important; letter-spacing: 0.08em; text-transform: uppercase; color: #fff !important; background: linear-gradient(90deg, #f43f5e, #a855f7); }
/* Gifts, surprises & occasions (js/bond.js) */
#surprise-layer { position: fixed; inset: 0; z-index: 280; pointer-events: none; overflow: hidden; display: none; }
#surprise-layer.on { display: block; pointer-events: auto; }
.surprise-bit { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15)); }
.surprise-swatch { background: rgba(244, 63, 94, 0.1); }
.gift-chip { flex-shrink: 0; padding: 10px 14px; border-radius: 999px; font-size: 11px; font-weight: 800; border: 1px solid var(--card-border); background: var(--card-bg); color: var(--text-main); }
#occasion-overlay { position: fixed; inset: 0; z-index: 270; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(0, 0, 0, 0.35); }
#occasion-overlay.on { display: flex; }
.occasion-card { width: 100%; max-width: 340px; padding: 26px 22px 16px; border-radius: 28px; display: flex; flex-direction: column; gap: 12px; }
/* Time capsules (js/capsules.js) */
.capsule-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 16px; border: 1px solid var(--card-border); background: var(--card-bg); text-align: left; color: var(--text-main); }
.capsule-row.ready { border-color: #f43f5e; box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.14), 0 6px 18px rgba(244, 63, 94, 0.18); }
.capsule-icon { font-size: 22px; line-height: 1; }
.capsule-text { display: flex; flex-direction: column; min-width: 0; }
.capsule-text b { font-size: 12px; font-weight: 800; }
.capsule-text small { font-size: 10px; font-weight: 700; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#capsule-record.recording { background: #f43f5e; color: #fff; border-color: #f43f5e; }
/* Sleep call (js/sleep.js): near-black, a slow breathing glow, controls that fade away */
#sleep-screen { position: fixed; inset: 0; z-index: 250; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: #07070c; color: #cfc7d8; text-align: center; padding: 24px; }
#sleep-screen.on { display: flex; }
.sleep-glow { width: 150px; height: 150px; border-radius: 50%; margin-bottom: 26px; background: radial-gradient(circle, rgba(244, 114, 182, 0.35), rgba(99, 102, 241, 0.08) 60%, transparent 72%); animation: sleep-breathe 8s ease-in-out infinite; }
@keyframes sleep-breathe { 0%, 100% { transform: scale(0.85); opacity: 0.55; } 50% { transform: scale(1.1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sleep-glow { animation-name: sleep-breathe-soft; } }
@keyframes sleep-breathe-soft { 0%, 100% { transform: scale(0.92); opacity: 0.7; } 50% { transform: scale(1.02); opacity: 0.95; } }
.sleep-with { font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8; }
.sleep-clock { font-size: 40px; font-weight: 300; font-variant-numeric: tabular-nums; opacity: 0.85; }
.sleep-left { font-size: 11px; font-weight: 700; opacity: 0.55; }
.sleep-controls { margin-top: 30px; display: flex; flex-direction: column; gap: 10px; opacity: 0; pointer-events: none; transition: opacity 0.6s ease; }
#sleep-screen.awake .sleep-controls { opacity: 1; pointer-events: auto; }
.sleep-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sleep-row button { padding: 9px 14px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #cfc7d8; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); }
.sleep-row button[aria-pressed="true"] { background: rgba(244, 114, 182, 0.25); border-color: rgba(244, 114, 182, 0.5); color: #fff; }
.sleep-row .sleep-end { background: rgba(244, 63, 94, 0.25); border-color: rgba(244, 63, 94, 0.5); color: #fff; }
.sleep-hint { font-size: 10px; opacity: 0.4; margin-top: 4px; }

/* ---- Discretion shield: neutral lock screen (looks like a plain notes app) ---- */
#lock-screen { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; background: #f4f1ec; color: #3b3632; padding: 24px; font-family: system-ui, sans-serif; }
#lock-screen.on { display: flex; }
#lock-screen.blank .lock-box { display: none; }
.lock-box { width: 100%; max-width: 280px; display: flex; flex-direction: column; align-items: stretch; gap: 10px; text-align: center; }
.lock-icon { margin: 0 auto 2px; width: 56px; height: 56px; border-radius: 16px; background: #e9e5df; color: #8a817a; display: flex; align-items: center; justify-content: center; }
.lock-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
#lock-screen input { border: 1px solid #d9d3cb; background: #fff; border-radius: 12px; padding: 12px 14px; font-size: 18px; text-align: center; letter-spacing: 0.3em; color: #3b3632; outline: none; }
#lock-screen input#lock-room { letter-spacing: 0.1em; font-size: 15px; }
#lock-screen input:focus { border-color: #a39a92; }
#lock-unlock, #lock-room-go { border: 0; border-radius: 12px; padding: 12px; background: #3b3632; color: #f4f1ec; font-weight: 700; font-size: 14px; }
#lock-unlock:disabled { opacity: 0.4; }
.lock-error { min-height: 1.2em; font-size: 12px; color: #b0483a; margin: 0; }
.lock-link { background: none; border: 0; color: #8a817a; font-size: 12px; text-decoration: underline; }
.lock-forgot { display: flex; flex-direction: column; gap: 8px; }
.lock-forgot.hidden { display: none; }
/* ---- Occasion packs: banner on the Us tab + rows in the Living Heart sheet ---- */
.occasion-banner { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 20px; flex-shrink: 0;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent, #e86a8a) 22%, var(--card-bg)), var(--card-bg)); border: 1px solid color-mix(in srgb, var(--accent, #e86a8a) 30%, transparent); }
.occasion-banner.hidden { display: none; }
.occasion-banner b { display: block; font-size: 14px; font-weight: 800; }
.occasion-banner small { display: block; font-size: 11px; font-weight: 600; opacity: 0.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.occ-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--card-bg); text-align: left; }
.occ-row b { flex: 1; font-size: 13px; font-weight: 800; min-width: 0; }
.occ-row small { font-size: 10px; font-weight: 700; opacity: 0.6; white-space: nowrap; }
.occ-row .occ-emoji { font-size: 20px; }
.occ-row.today { outline: 2px solid var(--accent, #e86a8a); }
.occ-row:disabled { opacity: 1; cursor: default; }
/* ---- Good-morning notes: time choices ---- */
.timed-time { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 16px; background: var(--card-bg); border: 2px solid transparent; }
.timed-time b { font-size: 14px; font-weight: 800; }
.timed-time small { font-size: 10px; font-weight: 700; opacity: 0.6; }
.timed-time.on { border-color: var(--accent); }
/* ---- Plus value screen ---- */
.plus-soon { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; font-size: 12px; font-weight: 700; background: color-mix(in srgb, #a855f7 14%, var(--card-bg)); }
.plus-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 18px; background: var(--card-bg); }
.plus-row b { display: block; font-size: 13px; font-weight: 800; }
.plus-row small { display: block; font-size: 11px; font-weight: 600; opacity: 0.65; line-height: 1.4; }
.plus-emoji { font-size: 22px; line-height: 1.2; }
.plus-price { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 16px 4px 12px; border-radius: 18px; background: var(--card-bg); border: 2px solid transparent; text-align: center; }
.plus-price.best { border-color: #a855f7; }
.plus-price b { font-size: 18px; font-weight: 800; }
.plus-price small { font-size: 10px; font-weight: 700; opacity: 0.6; }
.plus-price em { font-style: normal; font-size: 10px; font-weight: 800; margin-top: 4px; color: #a855f7; }
.plus-best { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 9px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; background: #a855f7; color: #fff; }
.plus-free { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; }
.plus-free li::before { content: "✓ "; font-weight: 800; color: #10b981; }
.soon-pill { font-size: 9px; padding: 1px 7px; border-radius: 99px; background: var(--card-border); }
.plus-pill { cursor: pointer; }
/* ---- Breathe together: the breathing ring, progress dots, the in-sync glow ---- */
.orb-breaths { position: absolute; left: 0; right: 0; top: 36px; z-index: 10; display: flex; justify-content: center; gap: 8px; opacity: 0; transition: opacity 0.4s ease; pointer-events: none; }
.orb-breaths.on { opacity: 1; }
.orb-breaths i { width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--text-main, #333) 18%, transparent); transition: background 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.orb-breaths i.done { background: #ff7aa2; transform: scale(1.35); }
.orb-breaths.alone i.done { background: color-mix(in srgb, var(--text-main, #333) 55%, transparent); }
/* ---- Visit kit: the "when we meet" list ---- */
.visit-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: color-mix(in srgb, var(--card-bg) 70%, transparent); font-size: 13px; font-weight: 600; }
.visit-item.done span { text-decoration: line-through; opacity: 0.55; }
.visit-check { width: 24px; height: 24px; flex-shrink: 0; border-radius: 8px; border: 2px solid color-mix(in srgb, var(--text-main, #333) 30%, transparent); font-size: 13px; font-weight: 800; line-height: 1; }
.visit-item.done .visit-check { background: #10b981; border-color: #10b981; color: #fff; }
.visit-x { width: 24px; height: 24px; flex-shrink: 0; font-size: 18px; opacity: 0.4; }
/* A progress bar stacked in a column keeps its 6px height (flex: 1 would squash it). */
.flex-col > .bond-bar { flex: none; }
/* Hold-to-hug buttons fill up as the hug gets tighter. */
.hug-hold { position: relative; overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; }
.hug-hold::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--fill, 0) * 100%); background: rgba(255, 105, 150, 0.28); pointer-events: none; }
.hug-hold.on-dark::after { background: rgba(255, 255, 255, 0.32); }
.hug-hold.hug-holding { transform: scale(0.97); }
/* ---- Our Story: full-screen cards, tap left/right, bars on top ---- */
.story-view { position: fixed; inset: 0; z-index: 290; display: none; color: #fff; transition: background 0.6s ease; }
.story-view.on { display: block; }
.story-bars { position: absolute; top: 14px; left: 12px; right: 52px; display: flex; gap: 4px; z-index: 3; }
.story-bars span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.35); overflow: hidden; }
.story-bars i { display: block; height: 100%; width: 0; background: #fff; }
.story-close { position: absolute; top: 4px; right: 8px; width: 40px; height: 40px; font-size: 30px; line-height: 1; color: #fff; z-index: 4; }
.story-slide { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 32px; text-align: center; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.18); }
.story-emoji { font-size: 84px; line-height: 1; }
.story-big { font-size: 34px; font-weight: 800; line-height: 1.15; max-width: 320px; }
.story-line { font-size: 16px; font-weight: 600; opacity: 0.92; max-width: 300px; line-height: 1.45; }
.story-tap { position: absolute; top: 60px; bottom: 0; width: 38%; z-index: 2; }
.story-tap.left { left: 0; } .story-tap.right { right: 0; width: 62%; }
.story-actions { display: flex; gap: 10px; margin-top: 18px; position: relative; z-index: 5; }
.story-btn { padding: 12px 20px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: #6b2d5c; font-weight: 800; font-size: 13px; text-shadow: none; }
/* ---- Plus: chosen plan + status ---- */
.plus-price.chosen { border-color: var(--accent); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); }
.plus-price.best.chosen { border-color: #a855f7; }
.plus-on { padding: 12px 14px; border-radius: 14px; font-size: 12px; font-weight: 700; background: color-mix(in srgb, #10b981 14%, var(--card-bg)); }
/* ---- Your hand's skin tone ---- */
.hand-tones { display: flex; gap: 10px; flex-wrap: wrap; padding: 2px 4px; }
.hand-tones button { width: 36px; height: 36px; border-radius: 50%; border: 3px solid transparent; box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.12); }
.hand-tones button[aria-checked="true"] { border-color: var(--accent); }

/* ---------- Themes sheet (js/themes.js) ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.theme-card { position: relative; }
.theme-pick { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px 10px; border-radius: 18px; text-align: center; min-height: 128px;
  background: var(--bg-art), linear-gradient(145deg, var(--bg-top) 0%, var(--bg-bottom) 100%); border: 1px solid var(--card-border); color: var(--text-main); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08); }
.theme-pick b { font-size: 12px; font-weight: 800; line-height: 1.1; }
.theme-pick small { font-size: 9.5px; font-weight: 600; color: var(--text-muted); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.theme-card.active .theme-pick { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.theme-card.locked .theme-swatch { filter: saturate(0.75); }
.theme-swatch { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6), 0 3px 10px rgba(0, 0, 0, 0.15); }
.theme-badge { margin-top: auto; font-size: 8.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 7px; border-radius: 999px; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-muted); }
.theme-badge.plus, .theme-badge.limited { color: var(--accent); border-color: currentColor; }
.theme-badge.own { background: var(--accent); color: var(--bg-top); border-color: var(--accent); }
.theme-gift { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px;
  background: var(--pill-bg); box-shadow: 0 2px 8px var(--shadow); }
.colour-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; border: 2px dashed var(--text-muted); flex: none; }
.colour-dot[style*="background: rgb"], .colour-dot[style*="background: #"] { border: 2px solid rgba(255, 255, 255, 0.7); }
.colour-preset { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.75); box-shadow: 0 2px 6px var(--shadow); }
.colour-input { width: 34px; height: 30px; border: 0; padding: 0; background: transparent; }

/* Anniversary bloom (free, all day): petals and a gold glow around the heart */
.anniv-bloom #orb-stage { isolation: isolate; }
.anniv-bloom #orb-stage::before { content: ''; position: absolute; inset: -6px 8%; z-index: -1; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 196, 106, 0.32) 0 34%, transparent 62%),
    radial-gradient(7px 11px at 50% 6%, rgba(232, 92, 128, 0.75), transparent), radial-gradient(7px 11px at 86% 24%, rgba(232, 92, 128, 0.6), transparent),
    radial-gradient(7px 11px at 94% 62%, rgba(233, 196, 106, 0.8), transparent), radial-gradient(7px 11px at 70% 92%, rgba(232, 92, 128, 0.6), transparent),
    radial-gradient(7px 11px at 30% 92%, rgba(233, 196, 106, 0.8), transparent), radial-gradient(7px 11px at 6% 62%, rgba(232, 92, 128, 0.6), transparent),
    radial-gradient(7px 11px at 14% 24%, rgba(233, 196, 106, 0.8), transparent); }

/* ---------- Gift-wrap (js/wrap.js) ---------- */
.theme-hint { position: absolute; top: 6px; left: 6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px;
  background: var(--pill-bg); color: var(--text-main); box-shadow: 0 2px 8px var(--shadow); }
.theme-hint.on { background: var(--accent); color: var(--bg-top); }
.wrap-emoji { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; font-size: 38px; background: var(--card-bg); box-shadow: 0 8px 24px var(--shadow); }
.gift-overlay { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 24px;
  background: rgba(10, 8, 14, 0.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; }
.gift-overlay.on { display: flex; }
.gift-card { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.gift-env { position: relative; width: 260px; height: 172px; border-radius: 18px; overflow: visible; cursor: pointer;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 22%, #fff8f2), #fff3ea); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); color: #2a1b2e; }
.gift-env .env-flap { z-index: 3; border-radius: 18px 18px 0 0; background: linear-gradient(180deg, #ffffff, color-mix(in srgb, var(--accent) 28%, #fff3ea)); }
.gift-env .env-seal { z-index: 4; width: 42px; height: 42px; font-size: 18px; }
.gift-inside { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; opacity: 0; transition: opacity 0.4s ease 0.25s; }
.gift-inside b { font-size: 16px; font-weight: 800; }
.gift-emoji { font-size: 52px; line-height: 1; }
.gift-tap { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 5; font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #6b4a56; }
.gift-overlay.revealed .gift-inside { opacity: 1; }
.gift-overlay.revealed .gift-tap { display: none; }
.gift-note { font-size: 15px; font-weight: 600; line-height: 1.45; max-width: 300px; }
.gift-actions { display: flex; gap: 10px; opacity: 0; pointer-events: none; transition: opacity 0.3s ease 0.4s; }
.gift-overlay.revealed .gift-actions { opacity: 1; pointer-events: auto; }
.gift-overlay:not(.revealed) .gift-note { opacity: 0; }

/* ---------- Our World + Care + Lamp (js/world.js, js/care.js, js/lamp.js) ---------- */
.world-entry-icons { font-size: 18px; letter-spacing: -2px; }
.world-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.world-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border-radius: 18px; text-align: left;
  background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); }
.world-tile b { font-size: 13px; font-weight: 800; }
.world-tile small { font-size: 10.5px; font-weight: 600; color: var(--text-muted); line-height: 1.3; }
.world-tile .plus-pill { position: absolute; top: 10px; right: 10px; }
.world-emoji { font-size: 22px; margin-bottom: 4px; }
.care-win { display: flex; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 600; padding: 6px 2px; border-bottom: 1px dashed var(--card-border); }
.care-win-who { font-size: 9px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); flex: none; }
.care-win small { font-size: 10px; color: var(--text-muted); flex: none; }
.care-held { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; background: var(--card-bg); border: 1px solid var(--card-border); }
.care-held.due { border-color: var(--accent); }
.care-btn { font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: var(--pill-bg); color: var(--text-main); border: 1px solid var(--card-border); }
.goodnews-burst { line-height: 1; display: flex; justify-content: center; }
.goodnews-burst svg { animation: gn-glow 2.4s ease-in-out infinite; filter: drop-shadow(0 4px 14px rgba(200, 150, 63, .45)); }
.goodnews-burst .gn-twin { transform-box: fill-box; transform-origin: center; animation: gn-twin 1.8s ease-in-out infinite; }
.goodnews-burst .gn-twin.b { animation-delay: .9s; }
@keyframes gn-glow { 50% { transform: scale(1.06) rotate(4deg); } }
@keyframes gn-twin { 50% { transform: scale(.4); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { @keyframes gn-glow { 50% { transform: scale(1.03) rotate(2deg); } } @keyframes gn-twin { 50% { transform: scale(.7); opacity: .7; } } }
.endcard { position: fixed; left: 16px; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 70; max-width: 26rem; margin: 0 auto; padding: 16px; border-radius: 24px;
  display: none; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--text-main); }
.endcard.on { display: flex; }
.lamp-overlay { position: fixed; inset: 0; z-index: 95; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 24px;
  background: #07060a; color: #f5ead8; --lamp-boost: 0; --lamp-c: var(--accent); }
.lamp-overlay.on { display: flex; }
.lamp-close { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 16px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: #f5ead8; font-size: 16px; }
.lamp-light { position: relative; width: 220px; height: 220px; display: grid; place-items: center; }
.lamp-light i { position: absolute; display: block; }
.lamp-light::before { content: ''; position: absolute; inset: -60px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--lamp-c) 70%, #ffd9a0) 0%, transparent 62%);
  opacity: calc(0.42 + 0.58 * var(--lamp-boost)); transform: scale(calc(1 + 0.12 * var(--lamp-boost))); }
.lamp-their { font-size: 13px; font-weight: 700; text-align: center; min-height: 1.4em; }
.lamp-controls { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 26rem; }
.lamp-chip { font-size: 11px; font-weight: 800; padding: 8px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); color: #f5ead8; border: 1px solid rgba(255, 255, 255, 0.1); }
.lamp-chip.on { background: #f5ead8; color: #07060a; }
.lamp-chip.locked { opacity: 0.55; }
/* the five lamps, drawn in CSS; brightness only changes when a touch arrives */
.lamp-overlay[data-lamp="glow"] .lamp-light i:first-child { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 45% 40%, #fff6e6, color-mix(in srgb, var(--lamp-c) 60%, #ffcf8a)); box-shadow: 0 0 60px color-mix(in srgb, var(--lamp-c) 60%, #ffcf8a); }
.lamp-overlay[data-lamp="diya"] { --lamp-c: #ffb347; }
.lamp-overlay[data-lamp="diya"] .lamp-light i:nth-child(1) { width: 140px; height: 54px; bottom: 60px; border-radius: 0 0 70px 70px; background: linear-gradient(180deg, #c8662e, #7a3414); }
.lamp-overlay[data-lamp="diya"] .lamp-light i:nth-child(2) { width: 34px; height: 60px; bottom: 108px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 50% 70%, #fff3c4, #ffb347 55%, #ff7a1a); box-shadow: 0 0 40px #ffb347; transform: scale(calc(1 + 0.25 * var(--lamp-boost))); transform-origin: 50% 100%; }
.lamp-overlay[data-lamp="lantern"] { --lamp-c: #ff6b4a; }
.lamp-overlay[data-lamp="lantern"] .lamp-light i:nth-child(1) { width: 120px; height: 150px; border-radius: 48% 48% 44% 44%; background: radial-gradient(circle at 50% 45%, #ffe3c2, #ff6b4a 70%, #b8322a); box-shadow: 0 0 50px #ff6b4a; }
.lamp-overlay[data-lamp="lantern"] .lamp-light i:nth-child(2) { width: 60px; height: 10px; top: 28px; border-radius: 4px; background: #3a1d12; }
.lamp-overlay[data-lamp="lantern"] .lamp-light i:nth-child(3) { width: 60px; height: 10px; bottom: 28px; border-radius: 4px; background: #3a1d12; }
.lamp-overlay[data-lamp="moonjar"] { --lamp-c: #cfe3ff; }
.lamp-overlay[data-lamp="moonjar"] .lamp-light i:nth-child(1) { width: 130px; height: 150px; border-radius: 40% 40% 46% 46%; background: linear-gradient(180deg, rgba(220, 235, 255, 0.18), rgba(220, 235, 255, 0.06)); border: 2px solid rgba(220, 235, 255, 0.4); }
.lamp-overlay[data-lamp="moonjar"] .lamp-light i:nth-child(2) { width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffffff, #cfe3ff 60%, #8fa9d6); box-shadow: 0 0 40px #cfe3ff; }
.lamp-overlay[data-lamp="fireflies"] { --lamp-c: #d8ff7a; }
.lamp-overlay[data-lamp="fireflies"] .lamp-light i { width: 10px; height: 10px; border-radius: 50%; background: #efffb0; box-shadow: 0 0 16px 4px #d8ff7a; }
.lamp-overlay[data-lamp="fireflies"] .lamp-light i:nth-child(1) { left: 40px; top: 60px; } .lamp-overlay[data-lamp="fireflies"] .lamp-light i:nth-child(2) { left: 150px; top: 40px; }
.lamp-overlay[data-lamp="fireflies"] .lamp-light i:nth-child(3) { left: 110px; top: 120px; } .lamp-overlay[data-lamp="fireflies"] .lamp-light i:nth-child(4) { left: 60px; top: 160px; }
.lamp-overlay[data-lamp="fireflies"] .lamp-light i:nth-child(5) { left: 170px; top: 150px; }

/* ---------- Festivals (js/festive.js) ---------- */
.moon-row { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--card-bg); border: 1px solid var(--card-border); }
.moon-row b { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.moon-row span { font-size: 15px; font-weight: 800; }
/* the chalni (sieve) frame over the video during Karva Chauth */
.chalni-on #call-grid > div:first-child::after { content: ''; position: absolute; inset: 6%; border-radius: 50%; pointer-events: none; z-index: 5;
  border: 10px solid rgba(214, 170, 72, 0.92); box-shadow: 0 0 0 3px rgba(120, 80, 20, 0.6), inset 0 0 0 3px rgba(120, 80, 20, 0.5);
  background: repeating-linear-gradient(45deg, rgba(214, 170, 72, 0.22) 0 1px, transparent 1px 9px), repeating-linear-gradient(-45deg, rgba(214, 170, 72, 0.22) 0 1px, transparent 1px 9px); }
.diya-stage { position: relative; width: 240px; height: 240px; touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
.diya-stage i { position: absolute; display: block; left: 50%; transform: translateX(-50%); }
.diya-bowl { bottom: 52px; width: 170px; height: 64px; border-radius: 0 0 90px 90px; background: linear-gradient(180deg, #d1773c, #7a3414); box-shadow: inset 0 6px 0 rgba(255, 210, 160, 0.35), 0 10px 26px rgba(0, 0, 0, 0.25); }
.diya-flame { bottom: 112px; width: 38px; height: 66px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 50% 72%, #fff6cf, #ffb347 55%, #ff7a1a);
  opacity: 0; transform: translateX(-50%) scale(0.2); transform-origin: 50% 100%; transition: opacity 0.6s ease, transform 0.9s cubic-bezier(.2, 1.4, .4, 1); }
.diya-glow { bottom: 30px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 179, 71, 0.55), transparent 62%); opacity: 0; transition: opacity 0.8s ease; }
.diya-stage.mine .diya-bowl { box-shadow: inset 0 6px 0 rgba(255, 210, 160, 0.35), 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent), 0 10px 26px rgba(0, 0, 0, 0.25); }
.diya-stage.kindling .diya-flame { opacity: 0.7; transform: translateX(-50%) scale(0.55); }
.diya-stage.lit .diya-flame { opacity: 1; transform: translateX(-50%) scale(1); }
.diya-stage.lit .diya-glow { opacity: 1; }

/* ---------- Keepsakes (js/keepsakes.js) ---------- */
#sky-canvas { aspect-ratio: 4 / 5; height: auto; background: #0b1026; }
.dialect-entry { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 16px; background: var(--card-bg); border: 1px solid var(--card-border); }
.dialect-entry b { font-size: 15px; font-weight: 800; color: var(--accent); }

/* ---------- Rituals + quests + learn (js/rituals.js, js/quests.js) ---------- */
.ritual-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 18px; background: var(--card-bg); border: 1px solid var(--card-border); }
.ritual-card.waiting { border-style: dashed; }
.ritual-num { font-size: 9px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.ritual-count { font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--bg-top); flex: none; }
.gift-chip.on { background: var(--accent); color: var(--bg-top); border-color: var(--accent); }
.quest-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 16px; text-align: left; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); }
.quest-row b { font-size: 13px; font-weight: 800; }
.quest-row small { font-size: 10.5px; font-weight: 700; color: var(--text-muted); }
.quest-row.done { border-color: var(--accent); }
.quest-row:disabled { opacity: 0.55; }
.quest-answer { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 14px; background: var(--card-bg); border: 1px solid var(--card-border); }
.learn-step { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--card-bg); border: 1px solid var(--card-border); }
.learn-step.later { opacity: 0.5; }
.learn-step.now { border-color: var(--accent); }
.learn-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 11px; font-weight: 800; background: var(--pill-bg); }
.learn-step.done .learn-dot, .learn-step.now .learn-dot { background: var(--accent); color: var(--bg-top); }

/* ---------- Photos, play, letters, bucket (js/photos.js, js/play.js, js/letters.js, js/bucket.js) ---------- */
.photo-frame { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.photo-frame img { width: 100%; border-radius: 16px; object-fit: cover; aspect-ratio: 4 / 3; background: var(--card-bg); }
.photo-frame.big img { aspect-ratio: auto; max-height: 340px; }
.photo-frame figcaption { font-size: 12px; font-weight: 700; }
.photo-frame.f-polaroid { background: #fbf8f2; padding: 10px 10px 14px; border-radius: 6px; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18); transform: rotate(-1.2deg); }
.photo-frame.f-polaroid img { border-radius: 2px; }
.photo-frame.f-polaroid figcaption { color: #2a2622; text-align: center; font-family: 'Plus Jakarta Sans', sans-serif; }
.photo-frame.f-film { background: #111; padding: 14px 8px; border-radius: 6px;
  background-image: repeating-linear-gradient(90deg, #f5f1e8 0 8px, transparent 8px 20px), repeating-linear-gradient(90deg, #f5f1e8 0 8px, transparent 8px 20px);
  background-size: 100% 6px, 100% 6px; background-position: 0 3px, 0 calc(100% - 3px); background-repeat: no-repeat; }
.photo-frame.f-film img { border-radius: 2px; filter: sepia(0.18) contrast(1.05); }
.photo-frame.f-film figcaption { color: #f5f1e8; }
.photo-frame.f-heart img { -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 90'><path d='M50 88C20 66 0 48 0 26 0 11 12 0 27 0c10 0 18 6 23 14C55 6 63 0 73 0c15 0 27 11 27 26 0 22-20 40-50 62z'/></svg>") center / contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 90'><path d='M50 88C20 66 0 48 0 26 0 11 12 0 27 0c10 0 18 6 23 14C55 6 63 0 73 0c15 0 27 11 27 26 0 22-20 40-50 62z'/></svg>") center / contain no-repeat; border-radius: 0; aspect-ratio: 10 / 9; }
.photo-cell { display: flex; flex-direction: column; gap: 4px; }
.photo-cell small { font-size: 10px; font-weight: 700; color: var(--text-muted); }
.play-status { text-align: center; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.ttt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 300px); margin: 0 auto; }
.ttt-cell { aspect-ratio: 1; border-radius: 18px; font-size: 34px; background: var(--card-bg); border: 1px solid var(--card-border); display: grid; place-items: center; }
.ttt-cell:disabled:not(.set) { opacity: 0.6; }
.wyr-opt { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 18px; text-align: center; font-size: 14px; font-weight: 800; background: var(--card-bg); border: 1.5px solid var(--card-border); color: var(--text-main); }
.wyr-opt small { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.wyr-opt.mine { border-color: var(--accent); }
.wyr-opt.chosen { background: color-mix(in srgb, var(--accent) 14%, var(--card-bg)); }
.letter-card { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 14px; border-radius: 18px; background: var(--card-bg); border: 1px dashed var(--accent); }
.letter-card.open { border-style: solid; border-color: var(--card-border); }
.letter-text { font-size: 14px; font-weight: 600; line-height: 1.55; white-space: pre-wrap; }

/* ---------- Our Home (js/home.js): wall, floor and nine spots ---------- */
.home-scene { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 26px; overflow: hidden; box-shadow: 0 14px 36px var(--shadow), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  background: linear-gradient(180deg, var(--wall) 0 42%, color-mix(in srgb, var(--wall) 80%, #000) 42% 43%, var(--floor) 43% 100%); }
.home-scene::after { content: ''; position: absolute; left: 0; right: 0; top: 43%; bottom: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0 2px, transparent 2px 56px), linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent 30%); }
.home-spot { position: absolute; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 38px; z-index: 1; }
.home-spot.empty { font-size: 20px; font-weight: 800; color: rgba(0, 0, 0, 0.35); border: 2px dashed rgba(0, 0, 0, 0.18); background: rgba(255, 255, 255, 0.18); }
.home-spot.proposed { opacity: 0.6; }
.home-spot.set { filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.25)); }
.home-spot.sel { outline: 3px solid var(--accent); outline-offset: 2px; }
.home-ask { position: absolute; top: -4px; right: -4px; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 800; font-style: normal; display: grid; place-items: center; background: var(--accent); color: var(--bg-top); }
.home-items { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.home-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); }
.home-item span { font-size: 26px; }
.home-item small { font-size: 9px; font-weight: 700; color: var(--text-muted); text-align: center; line-height: 1.2; }
.home-item.locked { opacity: 0.5; }

/* ---------- Living wallpaper (js/wallpaper.js) ---------- */
#wallpaper { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 0.9s ease; }
#wallpaper canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
body.wp-on #wallpaper { opacity: 1; }
#app-container { position: relative; z-index: 1; }
/* With a living wallpaper, cards become clearer glass so the movement shows through softly
   (light themes: the card still lightens what's behind dark text; dark themes: a hint of white). */
body.wp-on .soft-card { background: color-mix(in srgb, var(--card-bg) 70%, transparent);
  backdrop-filter: blur(12px) saturate(150%); -webkit-backdrop-filter: blur(12px) saturate(150%); }

/* ---------- Dream Home (js/house-*.js) ---------- */
.house-modal { padding: calc(14px + env(safe-area-inset-top)) 14px 0; display: flex; flex-direction: column; }
.house-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.house-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.house-tabs button { flex: none; padding: 8px 12px; border-radius: 999px; font-size: 11px; font-weight: 800; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); }
.house-tabs button.on { background: var(--accent); color: var(--bg-top); border-color: var(--accent); }
.house-body { flex: 1; overflow-y: auto; padding: 4px 2px calc(24px + env(safe-area-inset-bottom)); scrollbar-width: none; }
.house-card, .house-style { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 18px; text-align: center; background: var(--card-bg); border: 1.5px solid var(--card-border); color: var(--text-main); }
.house-card.on, .house-style.on { border-color: var(--accent); box-shadow: 0 6px 18px var(--shadow); }
.house-card.locked, .house-style.locked { opacity: 0.6; }
.house-card b, .house-style b { font-size: 12px; font-weight: 800; }
.house-card small, .house-style small { font-size: 10px; font-weight: 600; color: var(--text-muted); line-height: 1.3; }
.house-mini { width: 38px; border-radius: 4px; background: repeating-linear-gradient(0deg, #e9dfcc 0 3px, #e2d6bf 3px 6px); border: 2px solid #8a7a64; }
.house-style-swatch { width: 100%; height: 64px; border-radius: 12px; display: grid; place-items: center; font-size: 26px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); }
.house-chip { padding: 9px 10px; border-radius: 14px; font-size: 11px; font-weight: 800; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); }
.house-chip.on { background: var(--accent); color: var(--bg-top); border-color: var(--accent); }
.house-chip:disabled { opacity: 0.5; }
.house-plan { width: 100%; aspect-ratio: 36 / 52; border-radius: 18px; background: #e8e1d3; touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.house-plan .hp-room { cursor: grab; }
.house-issues { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; padding: 0 2px; }
.house-issues .err { color: #c0392b; } .house-issues .tip { color: var(--text-muted); } .house-issues .ok { color: #2e7d4f; }
.house-3d { position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 22px; overflow: hidden; background: linear-gradient(#8fbbe3, #eaf2f7); box-shadow: 0 12px 30px var(--shadow); touch-action: none; }
.house-views { position: absolute; top: 8px; left: 8px; z-index: 2; display: flex; gap: 4px; }
.house-views button { padding: 6px 10px; border-radius: 999px; font-size: 10px; font-weight: 800; background: rgba(255, 255, 255, 0.82); color: #2b2a28; }
.house-stages { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.house-stage { display: flex; flex-direction: column; align-items: center; gap: 2px; opacity: 0.5; }
.house-stage span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: var(--card-bg); border: 1px solid var(--card-border); }
.house-stage small { font-size: 7.5px; font-weight: 800; text-align: center; line-height: 1.15; }
.house-stage.done, .house-stage.now { opacity: 1; }
.house-stage.done span { background: var(--accent); color: var(--bg-top); }
.house-stage.now span { border: 2px solid var(--accent); }
.house-lay { position: relative; overflow: hidden; padding: 18px; border-radius: 22px; font-size: 14px; font-weight: 800; color: var(--bg-top); background: linear-gradient(135deg, #b9603f, #8f3e25); box-shadow: 0 10px 24px rgba(143, 62, 37, 0.35); user-select: none; -webkit-user-select: none; touch-action: none; }
.house-lay:disabled { background: var(--card-bg); color: var(--text-main); box-shadow: none; border: 1px solid var(--card-border); }
.house-lay-ring { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: rgba(255, 255, 255, 0.22); }
.house-lay.holding .house-lay-ring { transform: scaleX(1); transition: transform 1.4s linear; }
.house-lay span:last-child { position: relative; }
.house-ceremony { position: absolute; inset: 0; z-index: 30; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(10, 8, 14, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; text-align: center; }
.house-ceremony.on { display: flex; }
/* ---------- Dream Home, Phase 2: Home & garden */
.house-tour-cap { position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 8px); z-index: 2; padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 800; color: #fff; background: rgba(12, 10, 20, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .5s, transform .5s; pointer-events: none; white-space: nowrap; }
.house-tour-cap.on { opacity: 1; transform: translate(-50%, 0); }
.hl-plants { display: flex; flex-direction: column; gap: 6px; }
.hl-plant { position: relative; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 2px 8px; padding: 8px 10px 12px; border-radius: 14px; background: var(--card-bg); border: 1px solid var(--card-border); }
.hl-plant-emoji { font-size: 24px; grid-row: span 1; }
.hl-plant b { font-size: 12px; font-weight: 800; }
.hl-plant small { font-size: 10px; font-weight: 700; color: var(--text-muted); }
.hl-bar { position: absolute; left: 10px; right: 10px; bottom: 5px; height: 3px; border-radius: 3px; background: rgba(0, 0, 0, 0.08); overflow: hidden; }
.hl-bar::after { content: ''; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--k, 0)); background: linear-gradient(90deg, #7fbf5a, #2e8b3a); border-radius: 3px; }
.house-chip.locked { opacity: 0.6; }
.hl-rooms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.hl-room { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 16px; background: var(--card-bg); border: 1.5px solid var(--card-border); color: var(--text-main); text-align: center; }
.hl-room.on { border-color: var(--accent); box-shadow: 0 6px 16px var(--shadow); }
.hl-room span { font-size: 24px; }
.hl-room b { font-size: 11px; font-weight: 800; line-height: 1.2; }
.hl-room small { font-size: 9px; font-weight: 700; color: var(--text-muted); line-height: 1.2; }
.hl-pin { display: grid; grid-template-columns: 20px 1fr auto 26px; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 12px; background: var(--card-bg); }
.hl-pin p { font-size: 12px; font-weight: 700; }
.hl-pin small { font-size: 10px; font-weight: 700; color: var(--text-muted); }
.hl-x { width: 26px; height: 26px; border-radius: 50%; font-weight: 800; color: var(--text-muted); }
/* the closed door of a surprise room */
.hl-door { position: relative; height: 220px; border-radius: 18px 18px 6px 6px; overflow: hidden; perspective: 900px; background: radial-gradient(ellipse at 50% 70%, #ffe7b0, #c98a4a 70%); box-shadow: inset 0 0 0 8px #6b4226, 0 12px 28px var(--shadow); }
.hl-door i, .hl-reveal-doors i { position: absolute; top: 0; bottom: 0; width: 50%; background: repeating-linear-gradient(90deg, #8a5a34 0 14px, #7c4f2d 14px 16px); box-shadow: inset 0 0 0 6px #5e3a20; }
.hl-door .hl-door-l, .hl-reveal-doors .hl-door-l { left: 0; transform-origin: left; }
.hl-door .hl-door-r, .hl-reveal-doors .hl-door-r { right: 0; transform-origin: right; }
.hl-door .hl-door-l::after, .hl-door .hl-door-r::after { content: ''; position: absolute; top: 52%; width: 8px; height: 8px; border-radius: 50%; background: #e6c15c; }
.hl-door .hl-door-l::after { right: 10px; } .hl-door .hl-door-r::after { left: 10px; }
.hl-door-tag { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); z-index: 2; padding: 6px 12px; border-radius: 999px; font-size: 11px; font-weight: 800; background: #fff6e6; color: #5e3a20; white-space: nowrap; }
.hl-door.ready .hl-door-l { animation: hl-peek 3.2s ease-in-out infinite; }
@keyframes hl-peek { 0%, 70%, 100% { transform: rotateY(0); } 80% { transform: rotateY(-14deg); } 90% { transform: rotateY(-4deg); } }
/* the door-opening moment */
.hl-reveal { position: absolute; inset: 0; z-index: 31; display: none; align-items: center; justify-content: center; padding: 24px; perspective: 1200px; background: radial-gradient(ellipse at center, rgba(255, 214, 140, 0.95), rgba(120, 60, 20, 0.92)); color: #fff; text-align: center; }
.hl-reveal.on { display: flex; }
.hl-reveal .gift-card { position: relative; z-index: 3; opacity: 0; transform: scale(0.92); transition: opacity .6s .9s, transform .8s .9s cubic-bezier(.2, 1.4, .4, 1); }
.hl-reveal.open .gift-card { opacity: 1; transform: none; }
.hl-reveal-doors { position: absolute; inset: 0; z-index: 2; pointer-events: none; perspective: 1100px; }
.hl-reveal-doors i { transition: transform 1.4s cubic-bezier(.6, 0, .2, 1); }
.hl-reveal.open .hl-door-l { transform: rotateY(-105deg); }
.hl-reveal.open .hl-door-r { transform: rotateY(105deg); }
@media (prefers-reduced-motion: reduce) {
  .hl-reveal-doors i { transition-duration: .7s; }
  .hl-reveal.open .hl-door-l { transform: rotateY(-100deg); } .hl-reveal.open .hl-door-r { transform: rotateY(100deg); }
  .hl-door.ready .hl-door-l { animation-duration: 6.4s; }
}
/* ---------- Dream Home, Phase 3: the design pack */
.hp-list { display: flex; flex-direction: column; gap: 4px; padding-left: 4px; }
.hp-list li { font-size: 12px; font-weight: 700; padding-left: 18px; position: relative; }
.hp-list li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.hp-thumb { display: flex; flex-direction: column; gap: 2px; padding: 18px 16px; border-radius: 16px; color: #f3d99a; background: linear-gradient(160deg, #2f2a24, #4a3c2e); box-shadow: 0 10px 24px var(--shadow); }
.hp-thumb b { font-family: Georgia, serif; font-size: 22px; font-weight: 700; }
.hp-thumb small { font-size: 11px; font-weight: 700; color: #efe6d6; opacity: 0.85; }
.hp-steps { display: flex; flex-direction: column; gap: 8px; counter-reset: hp; }
.hp-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 0 8px; align-items: start; }
.hp-steps li span { grid-row: span 2; font-size: 20px; }
.hp-steps li b { font-size: 12px; font-weight: 800; }
.hp-steps li small { font-size: 11px; font-weight: 600; color: var(--text-muted); line-height: 1.35; }
[data-hpanel="pack"].hp-busy { opacity: 0.6; pointer-events: none; cursor: progress; }
.house-from { font-size: 9px; font-weight: 800; font-style: normal; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.plus-anchor { margin-top: 8px; font-size: 11px; font-weight: 700; text-align: center; color: var(--text-muted); }
/* ---------- Dream Home: build with your hands */
.house-job { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 20px; background: var(--card-bg); border: 1px solid var(--card-border); box-shadow: 0 8px 22px var(--shadow); }
.house-job-top { display: flex; gap: 10px; align-items: center; }
.house-job-emoji { font-size: 28px; line-height: 1; }
.house-job-top b { display: block; font-size: 13px; font-weight: 800; }
.house-job-top small { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); line-height: 1.35; }
.house-job-bar { position: relative; height: 6px; border-radius: 6px; overflow: hidden; background: rgba(0, 0, 0, 0.08); }
.house-job-bar i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, #f2a65a, #b9603f); border-radius: 6px; transition: transform .45s cubic-bezier(.2, 1.2, .4, 1); }
.house-job-row { display: flex; gap: 6px; align-items: center; }
.house-job-row small { flex: 1; font-size: 11px; font-weight: 800; color: var(--text-muted); }
.house-job-row .house-chip { padding: 6px 10px; }
/* ---------- Dream Home: the design gallery */
.house-design-list { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; }
.house-design-list:empty { display: none; }
.house-design { flex: 0 0 150px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 3px; padding: 8px; border-radius: 18px; text-align: left; background: var(--card-bg); border: 1.5px solid var(--card-border); color: var(--text-main); }
.house-design.locked { opacity: 0.7; }
.house-design b { font-size: 11px; font-weight: 800; line-height: 1.25; }
.house-design small { font-size: 9px; font-weight: 700; color: var(--text-muted); }
.house-design i { font-size: 9px; font-style: normal; font-weight: 600; color: var(--text-muted); line-height: 1.3; }
.house-mini-plan { width: 100%; aspect-ratio: 3 / 4; border-radius: 10px; background: #e7efd9; }
.house-job-mats { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; }
.house-mat { flex: 0 0 auto; padding: 4px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; background: rgba(0, 0, 0, 0.05); color: var(--text-main); white-space: nowrap; }
.house-mats summary { cursor: pointer; list-style: none; }
.house-mats-step { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-top: 1px solid var(--card-border); opacity: 0.6; }
.house-mats-step.now, .house-mats-step.done { opacity: 1; }
.house-mats-step b { font-size: 11px; font-weight: 800; }
.house-mats-step.now b { color: var(--accent); }
.house-mats-step small { font-size: 10px; font-weight: 600; color: var(--text-muted); line-height: 1.4; }
.house-paint { display: flex; gap: 6px; flex-wrap: wrap; }
.house-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(0, 0, 0, 0.12); font-size: 12px; font-weight: 800; color: rgba(0, 0, 0, 0.5); }
.house-swatch.on { outline: 3px solid var(--accent); outline-offset: 2px; }
.house-together { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 20px; background: var(--card-bg); border: 1.5px solid var(--accent); box-shadow: 0 10px 26px var(--shadow); }
.house-together b { font-size: 13px; font-weight: 800; }
#house-together-ring { transition: transform 0.12s linear; }
/* ---------- the Joint Fund */
.fund-chip { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; margin-right: 8px; border-radius: 999px; font-size: 13px; font-weight: 800; background: linear-gradient(135deg, #fff1c2, #f6c95b); color: #5a3b00; box-shadow: 0 6px 16px rgba(201, 140, 20, 0.3); }
.fund-chip.owed { background: linear-gradient(135deg, #f3ece0, #e2d6c2); color: #6b5a44; }
.fund-chip.pulse { animation: fund-pulse .7s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes fund-pulse { 0% { transform: scale(1); } 40% { transform: scale(1.18) rotate(-4deg); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .fund-chip.pulse { animation-duration: 1.2s; } }
.fund-top { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px; border-radius: 24px; text-align: center; background: linear-gradient(160deg, #fff6d8, #f6d27a); color: #5a3b00; box-shadow: 0 12px 30px rgba(201, 140, 20, 0.25); }
.fund-coin { font-size: 34px; }
.fund-top b { font-size: 40px; font-weight: 800; line-height: 1; }
.fund-top small { font-size: 11px; font-weight: 700; opacity: 0.8; max-width: 260px; }
.fund-today { font-size: 12px; font-weight: 800; text-align: center; color: var(--text-main); }
.fund-life { padding: 10px 6px; border-radius: 14px; font-size: 10px; font-weight: 800; line-height: 1.3; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); }
.fund-life.done { opacity: 0.6; }
.fund-group { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-top: 4px; }
.fund-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--card-bg); border: 1px solid var(--card-border); }
.fund-item.have { border-color: var(--accent); }
.fund-item b { display: block; font-size: 12px; font-weight: 800; }
.fund-item small { display: block; font-size: 10px; font-weight: 600; color: var(--text-muted); }
.fund-bar { display: block; height: 4px; margin-top: 4px; border-radius: 4px; background: linear-gradient(90deg, #f6c95b calc(var(--k) * 100%), rgba(0,0,0,0.08) 0); }
.fund-buy { flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; font-size: 11px; font-weight: 800; background: linear-gradient(135deg, #fff1c2, #f6c95b); color: #5a3b00; }
.fund-buy:disabled { opacity: 0.45; }
/* ---------- site games */
.sg-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 20px; background: var(--card-bg); border: 1px solid var(--card-border); box-shadow: 0 8px 20px var(--shadow); }
.sg-emoji { font-size: 30px; line-height: 1; }
.sg-card b { font-size: 14px; font-weight: 800; }
.sg-card small { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.sg-head { display: flex; justify-content: space-between; align-items: center; }
.sg-head b { font-size: 16px; font-weight: 800; }
.sg-score { padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; background: linear-gradient(135deg, #fff1c2, #f6c95b); color: #5a3b00; }
.sg-sub { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.sg-tip { font-size: 11px; font-weight: 700; text-align: center; color: var(--text-muted); }
.sg-lane { position: relative; height: 340px; border-radius: 22px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; background: linear-gradient(#cfe6f7, #f3e6d0 70%, #c9a77a); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.sg-band { position: absolute; left: 0; right: 0; bottom: 78%; height: 17%; background: linear-gradient(rgba(246, 201, 91, 0.25), rgba(246, 201, 91, 0.55)); border-top: 2px dashed #e0a92c; border-bottom: 2px dashed #e0a92c; }
.sg-brick { position: absolute; left: 50%; font-size: 36px; transform: translateX(-50%); bottom: -18px; filter: drop-shadow(0 6px 6px rgba(0,0,0,0.25)); }
.sg-flash { position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 50; padding: 12px 20px; border-radius: 18px; font-size: 16px; font-weight: 800; color: #fff; background: rgba(20, 16, 30, 0.82); animation: sg-pop .9s ease-out forwards; pointer-events: none; }
@keyframes sg-pop { 0% { opacity: 0; transform: translate(-50%, -40%) scale(.9); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%); } }
.sg-blueprint { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px; border-radius: 20px; color: #e8f2ff; background: repeating-linear-gradient(0deg, #1f4f8a 0 23px, #2a5c99 23px 24px), #1f4f8a; background-blend-mode: normal; }
.sg-blueprint small { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.sg-blueprint b { font-size: 38px; font-weight: 800; }
.sg-tape-val { font-size: 34px; font-weight: 800; text-align: center; }
.sg-tape { width: 100%; height: 44px; accent-color: #e0a92c; }
.sg-swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sg-swatch { position: relative; height: 120px; border-radius: 20px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08), 0 8px 20px var(--shadow); }
.sg-swatch small { position: absolute; left: 10px; bottom: 8px; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; background: rgba(255,255,255,0.85); color: #2b2a28; }
.sg-dial { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 800; }
.sg-dial input { width: 100%; height: 36px; -webkit-appearance: none; appearance: none; border-radius: 18px; }
.sg-hue { background: linear-gradient(90deg, hsl(0 55% 55%), hsl(60 55% 55%), hsl(120 55% 55%), hsl(180 55% 55%), hsl(240 55% 55%), hsl(300 55% 55%), hsl(360 55% 55%)); }
.sg-light { background: linear-gradient(90deg, #111, #888, #fff); }
.sg-done { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px; border-radius: 24px; text-align: center; background: linear-gradient(160deg, #fff6d8, #f6d27a); color: #5a3b00; }
.sg-done span { font-size: 40px; }
.sg-done b { font-size: 22px; font-weight: 800; }
.sg-done small { font-size: 12px; font-weight: 700; opacity: .8; }
.house-job-row { flex-wrap: wrap; }
.house-job-row small { flex: 1 1 100%; }
/* ---------- Same wavelength, Closer in 36, Draw & guess */
#play-games { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.same-meter { display: flex; justify-content: center; gap: 8px; }
.same-dot { width: 14px; height: 14px; border-radius: 50%; background: rgba(120, 120, 140, 0.25); transition: transform .3s; }
.same-dot.now { background: transparent; box-shadow: inset 0 0 0 2px var(--accent); transform: scale(1.15); }
.same-dot.hit { background: linear-gradient(135deg, #4fc3e8, #7a6cf0); box-shadow: 0 0 10px rgba(79, 195, 232, 0.7); }
.same-dot.miss { background: var(--text-muted); opacity: 0.4; }
.same-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.same-grid .wyr-opt { padding: 12px 10px; font-size: 13px; }
.same-reveal { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 16px; text-align: center; background: var(--card-bg); border: 1px dashed var(--card-border); }
.same-reveal.hit { border: 1.5px solid #4fc3e8; background: color-mix(in srgb, #4fc3e8 12%, var(--card-bg)); }
.same-reveal small { font-size: 10px; font-weight: 800; color: var(--text-muted); }
.same-reveal b { font-size: 13px; font-weight: 800; }
.c36-bar { display: grid; grid-template-columns: repeat(36, 1fr); gap: 2px; }
.c36-bar i { height: 5px; border-radius: 3px; background: var(--card-border); }
.c36-bar i.done { background: linear-gradient(90deg, #f2a65a, #b9603f); }
.c36-bar i.now { background: var(--accent); }
.c36-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 24px; background: var(--card-bg); border: 1px solid var(--card-border); box-shadow: 0 12px 30px var(--shadow); }
.c36-card small { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.c36-set { align-self: flex-start; padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 800; background: linear-gradient(135deg, #fff1c2, #f6c95b); color: #5a3b00; }
.c36-q { font-family: Georgia, serif; font-size: 22px; font-weight: 700; line-height: 1.3; }
.c36-q-small { font-family: Georgia, serif; font-size: 14px; font-weight: 700; }
.c36-wait { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.c36-reveal { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 20px; background: color-mix(in srgb, var(--accent) 8%, var(--card-bg)); }
.c36-reveal small { font-size: 10px; font-weight: 800; color: var(--text-muted); }
.c36-ans b { font-size: 11px; font-weight: 800; color: var(--accent); }
.c36-ans p { font-size: 13px; font-weight: 600; white-space: pre-wrap; }
.c36-timer { font-size: 44px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.dg-info { display: flex; justify-content: space-between; align-items: center; }
.dg-role { font-size: 14px; font-weight: 800; }
.dg-time { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--card-bg); border: 1px solid var(--card-border); font-variant-numeric: tabular-nums; }
.dg-canvas { width: 100%; aspect-ratio: 1 / 1; border-radius: 20px; background: #fffdf7; touch-action: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08), 0 10px 26px var(--shadow); }
.dg-tools { display: flex; gap: 8px; align-items: center; }
.dg-tools .care-btn { margin-left: auto; }
.dg-wrong { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.dg-wrong span { padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-decoration: line-through; background: var(--card-bg); color: var(--text-muted); }
/* ---------- the Sync Vibe mark: one S -> ∞ (js/brand.js). Ink, type and colour are the intro page's own. */
#intro .io-mark { position: absolute; left: 0; top: 0; width: 270px; height: 200px; margin: -100px 0 0 -135px; pointer-events: none; z-index: 3; transform-origin: 135px 100px; transition: opacity 0.35s var(--io-ease); will-change: transform; }
#intro .io-mark.gone { opacity: 0; }
#intro .io-shapes, #intro .io-ring { transition: opacity 0.35s var(--io-ease); }
#intro.inf .io-shapes, #intro.inf .io-ring { opacity: 0; }
.sv-mark { width: 100%; height: 100%; overflow: visible; color: var(--io-shape, #1d1d1f); }
.sv-word { font-family: inherit; font-size: 28px; font-weight: 700; letter-spacing: -0.025em; fill: var(--io-text, #1d1d1f); }

/* ---------- the live sky: "Tonight" in Our Sky (js/sky-live.js) */
.sky-tabs { display: flex; gap: 4px; padding: 4px; margin: 6px 0 12px; border-radius: 999px; background: color-mix(in srgb, var(--text-muted, #888) 14%, transparent); }
.sky-tab { flex: 1; height: 36px; border: 0; border-radius: 999px; background: transparent; color: inherit; font-family: inherit; font-weight: 700; font-size: 13px; line-height: 1; opacity: 0.7; transition: background-color 0.25s, opacity 0.25s; }
.sky-tab.on { background: var(--card-bg, #fff); opacity: 1; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); }
.sky-live { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; }
.sky-live-stage { position: relative; flex: 1; min-height: 320px; border-radius: 24px; overflow: hidden; background: #04060f; touch-action: none; }
#sky-live-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.sky-live-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: rgba(255, 255, 255, 0.7); font-size: 14px; font-weight: 600; pointer-events: none; }
.sky-live-top { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; }
.sky-live-top > * { pointer-events: auto; }
.sky-whose { display: flex; padding: 3px; border-radius: 999px; background: rgba(10, 12, 24, 0.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sky-whose button { height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: rgba(255, 255, 255, 0.75); font-family: inherit; font-weight: 700; font-size: 12px; white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.sky-whose button.on { background: rgba(255, 255, 255, 0.92); color: #10131f; }
.sky-point { display: flex; align-items: center; gap: 5px; height: 36px; padding: 0 11px; flex: none; border: 0; border-radius: 999px; background: rgba(10, 12, 24, 0.55); color: #fff; font-family: inherit; font-weight: 700; font-size: 12px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); white-space: nowrap; }
.sky-point.on { background: #fff; color: #10131f; }
.sky-card { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 0; border-radius: 16px; text-align: left; color: #fff; background: rgba(10, 12, 24, 0.72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 13px; }
.sky-card b { font-size: 16px; }
.sky-card span { opacity: 0.8; }
.sky-live-info { margin: 2px 2px 0; font-size: 13px; font-weight: 700; }
.sky-live-note { margin: 0 2px; font-size: 12px; color: var(--text-muted, #888); min-height: 1em; }
.sky-time { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; color: var(--text-muted, #888); }
.sky-time input { flex: 1; accent-color: var(--accent, #6b7cff); }
.sky-time button { height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--text-muted, #888) 16%, transparent); color: inherit; font-family: inherit; font-weight: 700; font-size: 12px; }
.sky-credit { margin: 0 2px; font-size: 10px; color: var(--text-muted, #888); opacity: 0.8; }

/* ---------- zoom out: house -> Earth -> Solar System -> stars -> Milky Way (js/house-cosmos.js) */
.house-views .zoom-out { background: #10142a; color: #fff; }
.house-3d.cosmic { position: fixed; inset: 0; z-index: 80; width: 100vw; height: 100dvh; aspect-ratio: auto; border-radius: 0; }
.house-3d.cosmic .house-views, .house-3d.cosmic .house-tour-cap { display: none; }
.cosmos { position: absolute; inset: 0; z-index: 4; touch-action: none; overflow: hidden; color: #fff; }
.cosmos[hidden] { display: none; }
.cosmos-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.cosmos-haze { position: absolute; inset: 0; opacity: 0; pointer-events: none; background: radial-gradient(120% 90% at 50% 45%, #f4f8ff 0%, #cfe0f7 45%, #8fb3e6 100%); }
.cosmos-labels { position: absolute; inset: 0; pointer-events: none; }
.cosmos-label { position: absolute; left: 0; top: 0; margin: -22px 0 0 8px; padding: 3px 8px; border-radius: 999px; font: 700 11px/1.3 -apple-system, Inter, system-ui, sans-serif; white-space: nowrap; background: rgba(8, 10, 24, 0.55); color: rgba(255, 255, 255, 0.9); }
.cosmos-label.me { background: rgba(255, 255, 255, 0.92); color: #10142a; }
.cosmos-label.them { background: #ff8fb1; color: #2a0f19; }
.cosmos-label.dist { margin-top: 6px; background: rgba(255, 179, 199, 0.18); color: #ffd3df; }
.cosmos-label.sun { background: rgba(255, 214, 150, 0.2); color: #ffe7c2; }
.cosmos-cap { position: absolute; left: 20px; right: 20px; top: calc(env(safe-area-inset-top) + 20px); display: flex; flex-direction: column; gap: 4px; pointer-events: none; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45); }
.cosmos-cap b { font: 800 28px/1.1 -apple-system, Inter, system-ui, sans-serif; letter-spacing: -0.02em; }
.cosmos-cap span { font-size: 14px; font-weight: 600; opacity: 0.85; max-width: 34em; }
.cosmos-cap span:last-child { font-size: 12px; opacity: 0.65; }
.cosmos-bar { position: absolute; left: 14px; right: 14px; bottom: calc(env(safe-area-inset-bottom) + 18px); display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 999px; background: rgba(8, 10, 24, 0.6); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.cosmos-bar input { flex: 1; accent-color: #ffb3c7; }
.cosmos-bar button { flex: none; height: 38px; min-width: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #fff; font-family: inherit; font-weight: 800; font-size: 13px; }
#cosmos-home { background: #fff; color: #10142a; }

.house-zoom { flex: none; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; background: #10142a; color: #fff; font-size: 12px; font-weight: 800; }

/* camera sky: the live camera picture, the real sky drawn over it, full screen */
.sky-tools { display: flex; gap: 6px; }
.sky-live-stage.ar { position: fixed; inset: 0; z-index: 2147483000; min-height: 0; border-radius: 0; background: #000; }
#sky-live-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sky-live-stage.ar #sky-live-canvas { z-index: 1; }
.sky-live-stage.ar .sky-live-top, .sky-live-stage.ar .sky-card { z-index: 2; }
.sky-live-stage.ar .sky-live-top { top: calc(env(safe-area-inset-top) + 12px); right: 64px; }
.sky-ar-close { display: none; position: absolute; z-index: 3; top: calc(env(safe-area-inset-top) + 12px); right: 12px; width: 40px; height: 40px; border: 0; border-radius: 999px; place-items: center; background: rgba(10, 12, 24, 0.6); color: #fff; }
.sky-live-stage.ar .sky-ar-close { display: grid; }
.sky-live-stage.ar .sky-card { bottom: calc(env(safe-area-inset-bottom) + 16px); }
.sky-live-stage.ar #sky-live-camera { font-size: 0; gap: 0; padding: 0 10px; }

/* ---------- the Fun tab: every extra, one drawn icon each (js/world.js) */
.fun-title { margin: 6px 6px 2px; font-size: 32px; font-weight: 800; letter-spacing: -0.025em; color: var(--text-main); }
.fun-body { display: flex; flex-direction: column; gap: 10px; padding-bottom: 120px; }
.fun-head { margin: 14px 6px 2px; font-size: 13px; font-weight: 700; color: var(--text-muted); }
.fun-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; }
.fun-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0; border: 0; background: none; color: var(--text-main); font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.2; }
.fun-tile b { font-weight: 600; }
.fun-icon { width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center; background: var(--card-bg); border: 1px solid var(--card-border); box-shadow: 0 6px 18px -10px var(--shadow, rgba(0, 0, 0, 0.25)); }
.fun-icon svg, .fun-icon i { width: 26px; height: 26px; stroke-width: 1.6; }
.fun-tile .plus-pill { position: absolute; top: -4px; right: 2px; transform: scale(0.85); }
.world-emoji svg, .world-emoji i { width: 22px; height: 22px; stroke-width: 1.7; }
.dial-btn svg, .dial-btn i { width: 20px; height: 20px; stroke-width: 1.7; }
.bond-emoji svg, .bond-emoji i { width: 20px; height: 20px; stroke-width: 1.7; }

/* Right now: each feeling has its own colour (cool = low energy, warm = open, bright = playful) */
.dial-btn[data-dial="depleted"] { --dial: #5f72b8; --dial-soft: #93a3dc; }
.dial-btn[data-dial="vulnerable"] { --dial: #d9587a; --dial-soft: #f19ab0; }
.dial-btn[data-dial="open"] { --dial: #b26a0c; --dial-soft: #e8a23c; }
.dial-btn[data-dial="playful"] { --dial: #9157e0; --dial-soft: #c39af5; }
.dial-btn[data-dial] { transition: background-color 0.35s ease, box-shadow 0.35s ease, transform 0.2s ease, color 0.35s ease; }
.dial-btn[data-dial] svg { color: var(--dial); }
.dial-btn[data-dial].selected { background: linear-gradient(160deg, var(--dial-soft), var(--dial)); color: #fff; border-color: transparent; box-shadow: 0 12px 24px -12px var(--dial), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.dial-btn[data-dial].selected svg { color: #fff; }

/* Fun tab: each group has its own colour, like the Right-now buttons; a tile fills with it when tapped */
.fun-tile[data-tone="yours"] { --tone: #9157e0; --tone-soft: #c39af5; }
.fun-tile[data-tone="care"] { --tone: #d9587a; --tone-soft: #f19ab0; }
.fun-tile[data-tone="rituals"] { --tone: #b26a0c; --tone-soft: #e8a23c; }
.fun-tile[data-tone="keepsakes"] { --tone: #5f72b8; --tone-soft: #93a3dc; }
.fun-tile[data-tone="plans"] { --tone: #1b8378; --tone-soft: #5cc5b8; }
.fun-tile[data-tone="play"] { --tone: #d24a2e; --tone-soft: #f39478; }
.fun-tile[data-tone] .fun-icon { background: color-mix(in srgb, var(--tone-soft) 24%, var(--bg-top)); border-color: color-mix(in srgb, var(--tone) 40%, transparent); transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease; }
.fun-tile[data-tone] .fun-icon svg { color: color-mix(in srgb, var(--tone) 72%, var(--text-main)); transition: color 0.3s ease; }   /* lighter on dark themes, deeper on light ones */
.fun-tile[data-tone]:active .fun-icon, .fun-tile[data-tone]:focus-visible .fun-icon, .fun-tile[data-tone].lit .fun-icon { background: linear-gradient(160deg, var(--tone-soft), var(--tone)); border-color: transparent; box-shadow: 0 12px 24px -12px var(--tone), inset 0 1px 0 rgba(255, 255, 255, 0.35); transform: translateY(-2px); }
.fun-tile[data-tone]:active .fun-icon svg, .fun-tile[data-tone]:focus-visible .fun-icon svg, .fun-tile[data-tone].lit .fun-icon svg { color: #fff; }
@media (hover: hover) { .fun-tile[data-tone]:hover .fun-icon { background: linear-gradient(160deg, var(--tone-soft), var(--tone)); border-color: transparent; } .fun-tile[data-tone]:hover .fun-icon svg { color: #fff; } }

/* gradient themes (uiGradients) in the theme sheet */
.grad-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; }
.grad-pick { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--text-main); font-size: 10.5px; font-weight: 600; line-height: 1.2; text-align: center; }
.grad-swatch { width: 54px; height: 54px; border-radius: 18px; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.grad-pick.active .grad-swatch { box-shadow: 0 0 0 3px var(--accent), 0 6px 14px -8px rgba(0, 0, 0, 0.45); }

/* Themes gallery (iOS-style): rows of phone-shaped looks, tap one for a glimpse (js/themes.js) */
.tg-section { display: flex; flex-direction: column; gap: 10px; }
.tg-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 2px; }
.tg-head h3, .tg-title { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: var(--text-main); }
.tg-more, .tg-back { background: none; border: 0; padding: 0; color: var(--accent); font-size: 14px; font-weight: 700; }
.tg-back { align-self: flex-start; display: flex; align-items: center; gap: 2px; margin-left: -6px; }
.tg-row { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 6px; }
.tg-card { --ring: var(--accent); flex: 0 0 auto; width: 92px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--text-main); }
.tg-card b { font-size: 12px; font-weight: 700; line-height: 1.15; text-align: center; }
.tg-tag { font-size: 10px; font-weight: 700; line-height: 1; min-height: 10px; color: var(--text-muted); }
.tg-tag.plus { color: var(--accent); }
.tg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 18px 12px; }
.tg-grid .tg-card { width: 100%; max-width: 120px; justify-self: center; }
.tg-phone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7%; width: 100%; aspect-ratio: 9 / 18; padding: 16% 11% 8%; border-radius: 20px; overflow: hidden;
  background: var(--bg-art), linear-gradient(160deg, var(--bg-top) 0%, var(--bg-bottom) 100%); color: var(--text-main);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.07), 0 10px 20px -12px rgba(0, 0, 0, 0.5); transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2), box-shadow 0.2s; }
.tg-phone i { display: block; flex-shrink: 0; }
.tg-clock { width: 46%; height: 5%; border-radius: 99px; background: var(--text-main); opacity: 0.85; }
.tg-heart { width: 28%; aspect-ratio: 1; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); margin: 3% 0; }
.tg-sheet { width: 100%; height: 12%; border-radius: 8px; background: var(--card-bg); border: 1px solid var(--card-border); }
.tg-sheet.short { width: 68%; align-self: flex-start; }
.tg-tabs { margin-top: auto; width: 82%; height: 7%; border-radius: 99px; background: var(--card-bg); border: 1px solid var(--card-border); }
.tg-card:active .tg-phone, .tg-ours:active .tg-pair { transform: scale(0.95); }
.tg-card.active .tg-phone { box-shadow: 0 0 0 2.5px var(--ring), 0 10px 20px -12px rgba(0, 0, 0, 0.5); }
.tg-card.active b { color: var(--accent); }
.tg-ours { display: flex; align-items: center; gap: 16px; width: 100%; padding: 14px; border-radius: 24px; text-align: left; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); }
.tg-ours.active { box-shadow: 0 0 0 2.5px var(--accent); }
.tg-pair { display: flex; gap: 8px; flex-shrink: 0; transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.tg-pair .tg-phone { width: 48px; border-radius: 12px; }
.tg-ours-words { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tg-ours-words b { font-size: 16px; font-weight: 800; }
.tg-ours-words .tg-note { text-align: left; }
.tg-seg { display: flex; padding: 3px; border-radius: 11px; background: var(--card-bg); border: 1px solid var(--card-border); }
.tg-seg button { flex: 1; padding: 6px 14px; border: 0; border-radius: 8px; background: none; color: var(--text-muted); font-size: 12px; font-weight: 700; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.tg-seg button.on { background: var(--bg-top); color: var(--text-main); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16); }
/* the glimpse */
.tg-glimpse { position: absolute; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0); transition: background 0.3s; }
.tg-glimpse.on { background: rgba(0, 0, 0, 0.38); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.tg-panel { position: relative; width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 10px 22px calc(22px + env(safe-area-inset-bottom)); border-radius: 30px 30px 0 0; background: var(--bg-top); color: var(--text-main);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.3); transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.25, 1); }
.tg-glimpse.on .tg-panel { transform: none; }
.tg-grab { width: 40px; height: 5px; border-radius: 99px; background: var(--text-muted); opacity: 0.4; margin-bottom: 4px; }
.tg-x { position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); }
.tg-phone.big { width: min(52vw, 200px); border-radius: 30px; margin: 4px 0; touch-action: none; }
.tg-panel, .tg-card, .tg-ours { -webkit-user-select: none; user-select: none; }
.tg-name { font-size: 20px; font-weight: 800; }
.tg-note { font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--text-muted); text-align: center; }
.tg-actions { display: flex; gap: 10px; width: 100%; margin-top: 4px; }
.tg-use { flex: 1; padding: 14px; border: 0; border-radius: 16px; background: var(--accent); color: var(--accent-text); font-size: 15px; font-weight: 800; }
.tg-use:disabled { background: var(--card-bg); color: var(--text-muted); border: 1px solid var(--card-border); }
.tg-icon-btn { width: 52px; flex-shrink: 0; border-radius: 16px; display: grid; place-items: center; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); }
.tg-icon-btn.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.tg-panel > .soft-card { width: 100%; }
@media (prefers-reduced-motion: reduce) { .tg-panel { transition-duration: 0.2s; } .tg-phone, .tg-pair { transition-duration: 0.12s; } }   /* half strength, never off */
/* Notifications: swipe up or sideways to dismiss, pull down to read it all (js/ui.js) */
#app-toast { transition-property: transform, opacity; touch-action: none; -webkit-user-select: none; user-select: none; }
#app-toast > .soft-card { position: relative; }
.toast-grab { position: absolute; left: 50%; bottom: 6px; width: 30px; height: 4px; margin-left: -15px; border-radius: 99px; background: var(--text-muted); opacity: 0.3; }
#app-toast.open .toast-grab { opacity: 0; }
/* Our photo: pick from your phone or from the photos you've shared */
.tg-photos { display: flex; gap: 8px; width: 100%; overflow-x: auto; padding: 2px 2px 4px; }
.tg-thumb { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 14px; overflow: hidden; padding: 0; display: grid; place-items: center; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); cursor: pointer; }
.tg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tg-thumb.on { box-shadow: 0 0 0 2.5px var(--accent); }
.tg-thumb.add { border-style: dashed; }
/* Our Home journey: a road of chapters (js/house-journey.js) */
.hj-road { position: relative; width: 100%; }
.hj-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hj-path { fill: none; stroke: var(--card-border); stroke-width: 8; stroke-linecap: round; }
.hj-path.lit { stroke: var(--accent); stroke-width: 6; }
.hj-stop { position: absolute; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; display: grid; place-items: center; z-index: 1; background: var(--bg-top); border: 2px solid var(--card-border); color: var(--text-muted); opacity: 0.55; transition: transform 0.2s; }
.hj-stop.done { background: var(--accent); border-color: var(--accent); color: var(--accent-text); opacity: 1; }
.hj-stop.now { color: var(--accent); border-color: var(--accent); opacity: 1; animation: hj-pulse 2.4s ease-in-out infinite; }
.hj-stop:not(:disabled):active { transform: scale(0.92); }
@keyframes hj-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 50% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 0%, transparent); } }
@keyframes hj-pulse-soft { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 35%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 0%, transparent); } }
@media (prefers-reduced-motion: reduce) { .hj-stop.now { animation-name: hj-pulse-soft; } }   /* half strength, never off */
.hj-label { position: absolute; margin: -16px 0 0 36px; display: flex; flex-direction: column; max-width: 46%; pointer-events: none; }
.hj-label.left { margin-left: 0; transform: translateX(calc(-100% - 36px)); text-align: right; }
.hj-label b { font-size: 13px; font-weight: 800; color: var(--text-main); }
.hj-label small { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.hj-continue { position: sticky; bottom: 8px; margin-top: 6px; width: 100%; padding: 15px; border: 0; border-radius: 18px; background: var(--accent); color: var(--accent-text); font-size: 15px; font-weight: 800; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.5); }
.hc { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; margin-bottom: 12px; border-radius: 20px; background: var(--card-bg); border: 1px solid var(--card-border); }
.hc-back { align-self: flex-start; display: flex; align-items: center; gap: 2px; margin-left: -6px; background: none; border: 0; padding: 0; color: var(--accent); font-size: 13px; font-weight: 700; }
.hc-title { font-size: 18px; font-weight: 800; }
.hc-goal, .hc-left { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.hc-bar { display: block; height: 6px; border-radius: 99px; background: var(--card-border); overflow: hidden; }
.hc-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--accent); transition: width 0.6s cubic-bezier(0.2, 0.9, 0.25, 1); }
/* Live street map (js/house-zoom.js): the pin stays put, the map moves under it */
.hz-map { position: relative; height: 240px; border-radius: 20px; overflow: hidden; touch-action: none; background: #e9e5dc; border: 1px solid var(--card-border); }
.hz-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hz-pin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -22px 0 0 -11px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--accent); box-shadow: 0 0 0 3px #fff, 0 6px 12px rgba(0, 0, 0, 0.35); pointer-events: none; }
.hz-credit { position: absolute; right: 6px; bottom: 6px; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.85); color: #333; font-size: 10px; font-weight: 600; text-decoration: none; }
.cosmos-map { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.cosmos-osm { position: absolute; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 80px); padding: 2px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.85); color: #333; font-size: 10px; font-weight: 600; text-decoration: none; opacity: 0; transition: opacity 0.3s; }
.house-reopen { align-self: center; padding: 8px 14px; border: 0; background: none; color: var(--text-muted); font-size: 12px; font-weight: 700; text-decoration: underline; }
.hj-continue:disabled { position: static; background: var(--card-bg); color: var(--text-muted); border: 1px solid var(--card-border); box-shadow: none; }   /* waits at the end; sticks to the bottom only once you can go on */
/* photo themes: words stay readable over any picture */
body[data-theme="daily"] .fun-tile b, body[data-theme="ourphoto"] .fun-tile b, body[data-theme="daily"] .fun-title, body[data-theme="ourphoto"] .fun-title, body[data-theme="daily"] #fun-body .ex-head, body[data-theme="ourphoto"] #fun-body .ex-head, body[data-theme="daily"] .fun-head, body[data-theme="ourphoto"] .fun-head { text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65); }
/* Ask, the AI helper (js/ai.js): an iOS-style chat with cards you can act on */
#ai-modes button { font-size: 11.5px; padding: 6px 4px; }
.ai-intro { font-size: 13px; font-weight: 600; color: var(--text-muted); line-height: 1.45; }
.ai-msg { max-width: 86%; padding: 10px 14px; border-radius: 20px; font-size: 14px; font-weight: 500; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-text); border-bottom-right-radius: 6px; }
.ai-msg.ai { align-self: flex-start; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); border-bottom-left-radius: 6px; }
.ai-msg.typing { color: var(--text-muted); animation: ai-breathe 1.6s ease-in-out infinite; }
@keyframes ai-breathe { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .ai-msg.typing { animation-duration: 3.2s; } }
.ai-card { align-self: stretch; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 20px; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); }
.ai-card-title { font-size: 17px; font-weight: 800; }
.ai-meta { font-size: 11.5px; font-weight: 600; color: var(--text-muted); line-height: 1.4; }
.ai-day { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; border-top: 1px solid var(--card-border); }
.ai-day > b { font-size: 12.5px; font-weight: 800; }
.ai-row { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: 13px; font-weight: 500; line-height: 1.35; }
.ai-time { min-width: 38px; font-size: 11px; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ai-link { font-size: 11.5px; font-weight: 700; color: var(--accent); text-decoration: underline; }
.ai-acts { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.ai-text { font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.ai-ideas { display: flex; flex-direction: column; gap: 6px; align-self: stretch; }
.ai-idea { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; text-align: left; border-radius: 16px; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); }
.ai-idea b { font-size: 13.5px; font-weight: 700; }
.ai-idea small { font-size: 11.5px; font-weight: 500; color: var(--text-muted); }
/* Ask, first on the Fun tab: a card that reads like a search bar (js/world.js) */
.fun-ask { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 14px; width: 100%; margin: 4px 0 18px; padding: 14px; border-radius: 22px; text-align: left; color: var(--text-main);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--bg-top)), color-mix(in srgb, var(--accent) 8%, var(--bg-top))); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); box-shadow: 0 12px 26px -16px color-mix(in srgb, var(--accent) 70%, transparent); }
.fun-ask-icon { grid-row: span 2; width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--accent); color: var(--accent-text); }
.fun-ask-icon svg { width: 24px; height: 24px; }
.fun-ask-words { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fun-ask-words b { font-size: 17px; font-weight: 800; }
.fun-ask-words small { font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.fun-ask-bar { grid-column: 2; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px; background: var(--bg-top); border: 1px solid var(--card-border); color: var(--text-muted); font-size: 12.5px; font-weight: 600; }
.fun-ask-bar svg { width: 14px; height: 14px; }
/* Plans hub and other list rows: icon, two lines, a chevron (js/world.js) */
.plan-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border-radius: 20px; text-align: left; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); }
.plan-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 16%, var(--bg-top)); color: color-mix(in srgb, var(--accent) 80%, var(--text-main)); }
.plan-icon svg { width: 22px; height: 22px; }
.plan-words { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.plan-words b { font-size: 15px; font-weight: 700; }
.plan-words small { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.plan-go { color: var(--text-muted); }
.plan-go svg { width: 18px; height: 18px; }
.plan-row .plus-pill { position: static; }
/* Board games (js/boards.js): plain shapes in the theme's colours; player 0 = accent, player 1 = teal */
#board-modal { --p0: var(--accent); --p1: #1b8378; --sq-light: color-mix(in srgb, var(--bg-top) 82%, #fff); --sq-dark: color-mix(in srgb, var(--accent) 30%, var(--bg-bottom)); }
.board-tile.your-move { box-shadow: 0 0 0 2px var(--accent); }
.board-tile.your-move small { color: var(--accent); font-weight: 800; }
.bd-players { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; font-size: 13px; font-weight: 700; }
.bd-player { display: flex; align-items: center; gap: 6px; }
.bd-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.bd-player.p0 .bd-dot { background: var(--p0); } .bd-player.p1 .bd-dot { background: var(--p1); }
.bd-grid { display: grid; width: min(100%, 420px); gap: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.5); }
.bd-8 { grid-template-columns: repeat(8, 1fr); } .bd-7 { grid-template-columns: repeat(7, 1fr); } .bd-4 { grid-template-columns: repeat(4, 1fr); gap: 8px; box-shadow: none; overflow: visible; }
.bd-10 { grid-template-columns: repeat(10, 1fr); } .bd-15 { grid-template-columns: repeat(15, 1fr); }
.bd-sq { aspect-ratio: 1; border: 0; padding: 0; display: grid; place-items: center; position: relative; }
.bd-sq.light { background: var(--sq-light); } .bd-sq.dark { background: var(--sq-dark); }
.bd-sq.last { box-shadow: inset 0 0 0 100px rgba(255, 214, 102, 0.28); }
.bd-sq.sel { box-shadow: inset 0 0 0 3px var(--accent); }
.bd-sq.check { box-shadow: inset 0 0 0 100px rgba(220, 38, 38, 0.38); }
.bd-sq.dot::after { content: ''; width: 28%; height: 28%; border-radius: 50%; background: rgba(0, 0, 0, 0.28); }
.bd-sq.cap::after { content: ''; position: absolute; inset: 6%; border-radius: 50%; border: 3px solid rgba(0, 0, 0, 0.3); }
.pc { font-size: clamp(22px, 8.4vw, 40px); line-height: 1; font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", serif; user-select: none; }
.pc.w { color: #fffaf3; text-shadow: 0 0 1px #1d1d22, 0 0 1px #1d1d22, 0 1px 2px rgba(0, 0, 0, 0.6); }
.pc.b { color: #1d1d22; text-shadow: 0 0 1px #fff8, 0 1px 1px rgba(255, 255, 255, 0.35); }
.bd-promo { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.bd-promo-btn { width: 46px; height: 46px; border-radius: 12px; font-size: 30px; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); }
.disc { width: 76%; height: 76%; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.22), 0 2px 4px rgba(0, 0, 0, 0.25); }
.disc.p0 { background: var(--p0); } .disc.p1 { background: var(--p1); }
.bd-four { background: color-mix(in srgb, var(--p1) 70%, #0b2e2a); padding: 6px; gap: 6px; }
.bd-hole { aspect-ratio: 1; border: 0; border-radius: 50%; padding: 0; display: grid; place-items: center; background: var(--bg-top); }
.bd-hole .disc { width: 100%; height: 100%; }
.bd-hole .disc.win { box-shadow: 0 0 0 3px #fff, 0 0 12px 2px #ffd166; }
.bd-dots { width: min(100%, 380px); }
.bd-dots .ln { stroke: var(--card-border); stroke-width: 1.4; stroke-linecap: round; }
.bd-dots .ln.p0 { stroke: var(--p0); stroke-width: 2.4; } .bd-dots .ln.p1 { stroke: var(--p1); stroke-width: 2.4; }
.bd-dots .hit { stroke: transparent; stroke-width: 8; cursor: pointer; }
.bd-dots .dt { fill: var(--text-main); }
.bd-dots .box.p0 { fill: color-mix(in srgb, var(--p0) 30%, transparent); } .bd-dots .box.p1 { fill: color-mix(in srgb, var(--p1) 30%, transparent); }
.bd-card { aspect-ratio: 1; border-radius: 14px; border: 0; padding: 0; overflow: hidden; display: grid; place-items: center; color: var(--text-main);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 60%, var(--bg-bottom)), color-mix(in srgb, var(--accent) 35%, var(--bg-bottom))); transition: transform 0.25s; }
.bd-card.up { background: var(--card-bg); border: 1px solid var(--card-border); transform: rotateY(0); }
.bd-card.won.p0 { box-shadow: 0 0 0 3px var(--p0); } .bd-card.won.p1 { box-shadow: 0 0 0 3px var(--p1); }
.bd-card img { width: 100%; height: 100%; object-fit: cover; }
.bd-ludo { background: var(--card-bg); }
.bd-ludo .lc { aspect-ratio: 1; display: grid; place-items: center; position: relative; }
.bd-ludo .lc.path { background: var(--sq-light); box-shadow: inset 0 0 0 0.5px var(--card-border); }
.bd-ludo .lc.safe::before { content: ''; width: 34%; height: 34%; transform: rotate(45deg); background: color-mix(in srgb, var(--text-muted) 35%, transparent); position: absolute; }
.bd-ludo .yard.p0, .bd-ludo .lane.p0, .bd-ludo .start.p0 { background: color-mix(in srgb, var(--p0) 35%, var(--bg-top)); }
.bd-ludo .yard.p1, .bd-ludo .lane.p1, .bd-ludo .start.p1 { background: color-mix(in srgb, var(--p1) 35%, var(--bg-top)); }
.bd-ludo .yard.off { background: color-mix(in srgb, var(--text-muted) 12%, var(--bg-top)); }
.bd-ludo .centre { background: color-mix(in srgb, var(--accent) 18%, var(--bg-top)); }
.token { width: 74%; height: 74%; border-radius: 50%; border: 2px solid #fff; padding: 0; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35); position: relative; z-index: 1; }
.token.p0 { background: var(--p0); } .token.p1 { background: var(--p1); }
.token + .token { margin-left: -40%; }
.token.can { animation: bd-glow 1s ease-in-out infinite; }
@keyframes bd-glow { 50% { box-shadow: 0 0 0 4px #ffd166, 0 2px 4px rgba(0, 0, 0, 0.35); } }
@media (prefers-reduced-motion: reduce) { .token.can { animation-duration: 2s; } }
.bd-dice-row { display: flex; align-items: center; gap: 14px; }
.bd-die { width: 58px; height: 58px; border-radius: 14px; padding: 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: #fff; border: 1px solid var(--card-border); box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.5); }
.bd-die.ready { box-shadow: 0 0 0 3px var(--accent), 0 6px 14px -8px rgba(0, 0, 0, 0.5); }
.bd-die .pip { border-radius: 50%; margin: 2px; }
.bd-die.blank { display: grid; place-items: center; grid-template-columns: 1fr; color: #1d1d22; }
.bd-die .pip.on { background: #1d1d22; }
.bd-note { font-size: 13px; font-weight: 600; color: var(--text-muted); text-align: center; }
.bd-label { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); align-self: flex-start; }
.bd-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.bd-snakes { position: relative; width: min(100%, 420px); }
.bd-snakes .bd-grid { width: 100%; }
.sl { aspect-ratio: 1; background: var(--sq-light); position: relative; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6%; }
.sl.alt { background: color-mix(in srgb, var(--accent) 12%, var(--sq-light)); }
.sl small { position: absolute; top: 2px; left: 3px; font-size: 8.5px; font-weight: 700; color: var(--text-muted); }
.sl .token { width: 44%; height: 44%; }
.sl-art { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sl-art .ladder { stroke: #2f8f5b; stroke-width: 1.6; stroke-dasharray: 1.4 1; fill: none; stroke-linecap: round; }
.sl-art .snake { stroke: #c2416b; stroke-width: 1.8; fill: none; stroke-linecap: round; opacity: 0.85; }
.bd-sea { grid-template-columns: repeat(8, 1fr); gap: 2px; background: color-mix(in srgb, #2563eb 25%, var(--bg-bottom)); padding: 2px; }
.bd-sea .sc { aspect-ratio: 1; border: 0; padding: 0; background: color-mix(in srgb, #3b82f6 22%, var(--bg-top)); }
.bd-sea .sc.ship { background: color-mix(in srgb, var(--text-muted) 55%, var(--bg-top)); }
.bd-sea.enemy .sc.ship { background: color-mix(in srgb, #3b82f6 22%, var(--bg-top)); }
.bd-sea .sc.hit { background: #e04848; } .bd-sea .sc.miss { background: color-mix(in srgb, #fff 55%, transparent); }
.bd-rps { display: flex; gap: 10px; justify-content: center; width: 100%; }
.bd-rps-btn { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; border-radius: 18px; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-main); }
.bd-rps-btn.on { background: var(--accent); color: var(--accent-text); }
.bd-rps-btn:disabled:not(.on) { opacity: 0.45; }
.bd-rounds { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); text-align: center; }
.bd-wordle { display: flex; flex-direction: column; gap: 6px; }
.bd-wordle .wr { display: flex; gap: 6px; }
.bd-wordle .wt { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; font-weight: 800; border: 2px solid var(--card-border); color: var(--text-main); }
.bd-wordle .wt.mg { background: #2f8f5b; color: #fff; border-color: #2f8f5b; } .bd-wordle .wt.my { background: #c8a227; color: #fff; border-color: #c8a227; } .bd-wordle .wt.mn { background: color-mix(in srgb, var(--text-muted) 45%, var(--bg-top)); color: #fff; border-color: transparent; }
.bd-word-in { width: 150px; text-transform: uppercase; letter-spacing: 0.3em; text-align: center; font-weight: 800; padding: 10px; }
/* Truth or dare (js/game-tod.js + boards.js) */
.tod-card { width: min(100%, 420px); min-height: 170px; border-radius: 24px; padding: 22px; display: flex; flex-direction: column; justify-content: center; gap: 10px; text-align: center; color: #fff; box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.6); }
.tod-card.truth { background: linear-gradient(150deg, #5f72b8, #3b4a8a); } .tod-card.dare { background: linear-gradient(150deg, #d24a2e, #a12d58); }
.tod-kind { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.85; }
.tod-text { font-size: 20px; font-weight: 700; line-height: 1.35; }
.tod-answer { width: min(100%, 420px); display: flex; flex-direction: column; gap: 8px; }
.tod-answer textarea { width: 100%; padding: 10px 14px; font-size: 14px; }
.tod-decks { width: min(100%, 420px); }
.tod-pick { display: flex; gap: 12px; width: min(100%, 420px); }
.tod-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 10px; border-radius: 22px; border: 0; color: #fff; font-size: 17px; }
.tod-btn.truth { background: linear-gradient(150deg, #5f72b8, #3b4a8a); } .tod-btn.dare { background: linear-gradient(150deg, #d24a2e, #a12d58); }
.tod-btn:active { transform: scale(0.97); }
.tod-log { width: min(100%, 420px); display: flex; flex-direction: column; gap: 8px; }
.tod-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--card-bg); border: 1px solid var(--card-border); font-size: 13px; }
.tod-row b { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.tod-row i { font-style: normal; color: var(--accent); font-weight: 600; }
.tod-own { width: min(100%, 420px); display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; background: var(--card-bg); border: 1px solid var(--card-border); }
.tod-own summary { font-size: 13px; font-weight: 800; cursor: pointer; }
.tod-own[open] { gap: 10px; }
.tod-own-list { display: flex; flex-direction: column; gap: 6px; }
.tod-own-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.tod-own-row span { flex: 1; min-width: 0; }
.tod-x { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--card-border); background: var(--bg-top); color: var(--text-muted); }

/* Solo mode (js/invite.js): things to get ready while you wait for them. */
.solo-step { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border-radius: 16px; font-size: 14px; font-weight: 600; color: var(--text-main); background: color-mix(in srgb, var(--text-main) 6%, transparent); transition: opacity 0.3s ease; }
.solo-step.done { opacity: 0.5; }

/* The day-7 questions (js/stats.js). */
.survey-chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* Support Sync Vibe (js/support.js): the fund bar, the thank-you badge; Plus labels hide while Plus is paused */
body.plus-paused .plus-pill, body.plus-paused .plus-tag, body.plus-paused #btn-plus-sheet { display: none !important; }
body:not(.plus-paused) .support-door { display: none !important; }
/* no way to pay yet: no door to the support panel anywhere (no "help us" without a way to help) */
body:not(.support-open) [data-open-support] { display: none !important; }
/* the slim strip at the top of the Us tab: quiet, one line, a hairline of progress; nothing moves */
.support-strip { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 9px 14px 8px; border-radius: 16px; text-align: left;
  background: color-mix(in srgb, var(--text-main) 4%, transparent); border: 1px solid color-mix(in srgb, var(--text-main) 8%, transparent); color: var(--text-main); }
.support-strip-row { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; font-weight: 700; }
.support-strip-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.support-strip-amt { font-size: 11px; font-weight: 800; color: var(--text-muted, currentColor); opacity: .8; font-variant-numeric: tabular-nums; }
.support-strip-bar { display: block; height: 2px; border-radius: 2px; overflow: hidden; background: color-mix(in srgb, var(--text-main) 10%, transparent); }
.support-strip-bar .sup-fill { transition: none; }
.sup-track { display: block; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--text-main) 10%, transparent); overflow: hidden; }
.sup-fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .6s ease; }
.sup-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; background: var(--accent); color: var(--bg-top); }
#support-modal [data-amount].on { background: var(--accent); color: var(--bg-top); }
/* Our Sky: the sky picture of the day (js/skypic.js) */
.sky-pic[hidden] { display: none !important; }
.sky-pic { margin-bottom: 12px; }
.sky-pic-link { display: block; border-radius: 18px; overflow: hidden; color: inherit; text-decoration: none; background: color-mix(in srgb, var(--text-main) 5%, transparent); }
.sky-pic-img { display: block; width: 100%; max-height: 260px; object-fit: cover; background: #0b1020; }
.sky-pic-cap { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.sky-pic-cap small { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }
.sky-pic-cap b { font-size: 14px; font-weight: 800; }
.sky-pic-about { font-size: 12px; font-weight: 600; line-height: 1.45; opacity: .8; }
.sky-pic-cap .sky-pic-credit { text-transform: none; letter-spacing: 0; font-weight: 600; }
/* Days off ahead (js/holidays.js): one quiet line */
.holiday-line[hidden] { display: none !important; }
.holiday-line { margin: 10px 0 0; text-align: center; font-size: 11px; font-weight: 700; opacity: .75; }
/* Our song (js/song.js): Spotify's compact player */
.song-frame { display: block; width: 100%; height: 80px; border: 0; border-radius: 12px; }
/* how to turn location back on */
.loc-help-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 600; line-height: 1.45; }
/* the join screen: why the button stays off for an invented key */
.io-code-hint[hidden] { display: none !important; }
.io-code-hint { margin: 8px 0 0; font-size: 12px; font-weight: 600; opacity: .75; text-align: center; }
/* Talk to us (js/feedback.js): one public contact per row */
.fb-contact { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
#feedback-modal button:disabled, #updates-modal button:disabled { opacity: .45; cursor: default; }
.fb-contact a { color: var(--text-main); text-decoration: none; overflow-wrap: anywhere; text-align: right; }
.survey-chip { padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--text-main); background: color-mix(in srgb, var(--text-main) 7%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text-main) 12%, transparent); }
.survey-chip.on { background: var(--accent); color: var(--bg-top); box-shadow: none; }
#survey-send:disabled { opacity: 0.45; }

/* The lamp opened from a sleep call sits above the sleep screen (js/sleep.js). */
.lamp-overlay.over-sleep { z-index: 260; }

/* Our star (js/sky-live.js): a star the two of you share; where it is above each of you right now. */
.our-star { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 12px; }
.our-star .os-line { font-size: 13px; font-weight: 600; color: var(--text-muted); margin: 0; }
.our-star .os-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.our-star .os-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 8px 12px; border-radius: 14px; background: color-mix(in srgb, var(--text-main) 6%, transparent); color: var(--text-main); font-size: 13px; font-weight: 800; }
.our-star .os-pick small { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.our-star .os-name { font-size: 15px; font-weight: 800; }
.our-star .os-where { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.our-star .os-row { display: flex; flex-wrap: wrap; gap: 8px; }
.our-star .os-row button { padding: 8px 14px; border-radius: 999px; font-size: 12px; font-weight: 800; background: color-mix(in srgb, var(--text-main) 7%, transparent); color: var(--text-main); }
.our-star .os-row button.main { background: var(--accent); color: var(--bg-top); }

/* The screen (js/stage.js): close + pin on it, a slim mini-bar on other tabs, a calm screen when nothing plays. */
.stage-tools { position: absolute; top: 8px; right: 8px; z-index: 31; display: flex; gap: 6px; }
.stage-tools button { width: 32px; height: 32px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(6px); }
.stage-tools button.on { background: #fff; color: #111; }
.mini-player { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 999px; background: var(--card-bg); border: 1px solid var(--card-border); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.mini-player.hidden { display: none; }
.mini-dot { width: 8px; height: 8px; border-radius: 50%; background: #e8738a; flex-shrink: 0; animation: mini-dot 1.6s ease-in-out infinite; }
@keyframes mini-dot { 50% { opacity: .35; } }
.mini-title { flex: 1; min-width: 0; font-size: 12px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-main); }
.mini-player button { width: 32px; height: 32px; border-radius: 999px; display: flex; align-items: center; justify-content: center; color: var(--text-main); background: color-mix(in srgb, var(--text-main) 7%, transparent); flex-shrink: 0; }
.stage-calm { position: absolute; inset: 0; overflow: hidden; }
.stage-calm .calm-glow { position: absolute; inset: -30%; background: radial-gradient(38% 48% at 30% 42%, rgba(255, 196, 150, .55), transparent 70%), radial-gradient(42% 52% at 70% 58%, rgba(196, 176, 245, .55), transparent 70%), radial-gradient(30% 40% at 52% 30%, rgba(246, 178, 196, .35), transparent 70%); animation: calm-breathe 12s ease-in-out infinite alternate; }
@keyframes calm-breathe { from { transform: translate(-3%, -2%) scale(1); } to { transform: translate(3%, 2%) scale(1.08); } }
.stage-calm .calm-pic { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 2.4s ease; }
.stage-calm .calm-pic.on { opacity: 1; }
.stage-calm .calm-pic.drift-a { animation: calm-drift-a 10s ease-in-out forwards; }
.stage-calm .calm-pic.drift-b { animation: calm-drift-b 10s ease-in-out forwards; }
@keyframes calm-drift-a { from { transform: scale(1.02) translate(-1.5%, 0); } to { transform: scale(1.12) translate(1.5%, -1%); } }
@keyframes calm-drift-b { from { transform: scale(1.12) translate(1.5%, 1%); } to { transform: scale(1.02) translate(-1.5%, 0); } }
.stage-calm.photos .calm-glow { opacity: 0; }
.stage-calm-line { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-size: 11px; font-weight: 700; color: var(--text-muted); margin: 0; z-index: 1; }
.stage-calm.photos ~ .stage-calm-line { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
@media (prefers-reduced-motion: reduce) { .stage-calm .calm-glow { animation-duration: 24s; } .stage-calm .calm-pic.drift-a, .stage-calm .calm-pic.drift-b { animation-duration: 20s; } }

/* Notifications (js/inbox.js): the bell at the top and its list. */
.inbox-dot { position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #e8738a; color: #fff; font-size: 9px; font-weight: 800; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--bg-top); }
.inbox-dot.hidden { display: none; }
#btn-inbox.ringing svg { animation: inbox-ring .9s ease-in-out; transform-origin: 50% 10%; }
@keyframes inbox-ring { 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } 75% { transform: rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { #btn-inbox.ringing svg { animation-name: inbox-ring-soft; } @keyframes inbox-ring-soft { 25% { transform: rotate(7deg); } 50% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } } }
@media (max-width: 400px) { #top-actions { gap: 6px; } #top-actions > button { width: 32px; height: 32px; } }
.inbox-day { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin: 14px 4px 6px; }
.inbox-day:first-child { margin-top: 0; }
.inbox-row { width: 100%; display: flex; align-items: flex-start; gap: 12px; text-align: left; padding: 12px; border-radius: 18px; background: var(--card-bg); border: 1px solid var(--card-border); margin-bottom: 8px; color: var(--text-main); }
.inbox-ic { width: 32px; height: 32px; border-radius: 999px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--text-main) 7%, transparent); }
.inbox-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inbox-txt b { font-size: 13px; font-weight: 800; }
.inbox-txt span { font-size: 12px; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.inbox-when { font-size: 10px; font-weight: 700; color: var(--text-muted); flex-shrink: 0; padding-top: 2px; }
.inbox-empty { text-align: center; color: var(--text-muted); font-size: 13px; padding: 48px 16px; }

/* The hug, in the middle (js/hug-focus.js): the 3D heart lifts here from the Us card; the page softens behind it. */
.hug-focus { position: fixed; inset: 0; z-index: 235; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; pointer-events: none; opacity: 0; transition: opacity .4s ease;
  background: radial-gradient(ellipse 60% 45% at 50% 46%, rgb(255 214 160 / .45), transparent 70%), color-mix(in srgb, var(--bg-top) 55%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hug-focus.hidden { display: none; }
.hug-focus.open { opacity: 1; }
.hug-focus.open:not([data-mode="hold"]) { pointer-events: auto; cursor: pointer; }
.hug-focus-box { position: relative; width: 100%; max-width: 460px; height: min(56vh, 320px); transform: scale(.86); transition: transform .55s cubic-bezier(.2,.9,.3,1.15); }
.hug-focus.open .hug-focus-box { transform: scale(1); }
.hug-focus-line { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .02em; color: var(--text-main); text-align: center; padding: 0 24px; }
.hug-flat { display: none; position: absolute; left: 50%; top: 50%; width: 150px; height: 140px; margin: -70px 0 0 -75px; background: radial-gradient(circle at 34% 30%, #ffd6a0 0%, #e8738a 60%, #c4506a 100%);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 30'><path d='M16 29C9 23.6 1 17.4 1 9.4 1 4.8 4.6 1 9 1c3 0 5.4 1.6 7 4.2C17.6 2.6 20 1 23 1c4.4 0 8 3.8 8 8.4 0 8-8 14.2-15 19.6z'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 30'><path d='M16 29C9 23.6 1 17.4 1 9.4 1 4.8 4.6 1 9 1c3 0 5.4 1.6 7 4.2C17.6 2.6 20 1 23 1c4.4 0 8 3.8 8 8.4 0 8-8 14.2-15 19.6z'/></svg>") center / contain no-repeat; }
.hug-focus.flat .hug-flat { display: block; animation: hug-flat-beat .8s ease-in-out infinite; }
@keyframes hug-flat-beat { 0%, 100% { transform: scale(1); } 30% { transform: scale(.88, .94); } 55% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) {
  .hug-focus-box { transform: scale(.93); }
  @keyframes hug-flat-beat { 0%, 100% { transform: scale(1); } 30% { transform: scale(.94, .97); } 55% { transform: scale(1.025); } }
}


/* Our notes (js/notes.js) and "Save to our notes" in Ask */
.ai-keep { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 11px; font-weight: 800; color: var(--text-muted); border: 1px dashed var(--card-border); background: transparent; margin-top: -4px; }
.ai-keep.done { border-style: solid; color: var(--text-main); }
.note-card { border-radius: 18px; background: var(--card-bg); border: 1px solid var(--card-border); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.note-head { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%; color: var(--text-main); }
.note-title { font-size: 14px; font-weight: 800; }
.note-meta { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.note-text { margin: 0; font-size: 13px; line-height: 1.5; white-space: pre-wrap; color: var(--text-main); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.note-card.open .note-text { display: block; }
.note-acts { display: none; gap: 8px; flex-wrap: wrap; }
.note-card.open .note-acts { display: flex; }

/* Care opened from one item: only that section, under its own title (js/care.js) */
#care-modal.care-one #care-sub, #care-modal.care-one .care-h { display: none; }

/* Inside the sky, on the dark ground: Play the night and the first-time hint (js/sky-live.js) */
.sky-live-bottom { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 10px; pointer-events: none; z-index: 2; }
.sky-play-pill { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #fff; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.22); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sky-play-pill.on { background: #fff; color: #10131f; }
.sky-hint { font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, 0.62); }
.sky-hint.hidden { display: none; }
.sky-live-stage .sky-card { bottom: 58px; }
.sky-live-stage.ar .sky-live-bottom { bottom: calc(env(safe-area-inset-bottom) + 16px); }
.sky-live-stage.ar .sky-card { bottom: calc(env(safe-area-inset-bottom) + 66px); }

/* Drawn surprise sparkles (js/bond.js fireworks) */
.surprise-bit.drawn { display: block; filter: drop-shadow(0 0 6px rgba(243, 210, 141, 0.7)); }
.surprise-bit.drawn svg { width: 100%; height: 100%; display: block; }
