/* ============================================================
   FONTS & VARIABLES
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Pinyon+Script&family=Cormorant:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Montserrat:wght@300;400;500;600&display=swap');

:root {
  --font-script: "Pinyon Script", cursive;
  --font-serif:  'Cormorant', serif;
  --font-sans:   'Montserrat', sans-serif;

  --olive-dark:        #3a4634;
  --olive-medium-dark: #616c50;
  --olive:             #88936c;
  --olive-medium:      #a1a08b;
  --olive-light:       #b9b9a6;
  --olive-pale:        #d1d2c1;

  --cream:       #f5f2eb;
  --cream-dark:  #e8e3d6;
  --paper-color: #ffffff;
  --white:       #f8f7f3;
  --white-light: #fefefe;
  --text-dark:   #2c2c2c;
  --text-muted:  #5a5a5a;

  --bg:           var(--white);
  --bg-card:      var(--paper-color);
  --bg-header:    var(--olive-dark);
  --bg-input:     var(--cream);
  --border:       var(--cream-dark);
  --text-primary: var(--text-dark);
  --text-second:  var(--text-muted);
  --accent:       var(--olive-medium-dark);
  --accent-light: var(--olive-pale);
  --btn-bg:       var(--olive-dark);
  --btn-text:     var(--cream);
  --shadow:       rgba(58,70,52,.12);
}

[data-theme="dark"] {
  --bg:           #1e2118;
  --bg-card:      #272c22;
  --bg-header:    #141710;
  --bg-input:     #1a1e16;
  --border:       #363d2e;
  --text-primary: #e8e4da;
  --text-second:  #9a9a88;
  --accent:       var(--olive);
  --accent-light: #3a4030;
  --btn-bg:       var(--olive-medium-dark);
  --btn-text:     var(--cream);
  --shadow:       rgba(0,0,0,.35);
  --paper-color:  #272c22;
  --white:        #c9a96e;
  --white-light:  #b8975c;
}

/* ============================================================
   RESET
============================================================ */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}
img, video { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-sans); border: none; background: none; }
input, textarea { font-family: var(--font-sans); }

/* ============================================================
   LOADING OVERLAY
============================================================ */
#loading-overlay {
  position: fixed; inset: 0; background: var(--olive-dark);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 9999; transition: opacity .5s;
}
#loading-overlay .lo-title {
  font-family: var(--font-script); color: var(--white-light); font-size: 3.5rem;
  animation: fadeUp .8s ease both;
}
#loading-overlay .lo-date {
  font-family: var(--font-serif); color: var(--olive-pale); font-size: 1.1rem;
  letter-spacing: .2em; text-transform: uppercase; margin-top: .5rem;
  animation: fadeUp .8s .2s ease both;
}
#loading-overlay .lo-dots {
  margin-top: 2rem; display: flex; gap: .5rem;
  animation: fadeUp .8s .4s ease both;
}
#loading-overlay .lo-dots span {
  width: 8px; height: 8px; border-radius: 50%; background: var(--white-light);
  animation: bounce 1.2s infinite;
}
#loading-overlay .lo-dots span:nth-child(2) { animation-delay: .2s; }
#loading-overlay .lo-dots span:nth-child(3) { animation-delay: .4s; }

/* ============================================================
   REGISTER MODAL
============================================================ */
#register-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 8888; padding: 1.5rem;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
#register-modal.visible { opacity: 1; pointer-events: all; }
.rm-card {
  background: var(--bg-card); border-radius: 1.5rem; padding: 2.5rem 2rem;
  max-width: 380px; width: 100%; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: scaleIn .4s ease;
}
.rm-card .rm-couple {
  font-family: var(--font-script); color: var(--white); font-size: 2.8rem; line-height: 1.1;
}
.rm-card .rm-subtitle {
  font-family: var(--font-serif); color: var(--text-second); font-size: 1rem;
  margin: .3rem 0 1.8rem;
}
.rm-card .rm-label {
  font-size: .7rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--text-second); margin-bottom: .6rem; display: block;
}
.rm-card input {
  width: 100%; padding: .9rem 1.1rem; border-radius: .75rem;
  border: 1.5px solid var(--border); background: var(--bg-input);
  color: var(--text-primary); font-size: 1.05rem; text-align: center;
  outline: none; transition: border-color .2s;
}
.rm-card input:focus { border-color: var(--olive); }
.rm-card .btn-primary {
  margin-top: 1.2rem; width: 100%; padding: .9rem; border-radius: .75rem;
  background: var(--btn-bg); color: var(--btn-text); font-size: .85rem;
  letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
  transition: opacity .2s, transform .1s;
}
.rm-card .btn-primary:hover  { opacity: .85; }
.rm-card .btn-primary:active { transform: scale(.98); }
.rm-floral { font-size: 1.5rem; margin: .5rem 0; opacity: .4; }

/* ============================================================
   HEADER
============================================================ */
#header {
  position: sticky; top: 0; z-index: 500;
  background: var(--bg-header);
  padding: env(safe-area-inset-top, 0) 0 0;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem 1rem;
}
.header-brand { flex: 1; min-width: 0; }
.header-couple {
  font-family: var(--font-script); color: var(--white-light);
  font-size: 1.6rem; line-height: 1; white-space: nowrap;
}
.header-date {
  font-family: var(--font-serif); color: var(--olive-pale);
  font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; margin-top: .1rem;
}
.header-actions { display: flex; gap: .5rem; align-items: center; }
.btn-icon {
  width: 38px; height: 38px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); color: var(--olive-pale);
  font-size: 1.05rem; transition: background .2s;
}
.btn-icon:hover { background: rgba(255,255,255,.15); }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--olive-medium-dark); color: var(--cream);
  font-size: .75rem; font-weight: 600; display: flex; align-items: center;
  justify-content: center; border: 2px solid var(--white-light); flex-shrink: 0;
  cursor: pointer;
}

/* NAV TABS */
.nav-tabs { display: flex; border-top: 1px solid rgba(255,255,255,.08); }
.nav-tab {
  flex: 1; text-align: center; padding: .65rem .5rem; font-size: .68rem;
  letter-spacing: .12em; text-transform: uppercase; font-weight: 500;
  color: var(--olive-pale); opacity: .6; transition: opacity .2s, border-color .2s;
  border-bottom: 2px solid transparent; cursor: pointer;
}
.nav-tab.active { opacity: 1; border-bottom-color: var(--white); color: var(--white-light); }

/* ============================================================
   MAIN CONTENT
============================================================ */
#main { padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0)); }

.section { display: none; }
.section.active { display: block; }

/* ── WALL ── */
.wall-controls {
  display: flex; align-items: center; justify-content: space-between;
  padding: .8rem 1rem .4rem;
}
.sort-toggle {
  display: flex; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 2rem; padding: 2px; gap: 2px;
}
.sort-btn {
  padding: .35rem .75rem; border-radius: 2rem; font-size: .65rem;
  letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
  color: var(--text-second); transition: background .2s, color .2s;
}
.sort-btn.active { background: var(--accent); color: var(--cream); }

/* ── INLINE COMPOSER ── */
.inline-composer {
  margin: 0 .75rem .6rem;
  background: var(--bg-card); border-radius: 1rem;
  border: 1px solid var(--border); box-shadow: 0 2px 8px var(--shadow);
  overflow: hidden;
}
.composer-prompt {
  display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem;
  cursor: pointer;
}
.composer-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--olive-medium-dark); color: var(--cream);
  font-size: .75rem; font-weight: 600; display: flex; align-items: center;
  justify-content: center;
}
.composer-placeholder {
  flex: 1; font-size: .85rem; color: var(--text-second);
  font-family: var(--font-serif); font-style: italic;
}
.composer-actions {
  display: flex; gap: 0; border-top: 1px solid var(--border);
}
.composer-action-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .65rem .5rem; font-size: .68rem; letter-spacing: .08em;
  text-transform: uppercase; font-weight: 600; color: var(--text-second);
  transition: background .15s; border-right: 1px solid var(--border);
}
.composer-action-btn:last-child { border-right: none; }
.composer-action-btn:hover { background: var(--accent-light); color: var(--text-primary); }
.composer-action-btn:active { background: var(--accent-light); }

/* ── NEW POSTS BADGE ── */
.new-posts-banner {
  display: none; position: sticky; top: 0; z-index: 300;
  margin: 0 .75rem .5rem; padding: .6rem 1rem;
  background: var(--olive-medium-dark); color: var(--cream);
  border-radius: .75rem; text-align: center; cursor: pointer;
  font-size: .75rem; font-weight: 600; letter-spacing: .06em;
  box-shadow: 0 4px 16px rgba(58,70,52,.35);
  animation: fadeUp .3s ease;
}
.new-posts-banner.visible { display: block; }

/* ── FEED ── */
.feed { padding: 0 .75rem; display: flex; flex-direction: column; gap: .75rem; }

.post-card {
  background: var(--bg-card); border-radius: 1rem;
  box-shadow: 0 2px 12px var(--shadow); overflow: hidden;
  animation: fadeUp .35s ease;
  border: 1px solid var(--border);
}
.post-card.post-new { animation: fadeIn .5s ease; }
.post-header {
  display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem .5rem;
}
.post-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--olive-medium-dark); color: var(--cream);
  font-size: .75rem; font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.post-meta { flex: 1; min-width: 0; }
.post-author { font-size: .8rem; font-weight: 600; color: var(--text-primary); }
.post-time { font-size: .65rem; color: var(--text-second); margin-top: .1rem; }
.post-more { color: var(--text-second); font-size: 1.2rem; padding: .3rem; }

.post-text {
  font-family: var(--font-serif); font-size: 1rem; line-height: 1.65;
  color: var(--text-primary); padding: .4rem 1rem .8rem;
}
.post-media { width: 100%; cursor: pointer; max-height: 500px; object-fit: cover; }
.post-video  { width: 100%; max-height: 500px; background: #000; }

.post-reactions-bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .6rem 1rem; border-top: 1px solid var(--border); flex-wrap: wrap;
}
.reaction-btn {
  display: flex; align-items: center; gap: .25rem;
  padding: .3rem .65rem; border-radius: 2rem;
  background: var(--accent-light); font-size: .8rem;
  border: 1.5px solid transparent; transition: border-color .15s, background .15s;
  color: var(--text-primary);
}
.reaction-btn.mine { border-color: var(--white); background: rgba(184,151,92,.15); }
.reaction-btn .r-count { font-size: .7rem; font-weight: 600; }
.comment-count-btn {
  margin-left: auto; font-size: .7rem; color: var(--text-second);
  display: flex; align-items: center; gap: .3rem;
}

/* ── COMMENTS ── */
.comments-section {
  border-top: 1px solid var(--border); padding: .6rem .8rem; display: none;
}
.comments-section.open { display: block; }
.comment-item {
  display: flex; gap: .6rem; margin-bottom: .7rem; animation: fadeUp .25s ease;
}
.comment-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--olive-light); color: var(--olive-dark);
  font-size: .6rem; font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.comment-bubble {
  flex: 1; background: var(--bg); border-radius: .75rem;
  padding: .5rem .75rem; font-size: .8rem; line-height: 1.5;
}
.comment-bubble .c-author { font-weight: 600; font-size: .72rem; color: var(--accent); }
.comment-input-row { display: flex; gap: .5rem; margin-top: .5rem; align-items: center; }
.comment-input-row input {
  flex: 1; padding: .55rem .85rem; border-radius: 2rem;
  border: 1.5px solid var(--border); background: var(--bg-input);
  font-size: .82rem; color: var(--text-primary); outline: none; transition: border-color .2s;
}
.comment-input-row input:focus { border-color: var(--olive); }
.comment-input-row button {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--btn-bg); color: var(--btn-text);
  font-size: 1rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ── FAB (secondary, visible when scrolled) ── */
#fab {
  position: fixed; bottom: calc(1.5rem + env(safe-area-inset-bottom,0));
  right: 1.2rem; z-index: 400;
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--olive-medium-dark), var(--olive-dark));
  color: var(--cream); font-size: 1.4rem;
  box-shadow: 0 4px 20px rgba(58,70,52,.4);
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s, opacity .3s;
  opacity: 0; pointer-events: none;
}
#fab.visible { opacity: 1; pointer-events: all; }
#fab.tab-hidden { display: none !important; }
#fab:active { transform: scale(.92); }

/* ── POST MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(5px);
  z-index: 700; display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.modal-overlay.visible { opacity: 1; pointer-events: all; }
.modal-sheet {
  background: var(--bg-card); border-radius: 1.5rem 1.5rem 0 0;
  width: 100%; max-width: 600px; max-height: 92dvh; overflow-y: auto;
  padding: 1.5rem 1.2rem calc(1.5rem + env(safe-area-inset-bottom,0));
  transform: translateY(40px); transition: transform .3s;
}
.modal-overlay.visible .modal-sheet { transform: translateY(0); }
.modal-handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: var(--olive-pale); margin: -.5rem auto 1.2rem;
}
.modal-title {
  font-family: var(--font-serif); font-size: 1.4rem; font-weight: 400;
  color: var(--text-primary); margin-bottom: 1.2rem; text-align: center;
}
.type-tabs {
  display: flex; gap: .5rem; margin-bottom: 1.1rem; justify-content: center;
}
.type-tab {
  padding: .45rem 1.1rem; border-radius: 2rem; font-size: .7rem;
  letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
  border: 1.5px solid var(--border); color: var(--text-second); transition: all .2s;
}
.type-tab.active { background: var(--olive-dark); color: var(--cream); border-color: transparent; }
.section-tabs {
  display: flex; gap: .5rem; margin-bottom: 1rem; justify-content: center;
}
.section-tab {
  padding: .35rem .9rem; border-radius: 2rem; font-size: .65rem;
  letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
  border: 1.5px solid var(--border); color: var(--text-second); transition: all .2s;
}
.section-tab.active { background: var(--white); color: #fff; border-color: transparent; }

.media-zone {
  border: 2px dashed var(--border); border-radius: 1rem;
  min-height: 120px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: .5rem;
  color: var(--text-second); font-size: .8rem; cursor: pointer;
  transition: border-color .2s; margin-bottom: 1rem; position: relative; overflow: hidden;
}
.media-zone:hover { border-color: var(--olive); }
.media-zone img, .media-zone video { max-height: 260px; border-radius: .8rem; }
.media-zone input[type=file] { display: none; }
.media-icon { font-size: 2rem; opacity: .5; }

.post-textarea {
  width: 100%; min-height: 100px; padding: .85rem 1rem; border-radius: .85rem;
  border: 1.5px solid var(--border); background: var(--bg-input);
  color: var(--text-primary); font-size: .95rem; font-family: var(--font-serif);
  line-height: 1.6; resize: none; outline: none; transition: border-color .2s;
  margin-bottom: 1rem;
}
.post-textarea:focus { border-color: var(--olive); }

.btn-submit {
  width: 100%; padding: .9rem; border-radius: .85rem;
  background: linear-gradient(135deg, var(--olive-medium-dark), var(--olive-dark));
  color: var(--cream); font-size: .82rem; letter-spacing: .12em;
  text-transform: uppercase; font-weight: 600; transition: opacity .2s;
}
.btn-submit:hover    { opacity: .85; }
.btn-submit:disabled { opacity: .5; cursor: not-allowed; }

/* ── GUESTBOOK ── */
#section-guestbook { background: var(--bg); }
.guestbook-header {
  text-align: center; padding: 2rem 1.2rem 1rem;
  background: linear-gradient(to bottom, var(--olive-dark), transparent);
}
.guestbook-title { font-family: var(--font-script); color: var(--white-light); font-size: 3rem; }
.guestbook-subtitle {
  font-family: var(--font-serif); color: var(--olive-pale); font-size: .9rem;
  letter-spacing: .15em; text-transform: uppercase; margin-top: .3rem;
}

/* Guestbook inline composer */
.guestbook-composer {
  margin: 0 .75rem .75rem;
  background: var(--bg-card); border-radius: 1rem;
  border: 1px solid var(--border); box-shadow: 0 2px 8px var(--shadow);
  padding: 1rem;
}
.guestbook-composer-label {
  font-size: .65rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--text-second); margin-bottom: .6rem; display: block;
}
.guestbook-composer textarea {
  width: 100%; min-height: 80px; padding: .75rem .9rem; border-radius: .75rem;
  border: 1.5px solid var(--border); background: var(--bg-input);
  color: var(--text-primary); font-size: .95rem; font-family: var(--font-serif);
  line-height: 1.6; resize: none; outline: none; transition: border-color .2s; margin-bottom: .75rem;
}
.guestbook-composer textarea:focus { border-color: var(--olive); }
.guestbook-composer button {
  width: 100%; padding: .75rem; border-radius: .75rem;
  background: linear-gradient(135deg, var(--olive-medium-dark), var(--olive-dark));
  color: var(--cream); font-size: .75rem; letter-spacing: .12em;
  text-transform: uppercase; font-weight: 600; transition: opacity .2s;
}
.guestbook-composer button:disabled { opacity: .5; cursor: not-allowed; }

.guestbook-feed { padding: 0 .75rem; display: flex; flex-direction: column; gap: 1.2rem; }
.guestbook-card {
  background: var(--bg-card); border-radius: 1.2rem; padding: 1.5rem 1.2rem;
  border-left: 4px solid var(--white); box-shadow: 0 4px 20px var(--shadow);
  position: relative; animation: fadeUp .35s ease;
}
.guestbook-card::before {
  content: '\201C'; font-family: var(--font-serif); font-size: 4rem;
  color: var(--white); opacity: .25; position: absolute; top: -.5rem; left: .8rem;
  line-height: 1;
}
.guestbook-text {
  font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.7;
  color: var(--text-primary); font-style: italic; margin-bottom: .8rem;
}
.guestbook-author {
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--white); font-weight: 600;
}
.guestbook-date { font-size: .65rem; color: var(--text-second); margin-top: .2rem; }
.guestbook-reactions { display: flex; gap: .4rem; margin-top: .8rem; flex-wrap: wrap; }

/* ── PHOTOBOOTH ── */
#section-photobooth { padding: 1rem; }
.pb-title {
  font-family: var(--font-script); color: var(--white); font-size: 2.2rem;
  text-align: center; margin-bottom: .2rem;
}
.pb-subtitle {
  font-family: var(--font-serif); text-align: center; color: var(--text-second);
  font-size: .85rem; margin-bottom: 1.2rem;
}
.pb-canvas-wrap {
  position: relative; border-radius: 1rem; overflow: hidden;
  box-shadow: 0 8px 30px var(--shadow); margin-bottom: 1rem;
}
#pb-canvas { width: 100%; display: block; }

/* Frame grid — wraps on mobile, no scroll needed */
.pb-frames {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: 1rem; justify-content: center;
}
.pb-frame-btn {
  flex: 0 1 calc(33.333% - .4rem); min-width: 88px; max-width: 140px;
  padding: .55rem .5rem; border-radius: .65rem; text-align: center;
  border: 1.5px solid var(--border); font-size: .7rem;
  letter-spacing: .06em; text-transform: uppercase; font-weight: 600;
  color: var(--text-second); white-space: nowrap; transition: all .2s;
}
.pb-frame-btn.active { background: var(--olive-dark); color: var(--cream); border-color: transparent; }

.pb-actions { display: flex; flex-direction: column; gap: .7rem; }
.pb-btn {
  padding: .85rem; border-radius: .85rem; font-size: .8rem;
  letter-spacing: .1em; text-transform: uppercase; font-weight: 600; transition: opacity .2s;
}
.pb-btn-cam  { background: var(--olive-dark); color: var(--cream); }
.pb-btn-up   { background: var(--bg-card); color: var(--text-primary); border: 1.5px solid var(--border); }
.pb-btn-dl   { background: var(--white); color: #fff; }
.pb-btn-post { background: linear-gradient(135deg, var(--olive-medium-dark), var(--olive-dark)); color: var(--cream); }
.pb-btn:disabled { opacity: .4; cursor: not-allowed; }
#pb-file-input { display: none; }

/* ── LIGHTBOX ── */
#lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 900;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
#lightbox.visible { opacity: 1; pointer-events: all; }
#lightbox-media { max-width: 95vw; max-height: 90dvh; border-radius: .5rem; }
#lightbox-close {
  position: absolute; top: 1rem; right: 1rem;
  color: #fff; font-size: 1.8rem; background: rgba(0,0,0,.5);
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-second); }
.empty-state .es-icon { font-size: 3rem; margin-bottom: .8rem; opacity: .5; }
.empty-state .es-text { font-family: var(--font-serif); font-size: 1rem; }

/* ── TOAST ── */
#toast {
  position: fixed; bottom: calc(1.5rem + env(safe-area-inset-bottom,0));
  left: 50%; transform: translateX(-50%) translateY(10px);
  background: var(--olive-dark); color: var(--cream); padding: .75rem 1.5rem;
  border-radius: 2rem; font-size: .8rem; font-weight: 500; z-index: 1000;
  opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s;
  white-space: nowrap; box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── SPINNER ── */
.spinner {
  width: 28px; height: 28px; border: 3px solid var(--border);
  border-top-color: var(--olive); border-radius: 50%;
  animation: spin .8s linear infinite; margin: 2rem auto;
}

/* ── LOAD MORE ── */
.load-more-btn {
  display: block; margin: 1rem auto; padding: .65rem 2rem; border-radius: 2rem;
  border: 1.5px solid var(--border); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; font-weight: 600; color: var(--text-second); transition: all .2s;
}
.load-more-btn:hover { background: var(--accent-light); }

/* ── CONTEXT MENU ── */
.ctx-menu {
  position: fixed; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: .85rem; box-shadow: 0 8px 30px var(--shadow); z-index: 800;
  min-width: 160px; overflow: hidden; animation: scaleIn .15s ease;
}
.ctx-item { padding: .8rem 1.1rem; font-size: .82rem; color: var(--text-primary); cursor: pointer; transition: background .15s; }
.ctx-item:hover { background: var(--accent-light); }
.ctx-item.danger { color: #e05a5a; }

/* ── ANIMATIONS ── */
@keyframes fadeUp  { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:none; } }
@keyframes fadeIn  { from { opacity:0; } to { opacity:1; } }
@keyframes scaleIn { from { opacity:0; transform:scale(.92); } to { opacity:1; transform:none; } }
@keyframes spin    { to { transform:rotate(360deg); } }
@keyframes bounce  { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
