:root {
  --sand: #F0F0FF; --warm: #CCCCFF; --ink: #1E1B4B;
  --terra: #7B6FCD; --sage: #6B9E7A; --sky: #5B7FD4;
  --muted: #9090B8; --card: #FAFAFF;
  --badge-accent: #A0346A;
}
body.night { --badge-accent: #8888CC; }

* { box-sizing: border-box; margin: 0; padding: 0; }
button { cursor: pointer; }
html { background: var(--ink); }
body { font-family: 'DM Sans', sans-serif; background: var(--sand); color: var(--ink); min-height: 100vh; }

/* ── HEADER ── */
header {
  background: var(--card); color: var(--ink);
  padding: 24px 32px 24px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
  transition: background-color 1.5s ease, color 1.5s ease;
}
header .intro-countdown {
  margin-top: 0; padding: 12px 18px; border-top: none;
  background: rgba(123,111,205,0.07); border: 1px solid rgba(123,111,205,0.18);
  border-radius: 14px; display: flex; align-items: flex-start; gap: 14px;
}
header .countdown-wrap { justify-content: flex-end; }
header .countdown-back-text {
  color: var(--muted); margin-bottom: 0;
  font-family: 'DM Sans', sans-serif; font-style: normal; font-weight: 700; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding-top: 2px;
}
header .flip-sep { color: var(--muted); }
header .flip-card { width: 44px; height: 52px; }
header .flip-upper,
header .flip-fold-top { height: 26px; background: var(--warm); }
header .flip-lower,
header .flip-fold-bot { height: 26px; background: #B8B8F0; }
header .flip-upper span,
header .flip-fold-top span { font-size: 1.9rem; line-height: 52px; color: var(--ink); }
header .flip-lower span,
header .flip-fold-bot span { font-size: 1.9rem; line-height: 52px; transform: translateY(-26px); color: var(--ink); }
header .flip-sep { font-size: 1.4rem; line-height: 52px; margin-bottom: 18px; }
header .flip-label { color: var(--muted); }

@media (max-width: 600px) {
  header { flex-direction: column; align-items: center; text-align: center; }
  header .intro-countdown { flex-direction: column; align-items: center; text-align: center; width: 100%; gap: 8px; }
  header .countdown-wrap { justify-content: center; }
  .coffee-box { flex-direction: column; align-items: center; text-align: center; padding: 14px 18px; gap: 10px; }
  .coffee-emoji { font-size: 1.5rem; }
}
@media (max-width: 900px) {
  #map-scroll-btn.visible { display: flex; }
  body:has(#admin-overlay.open) #map-scroll-btn,
  body:has(#croissant-popup.open) #map-scroll-btn,
  body:has(#lightbox.open) #map-scroll-btn { display: none; }
}
.header-title { font-family: 'Playfair Display', serif; font-size: clamp(1.5rem,4vw,2.2rem); letter-spacing: -0.02em; line-height: 1.1; }
.header-title em { color: var(--terra); font-style: italic; }
.header-sub { font-size: 0.82rem; color: var(--muted); letter-spacing: 0.06em; margin-top: 5px; font-style: italic; }
#paris-time {
  display: inline-block; margin-top: 14px;
  font-size: 0.82rem; font-style: italic; font-family: 'DM Sans', sans-serif;
  color: var(--muted); letter-spacing: 0.03em;
  background: rgba(123,111,205,0.08); border: 1px solid rgba(123,111,205,0.15);
  border-radius: 20px; padding: 5px 13px;
}
.admin-btn {
  background: none; border: 1px solid rgba(123,111,205,0.3); color: var(--muted);
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 20px; cursor: pointer; transition: all 0.2s; font-family: 'DM Sans', sans-serif;
}
.admin-btn:hover { border-color: var(--terra); color: var(--terra); }

/* ── MAP ── */
#map-wrap { width: 100%; height: 460px; position: relative; border-top: 3px solid var(--terra); border-bottom: 3px solid var(--terra); }
#map { width: 100%; height: 100%; }
#map-scroll-btn {
  display: none;
  position: fixed; right: 16px; top: 66.67%; transform: translateY(-50%); z-index: 9999;
  width: 48px; height: 48px; border-radius: 50%;
  background: #B8B8F0;
  border: 1px solid var(--warm);
  box-shadow:
    0 6px 24px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.65),
    inset 0 -1px 0 rgba(0,0,0,0.06);
  align-items: center; justify-content: center;
}
#map-scroll-btn::after {
  content: '';
  display: block;
  width: 11px; height: 11px;
  border-right: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  transform: rotate(45deg) translate(-1px, -2px);
  border-radius: 1px;
}
.map-badge {
  position: absolute; top: 12px; right: 12px; z-index: 999;
  background: var(--card); color: var(--ink);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 8px 16px; border-radius: 20px; cursor: pointer; display: none;
  border: 1.5px solid rgba(123,111,205,0.25);
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  transition: border-radius 0.2s, padding 0.2s, background 0.15s;
  align-items: center; gap: 4px;
}
.map-badge:hover { background: var(--sand); border-color: var(--terra); }
body.night .map-badge { background: var(--ink); color: var(--warm); border-color: rgba(204,204,255,0.25); box-shadow: 0 2px 10px rgba(0,0,0,0.25); }
body.night .map-badge:hover { background: #2D2A5E; border-color: rgba(204,204,255,0.5); }
.map-badge.expanded { border-radius: 12px; padding: 10px 16px; flex-direction: column; align-items: flex-start; }
.badge-stat { padding: 3px 0; }
.badge-stat:not(:last-child) { border-bottom: 1px solid rgba(204,204,255,0.15); margin-bottom: 2px; padding-bottom: 5px; }

/* ── MAIN ── */
main { max-width: 680px; margin: 0 auto; padding: 36px 20px 60px; }

/* ── INTRO CARD ── */
.intro-card {
  background: var(--card); border-radius: 16px; padding: 24px 28px;
  margin-bottom: 36px; border: 1.5px solid var(--warm);
  box-shadow: 0 4px 24px rgba(123,111,205,0.1);
}
.intro-card p { font-size: 0.95rem; line-height: 1.7; color: var(--ink); margin-bottom: 0; }
.intro-card strong { color: #1E1870; }
.intro-contact { border-top: 1px solid var(--warm); padding-top: 14px; }
.intro-contact p { font-size: 0.84rem; color: var(--muted); margin-bottom: 8px; }
.contact-links { display: flex; gap: 20px; flex-wrap: wrap; }
.contact-links a { color: var(--terra); font-weight: 500; font-size: 0.9rem; text-decoration: none; }
.contact-links a:hover { text-decoration: underline; }

.section-label { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; font-weight: 500; }

/* ── CHECK-IN CARD ── */
#checkin-card {
  background: var(--card); border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 40px rgba(123,111,205,0.1), 0 1px 4px rgba(123,111,205,0.06);
  animation: fadeUp 0.5s ease both; margin-bottom: 32px;
}
@keyframes fadeUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }

.checkin-photo { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; max-height:320px; }
.photo-placeholder {
  width:100%; aspect-ratio:16/9;
  background: linear-gradient(135deg, var(--warm) 0%, #B8B8F0 100%);
  display:flex; align-items:center; justify-content:center;
  padding:28px 36px; overflow:hidden; font-size:3rem;
}
.photo-placeholder span {
  font-family:'Playfair Display',serif; font-style:italic;
  font-size:1.3rem; line-height:1.55; color:var(--ink); opacity:0.7;
  text-align:center;
  display:-webkit-box; -webkit-line-clamp:3; line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
.checkin-body { padding: 24px 28px 28px; }
.checkin-meta { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.pin-dot {
  width:20px; height:20px; background:#9B8FDE; border-radius:50%; flex-shrink:0;
  border:2.5px solid white; box-shadow:0 2px 6px rgba(0,0,0,0.25);
  animation: mpulse 2s ease-in-out infinite;
}
.checkin-location { font-family:'DM Sans',sans-serif; font-size:1.35rem; font-weight:700; letter-spacing:-0.01em; }
.checkin-caption { font-size:0.97rem; line-height:1.65; color:var(--muted); margin-bottom:18px; display:-webkit-box; -webkit-line-clamp:2; line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.checkin-footer { display:flex; justify-content:space-between; align-items:center; padding-top:14px; border-top:1px solid var(--warm); }
.checkin-time { font-size:0.74rem; color:var(--muted); letter-spacing:0.06em; text-transform:uppercase; }

/* ── HISTORY LIST ── */
#history-list { display:flex; flex-direction:column; gap:8px; }
.history-item {
  display:flex; gap:14px; align-items:flex-start;
  padding:10px 12px; border-radius:10px; cursor:pointer; transition:background 0.18s;
  background: rgba(123,111,205,0.13);
}
.history-item:hover { background: rgba(123,111,205,0.14); }
.history-item-hiding { animation: history-hide 0.35s ease forwards; }
@keyframes history-hide {
  from { opacity: 1; transform: translateY(0); max-height: 100px; }
  to   { opacity: 0; transform: translateY(-6px); max-height: 0; padding: 0; margin: 0; }
}
.history-more-btn {
  display:block; width:100%; margin-top:4px;
  background:none; border:1.5px dashed rgba(123,111,205,0.35);
  border-radius:10px; padding:10px; cursor:pointer;
  font-family:'DM Sans',sans-serif; font-size:0.82rem; color:var(--muted);
  transition:background 0.18s, color 0.18s;
}
.history-more-btn:hover { background:rgba(123,111,205,0.08); color:var(--terra); }
.history-thumb {
  width:58px; height:58px; border-radius:8px; flex-shrink:0;
  background:var(--warm); display:flex; align-items:center; justify-content:center; font-size:1.3rem; overflow:hidden;
}
.history-thumb img { width:100%; height:100%; object-fit:cover; }
.history-info { flex:1; min-width:0; }
.history-loc { margin-bottom:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.loc-place { font-weight:700; }
.loc-city::before { content: 'in '; font-family:'DM Sans',sans-serif; font-style:normal; font-weight:400; }
.loc-city { font-family:'Playfair Display',serif; font-style:italic; color:var(--muted); margin-left:6px; font-size:0.8em; letter-spacing:0.02em; }
.history-cap { font-size:0.79rem; color:var(--muted); opacity:0.5; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.history-time { font-size:0.7rem; color:var(--muted); margin-top:4px; }

/* ── EMPTY / LOADING ── */
#empty-state { text-align:center; padding:56px 20px; display:none; }
.empty-icon { font-size:3rem; margin-bottom:14px; }
.empty-title { font-family:'DM Sans',sans-serif; font-size:1.4rem; margin-bottom:8px; }
.empty-sub { color:var(--muted); font-size:0.88rem; }

#loading { text-align:center; padding:56px 20px; color:var(--muted); font-size:0.88rem; letter-spacing:0.06em; text-transform:uppercase; }
.loader { width:22px; height:22px; border:2px solid var(--warm); border-top-color:var(--terra); border-radius:50%; animation:spin 0.8s linear infinite; margin:0 auto 14px; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ── FOOTER ── */
footer {
  background: var(--card); color: var(--muted);
  text-align: center; padding: 28px 20px; font-size: 0.78rem; line-height: 1.9;
  transition: background-color 1.5s ease, color 1.5s ease;
}
footer > * {
  max-width: 680px; margin-left: auto; margin-right: auto;
}
footer strong { color: var(--ink); }
.footer-divider { border: none; border-top: 1px solid rgba(123,111,205,0.2); margin: 20px auto; width: 40%; }
footer a { color: var(--terra); text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .admin-btn { margin-top: 28px; }

.coffee-box {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: rgba(123,111,205,0.07); border: 1px solid rgba(123,111,205,0.15);
  border-radius: 14px; padding: 20px 24px; margin-bottom: 28px; text-align: left;
}
.coffee-emoji { font-size: 2rem; flex-shrink: 0; }
.coffee-text { flex: 1; min-width: 160px; }
.coffee-text strong { color: var(--ink); font-size: 0.95rem; display: block; margin-bottom: 4px; }
.coffee-text p { font-size: 0.78rem; color: var(--muted); line-height: 1.5; margin: 0; }
.coffee-btn {
  flex-shrink: 0; background: var(--warm); color: var(--ink);
  font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 0.85rem;
  padding: 10px 20px; border-radius: 30px; text-decoration: none;
  transition: background 0.2s, transform 0.2s; white-space: nowrap;
}
.coffee-btn:hover { background: #B8B8F0; transform: translateY(-1px); text-decoration: none; }

/* ── CROISSANT JAR ── */
.jar-section {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: rgba(123,111,205,0.07); border: 1px solid rgba(123,111,205,0.15);
  border-radius: 14px; padding: 20px 24px; margin-bottom: 28px; text-align: center;
}
.jar-section-text strong { color: var(--ink); font-size: 0.95rem; display: block; margin-bottom: 4px; }
.jar-section-text p { font-size: 0.78rem; color: var(--muted); margin: 0; }
.jar-wrap { margin: 8px 0 4px; }
.jar-lid {
  height: 10px; margin: 0 10px;
  background: rgba(160,130,70,0.1); border: 2px solid rgba(160,130,70,0.2);
  border-radius: 4px 4px 0 0;
}
.jar-neck {
  height: 14px; margin: 0 10px;
  border-left: 2px solid rgba(160,130,70,0.2); border-right: 2px solid rgba(160,130,70,0.2);
  background: rgba(255,248,230,0.08);
}
.jar-shoulder {
  height: 14px;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='14'><polygon points='10,0 90,0 100,14 0,14' fill='rgb(255,248,230)' fill-opacity='0.08'/><line x1='10' y1='0' x2='0' y2='14' stroke='rgb(160,130,70)' stroke-opacity='0.2' stroke-width='2'/><line x1='90' y1='0' x2='100' y2='14' stroke='rgb(160,130,70)' stroke-opacity='0.2' stroke-width='2'/></svg>");
  background-size: 100% 100%;
}
.jar-body {
  width: 100px; min-height: 120px;
  border: 2px solid rgba(160,130,70,0.2); border-top: none;
  border-radius: 0 0 22px 22px;
  background: rgba(255,248,230,0.08);
  box-sizing: border-box; position: relative; cursor: pointer;
  overflow: hidden; outline: none; -webkit-tap-highlight-color: transparent;
}
.jar-croissant { font-size: 1.1rem; line-height: 1; position: absolute; transform: rotate(var(--jar-r, 0deg)); }
.jar-croissant-new { animation: jar-new-glow 6s ease-out forwards; }
@keyframes jar-new-glow {
  0%,5% { filter:
    drop-shadow(0 0 2px #fff)
    drop-shadow(0 0 6px rgba(183,163,255,1))
    drop-shadow(0 0 14px rgba(123,111,205,1))
    drop-shadow(0 0 28px rgba(123,111,205,0.9))
    drop-shadow(0 0 48px rgba(123,111,205,0.7)); }
  40%  { filter:
    drop-shadow(0 0 2px #fff)
    drop-shadow(0 0 6px rgba(183,163,255,1))
    drop-shadow(0 0 14px rgba(123,111,205,1))
    drop-shadow(0 0 28px rgba(123,111,205,0.9))
    drop-shadow(0 0 48px rgba(123,111,205,0.7)); }
  80%  { filter: drop-shadow(0 0 6px rgba(123,111,205,0.4)); }
  100% { filter: none; }
}
.jar-count { font-size: 0.75rem; color: var(--muted); margin-bottom: 4px; }
.jar-btn {
  background: var(--warm); color: var(--ink);
  font-family: 'DM Sans', sans-serif; font-weight: 600; font-size: 0.85rem;
  padding: 10px 20px; border-radius: 30px; border: none; cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  touch-action: manipulation;
}
.jar-btn:hover:not(:disabled) { background: #B8B8F0; transform: translateY(-1px); }
.jar-btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.jar-msg { font-size: 0.78rem; color: var(--muted); }

/* ── PAGE LOADER ── */
#page-loader {
  position: fixed; inset: 0; z-index: 99999;
  background: var(--sand); display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; }
.page-loader-inner { text-align: center; }
.page-loader-croissant { font-size: 2.8rem; animation: loader-spin 1.2s ease-in-out infinite; }
.page-loader-text { margin-top: 14px; font-size: 0.82rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
@keyframes loader-spin {
  0%, 100% { transform: rotate(-15deg) scale(1); }
  50%       { transform: rotate(15deg) scale(1.15); }
}

/* ── ADMIN OVERLAY ── */
#admin-overlay {
  display:none; position:fixed; inset:0; background:rgba(10,8,30,0.92);
  backdrop-filter:blur(4px); z-index:2000; align-items:center; justify-content:center; padding:20px;
}
#admin-overlay.open { display:flex; }
.admin-panel {
  background:var(--card); border-radius:20px; width:100%; max-width:480px;
  max-height:92vh; overflow-y:auto; padding:30px; position:relative;
  animation:scaleIn 0.22s ease both;
}
@keyframes scaleIn { from{opacity:0;transform:scale(0.95)}to{opacity:1;transform:scale(1)} }
.admin-close {
  position:absolute; top:14px; right:14px; background:var(--warm); border:2px solid rgba(123,111,205,0.3);
  width:38px; height:38px; border-radius:50%; cursor:pointer; font-size:1.3rem; font-weight:700;
  display:flex; align-items:center; justify-content:center; transition:background 0.2s;
}
.admin-close:hover { background:#B8B8F0; }
.admin-title { font-family:'DM Sans',sans-serif; font-size:1.45rem; margin-bottom:5px; }
.admin-sub { color:var(--muted); font-size:0.82rem; margin-bottom:22px; }

/* ── FORM ── */
.field { margin-bottom:16px; }
label { display:block; font-size:0.73rem; font-weight:500; letter-spacing:0.1em; text-transform:uppercase; color:var(--muted); margin-bottom:5px; }
input[type="text"], input[type="password"], textarea {
  width:100%; background:var(--sand); border:1.5px solid var(--warm); border-radius:10px;
  padding:11px 13px; font-size:0.93rem; font-family:'DM Sans',sans-serif; color:var(--ink);
  outline:none; transition:border-color 0.2s; -webkit-appearance:none; appearance:none;
}
input:focus, textarea:focus { border-color:var(--terra); }
textarea { resize:vertical; min-height:80px; }
.coord-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.coord-hint { font-size:0.74rem; color:var(--muted); margin-top:6px; line-height:1.5; }

.location-autocomplete { position:relative; }
.suggestions-list {
  display:none; position:absolute; top:calc(100% + 4px); left:0; right:0;
  background:var(--card); border:1.5px solid var(--warm); border-radius:10px;
  list-style:none; margin:0; padding:4px 0; z-index:2100;
  box-shadow:0 4px 16px rgba(123,111,205,0.15); max-height:220px; overflow-y:auto;
}
.suggestions-list.open { display:block; }
.suggestions-list li {
  padding:9px 13px; font-size:0.88rem; cursor:pointer; line-height:1.35;
  border-bottom:1px solid rgba(123,111,205,0.08);
}
.suggestions-list li:last-child { border-bottom:none; }
.suggestions-list li:hover, .suggestions-list li.active { background:var(--warm); }
.suggestions-list li .sug-main { font-weight:500; }
.suggestions-list li .sug-sub { font-size:0.76rem; color:var(--muted); }

.photo-upload-area {
  border:2px dashed var(--warm); border-radius:10px; padding:20px;
  text-align:center; cursor:pointer; transition:all 0.2s; position:relative;
}
.photo-upload-area:hover { border-color:var(--terra); background:rgba(123,111,205,0.04); }
.photo-upload-area input { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; }
.upload-icon { font-size:1.6rem; margin-bottom:4px; }
.upload-text { font-size:0.81rem; color:var(--muted); }
#preview-img { width:100%; border-radius:8px; margin-top:10px; display:none; max-height:180px; object-fit:cover; }

/* ── CROISSANT ── */
.croissant-stepper { display:flex; align-items:center; gap:12px; }
.croissant-stepper button { width:32px; height:32px; border-radius:50%; border:1.5px solid var(--warm); background:var(--sand); color:var(--ink); font-size:1.2rem; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background 0.15s; }
.croissant-stepper button:hover { background:var(--warm); }
.croissant-stepper span { font-size:1.1rem; font-weight:600; min-width:24px; text-align:center; }
.checkin-croissants { font-size:0.85rem; color:var(--terra); font-weight:500; margin-bottom:10px; }
.history-croissants { font-size:0.75rem; color:var(--terra); font-weight:600; align-self:center; flex-shrink:0; white-space:nowrap; }
.post-croissants {
  display:inline-block; width:fit-content; font-size:0.82rem; font-weight:500;
  background:rgba(123,111,205,0.1); color:var(--terra);
  border:1.5px solid rgba(123,111,205,0.2); border-radius:20px;
  padding:5px 14px; margin-bottom:28px;
}
.popup-croissants { font-size:0.76rem; color:var(--terra); font-weight:500; margin:4px 0 8px; }
.post-croissants { margin-bottom:0; padding-top:10px; }

/* ── BUTTONS ── */
.btn-primary {
  width:100%; background:var(--terra); color:white; border:none; border-radius:10px;
  padding:13px; font-size:0.93rem; font-weight:500; font-family:'DM Sans',sans-serif;
  cursor:pointer; transition:all 0.2s; letter-spacing:0.02em;
}
.btn-primary:hover { background:#6A5DB8; transform:translateY(-1px); }
.btn-primary:disabled { opacity:0.6; cursor:default; transform:none; }
.login-section { margin-bottom:0; }
#post-status { margin-top:10px; font-size:0.82rem; text-align:center; min-height:18px; }
.status-ok { color:var(--sage); }
.status-err { color:#c0392b; }

/* ── LEAFLET POPUP ── */
.leaflet-popup-content-wrapper { border-radius:12px; font-family:'DM Sans',sans-serif; box-shadow:0 4px 20px rgba(0,0,0,0.15); transition:box-shadow 0.15s, border-color 0.15s; border:1.5px solid transparent; }
.leaflet-popup-close-button {
  width:26px !important; height:26px !important;
  font-size:18px !important; line-height:26px !important; text-align:center !important;
  top:6px !important; right:6px !important; padding:0 !important; z-index:10 !important;
  background:white !important; border-radius:50% !important;
}
.popup-card { min-width:160px; cursor:pointer; }
.leaflet-popup:has(.popup-card:hover) .leaflet-popup-content-wrapper { border-color:var(--terra); box-shadow:0 4px 20px rgba(123,111,205,0.35); }
.leaflet-popup-content { margin:12px 14px; }
.popup-img { width:100%; max-height:140px; object-fit:cover; border-radius:6px; margin-bottom:7px; display:block; }

#lightbox {
  display:none; position:fixed; inset:0; background:rgba(10,8,30,0.92);
  z-index:3000; align-items:flex-start; justify-content:center; padding:80px 20px 20px;
  cursor:pointer; overflow-y:auto;
}
#lightbox.open { display:flex; }
#lightbox-post {
  background:var(--card); border-radius:20px; width:100%; max-width:520px;
  cursor:default;
  box-shadow:0 20px 60px rgba(0,0,0,0.5);
  animation:scaleIn 0.22s ease both;
}
#lightbox-img {
  width:100%; max-height:70vh; object-fit:contain; display:block;
  border-radius:20px 20px 0 0; background:#1a1a1a;
}
.lightbox-body { padding:24px 28px 28px; }
.lightbox-meta { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.lightbox-location { font-size:1.35rem; font-weight:700; letter-spacing:-0.01em; }
.lightbox-caption { font-size:0.97rem; line-height:1.65; color:#3D3B6B; margin-bottom:16px; }
.lightbox-time { display:flex; justify-content:space-between; align-items:center; font-size:0.74rem; color:var(--muted); letter-spacing:0.06em; text-transform:uppercase; margin-top:16px; padding-top:14px; border-top:1px solid var(--warm); }
.lightbox-time .lightbox-croissant-inline { color:var(--terra); font-weight:500; white-space:nowrap; }
#lightbox-close {
  position:fixed; top:16px; right:20px; z-index:1; background:rgba(204,204,255,0.15);
  border:2px solid rgba(204,204,255,0.5); color:var(--warm);
  width:46px; height:46px; border-radius:50%; font-size:1.5rem; font-weight:700;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:background 0.2s;
}
#lightbox-close:hover { background:rgba(204,204,255,0.25); }
.popup-loc { font-weight:600; font-size:0.88rem; margin-bottom:3px; }
.popup-city { font-weight:400; font-size:0.76rem; color:#777; }
.popup-cap { font-size:0.76rem; color:#555; line-height:1.4; margin-bottom:3px; }
.popup-time { font-size:0.68rem; color:#999; }

/* ── FLIP COUNTDOWN ── */
.intro-countdown { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--warm); text-align: center; }
.countdown-back-text { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.countdown-wrap { display:flex; justify-content:center; align-items:flex-start; gap:6px; flex-wrap:wrap; }
.flip-unit { display:flex; flex-direction:column; align-items:center; gap:6px; }
.flip-sep { font-family:'DM Sans',sans-serif; font-size:2rem; font-weight:700; color:var(--terra); line-height:74px; margin-bottom:22px; }
.flip-label { font-size:0.6rem; letter-spacing:0.16em; text-transform:uppercase; color:var(--muted); font-weight:500; }

.flip-card { position:relative; width:62px; height:74px; border-radius:8px; perspective:300px; }

.flip-upper {
  position:absolute; top:0; left:0; right:0; height:37px;
  overflow:hidden; background:var(--ink); border-radius:8px 8px 0 0;
  border-bottom:1.5px solid rgba(0,0,0,0.35); z-index:1;
}
.flip-upper span {
  display:block; text-align:center; font-family:'DM Sans',sans-serif;
  font-size:2.8rem; font-weight:700; color:var(--warm); line-height:74px;
}
.flip-lower {
  position:absolute; bottom:0; left:0; right:0; height:37px;
  overflow:hidden; background:#28255C; border-radius:0 0 8px 8px; z-index:1;
}
.flip-lower span {
  display:block; text-align:center; font-family:'DM Sans',sans-serif;
  font-size:2.8rem; font-weight:700; color:rgba(204,204,255,0.75); line-height:74px;
  transform:translateY(-37px);
}
.flip-fold-top {
  position:absolute; top:0; left:0; right:0; height:37px;
  overflow:hidden; background:var(--ink); border-radius:8px 8px 0 0;
  border-bottom:1.5px solid rgba(0,0,0,0.35); z-index:2;
  transform-origin:bottom center;
}
.flip-fold-top span {
  display:block; text-align:center; font-family:'DM Sans',sans-serif;
  font-size:2.8rem; font-weight:700; color:var(--warm); line-height:74px;
}
.flip-fold-top.go { animation:foldTop 0.28s ease-in forwards; }
@keyframes foldTop { from{transform:rotateX(0deg)} to{transform:rotateX(-90deg)} }

.flip-fold-bot {
  position:absolute; bottom:0; left:0; right:0; height:37px;
  overflow:hidden; background:#28255C; border-radius:0 0 8px 8px; z-index:2;
  transform-origin:top center; transform:rotateX(90deg);
}
.flip-fold-bot span {
  display:block; text-align:center; font-family:'DM Sans',sans-serif;
  font-size:2.8rem; font-weight:700; color:rgba(204,204,255,0.75); line-height:74px;
  transform:translateY(-37px);
}
.flip-fold-bot.go { animation:unfoldBot 0.28s ease-out 0.28s forwards; }
@keyframes unfoldBot { from{transform:rotateX(90deg)} to{transform:rotateX(0deg)} }

/* ── MAP MARKER PULSE ── */
@keyframes mpulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(123,111,205,0.5), 0 2px 6px rgba(0,0,0,0.3); }
  70%      { box-shadow: 0 0 0 16px rgba(123,111,205,0), 0 2px 6px rgba(0,0,0,0.3); }
}

/* ── CROISSANT RAIN ── */
@keyframes croissant-fall {
  0%   { transform: translateY(-120px) rotate(0deg); opacity: 1; }
  75%  { opacity: 1; }
  100% { transform: translateY(105vh) rotate(540deg); opacity: 0; }
}
.croissant-rain-item {
  position: fixed;
  top: 0;
  pointer-events: none;
  z-index: 9999;
  user-select: none;
  animation: croissant-fall linear both;
  will-change: transform, opacity;
}
#bouncing-croissant {
  position: fixed;
  pointer-events: auto;
  z-index: 9998;
  font-size: 2.8rem;
  user-select: none;
  will-change: transform;
  cursor: pointer;
  padding: 8px;
}

/* ── CROISSANT POPUP ── */
#motion-popup {
  display: none;
  position: fixed; inset: 0; z-index: 10001;
  align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,0.45);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
#motion-popup.visible { display: flex; }
.motion-popup-inner {
  background: var(--sand);
  border-radius: 20px 20px 0 0;
  padding: 28px 24px 36px;
  width: 100%; max-width: 480px;
  text-align: center;
}
body.night .motion-popup-inner { background: #1E1B4B; }
.motion-popup-icon { font-size: 2rem; margin-bottom: 10px; }
.motion-popup-title { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.motion-popup-body { font-size: 0.88rem; color: var(--muted); line-height: 1.5; margin-bottom: 22px; }
.motion-popup-actions { display: flex; flex-direction: column; gap: 10px; }
.motion-popup-enable {
  background: #7B6FCD; color: #fff;
  border: none; border-radius: 12px;
  padding: 14px; font-size: 1rem; font-weight: 600;
  font-family: 'DM Sans', sans-serif; cursor: pointer;
}
.motion-popup-skip {
  background: none; border: none;
  color: var(--muted); font-size: 0.9rem;
  font-family: 'DM Sans', sans-serif; cursor: pointer; padding: 4px;
}

#croissant-popup {
  display:none; position:fixed; inset:0; background:rgba(10,8,30,0.92);
  z-index:10001; align-items:flex-start; justify-content:center; padding:80px 20px 20px;
  cursor:pointer; overflow-y:auto;
}
#croissant-popup.open { display:flex; }
#croissant-popup-inner {
  background:var(--card); border-radius:20px; width:100%; max-width:520px;
  max-height:88vh; overflow-y:auto; cursor:default;
  box-shadow:0 20px 60px rgba(0,0,0,0.5);
  animation:scaleIn 0.22s ease both;
}
#croissant-popup-hero {
  width:100%; aspect-ratio:16/9;
  background:linear-gradient(135deg, var(--warm) 0%, #B8B8F0 60%, #C8B8F8 100%);
  display:flex; align-items:center; justify-content:center;
  font-size:5rem; border-radius:20px 20px 0 0;
}
#croissant-popup-body { padding:24px 28px 28px; }
#croissant-popup-msg {
  font-family:'Playfair Display',serif; font-style:italic;
  font-size:1.1rem; line-height:1.7; color:#3D3B6B;
}
#croissant-popup-close {
  position:fixed; top:16px; right:20px; z-index:1; background:rgba(204,204,255,0.15);
  border:2px solid rgba(204,204,255,0.5); color:var(--warm);
  width:46px; height:46px; border-radius:50%; font-size:1.5rem; font-weight:700;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:background 0.2s;
}
#croissant-popup-close:hover { background:rgba(204,204,255,0.25); }

/* ── GOD MODE ── */
@keyframes god-rainbow-btn {
  0%   { border-color: #ff4466; box-shadow: 0 0 10px #ff446688, 0 0 22px #ff446644; color: #ff4466; }
  16%  { border-color: #ff8800; box-shadow: 0 0 10px #ff880088, 0 0 22px #ff880044; color: #ff8800; }
  33%  { border-color: #ffcc00; box-shadow: 0 0 10px #ffcc0088, 0 0 22px #ffcc0044; color: #ffcc00; }
  50%  { border-color: #00dd88; box-shadow: 0 0 10px #00dd8888, 0 0 22px #00dd8844; color: #00dd88; }
  66%  { border-color: #00aaff; box-shadow: 0 0 10px #00aaff88, 0 0 22px #00aaff44; color: #00aaff; }
  83%  { border-color: #cc44ff; box-shadow: 0 0 10px #cc44ff88, 0 0 22px #cc44ff44; color: #cc44ff; }
  100% { border-color: #ff4466; box-shadow: 0 0 10px #ff446688, 0 0 22px #ff446644; color: #ff4466; }
}
@keyframes god-rainbow-jar {
  0%   { box-shadow: 0 0 10px #ff4466, 0 0 22px #ff446644; border-color: rgba(255,68,102,0.6); }
  16%  { box-shadow: 0 0 10px #ff8800, 0 0 22px #ff880044; border-color: rgba(255,136,0,0.6); }
  33%  { box-shadow: 0 0 10px #ffcc00, 0 0 22px #ffcc0044; border-color: rgba(255,204,0,0.6); }
  50%  { box-shadow: 0 0 10px #00dd88, 0 0 22px #00dd8844; border-color: rgba(0,221,136,0.6); }
  66%  { box-shadow: 0 0 10px #00aaff, 0 0 22px #00aaff44; border-color: rgba(0,170,255,0.6); }
  83%  { box-shadow: 0 0 10px #cc44ff, 0 0 22px #cc44ff44; border-color: rgba(204,68,255,0.6); }
  100% { box-shadow: 0 0 10px #ff4466, 0 0 22px #ff446644; border-color: rgba(255,68,102,0.6); }
}
.god-mode-btn {
  background: none; border: 1.5px solid rgba(123,111,205,0.18); color: rgba(123,111,205,0.35);
  font-size: 0.67rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 20px; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: color 0.2s, border-color 0.2s;
  margin-top: 2px;
}
.god-mode-btn:hover { color: var(--muted); border-color: rgba(123,111,205,0.4); }
.god-mode-btn.active { animation: god-rainbow-btn 2s linear infinite; font-weight: 600; background: rgba(255,255,255,0.04); }
.jar-body.god-mode { animation: god-rainbow-jar 2s linear infinite; }

/* ── NIGHT MODE ── */
body { transition: background-color 1.5s ease; }
body.night { background: #13112E; }
body.night .intro-card { background: #1E1B4B; border-color: rgba(204,204,255,0.12); }
body.night .intro-card p { color: rgba(220,220,255,0.85); }
body.night .intro-card strong { color: #8888CC; }
body.night .section-label { color: rgba(204,204,255,0.4); }
body.night #checkin-card { background: #1E1B4B; }
body.night .pin-dot { border-color: #3D2F8F; }
body.night .checkin-location { color: rgba(220,220,255,0.95); }
body.night .checkin-caption { color: rgba(204,204,255,0.72); }
body.night .checkin-footer { border-top-color: rgba(204,204,255,0.1); }
body.night .history-item:hover { background: rgba(204,204,255,0.07); }
body.night .history-loc { color: rgba(220,220,255,0.9); }
body.night .history-cap,
body.night .history-time { color: rgba(204,204,255,0.5); }
body.night #loading { color: rgba(204,204,255,0.5); }
body.night .loader { border-color: rgba(204,204,255,0.15); border-top-color: var(--terra); }
body.night .empty-title { color: rgba(220,220,255,0.9); }
body.night .empty-sub { color: rgba(204,204,255,0.5); }
body.night header { background: var(--ink); color: var(--sand); }
body.night header .intro-countdown { background: rgba(204,204,255,0.08); border-color: rgba(204,204,255,0.2); }
body.night header .countdown-back-text { color: rgba(204,204,255,0.85); }
body.night header .flip-sep { color: rgba(204,204,255,0.4); }
body.night header .flip-label { color: rgba(204,204,255,0.4); }
body.night .header-title em { color: var(--warm); }
body.night .header-sub { color: rgba(204,204,255,0.7); }
body.night #paris-time { color: rgba(204,204,255,0.72); background: rgba(204,204,255,0.09); border-color: rgba(204,204,255,0.18); }
body.night footer { background: var(--ink); color: rgba(204,204,255,0.6); }
body.night footer strong { color: rgba(204,204,255,0.9); }
body.night .footer-divider { border-top-color: rgba(204,204,255,0.25); }
body.night footer a { color: var(--warm); }
body.night .coffee-box { background: rgba(204,204,255,0.08); border-color: rgba(204,204,255,0.2); }
body.night .coffee-text strong { color: rgba(204,204,255,0.95); }
body.night .coffee-text p { color: rgba(204,204,255,0.55); }
body.night .admin-btn { border-color: rgba(204,204,255,0.3); color: rgba(204,204,255,0.6); }
body.night .admin-btn:hover { border-color: var(--warm); color: var(--warm); }
body.night .coffee-btn { color: var(--ink); }

/* ── NIGHT MODE: FULL-SCREEN POPUPS ── */
body.night .admin-panel { background: #2D2A5E; color: rgba(220,220,255,0.9); }
body.night .admin-panel label { color: rgba(204,204,255,0.5); }
body.night .admin-panel input[type="text"],
body.night .admin-panel input[type="password"],
body.night .admin-panel textarea { background: #1E1B4B; border-color: rgba(204,204,255,0.15); color: rgba(220,220,255,0.9); }
body.night .admin-panel input::placeholder,
body.night .admin-panel textarea::placeholder { color: rgba(204,204,255,0.3); }
body.night .admin-close { background: rgba(204,204,255,0.1); border-color: rgba(204,204,255,0.2); color: rgba(204,204,255,0.7); }
body.night .admin-title { color: rgba(220,220,255,0.95); }
body.night .admin-sub { color: rgba(204,204,255,0.45); }
body.night #lightbox-post { background: #1E1B4B; }
body.night .lightbox-location { color: rgba(220,220,255,0.95); }
body.night .lightbox-caption { color: rgba(204,204,255,0.72); }
body.night .lightbox-time { color: rgba(204,204,255,0.5); border-top-color: rgba(204,204,255,0.1); }
body.night #croissant-popup-inner { background: #1E1B4B; }
body.night #croissant-popup-msg { color: rgba(204,204,255,0.8); }
body.night #map-scroll-btn { background: #2D2A5E; border-color: rgba(204,204,255,0.2); }
body.night #map-scroll-btn::after { border-color: rgba(204,204,255,0.8); }
body.night .leaflet-popup-content-wrapper { background: #2D2A5E; box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
body.night .leaflet-popup-tip { background: #2D2A5E; }
body.night .leaflet-popup-close-button { background: #1E1B4B !important; color: rgba(204,204,255,0.7) !important; }
body.night .popup-loc { color: rgba(220,220,255,0.95); }
body.night .popup-city { color: rgba(204,204,255,0.55); }
body.night .popup-cap { color: rgba(204,204,255,0.6); }
body.night .popup-time { color: rgba(204,204,255,0.4); }
