/* Our Schedule — liquid glass UI, warm couple aesthetic, mobile-first */
:root {
  --ink: #4A3F35;
  --ink-soft: #6E6054;
  --muted: #A89C8E;
  --kev: #7BA7D9;
  --kev-deep: #3E6FA3;
  --kev-soft: rgba(123, 167, 217, .20);
  --bby: #E89AAE;
  --bby-deep: #B0526B;
  --bby-soft: rgba(232, 154, 174, .20);
  --accent: #F4A988;
  --accent-soft: rgba(244, 169, 136, .24);
  --cream: #FFF6EE;
  --radius: 22px;
  --radius-sm: 14px;
  --pill: 999px;
  --grad-warm: linear-gradient(135deg, #F6AD8A 0%, #F0A19F 52%, #E89AAE 100%);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.45, .64, 1);
  --ease-sheet: cubic-bezier(.32, .72, 0, 1);
  /* Material liquid glass */
  --glass-fill: linear-gradient(155deg, rgba(255, 255, 255, .66) 0%, rgba(255, 255, 255, .30) 48%, rgba(255, 255, 255, .44) 100%);
  --glass-blur: blur(22px) saturate(190%) brightness(1.03);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(255, 255, 255, .22);
  --glass-depth: 0 1px 2px rgba(120, 80, 50, .05), 0 10px 30px -10px rgba(178, 120, 90, .32), 0 30px 60px -30px rgba(178, 120, 90, .25);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-rounded, "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; }
.hidden { display: none !important; }
/* Ikon Solar (sprite di index.html), ikut warna teks */
.ic { width: 1.2em; height: 1.2em; flex-shrink: 0; vertical-align: -.22em; }
.view { max-width: 520px; margin: 0 auto; padding: 16px 14px 28px; min-height: 100vh; }
:focus-visible { outline: 2px solid rgba(244, 169, 136, .9); outline-offset: 2px; }

/* ---------- Latar aurora (yang dibiaskan kaca) ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%;
  will-change: transform;
  animation: drift 28s ease-in-out infinite alternate;
}
.b1 { width: 72vmax; height: 72vmax; left: -26vmax; top: -32vmax; background: radial-gradient(closest-side, rgba(244, 169, 136, .58), rgba(244, 169, 136, 0)); }
.b2 { width: 62vmax; height: 62vmax; right: -26vmax; top: -8vmax; background: radial-gradient(closest-side, rgba(232, 154, 174, .52), rgba(232, 154, 174, 0)); animation-duration: 34s; animation-delay: -8s; }
.b3 { width: 84vmax; height: 70vmax; left: -12vmax; bottom: -44vmax; background: radial-gradient(closest-side, rgba(255, 206, 160, .62), rgba(255, 206, 160, 0)); animation-duration: 40s; animation-delay: -16s; }
.b4 { width: 48vmax; height: 48vmax; right: -16vmax; bottom: -14vmax; background: radial-gradient(closest-side, rgba(123, 167, 217, .30), rgba(123, 167, 217, 0)); animation-duration: 30s; animation-delay: -4s; }
.b5 { width: 36vmax; height: 36vmax; left: -10vmax; top: 40vh; background: radial-gradient(closest-side, rgba(232, 154, 174, .30), rgba(232, 154, 174, 0)); animation-duration: 36s; animation-delay: -20s; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(4vmax, 3vmax, 0) scale(1.08); }
  100% { transform: translate3d(-3vmax, 5vmax, 0) scale(.95); }
}
/* Grain halus: latar terasa bertekstur, kaca terlihat lebih bening */
.bg::after {
  content: ""; position: absolute; inset: 0; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .29 0 0 0 0 .25 0 0 0 0 .21 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Glass surface ---------- */
.glass {
  position: relative;
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 0;
  box-shadow: var(--glass-edge), var(--glass-depth);
}
/* Rim cahaya: tepi kaca yang menangkap cahaya di sudut kiri-atas & kanan-bawah */
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .25) 28%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, .18) 72%, rgba(255, 255, 255, .8) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Login ---------- */
#login-view {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-top: 40px; padding-bottom: 40px;
  overflow: hidden; /* gelembung dekorasi boleh keluar kartu, tapi jangan bikin scroll samping */
}
.login-stage { position: relative; width: 100%; max-width: 380px; }
.login-card {
  z-index: 1;
  border-radius: 34px;
  padding: 34px 28px 28px;
  text-align: center;
  animation: pop-in .7s var(--ease-spring) backwards;
}
.login-card.shake { animation: shake .45s var(--ease-out); }
@keyframes shake {
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}
.login-heart {
  width: 64px; height: 64px; margin: 0 auto 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #E8708F;
  background: radial-gradient(120% 120% at 30% 18%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .38) 55%, rgba(244, 169, 136, .28));
  box-shadow: inset 0 1px 1px #fff, inset 0 -5px 12px rgba(232, 154, 174, .32), 0 12px 26px -10px rgba(232, 154, 174, .65);
  animation: float 5s ease-in-out infinite;
}
.login-heart .ic { width: 32px; height: 32px; }
.login-card h1 {
  margin: 6px 0 4px; padding: 0 4px 4px; /* ruang untuk ekor huruf italic */
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-style: italic; font-weight: 600;
  font-size: 46px; line-height: 1.05; letter-spacing: -.8px;
  background: linear-gradient(100deg, var(--ink) 25%, #9A5E60 75%, #B0526B);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
/* Garis pemisah tipis yang memudar di kedua ujung */
#login-form::before {
  content: ""; display: block; height: 1px; margin: 24px 6px 20px;
  background: linear-gradient(90deg, transparent, rgba(74, 63, 53, .16), transparent);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Pilih user: dua avatar dihubungkan hati ---------- */
.user-select { display: flex; align-items: flex-start; justify-content: center; gap: 4px; }
.user-opt.kev { --tint: 123, 167, 217; --tint-deep: 62, 111, 163; }
.user-opt.bby { --tint: 232, 154, 174; --tint-deep: 176, 82, 107; }
.user-opt {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 6px 10px; border: 0; border-radius: 20px;
  background: none; cursor: pointer;
  font-size: 14px; font-weight: 800; color: var(--muted);
  transition: color .25s ease;
}
.user-avatar {
  position: relative; width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 30% 15%, #fff, rgba(var(--tint), .3));
  box-shadow: inset 0 1px 1px #fff, inset 0 -3px 8px rgba(var(--tint-deep), .14), 0 0 0 2px rgba(255, 255, 255, .7), 0 8px 18px -10px rgba(120, 80, 50, .4);
  opacity: .55; filter: grayscale(.45);
  transition: opacity .3s ease, filter .3s ease, transform .45s var(--ease-spring), box-shadow .3s ease;
}
.user-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.user-initial { font-size: 26px; font-weight: 800; color: rgb(var(--tint-deep)); }
.user-check {
  position: absolute; right: -2px; bottom: -2px;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(135deg, rgb(var(--tint)), rgb(var(--tint-deep)));
  box-shadow: 0 0 0 2.5px #fff, 0 3px 8px -2px rgba(var(--tint-deep), .6);
  opacity: 0; scale: .4;
  transition: opacity .2s ease, scale .4s var(--ease-spring);
}
.user-check .ic { width: 15px; height: 15px; }
.user-opt.selected { color: var(--ink); }
.user-opt.selected .user-avatar { opacity: 1; filter: none; }
/* Tetesan liquid glass di belakang avatar terpilih (posisi & animasi tarik dari JS) */
.user-select { position: relative; }
.user-opt, .user-link { position: relative; z-index: 1; }
.user-blob {
  position: absolute; left: 0; top: 0; z-index: 0;
  width: 88px; height: 88px; border-radius: 50%;
  pointer-events: none; opacity: 0;
  background: radial-gradient(120% 120% at 30% 20%, rgba(255, 255, 255, .8), rgba(255, 255, 255, .25) 55%, rgba(var(--tint), .3));
  -webkit-backdrop-filter: blur(6px) saturate(170%);
  backdrop-filter: blur(6px) saturate(170%);
  box-shadow:
    inset 0 1px 1px #fff,
    inset 0 -4px 10px rgba(var(--tint-deep), .2),
    inset 0 0 0 1.5px rgba(255, 255, 255, .75),
    0 0 0 2.5px rgba(var(--tint), .75),
    0 14px 28px -10px rgba(var(--tint-deep), .6);
  transition: box-shadow .45s ease, background .45s ease, opacity .3s ease;
  will-change: transform;
}
.user-blob.is-ready { opacity: 1; }
.user-blob.kev { --tint: 123, 167, 217; --tint-deep: 62, 111, 163; }
.user-blob.bby { --tint: 232, 154, 174; --tint-deep: 176, 82, 107; }
/* Kilau specular di kiri-atas tetesan */
.user-blob::before {
  content: ""; position: absolute; left: 16%; top: 7%; width: 46%; height: 26%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0));
}
.user-opt.selected .user-check { opacity: 1; scale: 1; }
.user-link {
  display: flex; align-items: center; gap: 6px;
  margin-top: 33px; /* sejajar dengan tengah avatar */
  color: rgba(232, 154, 174, .85);
}
.user-link .ic { width: 16px; height: 16px; }
.user-link::before, .user-link::after { content: ""; width: 14px; height: 1.5px; border-radius: 2px; background: rgba(232, 154, 174, .4); }
.user-link { animation: heartbeat 2.4s ease-in-out infinite; }
@keyframes heartbeat { 0%, 60%, 100% { transform: scale(1); } 10% { transform: scale(1.18); } 20% { transform: scale(1); } 30% { transform: scale(1.1); } }
@media (hover: hover) {
  .user-opt:hover:not(.selected) .user-avatar { opacity: .85; filter: grayscale(.1); }
  .user-opt:hover:not(.selected) { color: var(--ink-soft); }
}

/* ---------- Password: ikon gembok + tombol lihat ---------- */
.pass-field { position: relative; margin-top: 24px; }
.pass-field input { padding: 14px 50px 14px 46px; }
.pass-icon {
  position: absolute; left: 16px; top: 50%; width: 18px; height: 18px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none; transition: color .2s ease;
}
.pass-field:focus-within .pass-icon { color: #E07F5C; }
.pass-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.pass-toggle .ic { width: 20px; height: 20px; }
@media (hover: hover) { .pass-toggle:hover { background: rgba(255, 255, 255, .7); color: var(--ink); } }

.login-foot { margin: 20px 0 0; text-align: center; font-size: 12.5px; font-weight: 700; letter-spacing: .3px; color: var(--muted); }
.foot-heart { width: 14px; height: 14px; margin: 0 1px; vertical-align: -2px; color: var(--bby); animation: heartbeat 2.4s ease-in-out infinite; }

/* Gelembung kaca dekoratif di belakang kartu (terlihat buram lewat kaca) */
.login-orb {
  position: absolute; z-index: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(120% 120% at 30% 20%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .3) 45%, rgba(var(--c), .5) 100%);
  box-shadow: inset 0 -6px 14px rgba(var(--c), .35), inset 0 2px 2px #fff, 0 16px 34px -12px rgba(var(--c), .65);
  animation: float 7s ease-in-out infinite;
}
.login-orb.o1 { --c: 244, 169, 136; width: 120px; height: 120px; top: -46px; right: -40px; }
.login-orb.o2 { --c: 123, 167, 217; width: 76px; height: 76px; bottom: 96px; left: -42px; animation-duration: 8s; animation-delay: -2.5s; }
.login-orb.o3 { --c: 232, 154, 174; width: 46px; height: 46px; bottom: 18px; right: -18px; animation-duration: 6s; animation-delay: -4s; }

/* Thumb "cair": memipih sesaat ketika pindah */
.squish { animation: squish .55s var(--ease-out); }
@keyframes squish {
  0% { scale: 1 1; }
  30% { scale: 1.1 .84; }
  65% { scale: .97 1.04; }
  100% { scale: 1 1; }
}

/* ---------- Form ---------- */
label { display: block; text-align: left; font-size: 13px; font-weight: 700; margin: 14px 2px 6px; color: var(--ink-soft); }
label .opt { font-weight: 600; color: var(--muted); }
/* Field: default lebih kontras, hover, focus (ring + label ikut berwarna),
   terisi, invalid (setelah user berinteraksi), disabled */
:root {
  --field-bg: rgba(255, 255, 255, .66);
  --field-border: rgba(150, 120, 95, .24);
  --field-border-hover: rgba(224, 127, 92, .5);
  --field-focus: #EE9A78;
  --field-ring: 0 0 0 4px rgba(244, 169, 136, .28), 0 6px 16px -8px rgba(224, 127, 92, .45);
  --field-inset: inset 0 1px 2px rgba(140, 95, 60, .08), 0 1px 0 rgba(255, 255, 255, .7);
  --field-invalid: #D9576A;
}
label { transition: color .2s ease; }
label:focus-within { color: #D9714F; }
input, select, textarea {
  width: 100%;
  font-size: 16px;
  font-weight: 600;
  padding: 13px 16px;
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  color: var(--ink);
  box-shadow: var(--field-inset);
  transition: background .2s ease, border-color .2s ease, box-shadow .25s ease;
}
input::placeholder, textarea::placeholder { color: rgba(140, 125, 110, .7); font-weight: 500; }
input:not(:placeholder-shown):not(.switch), textarea:not(:placeholder-shown) { background: rgba(255, 255, 255, .82); }
input:focus, select:focus, textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--field-focus);
  box-shadow: var(--field-ring);
}
input:user-invalid, textarea:user-invalid {
  border-color: var(--field-invalid);
  box-shadow: 0 0 0 4px rgba(217, 87, 106, .16);
}
label:has(:user-invalid) { color: var(--field-invalid); }
input:disabled, textarea:disabled, .picker-field:disabled { opacity: .5; cursor: not-allowed; }
textarea { resize: vertical; }

/* ---------- Toggle "Seharian" (switch liquid glass) ---------- */
.switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 14px;
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  box-shadow: var(--field-inset);
  color: var(--ink);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, box-shadow .25s ease;
}
.switch-text { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 800; }
.switch-text > span { display: flex; flex-direction: column; line-height: 1.2; }
.switch-text small { font-size: 12px; font-weight: 600; color: var(--muted); }
.switch-text .ic {
  width: 36px; height: 36px; padding: 8px; flex-shrink: 0;
  border-radius: 11px;
  color: #D9714F; background: rgba(244, 169, 136, .16);
  box-shadow: inset 0 0 0 1px rgba(244, 169, 136, .24);
  transition: color .25s ease, background .25s ease, transform .5s var(--ease-spring);
}
.switch-row:has(.switch:checked) { border-color: rgba(238, 154, 120, .7); background: rgba(255, 255, 255, .88); }
.switch-row:has(.switch:checked) .switch-text .ic { color: #fff; background: var(--grad-warm); transform: scale(1.06); box-shadow: 0 4px 10px -3px rgba(232, 140, 150, .7); }
.switch-row:has(.switch:focus-visible) { border-color: var(--field-focus); box-shadow: var(--field-ring); }
@media (hover: hover) { .switch-row:hover { border-color: var(--field-border-hover); } }

.switch-row input.switch {
  -webkit-appearance: none; appearance: none;
  position: relative; flex-shrink: 0;
  width: 52px; height: 32px; margin: 0; padding: 0;
  border: 0; border-radius: var(--pill);
  cursor: pointer;
  background: rgba(150, 120, 95, .2);
  box-shadow: inset 0 1px 3px rgba(120, 80, 50, .2), inset 0 0 0 1px rgba(255, 255, 255, .45);
  transition: background .3s ease, box-shadow .3s ease;
}
.switch-row input.switch:focus { outline: none; }
/* Thumb: tetesan kaca yang memanjang saat ditekan, lalu meluncur dengan pegas */
.switch-row input.switch::before {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 26px; height: 26px; border-radius: var(--pill);
  background: radial-gradient(120% 120% at 30% 20%, #fff, rgba(255, 255, 255, .88) 60%, rgba(240, 228, 222, .95));
  box-shadow: 0 3px 8px -2px rgba(120, 80, 50, .4), inset 0 -1px 2px rgba(120, 80, 50, .1), inset 0 1px 0 #fff;
  transition: transform .5s var(--ease-spring), width .25s var(--ease-out);
}
.switch-row input.switch:active::before { width: 32px; }
.switch-row input.switch:checked {
  background: var(--grad-warm);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .55), inset 0 -2px 5px rgba(176, 82, 107, .2), 0 4px 12px -4px rgba(232, 140, 150, .75);
}
.switch-row input.switch:checked::before { transform: translateX(20px); }
.switch-row input.switch:checked:active::before { transform: translateX(14px); }

/* Collapse halus (mis. baris "Berulang sampai") */
.collapse {
  display: grid; grid-template-rows: 1fr;
  transition: grid-template-rows .4s var(--ease-out), opacity .3s ease;
}
.collapse-inner { min-height: 0; overflow: hidden; margin: 0 -6px; padding: 0 6px 6px; } /* ruang untuk focus ring */
.collapse.is-collapsed { grid-template-rows: 0fr; opacity: 0; }

/* Label waktu event seharian */
.allday-tag { display: inline-flex; align-items: center; gap: 4px; color: #D9714F; }
.allday-tag .ic { width: 14px; height: 14px; }
.error {
  color: #C24D5C; font-size: 13px; font-weight: 700; margin: 10px 0 0;
  padding: 8px 12px; border-radius: 12px;
  background: rgba(232, 106, 106, .1);
  box-shadow: inset 0 0 0 1px rgba(232, 106, 106, .18);
}

/* ---------- Buttons ---------- */
.btn-primary {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--grad-warm);
  color: #fff;
  border: 0;
  border-radius: var(--pill);
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .2px;
  width: 100%;
  margin-top: 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .75),
    inset 0 -3px 8px rgba(176, 82, 107, .26),
    inset 0 0 0 1px rgba(255, 255, 255, .22),
    0 10px 24px -8px rgba(232, 140, 150, .75),
    0 2px 6px rgba(224, 127, 92, .18);
  text-shadow: 0 1px 2px rgba(160, 70, 80, .28);
}
/* Kilau specular di separuh atas tombol gel */
.btn-primary::before {
  content: ""; position: absolute; z-index: -1;
  inset: 0 0 35% 0;
  background: radial-gradient(75% 100% at 50% 0%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}
/* Sapuan cahaya saat hover */
.btn-primary::after {
  content: ""; position: absolute; z-index: -1;
  top: -20%; bottom: -20%; left: -40%; width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: translateX(-120%) skewX(-18deg);
  pointer-events: none;
}
@keyframes sheen { to { transform: translateX(620%) skewX(-18deg); } }
.btn-primary:active { transform: scale(.97); }
.btn-soft {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0;
  border-radius: var(--pill);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  background: rgba(255, 255, 255, .5);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .5), 0 2px 8px -2px rgba(140, 95, 60, .14);
}
.btn-soft .ic { color: #E07F5C; }
.btn-soft:active { transform: scale(.95); }
.btn-ghost {
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  padding: 11px 16px;
  cursor: pointer;
  border-radius: var(--pill);
}
.btn-ghost:active { transform: scale(.96); }
.icon-btn {
  width: 42px; height: 42px;
  flex-shrink: 0;
  display: inline-grid; place-items: center;
  border: 0; border-radius: 50%; padding: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  background: radial-gradient(120% 120% at 30% 15%, rgba(255, 255, 255, .92), rgba(255, 255, 255, .45) 60%, rgba(255, 255, 255, .55));
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  backdrop-filter: blur(14px) saturate(180%);
  box-shadow: inset 0 1px 1px #fff, inset 0 -1px 2px rgba(178, 120, 90, .12), inset 0 0 0 1px rgba(255, 255, 255, .5), 0 6px 16px -6px rgba(178, 120, 90, .38);
}
.icon-btn:active { transform: scale(.9); }
.icon-btn .ic { width: 20px; height: 20px; }
.cal-header .icon-btn .ic { width: 22px; height: 22px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: max(10px, env(safe-area-inset-top)); z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-radius: 26px;
  padding: 10px 10px 10px 20px;
  margin-bottom: 12px;
}
.app-title { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.2px; }
.title-ic { color: var(--bby); }
.cal-sub { margin: 1px 0 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }

/* ---------- Segmented control ---------- */
.seg {
  position: relative;
  display: flex;
  border-radius: var(--pill);
  padding: 5px;
  margin-bottom: 16px;
}
.seg-thumb {
  position: absolute;
  top: 5px; bottom: 5px; left: 0;
  border-radius: var(--pill);
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .7));
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 5px rgba(244, 169, 136, .18), 0 6px 16px -4px rgba(232, 154, 174, .5), 0 1px 3px rgba(120, 80, 50, .12);
  transition: transform .5s var(--ease-spring), width .4s var(--ease-out);
  z-index: 0;
}
.seg button {
  flex: 1;
  position: relative; z-index: 1;
  border: none; background: none;
  padding: 10px 0;
  font-size: 14px; font-weight: 800;
  color: var(--muted);
  cursor: pointer;
  border-radius: var(--pill);
  transition: color .25s ease;
}
.seg button.active { color: var(--ink); }

/* ---------- Month view ---------- */
#month-wrap { border-radius: 28px; padding: 14px 12px 12px; }
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-header h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.2px; }
.dow-row {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; font-size: 11px; font-weight: 800; color: var(--muted);
  letter-spacing: .5px; text-transform: uppercase;
  padding: 6px 0 8px;
}
.dow-row span:nth-child(n+6) { color: rgba(176, 82, 107, .6); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day-cell {
  /* tanpa backdrop-filter: 42 sel blur bikin patah-patah di HP */
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, .64), rgba(255, 255, 255, .26));
  border: 0;
  border-radius: 16px;
  min-height: 62px;
  padding: 6px 3px;
  font-size: 13px;
  color: inherit;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 1px rgba(255, 255, 255, .42), 0 2px 6px -2px rgba(178, 120, 90, .2);
  overflow: hidden;
  transition: transform .3s var(--ease-spring), box-shadow .2s ease, background .2s ease;
}
.day-cell.other { opacity: .4; pointer-events: none; background: rgba(255, 255, 255, .18); box-shadow: none; }
.day-cell.today {
  background: linear-gradient(160deg, rgba(255, 255, 255, .88), rgba(255, 233, 220, .6));
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1.5px rgba(244, 169, 136, .7), 0 8px 18px -8px rgba(244, 169, 136, .75);
}
.day-cell.selected { box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1.5px var(--bby); }
.day-num {
  width: 24px; height: 24px; line-height: 24px;
  margin: 0 auto 4px;
  border-radius: 50%;
  font-weight: 800; font-size: 13px; text-align: center;
}
.day-cell.today .day-num {
  background: var(--grad-warm); color: #fff;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .6), 0 3px 8px -2px rgba(232, 140, 150, .75);
}
.ev-chip {
  font-size: 10px;
  border-radius: var(--pill);
  padding: 2px 6px;
  margin: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
}
.ev-chip.kev { background: var(--kev-soft); color: var(--kev-deep); }
.ev-chip.bby { background: var(--bby-soft); color: var(--bby-deep); }
.ev-more { font-size: 10px; color: var(--muted); text-align: center; }
.ev-count { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; }
/* Badge jumlah jadwal: tetesan gel */
.cnt {
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: var(--pill); font-size: 10.5px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .6), inset 0 -1px 2px rgba(0, 0, 0, .08), 0 3px 6px -2px var(--glow);
}
.cnt.kev { --glow: rgba(62, 111, 163, .6); background: radial-gradient(120% 120% at 30% 15%, #B2CDEC, var(--kev) 55%, #6893C8); }
.cnt.bby { --glow: rgba(176, 82, 107, .5); background: radial-gradient(120% 120% at 30% 15%, #F6C6D2, var(--bby) 55%, #DA87A0); }
/* Layar HP: dua badge harus muat sejajar di sel selebar ~43px */
@media (max-width: 420px) {
  .cal-grid { gap: 5px; }
  .day-cell { padding: 6px 2px; }
  .ev-count { gap: 2px; }
  .cnt { min-width: 16px; height: 16px; padding: 0 4px; font-size: 9.5px; }
}

.legend { display: flex; justify-content: center; gap: 8px; margin: 14px 0 2px; }
.legend-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px 6px 9px; border-radius: var(--pill);
  font-size: 12px; font-weight: 800; color: var(--ink-soft);
  background: rgba(255, 255, 255, .4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 1px rgba(255, 255, 255, .45);
}
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 1px 1px rgba(255, 255, 255, .6), 0 0 6px var(--glow); }
.dot.kev { --glow: rgba(123, 167, 217, .8); background: var(--kev); }
.dot.bby { --glow: rgba(232, 154, 174, .8); background: var(--bby); }

/* ---------- Agenda view ---------- */
#agenda-list { padding-bottom: 4px; }
.agenda-day { margin: 20px 0 4px; }
.agenda-day:first-child { margin-top: 4px; }
.agenda-date {
  display: flex; align-items: center; gap: 11px;
  margin: 0 4px 10px;
  animation: rise .55s var(--ease-out) backwards;
  animation-delay: calc(min(var(--i, 0), 14) * 40ms);
}
.ad-num {
  width: 42px; height: 42px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 14px;
  font-size: 17px; font-weight: 800;
  background: linear-gradient(160deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .4));
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .5), 0 6px 14px -6px rgba(178, 120, 90, .4);
}
.agenda-day.is-today .ad-num {
  background: var(--grad-warm); color: #fff;
  text-shadow: 0 1px 2px rgba(160, 70, 80, .25);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .7), inset 0 -2px 5px rgba(176, 82, 107, .22), 0 8px 18px -6px rgba(232, 140, 150, .75);
}
.ad-meta { display: flex; flex-direction: column; line-height: 1.2; }
.ad-day { font-size: 15px; font-weight: 800; }
.ad-month { font-size: 12px; font-weight: 600; color: var(--muted); }
.rel-pill {
  font-size: 11px; font-weight: 800;
  background: var(--grad-warm);
  color: #fff;
  padding: 4px 11px; border-radius: var(--pill);
  text-shadow: 0 1px 1px rgba(160, 70, 80, .25);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .65), 0 4px 10px -3px rgba(232, 140, 150, .7);
}
.ag-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  border-radius: var(--radius);
  padding: 14px 14px 14px 10px;
  margin-bottom: 10px;
  cursor: pointer;
  font-size: inherit; color: inherit; text-align: left;
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  animation: rise .55s var(--ease-out) backwards;
  animation-delay: calc(min(var(--i, 0), 14) * 40ms);
}
.ag-item.kev { background: radial-gradient(90% 160% at 0% 50%, rgba(123, 167, 217, .2), transparent 60%), var(--glass-fill); }
.ag-item.bby { background: radial-gradient(90% 160% at 0% 50%, rgba(232, 154, 174, .22), transparent 60%), var(--glass-fill); }
.ag-item:active { transform: scale(.985); }
.ag-bar { width: 5px; align-self: stretch; border-radius: var(--pill); flex-shrink: 0; }
.ag-item.kev .ag-bar { background: linear-gradient(180deg, #B2CDEC, var(--kev)); box-shadow: 0 0 10px rgba(123, 167, 217, .7); }
.ag-item.bby .ag-bar { background: linear-gradient(180deg, #F6C6D2, var(--bby)); box-shadow: 0 0 10px rgba(232, 154, 174, .7); }
.ag-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.ag-time { font-size: 12px; color: var(--muted); font-weight: 800; letter-spacing: .2px; }
.ag-title { font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-who { flex-shrink: 0; display: inline-flex; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* ---------- Action bar (dock kaca melayang) ---------- */
.actionbar {
  position: sticky; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 15;
  display: flex; gap: 8px; align-items: center;
  margin-top: 18px;
  padding: 6px;
  border-radius: var(--pill);
}
.actionbar .btn-soft { flex: 0 0 auto; margin: 0; }
.actionbar .btn-primary { flex: 1; margin-top: 0; width: auto; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0;
  background: rgba(74, 63, 53, .26);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  backdrop-filter: blur(8px) saturate(140%);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 50;
  animation: fade-in .25s ease backwards;
}
.modal-card {
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; overscroll-behavior: contain;
  padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
  border-radius: 30px 30px 0 0;
  background: linear-gradient(180deg, rgba(255, 251, 247, .86), rgba(255, 245, 237, .76));
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  backdrop-filter: blur(32px) saturate(190%);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .55), 0 -12px 40px -12px rgba(120, 80, 50, .3);
  animation: sheet-in .5s var(--ease-sheet) backwards;
}
/* Rim ::after ikut ter-scroll di kartu yang bisa scroll, jadi diganti inset shadow */
.modal-card::after { display: none; }
/* Grabber bottom sheet */
.modal-card::before {
  content: ""; display: block;
  width: 40px; height: 5px; margin: 0 auto 12px;
  border-radius: var(--pill);
  background: rgba(74, 63, 53, .16);
}
@media (min-width: 560px) {
  .modal { align-items: center; padding: 16px; }
  .modal-card {
    border-radius: 30px;
    padding: 20px 22px 22px;
    box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .55), 0 30px 80px -24px rgba(120, 80, 50, .45);
    animation: pop-in .45s var(--ease-spring) backwards;
  }
  .modal-card::before { display: none; }
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-in { from { transform: translateY(100%); } }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.92); } }
@keyframes float { 50% { transform: translateY(-6px); } }
.modal-card label { margin: 16px 2px 0; }
.modal-card label input,
.modal-card label select,
.modal-card label textarea { margin-top: 8px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.modal-head h3 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.2px; }
.modal-head h3 .ic { color: #E07F5C; width: 22px; height: 22px; }
.modal-head .icon-btn { width: 36px; height: 36px; font-size: 20px; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; align-items: stretch; }
.modal-actions .btn-ghost { flex: 0 0 auto; display: flex; align-items: center; padding: 13px 20px; }
.modal-actions .btn-primary { flex: 1; margin-top: 0; }

/* ---------- Profile drawer (menu kaca dari tombol avatar) ---------- */
.drawer {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(74, 63, 53, .14);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: calc(max(10px, env(safe-area-inset-top)) + 70px) max(14px, calc((100vw - var(--view-w, 520px)) / 2 + 14px)) 0 14px;
  animation: fade-in .2s ease backwards;
}
.drawer-card {
  border-radius: 26px;
  padding: 14px 8px 8px;
  width: 260px;
  background: linear-gradient(160deg, rgba(255, 253, 250, .9), rgba(255, 247, 240, .74));
  transform-origin: top right;
  animation: menu-in .42s var(--ease-spring) backwards;
}
@keyframes menu-in { from { opacity: 0; transform: scale(.82) translateY(-8px); } }
.drawer-handle { display: none; }
.drawer-card .btn-ghost .ic { width: 20px; height: 20px; color: var(--ink-soft); }
.drawer-card .btn-ghost {
  display: flex; align-items: center; gap: 10px;
  text-align: left; padding: 12px 14px; border-radius: 16px;
}
.profile-head {
  display: flex; gap: 12px; align-items: center;
  padding: 0 8px 14px; margin-bottom: 6px;
  border-bottom: 1px solid rgba(74, 63, 53, .08);
}
.profile-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: rgba(255, 255, 255, .6);
}
.profile-avatar-btn {
  position: relative; width: 56px; height: 56px; border-radius: 50%;
  border: 0; padding: 0; cursor: pointer;
  background: radial-gradient(120% 120% at 30% 15%, #fff, rgba(255, 236, 224, .8));
  overflow: visible; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  box-shadow: 0 0 0 2.5px rgba(255, 255, 255, .95), 0 0 0 4.5px rgba(244, 169, 136, .55), 0 8px 18px -6px rgba(232, 140, 150, .6);
}
.profile-avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-edit {
  position: absolute; bottom: -4px; right: -4px;
  color: var(--ink-soft);
  border-radius: 50%; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .95);
  box-shadow: inset 0 1px 0 #fff, 0 3px 8px -2px rgba(120, 80, 50, .35);
}
.avatar-edit .ic { width: 14px; height: 14px; }
.who-wrap { position: relative; display: inline-flex; width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; }
.who-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; opacity: 0; }
.who-wrap img.loaded { opacity: 1; }
.who-initial {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; border-radius: 50%;
  background: rgba(244, 169, 136, .25); color: var(--accent);
  font-size: 12px; font-weight: 800;
}
.kev .who-initial { background: var(--kev-soft); color: var(--kev-deep); }
.bby .who-initial { background: var(--bby-soft); color: var(--bby-deep); }
.ag-who .who-wrap {
  width: 32px; height: 32px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 0 0 3.5px var(--ring, rgba(244, 169, 136, .6)), 0 4px 10px -2px rgba(120, 80, 50, .25);
}
.ag-item.kev { --ring: rgba(123, 167, 217, .7); }
.ag-item.bby { --ring: rgba(232, 154, 174, .75); }
.ag-who .who-initial { font-size: 13px; }
.ev-who img, .ag-who img { object-fit: cover; }
.profile-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.profile-sub { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.btn-block { width: 100%; text-align: center; }
.profile-btn { font-size: 18px; overflow: hidden; padding: 0; }
.avatar-initial {
  font-weight: 800; font-size: 20px; color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
#topbar-avatar-emoji.avatar-initial { font-size: 18px; }
.profile-btn #topbar-avatar-emoji { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.topbar-avatar-img { width: 42px; height: 42px; object-fit: cover; border-radius: 50%; display: block; }

/* ---------- Custom cursor: lensa liquid glass (desktop only) ---------- */
#custom-cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  html.has-cursor, html.has-cursor * { cursor: none !important; }
  #custom-cursor {
    --tint: 244, 169, 136;            /* peach */
    --tint-deep: 224, 127, 92;
    display: block; position: fixed; left: 0; top: 0; z-index: 9999;
    pointer-events: none;
    transition: opacity .25s ease;
  }
  #custom-cursor[data-tint="kev"] { --tint: 123, 167, 217; --tint-deep: 62, 111, 163; }
  #custom-cursor[data-tint="bby"] { --tint: 232, 154, 174; --tint-deep: 176, 82, 107; }
  #custom-cursor.is-hidden { opacity: 0; }
  .cur-lens, .cur-dot { position: fixed; left: 0; top: 0; will-change: transform; }
  .cur-lens {
    display: grid; place-items: center;
    width: 34px; height: 34px; border-radius: 17px;
    background: radial-gradient(120% 120% at 30% 20%, rgba(255, 255, 255, .32), rgba(255, 255, 255, .04) 58%, rgba(var(--tint), .14));
    box-shadow:
      inset 0 1px 1px rgba(255, 255, 255, .95),
      inset 0 -2px 4px rgba(var(--tint-deep), .16),
      inset 0 0 0 1px rgba(255, 255, 255, .5),
      0 0 0 .5px rgba(var(--tint), .5),
      0 6px 16px -4px rgba(178, 120, 90, .35);
    -webkit-backdrop-filter: saturate(1.6) brightness(1.06);
    backdrop-filter: saturate(1.6) brightness(1.06);
    transition: opacity .2s ease, background .25s ease, box-shadow .25s ease;
  }
  /* Kilau specular kecil di kiri-atas lensa */
  .cur-lens::before {
    content: ""; position: absolute;
    left: 16%; top: 8%; width: 48%; height: 30%;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0));
    transition: opacity .2s ease;
  }
  /* Ikon kecil di dalam lensa (× / ↕), hanya untuk mode close & scroll */
  .cur-lens::after {
    content: ""; position: relative;
    width: 16px; height: 16px;
    background: rgba(var(--tint-deep), .9);
    -webkit-mask: var(--cur-icon) center / contain no-repeat;
    mask: var(--cur-icon) center / contain no-repeat;
    opacity: 0; scale: .5;
    transition: opacity .15s ease, scale .3s var(--ease-spring);
  }
  /* .cur-dot dipindah lewat transform JS; tampilan + skala di ::before
     (scale di elemen yang sama akan ikut mengalikan posisi translate) */
  .cur-dot { width: 6px; height: 6px; }
  .cur-dot::before {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    background: linear-gradient(135deg, rgb(var(--tint)), rgb(var(--tint-deep)));
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .95), 0 1px 4px rgba(var(--tint-deep), .5);
    transition: opacity .15s ease, scale .25s var(--ease-spring);
  }
  #custom-cursor.is-text .cur-dot::before,
  #custom-cursor.is-scroll .cur-dot::before,
  #custom-cursor.is-close .cur-dot::before { opacity: 0; scale: .2; }

  /* Hover: lensa membesar, lebih terang, berpendar warna pemilik */
  #custom-cursor.is-hover .cur-lens {
    -webkit-backdrop-filter: saturate(1.5);
    backdrop-filter: saturate(1.5);
    background: radial-gradient(120% 120% at 30% 20%, rgba(255, 255, 255, .22), rgba(var(--tint), .06) 58%, rgba(var(--tint), .2));
    box-shadow:
      inset 0 1px 1px #fff,
      inset 0 -3px 6px rgba(var(--tint-deep), .18),
      inset 0 0 0 1.5px rgba(255, 255, 255, .6),
      0 0 0 1px rgba(var(--tint), .55),
      0 0 18px -2px rgba(var(--tint), .55),
      0 8px 18px -6px rgba(178, 120, 90, .35);
  }
  #custom-cursor.is-hover .cur-dot::before { scale: 1.3; }

  /* Text: caret kaca — inti warna dengan tepi putih supaya terlihat di atas fokus ring */
  #custom-cursor.is-text .cur-lens {
    -webkit-backdrop-filter: none; backdrop-filter: none;
    background: linear-gradient(180deg, rgb(var(--tint)), rgb(232, 154, 174));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .9), 0 0 10px rgba(232, 154, 174, .55);
  }
  #custom-cursor.is-text .cur-lens::before { opacity: 0; }

  /* Scroll (roda jam): kapsul vertikal dengan panah ↕ */
  /* Panah kecil di ujung atas & bawah kapsul, angka di tengah tetap terbaca */
  #custom-cursor.is-scroll .cur-lens::after {
    width: 12px; height: 42px; opacity: .85; scale: 1;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath fill=%22none%22 stroke=%22%23000%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 stroke-width=%221.5%22 d=%22M19 15L12 9L5 15%22/%3E%3C/svg%3E") top / 12px no-repeat, url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath fill=%22none%22 stroke=%22%23000%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 stroke-width=%221.5%22 d=%22M19 9L12 15L5 9%22/%3E%3C/svg%3E") bottom / 12px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath fill=%22none%22 stroke=%22%23000%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 stroke-width=%221.5%22 d=%22M19 15L12 9L5 15%22/%3E%3C/svg%3E") top / 12px no-repeat, url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath fill=%22none%22 stroke=%22%23000%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 stroke-width=%221.5%22 d=%22M19 9L12 15L5 9%22/%3E%3C/svg%3E") bottom / 12px no-repeat;
  }
  #custom-cursor.is-scroll .cur-lens::before { opacity: .6; }

  /* Close (area gelap modal): lensa dengan × */
  #custom-cursor.is-close .cur-lens {
    background: radial-gradient(120% 120% at 30% 20%, rgba(255, 255, 255, .7), rgba(255, 255, 255, .4) 60%, rgba(var(--tint), .25));
  }
  #custom-cursor.is-close .cur-lens::after { --cur-icon: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cg fill=%22none%22 stroke=%22%23000%22 stroke-linecap=%22round%22 stroke-width=%221.5%22%3E%3Cpath d=%22M19.0068 5L5.00684 19%22/%3E%3Cpath d=%22M19 19L5 5%22/%3E%3C/g%3E%3C/svg%3E"); width: 18px; height: 18px; opacity: 1; scale: 1; }

  /* Riak klik: dua cincin kaca berwarna yang menyebar */
  .cur-ripple {
    position: fixed; width: 44px; height: 44px; margin: -22px 0 0 -22px;
    border-radius: 50%;
    border: 1.5px solid rgba(var(--tint), .8);
    box-shadow: inset 0 0 8px rgba(255, 255, 255, .7), 0 0 12px rgba(var(--tint), .45);
    animation: ripple .6s var(--ease-out) forwards;
  }
  .cur-ripple::after {
    content: ""; position: absolute; inset: 8px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .9);
    animation: ripple .6s .06s var(--ease-out) backwards;
  }
}
@keyframes ripple {
  from { transform: scale(.25); opacity: .9; }
  to { transform: scale(1.5); opacity: 0; }
}

/* ---------- Month slide animation ---------- */
@keyframes slide-in-right {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slide-in-left {
  from { transform: translateX(-40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.cal-grid.slide-right { animation: slide-in-right .35s var(--ease-out); }
.cal-grid.slide-left { animation: slide-in-left .35s var(--ease-out); }

/* ---------- Transitions (smooth hover) ---------- */
.btn-primary, .btn-soft, .btn-ghost, .icon-btn,
.ag-item, .ev-card, .ev-del, .ev-edit, .profile-avatar-btn, .picker-field {
  transition: transform .3s var(--ease-spring), box-shadow .25s ease, background .25s ease, filter .25s ease;
}

/* ---------- Hover (desktop) ---------- */
@media (hover: hover) {
  .btn-primary:hover {
    filter: brightness(1.04) saturate(1.06);
    box-shadow:
      inset 0 1px 1px rgba(255, 255, 255, .8),
      inset 0 -3px 8px rgba(176, 82, 107, .26),
      inset 0 0 0 1px rgba(255, 255, 255, .28),
      0 14px 30px -8px rgba(232, 140, 150, .85),
      0 2px 6px rgba(224, 127, 92, .2);
  }
  .btn-primary:hover::after { animation: sheen .9s var(--ease-out); }
  .btn-soft:hover { background: rgba(255, 255, 255, .78); }
  .btn-ghost:hover { background: rgba(255, 255, 255, .55); box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .6); }
  .icon-btn:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 1px #fff, inset 0 -1px 2px rgba(178, 120, 90, .12), inset 0 0 0 1px rgba(255, 255, 255, .6), 0 10px 22px -8px rgba(178, 120, 90, .45);
  }
  .day-cell:hover {
    background: linear-gradient(160deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .5));
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(244, 169, 136, .45), 0 10px 20px -8px rgba(178, 120, 90, .4);
  }
  .day-cell:active { transform: translateY(0) scale(.96); }
  .ag-item:hover { transform: translateY(-2px); box-shadow: var(--glass-edge), 0 2px 4px rgba(120, 80, 50, .05), 0 18px 34px -14px rgba(178, 120, 90, .45); }
  .ev-card:hover { box-shadow: var(--glass-edge), 0 14px 30px -12px rgba(178, 120, 90, .4); }
  .ev-del:hover, .ev-edit:hover { transform: scale(1.12); opacity: 1; }
  .seg button:hover:not(.active) { color: var(--ink-soft); }
  .profile-avatar-btn:hover { transform: scale(1.05); }
}

/* ---------- Day events ---------- */
.day-events { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 4px; }
.ev-card {
  border-radius: 20px;
  padding: 14px 14px 14px 26px;
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  animation: rise .5s var(--ease-out) backwards;
}
.ev-card::before {
  content: ""; position: absolute;
  left: 11px; top: 14px; bottom: 14px; width: 5px;
  border-radius: var(--pill);
  background: var(--muted);
}
.ev-card.kev::before { background: linear-gradient(180deg, #B2CDEC, var(--kev)); box-shadow: 0 0 10px rgba(123, 167, 217, .7); }
.ev-card.bby::before { background: linear-gradient(180deg, #F6C6D2, var(--bby)); box-shadow: 0 0 10px rgba(232, 154, 174, .7); }
.ev-card .ev-time { font-size: 12px; color: var(--muted); font-weight: 800; }
.ev-card .ev-title { font-size: 16px; font-weight: 800; margin: 2px 0; padding-right: 76px; }
.ev-card .ev-desc { font-size: 13px; color: var(--ink-soft); white-space: pre-wrap; margin-top: 2px; }
.ev-card .ev-who { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; margin-top: 8px; }
.ev-card.kev .ev-who { color: var(--kev-deep); }
.ev-card.bby .ev-who { color: var(--bby-deep); }
.ev-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; z-index: 1; }
.ev-del, .ev-edit {
  display: grid; place-items: center;
  width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 50%;
  color: var(--ink-soft); cursor: pointer; opacity: .85;
  background: radial-gradient(120% 120% at 30% 15%, #fff, rgba(255, 255, 255, .5));
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .6), 0 4px 10px -4px rgba(178, 120, 90, .4);
}
.ev-del .ic, .ev-edit .ic { width: 16px; height: 16px; }
@media (hover: hover) { .ev-del:hover { color: #D14D6E; } .ev-edit:hover { color: #E07F5C; } }
.empty-day {
  text-align: center; color: var(--muted); padding: 30px 16px; font-size: 14px; font-weight: 700;
  border-radius: var(--radius);
}
.empty-emoji .ic { width: 44px; height: 44px; color: var(--accent); }
.empty-emoji { margin-bottom: 8px; animation: float 5s ease-in-out infinite; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: linear-gradient(160deg, rgba(92, 74, 62, .8), rgba(60, 48, 40, .74));
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  color: #fff;
  padding: 12px 22px; border-radius: var(--pill);
  font-size: 14px; font-weight: 700; z-index: 100;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 0 0 1px rgba(255, 255, 255, .12), 0 14px 32px -10px rgba(60, 40, 30, .5);
  animation: toast-in .5s var(--ease-spring) backwards;
  max-width: 90vw; text-align: center;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px) scale(.9); } }

/* ---------- Custom pickers ---------- */
/* Picker tanggal/jam: tampil seperti field + tombol ikon berwarna di kanan,
   supaya jelas bisa diklik; state .is-open selama picker-nya terbuka */
.picker-field {
  width: 100%; min-height: 52px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 16px; font-weight: 700; text-align: left;
  padding: 7px 7px 7px 16px;
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--field-inset);
  margin-top: 8px;
}
.picker-field:active { transform: scale(.98); background: rgba(255, 240, 232, .95); }
.picker-field:focus-visible, .picker-field.is-open {
  outline: none;
  background: #fff;
  border-color: var(--field-focus);
  box-shadow: var(--field-ring);
}
.picker-chev {
  width: 36px; height: 36px; flex-shrink: 0;
  display: inline-grid; place-items: center;
  border-radius: 11px;
  color: #D9714F;
  background: rgba(244, 169, 136, .16);
  box-shadow: inset 0 0 0 1px rgba(244, 169, 136, .24);
  transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .35s var(--ease-spring);
}
.picker-chev .ic { width: 20px; height: 20px; }
.picker-field.is-open .picker-chev {
  color: #fff;
  background: var(--grad-warm);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .6), 0 4px 10px -3px rgba(232, 140, 150, .7);
  transform: scale(1.06);
}

/* Date picker mini grid */
.dp-grid { margin-top: 4px; }
.dp-grid .day-cell { min-height: 44px; padding: 10px 2px; }
.dp-grid .day-cell .day-num { margin-bottom: 0; }
.dp-grid .day-cell.picked {
  background: var(--grad-warm);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .7), inset 0 -2px 6px rgba(176, 82, 107, .22), 0 8px 18px -6px rgba(232, 140, 150, .75);
}
.dp-grid .day-cell.picked .day-num { color: #fff; background: none; box-shadow: none; }

/* Time picker wheels */
@media (min-width: 560px) { .time-card { max-width: 340px; } }
.time-wheels {
  display: flex; align-items: stretch; justify-content: center;
  gap: 6px; margin: 14px 0 4px;
  position: relative;
}
/* Pita pilihan: tetesan kaca di tengah roda */
.time-wheels::before {
  content: "";
  position: absolute; left: 8px; right: 8px; top: 50%;
  height: 44px; transform: translateY(-50%);
  background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .55));
  border-radius: 16px;
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .6), 0 8px 18px -8px rgba(232, 154, 174, .55);
  pointer-events: none;
}
.wheel {
  flex: 1;
  height: 180px;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  position: relative;
  z-index: 1;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  /* padder via JS: padding-top/bottom = (180-44)/2 */
}
.wheel::-webkit-scrollbar { display: none; }
.wheel-sep {
  font-size: 28px; font-weight: 800; color: var(--muted);
  display: flex; align-items: center;
  z-index: 1;
}
.wheel-item {
  height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: var(--muted);
  scroll-snap-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: color .2s ease, font-size .2s ease;
}
.wheel-item.sel { color: var(--ink); font-weight: 800; font-size: 23px; }

@media (hover: hover) {
  input:hover:not(:focus):not(:disabled):not(.switch), textarea:hover:not(:focus):not(:disabled),
  .picker-field:hover:not(.is-open):not(:disabled) { border-color: var(--field-border-hover); background: rgba(255, 255, 255, .86); }
  .picker-field:hover:not(.is-open) .picker-chev { background: rgba(244, 169, 136, .28); }
  .wheel-item:hover { color: var(--ink); }
  .dp-grid .day-cell:hover {
    background: linear-gradient(160deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .5));
    transform: translateY(-2px);
  }
  .dp-grid .day-cell.picked:hover { background: var(--grad-warm); }
}

/* ---------- Micro-animation & transisi perubahan layout ---------- */
:root { --ease-in: cubic-bezier(.4, 0, 1, 1); }

/* Keluar: modal, drawer, toast, login (JS: hide() memasang .is-leaving lalu .hidden) */
.modal.is-leaving, .drawer.is-leaving { animation: fade-out .22s ease forwards; pointer-events: none; }
.modal.is-leaving .modal-card { animation: sheet-out .24s var(--ease-in) forwards; }
@media (min-width: 560px) {
  .modal.is-leaving .modal-card { animation: pop-out .2s var(--ease-in) forwards; }
}
.drawer.is-leaving .drawer-card { animation: menu-out .18s var(--ease-in) forwards; }
.toast.bump { animation: toast-in .45s var(--ease-spring) backwards; }
.toast.is-leaving { animation: toast-out .22s var(--ease-in) forwards; }
#login-view.is-leaving {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
  animation: login-out .38s var(--ease-out) forwards;
}
@keyframes fade-out { to { opacity: 0; } }
@keyframes sheet-out { to { transform: translateY(100%); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(8px) scale(.94); } }
@keyframes menu-out { to { opacity: 0; transform: scale(.88) translateY(-6px); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, 12px) scale(.94); } }
@keyframes login-out { to { opacity: 0; transform: scale(1.04); filter: blur(6px); } }

/* Masuk ke kalender setelah login: bagian-bagian muncul bertahap */
.cal-enter .topbar, .cal-enter .seg, .cal-enter #month-wrap, .cal-enter #agenda-list, .cal-enter .actionbar {
  animation: rise .6s var(--ease-out) backwards;
}
.cal-enter .seg { animation-delay: .06s; }
.cal-enter #month-wrap, .cal-enter #agenda-list { animation-delay: .12s; }
.cal-enter .actionbar { animation-delay: .2s; }

/* Ganti Agenda <-> Bulan: panel masuk dari arah segmen yang dipilih */
.view-in-left { animation: view-in-left .42s var(--ease-out); }
.view-in-right { animation: view-in-right .42s var(--ease-out); }
@keyframes view-in-left { from { opacity: 0; transform: translateX(-20px); } }
@keyframes view-in-right { from { opacity: 0; transform: translateX(20px); } }

/* Hapus jadwal: kartu menyusut & memudar sebelum list dirender ulang */
.ev-card.is-removing { animation: card-out .28s var(--ease-in) forwards; pointer-events: none; }
@keyframes card-out { to { opacity: 0; transform: translateX(24px) scale(.94); } }

/* Pesan error muncul dengan pegas kecil */
.error:not(.hidden) { animation: err-in .35s var(--ease-spring); }
@keyframes err-in { from { opacity: 0; transform: translateY(-4px) scale(.97); } }

/* Nilai picker (tanggal/jam) berganti */
.value-in { display: inline-block; animation: value-in .35s var(--ease-spring); }
@keyframes value-in { from { opacity: 0; transform: translateY(6px); } }

/* Ikon mata password berganti */
.pass-toggle .ic:not(.hidden) { animation: icon-pop .35s var(--ease-spring); }
@keyframes icon-pop { from { opacity: 0; transform: scale(.6) rotate(-25deg); } }

/* Foto profil memudar masuk saat selesai dimuat */
.user-avatar img:not(.hidden), .topbar-avatar-img:not(.hidden), .profile-avatar-img:not(.hidden) { animation: fade-in .4s ease; }
.who-wrap img { transition: opacity .3s ease; }

/* Badge jumlah jadwal meletup kecil saat kalender dirender */
.cnt { animation: pop .45s var(--ease-spring) backwards; animation-delay: .12s; }
@keyframes pop { from { opacity: 0; transform: scale(.3); } }

/* Hari ini di date picker & tanggal terpilih */
.dp-grid .day-cell.picked { animation: pop .35s var(--ease-spring); }

/* ---------- Form jadwal: label field, pemilik, tanggal + jam, field ber-ikon ---------- */
.field-label { margin: 16px 2px 0; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.field-hint { margin: 6px 4px 0; font-size: 12px; font-weight: 600; color: var(--muted); }

/* Pemilik jadwal: Hubby / Wifey / Berdua */
.owner-select { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.owner-opt.kev { --tint: 123, 167, 217; --tint-deep: 62, 111, 163; }
.owner-opt.bby { --tint: 232, 154, 174; --tint-deep: 176, 82, 107; }
.owner-opt.both { --tint: 244, 169, 136; --tint-deep: 217, 113, 79; }
.owner-opt {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 46px; padding: 8px 10px;
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  box-shadow: var(--field-inset);
  font-size: 14px; font-weight: 800; color: var(--ink-soft);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, box-shadow .25s ease, color .2s ease, transform .3s var(--ease-spring);
}
.owner-opt .ic { width: 18px; height: 18px; color: #D9714F; }
.owner-dot { width: 10px; height: 10px; border-radius: 50%; background: rgb(var(--tint)); box-shadow: 0 0 6px rgba(var(--tint), .8); }
.owner-opt.selected {
  color: var(--ink);
  background: #fff;
  border-color: rgba(var(--tint), .9);
  box-shadow: 0 0 0 3px rgba(var(--tint), .22), 0 6px 14px -8px rgba(var(--tint-deep), .6);
}
/* Berdua: border gradasi biru -> pink */
.owner-opt.both.selected {
  border-color: transparent;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(120deg, var(--kev), var(--bby)) border-box;
  box-shadow: 0 0 0 3px rgba(200, 160, 200, .2), 0 6px 14px -8px rgba(176, 82, 107, .5);
}
.owner-opt:active { transform: scale(.96); }
@media (hover: hover) { .owner-opt:hover:not(.selected) { border-color: rgba(var(--tint), .6); color: var(--ink); } }

/* Mulai / Selesai: tanggal + jam sebaris; kolom jam menyusut saat "Seharian" */
.dt-row {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); column-gap: 10px;
  transition: grid-template-columns .4s var(--ease-out), column-gap .4s var(--ease-out);
}
.dt-row .picker-field > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dt-time { min-width: 0; clip-path: inset(-6px); transition: opacity .3s ease; } /* -6px: ruang focus ring */
.dt-group.is-allday .dt-row { grid-template-columns: minmax(0, 1fr) minmax(0, 0fr); column-gap: 0; }
.dt-group.is-allday .dt-time { opacity: 0; }

/* Field input dengan ikon di kiri (lokasi, pencarian) */
.icon-field { position: relative; display: block; margin-top: 8px; }
.modal-card .icon-field input { margin-top: 0; padding-left: 44px; }
.icon-field > .ic {
  position: absolute; left: 15px; top: 50%; z-index: 1;
  width: 19px; height: 19px; transform: translateY(-50%);
  color: var(--muted); pointer-events: none; transition: color .2s ease;
}
.icon-field:focus-within > .ic { color: #E07F5C; }

/* ---------- Jadwal berdua: warna gabungan biru -> pink ---------- */
.ag-item.both {
  background:
    radial-gradient(70% 120% at 0% 15%, rgba(123, 167, 217, .2), transparent 60%),
    radial-gradient(70% 120% at 0% 90%, rgba(232, 154, 174, .22), transparent 60%),
    var(--glass-fill);
}
.ag-item.both .ag-bar, .ev-card.both::before {
  background: linear-gradient(180deg, var(--kev), var(--bby));
  box-shadow: 0 0 10px rgba(200, 160, 200, .75);
}
.ev-card.both .ev-who { color: var(--ink-soft); }
.cnt.both { --glow: rgba(176, 82, 107, .45); background: linear-gradient(135deg, #8DB4E2, #EBA3B6); }
.dot.both { --glow: rgba(200, 160, 200, .8); background: linear-gradient(135deg, var(--kev), var(--bby)); }
.legend { flex-wrap: wrap; }
.who-pair { display: inline-flex; }
.who-pair .who-wrap { background: #fff; border-radius: 50%; }
.who-pair .who-wrap + .who-wrap { margin-left: -8px; }
.who-pair .who-wrap:first-child .who-initial { background: var(--kev-soft); color: var(--kev-deep); }
.who-pair .who-wrap:last-child .who-initial { background: var(--bby-soft); color: var(--bby-deep); }
.ag-who .who-pair .who-wrap + .who-wrap { margin-left: -9px; }
.ag-who .who-pair .who-wrap:first-child { --ring: rgba(123, 167, 217, .7); }
.ag-who .who-pair .who-wrap:last-child { --ring: rgba(232, 154, 174, .75); }
.search-item.kev { --ring: rgba(123, 167, 217, .7); }
.search-item.bby { --ring: rgba(232, 154, 174, .75); }

/* ---------- Agenda: muat rentang lain, hari lewat, lokasi, tanda berulang ---------- */
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.agenda-more {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin: 4px 0 6px; padding: 11px 16px;
  border: 1.5px dashed rgba(150, 120, 95, .28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .3);
  font-size: 13.5px; font-weight: 800; color: var(--ink-soft);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .3s var(--ease-spring);
}
.agenda-more .ic { width: 18px; height: 18px; color: #E07F5C; }
.agenda-more:last-child { margin-top: 14px; }
.agenda-more:disabled { opacity: .55; cursor: progress; }
.agenda-more:active { transform: scale(.98); }
@media (hover: hover) { .agenda-more:hover:not(:disabled) { background: rgba(255, 255, 255, .65); border-color: rgba(224, 127, 92, .5); color: var(--ink); } }
.agenda-day.is-past { opacity: .62; }
.agenda-day.no-anim .agenda-date, .agenda-day.no-anim .ag-item { animation: none; }
.ag-loc, .si-loc {
  display: flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.ag-loc .ic, .si-loc .ic { width: 14px; height: 14px; flex-shrink: 0; color: var(--muted); }
.repeat-tag { display: inline-flex; margin-left: 6px; vertical-align: -2px; color: var(--muted); }
.repeat-tag .ic { width: 13px; height: 13px; }

/* Detail jadwal: chip lokasi (link Maps), pengulangan, pengingat */
.ev-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.ev-chip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  padding: 5px 10px 5px 8px; border-radius: var(--pill);
  font-size: 12px; font-weight: 700; color: var(--ink-soft); text-decoration: none;
  background: rgba(255, 255, 255, .55);
  box-shadow: inset 0 0 0 1px rgba(150, 120, 95, .14);
  transition: background .2s ease, box-shadow .2s ease;
}
.ev-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-chip .ic { width: 14px; height: 14px; flex-shrink: 0; color: #E07F5C; }
.ev-chip.is-link { color: var(--kev-deep); }
@media (hover: hover) { .ev-chip.is-link:hover { background: #fff; box-shadow: inset 0 0 0 1px rgba(123, 167, 217, .5); } }

/* ---------- Sheet pilihan (ulangi, pengingat, cakupan jadwal berulang) ---------- */
@media (min-width: 560px) { .choice-card { max-width: 400px; } }
.choice-text { margin: 4px 2px 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.choice-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 4px; }
.choice-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 13px 14px 13px 16px; text-align: left;
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  box-shadow: var(--field-inset);
  color: var(--ink); cursor: pointer;
  animation: rise .4s var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 30ms);
  transition: border-color .2s ease, background .2s ease, box-shadow .25s ease, transform .3s var(--ease-spring);
}
.choice-main { display: flex; flex-direction: column; gap: 2px; font-size: 15px; font-weight: 800; }
.choice-main small { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.choice-check {
  width: 22px; height: 22px; padding: 4px; flex-shrink: 0;
  border-radius: 50%; color: #fff; background: var(--grad-warm);
  opacity: 0; transform: scale(.4);
  transition: opacity .2s ease, transform .35s var(--ease-spring);
}
.choice-opt.is-selected { background: #fff; border-color: var(--field-focus); box-shadow: 0 0 0 3px rgba(244, 169, 136, .2); }
.choice-opt.is-selected .choice-check { opacity: 1; transform: none; }
.choice-opt.is-danger .choice-main > span { color: #C24D5C; }
.choice-opt:active { transform: scale(.98); }
@media (hover: hover) {
  .choice-opt:hover:not(.is-selected) { border-color: var(--field-border-hover); background: rgba(255, 255, 255, .86); }
  .choice-opt.is-danger:hover { border-color: rgba(209, 77, 110, .5); }
}

/* ---------- Pencarian ---------- */
@media (min-width: 560px) {
  .search-modal { align-items: flex-start; padding-top: 10vh; }
  .search-card { max-width: 560px; }
}
.search-head { display: flex; align-items: center; gap: 10px; }
.search-field { flex: 1; margin-top: 0; }
/* Tombol hapus bawaan input search (biru) tidak cocok dengan tema */
.search-field input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-results { max-height: 60vh; overflow-y: auto; overscroll-behavior: contain; margin: 12px -6px 0; padding: 0 6px 4px; }
.search-note {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0; padding: 28px 12px; text-align: center;
  font-size: 14px; font-weight: 600; color: var(--muted);
}
.search-note .ic { width: 18px; height: 18px; flex-shrink: 0; }
.search-note.is-loading { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.search-section { margin: 12px 4px 8px; font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.search-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; margin-bottom: 8px; padding: 10px 12px 10px 10px;
  border: 0; border-radius: 18px; text-align: left; color: inherit; cursor: pointer;
  background: rgba(255, 255, 255, .55);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, .5), 0 4px 12px -8px rgba(178, 120, 90, .4);
  animation: rise .4s var(--ease-out) backwards;
  animation-delay: calc(min(var(--i, 0), 12) * 30ms);
  transition: background .2s ease, transform .3s var(--ease-spring);
}
.search-item.is-past { opacity: .7; }
.search-item:active { transform: scale(.98); }
@media (hover: hover) { .search-item:hover { background: rgba(255, 255, 255, .9); transform: translateY(-1px); } }
.si-date {
  width: 46px; height: 46px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 14px; line-height: 1.1;
  font-size: 11px; font-weight: 800; color: var(--muted);
  background: rgba(255, 255, 255, .8);
  box-shadow: inset 0 0 0 1px rgba(150, 120, 95, .14);
}
.si-date b { font-size: 17px; color: var(--ink); }
.search-item.kev .si-date b { color: var(--kev-deep); }
.search-item.bby .si-date b { color: var(--bby-deep); }
.search-item.both .si-date b { color: #D9714F; }
.si-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.si-title { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-time { font-size: 12px; font-weight: 800; color: var(--muted); }
.search-results mark { padding: 0 2px; border-radius: 4px; color: inherit; background: rgba(244, 169, 136, .35); }

/* Date picker: rentang mulai-selesai, tanggal sebelum batas, tombol "tanpa batas" */
.dp-foot { display: flex; justify-content: center; margin-top: 12px; }
.dp-grid .day-cell.in-range { background: rgba(244, 169, 136, .16); box-shadow: inset 0 0 0 1px rgba(244, 169, 136, .28); }
.dp-grid .day-cell.before-min { opacity: .35; pointer-events: none; }

/* ---------- Token permukaan (dipakai komponen baru; dark mode menimpanya) ---------- */
:root {
  color-scheme: light;
  --surface: rgba(255, 255, 255, .55);
  --surface-strong: #fff;
  --hairline: rgba(150, 120, 95, .14);
  --track: rgba(150, 120, 95, .1);
  --sk-base: rgba(150, 120, 95, .12);
  --sk-shine: rgba(255, 255, 255, .7);
  --live: #2E9E68;
}

/* ---------- Lebar: tampilan bulan melebar di layar besar ---------- */
#cal-view { --view-w: 520px; max-width: var(--view-w); transition: max-width .5s var(--ease-out); }
.seg-thumb { left: 5px; width: calc(50% - 5px); }
.cell-evs { display: none; }
@media (min-width: 900px) {
  #cal-view.is-month { --view-w: 940px; }
  #cal-view.is-month .seg, #cal-view.is-month .actionbar { max-width: 520px; margin-left: auto; margin-right: auto; }
  #cal-view.is-month .cal-grid { gap: 8px; }
  #cal-view.is-month .day-cell { min-height: 116px; padding: 8px 6px 6px; text-align: left; }
  #cal-view.is-month .day-cell .day-num { margin: 0 0 6px 2px; }
  #cal-view.is-month .ev-count { display: none; }
  #cal-view.is-month .cell-evs { display: flex; flex-direction: column; gap: 3px; }
}
/* Judul jadwal di sel kalender (desktop) */
.cell-ev {
  display: block; padding: 2px 7px; border-radius: 7px;
  font-size: 11.5px; font-weight: 700; line-height: 1.4; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--tint-soft); box-shadow: inset 2.5px 0 0 var(--tint-solid);
}
.cell-ev b { font-weight: 800; margin-right: 4px; opacity: .7; }
.cell-ev.kev { --tint-soft: var(--kev-soft); --tint-solid: var(--kev); }
.cell-ev.bby { --tint-soft: var(--bby-soft); --tint-solid: var(--bby); }
.cell-ev.both { --tint-soft: linear-gradient(90deg, var(--kev-soft), var(--bby-soft)); --tint-solid: #B9A6D6; }
.cell-ev.is-allday { color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .15); box-shadow: none; }
.cell-ev.kev.is-allday { background: linear-gradient(90deg, var(--kev), #8FB5E0); }
.cell-ev.bby.is-allday { background: linear-gradient(90deg, var(--bby), #EDA9BA); }
.cell-ev.both.is-allday { background: linear-gradient(90deg, var(--kev), var(--bby)); }
.cell-more { padding-left: 7px; font-size: 11px; font-weight: 800; color: var(--muted); }
.cal-grid:not(.no-anim) .cell-ev, .cal-grid:not(.no-anim) .cell-more { animation: fade-in .35s ease backwards; animation-delay: .08s; }

/* ---------- Geser kiri/kanan untuk ganti bulan ---------- */
#month-wrap { touch-action: pan-y; }
#cal-grid { transition: transform .45s var(--ease-spring), opacity .3s ease; }
#cal-grid.is-dragging { transition: none; }

/* ---------- Tanpa animasi masuk (refresh otomatis / setelah hapus) ---------- */
.cal-grid.no-anim .cnt, .day-events.no-anim .ev-card { animation: none; }

/* ---------- Kerangka loading (skeleton) ---------- */
.sk { display: block; position: relative; overflow: hidden; border-radius: 8px; background: var(--sk-base); }
.sk::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--sk-shine), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
/* Muncul setelah jeda singkat: koneksi cepat tidak sempat melihat kerangka berkedip */
.agenda-day.skeleton { animation: fade-in .3s ease .18s backwards; }
.skeleton .agenda-date { animation: none; }
.sk-num { width: 42px; height: 42px; border-radius: 14px; flex-shrink: 0; }
.sk-meta { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sk-line { height: 10px; border-radius: 6px; }
.sk-line.w30 { width: 30%; } .sk-line.w40 { width: 40%; } .sk-line.w60 { width: 60%; } .sk-line.w70 { width: 70%; }
.sk-item {
  display: flex; align-items: center; gap: 12px; height: 74px;
  padding: 14px 14px 14px 10px; margin-bottom: 10px; border-radius: var(--radius);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline);
}
.sk-item .sk-bar { width: 5px; align-self: stretch; border-radius: var(--pill); background: var(--sk-base); }
/* Bulan: sel kosong berdenyut pelan selama data dimuat */
.cal-grid.is-loading .day-cell:not(.other)::after {
  content: ""; position: absolute; left: 32%; right: 32%; bottom: 12px; height: 9px;
  border-radius: 6px; background: var(--sk-base);
  animation: fade-in .3s ease .2s backwards, pulse 1.2s ease-in-out .5s infinite;
}

/* ---------- Ringkasan hari ini ---------- */
.today-card { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; padding: 14px; border-radius: 26px; }
.cal-enter .today-card { animation: rise .6s var(--ease-out) .08s backwards; }
.tc-head { display: flex; align-items: center; gap: 12px; }
.tc-icon {
  width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 13px; color: #fff; background: var(--grad-warm);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .6), inset 0 -2px 5px rgba(176, 82, 107, .2), 0 6px 14px -5px rgba(232, 140, 150, .7);
}
.tc-icon .ic { width: 22px; height: 22px; }
.tc-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.tc-kicker { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.tc-headline { font-size: 16px; font-weight: 800; }
.tc-next {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px 10px 10px; border: 0; border-radius: 18px;
  text-align: left; color: inherit; cursor: pointer;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline);
  transition: background .2s ease, transform .3s var(--ease-spring);
}
.tc-next:active { transform: scale(.98); }
.tc-next.kev { --ring: rgba(123, 167, 217, .7); }
.tc-next.bby { --ring: rgba(232, 154, 174, .75); }
.tc-bar { width: 4px; align-self: stretch; flex-shrink: 0; border-radius: var(--pill); }
.tc-next.kev .tc-bar { background: linear-gradient(180deg, #B2CDEC, var(--kev)); }
.tc-next.bby .tc-bar { background: linear-gradient(180deg, #F6C6D2, var(--bby)); }
.tc-next.both .tc-bar { background: linear-gradient(180deg, var(--kev), var(--bby)); }
.tc-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.tc-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--muted); }
.tc-next.is-live .tc-label { color: var(--live); }
.tc-title { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--live); animation: live 1.8s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(46, 158, 104, .55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(46, 158, 104, 0); } }
.tc-allday { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-pill {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  padding: 6px 12px 6px 9px; border: 0; border-radius: var(--pill);
  font-size: 12.5px; font-weight: 800; color: var(--ink); cursor: pointer;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline);
}
.tc-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-pill .ic { width: 14px; height: 14px; color: #D9714F; }
.tc-empty { margin: 0 2px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
/* Hitung mundur: chip yang bisa digeser menyamping */
.tc-countdown {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -14px; padding: 2px 14px 2px; scroll-padding-inline: 14px; scroll-snap-type: x proximity;
}
.tc-countdown::-webkit-scrollbar { display: none; }
.cd-chip {
  flex: 0 0 auto; display: flex; align-items: center; gap: 9px;
  padding: 6px 14px 6px 6px; border: 0; border-radius: var(--pill);
  color: inherit; text-align: left; cursor: pointer; scroll-snap-align: start;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline);
  transition: background .2s ease, transform .3s var(--ease-spring);
}
.cd-chip:active { transform: scale(.96); }
.cd-emoji {
  width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 50%; font-size: 17px; line-height: 1;
  background: var(--surface-strong); box-shadow: inset 0 0 0 1px var(--hairline), 0 3px 8px -4px rgba(120, 80, 50, .35);
}
.cd-text { display: flex; flex-direction: column; line-height: 1.2; }
.cd-title { max-width: 170px; font-size: 13px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-days { font-size: 12px; font-weight: 800; color: #D9714F; }
.cd-chip.is-today { color: #fff; background: var(--grad-warm); box-shadow: 0 6px 14px -6px rgba(232, 140, 150, .8); }
.cd-chip.is-today .cd-days { color: #fff; }
@media (hover: hover) {
  .tc-next:hover, .tc-pill:hover, .cd-chip:not(.is-today):hover { background: var(--surface-strong); }
}

/* ---------- Toast dengan tombol "Urungkan" + bar sisa waktu ---------- */
.toast { display: flex; align-items: center; justify-content: center; gap: 12px; overflow: hidden; width: max-content; max-width: calc(100vw - 32px); }
#toast-msg { min-width: 0; }
.toast.has-action { padding: 7px 7px 7px 20px; }
.toast-action {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 8px 14px 8px 11px; border: 0; border-radius: var(--pill);
  font: inherit; font-size: 13.5px; font-weight: 800; color: #FFD3BD; cursor: pointer;
  background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  transition: background .2s ease, transform .3s var(--ease-spring);
}
.toast-action .ic { width: 16px; height: 16px; }
.toast-action:active { transform: scale(.94); }
@media (hover: hover) { .toast-action:hover { background: rgba(255, 255, 255, .22); } }
.toast.has-action.bump::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, #F6AD8A, #E89AAE);
  transform-origin: left; animation: toast-timer var(--toast-ms, 5s) linear forwards;
}
@keyframes toast-timer { to { transform: scaleX(0); } }

/* ---------- Drawer profil: tema, pintasan keyboard ---------- */
.drawer-card { max-height: calc(100vh - 100px); overflow-y: auto; }
.drawer-section { padding: 2px 6px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--hairline); }
.drawer-label { display: flex; align-items: center; gap: 7px; margin: 4px 8px 8px; font-size: 12px; font-weight: 800; letter-spacing: .3px; color: var(--muted); }
.drawer-label .ic { width: 16px; height: 16px; }
.theme-seg { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border-radius: 16px; background: var(--track); }
.theme-thumb {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 3);
  border-radius: 12px; background: var(--surface-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 4px 12px -4px rgba(120, 80, 50, .35);
  transition: transform .5s var(--ease-spring);
}
.theme-seg button {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 2px; border: 0; border-radius: 12px; background: none;
  font-size: 11.5px; font-weight: 800; color: var(--muted); cursor: pointer;
  transition: color .2s ease;
}
.theme-seg button .ic { width: 18px; height: 18px; transition: color .2s ease, transform .4s var(--ease-spring); }
.theme-seg button.active { color: var(--ink); }
.theme-seg button.active .ic { color: #E07F5C; transform: scale(1.08); }
@media (hover: hover) { .theme-seg button:hover:not(.active) { color: var(--ink-soft); } }
.shortcuts { display: none; margin-top: 6px; padding: 8px 6px 6px; border-top: 1px solid var(--hairline); }
@media (hover: hover) and (pointer: fine) { .shortcuts { display: block; } }
.shortcuts dl { display: grid; gap: 7px; margin: 0 8px; }
.shortcuts dl div { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.shortcuts dt { display: flex; gap: 4px; }
.shortcuts dd { margin: 0; }
kbd {
  min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-grid; place-items: center; border-radius: 7px;
  font-family: inherit; font-size: 11.5px; font-weight: 800; color: var(--ink);
  background: var(--surface-strong); box-shadow: inset 0 -1.5px 0 var(--hairline), 0 0 0 1px var(--hairline);
}

/* ---------- Tanggal spesial ---------- */
@media (min-width: 560px) { .special-card { max-width: 440px; } }
.special-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 4px; }
.special-list .search-note { padding: 18px 12px; }
.sd-row {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px;
  border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline);
  animation: rise .4s var(--ease-out) backwards;
}
.sd-row.is-past { opacity: .6; }
.sd-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sd-title { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-date { font-size: 12px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-days { font-size: 12px; font-weight: 800; color: #D9714F; white-space: nowrap; }
.sd-row .ev-del { flex-shrink: 0; }
.special-form { margin-top: 10px; border-top: 1px solid var(--hairline); }
.special-form input[type="text"] { margin-top: 10px; }
.special-form .switch-row { margin-top: 10px; }
.emoji-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.emoji-opt {
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1.5px solid var(--field-border); border-radius: 14px;
  font-size: 21px; line-height: 1; cursor: pointer;
  background: var(--field-bg); box-shadow: var(--field-inset);
  transition: border-color .2s ease, background .2s ease, box-shadow .25s ease, transform .3s var(--ease-spring);
}
.emoji-opt.selected { border-color: var(--field-focus); background: var(--surface-strong); box-shadow: 0 0 0 3px rgba(244, 169, 136, .22); }
.emoji-opt:active { transform: scale(.92); }
@media (hover: hover) { .emoji-opt:hover:not(.selected) { border-color: var(--field-border-hover); } }

/* ---------- Pilih tahun (date picker) ---------- */
.dp-title-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px 4px 14px; border: 0; border-radius: var(--pill);
  font: inherit; color: inherit; background: none; cursor: pointer;
  transition: background .2s ease;
}
.dp-title-btn::after {
  content: ""; width: 16px; height: 16px; background: currentColor; opacity: .45;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9L12 15L5 9'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9L12 15L5 9'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (hover: hover) { .dp-title-btn:hover { background: var(--surface); } }
.choice-list.is-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.choice-list.is-grid .choice-opt { justify-content: center; padding: 11px 4px; animation: none; }
.choice-list.is-grid .choice-check { display: none; }
.choice-list.is-grid .choice-main { font-size: 14.5px; }

/* ---------- Ganti tema: crossfade (View Transitions) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .4s; }

/* =====================================================================
   Dark mode — kaca cokelat hangat, aksen peach/pink tetap
   ===================================================================== */
[data-theme="dark"] {
  color-scheme: dark;
  --ink: #F4E9E0;
  --ink-soft: #D6C5B7;
  --muted: #9C8B7D;
  --cream: #1B1512;
  --kev-deep: #A9C8EE;
  --bby-deep: #F2A9BD;
  --kev-soft: rgba(123, 167, 217, .22);
  --bby-soft: rgba(232, 154, 174, .22);
  --glass-fill: linear-gradient(155deg, rgba(78, 63, 54, .62) 0%, rgba(44, 35, 30, .46) 48%, rgba(58, 47, 40, .54) 100%);
  --glass-blur: blur(22px) saturate(160%);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 -1px 0 rgba(255, 255, 255, .04);
  --glass-depth: 0 1px 2px rgba(0, 0, 0, .2), 0 10px 30px -10px rgba(0, 0, 0, .55), 0 30px 60px -30px rgba(0, 0, 0, .5);
  --field-bg: rgba(255, 255, 255, .06);
  --field-border: rgba(255, 235, 220, .16);
  --field-border-hover: rgba(244, 169, 136, .55);
  --field-ring: 0 0 0 4px rgba(244, 169, 136, .22), 0 6px 16px -8px rgba(0, 0, 0, .6);
  --field-inset: inset 0 1px 2px rgba(0, 0, 0, .25), 0 1px 0 rgba(255, 255, 255, .03);
  --field-invalid: #F08497;
  --surface: rgba(255, 255, 255, .06);
  --surface-strong: rgba(255, 255, 255, .13);
  --hairline: rgba(255, 235, 220, .1);
  --track: rgba(0, 0, 0, .22);
  --sk-base: rgba(255, 255, 255, .07);
  --sk-shine: rgba(255, 255, 255, .07);
  --live: #5BD69A;
}
[data-theme="dark"] .bg { opacity: .42; }
[data-theme="dark"] .bg::after { opacity: .1; }
[data-theme="dark"] .glass::after {
  background: linear-gradient(140deg, rgba(255, 255, 255, .3) 0%, rgba(255, 255, 255, .06) 28%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, .04) 72%, rgba(255, 255, 255, .18) 100%);
}
[data-theme="dark"] :focus-visible { outline-color: rgba(244, 169, 136, .8); }

/* Login */
[data-theme="dark"] .login-heart {
  background: radial-gradient(120% 120% at 30% 18%, rgba(255, 255, 255, .22), rgba(255, 255, 255, .05) 55%, rgba(244, 169, 136, .2));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .3), inset 0 -5px 12px rgba(232, 154, 174, .2), 0 12px 26px -10px rgba(0, 0, 0, .6);
  color: #F08AA6;
}
[data-theme="dark"] .login-card h1 { background-image: linear-gradient(100deg, var(--ink) 25%, #F3B9A8 75%, #F2A9BD); }
[data-theme="dark"] #login-form::before { background: linear-gradient(90deg, transparent, rgba(255, 235, 220, .14), transparent); }
[data-theme="dark"] .user-avatar {
  background: radial-gradient(120% 120% at 30% 15%, rgba(255, 255, 255, .2), rgba(var(--tint), .22));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .25), 0 0 0 2px rgba(255, 255, 255, .1), 0 8px 18px -10px rgba(0, 0, 0, .7);
}
[data-theme="dark"] .user-check { box-shadow: 0 0 0 2.5px var(--cream), 0 3px 8px -2px rgba(0, 0, 0, .5); }
[data-theme="dark"] .user-blob {
  background: radial-gradient(120% 120% at 30% 20%, rgba(255, 255, 255, .22), rgba(255, 255, 255, .05) 55%, rgba(var(--tint), .25));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .35), inset 0 -4px 10px rgba(0, 0, 0, .2), inset 0 0 0 1.5px rgba(255, 255, 255, .14), 0 0 0 2.5px rgba(var(--tint), .7), 0 14px 28px -10px rgba(0, 0, 0, .7);
}
[data-theme="dark"] .user-blob::before { opacity: .4; }
[data-theme="dark"] .login-orb { opacity: .5; }
@media (hover: hover) { [data-theme="dark"] .pass-toggle:hover { background: rgba(255, 255, 255, .1); } }

/* Field & tombol */
[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder { color: rgba(220, 200, 185, .42); }
[data-theme="dark"] input:not(:placeholder-shown):not(.switch), [data-theme="dark"] textarea:not(:placeholder-shown) { background: rgba(255, 255, 255, .08); }
[data-theme="dark"] input:focus, [data-theme="dark"] select:focus, [data-theme="dark"] textarea:focus,
[data-theme="dark"] .picker-field:focus-visible, [data-theme="dark"] .picker-field.is-open { background: rgba(255, 255, 255, .12); }
[data-theme="dark"] .picker-field:active { background: rgba(244, 169, 136, .12); }
[data-theme="dark"] .switch-row:has(.switch:checked) { background: rgba(255, 255, 255, .1); }
[data-theme="dark"] .switch-row input.switch { background: rgba(255, 255, 255, .12); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .06); }
[data-theme="dark"] .error { color: #F49AA6; background: rgba(232, 106, 106, .14); }
[data-theme="dark"] .btn-soft {
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(255, 255, 255, .05), 0 2px 8px -2px rgba(0, 0, 0, .45);
}
[data-theme="dark"] .icon-btn {
  background: radial-gradient(120% 120% at 30% 15%, rgba(255, 255, 255, .17), rgba(255, 255, 255, .05) 60%, rgba(255, 255, 255, .08));
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .18), inset 0 0 0 1px rgba(255, 255, 255, .07), 0 6px 16px -6px rgba(0, 0, 0, .55);
}
[data-theme="dark"] .btn-primary { box-shadow: inset 0 1px 1px rgba(255, 255, 255, .6), inset 0 -3px 8px rgba(176, 82, 107, .3), inset 0 0 0 1px rgba(255, 255, 255, .18), 0 10px 24px -10px rgba(232, 140, 150, .55); }
@media (hover: hover) {
  [data-theme="dark"] input:hover:not(:focus):not(:disabled):not(.switch), [data-theme="dark"] textarea:hover:not(:focus):not(:disabled),
  [data-theme="dark"] .picker-field:hover:not(.is-open):not(:disabled) { background: rgba(255, 255, 255, .1); }
  [data-theme="dark"] .btn-soft:hover { background: rgba(255, 255, 255, .14); }
  [data-theme="dark"] .btn-ghost:hover { background: rgba(255, 255, 255, .08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
  [data-theme="dark"] .icon-btn:hover { box-shadow: inset 0 1px 1px rgba(255, 255, 255, .22), inset 0 0 0 1px rgba(255, 255, 255, .1), 0 10px 22px -8px rgba(0, 0, 0, .6); }
  [data-theme="dark"] .day-cell:hover { background: linear-gradient(160deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .06)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(244, 169, 136, .4), 0 10px 20px -8px rgba(0, 0, 0, .5); }
  [data-theme="dark"] .ag-item:hover { box-shadow: var(--glass-edge), 0 18px 34px -14px rgba(0, 0, 0, .65); }
  [data-theme="dark"] .choice-opt:hover:not(.is-selected), [data-theme="dark"] .agenda-more:hover:not(:disabled) { background: rgba(255, 255, 255, .1); }
  [data-theme="dark"] .search-item:hover { background: rgba(255, 255, 255, .12); }
  [data-theme="dark"] .ev-chip.is-link:hover { background: rgba(255, 255, 255, .14); }
  [data-theme="dark"] .dp-grid .day-cell:hover { background: rgba(255, 255, 255, .14); }
}

/* Segmen, kalender, agenda */
[data-theme="dark"] .seg-thumb {
  background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 16px -4px rgba(0, 0, 0, .5);
}
[data-theme="dark"] .theme-thumb { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 4px 12px -4px rgba(0, 0, 0, .5); }
[data-theme="dark"] .day-cell {
  background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 0 0 1px rgba(255, 255, 255, .04);
}
[data-theme="dark"] .day-cell.other { background: rgba(255, 255, 255, .02); box-shadow: none; }
[data-theme="dark"] .day-cell.today {
  background: linear-gradient(160deg, rgba(244, 169, 136, .22), rgba(232, 154, 174, .1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1.5px rgba(244, 169, 136, .6), 0 8px 18px -8px rgba(0, 0, 0, .5);
}
[data-theme="dark"] .dow-row span:nth-child(n+6) { color: rgba(242, 169, 189, .7); }
[data-theme="dark"] .legend-chip { background: rgba(255, 255, 255, .06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
[data-theme="dark"] .ad-num {
  background: linear-gradient(160deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(255, 255, 255, .05), 0 6px 14px -6px rgba(0, 0, 0, .5);
}
[data-theme="dark"] .agenda-more { background: rgba(255, 255, 255, .03); border-color: rgba(255, 235, 220, .16); }
[data-theme="dark"] .allday-tag, [data-theme="dark"] .cd-days, [data-theme="dark"] .sd-days { color: #F4A586; }
[data-theme="dark"] .cell-ev { color: var(--ink); }

/* Modal, drawer, toast */
[data-theme="dark"] .modal, [data-theme="dark"] .drawer { background: rgba(0, 0, 0, .45); }
[data-theme="dark"] .modal-card {
  background: linear-gradient(180deg, rgba(48, 39, 33, .94), rgba(34, 27, 23, .9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .05), 0 -12px 40px -12px rgba(0, 0, 0, .6);
}
@media (min-width: 560px) {
  [data-theme="dark"] .modal-card { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px rgba(255, 255, 255, .05), 0 30px 80px -24px rgba(0, 0, 0, .75); }
}
[data-theme="dark"] .modal-card::before { background: rgba(255, 255, 255, .18); }
[data-theme="dark"] .drawer-card { background: linear-gradient(160deg, rgba(54, 44, 38, .95), rgba(36, 29, 25, .9)); }
[data-theme="dark"] .profile-head { border-bottom-color: var(--hairline); }
[data-theme="dark"] .profile-avatar-btn {
  background: radial-gradient(120% 120% at 30% 15%, rgba(255, 255, 255, .18), rgba(244, 169, 136, .14));
  box-shadow: 0 0 0 2.5px rgba(255, 255, 255, .14), 0 0 0 4.5px rgba(244, 169, 136, .45), 0 8px 18px -6px rgba(0, 0, 0, .6);
}
[data-theme="dark"] .avatar-edit { background: #3B302A; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 3px 8px -2px rgba(0, 0, 0, .5); }
[data-theme="dark"] .who-pair .who-wrap { background: var(--cream); }
[data-theme="dark"] .ag-who .who-wrap { box-shadow: 0 0 0 2px rgba(30, 24, 20, .9), 0 0 0 3.5px var(--ring, rgba(244, 169, 136, .6)), 0 4px 10px -2px rgba(0, 0, 0, .45); }
[data-theme="dark"] .ev-del, [data-theme="dark"] .ev-edit {
  background: radial-gradient(120% 120% at 30% 15%, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), inset 0 0 0 1px rgba(255, 255, 255, .06), 0 4px 10px -4px rgba(0, 0, 0, .5);
}
/* Toast dibalik jadi terang supaya menonjol di atas latar gelap */
[data-theme="dark"] .toast {
  color: #3A2E27;
  background: linear-gradient(160deg, rgba(255, 246, 238, .94), rgba(250, 232, 220, .9));
  box-shadow: inset 0 1px 0 #fff, 0 14px 32px -10px rgba(0, 0, 0, .6);
}
[data-theme="dark"] .toast-action { color: #C2563A; background: rgba(224, 127, 92, .14); box-shadow: inset 0 0 0 1px rgba(224, 127, 92, .2); }
@media (hover: hover) { [data-theme="dark"] .toast-action:hover { background: rgba(224, 127, 92, .24); } }

/* Picker, pilihan, pencarian, chip */
[data-theme="dark"] .time-wheels::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 8px 18px -8px rgba(0, 0, 0, .5);
}
[data-theme="dark"] .choice-opt.is-selected, [data-theme="dark"] .owner-opt.selected { background: rgba(255, 255, 255, .1); }
[data-theme="dark"] .owner-opt.both.selected {
  background: linear-gradient(#3A2F29, #3A2F29) padding-box, linear-gradient(120deg, var(--kev), var(--bby)) border-box;
}
[data-theme="dark"] .choice-opt.is-danger .choice-main > span { color: #F49AA6; }
[data-theme="dark"] .ev-chip { background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
[data-theme="dark"] .search-item { background: rgba(255, 255, 255, .06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), inset 0 0 0 1px rgba(255, 255, 255, .04); }
[data-theme="dark"] .si-date { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
[data-theme="dark"] .search-item.both .si-date b { color: #F4A586; }

/* ---------- Pasang ke layar utama ---------- */
.login-install {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 8px;
  margin: 18px auto 0; padding: 10px 18px 10px 14px;
  border: 0; border-radius: var(--pill);
  font: inherit; font-size: 14px; font-weight: 800; color: var(--ink-soft); cursor: pointer;
  background: var(--surface);
  -webkit-backdrop-filter: blur(12px) saturate(170%); backdrop-filter: blur(12px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 0 0 1px var(--hairline), 0 6px 16px -8px rgba(178, 120, 90, .4);
  animation: rise .6s var(--ease-out) .25s backwards;
  transition: background .2s ease, color .2s ease, transform .3s var(--ease-spring);
}
.login-install .ic { width: 18px; height: 18px; color: #E07F5C; }
.login-install:active { transform: scale(.96); }
@media (hover: hover) { .login-install:hover { background: var(--surface-strong); color: var(--ink); } }
@media (min-width: 560px) { .install-card { max-width: 420px; } }
.install-app {
  display: flex; align-items: center; gap: 14px;
  margin: 12px 0 4px; padding: 12px; border-radius: 20px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline);
}
.install-app img { width: 56px; height: 56px; flex-shrink: 0; border-radius: 14px; box-shadow: 0 6px 14px -6px rgba(176, 82, 107, .55); }
.install-app span { display: flex; flex-direction: column; gap: 3px; }
.install-app b { font-size: 16px; font-weight: 800; }
.install-app small { font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.35; }
.install-steps { list-style: none; counter-reset: step; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.install-steps li {
  counter-increment: step; position: relative;
  padding: 2px 0 2px 40px; min-height: 28px;
  font-size: 14.5px; font-weight: 600; line-height: 1.6; color: var(--ink);
  animation: rise .4s var(--ease-out) backwards;
}
.install-steps li:nth-child(2) { animation-delay: .06s; }
.install-steps li:nth-child(3) { animation-delay: .12s; }
.install-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 1px;
  width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: 50%; font-size: 13px; font-weight: 800; color: #fff; background: var(--grad-warm);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .6), 0 4px 10px -4px rgba(232, 140, 150, .7);
}
.install-steps b { font-weight: 800; }
/* Tombol/ikon yang harus diketuk, digambar seperti tombol kecil */
.keycap {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: -5px;
  padding: 2px 7px; border-radius: 8px;
  font-size: 13px; font-weight: 800; color: var(--ink);
  background: var(--surface-strong); box-shadow: inset 0 -1.5px 0 var(--hairline), 0 0 0 1px var(--hairline);
}
.keycap .ic { width: 17px; height: 17px; color: #0A84FF; }
[data-theme="dark"] .login-install { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 0 0 1px var(--hairline), 0 6px 16px -8px rgba(0, 0, 0, .6); }
[data-theme="dark"] .keycap .ic { color: #4BA3FF; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .blob, .login-heart, .login-orb, .user-link, .empty-emoji, .live-dot, .sk::after { animation: none !important; }
}

/* Riwayat aktivitas */
.history-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 4px; }
.history-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 10px;
  border-radius: 18px; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline);
  animation: rise .4s var(--ease-out) backwards;
  transition: background .25s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .history-item:hover { background: var(--accent-soft); }
}
.history-ic {
  flex: none; width: 38px; height: 38px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--ink);
}
.history-ic.kev { background: var(--kev-soft); }
.history-ic.bby { background: var(--bby-soft); }
.history-ic .ic { width: 19px; height: 19px; }
.history-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.history-summary { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.4; color: var(--ink); overflow-wrap: break-word; }
.history-meta { margin: 0; font-size: 12.5px; color: var(--muted); }
