/* OurFamilySnaps: a magazine front page pinned to a family corkboard.
   Each person picks one of three site themes (data-site on <html>). Every color comes from these tokens. */
:root,
[data-site="campfire"] {
  --bg: #3A2620;
  --surface: #4B332B;
  --ink: #FBEFE6;
  --muted: #D7BFB2;
  --line: #644639;
  --c1: #D9482B;
  --c2: #2F6E4F;
  --c3: #E0A526;
  --c4: #3A6EA5;
  --c5: #D46A8C;
  --bg-grad: none;
  color-scheme: dark;
}
[data-site="sunny"] {
  --bg: #FFEDB8;
  --surface: #FFFBEC;
  --ink: #2E2A1F;
  --muted: #6E6448;
  --line: #EED9A0;
  --c1: #E2553F;
  --c2: #17807A;
  --c3: #F2A93B;
  --c4: #9A4F96;
  --c5: #5E9E4A;
  --bg-grad: none;
  color-scheme: light;
}
[data-site="pink"] {
  --bg: #FFD3E6;
  --surface: #FFF2F8;
  --ink: #4A1C33;
  --muted: #8A506D;
  --line: #F4B3D0;
  --c1: #E3457C;
  --c2: #B5306A;
  --c3: #F39AC2;
  --c4: #D364A0;
  --c5: #F6B3C9;
  --bg-grad: linear-gradient(170deg, #FFD9EA 0%, #FFC9DF 55%, #FBD3F0 100%);
  color-scheme: light;
}
:root {
  --f-display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --f-hand: "Caveat Brush", "Segoe Print", cursive;
  --f-body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 10px 26px rgba(0, 0, 0, 0.16);
  --tint: color-mix(in srgb, var(--c2) 15%, var(--surface));
  --warn: color-mix(in srgb, var(--c3) 22%, var(--surface));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  background-image:
    radial-gradient(color-mix(in srgb, var(--c1) 26%, transparent) 1.6px, transparent 2.2px),
    radial-gradient(color-mix(in srgb, var(--c4) 22%, transparent) 1.6px, transparent 2.2px),
    radial-gradient(color-mix(in srgb, var(--c5) 22%, transparent) 1.6px, transparent 2.2px),
    var(--bg-grad);
  background-size: 58px 58px, 74px 74px, 91px 91px, 100% 100%;
  background-position: 0 0, 23px 41px, 51px 13px, 0 0;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
a { color: color-mix(in srgb, var(--c4) 55%, var(--ink)); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--c3); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 800; line-height: 1.1; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 24px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
main.wrap { padding-block: 28px 64px; display: flex; flex-direction: column; gap: 22px; }

/* Header */
header.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; gap: 14px; padding-block: 10px; flex-wrap: wrap; }
.logo { display: flex; align-items: baseline; gap: 2px; font-family: var(--f-display); font-weight: 800; font-size: 24px; text-decoration: none; color: var(--ink); margin-right: auto; }
.logo .hand { font-family: var(--f-hand); color: var(--c1); font-size: 27px; transform: rotate(-4deg); display: inline-block; margin-left: 2px; }
.logo.big { font-size: 36px; justify-content: center; margin: 0 0 18px; }
.logo.big .hand { font-size: 40px; }
nav.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
nav.tabs a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 700; color: var(--muted); }
nav.tabs a[aria-current="page"] { background: var(--c2); color: #fff; }
.avatar-link { border-radius: 50%; text-decoration: none; }
/* The bell sits just left of the profile picture. */
header.top .bell { margin-left: 0; width: 38px; height: 38px; font-size: 18px; flex: none; }

/* Avatars */
.avatar {
  --size: 36px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  flex: none;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  background: var(--cc, var(--c2));
  color: #fff;
  font-weight: 800;
  font-size: calc(var(--size) * 0.38);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.sm { --size: 26px; }
.avatar.lg { --size: 64px; }
.avatar.xl { --size: 120px; border-width: 4px; }

/* Masthead */
.masthead {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
  padding-bottom: 16px;
  background: linear-gradient(90deg, var(--c1) 0 20%, var(--c3) 20% 40%, var(--c5) 40% 60%, var(--c2) 60% 80%, var(--c4) 80%) bottom / 100% 6px no-repeat;
}
.masthead h1 { font-size: clamp(34px, 6vw, 58px); }
.masthead .issue { font-family: var(--f-hand); color: var(--c1); font-size: 22px; display: inline-block; transform: rotate(-2deg); }
.masthead .meta { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-align: right; }

/* Cards, forms, buttons */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.card.narrow { max-width: 640px; width: 100%; margin: 0 auto; }
.card h1 { font-size: 34px; margin-bottom: 14px; }
.card h2 { margin-bottom: 8px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
label.f { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.form input[type="text"], .form input[type="date"], .form input[type="tel"], .form input[type="url"], .form input[type="email"], .form input[type="password"], .form input:not([type]), .form select, .form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 35%, var(--surface));
  border-radius: 12px;
  padding: 11px 13px;
  font-weight: 400;
  font-size: 16px;
}
.form textarea { min-height: 90px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 700; font-size: 14px; margin-bottom: 8px; padding: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 15px; cursor: pointer; background: color-mix(in srgb, var(--bg) 25%, var(--surface)); }
.checks input { accent-color: var(--c2); width: 17px; height: 17px; }
.checks label.disabled { opacity: 0.45; }
.btn {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 25%, var(--surface));
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  color: var(--ink);
  font-size: 15px;
}
.btn.primary { background: var(--c1); border-color: var(--c1); color: #fff; }
.btn.danger { border-color: var(--c1); color: color-mix(in srgb, var(--c1) 70%, var(--ink)); background: transparent; }
.btn.ghost { background: transparent; }
.btn.big { padding: 13px 20px; font-size: 17px; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.btn-row.center { justify-content: center; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch { appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; flex: none; transition: background 0.2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.switch:checked { background: var(--c2); }
.switch:checked::after { transform: translateX(18px); }
.little-list { list-style: none; margin: 8px 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.little-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.little-name { flex: 1; min-width: 180px; }
.little-edit summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.little-edit[open] { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.little-add { border-top: 1px dashed var(--line); padding-top: 14px; }
.little-add h3 { font-size: 18px; }
.merge { width: 100%; }
.merge summary { list-style: none; width: fit-content; }
.merge summary::-webkit-details-marker { display: none; }
.merge[open] summary { margin-bottom: 8px; }
.merge .form { border: 1px dashed var(--c1); border-radius: 14px; padding: 14px; }
.checkline { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.checkline input { width: 18px; height: 18px; accent-color: var(--c2); }
.notif-list { display: flex; flex-direction: column; gap: 12px; }
.notif-list .toggle { border-bottom: 1px solid var(--line); padding-bottom: 12px; font-weight: 600; }
.flash { padding: 10px 14px; border-radius: 12px; background: var(--tint); margin: 0; font-weight: 600; }
.flash.err { background: color-mix(in srgb, var(--c1) 22%, var(--surface)); }
.devlink { border: 2px dashed var(--c3); border-radius: 12px; padding: 10px 14px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; word-break: break-all; }
.pill { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; width: fit-content; }
.pill.warn { background: var(--warn); color: var(--ink); }
.pill.adult { background: color-mix(in srgb, var(--c1) 25%, var(--surface)); color: color-mix(in srgb, var(--c1) 60%, var(--ink)); }
.back { font-weight: 700; text-decoration: none; color: var(--muted); width: fit-content; }
.snap-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.snap-arrows { display: flex; gap: 8px; }
.snap-arrows .arrow { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 18px; font-weight: 800; }
.snap-arrows .arrow span { font-size: 15px; }
.snap-arrows .arrow.is-off { opacity: .35; pointer-events: none; }
@media (max-width: 600px) { .snap-arrows .arrow span { display: none; } .snap-arrows .arrow { font-size: 24px; padding: 0 14px; } }
.plain { margin: 0; padding-left: 18px; }
.fine { font-size: 13px; color: var(--muted); text-align: center; margin-top: 14px; }
.danger-zone { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }

/* Sign-in */
.auth { max-width: 440px; width: 100%; margin: 6vh auto 0; }
.auth-card h1 { font-size: 30px; margin-bottom: 12px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Family */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.person-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.person-card:hover { transform: translateY(-2px); }
.pc-name { font-family: var(--f-display); font-weight: 800; font-size: 19px; margin-top: 6px; }
.pc-meta { font-size: 13px; color: var(--muted); }
.pc-bday { font-size: 14px; }
.pc-bday.muted { color: var(--muted); font-style: italic; }
.profile-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.profile-head h1 { font-size: 40px; }
.profile-top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.profile-top .upl { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; max-width: 300px; }

/* Theme picker */
.theme-slot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.theme-btn { display: flex; align-items: center; gap: 10px; border: 2px solid var(--line); background: color-mix(in srgb, var(--bg) 20%, var(--surface)); border-radius: 14px; padding: 6px 12px 6px 6px; cursor: pointer; }
.theme-btn input { position: absolute; opacity: 0; pointer-events: none; }
.theme-btn small { display: block; font-size: 12px; color: var(--muted); }
.theme-btn:has(input:checked) { border-color: var(--c1); box-shadow: 0 0 0 2px color-mix(in srgb, var(--c1) 35%, transparent); }
.theme-btn:has(input:focus-visible) { outline: 3px solid var(--c3); outline-offset: 2px; }
.theme-prev { width: 44px; height: 32px; border-radius: 9px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 5px; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.theme-prev i { border-radius: 50%; }

/* Groups */
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.group-card { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--cc); border-radius: 18px; padding: 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); position: relative; }
.gc-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gc-body b { font-family: var(--f-display); font-size: 20px; }
.gc-body small { color: var(--muted); }
.group-card .pill { position: absolute; top: 12px; right: 12px; }
.gicon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 20px; color: #fff; background: var(--cc, var(--c2)); flex: none; }
.members { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.members.big { gap: 14px; margin: 10px 0 18px; }
.member { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; text-decoration: none; color: var(--ink); width: 72px; text-align: center; }
.gpanel { background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--cc); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); }
.gpanel header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; }
.gpanel h1 { font-size: 34px; margin-right: auto; }
.subtabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 25%, var(--surface)); border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 700; }
.chip[aria-pressed="true"] { background: var(--cc, var(--c2)); border-color: var(--cc, var(--c2)); color: #fff; }
.color-pick { display: flex; gap: 10px; }
.color-pick label { cursor: pointer; }
.color-pick input { position: absolute; opacity: 0; }
.color-pick span { display: block; width: 34px; height: 34px; border-radius: 50%; background: var(--cc); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.color-pick input:checked + span { box-shadow: 0 0 0 3px var(--ink); }
.color-pick input:focus-visible + span { outline: 3px solid var(--c3); outline-offset: 2px; }

.empty-state { text-align: center; padding: 34px 16px; border: 2px dashed var(--line); border-radius: 18px; }
.empty-state.big { padding: 56px 16px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.hand-note { font-family: var(--f-hand); font-size: 30px; color: var(--c3); margin-bottom: 6px; }

/* ---- Snaps ---------------------------------------------------------------------------------------- */
.ink { color: var(--ink); }
.btn.tiny { padding: 4px 12px; font-size: 12px; margin-top: 6px; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--c1); color: #fff; font-size: 11px; font-weight: 800; margin-left: 6px; vertical-align: 1px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters .chip { text-decoration: none; color: var(--ink); }
.filters .chip[aria-pressed="true"] { color: #fff; }
.filters select { margin-left: auto; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 12px; font-size: 14px; }
.chip.small { font-size: 13px; padding: 3px 11px; text-decoration: none; color: var(--ink); }
.chip.small[aria-pressed="true"] { color: #fff; }

.approve { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: var(--warn); border: 1px dashed var(--c3); border-radius: 14px; padding: 12px 16px; }
.approve p { margin: 0; flex: 1; min-width: 220px; }
.review { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; width: 100%; }
.return-form { display: flex; gap: 8px; flex: 1; min-width: 240px; }
.return-form input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; }

.polaroid { display: block; background: #FFFDF8; padding: 10px 10px 14px; box-shadow: var(--shadow); position: relative; border-radius: 2px; transition: transform 0.25s ease; text-decoration: none; color: #3b3f37; transform: rotate(var(--tilt, 0deg)); }
.polaroid img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 1px; background: #eee6da; }
.polaroid video.frame { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 1px; background: #2a2a2a; pointer-events: none; }
.polaroid .no-photo { display: grid; place-items: center; aspect-ratio: 4 / 3; background: color-mix(in srgb, var(--cc, var(--c3)) 30%, #FFFDF8); font-family: var(--f-display); font-weight: 800; font-size: 22px; padding: 16px; text-align: center; color: #3b3f37; }
.polaroid .cap { display: block; font-family: var(--f-hand); font-size: 19px; padding-top: 8px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.polaroid.tape::before { content: ""; position: absolute; top: -12px; left: 50%; width: 96px; height: 26px; transform: translateX(-50%) rotate(-3deg); background: color-mix(in srgb, var(--cc, var(--c3)) 60%, transparent); z-index: 1; }
.snap:hover .polaroid, .polaroid:focus-visible { transform: rotate(0deg) translateY(-3px); }
.stamp { position: absolute; top: 18px; right: 18px; font-weight: 800; font-size: 12px; letter-spacing: 0.14em; color: var(--cc, var(--c1)); border: 2px solid var(--cc, var(--c1)); padding: 3px 8px; border-radius: 4px; background: rgba(255, 253, 248, 0.9); transform: rotate(6deg); }
.stamp.inline { position: static; transform: rotate(-2deg); display: inline-block; }
.new-sticker { position: absolute; top: -10px; left: -10px; z-index: 2; background: var(--c1); color: #fff; font-family: var(--f-hand); font-size: 17px; padding: 2px 10px 0; border-radius: 999px; transform: rotate(-8deg); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); }
.media-badge { position: absolute; left: 18px; bottom: 54px; background: rgba(30, 34, 28, 0.72); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.play { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: 58px; height: 58px; border-radius: 50%; background: rgba(255, 253, 248, 0.92); display: grid; place-items: center; box-shadow: var(--shadow); }
.play::after { content: ""; border-left: 18px solid var(--c1); border-top: 11px solid transparent; border-bottom: 11px solid transparent; margin-left: 5px; }

.cover { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; padding: 28px; border-radius: 28px; background: linear-gradient(135deg, color-mix(in srgb, var(--c3) 22%, var(--surface)), color-mix(in srgb, var(--c4) 16%, var(--surface))); }
.cover .polaroid { --tilt: -1.5deg; }
.cover .eyebrow { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: color-mix(in srgb, var(--c1) 75%, var(--ink)); font-weight: 800; }
.cover h2 { font-size: clamp(30px, 4.4vw, 50px); margin: 8px 0 12px; }
.cover h2 a, .snap h3 a { color: inherit; text-decoration: none; }
.cover .lede { font-size: 18px; color: var(--muted); max-width: 52ch; }

.grid { columns: 3 290px; column-gap: 28px; }
.snap { break-inside: avoid; margin-bottom: 34px; display: block; }
.snap .body { margin-top: 12px; padding: 2px 4px 0 12px; border-left: 4px solid var(--cc, var(--c2)); }
.snap h3 { font-size: 23px; margin: 6px 0; }
.snap p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.tagrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cat { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 800; color: color-mix(in srgb, var(--cc, var(--c2)) 70%, var(--ink)); }
.group-pill { font-size: 13px; color: var(--muted); }
.byline { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.byline b { color: var(--ink); }
.caught { display: flex; align-items: center; gap: 14px; margin: 8px 0 34px; color: var(--muted); font-family: var(--f-hand); font-size: 21px; column-span: all; }
.caught::before, .caught::after { content: ""; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--c3) 0 10px, transparent 10px 18px); }
.gfeed { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 26px; }
.gfeed .snap { margin: 0; }
.fab { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 60px; height: 60px; border-radius: 50%; background: var(--c1); color: #fff; display: grid; place-items: center; font-size: 34px; font-weight: 700; text-decoration: none; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); z-index: 15; }

/* Snap page */
.snap-full { display: grid; grid-template-columns: 1.3fr 1fr; gap: 26px; align-items: start; }
.gallery { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.gallery img, .gallery video { width: 100%; height: auto; display: block; border-radius: 10px; background: #000; box-shadow: var(--shadow); }
.gallery .gimg { display: block; }
.snap-full .info { position: sticky; top: 80px; background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--cc); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.snap-full h1 { font-size: 34px; }
.desc { white-space: pre-wrap; margin: 0; }
.seen-by { font-size: 13px; color: var(--muted); margin: 0; }
/* A snap's link: bright card, big round arrow button. */
.linkcard { display: flex; gap: 14px; align-items: center; justify-content: space-between; border-radius: 18px; padding: 14px 14px 14px 18px; text-decoration: none; color: #fff; min-width: 0;
  background: linear-gradient(120deg, var(--c1), var(--c5)); box-shadow: 0 4px 0 color-mix(in srgb, var(--c1) 55%, #000), 0 10px 24px rgba(0, 0, 0, .18); transition: transform .15s ease, box-shadow .15s ease; }
.linkcard:hover, .linkcard:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 0 color-mix(in srgb, var(--c1) 55%, #000), 0 14px 28px rgba(0, 0, 0, .22); }
.linkcard:active { transform: translateY(2px); box-shadow: 0 2px 0 color-mix(in srgb, var(--c1) 55%, #000); }
.lc-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lc-text b { font-family: var(--f-display); font-size: 20px; line-height: 1.2; overflow-wrap: anywhere; }
.lc-kicker { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .9; }
.lc-host { font-size: 13px; opacity: .88; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-go { flex: none; width: 52px; height: 52px; border-radius: 999px; display: grid; place-items: center; background: #fff; color: var(--c1); font-size: 26px; font-weight: 900; box-shadow: 0 3px 0 rgba(0, 0, 0, .18); transition: transform .15s ease; }
.linkcard:hover .lc-go { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .linkcard, .linkcard .lc-go { transition: none; } }
.link-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 600px) { .link-fields { grid-template-columns: 1fr; } }
.shares { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }

/* Composer */
.drop { border: 2px dashed var(--c3); border-radius: 16px; padding: 20px; text-align: center; background: color-mix(in srgb, var(--bg) 25%, var(--surface)); position: relative; display: flex; flex-direction: column; gap: 4px; }
.drop.over { background: var(--tint); }
.drop b { font-size: 17px; }
.drop input[type="file"] { margin: 8px auto 0; max-width: 100%; }
.previews { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 10px; }
.prev { position: relative; width: 96px; height: 96px; border-radius: 10px; overflow: hidden; background: var(--line); }
.prev img { width: 100%; height: 100%; object-fit: cover; }
.prev.is-video::after { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 22px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.prev .bar { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, 0.35); }
.prev .bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--c3); transition: width 0.2s; }
.prev:not(.up) .bar { display: none; }
.prev.error { outline: 3px solid var(--c1); }
.prev .x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 16px; line-height: 1; z-index: 2; }
.existing { display: flex; flex-wrap: wrap; gap: 10px; }
.existing-item { display: flex; flex-direction: column; gap: 4px; width: 96px; font-size: 13px; }
.existing-item img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
.row2.tight { gap: 8px; }
.note { background: var(--tint); border-radius: 12px; padding: 10px 14px; margin: 0; font-size: 14px; }

/* Stories */
.years { display: flex; gap: 10px; flex-wrap: wrap; }
.years a { font-family: var(--f-display); font-weight: 800; font-size: 28px; text-decoration: none; color: var(--muted); padding: 4px 10px; border-bottom: 3px solid transparent; }
.years a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--c1); }
.month { display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 24px 0; border-top: 3px dotted color-mix(in srgb, var(--cc) 50%, transparent); }
.month h2 { font-family: var(--f-hand); font-weight: 400; font-size: 38px; color: color-mix(in srgb, var(--cc) 80%, var(--ink)); transform: rotate(-3deg); transform-origin: left; }
.month .count { background: none; color: var(--muted); font-size: 13px; margin: 6px 0 0; display: block; height: auto; font-weight: 600; }
.month .row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px; }
.month .snap { margin: 0; }

/* ---- Comments, reactions, chat, plans ---------------------------------------------------------------- */
.react-sum { margin-left: auto; font-size: 14px; white-space: nowrap; color: var(--muted); }
.talk { border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.talk .subtabs { margin: 0; }
.talk .chip { text-decoration: none; color: var(--ink); }
.talk .chip[aria-pressed="true"] { color: #fff; }
.reacts { display: flex; flex-wrap: wrap; gap: 6px; }
.reacts form { margin: 0; }
.reacts button { border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 25%, var(--surface)); border-radius: 999px; padding: 5px 11px; font-size: 16px; }
.reacts button span { font-size: 13px; font-weight: 700; color: var(--muted); }
.reacts button[aria-pressed="true"] { border-color: var(--c1); background: color-mix(in srgb, var(--c1) 22%, var(--surface)); }
.comments { display: flex; flex-direction: column; gap: 12px; }
.cmt { display: flex; gap: 10px; }
.cmt.reply { margin-left: 26px; }
.cmt-body { min-width: 0; flex: 1; }
.cmt-body small { color: var(--muted); font-size: 12px; }
.cmt-body p { margin: 2px 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmt-actions { display: flex; gap: 14px; align-items: flex-start; font-size: 13px; }
.cmt-actions summary { cursor: pointer; color: var(--muted); font-weight: 700; list-style: none; }
.cmt-actions summary::-webkit-details-marker { display: none; }
.cmt-actions details[open] { flex: 1; }
.cmt-actions details .composer-row { margin-top: 6px; }
.cmt-reacts, .cmt-picker { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 2px; }
.cmt-reacts form, .cmt-picker form { margin: 0; }
.cmt-reacts button, .cmt-picker button { border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 25%, var(--surface)); border-radius: 999px; padding: 2px 9px; font-size: 14px; line-height: 1.5; }
.cmt-picker button { font-size: 18px; padding: 3px 10px; }
.cmt-reacts button span { font-size: 12px; font-weight: 700; color: var(--muted); }
.cmt-reacts button[aria-pressed="true"], .cmt-picker button[aria-pressed="true"] { border-color: var(--c1); background: color-mix(in srgb, var(--c1) 22%, var(--surface)); }
/* An open Reply, Move or React panel takes a full line under the buttons, so it never runs off a phone screen. */
.cmt-actions:has(details[open]) { flex-wrap: wrap; }
.cmt-actions details[open] { flex: 0 0 100%; order: 9; min-width: 0; }
.move-row select { width: 100%; max-width: 100%; text-overflow: ellipsis; }.linkish { background: none; border: 0; padding: 0; color: var(--muted); font-weight: 700; font-size: 13px; }
.composer-row { display: flex; gap: 8px; }
.composer-row input:not([type="hidden"]) { flex: 1; min-width: 0; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 30%, var(--surface)); border-radius: 999px; padding: 10px 16px; font-size: 16px; }
.gc-count { position: absolute; bottom: 12px; right: 12px; }
.chat-wrap { display: flex; flex-direction: column; gap: 12px; }
.chat { display: flex; flex-direction: column; gap: 12px; max-height: 60vh; overflow: auto; padding: 4px; }
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: 82%; }
.msg .bubble { background: color-mix(in srgb, var(--bg) 40%, var(--surface)); border-radius: 16px 16px 16px 4px; padding: 9px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .bubble small { display: block; font-size: 12px; color: var(--muted); font-weight: 700; white-space: normal; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.me .bubble { background: var(--c2); color: #fff; border-radius: 16px 16px 4px 16px; }
.msg.me .bubble small { color: rgba(255, 255, 255, 0.8); }
/* Cute chat (plans): each person gets their own soft color, puffy bubbles with little tails, big lone emojis. */
.chat-wrap.cute .chat { background: radial-gradient(circle at 12px 12px, color-mix(in srgb, var(--c3) 18%, transparent) 2px, transparent 2.5px) 0 0 / 24px 24px; border-radius: 16px; padding: 12px 8px; }
.chat-wrap.cute .msg .bubble { position: relative; background: color-mix(in srgb, var(--bc, var(--c4)) 22%, var(--surface)); border: 2px solid color-mix(in srgb, var(--bc, var(--c4)) 55%, transparent); border-radius: 22px 22px 22px 6px; padding: 10px 16px; box-shadow: 0 3px 0 color-mix(in srgb, var(--bc, var(--c4)) 30%, transparent); font-size: 16px; }
.chat-wrap.cute .msg .bubble::after { content: ""; position: absolute; left: -7px; bottom: 6px; width: 12px; height: 12px; background: inherit; border-left: 2px solid color-mix(in srgb, var(--bc, var(--c4)) 55%, transparent); border-bottom: 2px solid color-mix(in srgb, var(--bc, var(--c4)) 55%, transparent); border-radius: 0 0 0 12px; transform: skewX(-20deg); }
.chat-wrap.cute .msg.me .bubble { background: var(--bc, var(--c2)); border-color: transparent; color: #fff; border-radius: 22px 22px 6px 22px; box-shadow: 0 3px 0 color-mix(in srgb, var(--bc, var(--c2)) 60%, #000); }
.chat-wrap.cute .msg.me .bubble::after { left: auto; right: -7px; border: 0; border-radius: 0 0 12px 0; transform: skewX(20deg); }
.chat-wrap.cute .msg .bubble.big-emoji { background: none; border: 0; box-shadow: none; font-size: 40px; line-height: 1.1; padding: 2px 4px; }
.chat-wrap.cute .msg .bubble.big-emoji::after { display: none; }
.chat-wrap.cute .msg .bubble.big-emoji small { font-size: 12px; color: var(--muted); }
.chat-wrap.cute .msg { animation: pop-in .25s ease-out both; }
@keyframes pop-in { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chat-wrap.cute .msg { animation: none; } }
.quick-tag summary { list-style: none; cursor: pointer; width: fit-content; border-style: dashed; }
.quick-tag summary::-webkit-details-marker { display: none; }
.quick-tag[open] summary { margin-bottom: 8px; }
.tag-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pick { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 700; cursor: pointer; }
.tag-pick:has(input:checked) { border-color: var(--c2); background: color-mix(in srgb, var(--c2) 25%, var(--surface)); }
.tag-pick input { accent-color: var(--c2); }
.msg-move { display: block; margin-top: 4px; font-size: 12px; font-weight: 700; color: inherit; opacity: .75; white-space: normal; }
.move-preview { margin: 12px 0 18px; max-width: 100%; }
.move-targets { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.move-targets li { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.move-targets img, .mt-blank { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex: none; background: var(--line); display: grid; place-items: center; }
.mt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mt-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.move-targets form { margin: 0; flex: none; }
.quick-emoji { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-emoji form { margin: 0; }
.quick-emoji button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; font-size: 20px; width: 44px; height: 40px; transition: transform .12s ease; }
.quick-emoji button:hover { transform: translateY(-2px) scale(1.08); }

/* Plan stage, bubbles, suggested dates and places. */
.plan-bubbles { display: flex; flex-wrap: wrap; gap: 6px; }
.pb { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: color-mix(in srgb, var(--cc, var(--c4)) 22%, var(--surface)); border: 1px solid color-mix(in srgb, var(--cc, var(--c4)) 45%, transparent); }
.pb-kids { background: color-mix(in srgb, #B3261E 20%, var(--surface)); border-color: color-mix(in srgb, #B3261E 50%, transparent); }
.stage-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #fff; background: var(--c4); }
.stage-badge.st-1 { background: var(--c3); color: #2b1d00; }
.stage-badge.st-2 { background: var(--c5); }
.stage-badge.st-3 { background: var(--c2); }
.stage-steps { list-style: none; margin: 6px 0 2px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: s; }
.stage-steps li { position: relative; min-width: 0; }
.stage-steps form { margin: 0; }
.stage-steps button, .stage-steps .step-static { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 25%, var(--surface)); color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; line-height: 1.2; }
.stage-steps button { cursor: pointer; }
.stage-steps button:hover { border-color: var(--c2); color: var(--ink); }
.step-dot { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; font-size: 16px; background: var(--surface); border: 1px solid var(--line); }
.stage-steps .done .step-dot { background: var(--c2); color: #fff; border-color: transparent; font-weight: 900; }
.stage-steps .done button, .stage-steps .done .step-static { color: var(--ink); }
.stage-steps .now .step-static { background: color-mix(in srgb, var(--c2) 28%, var(--surface)); border: 2px solid var(--c2); color: var(--ink); }
.stage-steps .now .step-dot { background: var(--c2); border-color: transparent; transform: scale(1.1); }
.ideas { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 10px; }
.idea { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 20%, var(--surface)); }
.idea.is-top { border: 2px solid var(--c3); background: color-mix(in srgb, var(--c3) 12%, var(--surface)); }
.idea-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.idea-body b { font-size: 16px; }
.idea-note { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.idea-link { font-weight: 700; color: var(--c4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idea-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 4px; }
.idea-actions form { margin: 0; }
.idea .vote { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 14px; font-weight: 700; }
.idea .vote span { margin-left: 4px; font-weight: 800; color: var(--muted); }
.idea .vote[aria-pressed="true"] { border-color: var(--c1); background: color-mix(in srgb, var(--c1) 22%, var(--surface)); }
.voters { color: var(--muted); font-size: 12px; }
.top-badge { width: fit-content; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: var(--c3); color: #2b1d00; }
.date-tile { flex: none; width: 54px; border-radius: 12px; overflow: hidden; text-align: center; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; box-shadow: 0 2px 0 var(--line); }
.date-tile small:first-child { background: var(--c1); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 0; letter-spacing: .05em; }
.date-tile b { font-size: 22px; line-height: 1.2; padding-top: 2px; }
.date-tile small:last-child { font-size: 10px; font-weight: 800; color: var(--muted); padding-bottom: 3px; }
.place-pin { flex: none; width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; font-size: 26px; background: color-mix(in srgb, var(--c4) 18%, var(--surface)); border: 1px solid var(--line); }
.idea-add summary { list-style: none; width: fit-content; }
.idea-add summary::-webkit-details-marker { display: none; }
.idea-add[open] summary { margin-bottom: 10px; }
@media (max-width: 600px) {
  .stage-steps { grid-template-columns: repeat(2, 1fr); }
}
.center { text-align: center; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.plan { border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 25%, var(--surface)); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); min-width: 0; }
.plan h3 { font-size: 21px; }
.plan-top { display: flex; align-items: center; gap: 8px; }
.plan-top .count { margin-left: auto; }
.plan.new { border-style: dashed; align-items: center; justify-content: center; color: var(--muted); min-height: 150px; }
.plan.new b { font-size: 30px; line-height: 1; }
.plans .full { grid-column: 1 / -1; }
.when { font-family: var(--f-hand); color: var(--c3); font-size: 19px; }
.when.big { font-size: 24px; margin: 4px 0 8px; }
.secret { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; background: var(--tint); padding: 3px 10px; border-radius: 999px; width: fit-content; }
.plan-card { border-top: 6px solid var(--cc); display: flex; flex-direction: column; gap: 8px; }
.plan-card h1 { margin: 0; }
.plan-tag { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; padding: 3px 11px 3px 8px; border-radius: 999px; background: var(--pc); color: #fff; font-family: var(--f-body, inherit); font-size: 13px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; box-shadow: 0 2px 0 color-mix(in srgb, var(--pc) 60%, #000); position: relative; top: -2px; margin-right: 4px; }
h1.plan-title .plan-tag { font-size: 14px; top: -4px; }
.act .plan-tag { font-size: 11px; padding: 1px 8px 1px 6px; top: -1px; box-shadow: none; }
.col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.poll { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 6px; }
.poll form { margin: 0; }
.poll button { display: flex; justify-content: space-between; width: 100%; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 25%, var(--surface)); border-radius: 10px; padding: 10px 14px; text-align: left; font-size: 15px; }
.poll button[aria-pressed="true"] { border-color: var(--c2); background: color-mix(in srgb, var(--c2) 25%, var(--surface)); }
.todos { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.todos li { display: flex; align-items: center; gap: 10px; }
.todos li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.todos li span.done { text-decoration: line-through; color: var(--muted); }
.todo-check { margin: 0; }
.tick { width: 26px; height: 26px; border-radius: 7px; border: 2px solid var(--line); background: transparent; color: #fff; font-weight: 800; display: grid; place-items: center; padding: 0; }
.tick.on { background: var(--c2); border-color: var(--c2); }
.todo-add { display: flex; gap: 8px; flex-wrap: wrap; }
.todo-add input { flex: 1; min-width: 160px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 30%, var(--surface)); border-radius: 999px; padding: 9px 14px; }
.todo-add select { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 12px; }
.poll-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.form .full-input, .poll-opts input { width: 100%; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 35%, var(--surface)); border-radius: 12px; padding: 10px 12px; font-size: 16px; }

/* ---- My snaps ---- */
.copybar { position: sticky; top: calc(64px + env(safe-area-inset-top, 0px)); z-index: 10; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow); margin-bottom: 22px; }
.copybar .f.inline { flex-direction: row; align-items: center; gap: 8px; margin-left: auto; }
.copybar select { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px; }
.pickable { position: relative; display: flex; flex-direction: column; gap: 6px; }
.pick-box { position: absolute; top: 6px; left: 6px; z-index: 3; width: 26px; height: 26px; accent-color: var(--c1); cursor: pointer; }
.pickable:has(.pick-box:checked) .polaroid { outline: 4px solid var(--c1); outline-offset: 2px; }
.in-groups { font-size: 12px; padding-left: 4px; }
.filters select + select { margin-left: 0; }

/* ---- Import ---------------------------------------------------------------------------------------------- */
.import-card h3 { font-size: 19px; margin-bottom: 6px; }
.howto ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.pick { display: flex; flex-direction: column; gap: 8px; border: 2px dashed var(--c3); border-radius: 14px; padding: 14px; margin-top: 14px; }
.pick input { max-width: 100%; }
.who { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 16px; }
.who-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.who-row select, .narrowf select, .import-opts select, .import-opts input[type="date"] { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px; font-size: 15px; }
.who-add { width: 100%; }
.who-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.who-form input { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px; font-size: 15px; min-width: 0; flex: 1 1 160px; }
.who-form .err { color: color-mix(in srgb, var(--c1) 75%, var(--ink)); font-weight: 700; }
.narrowf { max-width: 420px; }
.import-opts { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin: 12px 0; }
.import-sum { font-weight: 700; }
.import-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; max-height: 70vh; overflow: auto; padding: 2px; }
.imp { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: color-mix(in srgb, var(--bg) 20%, var(--surface)); cursor: pointer; }
.imp.off { opacity: 0.45; }
.imp input { width: 18px; height: 18px; accent-color: var(--c2); flex: none; }
.imp img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--line); flex: none; }
.imp span { display: flex; flex-direction: column; min-width: 0; }
.imp b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp small { color: var(--muted); font-size: 12px; }
.bigbar { height: 14px; border-radius: 7px; background: var(--line); overflow: hidden; margin: 10px 0; }
.bigbar i { display: block; height: 100%; width: 0; background: var(--c3); transition: width 0.3s; }

@media (max-width: 860px) {
  .cover, .snap-full { grid-template-columns: 1fr; }
  .snap-full .info { position: static; }
  .month { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 760px) {
  .two-col, .row2 { grid-template-columns: 1fr; }
  .masthead { grid-template-columns: 1fr; }
  .masthead .meta { text-align: left; }
}
@media (max-width: 520px) {
  nav.tabs { order: 3; width: 100%; justify-content: space-between; }
  .profile-head h1 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.move-row { margin-top: 6px; }
.move-row select { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.chat-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.msg-pick { width: 18px; height: 18px; accent-color: var(--c1); align-self: center; flex: none; }
/* Video covers keep the top of the frame (faces) when cropped to fit. */
.polaroid img.top, .polaroid video.frame { object-position: center top; }
.share-link .copyline, .gshare .copyline, .invite-link .copyline { display: flex; gap: 8px; margin: 8px 0 10px; }
.share-link .copyline input, .gshare .copyline input, .invite-link .copyline input { flex: 1; min-width: 0; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 30%, var(--surface)); border-radius: 10px; padding: 9px 12px; font-size: 14px; }
.public-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.public-head p { margin: 0; }
.guest-form { border-top: 1px solid var(--line); padding-top: 12px; }
.comments.guests { border-top: 1px dashed var(--line); padding-top: 10px; }
/* Under each photo: who's in it, and who posted it. */
.snap-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; padding: 0 2px; }
.who-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.name-label { font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--cc, var(--c2)) 26%, var(--surface)); color: var(--ink); }
.posted-by { font-size: 12px; color: var(--muted); font-style: italic; }
/* Filters: chips on one line, search and pickers on the next. */
.filters { flex-direction: column; align-items: stretch; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter-row input[type="search"] { flex: 1 1 220px; min-width: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px; font-size: 15px; }
.filter-row select { margin-left: 0; }
/* Photos bigger than their frame keep the top center in view (faces), same as video covers. */
.polaroid img, .polaroid video.frame, .imp img, .existing-item img, .prev img { object-position: center top; }
.helper-box { width: 100%; border: 1px dashed var(--c3); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.helper-box h3 { font-size: 17px; }
.helper-box .btn-row { margin-top: 2px; align-items: center; }
.helper-box select { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px; }

/* ---- Feed layout A: main photo + up to 3 thumbnails, "+N" on the last ---------------------------------- */
.polaroid.stack { cursor: default; }
.polaroid .main-shot { display: block; position: relative; text-decoration: none; color: inherit; }
.polaroid a.cap { display: block; color: #3b3f37; text-decoration: none; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.thumbs .thumb { position: relative; display: block; border-radius: 1px; overflow: hidden; }
.thumbs .thumb img, .thumbs .thumb video { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center top; display: block; background: #eee6da; }
.thumbs .more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(20, 16, 12, 0.55); color: #fff; font-family: var(--f-display); font-weight: 800; font-size: 26px; }
.thumbs .mini-play { position: absolute; right: 5px; bottom: 5px; width: 0; height: 0; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
.polaroid.stack .stamp { top: 10px; right: 10px; }
.polaroid.stack .new-sticker { z-index: 3; }
/* Cover story on wide screens: main photo left, thumbnails stacked on the right. */
@media (min-width: 861px) {
  .polaroid.stack.split.has-thumbs { display: grid; grid-template-columns: 2.4fr 1fr; gap: 8px; align-items: start; }
  .polaroid.stack.split.has-thumbs .thumbs { grid-template-columns: 1fr; margin-top: 0; }
  .polaroid.stack.split.has-thumbs .thumbs .thumb img, .polaroid.stack.split.has-thumbs .thumbs .thumb video { aspect-ratio: 4 / 3; }
  .polaroid.stack.split.has-thumbs .cap { grid-column: 1 / -1; }
}

/* ---- Ribbons: Janie's star and Milestones -------------------------------------------------------------- */
.ribbons { position: absolute; left: 0; bottom: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; z-index: 2; pointer-events: none; }
.ribbon { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 12px 4px 10px; color: #fff; border-radius: 0 999px 999px 0; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.ribbon.gold { background: linear-gradient(135deg, #E0A526, #C98A1A); color: #2E2A1F; }
.ribbon.milestone { background: var(--c4); }
.ribbon.inline { border-radius: 999px; padding: 3px 10px; box-shadow: none; }
.snap.is-featured .polaroid { box-shadow: 0 0 0 3px #E0A526, var(--shadow); }
.btn.star { border-color: #E0A526; }
.btn.star.on { background: #E0A526; color: #2E2A1F; border-color: #E0A526; }

/* ---- Strips: Featured, Fresh this week ------------------------------------------------------------------- */
.strip { display: flex; flex-direction: column; gap: 10px; }
.strip-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.strip-head h2, .section-title { font-size: 28px; }
.kicker { font-family: var(--f-hand); color: var(--c3); font-size: 20px; }
.strip-row { display: flex; gap: 22px; overflow-x: auto; padding: 14px 6px 18px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.strip-item { flex: 0 0 170px; scroll-snap-align: start; position: relative; display: flex; flex-direction: column; gap: 6px; }
.strip-note { font-size: 12px; font-weight: 700; color: var(--muted); }
.polaroid.mini { padding: 7px 7px 10px; }
.polaroid.mini img, .polaroid.mini video.frame { aspect-ratio: 1 / 1; }
.polaroid.mini .cap { font-size: 15px; padding-top: 6px; }
.polaroid.mini .ribbons { bottom: 34px; }
.polaroid.mini .no-photo { aspect-ratio: 1 / 1; font-size: 16px; }

/* ---- Callout cards: Birthdays, On this day, Talk of the family, Coming up ------------------------------- */
.callout-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.callout { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.callout ul, .callout ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.callout li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.callout li a { color: var(--ink); text-decoration: none; }
.birthdays { border-top: 6px solid var(--c5); }
.birthdays.party { background: radial-gradient(circle at 10% 20%, color-mix(in srgb, var(--c3) 30%, transparent) 0 6px, transparent 7px), radial-gradient(circle at 80% 30%, color-mix(in srgb, var(--c1) 30%, transparent) 0 5px, transparent 6px), radial-gradient(circle at 60% 80%, color-mix(in srgb, var(--c4) 30%, transparent) 0 5px, transparent 6px), var(--surface); background-size: 60px 60px, 80px 80px, 70px 70px, auto; }
.big-line { font-family: var(--f-display); font-weight: 800; font-size: 24px; margin: 0; }
.on-this-day { border-top: 6px solid var(--c4); }
.otd-row { display: flex; gap: 14px; overflow-x: auto; padding: 6px 4px 8px; }
.otd { flex: 0 0 140px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--muted); font-weight: 700; }
.otd .polaroid { transform: rotate(var(--tilt, 0deg)); }
.talk-of { border-top: 6px solid var(--c1); }
.talk-of li a { display: flex; gap: 12px; align-items: center; width: 100%; }
.talk-of li a > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.talk-of .react-sum { margin-left: 0; }
.thumb-sq { width: 56px; height: 56px; flex: none; border-radius: 10px; overflow: hidden; background: var(--line); }
.thumb-sq img, .thumb-sq video { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.coming-up { border-top: 6px solid var(--c2); }
.coming-up li { flex-direction: column; gap: 2px; }
.section-title { margin-top: 6px; }
@media (max-width: 760px) {
  .callout-pair { grid-template-columns: 1fr; }
  .strip-item { flex-basis: 150px; }
}
/* With only 1 or 2 extra photos, the thumbnails share the full width instead of leaving gaps. */
.thumbs.n2 { grid-template-columns: repeat(2, 1fr); }
.thumbs.n2 .thumb img, .thumbs.n2 .thumb video { aspect-ratio: 4 / 3; }
.thumbs.n1 { grid-template-columns: 1fr; }
.thumbs.n1 .thumb img, .thumbs.n1 .thumb video { aspect-ratio: 16 / 7; }

/* ---- Phones: 3 snaps across, as a compact photo wall ---------------------------------------------------- */
.count-badge { display: none; }
@media (max-width: 600px) {
  :root:not([data-view="list"]) .grid { columns: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; }
  :root:not([data-view="list"]) .grid .snap { margin: 0; }
  :root:not([data-view="list"]) .grid .snap .body, :root:not([data-view="list"]) .grid .snap .snap-meta, :root:not([data-view="list"]) .grid .snap .thumbs, :root:not([data-view="list"]) .grid .snap .stamp { display: none; }
  :root:not([data-view="list"]) .grid .caught { grid-column: 1 / -1; margin: 4px 0; font-size: 17px; }
  :root:not([data-view="list"]) .grid .polaroid, :root:not([data-view="list"]) .gfeed .polaroid, :root:not([data-view="list"]) .month .row .polaroid { padding: 4px 4px 6px; transform: none; }
  :root:not([data-view="list"]) .grid .polaroid img, :root:not([data-view="list"]) .grid .polaroid video.frame, :root:not([data-view="list"]) .gfeed .polaroid img, :root:not([data-view="list"]) .gfeed .polaroid video.frame, :root:not([data-view="list"]) .month .row .polaroid img, :root:not([data-view="list"]) .month .row .polaroid video.frame { aspect-ratio: 1 / 1; }
  :root:not([data-view="list"]) .grid .polaroid .cap, :root:not([data-view="list"]) .gfeed .polaroid .cap, :root:not([data-view="list"]) .month .row .polaroid .cap { font-size: 12px; padding-top: 4px; }
  :root:not([data-view="list"]) .grid .polaroid .no-photo, :root:not([data-view="list"]) .gfeed .polaroid .no-photo, :root:not([data-view="list"]) .month .row .polaroid .no-photo { aspect-ratio: 1 / 1; font-size: 12px; padding: 6px; }
  :root:not([data-view="list"]) .grid .count-badge { display: block; position: absolute; top: 4px; right: 4px; background: rgba(20, 16, 12, 0.7); color: #fff; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 999px; }
  :root:not([data-view="list"]) .grid .new-sticker, :root:not([data-view="list"]) .gfeed .new-sticker, :root:not([data-view="list"]) .month .row .new-sticker { font-size: 12px; padding: 1px 6px 0; top: -6px; left: -6px; }
  :root:not([data-view="list"]) .grid .play, :root:not([data-view="list"]) .gfeed .play, :root:not([data-view="list"]) .month .row .play { width: 30px; height: 30px; }
  :root:not([data-view="list"]) .grid .play::after, :root:not([data-view="list"]) .gfeed .play::after, :root:not([data-view="list"]) .month .row .play::after { border-left-width: 10px; border-top-width: 6px; border-bottom-width: 6px; margin-left: 3px; }
  :root:not([data-view="list"]) .grid .ribbons { bottom: 4px; gap: 2px; }
  :root:not([data-view="list"]) .grid .ribbon, :root:not([data-view="list"]) .gfeed .ribbon { font-size: 0; padding: 3px 6px; }
  :root:not([data-view="list"]) .grid .ribbon.gold::before { content: "★"; font-size: 11px; }
  :root:not([data-view="list"]) .grid .ribbon.milestone::before { content: "🏅"; font-size: 10px; }
  :root:not([data-view="list"]) .grid .polaroid.tape::before, :root:not([data-view="list"]) .gfeed .polaroid.tape::before { width: 44px; height: 12px; top: -6px; }
  :root:not([data-view="list"]) .gfeed, :root:not([data-view="list"]) .month .row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; }
  :root:not([data-view="list"]) .gfeed .snap-meta, :root:not([data-view="list"]) .month .row .snap-meta, :root:not([data-view="list"]) .gfeed .stamp, :root:not([data-view="list"]) .month .row .stamp, :root:not([data-view="list"]) .gfeed .media-badge, :root:not([data-view="list"]) .month .row .media-badge { display: none; }
  :root:not([data-view="list"]) .pickable .pick-box { width: 20px; height: 20px; top: 2px; left: 2px; }
  :root:not([data-view="list"]) .gfeed .in-groups { display: none; }
  .view-switch { display: inline-flex; }
}

/* Phone view switch: 3 across or 1 across (remembered per device). */
.view-switch { display: none; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.view-switch button { border: 0; background: transparent; padding: 6px 12px; font-weight: 700; font-size: 13px; color: var(--muted); }
.view-switch button[aria-pressed="true"] { background: var(--c2); color: #fff; }
/* Main photos keep (roughly) their own shape so heads aren't cut off; --ar comes from the photo's size. */
.polaroid .main-shot img, .polaroid .main-shot video.frame { aspect-ratio: var(--ar, 4 / 3); }

/* ---- Phones: compact everywhere ----------------------------------------------------------------------- */
@media (max-width: 600px) {
  main.wrap { padding-block: 12px 80px; gap: 14px; }
  header.top .wrap { padding-block: 6px; gap: 6px 10px; }
  .logo { font-size: 20px; }
  .logo .hand { font-size: 22px; }
  nav.tabs a { padding: 5px 9px; font-size: 14px; }
  .avatar.md { --size: 30px; }
  .masthead { padding-bottom: 10px; gap: 4px; background-size: 100% 4px; }
  .masthead h1 { font-size: 26px; }
  .masthead .issue { font-size: 16px; }
  .masthead .meta { font-size: 10px; }
  .cover { padding: 12px; gap: 12px; border-radius: 18px; }
  .cover h2 { font-size: 22px; margin: 4px 0 6px; }
  .cover .lede { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .callout-pair { gap: 12px; }
  .callout { padding: 12px 14px; gap: 6px; border-radius: 16px; }
  .big-line { font-size: 18px; }
  .strip { gap: 4px; }
  .strip-head h2, .section-title { font-size: 20px; }
  .kicker { font-size: 15px; }
  .strip-row { gap: 12px; padding: 8px 4px 10px; }
  .strip-item { flex-basis: 108px; }
  .polaroid.mini { padding: 4px 4px 6px; }
  .polaroid.mini .cap { font-size: 12px; padding-top: 3px; }
  .otd { flex-basis: 100px; font-size: 11px; }
  .thumb-sq { width: 44px; height: 44px; }
  .chips-row { gap: 5px; }
  .chip { padding: 4px 10px; font-size: 12px; }
  .filter-row { gap: 6px; }
  .filter-row select, .filter-row input[type="search"] { font-size: 13px; padding: 6px 10px; }
  .filter-row .btn { padding: 6px 12px; font-size: 13px; }
  .approve { padding: 8px 12px; font-size: 14px; }
  .fab { width: 52px; height: 52px; font-size: 30px; }
  /* 1-across view: slimmer cards. */
  .snap .body h3 { font-size: 19px; }
  .snap .body p { font-size: 14px; }
  .grid { column-gap: 14px; }
  .snap { margin-bottom: 20px; }
}
@media (max-width: 600px) {
  /* Compact: main photos at most square on phones (top kept in view). */
  .polaroid .main-shot img, .polaroid .main-shot video.frame { aspect-ratio: var(--arp, 1.333); }
}
@media (max-width: 600px) {
  .filter-row .view-switch { display: inline-flex; }
}

/* ---- Compact filters: one row (search, Filters button, clear, view switch) ------------------------------- */
.filters.compact { display: block; }
.filter-bar { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; position: relative; }
.filter-bar input[type="search"] { flex: 1 1 auto; min-width: 0; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-size: 14px; }
.filter-bar .btn { padding: 6px 12px; font-size: 13px; white-space: nowrap; }
.filter-bar .search-go { padding: 6px 10px; }
.filter-pop { position: static; }
.filter-pop > summary { list-style: none; cursor: pointer; }
.filter-pop > summary::-webkit-details-marker { display: none; }
.filter-pop[open] > summary { background: var(--c2); border-color: var(--c2); color: #fff; }
.filter-pop .count { margin-left: 6px; }
.filter-panel { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.filter-panel label.f { font-size: 12px; }
.filter-panel select { width: 100%; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 30%, var(--surface)); border-radius: 10px; padding: 7px 9px; font-size: 14px; }
.filter-panel .btn-row { grid-column: 1 / -1; margin: 0; justify-content: flex-end; }
.view-switch button { padding: 5px 10px; font-size: 15px; }
@media (max-width: 760px) {
  .filter-panel { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .filter-bar .view-switch { display: inline-flex; }
  .filter-bar input[type="search"] { padding: 6px 12px; font-size: 13px; }
}

/* ---- Month lines through All snaps --------------------------------------------------------------------- */
.month-line { display: flex; align-items: center; gap: 10px; column-span: all; grid-column: 1 / -1; margin: 2px 0 14px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.month-line::before, .month-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.month-line::before { flex: 0 0 18px; }
@media (max-width: 600px) {
  .month-line { margin: 2px 0 4px; font-size: 10px; }
}

/* ---- A group's own Feed and Stories: compact header with the group's tabs ------------------------------ */
.group-head { display: flex; flex-direction: column; gap: 8px; padding-bottom: 10px; border-bottom: 4px solid var(--cc); }
.gh-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gh-row h1 { font-size: clamp(26px, 5vw, 40px); }
.gh-row .members { margin: 0; gap: 2px; }
.gh-row .btn.tiny { margin: 0 0 0 auto; }
.group-head .subtabs { margin: 0; }
.group-head .chip { text-decoration: none; color: var(--ink); }
.group-head .chip[aria-pressed="true"] { color: #fff; }
.gpanel .chip { text-decoration: none; color: var(--ink); }
.gpanel .chip[aria-pressed="true"] { color: #fff; }
@media (max-width: 600px) {
  .gh-row h1 { font-size: 24px; }
  .group-head { gap: 6px; padding-bottom: 6px; }
  /* One row on a phone: the tabs scroll sideways, the bell and settings stay at the right. */
  .group-head .gh-tabs { flex-wrap: nowrap; gap: 6px; }
  .group-head .gh-tabs .subtabs { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 6px 2px; }
  .group-head .gh-tabs .subtabs::-webkit-scrollbar { display: none; }
  .group-head .gh-tabs .subtabs .chip { flex: none; }
  .group-head .gh-tabs .gh-settings { flex: none; padding: 6px 10px; }
  .group-head .gh-tabs .gh-settings span { display: none; }
  .group-head .gh-tabs .pill.adult { display: none; }
}
/* Photos inside comments. */
.cmt-photos { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.cmt-photos a { position: relative; display: block; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; background: var(--line); }
.cmt-photos img, .cmt-photos video { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.cmt-photos a.is-video::after { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.to-comment summary { list-style: none; width: fit-content; }
.to-comment summary::-webkit-details-marker { display: none; }
.to-comment[open] .form { border: 1px dashed var(--c3); border-radius: 14px; padding: 12px; margin-top: 8px; }
.to-comment select { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px; }

/* Feeds use the whole screen. Each group has its own feed; the picker beside the logo switches groups */
main.wrap.wide { max-width: 1680px; }
.wide .grid { columns: 290px; }
.gs-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cc); }
.gshare summary { cursor: pointer; font-size: 14px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
.gshare-body { display: flex; flex-direction: column; gap: 8px; padding: 8px 0 4px; max-width: 640px; }
.gshare-body p { margin: 0; }

.logo:has(+ .gpick) { margin-right: 0; }
.gpick { position: relative; margin-right: auto; min-width: 0; }
.gpick summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 15px; max-width: min(46vw, 320px); }
.gpick summary::-webkit-details-marker { display: none; }
.gpick summary b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gpick .caret { font-size: 12px; color: var(--muted); }
.gs-dot { flex: none; }
.gpick-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; }
.gpick-menu a { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
.gpick-menu a:hover, .gpick-menu a[aria-current="page"] { background: color-mix(in srgb, var(--cc, var(--c2)) 20%, transparent); }
.gpick-menu .gpick-all { border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; color: var(--muted); font-size: 14px; }
@media (max-width: 640px) {
  header.top .wrap:has(.gpick) { gap: 6px; }
  /* Logo, group picker, bell and profile picture all fit on one row. */
  .gpick summary { font-size: 13px; padding: 5px 9px; gap: 5px; max-width: calc(100vw - 266px); }
  header.top .bell { width: 30px; height: 30px; font-size: 15px; }
  header.top .bell-n { min-width: 17px; height: 17px; font-size: 10px; top: -4px; right: -5px; }
  .gpick-menu { position: fixed; top: calc(52px + env(safe-area-inset-top, 0px)); left: 16px; right: 16px; min-width: 0; }
}
.gh-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gh-tabs .gh-settings { margin-left: auto; text-decoration: none; color: var(--ink); }
.bell { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: 20px; line-height: 1; }
.bell:not(.has-new) span[aria-hidden] { opacity: .55; filter: grayscale(1); }
.bell.has-new { border-color: var(--c1); animation: bell-ring 1.2s ease 1; }
.bell-n { position: absolute; top: -5px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #D93A2B; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
@keyframes bell-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } }
@media (prefers-reduced-motion: reduce) { .bell.has-new { animation: none; } }
.activity { display: grid; gap: 16px; max-width: 760px; }
.act-card h2 { margin: 0 0 4px; }
.act-day { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 4px; }
.act-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.act { display: flex; gap: 10px; align-items: flex-start; padding: 8px 6px; border-radius: 12px; }
.act p { margin: 0; }
.act a { color: inherit; font-weight: 700; }
.act.is-new { background: color-mix(in srgb, var(--c1) 12%, transparent); }
.act-quote { color: var(--muted); font-style: italic; margin-top: 2px !important; overflow-wrap: anywhere; }
.act-guest-ico { width: 32px; height: 32px; display: grid; place-items: center; flex: none; }
.new-dot { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: #D93A2B; color: #fff; font-size: 10px; font-weight: 800; vertical-align: 2px; text-transform: uppercase; }
.act-msgs { display: block; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; }
.share-link h2 { display: flex; align-items: center; gap: 8px; }

/* "For Adults" banner across the top of photos hidden from the kids */
.gallery { position: relative; }
.adult-tag { position: absolute; top: 18px; left: 18px; z-index: 3; pointer-events: none; white-space: nowrap; background: #B3261E; color: #fff; font-weight: 800; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
.gallery > .adult-tag { top: 12px; left: 12px; font-size: 13px; }
@media (max-width: 640px) {
  :root:not([data-view="list"]) .grid .adult-tag, :root:not([data-view="list"]) .month .row .adult-tag { top: 8px; left: 8px; font-size: 8px; letter-spacing: 0.04em; padding: 2px 6px; }
}
.polaroid.mini .adult-tag { top: 10px; left: 10px; font-size: 9px; padding: 2px 7px; letter-spacing: 0.05em; }

/* Admin panel */
.admin-card { display: flex; flex-direction: column; gap: 12px; }
.admin-card h2 { margin: 0; }
.admin-card p { margin: 0; }
.admin-new { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.admin-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.admin-links li { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.admin-links li.is-new { border-color: var(--c1); box-shadow: 0 0 0 2px var(--c1); }
.admin-links li.is-off { opacity: 0.6; }
.admin-links .al-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.admin-links .copyline { display: flex; gap: 8px; }
.admin-links .copyline input { flex: 1; min-width: 0; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 30%, var(--surface)); border-radius: 10px; padding: 9px 12px; font-size: 14px; }
.admin-links .btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-links .btn-row form { margin: 0; }
.danger-text { color: var(--c1); }
.admin-tools { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) {
  .admin-new { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* The admin has one more tab: keep all six on one row */
  nav.tabs:has(a[href="/admin"]) { gap: 2px; }
  nav.tabs:has(a[href="/admin"]) a { padding: 5px 5px; font-size: 13px; }
}
.invite-link { border: 2px solid var(--c2); margin-bottom: 16px; }
.invite-link h2 { margin: 0 0 4px; }
/* Plan chat: replies, reactions and photos. */
.msg-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.msg.me .msg-col { align-items: flex-end; }
.reply-quote { display: block; margin: 2px 0 6px; padding: 4px 8px; border-left: 3px solid currentColor; border-radius: 6px; background: rgba(0, 0, 0, .12); font-size: 13px; color: inherit; opacity: .85; text-decoration: none; white-space: normal; }
.msg-photo { display: block; margin: 4px 0 6px; }
.msg-photo img { display: block; width: 100%; max-width: 280px; border-radius: 14px; }
.msg-reacts { display: flex; flex-wrap: wrap; gap: 4px; }
.msg-reacts form { margin: 0; }
.msg-reacts button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 1px 8px; font-size: 13px; }
.msg-reacts button span { font-size: 11px; font-weight: 800; color: var(--muted); }
.msg-reacts button[aria-pressed="true"] { border-color: var(--c1); }
.msg-actions { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; }
.msg-actions summary { cursor: pointer; color: var(--muted); font-weight: 700; list-style: none; }
.msg-actions summary::-webkit-details-marker { display: none; }
.msg-actions:has(details[open]) { width: 100%; }
.msg-actions details[open] { flex: 0 0 100%; order: 9; }
.msg-actions .composer-row { margin-top: 6px; }
/* Activity on phones: room to breathe, so wrapped lines never run into each other. */
.activity h2, .activity h3 { line-height: 1.3; }
.act { line-height: 1.45; }
.act .avatar, .act-guest-ico { flex: none; }
.act > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.act p { line-height: 1.45; }
.act .new-dot { line-height: 1.6; }
@media (max-width: 600px) {
  .gpanel:has(.activity) { padding: 10px; border-radius: 16px; }
  .act-card { padding: 14px 12px; }
  .act { padding: 8px 4px; gap: 8px; }
  .act p { font-size: 15px; }
}
@media (max-width: 600px) {
  .chat-wrap.cute .msg { max-width: 96%; gap: 6px; }
  .card.plan-chat { padding: 14px 10px; }
  .chat-wrap.cute .chat { padding: 10px 4px; }
}
/* Guests' comments sit in the same list as the family's. */
.cmt.is-guest .guest-ico { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 999px; background: color-mix(in srgb, var(--c3) 22%, var(--surface)); font-size: 15px; }
.comment-form { display: flex; flex-direction: column; gap: 8px; }
.also-post { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.also-post legend { float: left; margin-right: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
/* @mentions */
.mention { font-weight: 800; color: var(--c4); background: color-mix(in srgb, var(--c4) 16%, transparent); border-radius: 6px; padding: 0 3px; }
.mention-pop { position: absolute; z-index: 60; width: 220px; max-height: 240px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px rgba(0, 0, 0, .3); padding: 4px; display: flex; flex-direction: column; }
.mention-pop button { text-align: left; border: 0; background: none; color: var(--ink); padding: 9px 10px; border-radius: 8px; font-weight: 700; font-size: 15px; }
.mention-pop button.on, .mention-pop button:hover { background: color-mix(in srgb, var(--c4) 22%, var(--surface)); }
.plan-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.stage-badge.st-4 { background: #8E5BB5; }
.stage-steps { grid-template-columns: repeat(5, 1fr); }
.stage-steps .step-info .step-dot { background: color-mix(in srgb, #8E5BB5 30%, var(--surface)); }
.stage-steps .step-info.now .step-static { border-color: #8E5BB5; background: color-mix(in srgb, #8E5BB5 28%, var(--surface)); }
.stage-steps .step-info.now .step-dot { background: #8E5BB5; }
@media (max-width: 600px) { .stage-steps { grid-template-columns: repeat(2, 1fr); } .stage-steps .step-info { grid-column: 1 / -1; } }
.when-field { display: flex; flex-direction: column; gap: 6px; }
.when-field > label { font-size: 14px; font-weight: 700; }
/* Plan cards: title first, one quiet line of details, a small footer. */
.plan { border-top: 5px solid var(--pc, var(--c4)); gap: 6px; }
.plan h3 { font-size: 20px; line-height: 1.25; margin: 2px 0 0; }
.plan .plan-top { justify-content: space-between; }
.plan-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); font-weight: 700; }
.plan-meta .pm-adult { color: #E08A80; }
.plan-foot { display: flex; gap: 14px; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); }

.plan-place { margin: 0; font-weight: 700; }
.plan-place a { color: var(--c4); }
.theme-jump { display: inline-block; margin: 6px 0 4px; font-weight: 700; color: var(--c3); }
#site-theme { scroll-margin-top: 90px; }
/* Birthdays page */
.bday-link { margin: 4px 0 16px; width: fit-content; }
.see-all { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: inherit; opacity: .85; }
.bday-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.bday-month h2 { font-size: 20px; margin: 0 0 8px; }
.bday-month.is-now { border: 2px solid var(--c5); }
.bday-month ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bday-month li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; }
.bday-month li.is-soon { background: color-mix(in srgb, var(--c3) 14%, transparent); }
.bday-month li.is-today { background: color-mix(in srgb, var(--c5) 28%, transparent); font-weight: 800; }
.bday-day { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: color-mix(in srgb, var(--c5) 22%, var(--surface)); }
.bday-name { flex: 1; min-width: 0; }
.bday-name a { color: inherit; font-weight: 700; }
.bday-when { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); }
/* Add an event: simple by default; "Plan an event together" shows the planning fields. */
.mode-pick { display: grid; gap: 8px; }
.mode-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.mode-opt input { margin-top: 4px; accent-color: var(--c2); }
.mode-opt span { display: flex; flex-direction: column; gap: 2px; }
.mode-opt small { color: var(--muted); }
.mode-opt:has(input:checked) { border: 2px solid var(--c2); background: color-mix(in srgb, var(--c2) 16%, var(--surface)); }
.plan-form .planning-only { display: flex; flex-direction: column; gap: 14px; }
.plan-form:has(input[name="mode"][value="event"]:checked) .planning-only,
.plan-form:has(input[name="mode"][value="event"]:checked) .for-plan,
.plan-form:has(input[name="mode"][value="plan"]:checked) .for-event { display: none; }
.plan-desc { font-size: 14px; color: var(--muted); }
.plan-foot[hidden] { display: none; }
.simple-event .desc { font-size: 17px; }
/* Birthday wish lists */
.wish { display: flex; flex-direction: column; gap: 10px; }
.wish h1 { margin: 0; }
.wish h2 { font-size: 20px; margin: 10px 0 0; }
.wish-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wish-items li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.wish-items li.is-claimed { background: color-mix(in srgb, var(--c2) 14%, transparent); }
.wish-items li.is-claimed .wi-text > a, .wish-items li.is-claimed .wi-text { opacity: .9; }
.wi-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; font-weight: 700; }
.wi-text a { color: inherit; }
.wi-claim { font-size: 12px; color: #7FD3A1; font-weight: 800; }
.wi-actions { flex: none; display: flex; align-items: center; gap: 6px; }
.wi-actions form { margin: 0; }
.wish-add { margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--line); }
.wish-add h3 { margin: 0; }
.wish-settings summary { list-style: none; width: fit-content; }
.wish-settings summary::-webkit-details-marker { display: none; }
.wish-settings[open] summary { margin-bottom: 10px; }
/* Day-of wishes for a Cool Family Event. */
.ce-wish { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.wish-call { display: flex; align-items: center; gap: 12px; padding: 14px; margin: 0 0 14px; border-radius: 16px; text-decoration: none; color: var(--ink);
  background: linear-gradient(120deg, color-mix(in srgb, var(--c5) 30%, var(--surface)), color-mix(in srgb, var(--c1) 22%, var(--surface))); border: 1px solid color-mix(in srgb, var(--c5) 45%, transparent); }
.wish-call > span:first-child { font-size: 28px; }
.card.wishes { margin-top: 14px; }
.bw-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.bw-list li { padding: 10px 12px; border-radius: 14px; background: color-mix(in srgb, var(--c1) 14%, var(--surface)); }
/* Birthday list reminder: a banner across every page, for the kid's parents. */
.wish-banner { background: linear-gradient(100deg, color-mix(in srgb, var(--c5) 34%, var(--surface)), color-mix(in srgb, var(--c3) 30%, var(--surface)));
  border-bottom: 1px solid color-mix(in srgb, var(--c5) 45%, transparent); }
.wb-row { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding: 10px 16px; color: var(--ink); }
.wb-row + .wb-row { border-top: 1px dashed color-mix(in srgb, var(--c5) 35%, transparent); }
.wb-ico { font-size: 24px; flex: none; }
.wb-text { flex: 1 1 260px; min-width: 0; font-size: 14px; }
.wb-row form { margin: 0; }
.wb-row .linkish { font-size: 12px; }
.wish-nudge-set { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; margin: 18px 0 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2, color-mix(in srgb, var(--ink) 4%, var(--surface))); }
.wish-nudge-set small { display: block; }
.bday-list { flex: none; font-size: 12px; font-weight: 800; color: var(--c5); text-decoration: none; border: 1px solid color-mix(in srgb, var(--c5) 50%, transparent); border-radius: 999px; padding: 2px 8px; }
.bday-list.add { color: var(--muted); border-style: dashed; border-color: var(--line); }
/* Cool Family Events: the Birthdays card's look, in its own color. */
.callout.cool-events { border-top: 6px solid var(--c4); margin: 4px 0 22px; }
.callout.cool-events .kicker { color: var(--c4); }
.cool-events.party { background: radial-gradient(circle at 15% 25%, color-mix(in srgb, var(--c4) 30%, transparent) 0 6px, transparent 7px), radial-gradient(circle at 75% 35%, color-mix(in srgb, var(--c3) 30%, transparent) 0 5px, transparent 6px), var(--surface); background-size: 60px 60px, 80px 80px, auto; }
.ce-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
/* Each event: its line, the last 48 hours of messages as quotes, and a box to send one. */
.cool-events li.ce-event { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 0; border-bottom: 1px dashed var(--line); scroll-margin-top: 80px; }
.cool-events li.ce-event:last-child { border-bottom: 0; }
.ce-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.ce-for { font-size: 13px; }
.ce-quotes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ce-quotes li { padding: 8px 12px; border-left: 4px solid var(--c4); border-radius: 4px 12px 12px 4px; background: color-mix(in srgb, var(--c4) 12%, var(--surface)); }
.ce-quotes blockquote { margin: 0; font-family: var(--f-hand); font-size: 20px; line-height: 1.2; }
.ce-quotes small { color: var(--muted); font-weight: 700; }
.msg-waiting { display: block; margin-top: 4px; font-size: 12px; opacity: .8; }
.ce-quotes li.is-waiting { border-left-style: dashed; background: transparent; outline: 1px dashed color-mix(in srgb, var(--c4) 45%, transparent); opacity: .85; }
.ce-send { display: flex; gap: 6px; margin: 0; width: 100%; max-width: 560px; }
.ce-send input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.birthdays li.is-past { opacity: .55; }
.bc-next { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 4px; }
/* Notes: a notebook page. The text sits on ruled lines (28px apart), a red margin line, punched holes on the left. */
.notebook { --line: 28px; position: relative; display: flex; flex-direction: column; gap: 0; text-decoration: none; color: #2b2a33;
  background-color: #FFFDF4;
  background-image:
    radial-gradient(circle at 14px 50%, var(--bg) 0 6px, transparent 6.5px),
    linear-gradient(90deg, transparent 38px, rgba(217, 72, 43, .55) 38px 40px, transparent 40px),
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--line) - 1px), rgba(58, 110, 165, .35) calc(var(--line) - 1px) var(--line));
  background-size: 28px 56px, auto, auto;
  background-repeat: repeat-y, no-repeat, repeat;
  background-position: 0 14px, 0 0, 0 12px;
  border-radius: 6px 14px 14px 6px; padding: 12px 18px 16px 52px; box-shadow: 0 6px 18px rgba(0, 0, 0, .28); transform: rotate(var(--tilt, 0deg)); line-height: var(--line); min-height: 220px; overflow: hidden; }
.notebook .nb-kicker { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8a6d3b; line-height: var(--line); }
.notebook .nb-title { font-family: var(--f-hand); font-size: 26px; line-height: var(--line); color: #1f3a5f; margin: 0 0 0; }
.notebook .nb-text { font-size: 16px; line-height: var(--line); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.notebook .nb-more { font-weight: 800; color: #c0392b; line-height: var(--line); }
.notebook .nb-sign { font-family: var(--f-hand); font-size: 20px; color: #1f3a5f; line-height: var(--line); align-self: flex-end; margin-top: 4px; }
.notebook .adult-tag { left: 52px; }
.notebook .new-sticker { right: 10px; top: 8px; }
.note-card .notebook { margin-bottom: 10px; }
.note-card .notebook:hover { transform: rotate(var(--tilt, 0deg)) translateY(-2px); }
/* The note's own page: the whole note, a bit bigger, not tilted. */
.snap-full.is-note .notebook.full { transform: none; min-height: 360px; padding: 18px 24px 24px 60px; --line: 32px; background-position: 0 16px, 0 0, 0 18px; }
.snap-full.is-note .notebook.full .nb-title { font-size: 30px; line-height: var(--line); margin-bottom: var(--line); }
.snap-full.is-note .notebook.full .nb-text { font-size: 18px; }
.snap-full.is-note .gallery[hidden] { display: none; }
.note-switch { display: inline-block; margin: 2px 0 6px; font-weight: 700; color: var(--c3); }
/* In the small polaroid rows (Fresh this week...), a note shows as a mini page. */
.polaroid .no-photo { overflow-wrap: anywhere; }
/* Notes on the feed are the same size as photo cards: the start of the note, faded out at the bottom. */
.note-card .notebook { aspect-ratio: 4 / 5; min-height: 0; }
.note-card .notebook::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: linear-gradient(to bottom, rgba(255, 253, 244, 0), #FFFDF4 70%); pointer-events: none; }
.note-card .notebook .nb-more { position: absolute; z-index: 1; bottom: 10px; right: 16px; }
.note-card .notebook .nb-text { overflow: hidden; }
@media (max-width: 600px) {
  /* The phone's 3-across wall: a mini notebook page the size of a photo. */
  :root:not([data-view="list"]) .grid .note-card .notebook { --line: 14px; aspect-ratio: 109 / 133; height: auto; min-height: 0; padding: 6px 6px 8px 18px; transform: none; border-radius: 3px 6px 6px 3px;
    background-image: radial-gradient(circle at 6px 50%, var(--bg) 0 2.5px, transparent 3px), linear-gradient(90deg, transparent 14px, rgba(217, 72, 43, .55) 14px 15px, transparent 15px), repeating-linear-gradient(to bottom, transparent 0 13px, rgba(58, 110, 165, .35) 13px 14px);
    background-size: 12px 24px, auto, auto; background-position: 0 6px, 0 0, 0 4px; }
  :root:not([data-view="list"]) .grid .note-card .nb-kicker { display: none; }
  :root:not([data-view="list"]) .grid .note-card .nb-title { font-size: 13px; line-height: 14px; margin-bottom: 2px; }
  :root:not([data-view="list"]) .grid .note-card .nb-text { font-size: 10px; line-height: 14px; }
  :root:not([data-view="list"]) .grid .note-card .nb-more { display: none; }
  :root:not([data-view="list"]) .grid .note-card .notebook::after { height: 28px; }
  :root:not([data-view="list"]) .grid .note-card .adult-tag { left: 18px; }
}
@media (max-width: 600px) { :root:not([data-view="list"]) .grid .note-card { align-self: start; } }
/* No punched holes: just the red margin line and the ruled lines. */
.notebook { background-image: linear-gradient(90deg, transparent 38px, rgba(217, 72, 43, .55) 38px 40px, transparent 40px), repeating-linear-gradient(to bottom, transparent 0 calc(var(--line) - 1px), rgba(58, 110, 165, .35) calc(var(--line) - 1px) var(--line));
  background-size: auto, auto; background-repeat: no-repeat, repeat; background-position: 0 0, 0 12px; padding-left: 50px; }
.snap-full.is-note .notebook.full { background-position: 0 0, 0 18px; padding-left: 54px; }
@media (max-width: 600px) {
  :root:not([data-view="list"]) .grid .note-card .notebook { background-image: linear-gradient(90deg, transparent 12px, rgba(217, 72, 43, .55) 12px 13px, transparent 13px), repeating-linear-gradient(to bottom, transparent 0 13px, rgba(58, 110, 165, .35) 13px 14px);
    background-size: auto, auto; background-position: 0 0, 0 4px; padding-left: 16px; }
}
/* Sensitive topic label and the switch on a note's page. */
.notebook .nb-sensitive { align-self: flex-start; font-size: 12px; font-weight: 800; line-height: 1.6; color: #fff; background: #8E5BB5; border-radius: 999px; padding: 0 10px; margin: 2px 0; }
.sens-toggle { display: inline-flex; gap: 0; border: 1px solid var(--line); border-radius: 999px; padding: 3px; width: fit-content; }
.sens-toggle .btn { border: 0; background: none; }
.sens-toggle .btn[aria-pressed="true"] { background: color-mix(in srgb, #8E5BB5 30%, var(--surface)); color: var(--ink); }
.sens-toggle .btn[aria-pressed="true"]:first-child { background: color-mix(in srgb, var(--c2) 30%, var(--surface)); }
@media (max-width: 600px) { :root:not([data-view="list"]) .grid .note-card .nb-sensitive { font-size: 8px; padding: 0 5px; line-height: 14px; } }
/* Admin: fixing imported comments that landed on the wrong photo. */
.fx-group { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.fx-list { display: grid; gap: 12px; }
.fx-row { display: grid; gap: 10px; padding: 14px; }
.fx-pick { display: flex; gap: 10px; align-items: flex-start; }
.fx-pick input { margin-top: 4px; flex: none; }
.fx-move { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.fx-photo { display: flex; gap: 10px; align-items: center; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.fx-photo img, .fx-noimg { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--line); }
.fx-photo > span { display: flex; flex-direction: column; min-width: 0; }
.fx-photo b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-arrow { font-size: 22px; color: var(--c2); font-weight: 900; }
.fx-go { position: sticky; bottom: 12px; }
@media (max-width: 600px) { .fx-move { grid-template-columns: 1fr; } .fx-arrow { transform: rotate(90deg); justify-self: center; } }
/* Import preview as a matching report: each photo with its texts; move any text to the photo before or after. */
.import-list { grid-template-columns: 1fr; max-height: none; overflow: visible; }
.imp-card { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 14px; padding: 6px; background: var(--surface); }
.imp-card.off { opacity: .5; }
.imp-card .imp { border: 0; padding: 4px; background: none; }
.imp-texts summary { cursor: pointer; font-weight: 800; font-size: 14px; padding: 4px 8px; color: var(--c2); }
.imp-texts ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.imp-text { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--bg) 25%, var(--surface)); }
.imp-text > span:first-child { flex: 1 1 300px; min-width: 0; }
.imp-text small { color: var(--muted); font-size: 12px; }
.imp-text.is-auto { outline: 1px dashed var(--c3); }
.imp-moves { display: flex; gap: 6px; flex-wrap: wrap; }
.imp-note { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.imp-left { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 6px; }
.imp-left .muted { margin: 4px 8px; }
/* Report header: include box, photo, a typed-in name, and "combine with the post above". */
.imp-card .imp { cursor: default; flex-wrap: wrap; }
.imp-inc { display: flex; align-items: center; cursor: pointer; }
.imp-card .imp > span { flex: 1 1 220px; }
.imp-name { width: 100%; font: inherit; font-weight: 800; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 5px 8px; }
.imp-name::placeholder { color: var(--ink); opacity: .75; font-weight: 700; }
.imp-combine { flex: none; }
.imp-text.is-note { outline: 1px solid color-mix(in srgb, var(--c3) 60%, transparent); }

/* ---- Import drafts: list on the import page, the editor, and notes/comments that came from it ---- */
.draft-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.draft-list li { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.draft-list .btn-row { margin-top: 4px; }
.cmt-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.cmt-body small .pill.adult { margin-left: 6px; font-size: 11px; padding: 1px 8px; }
.nb-photos { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.nb-photos img { flex: 1 1 0; min-width: 0; max-width: 70%; aspect-ratio: 4 / 3; object-fit: cover; background: #fff; padding: 4px 4px 12px; box-shadow: 0 2px 6px rgba(0,0,0,.2); transform: rotate(-1.5deg); }
.nb-photos img:nth-child(2) { transform: rotate(1.5deg); }
.nb-photos span { font-weight: 800; font-size: 13px; }
.dr-top { padding: 10px 14px; }
.btn[hidden], .dr-top [hidden], .dr-list [hidden] { display: none; }
.dr-nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dr-nav select { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 6px 10px; font-size: 15px; font-weight: 700; }
.dr-nav .btn.tiny, .dr-tools .btn.tiny, .dr-bar .btn.tiny { margin-top: 0; }
.dr-save { margin-left: auto; }
.dr-stats { margin: 6px 0 0; }
.dr-help summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.dr-help ul { font-size: 14px; margin: 6px 0; padding-left: 20px; }
.dr-top .btn-row { margin-top: 6px; }
.dr-list { display: grid; gap: 14px; margin: 14px 0 90px; }
.dr-post { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 12px; }
.dr-post.is-loose { background: color-mix(in srgb, var(--bg) 45%, var(--surface)); border-style: dashed; }
.dr-post.is-deleted, .dr-item.is-deleted, .dr-tile.is-deleted { opacity: .45; }
.dr-post.is-adult { border-color: color-mix(in srgb, var(--c1) 55%, var(--line)); }
.dr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.dr-kind { font-weight: 800; }
.dr-head .dr-tools { margin-left: auto; }
.dr-tools { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.dr-tools .btn.tiny { padding: 3px 8px; }
.dr-tools .btn.tiny.on { background: color-mix(in srgb, var(--c1) 30%, var(--surface)); }
.dr-who { font-size: 14px; }
.dr-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 4px; }
.dr-title { flex: 1 1 240px; font: inherit; font-weight: 800; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 6px 8px; }
.dr-title::placeholder { color: var(--ink); opacity: .6; }
.dr-fields select, .dr-meta select, .dr-radd select { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 5px 8px; font-size: 14px; }
.dr-sect { margin: 12px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.dr-covers { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.dr-tile { position: relative; border: 2px solid transparent; border-radius: 12px; padding: 4px; background: color-mix(in srgb, var(--bg) 25%, var(--surface)); }
.dr-tile.is-sel, .dr-item.is-sel { border-color: var(--c2); background: color-mix(in srgb, var(--c2) 14%, var(--surface)); }
.dr-tile .dr-check { position: absolute; top: 8px; left: 8px; z-index: 1; background: var(--surface); border-radius: 6px; padding: 2px 4px; }
.dr-tile .dr-tools { margin-top: 4px; justify-content: center; }
.dr-thumb { display: block; position: relative; }
.dr-tile .dr-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.dr-item .dr-thumb img { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; display: block; }
.dr-thumb.is-video::after { content: "▶"; position: absolute; inset: auto auto 8px 8px; background: rgba(0,0,0,.6); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 12px; }
.dr-missing { display: grid; place-items: center; min-height: 90px; border: 1px dashed var(--line); border-radius: 8px; font-size: 13px; color: var(--muted); }
.dr-items { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.dr-item { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-start; border: 2px solid transparent; border-radius: 12px; padding: 8px; background: color-mix(in srgb, var(--bg) 20%, var(--surface)); }
.dr-item.is-adult { box-shadow: inset 4px 0 0 color-mix(in srgb, var(--c1) 60%, transparent); }
.dr-check { display: flex; align-items: center; cursor: pointer; padding-top: 2px; }
.dr-check input { width: 18px; height: 18px; accent-color: var(--c2); }
.dr-body { flex: 1 1 260px; min-width: 0; }
.dr-meta { font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.dr-meta small { color: var(--muted); }
.dr-text { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.dr-body textarea { width: 100%; font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--surface); color: var(--ink); margin-top: 4px; }
.dr-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 4px; font-size: 13px; }
.dr-pop { position: relative; }
.dr-pop summary { cursor: pointer; list-style: none; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 700; background: var(--surface); }
.dr-pop summary::-webkit-details-marker { display: none; }
.dr-pop[open] summary { border-color: var(--c2); }
.dr-pop-body { position: absolute; right: 0; z-index: 6; margin-top: 6px; width: min(460px, 86vw); max-height: 360px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.dr-fields .dr-pop-body { left: 0; right: auto; }
.dr-sub { width: 100%; font-size: 12px; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.dr-reacts { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 4px; }
.dr-radd { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.dr-radd .btn.tiny { margin-top: 0; font-size: 16px; padding: 2px 8px; }
.dr-bar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 20; width: min(980px, calc(100vw - 24px)); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--surface); border: 2px solid var(--c2); border-radius: 16px; padding: 10px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.22); }
.dr-bar[hidden] { display: none; }
.dr-add { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.dr-add select { max-width: 240px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 5px 8px; font-size: 14px; }
.import-card .warn { color: color-mix(in srgb, var(--c1) 70%, var(--ink)); font-weight: 700; }
@media (max-width: 640px) {
  .dr-head .dr-tools { margin-left: 0; }
  .dr-item .dr-tools { width: 100%; }
}
/* A note's photos, taped onto the notebook page under the words. */
.nb-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.nb-gallery a, .nb-gallery video { display: block; background: #fff; padding: 6px 6px 18px; box-shadow: 0 2px 8px rgba(0,0,0,.18); transform: rotate(-1.2deg); }
.nb-gallery a:nth-child(even), .nb-gallery video:nth-child(even) { transform: rotate(1.4deg); }
.nb-gallery img, .nb-gallery video { width: 100%; height: auto; display: block; }
.nb-gallery video { padding-bottom: 6px; }
.nb-gallery:has(> :only-child) { grid-template-columns: minmax(0, 420px); }
