/* ===========================================================================
   Wade & Myra — design system
   Aesthetic: Apple "liquid glass" (translucent, blurred, soft depth)
   meets IKEA (clean, airy, uncomplicated). Restrained teal / aqua.
   Theme colours are driven by CSS variables so each admin can re-skin
   their own view live.
   =========================================================================== */

:root {
  --main: #19b8b0;          /* primary / accent (teal-aqua)  */
  --secondary: #bfeae7;     /* borders, hairlines, soft fills */
  --text: #13343b;          /* all readable text              */
  --bg: #eef7f7;            /* page wallpaper / background     */
  --font: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  --main-soft: color-mix(in srgb, var(--main) 14%, white);
  --main-ink: color-mix(in srgb, var(--main) 72%, black);
  --glass-rgb: 255, 255, 255;        /* glass tint (dark mode overrides) */
  --glass-op: 0.55;                  /* transparency — controlled by the slider */
  --glass: rgba(var(--glass-rgb), var(--glass-op));
  --glass-strong: rgba(var(--glass-rgb), calc(var(--glass-op) + 0.17));
  --hairline: color-mix(in srgb, var(--secondary) 70%, white);
  --shadow: 0 10px 40px rgba(19, 52, 59, 0.12);
  --shadow-soft: 0 4px 18px rgba(19, 52, 59, 0.08);
  --radius: 24px;
  --radius-sm: 14px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 600px at 12% -8%, color-mix(in srgb, var(--main) 22%, transparent), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, color-mix(in srgb, var(--secondary) 55%, transparent), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
a { color: var(--main-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 64px 0; }
.muted { color: color-mix(in srgb, var(--text) 55%, white); }
.center { text-align: center; }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 22px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .cols-2, .cols-3 { grid-template-columns: 1fr; } }

/* ---- Glass surfaces (Mythos "liquid glass") -------------------------------
   Clear, vivid glass: the background stays sharp and saturated through the
   surface, with a bright specular rim — like water, not frosted bathroom
   glass. Chromium browsers additionally REFRACT the backdrop at the edges
   via the #wm-lens SVG displacement filter (injected by common.js, gated by
   html.lens-ok). Safari/iOS gets everything except the bend. */
.glass {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02) 55%, rgba(255, 255, 255, 0.06)),
    var(--glass);
  backdrop-filter: blur(4px) saturate(190%) brightness(1.05);
  -webkit-backdrop-filter: blur(4px) saturate(190%) brightness(1.05);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    inset 1.5px 1.5px 1px -1px rgba(255, 255, 255, 0.9),
    inset -1px -1px 1px -0.5px rgba(255, 255, 255, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}
.card {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02) 55%, rgba(255, 255, 255, 0.05)),
    var(--glass);
  backdrop-filter: blur(4px) saturate(185%) brightness(1.04);
  -webkit-backdrop-filter: blur(4px) saturate(185%) brightness(1.04);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow-soft),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 1.5px 1.5px 1px -1px rgba(255, 255, 255, 0.85),
    inset -1px -1px 1px -0.5px rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  padding: 26px;
}
/* Chromium: bend the light at the edges (the "liquid" in liquid glass) */
.lens-ok .nav,
.lens-ok .modal,
.lens-ok .theme-panel,
.lens-ok .dropdown-menu,
.lens-ok .hero .kicker {
  backdrop-filter: url(#wm-lens) blur(3px) saturate(190%) brightness(1.05);
}
/* dark mode: same optics, quieter specular so rims don't glow like neon */
body.dark .glass, body.dark .card {
  box-shadow: var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 1px 1px 1px -0.5px rgba(255, 255, 255, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* ---- Top navigation (glass bar) ------------------------------------------ */
.nav {
  position: sticky; top: 14px; z-index: 50;
  margin: 14px auto 0; max-width: var(--maxw);
  display: flex; align-items: center; gap: 18px;
  padding: 10px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.12)),
    var(--glass-strong);
  backdrop-filter: blur(26px) saturate(190%);
  -webkit-backdrop-filter: blur(26px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  border-radius: 999px;
}
.nav .brand { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; white-space: nowrap; }
.nav .brand b { color: var(--main-ink); }
.nav .links { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
/* always-visible right-hand cluster (mode + palette + hamburger) */
.nav-controls { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.mode-btn {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--hairline); background: var(--glass-strong); cursor: pointer;
  font-size: 1.05rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-soft); transition: transform .15s ease, background .15s ease;
}
.mode-btn:hover { transform: scale(1.08); }
.nav a.link {
  padding: 8px 14px; border-radius: 999px; color: var(--text);
  font-size: .94rem; transition: background .15s ease;
}
.nav a.link:hover { background: var(--main-soft); text-decoration: none; }
.nav a.link.active { background: var(--main); color: #fff; }
.nav .admin-only { display: none; }
body.is-admin .admin-only { display: inline-flex; }

/* Nav dropdown (Hubs & Wifey → Both / Hubs / Wifey) */
.nav .dropdown { position: relative; }
.nav .dd-toggle {
  border: 0; background: none; font: inherit; cursor: pointer; color: var(--text);
  padding: 8px 14px; border-radius: 999px; transition: background .15s ease;
}
.nav .dd-toggle:hover, .nav .dropdown.open .dd-toggle { background: var(--main-soft); }
.nav .dd-toggle.active { background: var(--main); color: #fff; }
.dropdown-menu {
  position: absolute; top: 100%; left: 0; min-width: 170px; z-index: 60;
  margin-top: 8px; padding: 6px; display: none; flex-direction: column; gap: 2px;
}
/* invisible bridge across the 8px gap so hover isn't lost moving to the menu */
.nav .dropdown::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 12px; }
.dropdown.open .dropdown-menu { display: flex; }
.dropdown-menu a { padding: 9px 14px; border-radius: 12px; color: var(--text); font-size: .94rem; }
.dropdown-menu a:hover { background: var(--main-soft); text-decoration: none; }
.dropdown-menu a.active { background: var(--main); color: #fff; }
@media (max-width: 880px) {
  .dropdown-menu { position: static; display: flex; box-shadow: none; background: transparent;
    backdrop-filter: none; border: 0; padding: 0 0 4px 12px; }
}
.hamburger { display: none; background: none; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--text); }
@media (max-width: 880px) {
  .nav { border-radius: 22px; flex-wrap: wrap; }
  .nav .links { width: 100%; margin-left: 0; display: none; }
  .nav .links.open { display: flex; }
  .hamburger { display: block; }
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  background: var(--main); color: #fff; font: inherit; font-weight: 550;
  cursor: pointer; transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--main) 35%, transparent);
}
.btn:hover { transform: translateY(-1px); text-decoration: none; filter: brightness(1.1); }
.btn:active { transform: translateY(0); filter: brightness(0.96); }
/* Apple-style two-voice buttons: solid accent ("Learn more") and
   outlined accent ("Shop iPhone"). They invert cleanly in dark mode. */
.btn.ghost {
  background: transparent; color: var(--main-ink);
  border: 1.5px solid var(--main); box-shadow: none;
}
.btn.ghost:hover { background: var(--main); color: #fff; }
.btn.danger { background: #e5567a; box-shadow: 0 6px 18px rgba(229, 86, 122, .35); }
.btn.small { padding: 8px 16px; font-size: .9rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* Round option buttons — Apple's outlined voice: accent text + accent
   border on a quiet background. Primary stays the solid voice. */
.round-opt {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  background: transparent; color: var(--main-ink);
  border: 1.5px solid var(--main); cursor: pointer; font: inherit; font-weight: 550;
  transition: all .15s ease;
}
.round-opt:hover { background: var(--main); color: #fff; transform: translateY(-1px); }
.round-opt.primary { background: var(--main); color: #fff; border-color: var(--main); }
.round-opt.primary:hover { filter: brightness(1.07); }
.round-opt.warn { border-color: #e5567a; color: #c23a5e; background: transparent; }
.round-opt.warn:hover { background: #e5567a; color: #fff; }

/* ---- Forms --------------------------------------------------------------- */
label { font-weight: 550; font-size: .92rem; display: block; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=url], select, textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--text);
  background: rgba(255, 255, 255, 0.7); border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); outline: none; transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--main);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--main) 18%, transparent);
}
textarea { resize: vertical; min-height: 120px; }
.field { margin-bottom: 16px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 160px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check input { width: auto; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { padding: 70px 0 40px; text-align: center; }
.hero .kicker {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--hairline);
  font-size: .85rem; font-weight: 550; color: var(--main-ink); margin-bottom: 18px;
}
.hero p.lead { font-size: 1.18rem; max-width: 640px; margin: 0 auto 26px; }

/* ---- Article cards ------------------------------------------------------- */
.article-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.article-card .thumb { aspect-ratio: 16/10; background: var(--main-soft) center/cover no-repeat; }
.article-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--main-ink);
  background: var(--main-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; align-self: flex-start;
}
.article-card h3 { margin-bottom: 6px; }
.article-card .meta { font-size: .82rem; margin-top: auto; padding-top: 12px; }

/* ---- Album --------------------------------------------------------------- */
.album-grid { columns: 3 260px; column-gap: 16px; }
.album-grid .ph { break-inside: avoid; margin-bottom: 16px; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-soft); position: relative; background: #fff; }
.album-grid .ph img { width: 100%; transition: transform .3s ease; }
.album-grid .ph:hover img { transform: scale(1.03); }
.album-grid .ph .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px; color: #fff; font-size: .85rem; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; }
.chip { padding: 7px 14px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--hairline); cursor: pointer; font-size: .88rem; }
.chip.active { background: var(--main); color: #fff; border-color: var(--main); }

/* ---- Article view -------------------------------------------------------- */
.prose { font-size: 1.06rem; }
.prose img, .prose video { border-radius: var(--radius-sm); margin: 18px 0; box-shadow: var(--shadow-soft); }
.prose h2 { margin-top: 1.6em; }

/* ---- Footer -------------------------------------------------------------- */
footer.site {
  margin-top: 60px; padding: 40px 0; text-align: center; font-size: .9rem;
  color: color-mix(in srgb, var(--text) 60%, white);
}
footer.site .heart { color: var(--main); }

/* ---- Theme picker (round palette, top-right in the nav) ------------------ */
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; border: 2px solid #fff; cursor: pointer;
  padding: 0; flex: 0 0 auto;
  background: conic-gradient(#19b8b0, #6fd6cf, #bfeae7, #f5a6c0, #ffd28a, #a98bff, #19b8b0);
  box-shadow: var(--shadow-soft); transition: transform .15s ease;
}
.theme-toggle:hover { transform: scale(1.08) rotate(10deg); }
.theme-panel {
  position: fixed; right: 22px; top: 84px; z-index: 81; width: 330px; max-width: calc(100vw - 44px);
  padding: 22px; display: none;
  /* scroll inside the panel when it's taller than the window (small screens) */
  max-height: calc(100vh - 104px);
  max-height: calc(100dvh - 104px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
@media (max-width: 560px) {
  .theme-panel { right: 10px; top: 72px; max-height: calc(100dvh - 88px); }
}
.swatch-row .sub { font-size: .76rem; color: color-mix(in srgb, var(--text) 50%, white); margin-top: 1px; }
.theme-panel.open { display: block; animation: pop .18s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.theme-panel h3 { margin-bottom: 14px; }
.swatch-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.swatch-row input[type=color] { width: 44px; height: 44px; padding: 0; border: none; border-radius: 50%; background: none; cursor: pointer; }
.swatch-row input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.swatch-row input[type=color]::-webkit-color-swatch { border: 2px solid #fff; border-radius: 50%; box-shadow: var(--shadow-soft); }
.swatch-row .lbl { font-size: .9rem; }
.preset-dots { display: flex; gap: 8px; margin: 6px 0 16px; flex-wrap: wrap; }
.preset-dots .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; cursor: pointer; box-shadow: var(--shadow-soft); }

/* named theme presets */
.theme-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 6px 0 16px; }
.theme-chip {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 999px;
  border: 1px solid var(--hairline); background: var(--glass-strong); cursor: pointer;
  font-size: .82rem; font-weight: 550; color: var(--text); transition: border-color .15s ease, transform .1s ease;
}
.theme-chip:hover { transform: translateY(-1px); }
.theme-chip.active { border-color: var(--main); box-shadow: 0 0 0 2px color-mix(in srgb, var(--main) 30%, transparent); }
.theme-chip .tdot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #fff; flex: 0 0 auto; box-shadow: var(--shadow-soft); }

/* ---- Editor -------------------------------------------------------------- */
.editor-grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
@media (max-width: 960px) { .editor-grid { grid-template-columns: 1fr; } }
.toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1px solid var(--hairline); }
.toolbar button {
  border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 7px 11px;
  cursor: pointer; font: inherit; font-weight: 600; color: var(--text); min-width: 36px;
}
.toolbar button:hover { background: var(--main-soft); }
.toolbar .sep { width: 1px; background: var(--hairline); margin: 4px 6px; }
.editor-area {
  min-height: 360px; padding: 20px; outline: none; font-size: 1.05rem;
  background: rgba(255,255,255,.6); border-radius: 0 0 var(--radius) var(--radius);
}
.editor-area:empty:before { content: attr(data-placeholder); color: color-mix(in srgb, var(--text) 40%, white); }
.html-source { width: 100%; min-height: 380px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .9rem; display: none; }
/* segmented control — the chosen side fills solid so the choice is obvious */
.mode-toggle { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--hairline); }
.mode-toggle button { border: 0; background: none; padding: 8px 16px; border-radius: 999px;
  cursor: pointer; font: inherit; font-weight: 550; color: var(--text); transition: background .15s ease; }
.mode-toggle button:hover { background: var(--main-soft); }
.mode-toggle button.active { background: var(--main); color: #fff; }

/* Grok image studio */
.grok-box { padding: 18px; }
.grok-preview { width: 100%; border-radius: var(--radius-sm); background: var(--main-soft); margin-bottom: 12px; max-height: 360px; object-fit: contain; }
.grok-instructions { position: relative; }
.placeholder-hint { color: rgba(19,52,59,.20); } /* ~20% gray prompt text */
.addons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.addon-slot { position: relative; border: 1.5px dashed var(--hairline); border-radius: var(--radius-sm); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; background: rgba(255,255,255,.5); text-align: center; font-size: .8rem; color: var(--main-ink); }
.addon-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.addon-slot .num { position: absolute; top: 6px; left: 6px; background: var(--main); color: #fff; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; z-index: 2; }
.camera-roll { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px; }
.camera-roll img { height: 64px; width: 64px; object-fit: cover; border-radius: 10px; cursor: pointer; border: 2px solid transparent; flex: 0 0 auto; }
.camera-roll img.active { border-color: var(--main); }
.opt-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--secondary); border-top-color: var(--main); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Publish flow */
.share-list { display: grid; gap: 8px; margin: 14px 0; }
.share-list .check { padding: 10px 12px; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: rgba(255,255,255,.5); }
.social-preview { white-space: pre-wrap; background: rgba(255,255,255,.7); border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 14px; font-size: .92rem; margin-bottom: 10px; }

/* ---- Article media: sizing, alignment, galleries, reels ----------------- *
   Shared by the editor (.editor-area) and the published article (.prose) so
   what you arrange is exactly what gets published.                          */
.editor-area img, .editor-area video, .prose img, .prose video { max-width: 100%; height: auto; }
.editor-area::after, .prose::after, .gallery-grid::after, .reel-gallery::after { content: ""; display: block; clear: both; }
.wm-media { cursor: pointer; }
.wm-media.selected { outline: 3px solid var(--main); outline-offset: 2px; }

/* size presets (selectors scoped to img/video so they win over .prose img) */
img.media-s, video.media-s   { width: 32%; }
img.media-m, video.media-m   { width: 55%; }
img.media-l, video.media-l   { width: 78%; }
img.media-full, video.media-full { width: 100%; }
/* alignment + magazine-style text wrap */
img.align-left, video.align-left   { float: left;  margin: 6px 22px 14px 0; }
img.align-right, video.align-right { float: right; margin: 6px 0 14px 22px; }
img.align-center, video.align-center { float: none; display: block; margin: 18px auto; }
@media (max-width: 560px) {
  img.media-s, img.media-m, img.media-l, video.media-s, video.media-m, video.media-l { width: 100%; }
  img.align-left, img.align-right, video.align-left, video.align-right { float: none; display: block; margin: 18px auto; }
}

/* template filler text — tap once and it self-selects so typing replaces it */
.editor-area .tpl-fill { color: color-mix(in srgb, var(--text) 45%, transparent); font-style: italic; }

/* click-to-add placeholders (editor only — stripped on save) */
.wm-ph { display: flex; align-items: center; justify-content: center; text-align: center; gap: 6px;
  min-height: 120px; padding: 18px; margin: 14px 0; cursor: pointer; user-select: none;
  border: 2px dashed var(--main); border-radius: var(--radius-sm); background: var(--main-soft);
  color: var(--main-ink); font-weight: 600; }
.wm-ph:hover { filter: brightness(0.97); }

/* photo gallery template */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.gallery-grid img, .gallery-grid video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); margin: 0; }
.gallery-grid .wm-ph { min-height: 0; aspect-ratio: 1; margin: 0; }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* Reels (short-video mode) */
.reel-gallery { display: flex; gap: 16px; overflow-x: auto; padding: 8px 2px 16px; margin: 18px 0; scroll-snap-type: x mandatory; }
.reel { flex: 0 0 auto; width: min(300px, 78vw); aspect-ratio: 9 / 16; margin: 0; position: relative;
  scroll-snap-align: center; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); background: #000; }
.reel video, .reel img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; margin: 0; }
.reel .wm-ph, .reel-gallery > .wm-ph { width: 100%; height: 100%; min-height: 0; margin: 0; border-radius: 20px; }
.reel-gallery > .wm-ph { flex: 0 0 auto; width: min(300px, 78vw); aspect-ratio: 9 / 16; }
.reel-caption { text-align: center; color: var(--text); font-size: 1.02rem; margin: 6px 0 0; }

/* floating media control bar (resize / align / remove) */
.media-bar { position: fixed; z-index: 200; display: none; gap: 4px; align-items: center; padding: 6px;
  border-radius: 999px; background: var(--text); box-shadow: var(--shadow); }
.media-bar button { border: 0; background: transparent; color: #fff; cursor: pointer; font: inherit; font-weight: 600;
  font-size: .82rem; padding: 5px 9px; border-radius: 999px; line-height: 1; }
.media-bar button:hover { background: rgba(255,255,255,.16); }
.media-bar button.on { background: var(--main); color: #fff; }
.media-bar .mb-sep { width: 1px; height: 18px; background: rgba(255,255,255,.25); margin: 0 3px; }

/* media picker modal */
.media-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.media-pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-height: 52vh; overflow: auto; }
.media-pick-grid .pick { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden;
  cursor: pointer; border: 2px solid transparent; background: var(--main-soft); }
.media-pick-grid .pick img, .media-pick-grid .pick video { width: 100%; height: 100%; object-fit: cover; }
.media-pick-grid .pick:hover { border-color: var(--main); }
.media-pick-grid .pick .vbadge { position: absolute; bottom: 6px; right: 6px; background: rgba(0,0,0,.6);
  color: #fff; font-size: .7rem; padding: 2px 7px; border-radius: 999px; }

/* template chips */
.tpl-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tpl-chip { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--hairline); background: var(--glass-strong); font: inherit; font-weight: 600; font-size: .9rem; color: var(--text); }
.tpl-chip:hover { border-color: var(--main); background: var(--main-soft); }

/* ---- Wade & Myra's AI Studio --------------------------------------------- */
.st-srcrow { display: flex; gap: 10px; flex-wrap: wrap; }
.st-slot { position: relative; width: 92px; height: 92px; border: 1.5px dashed var(--hairline); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; overflow: hidden;
  background: rgba(255,255,255,.5); font-size: .78rem; color: var(--main-ink); flex: 0 0 auto; }
.st-slot.main { width: 140px; height: 140px; border-width: 2px; border-color: var(--main); }
.st-slot:hover { background: var(--main-soft); }
.st-slot img, .st-slot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-slot .st-slot-label { padding: 6px; line-height: 1.3; }
.st-slot.filled .st-slot-label { display: none; }
.st-x { position: absolute; top: 4px; right: 4px; z-index: 2; width: 24px; height: 24px; border-radius: 50%;
  border: 0; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; font-size: .75rem; line-height: 1; }
.st-play { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; z-index: 2;
  border: 0; background: var(--main); color: #fff; font-size: 1.4rem; cursor: pointer;
  box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; padding-left: 5px; }
.st-play:hover { transform: scale(1.08); }
.st-controls { display: flex; gap: 14px; flex-wrap: wrap; margin: 14px 0 4px; }
.st-controls .field { flex: 1 1 140px; min-width: 140px; margin-bottom: 8px; }
.st-extras { padding: 14px 16px; margin-top: 6px; background: rgba(255, 255, 255, 0.4); box-shadow: none; }
body.dark .st-extras { background: rgba(255, 255, 255, 0.05); }
.st-extras .check { display: block; margin: 6px 0; }
.st-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.st-result img, .st-result video { width: 100%; border-radius: var(--radius-sm); display: block; margin-bottom: 10px;
  max-height: 420px; object-fit: contain; background: rgba(0,0,0,.06); }
.st-result .opt-row { margin-top: 4px; }
.st-extend { border-radius: 999px; padding: 8px 12px; border: 1.5px solid var(--hairline); background: var(--glass-strong);
  font: inherit; font-weight: 550; font-size: .85rem; cursor: pointer; }
.st-hist { border: 1px solid var(--hairline); font: inherit; }
@media (max-width: 560px) {
  .st-slot { width: 76px; height: 76px; }
  .st-slot.main { width: 112px; height: 112px; }
  .st-results { grid-template-columns: 1fr; }
}

/* Studio chat (Ask Grok) */
.chat-log { max-height: 60vh; max-height: 60dvh; min-height: 240px; overflow-y: auto; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 560px) { .chat-log { min-height: 45dvh; max-height: calc(100dvh - 300px); } }
.chat-msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: .96rem; line-height: 1.5;
  user-select: text; -webkit-user-select: text; overflow-wrap: break-word; }
.chat-copy { align-self: flex-start; margin: -4px 0 4px 4px; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: .76rem; font-weight: 600; color: var(--main-ink); padding: 2px 8px; border-radius: 8px; }
.chat-copy:hover { background: var(--main-soft); }
.chat-msg.user { align-self: flex-end; background: var(--main); color: #fff; border-bottom-right-radius: 5px; }
.chat-msg.assistant { align-self: flex-start; background: rgba(255,255,255,.65); border: 1px solid var(--hairline); border-bottom-left-radius: 5px; }
body.dark .chat-msg.assistant { background: rgba(255,255,255,.08); }
.chat-inrow { display: flex; gap: 10px; align-items: flex-end; }
.chat-inrow textarea { flex: 1; resize: vertical; min-height: 48px; }
.chat-inrow button { flex: 0 0 auto; }

/* Modal */
.modal-back { position: fixed; inset: 0; background: rgba(19,52,59,.32); backdrop-filter: blur(6px); z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-back.open { display: flex; }
.modal { width: 560px; max-width: 100%; max-height: 88vh; overflow: auto; padding: 28px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); opacity: 0; background: rgba(20, 26, 30, 0.96); color: #fff; border: 1px solid rgba(255, 255, 255, 0.16); padding: 12px 22px; border-radius: 999px; z-index: 100; transition: all .25s ease; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Auth / dashboard niceties */
.auth-wrap { max-width: 420px; margin: 8vh auto; }
.pill-tabs { display: inline-flex; flex-wrap: wrap; max-width: 100%; gap: 4px; padding: 4px; border-radius: 24px; background: rgba(255,255,255,.6); border: 1px solid var(--hairline); }
.pill-tabs button { border: 0; background: none; padding: 8px 18px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 550; }
.pill-tabs button.active { background: var(--main); color: #fff; }
.empty { text-align: center; padding: 50px 20px; }

/* ===========================================================================
   Dark mode — toggled by `body.dark`. Keeps the admin's chosen --main /
   --secondary accents, but flips the background, text and glass surfaces.
   =========================================================================== */
body.dark {
  --bg: #0f1b1d;
  --text: #e8f1f1;
  --glass-rgb: 24, 36, 38;
  /* IMPORTANT: --glass/--glass-strong must be re-declared here, not just
     --glass-rgb. CSS resolves a var() inside a custom property where that
     property is DEFINED — so the :root versions bake in the light rgb and
     dark mode never reached buttons/pills (white text on white glass). */
  --glass: rgba(var(--glass-rgb), var(--glass-op));
  --glass-strong: rgba(var(--glass-rgb), calc(var(--glass-op) + 0.17));
  --hairline: rgba(255, 255, 255, 0.14);
  --main-soft: color-mix(in srgb, var(--main) 26%, #0f1b1d);
  --main-ink: color-mix(in srgb, var(--main) 78%, white);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 4px 18px rgba(0, 0, 0, 0.38);
}
body.dark .glass { border-color: rgba(255, 255, 255, 0.14); box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
/* Apple two-voice buttons invert naturally in dark: outlined accent text on
   dark glass, filling solid on hover. Destructive red just needs lightening. */
body.dark .round-opt.warn { color: #ff9eb5; border-color: #f06a8c; }
body.dark .lb-close:hover, body.dark .lb-nav:hover { background: rgba(255, 255, 255, 0.16); }
body.dark .lb-comments .cmt, body.dark .st-slot { background: rgba(255, 255, 255, 0.06); }
body.dark .chat-inrow textarea { background: rgba(255, 255, 255, 0.06); }
/* Night wallpapers (dark mode). Pick one in the theme panel; accents (main /
   secondary) still apply on top. Default = midnight. */
body.dark { background:
  radial-gradient(900px 500px at 80% -10%, color-mix(in srgb, var(--main) 32%, transparent), transparent 60%),
  linear-gradient(180deg, #0b1418, #0f1b1d 60%, #0a1013); }
body.dark[data-night] { background-attachment: fixed !important; }

/* "My background color" — use the picked Background colour even at night */
body.dark[data-night="color"] { background:
  radial-gradient(1000px 560px at 15% -8%, color-mix(in srgb, var(--main) 26%, transparent), transparent 60%),
  var(--bg); }

body.dark[data-night="midnight"] { background:
  radial-gradient(900px 500px at 80% -10%, color-mix(in srgb, var(--main) 32%, transparent), transparent 60%),
  linear-gradient(180deg, #0b1418, #0f1b1d 60%, #0a1013); }

body.dark[data-night="cityscape"] { background:
  radial-gradient(2px 2px at 18% 80%, rgba(255,196,120,.9), transparent),
  radial-gradient(2px 2px at 26% 86%, rgba(255,214,150,.8), transparent),
  radial-gradient(2px 2px at 38% 82%, rgba(180,210,255,.8), transparent),
  radial-gradient(2px 2px at 54% 88%, rgba(255,196,120,.9), transparent),
  radial-gradient(2px 2px at 67% 83%, rgba(200,220,255,.8), transparent),
  radial-gradient(2px 2px at 80% 87%, rgba(255,210,150,.85), transparent),
  radial-gradient(1200px 360px at 50% 118%, rgba(255,150,90,.30), transparent 70%),
  linear-gradient(180deg, #160e2b 0%, #241640 38%, #3a2350 62%, #0d0a18 100%); }

body.dark[data-night="starry"] { background:
  radial-gradient(1.6px 1.6px at 12% 18%, #fff, transparent),
  radial-gradient(1.4px 1.4px at 28% 12%, #fff, transparent),
  radial-gradient(1.8px 1.8px at 44% 22%, #fff, transparent),
  radial-gradient(1.2px 1.2px at 58% 10%, #cfe0ff, transparent),
  radial-gradient(1.6px 1.6px at 71% 26%, #fff, transparent),
  radial-gradient(1.3px 1.3px at 83% 14%, #fff, transparent),
  radial-gradient(1.5px 1.5px at 20% 40%, #fff, transparent),
  radial-gradient(1.2px 1.2px at 64% 44%, #e6ecff, transparent),
  radial-gradient(1.7px 1.7px at 90% 38%, #fff, transparent),
  radial-gradient(1100px 520px at 50% 120%, rgba(80,110,220,.28), transparent 70%),
  linear-gradient(180deg, #060818 0%, #0d1138 48%, #0a0c22 100%); }

body.dark[data-night="starcity"] { background:
  radial-gradient(1.6px 1.6px at 16% 16%, #fff, transparent),
  radial-gradient(1.4px 1.4px at 34% 12%, #fff, transparent),
  radial-gradient(1.5px 1.5px at 60% 18%, #cfe0ff, transparent),
  radial-gradient(1.4px 1.4px at 82% 14%, #fff, transparent),
  radial-gradient(2px 2px at 30% 86%, rgba(255,200,130,.9), transparent),
  radial-gradient(2px 2px at 52% 88%, rgba(255,214,150,.85), transparent),
  radial-gradient(2px 2px at 72% 85%, rgba(200,220,255,.8), transparent),
  radial-gradient(1200px 360px at 50% 120%, rgba(255,150,90,.26), transparent 70%),
  linear-gradient(180deg, #070a1e 0%, #141a3e 45%, #1d1330 78%, #0a0712 100%); }

body.dark[data-night="campfire"] { background:
  radial-gradient(700px 520px at 50% 112%, rgba(255,150,60,.55), transparent 62%),
  radial-gradient(420px 320px at 50% 118%, rgba(255,210,120,.55), transparent 60%),
  radial-gradient(1.4px 1.4px at 20% 16%, #fff7e8, transparent),
  radial-gradient(1.3px 1.3px at 70% 12%, #fff, transparent),
  linear-gradient(180deg, #0a0907 0%, #170f0a 55%, #241208 100%); }

body.dark[data-night="croatia"] { background:
  radial-gradient(360px 360px at 82% 16%, rgba(245,245,220,.5), transparent 60%),
  radial-gradient(1200px 280px at 50% 60%, rgba(120,170,200,.22), transparent 70%),
  linear-gradient(180deg, #07131d 0%, #0c2233 42%, #103044 60%, #061019 100%); }

body.dark[data-night="storm"] { background:
  repeating-linear-gradient(105deg, rgba(180,200,220,.06) 0 2px, transparent 2px 9px),
  radial-gradient(900px 500px at 30% -10%, rgba(150,170,200,.18), transparent 60%),
  linear-gradient(180deg, #11161c 0%, #1a222b 55%, #0c1116 100%); }
body.dark .glass, body.dark .card, body.dark .nav { border-color: rgba(255, 255, 255, 0.12); }
/* kill the bright white "sheen" in dark mode so light text stays readable */
body.dark .glass, body.dark .card { background-image: linear-gradient(155deg, rgba(255, 255, 255, 0.05), transparent 60%); }
body.dark .nav { background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 70%); }
body.dark .nav a.link, body.dark .dd-toggle, body.dark .brand { color: #eef5f5; }
body.dark .mode-btn { background: rgba(20, 30, 32, 0.72); border-color: rgba(255, 255, 255, 0.28); }
body.dark .mode-btn svg { stroke: #eef5f5; }
body.dark input, body.dark select, body.dark textarea { background: rgba(255, 255, 255, 0.06); color: var(--text); }
body.dark ::placeholder { color: rgba(255, 255, 255, 0.4); }
body.dark .editor-area { background: rgba(255, 255, 255, 0.04); }
body.dark .html-source, body.dark .social-preview, body.dark .addon-slot,
body.dark .share-list .check, body.dark .pill-tabs, body.dark .mock { background: rgba(255, 255, 255, 0.05); }
body.dark .album-grid .ph { background: #1a2628; }
body.dark .article-card .thumb { filter: brightness(0.85); }

/* ---- mode button icon ---------------------------------------------------- */
.mode-btn svg { width: 18px; height: 18px; stroke: var(--text); fill: none; }

/* ---- night wallpaper picker (in theme panel) ---------------------------- */
.night-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 14px; }
.night-swatch { height: 34px; border-radius: 10px; cursor: pointer; border: 2px solid transparent;
  font-size: .6rem; color: #fff; display: flex; align-items: flex-end; padding: 3px 4px; overflow: hidden;
  box-shadow: var(--shadow-soft); text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.night-swatch.active { border-color: var(--main); }

/* ===========================================================================
   Intro splash — "WADE & MYRA" fades into the liquid-glass site (once / session)
   =========================================================================== */
.intro {
  position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(800px 600px at 50% 40%, color-mix(in srgb, var(--main) 28%, transparent), transparent 70%),
    rgba(238, 247, 247, 0.65);
  backdrop-filter: blur(34px) saturate(190%); -webkit-backdrop-filter: blur(34px) saturate(190%);
  transition: opacity 1s ease, visibility 1s ease;
}
body.dark .intro { background:
  radial-gradient(800px 600px at 50% 40%, color-mix(in srgb, var(--main) 34%, transparent), transparent 70%),
  rgba(10, 16, 18, 0.7); }
.intro.hide { opacity: 0; visibility: hidden; }
.intro .word {
  font-size: clamp(2.2rem, 8vw, 5.5rem); font-weight: 700; letter-spacing: -0.03em; white-space: nowrap;
  background: linear-gradient(100deg, var(--main-ink) 10%, #ffffff 42%, var(--main) 58%, var(--main-ink) 90%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: introIn 1.1s cubic-bezier(.2,.7,.2,1) both, introSheen 2.4s ease-in-out .25s 1;
}
@keyframes introIn { from { opacity: 0; transform: translateY(16px) scale(.95); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes introSheen { 0% { background-position: 130% 0; } 100% { background-position: -30% 0; } }

/* ===========================================================================
   Floating "life view" photo background (home)
   =========================================================================== */
/* per-theme background graphic (day & night) — behind everything, opacity via slider */
#theme-bg { position: fixed; inset: 0; z-index: -2; background-size: cover; background-position: center;
  opacity: var(--wallpaper-op, .4); pointer-events: none; transition: opacity .5s ease; }

/* glass transparency slider */
.theme-panel input[type=range] { width: 100%; accent-color: var(--main); }

.floating-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.floating-bg::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(244,251,251,.42), rgba(238,247,247,.60) 60%, rgba(238,247,247,.74)); }
body.dark .floating-bg::after { background: linear-gradient(180deg, rgba(10,16,18,.55), rgba(10,16,18,.72) 60%, rgba(10,16,18,.82)); }
.floating-bg .tile {
  position: absolute; border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.5); box-shadow: 0 18px 50px rgba(19,52,59,.22);
  opacity: 0; transform: translateY(20px);
  animation: tileIn 1.4s ease forwards, floaty ease-in-out infinite;
}
.floating-bg .tile img, .floating-bg .tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes tileIn { to { opacity: var(--o, .6); transform: none; } }
@keyframes floaty { 0%,100% { translate: 0 0; } 50% { translate: 0 -18px; } }
@media (max-width: 760px) { .floating-bg .tile:nth-child(n+8) { display: none; } }

/* ===========================================================================
   Album — hover comments + lightbox + edit mode
   =========================================================================== */
.album-grid .ph { cursor: pointer; }
.album-grid .ph .ph-hover {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  padding: 14px; opacity: 0; transition: opacity .22s ease;
  background: linear-gradient(transparent, rgba(10, 20, 22, 0.12) 28%, rgba(10, 20, 22, 0.66));
}
/* hover overlays only on devices that can really hover — on touch screens
   they stuck over the photo/video (tap = sticky hover on iOS) */
@media (hover: hover) {
  .album-grid .ph:hover .ph-hover, .album-grid .ph:focus-within .ph-hover { opacity: 1; }
}
@media (hover: none) {
  .album-grid .ph .ph-hover { display: none; }
  .ph-share { opacity: 1; } /* share icon always visible on touch */
}
.ph-meta { color: #fff; font-size: .85rem; text-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
.ph-meta .pin { display: block; opacity: .92; font-size: .78rem; margin-top: 2px; }
.ph-comments { display: flex; flex-direction: column; gap: 6px; max-height: 64%; overflow: hidden; }
.ph-hover .cmt {
  background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(10px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 12px; padding: 7px 10px;
  font-size: .78rem; color: #13343b; box-shadow: var(--shadow-soft);
}
.cmt .cmt-who { font-weight: 700; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--main-ink); }
.cmt p { margin: 2px 0 0; line-height: 1.35; }
.cmt.pending p { font-style: italic; color: color-mix(in srgb, #13343b 62%, white); }
.cmt.pending .cmt-who { opacity: .6; }
.ph-open {
  align-self: flex-start; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: #fff; background: var(--main); padding: 3px 11px; border-radius: 999px;
}
.ph-badge { position: absolute; top: 8px; left: 8px; background: var(--main); color: #fff; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; }
.ph-badge.draft { background: #8a6d3b; background: color-mix(in srgb, #c8902e 88%, black); }
/* icons inside buttons need an explicit size or they collapse to nothing
   (this is why the album Share button looked blank) */
.round-opt svg, .btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.round-opt.icon { padding: 9px 11px; }  /* compact icon-only button */

.lightbox { position: fixed; inset: 0; z-index: 120; display: none; align-items: center; justify-content: center; padding: 24px;
  background: rgba(10, 16, 18, 0.6); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); }
.lightbox.open { display: flex; }
/* share modal must sit above the lightbox so it never opens behind the edit box */
#share-back { z-index: 130; }
.lb-inner { display: flex; gap: 20px; max-width: 1120px; width: 100%; max-height: 88vh; }
.lb-stage { flex: 1 1 60%; display: flex; align-items: center; justify-content: center; min-width: 0; }
.lb-stage img { max-width: 100%; max-height: 86vh; border-radius: var(--radius-sm); box-shadow: var(--shadow); object-fit: contain; }
.lb-info { flex: 0 0 330px; max-width: 340px; overflow: auto; padding: 22px;
  background: var(--glass-strong); backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5); border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .6); }
.lb-loc { font-weight: 600; color: var(--main-ink); }
.lb-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.lb-comments { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.lb-comments .cmt { background: rgba(255, 255, 255, 0.6); border: 1px solid var(--hairline); border-radius: 14px; padding: 10px 12px; }
.lb-comments .cmt p { font-size: .92rem; }
.lb-edit .field { margin-bottom: 12px; }
.lb-close, .lb-nav { position: fixed; background: var(--glass-strong); border: 1px solid rgba(255, 255, 255, 0.5); color: var(--text);
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 1.5rem; line-height: 1; z-index: 121;
  backdrop-filter: blur(12px); box-shadow: var(--shadow-soft); display: flex; align-items: center; justify-content: center; }
.lb-close { top: 20px; right: 20px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 20px; } .lb-next { right: 20px; }
.lb-close:hover, .lb-nav:hover { background: #fff; transform: scale(1.06); }
.lb-nav:hover { transform: translateY(-50%) scale(1.06); }
@media (max-width: 820px) {
  .lb-inner { flex-direction: column; max-height: none; overflow: auto; }
  .lb-info { flex: none; max-width: none; }
  .lb-stage img { max-height: 52vh; }
  .lb-nav { top: auto; bottom: 18px; transform: none; }
  .lb-nav:hover { transform: scale(1.06); }
}
body.dark .ph-hover .cmt { background: rgba(24, 36, 38, 0.82); color: #e8f1f1; border-color: rgba(255, 255, 255, 0.14); }
body.dark .cmt.pending p { color: rgba(232, 241, 241, 0.7); }
body.dark .lb-comments .cmt { background: rgba(255, 255, 255, 0.06); }

/* video tiles + play badge + per-item share button */
.album-grid .ph video { width: 100%; display: block; }
.ph-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50px; height: 50px;
  border-radius: 50%; background: rgba(0, 0, 0, .42); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; pointer-events: none; backdrop-filter: blur(4px); z-index: 2; }
.album-grid .ph:hover .ph-play { opacity: 0; transition: opacity .2s; }
.ph-share { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .6); background: var(--glass-strong); color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center; z-index: 3; box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px); opacity: 0; transition: opacity .2s ease, transform .12s ease; padding: 0; }
.album-grid .ph:hover .ph-share { opacity: 1; }
.ph-share:hover { transform: scale(1.1); }
.ph-share svg { width: 16px; height: 16px; }
#share-modal textarea { width: 100%; }
.lb-stage video { max-width: 100%; max-height: 86vh; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
@media (max-width: 820px) { .lb-stage video { max-height: 52vh; } }
