/* MemoryBoard — warm scrapbook theme */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700;9..144,900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #fff7ec;
  --bg-2: #ffe9d4;
  --ink: #2c1638;
  --ink-soft: #5b4467;
  --muted: #8a7a92;
  --accent: #c4366a;
  --accent-hot: #a82355;
  --gold: #e6a93a;
  --cream: #fff;
  --border: rgba(60, 30, 70, 0.08);
  --shadow-sm: 0 2px 10px rgba(50, 20, 60, 0.06);
  --shadow: 0 10px 30px rgba(50, 20, 60, 0.10);
  --shadow-lg: 0 20px 50px rgba(50, 20, 60, 0.14);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; letter-spacing: -0.01em; }

/* ---------- header ---------- */
header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; background: rgba(255, 247, 236, 0.85);
  backdrop-filter: saturate(140%) blur(8px);
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--border);
}
header.site .brand {
  font-family: 'Fraunces', serif;
  font-weight: 900; font-size: 22px; letter-spacing: -0.02em;
}
header.site .brand .dot { color: var(--accent); }
header.site .brand a { color: inherit; text-decoration: none; }
header.site nav a {
  color: var(--ink-soft); text-decoration: none; margin-left: 22px;
  font-size: 14px; font-weight: 500;
}
header.site nav a:hover { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff;
  border: 0; padding: 13px 24px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  cursor: pointer; text-decoration: none;
  box-shadow: 0 6px 18px rgba(196, 54, 106, 0.25);
  transition: transform .12s ease, box-shadow .12s ease, background .12s;
}
.btn:hover { transform: translateY(-1px); background: var(--accent-hot); box-shadow: 0 10px 22px rgba(196,54,106,0.32); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--accent); border: 2px solid var(--accent); box-shadow: none; }
.btn.ghost:hover { background: var(--accent); color: #fff; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn.ok { background: #2a8b50; box-shadow: 0 4px 12px rgba(42,139,80,0.25); }
.btn.ok:hover { background: #226e44; }
.btn.no { background: #b53b3b; box-shadow: 0 4px 12px rgba(181,59,59,0.25); }
.btn.no:hover { background: #8e2424; }
.btn.gold { background: var(--gold); box-shadow: 0 4px 14px rgba(230,169,58,0.3); }
.btn.gold:hover { background: #c98e22; }

.container { max-width: 1100px; margin: 0 auto; padding: 28px 20px; }

/* ---------- forms ---------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin: 16px 0 6px; letter-spacing: 0.02em; }
input[type=text], input[type=url], textarea, input[type=file] {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--border);
  border-radius: 12px; font-size: 15px; background: #fff; color: var(--ink);
  font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
input:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(196,54,106,0.10); }

/* ---------- landing hero ---------- */
.hero {
  text-align: center; padding: 80px 20px 50px; position: relative;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(255,200,140,0.55), transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(255,160,200,0.45), transparent 55%);
}
.hero h1 { font-size: clamp(40px, 6vw, 64px); margin: 0 0 16px; font-weight: 900; }
.hero p { color: var(--ink-soft); font-size: clamp(16px, 2vw, 19px); margin: 0 auto; max-width: 580px; line-height: 1.55; }
.hero .actions { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- card ---------- */
.card {
  background: var(--cream); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: var(--shadow);
  padding: 28px;
}
.card.tight { padding: 22px; }

/* ---------- board hero ---------- */
.board-hero {
  position: relative; overflow: hidden;
  text-align: center; padding: 70px 20px 56px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255,180,120,0.6), transparent 55%),
    radial-gradient(ellipse at 80% 30%, rgba(255,140,180,0.55), transparent 55%),
    linear-gradient(180deg, #fff5e3 0%, var(--bg) 100%);
}
.board-hero h1 {
  margin: 0 0 10px; font-size: clamp(34px, 5.5vw, 56px); font-weight: 900;
  color: var(--ink); line-height: 1.05;
}
.board-hero .subtitle { color: var(--ink-soft); font-size: clamp(15px, 2vw, 18px); max-width: 520px; margin: 0 auto; }
.board-hero .cake { font-size: 42px; margin-bottom: 8px; display: inline-block; animation: bob 3s ease-in-out infinite; }
.board-hero .post-cta {
  margin-top: 28px;
}

@keyframes bob { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
@keyframes float-up { from { transform: translateY(8px); opacity: 0;} to { transform: translateY(0); opacity: 1;} }

/* confetti */
.confetti {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.confetti span {
  position: absolute; width: 10px; height: 14px; border-radius: 2px;
  opacity: 0.85; animation: fall linear infinite;
}
@keyframes fall {
  0% { transform: translateY(-20px) rotate(0deg); }
  100% { transform: translateY(110vh) rotate(540deg); }
}

/* ---------- grid of memories ---------- */
.grid {
  column-count: 3; column-gap: 18px;
  padding: 24px 18px 60px;
  max-width: 1180px; margin: 0 auto;
}
@media (max-width: 900px) { .grid { column-count: 2; } }
@media (max-width: 560px) { .grid { column-count: 1; padding: 16px; } }

.post {
  break-inside: avoid;
  background: var(--cream); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
  animation: float-up .35s ease both;
}
.post:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.post:nth-child(3n)   { transform: rotate(-0.6deg); }
.post:nth-child(3n+1) { transform: rotate(0.4deg); }
.post:hover:nth-child(3n), .post:hover:nth-child(3n+1) { transform: translateY(-3px) rotate(0deg); }

.post .from {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 14px;
  margin-bottom: 10px; color: var(--ink);
}
.post .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #ffd083, #ff9bbf);
  color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.post .from .name-time { display: flex; flex-direction: column; line-height: 1.15; }
.post .from .when { font-size: 11px; color: var(--muted); font-weight: 500; }
.post .msg {
  font-size: 15.5px; line-height: 1.55; white-space: pre-wrap;
  color: var(--ink); font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
}
.post img, .post video {
  width: 100%; border-radius: 12px; display: block; margin-top: 12px;
  background: #f4eee5;
}
.post .yt { position: relative; padding-top: 56.25%; margin-top: 12px; border-radius: 12px; overflow: hidden; }
.post .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.post.pending-self {
  border: 2px dashed var(--gold); background: #fffaf0;
}
.post.pending-self .badge-mine {
  display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: var(--gold); color: #fff; margin-left: 8px; font-weight: 700; letter-spacing: 0.04em;
}

/* ---------- empty state ---------- */
.empty {
  text-align: center; padding: 60px 20px; color: var(--ink-soft);
  font-size: 17px; font-family: 'Fraunces', Georgia, serif;
}
.empty .big-emoji { font-size: 56px; display: block; margin-bottom: 14px; animation: bob 3.5s ease-in-out infinite; }

/* ---------- flashes ---------- */
.flash { padding: 12px 14px; border-radius: 12px; margin: 12px 0; font-size: 14px; line-height: 1.4; }
.flash.ok { background: #e7f5ec; color: #226e44; }
.flash.err { background: #fbe6e6; color: #8a1a1a; }
.flash.info { background: #f3edfa; color: #4a2070; }

/* ---------- thank-you success card ---------- */
.thank-you {
  text-align: center; padding: 30px 26px;
}
.thank-you .heart { font-size: 56px; display: inline-block; animation: bob 2.5s ease-in-out infinite; }
.thank-you h3 { margin: 12px 0 6px; font-size: 26px; }
.thank-you p { color: var(--ink-soft); font-size: 15px; margin: 0 0 18px; }

/* ---------- share box ---------- */
.share-box {
  background: #fff5e0; padding: 14px 16px; border-radius: 12px;
  font-family: ui-monospace, SF Mono, monospace; font-size: 13px;
  word-break: break-all; border: 1px dashed rgba(196,54,106,0.25);
}

/* ---------- admin floating button ---------- */
.admin-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 999px;
  font-weight: 600; font-size: 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.admin-fab .pill {
  background: var(--accent); color: #fff; border-radius: 999px;
  padding: 1px 8px; font-size: 12px; font-weight: 700;
}

/* ---------- admin queue ---------- */
.queue .post { border-radius: 14px; }
.queue .post-row { display: flex; gap: 16px; align-items: flex-start; }
.queue .post-row .body { flex: 1; min-width: 0; }
.queue .actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.queue .media-thumb { max-width: 180px; border-radius: 10px; }

.tag {
  display: inline-block; font-size: 11px; padding: 3px 10px; border-radius: 999px;
  background: #efe6f7; color: #5a3680; margin-left: 8px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.tag.approved { background: #e0f2e6; color: #2a6e44; }
.tag.rejected { background: #fbe6e6; color: #8a1a1a; }
.tag.pending  { background: #fff3d4; color: #8a6300; }

/* ---------- footer ---------- */
footer.site { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 13px; }
footer.site .heart { color: var(--accent); }

/* ---------- post-cta floating add button ---------- */
.fab-add {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  background: var(--accent); color: #fff;
  padding: 14px 22px; border-radius: 999px; font-weight: 700; font-size: 15px;
  box-shadow: 0 12px 28px rgba(196,54,106,0.32);
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.fab-add:hover { background: var(--accent-hot); }
.admin-fab + .fab-add { bottom: 76px; }
