/* ============ beau-portfolio — dark cinematic ============ */
:root {
  --accent: #e34c4c;
  --accent-deep: #b93a3a;
  --glow: rgba(227, 76, 76, .32);
  --bg: #0d0a0a;
  --bg2: #151010;
  --card: #191313;
  --ink: #f4eee9;
  --muted: #a89a93;
  --line: rgba(255, 255, 255, .09);
  --display: 'Oswald', 'Arial Narrow', sans-serif;
  --body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --maxw: 1080px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 40px -14px rgba(0, 0, 0, .6);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 0;
  font-weight: 600; text-decoration: none;
}
.skip:focus { left: 0; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 50% -120px, rgba(227, 76, 76, .14), transparent 65%),
    radial-gradient(900px 500px at 85% 20%, rgba(227, 76, 76, .05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { text-wrap: balance; }
a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2c2222; border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
a:focus-visible, button:focus-visible, [contenteditable]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- header / nav ---------- */
.topbar { height: 3px; background: linear-gradient(90deg, var(--accent), #7e2424 60%, transparent); }
header.site {
  position: sticky; top: 0; z-index: 40;
  background: rgba(13, 10, 10, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 18px; min-height: 62px;
}
.brand {
  font-family: var(--display); font-weight: 700; font-size: 21px;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink);
  text-decoration: none; white-space: nowrap;
}
.brand em { color: var(--accent); font-style: normal; text-shadow: 0 0 22px var(--glow); }
nav.pages { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
nav.pages a {
  font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none;
  padding: 7px 11px; border-radius: 8px; letter-spacing: .01em;
  transition: background .15s, color .15s; position: relative;
}
nav.pages a:not(.active)::after {
  content: ''; position: absolute; left: 11px; right: 11px; bottom: 3px; height: 2px;
  background: var(--accent); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
nav.pages a:not(.active):hover::after { transform: scaleX(1); }
nav.pages a:hover { background: rgba(227, 76, 76, .14); color: #ffb1b1; }
nav.pages a.active { background: var(--accent); color: #fff; box-shadow: 0 0 18px var(--glow); }
.burger {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px; font-size: 17px; cursor: pointer; color: var(--ink);
}
@media (max-width: 900px) {
  .burger { display: block; }
  nav.pages {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(13, 10, 10, .97); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 10px 16px 16px; gap: 4px;
  }
  nav.pages.open { display: flex; }
  nav.pages a { font-size: 15px; padding: 10px 12px; }
}

/* ---------- layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 34px 20px 70px; }
.blocks { display: flex; flex-direction: column; gap: 28px; }
main.pt { animation: pagein .4s ease both; }
@keyframes pagein { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* scroll reveal */
.rv { opacity: 0; transform: translateY(20px); transition: opacity .55s ease, transform .55s cubic-bezier(.16, .84, .3, 1); }
.rv.in { opacity: 1; transform: none; }
/* staggered cascade for grid children inside revealed blocks */
.rv .b-cards > *, .rv .b-gallery > figure, .rv .b-stats > .stat, .rv .b-videogrid > * {
  opacity: 0; transform: translateY(16px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.16, .84, .3, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.rv.in .b-cards > *, .rv.in .b-gallery > figure, .rv.in .b-stats > .stat, .rv.in .b-videogrid > * {
  opacity: 1; transform: none;
}

/* ---------- blocks ---------- */
.b-hero { padding: 46px 0 10px; text-align: center; position: relative; }
.b-hero::before {
  content: ''; position: absolute; inset: -60px -12%; z-index: -1; pointer-events: none;
  background: radial-gradient(620px 320px at 50% 32%, rgba(227, 76, 76, .13), transparent 70%);
  animation: glowpulse 6s ease-in-out infinite;
}
@keyframes glowpulse { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
.b-hero .kicker {
  font-weight: 700; font-size: 13px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px; text-shadow: 0 0 24px var(--glow);
}
.b-hero h1 {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(40px, 7.2vw, 78px); line-height: 1.04; margin: 0 auto 18px;
  max-width: 920px; letter-spacing: .01em;
}
.b-hero h1::after {
  content: ''; display: block; width: 90px; height: 4px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin: 22px auto 0; border-radius: 3px;
}
.b-hero .sub { max-width: 640px; margin: 0 auto 26px; color: var(--muted); font-size: 18px; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
/* staggered hero entrance (view mode only — body:not(.editing)) */
body:not(.editing) .b-hero .kicker { animation: rise .7s .05s ease both; }
body:not(.editing) .b-hero .sub { animation: rise .7s .5s ease both; }
body:not(.editing) .b-hero .hero-btns { animation: rise .7s .65s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
/* word-by-word headline */
.b-hero h1 .w { display: inline-block; animation: wordrise .6s calc(.1s + var(--wi, 0) * .07s) cubic-bezier(.16, .84, .3, 1) both; }
@keyframes wordrise { from { opacity: 0; transform: translateY(.45em) rotate(1.5deg); } to { opacity: 1; transform: none; } }
body:not(.editing) .b-hero h1::after { animation: growline .7s .55s cubic-bezier(.16, .84, .3, 1) both; }
@keyframes growline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* ambient drifting orbs */
.b-hero .orb {
  position: absolute; border-radius: 50%; filter: blur(28px); pointer-events: none; z-index: -1;
  background: radial-gradient(circle, rgba(227, 76, 76, .5), transparent 70%);
}
.b-hero .o1 { width: 190px; height: 190px; left: 6%; top: 18%; opacity: .32; animation: drift1 14s ease-in-out infinite alternate; }
.b-hero .o2 { width: 130px; height: 130px; right: 9%; top: 8%; opacity: .26; animation: drift2 18s ease-in-out infinite alternate; }
.b-hero .o3 { width: 95px; height: 95px; right: 20%; bottom: 4%; opacity: .2; animation: drift3 11s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(46px, -34px) scale(1.18); } }
@keyframes drift2 { to { transform: translate(-38px, 30px) scale(.92); } }
@keyframes drift3 { to { transform: translate(28px, -22px) scale(1.12); } }

h2.b-heading {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(28px, 4vw, 40px); line-height: 1.1; margin: 18px 0 -6px; letter-spacing: .015em;
}
h2.b-heading::after {
  content: ''; display: block; width: 64px; height: 4px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 3px; margin-top: 14px;
}
h3.b-heading {
  font-family: var(--display); font-weight: 600; font-size: clamp(20px, 2.6vw, 26px);
  margin: 10px 0 -10px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent);
}
.b-text { max-width: 760px; }
.b-text p { margin: 0 0 12px; }
.b-text p:last-child { margin-bottom: 0; }
.b-text ul, .b-text ol { margin: 8px 0 14px; padding-left: 22px; }
.b-text li { margin: 4px 0; }
.b-text a { color: #ff9d9d; }

.btn {
  display: inline-block; font-weight: 600; font-size: 15px; text-decoration: none;
  padding: 12px 22px; border-radius: 10px; border: 1.5px solid var(--accent);
  transition: transform .15s ease, box-shadow .15s ease, background .15s; cursor: pointer; font-family: var(--body);
}
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 6px 26px -8px var(--glow); position: relative; overflow: hidden; }
.btn.primary::after {
  content: ''; position: absolute; top: 0; left: -130%; width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg);
}
.btn.primary:hover::after { animation: shine .65s ease; }
@keyframes shine { to { left: 175%; } }
.btn.ghost { background: transparent; color: #ffb1b1; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 34px -8px var(--glow); }
.btn.primary:hover { background: #ef5b5b; }
.btn.ghost:hover { background: rgba(227, 76, 76, .13); }
.b-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* ticker / marquee */
.b-ticker {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 14px 0; margin: 4px -20px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
body.editing .b-ticker { -webkit-mask-image: none; mask-image: none; }
.tk-track { display: flex; gap: 0; width: max-content; animation: marquee 28s linear infinite; }
.b-ticker:hover .tk-track { animation-play-state: paused; }
.tk-item {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .12em;
  font-weight: 600; font-size: 17px; color: var(--muted); white-space: nowrap; padding: 0 18px;
  display: flex; align-items: center; gap: 36px;
}
.tk-item::after { content: '✦'; color: var(--accent); font-size: 13px; text-shadow: 0 0 14px var(--glow); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tk-edit { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 4px 20px; }
.tk-chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  border-radius: 99px; padding: 6px 8px 6px 14px; font-size: 14px; background: var(--card);
}
.tk-chip .x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; padding: 2px 5px; border-radius: 99px; }
.tk-chip .x:hover { color: #fff; background: var(--accent); }

/* cards */
.b-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s; position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px -18px var(--glow), var(--shadow); border-color: rgba(227, 76, 76, .4); }
.card .thumb { aspect-ratio: 4 / 3; background: #241b1b; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.16, .84, .3, 1); }
.card:hover .thumb img { transform: scale(1.06); }
.card .thumb.empty { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.card .meta { padding: 14px 16px 16px; }
.card .meta .t {
  font-family: var(--display); font-weight: 600; font-size: 19px; text-transform: uppercase; letter-spacing: .02em;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.card .meta .t::after { content: '→'; color: var(--accent); opacity: 0; transform: translateX(-8px); transition: opacity .2s, transform .2s; }
.card:hover .meta .t::after { opacity: 1; transform: none; }
.card .meta .s { color: var(--muted); font-size: 14px; margin-top: 3px; }

/* gallery */
.b-gallery { columns: 3 260px; column-gap: 16px; }
.b-gallery figure {
  margin: 0 0 16px; break-inside: avoid; border-radius: 12px; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); position: relative;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.b-gallery figure:hover { transform: translateY(-3px); box-shadow: 0 16px 36px -16px var(--glow); border-color: rgba(227, 76, 76, .35); }
.b-gallery img { width: 100%; cursor: zoom-in; transition: transform .5s cubic-bezier(.16, .84, .3, 1); }
.b-gallery figure:hover img { transform: scale(1.04); }
.b-gallery figcaption { font-size: 13px; color: var(--muted); padding: 8px 12px; }
.b-gallery figcaption:empty { display: none; }

/* image */
.b-image figure { margin: 0; }
.b-image img { border-radius: var(--radius); border: 1px solid var(--line); }
.b-image.normal img { max-width: min(520px, 100%); }
.b-image figcaption { font-size: 13.5px; color: var(--muted); margin-top: 8px; }

/* stats */
.b-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.stat {
  flex: 1 1 220px; background: linear-gradient(160deg, rgba(227, 76, 76, .1), transparent 55%), var(--card);
  border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 20px 22px;
  transition: transform .2s, box-shadow .2s;
}
.stat:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -18px var(--glow); }
.stat .v {
  font-family: var(--display); font-weight: 700; font-size: 48px; line-height: 1;
  color: var(--accent); text-shadow: 0 0 30px var(--glow); font-variant-numeric: tabular-nums;
}
.stat .l { color: var(--muted); font-size: 14.5px; margin-top: 6px; }

/* video */
.b-video .frame, .vg-item .frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius);
  overflow: hidden; background: #000; border: 1px solid var(--line);
  transition: box-shadow .25s, border-color .25s, transform .25s;
}
.b-video .frame:hover, .vg-item .frame:hover { box-shadow: 0 24px 60px -20px var(--glow); border-color: rgba(227, 76, 76, .45); }
.b-video { max-width: 860px; margin: 0 auto; width: 100%; }
.b-video .frame { box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); }
.b-video iframe, .vg-item iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.b-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.b-video .frame.v916 { aspect-ratio: 9 / 16; max-width: 380px; margin: 0 auto; }
.b-video .cap { font-size: 13.5px; color: var(--muted); margin-top: 10px; text-align: center; }
.b-videogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.vg-item .vt { font-size: 14px; font-weight: 600; margin-top: 8px; line-height: 1.4; }

.b-divider { border: 0; border-top: 1px solid var(--line); margin: 8px 0; width: 100%; }

/* ---------- footer ---------- */
footer.site {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(227, 76, 76, .07)), var(--bg2);
  margin-top: 30px; position: relative;
}
footer.site::before {
  content: ''; position: absolute; top: -1px; left: 15%; right: 15%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .55;
}
.foot-inner { max-width: var(--maxw); margin: 0 auto; padding: 48px 20px; text-align: center; }
.foot-inner .cta-line { font-family: var(--display); text-transform: uppercase; font-size: 26px; letter-spacing: .05em; color: var(--ink); margin-bottom: 18px; }
.foot-nav { display: flex; gap: 4px 20px; flex-wrap: wrap; justify-content: center; margin-top: 24px; }
.foot-nav a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; letter-spacing: .03em; }
.foot-nav a:hover { color: #ffb1b1; }
.socials { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 20px 0 10px; }
.socials a {
  color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--line); padding: 8px 14px; border-radius: 99px;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.socials a:hover { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 20px var(--glow); }
.foot-tag { font-size: 13px; color: var(--muted); letter-spacing: .16em; margin-top: 14px; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; background: rgba(5, 3, 3, .94); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out;
  animation: fadein .18s ease;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; max-height: 100%; }
.lightbox img { max-width: 100%; max-height: 84vh; border-radius: 8px; box-shadow: 0 30px 90px rgba(0, 0, 0, .8); }
.lightbox figcaption { color: #cbbfb9; font-size: 14px; text-align: center; }

/* ============================ EDIT MODE ============================ */
.editable[contenteditable="true"] { outline: none; border-radius: 6px; transition: box-shadow .1s; }
.editable[contenteditable="true"]:hover { box-shadow: 0 0 0 1.5px rgba(227, 76, 76, .45); }
.editable[contenteditable="true"]:focus { box-shadow: 0 0 0 2px var(--accent); background: rgba(227, 76, 76, .07); }
.editable[data-ph]:empty::before { content: attr(data-ph); color: #6d5d57; }

body.editing .blk { position: relative; border: 1.5px dashed transparent; border-radius: 10px; padding: 6px; margin: -6px; }
body.editing .blk:hover { border-color: rgba(227, 76, 76, .5); }
.blk-tools {
  position: absolute; top: -14px; right: 6px; z-index: 30; display: none; gap: 4px;
  background: #241a1a; border: 1px solid var(--line); border-radius: 8px; padding: 4px; box-shadow: var(--shadow);
}
body.editing .blk:hover > .blk-tools, body.editing .blk:focus-within > .blk-tools { display: flex; }
.blk-tools button {
  background: none; border: 0; color: #fff; font-size: 13px; cursor: pointer;
  padding: 4px 7px; border-radius: 5px; line-height: 1; font-family: var(--body);
}
.blk-tools button:hover { background: var(--accent); }
.blk-tools .lbl { color: var(--muted); font-size: 11px; padding: 6px 4px 0 6px; text-transform: uppercase; letter-spacing: .08em; }

.add-block { display: flex; justify-content: center; margin: -8px 0; }
.add-block button {
  background: transparent; border: 1.5px dashed var(--accent); color: #ffb1b1; border-radius: 99px;
  font-size: 13px; font-weight: 600; padding: 5px 16px; cursor: pointer; opacity: .5; transition: opacity .12s;
}
.add-block button:hover { opacity: 1; }

.item-x {
  position: absolute; top: 6px; right: 6px; z-index: 5; background: rgba(10, 6, 6, .85); color: #fff;
  border: 1px solid var(--line); border-radius: 6px; width: 26px; height: 26px; cursor: pointer; font-size: 13px;
}
.item-x:hover { background: var(--accent); }
.item-link-btn {
  position: absolute; top: 6px; right: 38px; z-index: 5; background: rgba(10, 6, 6, .85); color: #fff;
  border: 1px solid var(--line); border-radius: 6px; height: 26px; padding: 0 8px; cursor: pointer; font-size: 12px;
}
.item-link-btn:hover { background: var(--accent); }
.img-swap-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(10, 6, 6, 0); transition: background .12s; cursor: pointer; }
.img-swap-hint span { opacity: 0; background: rgba(10, 6, 6, .9); color: #fff; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 8px; transition: opacity .12s; }
.img-swap-hint:hover { background: rgba(10, 6, 6, .3); }
.img-swap-hint:hover span { opacity: 1; }
.add-item {
  border: 1.5px dashed var(--line); border-radius: 12px; background: none; color: var(--muted);
  font-size: 14px; font-weight: 600; cursor: pointer; min-height: 90px; width: 100%;
}
.add-item:hover { border-color: var(--accent); color: #ffb1b1; }

/* edit chrome */
.edit-fab {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 60; background: #241a1a; color: #fff;
  border: 1px solid var(--line); border-radius: 99px; padding: 11px 18px; font-size: 14px; font-weight: 600;
  cursor: pointer; box-shadow: var(--shadow); opacity: .85;
}
.edit-fab:hover { opacity: 1; background: var(--accent); box-shadow: 0 0 24px var(--glow); }
.savebar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  background: #241a1a; border: 1px solid var(--line); color: #fff; border-radius: 14px;
  box-shadow: 0 10px 40px -8px rgba(0, 0, 0, .7);
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; flex-wrap: wrap; max-width: calc(100vw - 24px);
}
.savebar .status { font-size: 13px; color: var(--muted); padding: 0 6px; }
.savebar .status.dirty { color: #ffce6b; }
.savebar button {
  border: 0; border-radius: 9px; padding: 9px 14px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; background: rgba(255, 255, 255, .1); color: #fff; font-family: var(--body);
}
.savebar button:hover { background: rgba(255, 255, 255, .2); }
.savebar button.save { background: var(--accent); box-shadow: 0 0 18px var(--glow); }
.savebar button.save:hover { background: #ef5b5b; }
.savebar button:disabled { opacity: .45; cursor: default; box-shadow: none; }

/* modal + panels */
.overlay { position: fixed; inset: 0; background: rgba(5, 3, 3, .7); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 18px; animation: fadein .15s ease; }
.modal {
  background: #1d1616; border: 1px solid var(--line); color: var(--ink);
  border-radius: 16px; box-shadow: 0 24px 80px -20px rgba(0, 0, 0, .8);
  width: 100%; max-width: 460px; padding: 22px 22px 20px; max-height: 88vh; overflow: auto;
}
.modal h3 { margin: 0 0 4px; font-family: var(--display); text-transform: uppercase; letter-spacing: .03em; font-size: 20px; }
.modal .hint { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.modal label { display: block; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 12px 0 5px; }
.modal input[type="text"], .modal input[type="password"], .modal input[type="url"], .modal textarea, .modal select {
  width: 100%; border: 1.5px solid var(--line); border-radius: 9px; padding: 9px 11px;
  font-size: 14.5px; font-family: var(--body); background: #120d0d; color: var(--ink);
}
.modal input:focus, .modal textarea:focus, .modal select:focus { outline: none; border-color: var(--accent); }
.modal .row { display: flex; gap: 10px; align-items: center; }
.modal .row > * { flex: 1; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.modal .actions .spacer { margin-right: auto; }
.modal .err { color: #ff8b8b; font-size: 13px; margin-top: 10px; min-height: 18px; }
.mbtn { border: 1px solid var(--line); border-radius: 9px; padding: 10px 16px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: var(--body); background: #2a2020; color: var(--ink); }
.mbtn:hover { background: #342727; }
.mbtn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.mbtn.primary:hover { background: #ef5b5b; }
.mbtn.danger { background: none; border-color: transparent; color: #ff8b8b; }
.drop {
  border: 2px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center;
  color: var(--muted); font-size: 14px; cursor: pointer; margin-top: 6px;
}
.drop:hover, .drop.over { border-color: var(--accent); color: #ffb1b1; background: rgba(227, 76, 76, .06); }
.drop input { display: none; }
.thumb-prev { max-width: 160px; border-radius: 8px; margin: 10px auto 0; border: 1px solid var(--line); }

/* pages / site panel lists */
.plist { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.plist .prow {
  display: flex; align-items: center; gap: 8px; border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px; background: #120d0d; font-size: 14px;
}
.plist .prow.active { border-color: var(--accent); }
.plist .prow .nm { flex: 1; font-weight: 600; cursor: pointer; }
.plist .prow .slug { color: var(--muted); font-size: 12px; }
.plist .prow button { background: none; border: 0; cursor: pointer; font-size: 13px; color: var(--muted); padding: 3px 5px; border-radius: 5px; }
.plist .prow button:hover { color: #ffb1b1; background: rgba(227, 76, 76, .12); }
.plist .prow label.nav-toggle { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); margin: 0; text-transform: none; letter-spacing: 0; }

.toast {
  position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); z-index: 75;
  background: #241a1a; border: 1px solid var(--line); color: #fff; font-size: 14px; padding: 10px 18px; border-radius: 10px;
  box-shadow: var(--shadow); animation: toast-in .18s ease;
}
.toast.error { background: var(--accent); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .b-gallery { columns: 2 150px; }
  main { padding-top: 22px; }
  .stat .v { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  main.pt { animation: none; }
  body:not(.editing) .b-hero .kicker, body:not(.editing) .b-hero h1,
  body:not(.editing) .b-hero .sub, body:not(.editing) .b-hero .hero-btns { animation: none; }
  .b-hero::before, .b-hero h1 .w, body:not(.editing) .b-hero h1::after, .b-hero .orb,
  .btn.primary:hover::after { animation: none; }
  .rv .b-cards > *, .rv .b-gallery > figure, .rv .b-stats > .stat, .rv .b-videogrid > * {
    opacity: 1; transform: none; transition: none;
  }
  nav.pages a::after { transition: none; }
  .b-gallery figure:hover img, .card:hover .thumb img { transform: none; }
  .tk-track { animation: none; flex-wrap: wrap; width: auto; }
  html { scroll-behavior: auto; }
}
@media print {
  header.site, footer.site, .edit-fab, .savebar { display: none; }
}
