/* ============================================================
   Aytən & İlqar — v3 design system
   Filled "tonal" controls, segmented tabs, 52px inputs (16px text → no iOS zoom),
   composer-style add rows, colour-coded menu. Same class/ID names as before.
   No continuous animations (battery/heat friendly).
   ============================================================ */
:root{
  --bg-0:#0d0717;
  --bg-1:#160c26;
  --bg-2:#1f1233;
  --night-3:#3a1c42;          /* legacy refs */
  --plum:#4a2350;

  --surface:rgba(38,25,58,.74);      /* cards */
  --surface-2:rgba(255,255,255,.075); /* filled controls / inputs */
  --surface-3:rgba(255,255,255,.12);  /* hover */
  --line:rgba(255,255,255,.075);
  --hi:inset 0 1px 0 rgba(255,255,255,.06);

  --text:#f6f0fa;
  --cream:#f6f0fa;
  --muted:rgba(246,240,250,.58);
  --muted-2:rgba(246,240,250,.42);

  --gold:#f6c372;
  --gold-soft:#eab15f;
  --rose:#ff8fb6;
  --rose-deep:#ff6fa4;
  --violet:#a77bff;
  --danger:#ff7b8a;

  --grad:linear-gradient(135deg,#ff9e7a 0%,#ff6fa4 48%,#a77bff 100%);
  --grad-soft:linear-gradient(135deg,rgba(255,158,122,.16),rgba(167,123,255,.16));
  --pill:#f7f0ff;
  --pill-ink:#1c1030;
  --ink:#1c1030;

  --ring:0 0 0 4px rgba(255,111,164,.22);
  --shadow-sm:0 6px 18px rgba(0,0,0,.28);
  --shadow:0 18px 44px rgba(0,0,0,.42);
  --shadow-lg:0 30px 80px rgba(0,0,0,.55);
  --shadow-cta:0 12px 28px rgba(255,111,164,.35);

  --r-xs:10px;
  --r-sm:14px;
  --r:20px;
  --r-lg:28px;

  --ic-user:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9a9d4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-7 8-7s8 3 8 7'/%3E%3C/svg%3E");
  --ic-lock:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9a9d4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2.5'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
  --ic-search:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9a9d4' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  --ic-eye:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d8cbee' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  --ic-eye-off:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff8fb6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3l18 18'/%3E%3Cpath d='M10.6 6.1A10.6 10.6 0 0 1 12 6c6.5 0 10 6 10 6a17 17 0 0 1-3.2 3.9M6.6 6.6C3.9 8.3 2 12 2 12s3.5 7 10 7c1.6 0 3-.4 4.3-1'/%3E%3C/svg%3E");
  --ic-chev:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9a9d4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
[hidden]{display:none !important}   /* must always win over .lightbox/.modal display rules */
html,body{margin:0;padding:0}
body{
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 600px at 88% -12%, rgba(167,123,255,.30), transparent 60%),
    radial-gradient(820px 560px at -4% 106%, rgba(255,111,164,.20), transparent 60%),
    linear-gradient(170deg, var(--bg-0), var(--bg-1) 50%, var(--bg-2));
  background-attachment:fixed;
  min-height:100vh;min-height:100dvh;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
  overflow-x:hidden;
}
button{font-family:inherit}

/* ---------- shared control primitives ---------- */
/* inputs: filled, borderless, 16px (prevents iOS focus-zoom) */
.field input,.field select,
.list-add input,.contact-add input,
.rest-filter input,.rest-filter select,
.lb-caption,.cpanel-add input,.li-addlink input,.li-edit-input{
  font-family:inherit;font-size:16px;color:var(--text);
  background-color:var(--surface-2);
  border:1.5px solid transparent;outline:none;
  transition:border-color .18s, background-color .18s, box-shadow .18s;
  -webkit-appearance:none;appearance:none;
}
.field input::placeholder,.list-add input::placeholder,.contact-add input::placeholder,
.rest-filter input::placeholder,.lb-caption::placeholder,.cpanel-add input::placeholder,
.li-addlink input::placeholder{color:var(--muted-2)}
.field input:focus,.field select:focus,.contact-add input:focus,
.rest-filter input:focus,.rest-filter select:focus,.lb-caption:focus,
.cpanel-add input:focus,.li-addlink input:focus,.li-edit-input:focus{
  border-color:var(--rose-deep);background-color:var(--surface-3);box-shadow:var(--ring)}
select{background-image:var(--ic-chev)!important;background-repeat:no-repeat!important;
  background-position:right 14px center!important;background-size:18px!important;padding-right:42px!important}
.field select option,.rest-filter select option{background:#241338;color:var(--text)}

/* ---------- night sky (static) ---------- */
.sky{position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.sky::before,.sky::after{
  content:"";position:absolute;inset:-10%;
  background-image:
    radial-gradient(1.6px 1.6px at 20% 30%, #fff8, transparent),
    radial-gradient(1.4px 1.4px at 70% 20%, #ffe9c780, transparent),
    radial-gradient(1.2px 1.2px at 40% 70%, #fff6, transparent),
    radial-gradient(1.8px 1.8px at 85% 60%, #fff7, transparent),
    radial-gradient(1.2px 1.2px at 55% 45%, #ffe9c760, transparent),
    radial-gradient(1.5px 1.5px at 15% 80%, #fff5, transparent),
    radial-gradient(1.3px 1.3px at 90% 88%, #fff5, transparent);
  background-repeat:no-repeat;opacity:.6;
}
.sky::after{opacity:.45;transform:scale(1.3) translateY(4%)}
.moon-float{position:absolute;color:var(--gold);opacity:.35;filter:drop-shadow(0 0 10px rgba(246,195,114,.4))}

/* ============================================================
   LOGIN
   ============================================================ */
.login-body{display:grid;place-items:center;padding:20px}
.login-wrap{position:relative;z-index:2;width:100%;max-width:980px;
  display:flex;flex-direction:column;align-items:center;gap:16px}

.hero-card{width:100%;display:grid;grid-template-columns:1.05fr .95fr;
  background:var(--surface);border-radius:var(--r-lg);overflow:hidden;
  box-shadow:var(--shadow-lg),var(--hi);backdrop-filter:blur(20px) saturate(130%)}
.hero-photo{position:relative;min-height:540px;background-size:cover;background-position:center}
.hero-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .8s ease}
.hero-img.loaded{opacity:1}
.hero-veil{position:absolute;inset:0;
  background:linear-gradient(180deg, rgba(13,7,23,.1), rgba(13,7,23,.5)),
             linear-gradient(90deg, transparent 38%, rgba(22,12,38,.92) 100%)}
.hero-moon{position:absolute;top:24px;left:24px;width:60px;height:60px;
  fill:var(--gold);opacity:.95;filter:drop-shadow(0 0 16px rgba(246,195,114,.55))}

.login-panel{padding:40px 36px;display:flex;flex-direction:column;gap:16px;justify-content:center}
.login-panel.solo{width:100%;max-width:400px;margin:0 auto;padding:34px 26px 28px;
  background:rgba(26,16,42,.80);border-radius:var(--r-lg);
  box-shadow:var(--shadow-lg),var(--hi);backdrop-filter:blur(22px) saturate(140%)}

.brand{text-align:center;margin-bottom:2px}
.brand-moon{display:inline-grid;place-items:center;width:52px;height:52px;border-radius:18px;
  font-size:26px;color:var(--gold);background:var(--grad-soft);box-shadow:var(--hi)}
.brand h1{font-family:'Cormorant Garamond',serif;font-weight:600;
  font-size:clamp(32px,8vw,42px);margin:.28em 0 0;letter-spacing:.2px;line-height:1.05}
.brand h1 span{background:var(--grad);-webkit-background-clip:text;background-clip:text;
  -webkit-text-fill-color:transparent;font-style:italic;padding:0 3px}
.tagline{margin:6px 0 0;color:var(--muted);font-size:14px}

/* profile picker */
.who-label{margin:6px 0 -6px;font-size:13px;font-weight:600;color:var(--muted)}
.who{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.chip{display:flex;align-items:center;gap:11px;padding:11px 12px;cursor:pointer;
  border-radius:var(--r-sm);background:var(--surface-2);border:1.5px solid transparent;
  color:var(--text);font-size:15px;font-weight:600;text-align:left;
  transition:background .18s, border-color .18s, transform .12s}
.chip:hover{background:var(--surface-3)}
.chip:active{transform:scale(.97)}
.chip.active{border-color:var(--rose-deep);background:rgba(255,111,164,.12);box-shadow:var(--ring)}
.chip-av{width:36px;height:36px;flex:none;border-radius:12px;display:grid;place-items:center;
  font-size:16px;font-weight:700;color:#fff;background:var(--grad)}
.chip[data-user="İlqar"] .chip-av{background:linear-gradient(135deg,#7aa6ff,#a77bff)}

/* fields */
.field{display:flex;flex-direction:column;gap:8px}
.field > span{font-size:13px;font-weight:600;color:var(--muted);padding-left:2px}
.field input,.field select{width:100%;height:52px;padding:0 16px;border-radius:var(--r-sm)}
#username,#password,#pwInput{padding-left:46px;background-image:var(--ic-user);
  background-repeat:no-repeat;background-position:16px center;background-size:19px}
#password,#pwInput{background-image:var(--ic-lock);padding-right:52px}
.input-wrap{position:relative;display:block}
.in-eye{position:absolute;right:6px;top:50%;transform:translateY(-50%);
  width:40px;height:40px;border:none;border-radius:11px;cursor:pointer;
  background:var(--ic-eye) center/20px no-repeat;opacity:.85;transition:background-color .15s}
.in-eye:hover{background-color:var(--surface-3)}
.in-eye.on{background-image:var(--ic-eye-off);opacity:1}

/* primary button */
.btn-primary{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  height:54px;margin-top:4px;padding:0 22px;border:none;border-radius:16px;cursor:pointer;
  font-weight:700;font-size:16px;color:#fff;letter-spacing:.2px;
  text-shadow:0 1px 2px rgba(0,0,0,.18);
  background:var(--grad);box-shadow:var(--shadow-cta),inset 0 1px 0 rgba(255,255,255,.3);
  transition:transform .12s, filter .18s, box-shadow .18s}
.btn-primary:hover{filter:brightness(1.06)}
.btn-primary:active{transform:scale(.97)}
.btn-primary:disabled{opacity:.6;cursor:default;transform:none}

.err{min-height:18px;margin:0;color:var(--danger);font-size:13px;text-align:center}
.foot{color:var(--muted);font-size:12px;letter-spacing:.4px}
.foot .heart{color:var(--rose-deep)}

/* login collage background */
.collage{position:fixed;inset:0;z-index:0;display:grid;grid-auto-rows:1fr;
  background-size:cover;background-position:center;overflow:hidden}
.collage-tile{background-size:cover;background-position:center;opacity:.9;transition:opacity .45s ease;will-change:opacity}
.collage-tile.swap{opacity:0}
.collage-veil{position:fixed;inset:0;z-index:0;pointer-events:none;
  background:radial-gradient(130% 100% at 50% 0%, rgba(13,7,23,.55), rgba(13,7,23,.86) 64%, rgba(13,7,23,.97))}

@media (max-width:720px){
  .hero-card{grid-template-columns:1fr;max-width:440px}
  .hero-photo{min-height:240px}
  .hero-veil{background:linear-gradient(180deg, rgba(13,7,23,.08), rgba(22,12,38,.95))}
  .login-panel{padding:28px 22px 30px}
}

/* ============================================================
   APP — topbar
   ============================================================ */
.app-body{position:relative;z-index:0;padding-bottom:96px}
.app-sky{opacity:.6}

.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px 16px;padding-top:calc(12px + env(safe-area-inset-top));
  background:rgba(16,9,28,.78);backdrop-filter:blur(20px) saturate(150%);
  box-shadow:0 1px 0 var(--line)}
.topbar-brand{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
.topbar-brand > div{min-width:0}
.topbar-brand .brand-moon{width:38px;height:38px;border-radius:13px;font-size:19px;flex:none}
.topbar-brand strong{font-family:'Cormorant Garamond',serif;font-size:22px;font-weight:600;display:block;line-height:1.05;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar-brand small{display:block;color:var(--muted);font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
input[type=search]::-webkit-search-decoration{display:none}
@media (max-width:420px){
  .topbar{padding-left:12px;padding-right:12px;gap:8px}
  .topbar-brand .brand-moon{display:none}            /* room for the title on phones */
  .topbar-brand strong{font-size:20px}
  .me-badge{padding:7px 10px;font-size:12px}
}
.topbar-actions{display:flex;align-items:center;gap:8px}
.me-badge{background:var(--surface-2);color:var(--gold);font-size:13px;font-weight:600;
  padding:8px 13px;border-radius:999px;white-space:nowrap}

/* tonal icon buttons */
.icon-btn,.back-btn{width:42px;height:42px;border-radius:14px;cursor:pointer;border:none;
  background:var(--surface-2);color:var(--text);font-size:17px;line-height:1;
  display:grid;place-items:center;transition:background .16s, transform .12s;flex:none}
.back-btn{font-size:24px;margin-right:2px}
.icon-btn:hover,.back-btn:hover{background:var(--surface-3)}
.icon-btn:active,.back-btn:active{transform:scale(.92)}

/* ---------- segmented controls (filters / tabs / owner switch) ---------- */
.filters,.list-tabs,.who-switch{
  display:flex;align-items:center;gap:3px;width:fit-content;max-width:calc(100% - 28px);
  margin:14px auto 0;padding:4px;border-radius:16px;
  background:rgba(255,255,255,.06);box-shadow:var(--hi);
  overflow-x:auto;scrollbar-width:none;position:relative;z-index:10}
.filters::-webkit-scrollbar,.list-tabs::-webkit-scrollbar{display:none}
.filters-who{margin-top:8px}
.list-tabs{margin:10px auto 16px}
.who-switch{margin:14px auto 6px}
.filter,.list-tab,.who-switch button{
  flex:0 0 auto;border:none;background:transparent;color:var(--muted);cursor:pointer;
  padding:9px 16px;border-radius:12px;font-size:14px;font-weight:600;white-space:nowrap;
  transition:background .18s, color .18s, box-shadow .18s}
.filter:hover,.list-tab:hover,.who-switch button:hover{color:var(--text)}
.filter.active,.list-tab.active,.who-switch button.active{
  background:var(--pill);color:var(--pill-ink);box-shadow:0 3px 10px rgba(0,0,0,.28)}

@media (max-width:480px){
  .filters{width:auto;margin-left:14px;margin-right:14px;max-width:none}
  .filter{flex:1 1 auto;padding:9px 6px;font-size:13px;text-align:center}
  .list-tab,.who-switch button{padding:9px 12px;font-size:13px}
}

/* ---------- tonal text buttons ---------- */
.tool-btn,.selbtn,.btn-ghost,.mv-btn,.alb-pick-item,.game-no,.pager button{
  border:none;cursor:pointer;background:var(--surface-2);color:var(--text);
  font-weight:600;transition:background .16s, transform .12s, color .16s}
.tool-btn:hover,.selbtn:hover,.btn-ghost:hover,.mv-btn:hover,.alb-pick-item:hover,.game-no:hover,
.pager button:hover:not(:disabled){background:var(--surface-3)}
.tool-btn:active,.selbtn:active,.btn-ghost:active,.mv-btn:active,.game-no:active{transform:scale(.96)}
.tool-btn{height:38px;padding:0 15px;border-radius:12px;font-size:13px;white-space:nowrap;
  display:inline-flex;align-items:center;gap:6px}
.tool-btn.active{background:var(--pill);color:var(--pill-ink)}
.tool-btn.danger{color:var(--danger);background:rgba(255,123,138,.12)}
.tool-btn.danger:hover{background:rgba(255,123,138,.2)}

/* toolbar above gallery: [Seç] [count] [sort] */
.toolbar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;margin:14px 0 6px}
.count{color:var(--muted);font-size:13px;font-weight:500;text-align:center}
#selectBtn{justify-self:start}
#sortBtn{justify-self:end}

/* selection mode */
.tile.selected{outline:3px solid var(--rose-deep);outline-offset:-3px}
.tile.selected::after{content:'✓';position:absolute;top:8px;right:8px;z-index:3;
  width:26px;height:26px;border-radius:50%;background:var(--grad);color:#fff;
  display:grid;place-items:center;font-size:14px;font-weight:800;box-shadow:0 2px 8px rgba(0,0,0,.4)}
.selecting .tile-love{display:none}

.selbar{position:fixed;left:12px;right:12px;bottom:calc(16px + env(safe-area-inset-bottom));z-index:36;
  background:rgba(24,15,38,.96);border-radius:20px;padding:10px 10px 10px 16px;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  box-shadow:var(--shadow),var(--hi);backdrop-filter:blur(16px)}
.sel-count{font-size:14px;font-weight:600;color:var(--text);white-space:nowrap}
.selbar-actions{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}
.selbtn{height:40px;padding:0 13px;border-radius:12px;font-size:13px;white-space:nowrap}
.selbtn.danger{background:rgba(255,123,138,.16);color:var(--danger)}

/* ---------- gallery grid ---------- */
.gallery-wrap{position:relative;z-index:5;padding:6px 16px 40px;max-width:1200px;margin:0 auto}
.gallery{display:grid;gap:6px;grid-template-columns:repeat(3,1fr)}
@media (min-width:640px){.gallery{grid-template-columns:repeat(4,1fr);gap:10px}}
@media (min-width:980px){.gallery{grid-template-columns:repeat(5,1fr)}}

.pager{display:flex;justify-content:center;align-items:center;gap:6px;flex-wrap:wrap;margin:22px 0 6px}
.pager button{min-width:40px;height:40px;padding:0 10px;border-radius:12px;font-size:14px}
.pager button:disabled{opacity:.35;cursor:default}
.pager button.active{background:var(--pill);color:var(--pill-ink)}
.pager .dots{color:var(--muted);padding:0 2px}

.tile{position:relative;aspect-ratio:1;border-radius:14px;overflow:hidden;cursor:pointer;
  background:rgba(255,255,255,.05);transition:transform .16s, box-shadow .16s}
@media (min-width:640px){.tile{border-radius:18px}}
.tile:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(0,0,0,.4)}
.tile:active{transform:scale(.98)}
.tile img{width:100%;height:100%;object-fit:cover;display:block;opacity:0;transition:opacity .4s}
.tile img.loaded{opacity:1}
.tile.video-ph{display:grid;place-items:center;background:linear-gradient(135deg,var(--plum),var(--night-3))}
.tile .ph-moon{font-size:36px;color:var(--gold);opacity:.5}

.tile-badge{position:absolute;top:7px;left:7px;display:flex;gap:5px;align-items:center}
.tile-uploader{background:rgba(13,7,23,.72);color:#fff;font-size:10px;font-weight:600;
  padding:3px 8px;border-radius:999px}
.tile-play{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}
.tile-play svg{width:40px;height:40px;fill:rgba(255,255,255,.95);filter:drop-shadow(0 2px 8px rgba(0,0,0,.55))}
.tile-love{position:absolute;top:7px;right:8px;font-size:15px;color:var(--rose);filter:drop-shadow(0 1px 4px rgba(0,0,0,.6))}
.tile-love.off{display:none}
.tile-dur{position:absolute;bottom:7px;right:7px;z-index:2;background:rgba(13,7,23,.8);color:#fff;
  font-size:11px;font-weight:600;padding:2px 7px;border-radius:7px}

.empty{text-align:center;padding:70px 20px;color:var(--muted)}
.empty-moon{font-size:54px;color:var(--gold);opacity:.6}
.empty h2{font-family:'Cormorant Garamond',serif;font-weight:600;font-size:28px;margin:12px 0 6px;color:var(--text)}
.empty p{margin:0;font-size:14px}

/* ---------- FAB + scroll-top ---------- */
.fab{position:fixed;right:18px;bottom:calc(18px + env(safe-area-inset-bottom));z-index:30;
  width:60px;height:60px;border-radius:20px;border:none;cursor:pointer;
  background:var(--grad);box-shadow:var(--shadow-cta),inset 0 1px 0 rgba(255,255,255,.3);
  display:grid;place-items:center;transition:transform .14s, filter .18s}
.fab:hover{filter:brightness(1.06)}
.fab:active{transform:scale(.92)}
.fab svg{width:26px;height:26px;stroke:#fff;stroke-width:2.6;fill:none;stroke-linecap:round}

.scrolltop{position:fixed;left:18px;bottom:calc(22px + env(safe-area-inset-bottom));z-index:30;
  width:46px;height:46px;border-radius:16px;cursor:pointer;font-size:19px;line-height:1;border:none;
  background:rgba(30,19,46,.92);color:var(--text);box-shadow:var(--shadow-sm),var(--hi);
  backdrop-filter:blur(10px);display:grid;place-items:center;transition:transform .14s}
.scrolltop:active{transform:scale(.92)}

/* ============================================================
   MENU
   ============================================================ */
.datebanner{max-width:560px;margin:22px auto 4px;padding:0 18px;text-align:center;line-height:1.2}
.db-date{display:block;font-size:12px;font-weight:600;letter-spacing:2px;text-transform:uppercase;color:var(--muted)}
.db-days{display:flex;justify-content:center;align-items:baseline;gap:7px;margin-top:6px;
  font-family:'Cormorant Garamond',serif;font-size:30px;font-weight:500;color:var(--text)}
.db-days b{font-size:44px;font-weight:600;line-height:1;
  background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.datebanner .heart{color:var(--rose-deep);font-size:20px}
.db-span{display:block;margin-top:6px;font-size:14px;font-weight:500;letter-spacing:.5px;color:var(--muted)}
.db-span:empty{display:none}

/* "1 month ago today" card */
.onthisday{max-width:560px;margin:16px auto 0;padding:0 16px}
.otd-head{display:flex;align-items:center;justify-content:space-between;width:100%;cursor:pointer;border:none;
  background:var(--surface);border-radius:var(--r);padding:14px 16px;color:var(--text);
  box-shadow:var(--shadow-sm),var(--hi)}
.onthisday:not(.collapsed) .otd-head{border-radius:var(--r) var(--r) 0 0}
.otd-title{font-size:15px;font-weight:600}
.otd-title b{color:var(--rose);font-weight:600}
.otd-chev{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;
  background:var(--surface-2);color:var(--text);font-size:12px}
.otd-body{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;background:var(--surface);
  border-radius:0 0 var(--r) var(--r);padding:2px 10px 10px;box-shadow:var(--shadow-sm)}
.onthisday.collapsed .otd-body{display:none}
.otd-tile{position:relative;aspect-ratio:1/1;border:none;padding:0;cursor:pointer;overflow:hidden;
  border-radius:12px;background:var(--plum);transition:transform .12s}
.otd-tile:active{transform:scale(.95)}
.otd-tile img{width:100%;height:100%;object-fit:cover;display:block}
.otd-tile.otd-vph{display:grid;place-items:center;color:var(--gold);font-size:24px}
.otd-play{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}
.otd-play svg{width:24px;height:24px;fill:rgba(255,255,255,.95);filter:drop-shadow(0 2px 6px rgba(0,0,0,.5))}

.menu{max-width:560px;margin:16px auto 48px;padding:0 16px;display:flex;flex-direction:column;gap:10px}
.menu-item{display:flex;align-items:center;gap:14px;width:100%;text-align:left;cursor:pointer;border:none;
  background:var(--surface);border-radius:var(--r);padding:12px 14px 12px 12px;color:var(--text);font-size:16px;
  box-shadow:var(--shadow-sm),var(--hi);transition:transform .14s, background .18s}
.menu-item:hover{background:rgba(48,32,72,.82)}
.menu-item:active{transform:scale(.98)}
.mi-ic{width:46px;height:46px;flex:none;display:grid;place-items:center;font-size:22px;border-radius:14px;
  background:rgba(167,123,255,.18)}
.menu-item[data-go="gallery"] .mi-ic{background:rgba(167,123,255,.20)}
.menu-item[data-go="albums"] .mi-ic{background:rgba(255,111,164,.20)}
.menu-item[data-go="map"] .mi-ic{background:rgba(64,200,190,.20)}
.menu-item[data-go="todo"] .mi-ic{background:rgba(92,214,130,.20)}
.menu-item[data-go="future"] .mi-ic{background:rgba(122,140,255,.22)}
.menu-item[data-go="discuss"] .mi-ic{background:rgba(255,196,92,.20)}
.menu-item[data-go="restaurants"] .mi-ic{background:rgba(255,140,100,.20)}
.menu-item[data-go="contacts"] .mi-ic{background:rgba(90,170,255,.20)}
.mi-t{flex:1;font-weight:600;font-size:16px}
.menu-foot{max-width:560px;margin:-28px auto 40px;padding:0 16px;text-align:center}
.menu-foot-btn{border:none;background:none;cursor:pointer;color:var(--muted-2);font-size:13px;font-weight:600;
  padding:10px 14px;border-radius:12px;transition:color .15s, background .15s}
.menu-foot-btn:hover{color:var(--text);background:var(--surface-2)}
.mi-ar{width:30px;height:30px;flex:none;border-radius:10px;display:grid;place-items:center;
  background:var(--surface-2);color:var(--muted);font-size:18px}

/* ============================================================
   LISTS / CONTACTS / RESTAURANTS
   ============================================================ */
.list-view{max-width:640px;margin:0 auto;padding:10px 16px 80px}

/* composer-style add row (input + button in one pill) */
.list-add{display:flex;align-items:center;gap:6px;margin:14px 0;padding:5px 5px 5px 6px;
  background:var(--surface-2);border:1.5px solid transparent;border-radius:18px;
  transition:border-color .18s, box-shadow .18s, background-color .18s}
.list-add:focus-within{border-color:var(--rose-deep);box-shadow:var(--ring);background:var(--surface-3)}
.list-add input{flex:1;min-width:0;height:44px;padding:0 12px;background:transparent!important;
  border:none!important;box-shadow:none!important;border-radius:12px}
.list-add-btn{width:44px;height:44px;flex:none;border:none;border-radius:14px;cursor:pointer;
  font-size:22px;line-height:1;color:#fff;background:var(--grad);
  box-shadow:0 6px 14px rgba(255,111,164,.3);transition:transform .12s, filter .16s}
.list-add-btn:hover{filter:brightness(1.06)}
.list-add-btn:active{transform:scale(.9)}

/* add-contact card: name full width, then phone + add button */
.contact-add{display:grid;grid-template-columns:1fr auto;gap:8px;margin:14px 0;padding:10px;
  border-radius:20px;background:var(--surface);box-shadow:var(--shadow-sm),var(--hi)}
.contact-add[hidden]{display:none!important}
.contact-add input{width:100%;min-width:0;height:50px;padding:0 15px;border-radius:var(--r-sm)}
#cName{grid-column:1 / -1}
.contact-add .list-add-btn{height:50px;width:50px}

.list-items,.contact-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.li{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap;
  background:var(--surface);border-radius:18px;padding:14px;box-shadow:var(--shadow-sm),var(--hi)}
.li-check{width:26px;height:26px;flex:none;margin-top:1px;border-radius:50%;
  border:2px solid rgba(255,255,255,.28);background:transparent;color:#fff;font-size:13px;font-weight:800;
  cursor:pointer;display:grid;place-items:center;transition:all .15s}
.li-check:hover{border-color:var(--rose)}
.li.done .li-check{background:var(--grad);border-color:transparent}
.li-body{flex:1;min-width:0}
.li-text{font-size:15.5px;line-height:1.4;word-break:break-word}
.li.done .li-text{text-decoration:line-through;color:var(--muted)}
.li-meta{font-size:12px;color:var(--muted-2);margin-top:4px}
.contact-name{font-size:16px;font-weight:600;overflow-wrap:anywhere}
.contact-phone{font-size:13px;color:var(--muted);margin-top:3px;overflow-wrap:anywhere}

/* small tonal icon buttons inside rows */
.li-del,.li-edit,.li-ig-btn{width:34px;height:34px;flex:none;border:none;border-radius:11px;cursor:pointer;
  background:var(--surface-2);color:var(--muted);font-size:15px;display:grid;place-items:center;
  transition:background .15s, color .15s}
.li-edit:hover{color:var(--gold);background:var(--surface-3)}
.li-del:hover{color:var(--danger);background:rgba(255,123,138,.14)}
.li-ig-btn:hover{color:#ff9ac8;background:var(--surface-3)}
.li-drag{width:22px;height:34px;flex:none;border:none;background:none;color:var(--muted-2);font-size:16px;
  cursor:grab;touch-action:none;padding:0;line-height:1;display:grid;place-items:center}
.li-drag:active{cursor:grabbing}
.li.dragging{opacity:.9;box-shadow:var(--shadow);background:rgba(52,35,78,.95)}

/* row footer: author left, small actions right → text keeps the full width */
.li-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px}
.li-foot .li-meta{margin-top:0;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.li-actions{display:flex;align-items:center;gap:6px;flex:none}
.li.editing .li-foot{display:none}
.contact-actions .li-edit{margin-left:auto}               /* restaurant/contact rows: icons pushed right */
.contact-actions .li-edit + .li-del{margin-left:0}
.contact-actions > .li-del:only-of-type{margin-left:auto}

/* inline editor (todo text / category name) */
.li-editor{display:flex;flex-direction:column;gap:8px;width:100%}
.li-edit-input{display:block;width:100%;min-width:0;min-height:48px;padding:12px 14px;border-radius:14px;
  line-height:1.4;resize:none;overflow:hidden;border-color:var(--rose-deep)!important;background-color:var(--surface-3)!important}
.li-body > .li-edit-input{height:48px;padding:0 14px}       /* single-line (category rename) */

/* stacked inline forms: instagram link, dislike reason */
.li-addlink{display:flex;flex-direction:column;gap:8px;margin-top:10px;padding:10px;border-radius:16px;
  background:rgba(255,255,255,.04)}
.li-addlink input{width:100%;height:48px;padding:0 14px;border-radius:12px}
.li-form-btns{display:flex;gap:8px;justify-content:flex-end}
.li-form-btns button{height:42px;padding:0 18px;border:none;border-radius:12px;cursor:pointer;
  font-size:14px;font-weight:700;transition:transform .12s, filter .15s}
.li-form-btns button:active{transform:scale(.95)}
.li-btn-ghost{background:var(--surface-2);color:var(--text)}
.li-btn-primary{background:var(--grad);color:#fff;box-shadow:0 6px 14px rgba(255,111,164,.28)}

.contact-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:10px}
.c-btn{display:inline-flex;align-items:center;gap:6px;height:38px;padding:0 14px;border-radius:12px;
  text-decoration:none;border:none;cursor:pointer;font-size:13px;font-weight:600;white-space:nowrap;
  transition:filter .15s, transform .12s}
.c-btn:active{transform:scale(.95)}
.c-wa{background:rgba(37,211,102,.16);color:#5fe596}
.c-call{background:rgba(246,195,114,.16);color:var(--gold)}
.c-ig{background:linear-gradient(135deg,rgba(225,48,108,.22),rgba(253,175,69,.2));color:#ffa6cd}

/* restaurant controls */
.rest-move{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.mv-btn{height:36px;padding:0 13px;border-radius:11px;font-size:13px}
.mv-like{background:rgba(255,111,164,.14);color:var(--rose)}
.mv-dislike{color:var(--muted)}
.mv-dislike:hover{color:var(--danger)}
.rest-toolbar{display:flex;gap:8px;margin:12px 0 6px;flex-wrap:wrap}
.rest-toolbar .tool-btn{height:42px;padding:0 16px;font-size:14px}
.rest-filter{display:flex;gap:8px;margin:6px 0 14px}
.rest-filter input{flex:1;min-width:0;height:48px;padding:0 14px 0 44px;border-radius:var(--r-sm);
  background-image:var(--ic-search);background-repeat:no-repeat;background-position:14px center;background-size:19px}
.rest-filter select{flex:0 0 auto;width:auto;max-width:44%;height:48px;padding-left:14px;border-radius:var(--r-sm);font-size:15px}
.rest-cat{display:inline-block;margin-top:7px;font-size:12px;font-weight:600;color:var(--gold);
  background:rgba(246,195,114,.14);border-radius:999px;padding:3px 11px}

/* todo item: links */
.li-links{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.li-link{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;text-decoration:none;
  font-size:12.5px;font-weight:600;line-height:1;border-radius:999px;
  background:linear-gradient(135deg,rgba(225,48,108,.2),rgba(253,175,69,.18));color:#ffa6cd}
.li-link .x{display:inline-grid;place-items:center;flex:none;width:18px;height:18px;border-radius:50%;
  background:rgba(0,0,0,.3);color:#fff;font-size:10px;font-weight:700;margin-left:2px}

.list-empty{text-align:center;color:var(--muted);padding:46px 12px;font-size:15px}

/* ---------- proposal mini-game ---------- */
#view-game{max-width:560px;margin:0 auto;padding:30px 20px 60px;text-align:center}
.game,.game-win{min-height:60vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px}
.game-heart{font-size:68px;filter:drop-shadow(0 0 20px rgba(255,111,164,.5))}
.game-q{font-family:'Cormorant Garamond',serif;font-size:36px;color:var(--text)}
.game-btns{position:relative;display:flex;flex-wrap:wrap;gap:14px;justify-content:center;align-items:center;min-height:120px}
.game-yes{height:56px;padding:0 42px;border:none;border-radius:18px;cursor:pointer;font-size:18px;font-weight:700;
  color:#fff;background:var(--grad);box-shadow:var(--shadow-cta)}
.game-yes:hover{filter:brightness(1.06)}
.game-no{height:50px;padding:0 26px;border-radius:16px;font-size:15px;color:var(--muted);transition:transform .12s ease}
.win-heart{font-size:74px}
.win-title{font-family:'Cormorant Garamond',serif;font-size:48px;
  background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.win-sub{font-size:16px;color:var(--rose)}

/* ---------- upload progress ---------- */
.uploading{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:40;
  background:rgba(24,15,38,.96);border-radius:18px;padding:14px 20px;
  display:flex;flex-direction:column;gap:9px;min-width:250px;box-shadow:var(--shadow),var(--hi)}
.uploading-bar{height:7px;border-radius:999px;background:rgba(255,255,255,.1);overflow:hidden}
.uploading-bar i{display:block;height:100%;width:0;border-radius:999px;background:var(--grad);transition:width .2s}
.uploading span{font-size:13px;font-weight:500;color:var(--muted);text-align:center}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox{position:fixed;inset:0;z-index:2000;background:rgba(8,4,14,.96);backdrop-filter:blur(10px)}
.lb-stage{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:10px;overflow:hidden}
.lb-stage img,.lb-stage video{max-width:100%;max-height:100%;border-radius:12px;box-shadow:var(--shadow-lg);object-fit:contain}
.lb-close{position:absolute;top:calc(14px + env(safe-area-inset-top));right:14px;z-index:2;
  width:44px;height:44px;border-radius:50%;border:none;background:rgba(255,255,255,.12);
  color:#fff;font-size:17px;cursor:pointer;transition:background .16s, transform .12s}
.lb-close:hover{background:rgba(255,255,255,.22)}
.lb-close:active{transform:scale(.9)}
.lb-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:46px;height:46px;border:none;
  border-radius:50%;cursor:pointer;font-size:28px;line-height:1;background:rgba(255,255,255,.1);color:#fff;
  display:grid;place-items:center;transition:background .16s}
.lb-nav:hover{background:rgba(255,255,255,.2)}
.lb-prev{left:12px}.lb-next{right:12px}
.lb-bar{position:absolute;left:0;right:0;bottom:0;z-index:3;
  padding:30px 16px calc(14px + env(safe-area-inset-bottom));
  background:linear-gradient(to top, rgba(8,4,14,.97), rgba(8,4,14,.8) 55%, transparent);
  display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.lightbox.is-video{display:flex;flex-direction:column}
.lightbox.is-video .lb-stage{position:static;inset:auto;flex:1;min-height:0}
.lightbox.is-video .lb-bar{position:static;background:rgba(20,12,32,.96);box-shadow:0 -1px 0 var(--line)}
.lb-meta{display:flex;flex-direction:column;gap:1px;font-size:12px;color:var(--muted);min-width:90px}
.lb-meta span:first-child{color:var(--text);font-size:14px;font-weight:600}
.lb-caption{flex:1;min-width:160px;height:46px;padding:0 15px;border-radius:14px}
.lb-tools{display:flex;gap:8px}
.tool{width:46px;height:46px;border-radius:50%;border:none;background:rgba(255,255,255,.1);color:#fff;
  font-size:18px;cursor:pointer;display:grid;place-items:center;text-decoration:none;
  transition:background .16s, transform .12s}
.tool:hover{background:rgba(255,255,255,.2)}
.tool:active{transform:scale(.9)}
.tool.loved{color:#fff;background:var(--grad)}
.tool.danger:hover{background:rgba(255,123,138,.25);color:var(--danger)}
.tool-dl{background:rgba(255,255,255,.14)}
.lb-tools .tool#lbComment{width:auto;min-width:46px;padding:0 13px;gap:4px;border-radius:23px;font-size:16px}
.lb-tools .tool#lbComment span{font-size:13px;font-weight:700}

@media (max-width:560px){
  .lb-nav{width:40px;height:40px;font-size:24px;background:rgba(255,255,255,.08)}
  .lb-meta{min-width:auto}
}

/* ============================================================
   MODAL + TOAST
   ============================================================ */
.modal{position:fixed;inset:0;z-index:120;background:rgba(8,4,14,.66);backdrop-filter:blur(8px);
  display:grid;place-items:center;padding:18px}
.modal-card{width:100%;max-width:400px;max-height:88vh;overflow:auto;
  background:#1e1330;border-radius:var(--r-lg);padding:24px 22px 22px;
  box-shadow:var(--shadow-lg),var(--hi);display:flex;flex-direction:column;gap:14px}
.modal-card h3{font-family:'Cormorant Garamond',serif;font-size:27px;font-weight:600;margin:0 0 2px;color:var(--text)}
.modal-sub{margin:-8px 0 0;color:var(--muted);font-size:13px}
.modal-actions{display:flex;gap:10px;margin-top:6px}
.modal-actions .btn-primary{flex:1;margin:0;height:50px}
.btn-ghost{flex:1;height:50px;padding:0 16px;border-radius:16px;font-size:15px;color:var(--text)}

.toast{position:fixed;left:50%;bottom:calc(96px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:2600;
  background:rgba(247,240,255,.97);color:var(--pill-ink);padding:12px 20px;
  border-radius:16px;font-size:14px;font-weight:600;box-shadow:var(--shadow);
  max-width:calc(100% - 32px);text-align:center;
  opacity:0;transition:opacity .22s, transform .22s}
.toast.show{opacity:1;transform:translateX(-50%) translateY(-6px)}

/* ============================================================
   COMMENTS panel
   ============================================================ */
.cpanel{position:absolute;left:0;right:0;bottom:0;z-index:6;max-height:64%;
  display:flex;flex-direction:column;background:#1b1029;border-radius:24px 24px 0 0;
  box-shadow:0 -14px 44px rgba(0,0,0,.55),var(--hi)}
.cpanel[hidden]{display:none!important}
.cpanel-head{display:flex;align-items:center;justify-content:space-between;
  padding:14px 14px 10px 18px;color:var(--text);font-size:16px;font-weight:700;box-shadow:0 1px 0 var(--line)}
.cpanel-x{width:34px;height:34px;border:none;border-radius:11px;background:var(--surface-2);color:var(--text);
  font-size:15px;cursor:pointer}
.cpanel-list{flex:1;overflow-y:auto;padding:14px 16px;display:flex;flex-direction:column;gap:14px}
.c-empty{color:var(--muted);text-align:center;padding:20px;font-size:14px}
.comment{font-size:14.5px;color:var(--text)}
.comment.is-reply{margin-left:14px}
.c-main{background:var(--surface-2);border-radius:16px;padding:9px 12px;display:inline-block;max-width:100%}
.c-main b{color:var(--rose);font-weight:700;margin-right:3px}
.c-text{color:var(--text);word-break:break-word}
.c-meta{display:flex;align-items:center;gap:14px;margin:5px 0 0 6px;font-size:12px;color:var(--muted)}
.c-like{background:none;border:none;cursor:pointer;color:var(--muted);font-size:12px;font-weight:600;display:flex;gap:3px;align-items:center;padding:0}
.c-like.liked{color:var(--rose)}
.c-like i{font-style:normal}
.c-act{background:none;border:none;cursor:pointer;color:var(--muted);font-size:12px;font-weight:700;padding:0}
.c-act:hover{color:var(--text)}
.c-del{color:#e99}
.c-replies{margin-top:10px;display:flex;flex-direction:column;gap:10px;padding-left:12px;
  box-shadow:inset 2px 0 0 var(--line)}
.cpanel-reply{display:flex;align-items:center;justify-content:space-between;
  padding:8px 18px;font-size:13px;font-weight:600;color:var(--rose);background:rgba(255,111,164,.08)}
.cpanel-reply button{width:28px;height:28px;border:none;border-radius:9px;background:var(--surface-2);
  color:var(--text);cursor:pointer;font-size:13px}
.cpanel-add{display:flex;align-items:center;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));
  box-shadow:0 -1px 0 var(--line)}
.cpanel-add input{flex:1;min-width:0;height:46px;border-radius:999px;padding:0 18px}
.cpanel-add .list-add-btn{border-radius:50%;width:46px;height:46px;font-size:18px}

/* ============================================================
   ALBUMS
   ============================================================ */
.albums-grid{max-width:1000px;margin:14px auto 60px;padding:0 16px;
  display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}
.album-card{cursor:pointer;background:var(--surface);border:none;border-radius:var(--r);overflow:hidden;
  padding:0;text-align:left;color:var(--text);box-shadow:var(--shadow-sm),var(--hi);transition:transform .14s, box-shadow .18s}
.album-card:hover{transform:translateY(-3px);box-shadow:var(--shadow)}
.album-card:active{transform:scale(.97)}
.album-cover{aspect-ratio:1/1;background:linear-gradient(135deg,var(--plum),var(--night-3));
  display:grid;place-items:center;font-size:40px;overflow:hidden}
.album-mosaic{width:100%;height:100%;display:grid;gap:2px;background:#1e1330}
.album-mosaic img{width:100%;height:100%;object-fit:cover;display:block}
.album-mosaic.n1{grid-template-columns:1fr}
.album-mosaic.n2{grid-template-columns:1fr 1fr}
.album-mosaic.n3{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}
.album-mosaic.n3 img:first-child{grid-row:1 / span 2}
.album-mosaic.n4{grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr}
.album-name{padding:11px 13px 2px;font-size:15px;font-weight:700}
.album-count{padding:0 13px 13px;font-size:12.5px;color:var(--muted)}
.album-head{max-width:1200px;margin:14px auto 0;padding:0 16px;display:flex;
  align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.album-head h2{font-family:'Cormorant Garamond',serif;font-size:30px;font-weight:600;margin:0;color:var(--text)}
.album-actions{display:flex;gap:8px;flex-wrap:wrap}
#albumGallery{max-width:1200px;margin:14px auto 60px;padding:0 12px}
.tile-rm{position:absolute;top:6px;left:6px;z-index:3;width:28px;height:28px;border-radius:50%;
  border:none;cursor:pointer;background:rgba(13,7,23,.8);color:#fff;font-size:12px;line-height:1;
  display:grid;place-items:center;opacity:0;transition:opacity .15s}
.tile:hover .tile-rm{opacity:1}
@media (hover:none){.tile-rm{opacity:1}}
.alb-pick-item{width:100%;text-align:left;height:52px;padding:0 16px;border-radius:14px;font-size:15px}

/* ============================================================
   MAP
   ============================================================ */
.map-canvas{width:100%;height:calc(100dvh - 108px);min-height:340px;border-radius:0}
.map-empty{max-width:420px;margin:60px auto;text-align:center;color:var(--muted);padding:0 24px}
.map-empty .empty-moon{font-size:52px}
.map-empty p{font-size:15px;line-height:1.5;margin-top:10px}
.leaflet-container{background:#aad3df!important;font:inherit}
.leaflet-control-attribution{font-size:9px}
.leaflet-bar{border:none!important;box-shadow:0 6px 16px rgba(0,0,0,.25)!important;border-radius:14px!important;overflow:hidden}
.leaflet-control-zoom a{background:#fff!important;color:#1c1030!important;width:40px!important;height:40px!important;
  line-height:40px!important;font-size:20px!important}
.leaflet-control-zoom a:hover{background:#f3edfb!important}

.mp-icon{background:none;border:none}
.mp-bubble{position:relative;width:52px;height:52px;border-radius:15px;border:3px solid #fff;
  box-shadow:0 7px 18px rgba(0,0,0,.5);background:var(--plum);
  transition:transform .16s cubic-bezier(.2,.8,.3,1.2);animation:mpop .24s ease both;transform-origin:50% 100%}
@keyframes mpop{from{opacity:0;transform:scale(.6) translateY(6px)}to{opacity:1;transform:scale(1) translateY(0)}}
.mp-icon:hover .mp-bubble,.mp-icon:active .mp-bubble{transform:scale(1.1)}
.mp-bubble img{width:100%;height:100%;object-fit:cover;border-radius:12px;display:block}
.mp-bubble::after{content:'';position:absolute;bottom:-8px;left:50%;transform:translateX(-50%);
  width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;
  border-top:9px solid #fff;filter:drop-shadow(0 3px 2px rgba(0,0,0,.3))}
.mp-moon{display:grid;place-items:center;width:100%;height:100%;color:var(--gold);font-size:24px}
.mp-vid{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:20px;height:20px;border-radius:50%;
  background:rgba(0,0,0,.5);color:#fff;font-size:9px;display:grid;place-items:center;padding-left:1px}
.mp-count{position:absolute;top:-9px;right:-9px;background:var(--grad);color:#fff;font-size:11px;font-weight:800;
  line-height:1.6;border-radius:999px;min-width:22px;text-align:center;padding:0 6px;
  box-shadow:0 2px 7px rgba(0,0,0,.45);border:2px solid #fff}

/* ============================================================
   SLIDESHOW
   ============================================================ */
.slideshow{position:fixed;inset:0;z-index:2200;background:#000;display:flex;align-items:center;justify-content:center}
.slideshow[hidden]{display:none!important}
.ss-stage{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:8px}
.ss-stage img,.ss-stage video{max-width:100%;max-height:100%;object-fit:contain;animation:ssfade .8s ease}
@keyframes ssfade{from{opacity:.3}to{opacity:1}}
.ss-close{position:absolute;top:calc(16px + env(safe-area-inset-top));right:16px;z-index:2;width:46px;height:46px;
  border-radius:50%;border:none;cursor:pointer;background:rgba(255,255,255,.16);color:#fff;font-size:18px}
.ss-toggle{position:absolute;bottom:calc(26px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);z-index:2;
  width:60px;height:60px;border-radius:50%;border:none;cursor:pointer;background:rgba(255,255,255,.2);color:#fff;font-size:20px}

/* ---------- iPhone save/share: "ready" bar for big videos + busy download button ---------- */
.share-ready{position:fixed;left:50%;bottom:calc(112px + env(safe-area-inset-bottom));transform:translateX(-50%);
  z-index:2700;display:flex;align-items:center;gap:10px;padding:8px 8px 8px 16px;border-radius:20px;
  background:rgba(24,15,38,.97);box-shadow:var(--shadow),var(--hi);max-width:calc(100% - 24px);white-space:nowrap}
.share-ready[hidden]{display:none!important}
.share-ready-t{color:var(--text);font-size:14px;font-weight:600}
.share-ready-go{height:46px;padding:0 18px;border:none;border-radius:14px;cursor:pointer;
  font-size:15px;font-weight:700;color:#fff;background:var(--grad);box-shadow:var(--shadow-cta)}
.share-ready-go:active{transform:scale(.96)}
.share-ready-x{width:38px;height:38px;border:none;border-radius:12px;cursor:pointer;
  background:var(--surface-2);color:var(--text);font-size:14px}
.tool.busy{opacity:.55;pointer-events:none;animation:none}
@media (max-width:560px){ .share-ready{bottom:calc(180px + env(safe-area-inset-bottom))} }

/* ============================================================
   PERFORMANCE on weak phones
   - backdrop-filter re-blurs everything underneath on EVERY scroll / video frame → replaced by
     solid, almost-opaque backgrounds (identical look on this dark theme). Login keeps its blur
     (static page, no cost).
   - background-attachment:fixed repaints the whole gradient on every scroll on many phones →
     the gradient is painted once on a fixed layer instead.
   - content-visibility lets the browser skip off-screen gallery tiles (long scrolled galleries).
   ============================================================ */
body{background:var(--bg-0);background-attachment:scroll}
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:
    radial-gradient(900px 600px at 88% -12%, rgba(167,123,255,.30), transparent 60%),
    radial-gradient(820px 560px at -4% 106%, rgba(255,111,164,.20), transparent 60%),
    linear-gradient(170deg, var(--bg-0), var(--bg-1) 50%, var(--bg-2))}
.topbar{background:rgba(16,9,28,.97);backdrop-filter:none;-webkit-backdrop-filter:none}
.scrolltop,.selbar{backdrop-filter:none;-webkit-backdrop-filter:none}
.lightbox{background:rgba(8,4,14,.985);backdrop-filter:none;-webkit-backdrop-filter:none}
.modal{background:rgba(8,4,14,.84);backdrop-filter:none;-webkit-backdrop-filter:none}
.gallery .tile,#albumGallery .tile{content-visibility:auto;contain-intrinsic-size:auto 160px}
