/* ימי הולדת ביחידה · "Gala evening": ivory, plum night, rose and gold. Serif headings, quiet confidence, real motion. */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

:root {
  --bg: #f4ede3;
  --surface: #fffcf7;
  --surface-2: #f3ebdf;
  --surface-3: #efe6f5;
  --glass: rgba(255, 252, 247, .8);
  --ink: #1d1430;
  --ink-2: #5d5370;
  --ink-3: #9a90a8;
  --line: rgba(29, 20, 48, .09);
  --gold: #b8893a;
  --gold-deep: #8a6420;
  --rose: #c8416b;
  --plum: #4b1d6e;
  --accent: #5b2a86;
  --accent-ink: #ffffff;
  --gold-grad: linear-gradient(115deg, #9c6f22 0%, #e9c46a 28%, #fff0c4 45%, #c9a14a 62%, #f6dfa4 80%, #9c6f22 100%);
  --brand: linear-gradient(120deg, #4b1d6e, #8a2d7a 50%, #c8416b);
  --gala: radial-gradient(120% 90% at 90% -10%, rgba(138, 45, 122, .85) 0%, transparent 55%), radial-gradient(90% 80% at -10% 110%, rgba(200, 65, 107, .55) 0%, transparent 55%), linear-gradient(165deg, #22123f 0%, #140a28 100%);
  --soft: linear-gradient(150deg, #fbf3e6 0%, #f6e4ea 55%, #ece3f7 100%);
  --shadow-sm: 0 1px 2px rgba(29, 20, 48, .05), 0 4px 14px rgba(29, 20, 48, .05);
  --shadow: 0 2px 6px rgba(29, 20, 48, .05), 0 18px 40px rgba(75, 29, 110, .10);
  --shadow-lg: 0 30px 70px rgba(34, 18, 63, .38);
  --r: 22px;
  --nav-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --serif: 'Frank Ruhl Libre', 'David Libre', Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0816; --surface: #161026; --surface-2: #1e1733; --surface-3: #241a3d; --glass: rgba(22, 16, 38, .78);
    --ink: #f5efe6; --ink-2: #c3b7d4; --ink-3: #8a7ea0; --line: rgba(255, 240, 220, .09);
    --accent: #c9a6ff; --accent-ink: #160d29; --soft: linear-gradient(150deg, #241838 0%, #2a1630 55%, #1c1736 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 18px 40px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0816; --surface: #161026; --surface-2: #1e1733; --surface-3: #241a3d; --glass: rgba(22, 16, 38, .78);
  --ink: #f5efe6; --ink-2: #c3b7d4; --ink-3: #8a7ea0; --line: rgba(255, 240, 220, .09);
  --accent: #c9a6ff; --accent-ink: #160d29; --soft: linear-gradient(150deg, #241838 0%, #2a1630 55%, #1c1736 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4); --shadow: 0 18px 40px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font-family: 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; font-size: 1rem; line-height: 1.55; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 12px; }
#app { position: relative; z-index: 1; }
.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot-cake { font-size: 3rem; animation: bob 1.2s ease-in-out infinite; }
.muted { color: var(--ink-2); }
.gold-text { background: var(--gold-grad); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 7s linear infinite; }
.kicker { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .14em; color: var(--gold); text-transform: uppercase; }

/* ── Backdrop: aurora, bokeh, sparkles, grain ── */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; contain: strict; transform: translateZ(0); }
.aurora { position: absolute; border-radius: 50%; will-change: transform; animation: roam 26s ease-in-out infinite alternate; }
.aurora.a1 { width: 75vmax; height: 60vmax; top: -30vmax; right: -25vmax; background: radial-gradient(closest-side, rgba(244, 172, 120, .55), transparent); }
.aurora.a2 { width: 70vmax; height: 60vmax; bottom: -28vmax; left: -25vmax; background: radial-gradient(closest-side, rgba(150, 105, 220, .42), transparent); animation-duration: 32s; }
.aurora.a3 { width: 55vmax; height: 45vmax; top: 30%; left: 20%; background: radial-gradient(closest-side, rgba(222, 110, 150, .3), transparent); animation-duration: 38s; }
:root[data-theme="dark"] .aurora { opacity: .55; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .aurora { opacity: .55; } }
.bk { position: absolute; left: var(--x); top: var(--y); width: var(--sz); height: var(--sz); border-radius: 50%; background: radial-gradient(closest-side, rgba(var(--c), .55), rgba(var(--c), .12) 70%, transparent); animation: float var(--d) ease-in-out var(--dl) infinite alternate; }
.sp { position: absolute; left: var(--x); top: var(--y); width: 12px; height: 12px; color: #d8b260; animation: twinkle var(--d) ease-in-out var(--dl) infinite; }
.sp svg { width: 100%; height: 100%; fill: currentColor; display: block; }
.grain { position: absolute; inset: 0; opacity: .07; background-image: 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='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* ── Shell ── */
.shell { max-width: 660px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px calc(var(--nav-h) + var(--safe-b) + 34px); }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; position: relative; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; flex: none; box-shadow: 0 8px 20px rgba(75, 29, 110, .3); }
.brand-text { min-width: 0; }
.brand-title, .brand-sub { display: block; }
.brand-title { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; line-height: 1.1; }
.brand-sub { font-size: .78rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); display: grid; place-items: center; flex: none; color: var(--ink-2); transition: transform .2s; }
.icon-btn:active { transform: scale(.9); }
.icon-btn svg { width: 20px; height: 20px; }
.gala .icon-btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 240, 210, .18); color: #f5efe6; }

.me-wrap { position: relative; flex: none; }
.me-btn { position: relative; padding: 2.5px; border: 0; border-radius: 50%; background: conic-gradient(from var(--ang), #9c6f22, #fff0c4, #c9a14a, #f6dfa4, #9c6f22); animation: spin 7s linear infinite; display: block; }
.me-btn .av { box-shadow: 0 0 0 2.5px var(--bg); border-radius: 50%; }

/* ── User menu ── */
.menu { position: absolute; top: calc(100% + 10px); left: 0; width: min(290px, calc(100vw - 32px)); padding: 8px; border-radius: 22px; background: var(--glass); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(29, 20, 48, .24); transform-origin: top left; transform: scale(.88) translateY(-8px); opacity: 0; visibility: hidden; transition: transform .28s cubic-bezier(.2, 1.2, .4, 1), opacity .2s, visibility 0s .28s; }
.menu.open { transform: none; opacity: 1; visibility: visible; transition: transform .35s cubic-bezier(.2, 1.2, .4, 1), opacity .2s; }
.menu-head { display: flex; align-items: center; gap: 12px; padding: 12px 10px 14px; margin-bottom: 4px; border-radius: 16px; background: var(--gala); color: #f5efe6; }
.menu-who { min-width: 0; display: flex; flex-direction: column; }
.menu-who b { font-family: var(--serif); font-size: 1.1rem; font-weight: 700; }
.menu-who small { color: rgba(245, 239, 230, .7); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.menu-roles { display: flex; gap: 4px; margin-top: 5px; }
.menu-roles em { font-style: normal; font-size: .66rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(233, 196, 106, .18); color: #f6dfa4; border: 1px solid rgba(233, 196, 106, .3); }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; background: none; border-radius: 13px; text-decoration: none; font-weight: 500; font-size: .95rem; text-align: start; transition: background .15s; opacity: 0; transform: translateX(-8px); }
.menu.open .menu-item { animation: menu-in .35s cubic-bezier(.2, .9, .3, 1) forwards; }
.menu.open .menu-item:nth-of-type(2) { animation-delay: .05s; } .menu.open .menu-item:nth-of-type(3) { animation-delay: .1s; } .menu.open .menu-item:nth-of-type(4) { animation-delay: .15s; }
.menu-item:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.mi-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--gold-deep); flex: none; border: 1px solid var(--line); }
:root[data-theme="dark"] .mi-ic { color: #e9c46a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mi-ic { color: #e9c46a; } }
.mi-ic svg { width: 18px; height: 18px; }
.menu-item.danger { color: #c22d55; }
.menu-item.danger .mi-ic { color: #c22d55; }
.menu-sep { height: 1px; background: var(--line); margin: 6px 8px; }
.mini-switch { margin-inline-start: auto; width: 36px; height: 22px; border-radius: 999px; background: var(--ink-3); opacity: .5; position: relative; transition: .2s; }
.mini-switch::after { content: ''; position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.mini-switch.on { background: var(--accent); opacity: 1; }
.mini-switch.on::after { transform: translateX(-14px); }

/* ── Icons ── */
.duo { width: 24px; height: 24px; }
.duo .b { fill: currentColor; opacity: .28; }
.duo .a { fill: currentColor; }

/* ── Bottom navigation ── */
.nav { position: fixed; inset: auto 0 0 0; z-index: 20; padding: 8px 12px calc(10px + var(--safe-b)); display: flex; justify-content: center; pointer-events: none; }
.nav-inner { pointer-events: auto; position: relative; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); padding: 6px; width: 100%; max-width: 520px; background: var(--glass); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 18px 44px rgba(29, 20, 48, .18); }
.nav-blob { position: absolute; top: 6px; bottom: 6px; right: 6px; width: calc((100% - 12px) / var(--n, 4)); border-radius: 20px; background: var(--gala); box-shadow: 0 10px 24px rgba(34, 18, 63, .4), inset 0 0 0 1px rgba(233, 196, 106, .3); transform: translateX(calc(var(--i) * -100%)); transition: transform .5s cubic-bezier(.3, 1.25, .5, 1); }
.nav a { position: relative; z-index: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px 6px; border-radius: 20px; text-decoration: none; color: var(--ink-3); font-size: .7rem; font-weight: 500; white-space: nowrap; transition: color .3s; }
.nav a .duo { width: 23px; height: 23px; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.nav a.on { color: #f6dfa4; }
.nav a.on .duo { transform: translateY(-1px) scale(1.1); }

/* ── Greeting & sections ── */
.greet { margin: 4px 2px 18px; }
.greet h1 { font-family: var(--serif); font-size: 2.1rem; line-height: 1.1; margin: 4px 0 0; font-weight: 700; letter-spacing: -.01em; }
.greet p { margin: 6px 0 0; color: var(--ink-2); font-size: .98rem; }
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--line); }
.section { margin-top: 30px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 2px 12px; }
.section-head h2 { margin: 0; font-family: var(--serif); font-size: 1.45rem; font-weight: 700; }
.section-head .more { font-size: .86rem; color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; background: none; border: 0; padding: 4px 2px; }
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1); }
[data-reveal].in { opacity: 1; transform: none; }

/* ── Avatars ── */
.av { --s: 48px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; position: relative; display: block; }
.av > svg.face, .av > img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.av > img { object-fit: cover; }
.av svg.face { overflow: visible; }
.av.with-hat svg.face .hat { transform-box: fill-box; transform-origin: 50% 100%; animation: hat 2.6s ease-in-out infinite; }
.photo-hat { position: absolute; width: 56%; left: 22%; top: -26%; overflow: visible; transform: rotate(-8deg); }

/* ── Gala surfaces (hero, next, login, banners) ── */
.gala { position: relative; overflow: hidden; color: #f5efe6; isolation: isolate; }
.gala-bg { position: absolute; inset: 0; z-index: -2; background: var(--gala); overflow: hidden; }
.gala-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(1.5px 1.5px at 12% 22%, rgba(255, 240, 200, .9), transparent), radial-gradient(1px 1px at 72% 18%, #fff, transparent), radial-gradient(1.5px 1.5px at 40% 70%, rgba(255, 240, 200, .8), transparent), radial-gradient(1px 1px at 86% 62%, #fff, transparent), radial-gradient(1px 1px at 26% 88%, #fff, transparent), radial-gradient(1.5px 1.5px at 58% 40%, rgba(255, 240, 200, .7), transparent); animation: stars 5s ease-in-out infinite alternate; }
.beam { position: absolute; top: -40%; width: 38%; height: 180%; background: linear-gradient(180deg, rgba(255, 233, 180, .28), rgba(255, 233, 180, 0) 70%); filter: blur(14px); transform-origin: 50% 0; mix-blend-mode: screen; }
.beam.b1 { left: 8%; animation: sweep 9s ease-in-out infinite alternate; }
.beam.b2 { left: 48%; animation: sweep 11s ease-in-out -3s infinite alternate-reverse; background: linear-gradient(180deg, rgba(236, 122, 160, .3), transparent 70%); }
.beam.b3 { left: 70%; animation: sweep 13s ease-in-out -6s infinite alternate; background: linear-gradient(180deg, rgba(185, 139, 230, .3), transparent 70%); }
canvas.fw { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
canvas.confetti { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 5; pointer-events: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 600; letter-spacing: .12em; color: #f6dfa4; padding: 5px 12px 5px 14px; border-radius: 999px; border: 1px solid rgba(233, 196, 106, .4); background: rgba(233, 196, 106, .1); }
.eyebrow svg { width: 14px; height: 14px; animation: spin-slow 6s linear infinite; }

/* ── Hero: today ── */
.hero { border-radius: 30px; box-shadow: var(--shadow-lg); padding: 22px 20px 18px; border: 1px solid rgba(233, 196, 106, .22); cursor: crosshair; }
.hero::after { content: ''; position: absolute; inset: 6px; border-radius: 25px; border: 1px solid rgba(233, 196, 106, .14); pointer-events: none; }
.gala-balloons { position: absolute; top: -26px; left: -20px; width: 150px; z-index: 0; opacity: .95; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(108px, 42%); align-items: center; gap: 4px; }
.hero-person { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.hero-av { position: relative; margin: 26px 6px 12px; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.hero-av .av { z-index: 1; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .35)); }
.hero-av .ring, .next-av .ring { position: absolute; inset: -7px; border-radius: 50%; background: conic-gradient(from var(--ang), #9c6f22, #fff0c4, transparent 30%, #c9a14a, #fff6dc 70%, transparent 80%, #9c6f22); animation: spin 4s linear infinite; z-index: 0; -webkit-mask: radial-gradient(circle, transparent calc(50% - 3px), #000 calc(50% - 2px)); mask: radial-gradient(circle, transparent calc(50% - 3px), #000 calc(50% - 2px)); }
.hero-name { font-family: var(--serif); font-size: 2.15rem; font-weight: 700; line-height: 1.05; margin: 0; overflow-wrap: anywhere; text-shadow: 0 4px 24px rgba(0, 0, 0, .35); }
.hero-date { font-size: .92rem; color: rgba(245, 239, 230, .8); margin-top: 6px; }
.cake-btn { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #f5efe6; position: relative; z-index: 6; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.cake { width: 100%; max-width: 165px; filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .4)); animation: bob 3.4s ease-in-out infinite; overflow: visible; }
.cake-hint { font-size: .68rem; font-weight: 500; letter-spacing: .06em; color: #f6dfa4; border: 1px solid rgba(233, 196, 106, .35); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker .9s ease-in-out var(--d) infinite alternate; transition: transform .3s, opacity .3s; }
.flame .glow { animation: glow 1.3s ease-in-out var(--d) infinite alternate; }
.cake-btn.out .flame { transform: scale(0); opacity: 0; animation: none; }
.cake-btn.out .smoke { animation: smoke 1.8s ease-out forwards; }
.cake-btn.out .cake-hint { opacity: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; position: relative; z-index: 6; }
.hero-many { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; position: relative; z-index: 6; padding: 4px 2px 6px; }
.hero-many button { border: 1px solid rgba(233, 196, 106, .3); background: rgba(255, 255, 255, .06); border-radius: 999px; padding: 4px 12px 4px 4px; display: flex; align-items: center; gap: 8px; color: #f5efe6; font-weight: 500; white-space: nowrap; transition: .2s; }
.hero-many button.on { background: var(--gold-grad); background-size: 200% 100%; color: #2a1a05; border-color: transparent; }
.tap-hint { position: absolute; bottom: 10px; left: 16px; z-index: 3; font-size: .64rem; letter-spacing: .08em; color: rgba(245, 239, 230, .45); pointer-events: none; }

/* ── Hero: next birthday ── */
.next { border-radius: 30px; padding: 20px; }
.next-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.next-who { min-width: 0; }
.next-name { font-family: var(--serif); font-size: 1.8rem; font-weight: 700; line-height: 1.1; margin: 10px 0 4px; overflow-wrap: anywhere; }
.next-date { color: rgba(245, 239, 230, .78); font-size: .9rem; }
.next-av { position: relative; flex: none; border: 0; background: none; padding: 7px; }
.next-av .av { z-index: 1; }
.gift-mini { position: absolute; z-index: 2; width: 38px; bottom: -4px; left: -8px; animation: wiggle 3.2s ease-in-out infinite; }
.gift-mini svg { width: 100%; display: block; }
.countdown { direction: ltr; position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.cd { border-radius: 16px; padding: 10px 2px 8px; text-align: center; background: rgba(255, 255, 255, .06); border: 1px solid rgba(233, 196, 106, .22); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); perspective: 300px; }
.cd-num { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.85rem; line-height: 1; font-variant-numeric: tabular-nums; background: var(--gold-grad); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 6s linear infinite; }
.cd-num.flip { animation: flip .55s cubic-bezier(.3, 1.3, .5, 1), sheen 6s linear infinite; }
.cd-label { font-size: .68rem; color: rgba(245, 239, 230, .65); letter-spacing: .06em; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 600; font-size: .96rem; text-decoration: none; min-height: 48px; transition: transform .15s ease, box-shadow .2s ease; position: relative; overflow: hidden; }
.btn:active { transform: scale(.97); }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%); transform: translateX(-120%); pointer-events: none; }
.btn:hover::after { transform: translateX(120%); transition: transform .8s ease; }
.btn-gold { background: var(--gold-grad); background-size: 220% 100%; animation: sheen 6s linear infinite; color: #2a1a05; box-shadow: 0 10px 26px rgba(201, 161, 74, .35); }
.btn-glass { background: rgba(255, 255, 255, .08); color: #f5efe6; border: 1px solid rgba(255, 240, 210, .28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 12px 28px rgba(75, 29, 110, .32); }
.btn-soft { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.btn-soft svg { color: var(--gold); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-wa { background: linear-gradient(135deg, #25b864, #128c4a); color: #fff; box-shadow: 0 10px 22px rgba(18, 140, 74, .28); }
.btn-danger { background: transparent; color: #c22d55; border: 1px solid color-mix(in srgb, #c22d55 30%, transparent); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.link-btn { border: 0; background: none; color: var(--ink-2); font-weight: 500; font-size: .84rem; text-decoration: underline; text-underline-offset: 3px; }

/* ── Stats ── */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px 8px 12px; box-shadow: var(--shadow-sm); text-align: center; min-width: 0; }
.stat-ic { width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; color: var(--gold-deep); background: var(--surface-2); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); }
:root[data-theme="dark"] .stat-ic { color: #e9c46a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .stat-ic { color: #e9c46a; } }
.stat-ic .duo { width: 18px; height: 18px; }
.stat b { display: block; font-family: var(--serif); font-size: 1.8rem; font-weight: 700; line-height: 1.05; }
.stat > span:last-child { font-size: .74rem; color: var(--ink-2); display: block; }

/* ── Timeline ── */
.timeline { position: relative; display: flex; flex-direction: column; gap: 12px; }
.timeline::before { content: ''; position: absolute; top: 24px; bottom: 24px; right: 25px; width: 1.5px; background: linear-gradient(var(--gold), var(--rose), var(--plum)); opacity: .45; }
.tl-row { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; text-align: start; animation: rise .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 70ms); transition: transform .2s; }
.tl-date { position: relative; z-index: 1; width: 52px; height: 58px; flex: none; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.tl-date b { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; }
.tl-date small { font-size: .66rem; color: var(--ink-2); margin-top: 3px; }
.tl-row.hot .tl-date { background: var(--gala); color: #f6dfa4; border-color: rgba(233, 196, 106, .4); }
.tl-row.hot .tl-date small { color: rgba(245, 239, 230, .75); }
.tl-card { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); position: relative; }
.tl-row.hot .tl-card { border: 1.5px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, conic-gradient(from var(--ang), #9c6f22, #fff0c4, #c9a14a, var(--line) 40%, var(--line) 60%, #c9a14a, #9c6f22) border-box; animation: spin 5s linear infinite; }
.row-main { flex: 1; min-width: 0; }
.row-name, .row-sub { display: block; }
.row-name { font-weight: 600; font-size: 1rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: .8rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { flex: none; font-size: .74rem; font-weight: 600; padding: 4px 11px; border-radius: 999px; white-space: nowrap; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.pill.today { background: var(--gold-grad); background-size: 220% 100%; animation: sheen 5s linear infinite; color: #2a1a05; box-shadow: 0 6px 16px rgba(201, 161, 74, .35); }
.pill.soon { background: color-mix(in srgb, var(--rose) 12%, transparent); color: var(--rose); }
.pill.past { background: var(--surface-2); color: var(--ink-3); }
:root[data-theme="dark"] .pill.soon { color: #f08aab; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.soon { color: #f08aab; } }
.me-tag { font-size: .66rem; font-weight: 600; color: var(--gold-deep); background: color-mix(in srgb, var(--gold) 16%, transparent); padding: 1px 7px; border-radius: 999px; margin-inline-start: 6px; vertical-align: 2px; }
:root[data-theme="dark"] .me-tag { color: #e9c46a; }

/* ── Months strip ── */
.wheel { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 16px; margin: 0 -16px; scrollbar-width: none; }
.wheel::-webkit-scrollbar { display: none; }
.hs-wrap { position: relative; }
.hscroll { cursor: grab; -webkit-mask-image: linear-gradient(to left, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); mask-image: linear-gradient(to left, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); }
.hscroll.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.hs-btn { display: none; position: absolute; top: calc(50% - 26px); z-index: 2; width: 38px; height: 38px; border-radius: 50%; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); transition: opacity .25s, transform .2s; }
.hs-btn svg { width: 20px; height: 20px; }
.hs-btn:hover { transform: scale(1.08); }
.hs-btn[data-hs="prev"] { right: -10px; }
.hs-btn[data-hs="next"] { left: -10px; }
.hs-wrap.at-start .hs-btn[data-hs="prev"], .hs-wrap.at-end .hs-btn[data-hs="next"] { opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .hs-btn { display: grid; } }
.wm { flex: none; width: 106px; scroll-snap-align: center; border: 1px solid var(--line); border-radius: 22px; padding: 12px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.wm:active { transform: scale(.95); }
.wm-num { font-family: var(--serif); font-size: 1.7rem; font-weight: 700; line-height: 1; color: var(--gold); }
.wm-name { font-weight: 600; font-size: .9rem; }
.wm-faces { display: flex; height: 26px; margin: 2px 0; }
.wm-faces .av { margin-inline-start: -8px; box-shadow: 0 0 0 2px var(--surface); border-radius: 50%; }
.wm-faces .av:first-child { margin-inline-start: 0; }
.wm-count { font-size: .72rem; color: var(--ink-2); }
.wm.none { opacity: .5; }
.wm.cur { background: var(--gala); color: #f5efe6; border-color: rgba(233, 196, 106, .4); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.wm.cur .wm-num { background: var(--gold-grad); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 6s linear infinite; }
.wm.cur .wm-count { color: rgba(245, 239, 230, .75); }
.wm.cur .wm-faces .av { box-shadow: 0 0 0 2px #22123f; }

/* ── Lists & team ── */
.list { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: start; border: 1px solid var(--line); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-sm); animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 50ms); transition: transform .2s; }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cards .wide { grid-column: 1 / -1; }
.tcard { position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--surface); border-radius: 24px; padding: 18px 10px 14px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; box-shadow: var(--shadow-sm); min-width: 0; animation: pop .55s cubic-bezier(.2, 1.1, .4, 1) both; animation-delay: calc(var(--i) * 45ms); transition: transform .2s, box-shadow .2s; }
.tcard:hover { box-shadow: var(--shadow); }
.tcard::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 60px; background: var(--soft); z-index: 0; }
.tcard-shine { position: absolute; inset: 0; background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 240, 200, .5), transparent 45%); opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 2; }
.tcard:hover .tcard-shine { opacity: 1; }
.tcard > * { position: relative; z-index: 1; }
.tcard .av { margin-bottom: 8px; filter: drop-shadow(0 8px 14px rgba(29, 20, 48, .18)); }
.tcard-name { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; line-height: 1.15; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard-name small { display: block; font-family: 'Heebo', sans-serif; font-size: .76rem; color: var(--ink-2); font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.tcard-date { font-size: .78rem; color: var(--ink-2); margin-bottom: 6px; }
.tcard.party { border: 1.5px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, conic-gradient(from var(--ang), #9c6f22, #fff0c4, #c9a14a, #f6dfa4, #9c6f22) border-box; animation: pop .55s both, spin 5s linear infinite; }
.tcard.party::before { background: var(--gala); }
.me-tag.corner { position: absolute; top: 10px; right: 10px; margin: 0; z-index: 3; }
.empty { text-align: center; padding: 26px 20px; }
.empty h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 1.2rem; }
.empty p { margin: 0; color: var(--ink-2); font-size: .92rem; }

/* ── Calendar ── */
.cal-card { overflow: hidden; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px; background: var(--gala); color: #f5efe6; }
.cal-title { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; display: flex; align-items: baseline; gap: 8px; }
.cal-mnum { font-size: 1.1rem; background: var(--gold-grad); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 6s linear infinite; }
.cal-title small { font-family: 'Heebo', sans-serif; font-weight: 400; color: rgba(245, 239, 230, .7); font-size: .85rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; padding: 10px 10px 14px; }
.cal-dow { text-align: center; font-size: .72rem; font-weight: 600; color: var(--ink-3); padding: 4px 0; }
.cal-day { aspect-ratio: 1 / 1.1; border: 0; border-radius: 14px; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 5px 0 0; gap: 2px; font-weight: 500; font-size: .9rem; min-width: 0; position: relative; animation: pop .4s both; animation-delay: calc(var(--i) * 12ms); }
.cal-day.out { visibility: hidden; }
.cal-day.today .cal-n { background: var(--gold-grad); background-size: 220% 100%; color: #2a1a05; border-radius: 999px; padding: 0 7px; font-weight: 700; animation: pulse 2.4s ease-in-out infinite; }
.cal-day.has { background: var(--surface-2); }
.cal-day.sel { box-shadow: inset 0 0 0 1.5px var(--gold); }
.cal-day .av { --s: min(28px, 7.2vw) !important; }
.cal-day .plus { position: absolute; top: 2px; inset-inline-end: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--plum); color: #f6dfa4; font-size: .58rem; font-weight: 700; line-height: 16px; text-align: center; }

/* ── Segmented & search ── */
.seg { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.seg-blob { position: absolute; top: 4px; bottom: 4px; right: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--gala); box-shadow: var(--shadow-sm); transform: translateX(calc(var(--i) * -100%)); transition: transform .4s cubic-bezier(.3, 1.25, .5, 1); }
.seg button { position: relative; z-index: 1; border: 0; background: none; border-radius: 999px; padding: 8px 16px; font-weight: 500; font-size: .86rem; color: var(--ink-2); white-space: nowrap; transition: color .3s; }
.seg button.on { color: #f6dfa4; }
.search { position: relative; margin-bottom: 12px; }
.search svg { position: absolute; top: 50%; right: 16px; width: 19px; height: 19px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search .input { padding-right: 46px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }

/* ── Forms ── */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: .82rem; font-weight: 500; color: var(--ink-2); margin: 0 4px 6px; }
.input, select.input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 12px 14px; min-height: 50px; font-size: 1rem; outline: none; transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: 18px 22px, 23px 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-left: 36px; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 18%, transparent); }
.input[dir="ltr"] { text-align: right; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.toggles { border-radius: 18px; background: var(--surface-2); padding: 2px 14px; margin-top: 6px; border: 1px solid var(--line); }
.toggles-card { padding-top: 4px; padding-bottom: 4px; }
.toggle { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.toggle:first-child { border-top: 0; }
.toggle-text { flex: 1; min-width: 0; }
.toggle-text b { display: block; font-weight: 500; font-size: .95rem; }
.toggle-text small { color: var(--ink-2); font-size: .78rem; line-height: 1.45; display: block; }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--ink-3); opacity: .45; transition: background .25s, opacity .25s; }
.switch i::after { content: ''; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.switch input:checked + i { background: var(--brand); opacity: 1; }
.switch input:checked + i::after { transform: translateX(-20px); }
.pad { padding: 18px; }

/* ── Personal area ── */
.profile { overflow: hidden; position: relative; }
.profile-banner { height: 120px; }
.pb-balloons { position: absolute; width: 130px; left: 6px; top: -14px; }
.profile-body { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 18px 20px; margin-top: -60px; position: relative; }
.photo-wrap { position: relative; }
.photo-wrap > .av { box-shadow: 0 0 0 5px var(--surface), 0 0 0 6.5px color-mix(in srgb, var(--gold) 55%, transparent), var(--shadow); border-radius: 50%; }
.photo-btn { position: absolute; bottom: 4px; left: 2px; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--surface); background: var(--plum); color: #f6dfa4; display: grid; place-items: center; z-index: 2; transition: transform .2s; }
.photo-btn:hover { transform: scale(1.08); }
.photo-btn svg { width: 17px; height: 17px; }
.profile-body h2 { margin: 12px 0 2px; font-family: var(--serif); font-size: 1.7rem; font-weight: 700; }
.badges { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.badge { font-size: .72rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--gold) 14%, transparent); color: var(--gold-deep); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); }
.profile-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 14px; }
.my-bday { margin-top: 14px; padding: 16px 18px 18px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 14px; background: var(--soft); }
.mb-text { display: flex; flex-direction: column; min-width: 0; }
.mb-label { font-size: .72rem; font-weight: 600; letter-spacing: .1em; color: var(--gold); }
.mb-text b { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.mb-text small { color: var(--ink-2); }
.mb-gift { width: 62px; animation: wiggle 3.4s ease-in-out infinite; }
.mb-gift svg { width: 100%; display: block; }
.mb-bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--plum) 12%, transparent); overflow: hidden; }
.mb-bar i { display: block; height: 100%; width: var(--p); border-radius: 999px; background: var(--gold-grad); background-size: 250% 100%; animation: grow 1.6s cubic-bezier(.2, .8, .2, 1) both, sheen 5s linear infinite; }

/* ── Sheets ── */
.sheet-back { position: fixed; inset: 0; z-index: 40; background: rgba(12, 8, 22, .5); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); animation: fade .2s ease both; }
.sheet { position: fixed; z-index: 41; inset: auto 0 0 0; margin: 0 auto; max-width: 560px; max-height: 88dvh; overflow: auto; background: var(--surface); border-radius: 30px 30px 0 0; padding: 0 20px calc(22px + var(--safe-b)); box-shadow: 0 -20px 60px rgba(12, 8, 22, .4); animation: up .45s cubic-bezier(.2, .9, .25, 1) both; }
.sheet.tall { max-height: 94dvh; }
.sheet-grip { width: 42px; height: 4px; border-radius: 999px; background: var(--ink-3); opacity: .4; margin: 10px auto 6px; position: relative; z-index: 6; }
.sheet-title { font-family: var(--serif); font-size: 1.5rem; margin: 6px 0 12px; text-align: center; }
.sheet-hero { position: relative; overflow: hidden; margin: -20px -20px 0; padding: 30px 20px 18px; isolation: isolate; background: var(--soft); }
.sheet-hero.party { background: var(--gala); color: #f5efe6; }
.sheet-hero.party .muted { color: rgba(245, 239, 230, .8); }
.sheet-hero canvas.fw { z-index: 0; }
.sheet-person { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; }
.sheet-person .av { margin: 14px 0 14px; filter: drop-shadow(0 12px 22px rgba(29, 20, 48, .25)); animation: pop .6s cubic-bezier(.2, 1.3, .4, 1) both; }
.sheet-person h3 { margin: 0; font-family: var(--serif); font-size: 1.8rem; font-weight: 700; }
.sheet-person .when { margin-top: 10px; }
.sheet-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.sheet-foot { position: sticky; bottom: calc(-22px - var(--safe-b)); display: flex; gap: 10px; justify-content: space-between; padding: 14px 0 calc(6px + var(--safe-b)); margin-top: 10px; background: linear-gradient(transparent, var(--surface) 30%); }
.sheet-foot .btn-primary { flex: 1; }
.contact-list { margin-top: 16px; border-radius: 16px; background: var(--surface-2); padding: 4px 14px; text-align: start; border: 1px solid var(--line); }
.contact-list div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.contact-list div:first-child { border-top: 0; }
.contact-list span { color: var(--ink-2); }
.contact-list a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.private-note { font-size: .74rem; color: var(--ink-3); margin-top: 8px; display: flex; align-items: center; gap: 4px; justify-content: center; text-align: center; }
.private-note svg { width: 13px; height: 13px; flex: none; }
.note { display: flex; gap: 8px; align-items: center; font-size: .84rem; color: var(--ink-2); background: var(--surface-2); border-radius: 14px; padding: 10px 12px; margin-bottom: 10px; }
.note svg { width: 18px; height: 18px; flex: none; color: var(--gold); }

/* ── Avatar editor ── */
.ae-preview { display: grid; place-items: center; padding: 6px 0 14px; }
.ae-stage { width: 148px; height: 148px; border-radius: 50%; padding: 5px; background: conic-gradient(from var(--ang), #9c6f22, #fff0c4, #c9a14a, #f6dfa4, #9c6f22); animation: spin 6s linear infinite; box-shadow: var(--shadow-lg); }
.ae-stage svg { width: 100%; height: 100%; display: block; border-radius: 50%; }
.ae-stage.pop svg { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.ae-deck-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 8px; }
.ae-deck-head b { font-family: var(--serif); font-size: 1.1rem; }
.ae-deck { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.deck-pick { border: 0; padding: 0; background: none; border-radius: 50%; aspect-ratio: 1; transition: transform .2s; animation: pop .4s both; }
.deck-pick:nth-child(2) { animation-delay: .03s; } .deck-pick:nth-child(3) { animation-delay: .06s; } .deck-pick:nth-child(4) { animation-delay: .09s; } .deck-pick:nth-child(5) { animation-delay: .12s; } .deck-pick:nth-child(6) { animation-delay: .15s; } .deck-pick:nth-child(7) { animation-delay: .18s; } .deck-pick:nth-child(8) { animation-delay: .21s; }
.deck-pick:hover { transform: translateY(-3px) scale(1.04); }
.deck-pick svg { width: 100%; height: 100%; display: block; border-radius: 50%; box-shadow: var(--shadow-sm); }
.ae-tune { display: flex; flex-direction: column; gap: 14px; }
.ae-row { display: flex; flex-direction: column; gap: 8px; }
.ae-label { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--c); box-shadow: 0 0 0 1px var(--line); transition: transform .2s, box-shadow .2s; }
.swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--gold); transform: scale(1.08); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 999px; padding: 7px 14px; font-size: .84rem; font-weight: 500; transition: .2s; }
.chip svg { width: 16px; height: 16px; }
.chip.on { background: var(--gala); color: #f6dfa4; border-color: rgba(233, 196, 106, .4); }
.styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 6px; padding-bottom: 4px; }
.style-pick { flex: none; width: 66px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 16px; padding: 6px 4px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.style-pick svg { width: 50px; height: 50px; display: block; }
.style-pick small { font-size: .7rem; color: var(--ink-2); }
.style-pick.on { border-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 30%, transparent); }

/* ── Toast ── */
#toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 24px); transform: translate(-50%, 20px) scale(.92); background: var(--gala); color: #f6dfa4; border: 1px solid rgba(233, 196, 106, .35); padding: 12px 22px; border-radius: 999px; font-weight: 500; font-size: .94rem; opacity: 0; pointer-events: none; transition: opacity .25s, transform .4s cubic-bezier(.2, 1.3, .4, 1); max-width: calc(100vw - 32px); text-align: center; box-shadow: 0 16px 36px rgba(12, 8, 22, .4); }
#toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ── Login ── */
.login { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 24px 16px calc(28px + var(--safe-b)); cursor: crosshair; }
.login canvas.fw { position: fixed; }
.login-scene { flex: 1; width: 100%; max-width: 420px; position: relative; min-height: 230px; }
.ls-balloons { position: absolute; width: 60%; max-width: 250px; top: 0; right: 2%; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.login-cake { position: absolute; width: 44%; max-width: 185px; bottom: 4px; left: 6%; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.login-cake .cake { max-width: none; }
.login-card { position: relative; z-index: 2; width: 100%; max-width: 420px; background: var(--glass); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4); color: var(--ink); border-radius: 30px; padding: 24px 22px 20px; border: 1px solid rgba(233, 196, 106, .35); box-shadow: 0 30px 80px rgba(0, 0, 0, .45); text-align: center; animation: pop .8s cubic-bezier(.2, 1.2, .4, 1) both; cursor: default; }
.login-logo { width: 70px; height: 70px; border-radius: 22px; margin: -58px auto 10px; box-shadow: 0 16px 34px rgba(0, 0, 0, .4); animation: bob 3.6s ease-in-out infinite; }
.login-card h1 { margin: 2px 0 0; font-family: var(--serif); font-size: 2.4rem; font-weight: 700; line-height: 1.05; }
.login-card .login-tag { margin: 10px 0 18px; color: var(--ink-2); font-size: .98rem; line-height: 1.65; }
.rotator { display: inline-block; font-weight: 700; color: var(--rose); transition: transform .3s, opacity .3s, filter .3s; }
.rotator.out { transform: translateY(-50%); opacity: 0; filter: blur(4px); }
.gbtn-wrap { color-scheme: light; display: flex; justify-content: center; min-height: 44px; }
.login-note { font-size: .76rem; color: var(--ink-2); margin-top: 16px; line-height: 1.5; display: flex; gap: 6px; align-items: flex-start; text-align: start; }
.login-note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.alert { border-radius: 14px; padding: 12px 14px; font-size: .9rem; text-align: start; margin-bottom: 16px; background: color-mix(in srgb, var(--rose) 12%, transparent); color: #a8234a; }
:root[data-theme="dark"] .alert { color: #f5a3bb; }
.dev-login { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.dev-login small { display: block; color: var(--ink-3); margin-bottom: 8px; }
.dev-login form { display: flex; gap: 8px; }
.dev-login .input { min-height: 42px; padding: 8px 12px; font-size: .9rem; }

/* ── Onboarding ── */
.onb-hero { text-align: center; padding: 6px 6px 18px; display: flex; flex-direction: column; align-items: center; }
.onb-av { display: inline-block; margin-top: 18px; animation: pop .7s cubic-bezier(.2, 1.3, .4, 1) both; }
.onb-hero h1 { margin: 12px 0 6px; font-family: var(--serif); font-size: 1.9rem; font-weight: 700; }
.onb-hero p { margin: 0 0 12px; color: var(--ink-2); }
.privacy-box { border-radius: 18px; background: var(--surface-2); padding: 14px 16px; font-size: .86rem; color: var(--ink-2); line-height: 1.65; margin-bottom: 14px; border: 1px solid var(--line); }
.privacy-box b { color: var(--ink); font-family: var(--serif); font-size: 1rem; }
.privacy-box ul { margin: 6px 0; padding-inline-start: 18px; }
.privacy-box a { color: var(--accent); font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin: 6px 2px 16px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--plum); flex: none; margin: 2px 0 0; }

/* ── Motion ── */
.view { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
::view-transition-old(root) { animation: .22s ease both fade-out; }
::view-transition-new(root) { animation: .4s cubic-bezier(.2, .8, .2, 1) both rise; }
@keyframes spin { to { --ang: 360deg; } }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes sheen { to { background-position: 250% 0; } }
@keyframes roam { to { transform: translate(-8vmax, 6vmax) scale(1.15); } }
@keyframes float { from { transform: translate(0, 0); } to { transform: translate(40px, -70px); } }
@keyframes twinkle { 0%, 100% { transform: scale(.4) rotate(0); opacity: .2; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
@keyframes stars { from { opacity: .5; } to { opacity: 1; } }
@keyframes sweep { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes wiggle { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-9deg) scale(1.05); } 85% { transform: rotate(7deg); } 92% { transform: rotate(-3deg); } }
@keyframes hat { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes flicker { 0% { transform: scale(1, 1) rotate(-3deg); } 50% { transform: scale(.9, 1.1) rotate(2deg); } 100% { transform: scale(1.05, .95) rotate(-1deg); } }
@keyframes glow { from { opacity: .15; } to { opacity: .4; } }
@keyframes smoke { 0% { opacity: 0; transform: translateY(0); } 25% { opacity: .85; } 100% { opacity: 0; transform: translateY(-28px); } }
@keyframes flip { 0% { transform: rotateX(90deg); opacity: 0; } 100% { transform: rotateX(0); opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.9) translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 30%, transparent); } 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--gold) 5%, transparent); } }
@keyframes grow { from { width: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes menu-in { to { opacity: 1; transform: none; } }
.balloons { overflow: visible; width: 100%; display: block; }
.balloons .balloon { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 5.5s ease-in-out infinite; }
.balloons .b2 { animation-duration: 6.6s; animation-delay: -1.4s; } .balloons .b3 { animation-duration: 5.8s; animation-delay: -3s; } .balloons .b4 { animation-duration: 7.2s; animation-delay: -2s; } .balloons .b5 { animation-duration: 6.2s; animation-delay: -4s; }
@keyframes sway { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
@media (min-width: 560px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .greet h1 { font-size: 2.5rem; }
  .hero { padding: 28px 28px 22px; }
  .hero-name { font-size: 2.6rem; }
}
@media (max-width: 359px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 94px; }
  .hero-name { font-size: 1.75rem; }
  .cake-hint { display: none; }
  .stats { gap: 6px; }
  .stat b { font-size: 1.5rem; }
  .cd-num { font-size: 1.45rem; }
  .next-name { font-size: 1.45rem; }
  .greet h1 { font-size: 1.8rem; }
  .ae-deck { gap: 6px; }
}

/* My character: tap to edit */
.av-btn { position: relative; border: 0; background: none; padding: 0; border-radius: 50%; display: block; cursor: pointer; }
.photo-wrap .av-btn > .av { box-shadow: 0 0 0 5px var(--surface), 0 0 0 6.5px color-mix(in srgb, var(--gold) 55%, transparent), var(--shadow); border-radius: 50%; }
.av-edit { position: absolute; z-index: 3; bottom: 2px; right: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-grad); background-size: 220% 100%; color: #3a2108; border: 3px solid var(--surface); box-shadow: 0 6px 14px rgba(34, 18, 63, .3); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.next-av .av-edit { border-color: #22123f; bottom: 4px; right: 4px; }
.av-edit .duo { width: 16px; height: 16px; }
.av-btn:hover .av-edit, .next-av:hover .av-edit { transform: scale(1.12) rotate(-8deg); }

/* Calendar: today stands out */
.cal-day.today { background: color-mix(in srgb, var(--gold) 14%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gold) 70%, transparent), 0 6px 16px color-mix(in srgb, var(--gold) 25%, transparent); }
.cal-day.today::after { content: 'היום'; position: absolute; bottom: 3px; left: 0; right: 0; text-align: center; font-size: .56rem; font-weight: 700; letter-spacing: .04em; color: var(--gold-deep); }
.cal-day.today.has::after { display: none; }
:root[data-theme="dark"] .cal-day.today::after { color: #e9c46a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cal-day.today::after { color: #e9c46a; } }

/* Join request waiting, nav badge, job title */
.pending-box { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin: 0 0 16px; padding: 16px; border-radius: 18px; background: color-mix(in srgb, var(--gold) 12%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); }
.pending-box b { font-family: var(--serif); font-size: 1.25rem; }
.pending-box span:last-child { font-size: .88rem; color: var(--ink-2); line-height: 1.55; overflow-wrap: anywhere; }
.pb-ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--gala); color: #f6dfa4; animation: bob 2.6s ease-in-out infinite; }
.pb-ic svg { width: 22px; height: 22px; }
.nav a { position: relative; }
.nav-badge { position: absolute; top: 2px; left: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--rose); color: #fff; font-style: normal; font-size: .64rem; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface); animation: pop .5s cubic-bezier(.2, 1.3, .4, 1) both; }
.job-line { margin-top: 2px; font-size: .9rem; color: var(--gold-deep); font-weight: 500; }
.sheet-hero.party .job-line { color: #f6dfa4; }
.tcard-job { font-size: .72rem; color: var(--ink-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root[data-theme="dark"] .job-line { color: #e9c46a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .job-line { color: #e9c46a; } }
.style-group + .style-group { margin-top: 8px; }
.sg-label { display: block; font-size: .72rem; font-weight: 600; color: var(--gold-deep); margin: 0 2px 4px; letter-spacing: .04em; }
:root[data-theme="dark"] .sg-label { color: #e9c46a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sg-label { color: #e9c46a; } }
.style-pick { width: auto; min-width: 0; padding: 6px 2px 4px; }
.style-pick svg { width: min(50px, 100%); height: auto; aspect-ratio: 1; }
.style-pick small { font-size: .66rem; }
.style-pick small { line-height: 1.2; text-align: center; min-height: 2.4em; display: flex; align-items: center; }

/* Install-as-app sheet */
.sheet-icon .inst-icon { width: 100%; height: 100%; border-radius: inherit; display: block; }
.inst-steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.inst-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2, rgba(127, 90, 160, .08)); line-height: 1.45; font-size: .95rem; }
.inst-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: var(--gala); color: #f6dfa4; }
.inst-key { display: inline-grid; place-items: center; min-width: 1.6em; padding: 0 4px; border-radius: 6px; border: 1px solid currentColor; font-size: .85em; line-height: 1.5; opacity: .85; }
.inst-note { text-align: center; color: var(--ink-2); font-size: .82rem; margin: 0 0 14px; }

/* Login: Samsung Internet / in-app browser hint, shown above the Google button */
.browser-hint { display: grid; gap: 8px; text-align: center; margin: 0 0 16px; padding: 14px; border-radius: 18px; background: color-mix(in srgb, var(--gold) 12%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); font-size: .88rem; line-height: 1.5; }
.browser-hint b { font-size: .95rem; }
.browser-hint > span { color: var(--ink-2); }
.browser-hint .btn { text-decoration: none; }
.browser-hint .nowrap { white-space: nowrap; }
