/* HuHaHo Admin — design tokens mirror the public site (Fraunces/Inter, cream/green/gold). */
:root{
  --cream:#faf6ef; --cream-2:#f4eddf; --ink:#2b2b28; --muted:#7c786e;
  --green:#4f7d5c; --green-tint:#e9f0ea; --gold:#c99a47; --amber:#d98a4f;
  --line:#e7e0d3; --white:#fff; --danger:#c0563f; --danger-tint:#f7e9e5;
  --ok:#3f8a5b; --shadow:0 18px 40px -24px rgba(43,43,40,.45);
  --radius:14px; --sidebar:248px;
  font-synthesis:none; -webkit-font-smoothing:antialiased;
}
*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{ font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,sans-serif; color:var(--ink);
  background:var(--cream); font-size:14px; line-height:1.5; }
h1,h2,h3,h4{ font-family:'Fraunces','Iowan Old Style',Georgia,serif; font-weight:500; margin:0; letter-spacing:-.01em; }
a{ color:var(--green); text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
img{ max-width:100%; display:block; }
.hidden{ display:none !important; }

/* ---------- Login ---------- */
.login-wrap{ min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px;
  background:radial-gradient(ellipse 80% 60% at 50% 0%, #fffdf8, var(--cream) 60%, var(--cream-2)); }
.login-card{ width:100%; max-width:380px; background:var(--white); border:1px solid var(--line);
  border-radius:20px; box-shadow:var(--shadow); padding:34px 30px; }
.login-logo{ display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.login-logo img{ width:34px; height:34px; }
.login-card h1{ font-size:24px; margin:4px 0 2px; }
.login-card p.sub{ color:var(--muted); margin:0 0 22px; font-size:13px; }

/* ---------- Form controls ---------- */
.field{ margin-bottom:14px; }
.field label{ display:block; font-size:12px; font-weight:600; letter-spacing:.04em; text-transform:uppercase;
  color:var(--muted); margin-bottom:6px; }
input,select,textarea{ width:100%; font-family:inherit; font-size:14px; color:var(--ink); background:var(--white);
  border:1px solid var(--line); border-radius:10px; padding:10px 12px; transition:border-color .2s, box-shadow .2s; }
input:focus,select:focus,textarea:focus{ outline:none; border-color:var(--green);
  box-shadow:0 0 0 3px var(--green-tint); }
textarea{ min-height:96px; resize:vertical; }
.btn{ display:inline-flex; align-items:center; gap:8px; justify-content:center; border:1px solid transparent;
  border-radius:999px; padding:10px 20px; font-size:13.5px; font-weight:600; transition:transform .2s, background .2s, box-shadow .2s, color .2s; }
.btn:hover{ transform:translateY(-1px); }
.btn-primary{ background:var(--green); color:#fff; box-shadow:0 10px 24px -12px rgba(79,125,92,.8); }
.btn-primary:hover{ background:#446c50; }
.btn-ghost{ background:transparent; border-color:var(--line); color:var(--ink); }
.btn-ghost:hover{ background:var(--cream-2); }
.btn-danger{ background:var(--danger-tint); color:var(--danger); }
.btn-danger:hover{ background:#f1ddd6; }
.btn-gold{ background:var(--gold); color:#2c2208; }
.btn-sm{ padding:6px 13px; font-size:12.5px; }
.btn-block{ width:100%; }
.btn[disabled]{ opacity:.55; cursor:not-allowed; transform:none; }

/* ---------- App shell ---------- */
.app{ display:grid; grid-template-columns:var(--sidebar) 1fr; min-height:100vh; }
.sidebar{ background:#10221a; color:rgba(255,255,255,.86); padding:22px 16px; position:sticky; top:0; height:100vh;
  display:flex; flex-direction:column; box-sizing:border-box; overflow:hidden; }
.sidebar .brand{ display:flex; align-items:center; gap:10px; padding:6px 8px 18px; flex:0 0 auto; }
.sidebar .brand img{ width:30px; height:30px; }
.sidebar .brand b{ font-family:'Fraunces',serif; font-weight:600; font-size:18px; color:#fff; }
.nav{ display:flex; flex-direction:column; gap:3px; flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden;
  padding-right:4px; margin-right:-4px; scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.2) transparent; }
.nav::-webkit-scrollbar{ width:5px; }
.nav::-webkit-scrollbar-track{ background:transparent; }
.nav::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.2); border-radius:999px; }
.nav::-webkit-scrollbar-thumb:hover{ background:rgba(255,255,255,.38); }
.nav a{ display:flex; align-items:center; gap:11px; padding:10px 12px; border-radius:10px; color:rgba(255,255,255,.78);
  font-size:13.5px; font-weight:500; transition:background .2s, color .2s; flex-shrink:0; }
.nav a:hover{ background:rgba(255,255,255,.08); color:#fff; }
.nav a.active{ background:var(--green); color:#fff; }
.nav a .ico{ width:18px; height:18px; flex:0 0 auto; opacity:.9; }
.nav .badge{ margin-left:auto; background:var(--gold); color:#2c2208; font-size:11px; font-weight:700;
  border-radius:999px; padding:1px 8px; }
.nav .nav-head{ font-size:10.5px; font-weight:700; letter-spacing:.09em; text-transform:uppercase;
  color:rgba(255,255,255,.38); padding:16px 12px 5px; flex-shrink:0; }
.nav .nav-head:first-child{ padding-top:4px; }
.sidebar .foot{ flex:0 0 auto; border-top:1px solid rgba(255,255,255,.12); padding-top:14px; margin-top:8px; font-size:12.5px; }
.sidebar .foot .who{ color:rgba(255,255,255,.6); margin-bottom:8px; padding:0 4px; }
.sidebar .foot a{ color:rgba(255,255,255,.8); display:block; padding:6px 4px; }
.sidebar .foot a:hover{ color:#fff; }

.main{ padding:30px 36px 60px; max-width:1180px; }
.page-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:24px; flex-wrap:wrap; }
.page-head h1{ font-size:30px; }
.page-head .sub{ color:var(--muted); margin-top:4px; }
.toolbar{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:18px; }
.toolbar input[type=search]{ max-width:280px; }
.toolbar select{ width:auto; }
.spacer{ flex:1; }

/* ---------- Cards / stats ---------- */
.stat-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:16px; margin-bottom:26px; }
.stat{ background:var(--white); border:1px solid var(--line); border-radius:var(--radius); padding:18px 20px; box-shadow:var(--shadow); }
.stat .label{ font-size:12px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); }
.stat .num{ font-family:'Fraunces',serif; font-weight:600; font-size:38px; line-height:1.1; color:var(--green); margin-top:6px; }
.stat .meta{ font-size:12.5px; color:var(--muted); margin-top:4px; }
.panel{ background:var(--white); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); margin-bottom:22px; overflow:hidden; }
.panel-head{ display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid var(--line); }
.panel-head h3{ font-size:18px; }
.panel-body{ padding:6px 20px 14px; }
.two-col{ display:grid; grid-template-columns:1fr 1fr; gap:22px; }

/* ---------- Tables ---------- */
table{ width:100%; border-collapse:collapse; }
th,td{ text-align:left; padding:12px 14px; border-bottom:1px solid var(--line); font-size:13.5px; vertical-align:middle; }
th{ font-size:11.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); font-weight:600; }
tbody tr{ transition:background .15s; }
tbody tr:hover{ background:var(--cream); }
tr.unread td{ font-weight:600; }
tr.unread td:first-child::before{ content:""; display:inline-block; width:7px; height:7px; border-radius:50%;
  background:var(--gold); margin-right:8px; vertical-align:middle; }
td.actions{ text-align:right; white-space:nowrap; }
td.actions .btn{ margin-left:6px; }
.muted{ color:var(--muted); }
.empty{ text-align:center; color:var(--muted); padding:46px 20px; }

/* ---------- Badges ---------- */
.tag{ display:inline-block; font-size:11.5px; font-weight:600; padding:3px 10px; border-radius:999px; letter-spacing:.02em; }
.tag.pending{ background:#fbf0db; color:#9a6b14; }
.tag.confirmed{ background:var(--green-tint); color:#356b45; }
.tag.completed{ background:#e3eef7; color:#2f6391; }
.tag.cancelled{ background:var(--danger-tint); color:var(--danger); }
.tag.published{ background:var(--green-tint); color:#356b45; }
.tag.draft{ background:#efeae0; color:#8a8170; }
.tag.approved{ background:var(--green-tint); color:#356b45; }
.tag.rejected{ background:var(--danger-tint); color:var(--danger); }
.tag.up{ background:var(--gold); color:#2c2208; }
.tag.past{ background:#eee9df; color:#857c6b; }

/* ---------- Events grid ---------- */
.ev-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:18px; }
.ev-card{ background:var(--white); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow);
  display:flex; flex-direction:column; }
.ev-card .thumb{ aspect-ratio:4/3; background:var(--cream-2) center/cover no-repeat; position:relative; }
.ev-card .thumb .ph{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:var(--muted); font-size:12px; }
.ev-card .body{ padding:13px 15px 15px; display:flex; flex-direction:column; gap:8px; flex:1; }
.ev-card h3{ font-size:17px; }
.ev-card .row{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.ev-card .row.btns{ margin-top:auto; }

/* image manager */
.img-manager{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:14px; }
.img-tile{ border:1px solid var(--line); border-radius:12px; overflow:hidden; background:var(--cream); position:relative; }
.img-tile.cover{ outline:3px solid var(--gold); }
.img-tile img, .img-tile video{ aspect-ratio:1; object-fit:cover; width:100%; }
.img-tile .bar{ display:flex; gap:4px; padding:8px; }
.img-tile .bar .btn{ flex:1; padding:5px; font-size:11px; }
.img-tile .cover-flag{ position:absolute; top:6px; left:6px; background:var(--gold); color:#2c2208;
  font-size:10px; font-weight:700; padding:2px 7px; border-radius:999px; }
.dropzone{ border:2px dashed var(--line); border-radius:12px; padding:26px; text-align:center; color:var(--muted);
  transition:border-color .2s, background .2s; cursor:pointer; }
.dropzone.drag{ border-color:var(--green); background:var(--green-tint); }

/* ---------- Image picker (drag-drop upload) ---------- */
.imgpick-row{ display:flex; gap:12px; align-items:stretch; }
.imgpick-preview{ flex:0 0 76px; width:76px; height:76px; border-radius:10px; overflow:hidden;
  background:#f1f3f0; border:1px solid var(--line); display:flex; align-items:center; justify-content:center; }
.imgpick-preview img, .imgpick-preview video{ width:100%; height:100%; object-fit:cover; display:block; }
.imgpick-preview .ph{ font-size:10.5px; color:var(--muted); text-align:center; padding:4px; }
.imgpick-dz{ flex:1 1 auto; border:2px dashed var(--line); border-radius:10px; padding:14px; cursor:pointer;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; text-align:center;
  color:var(--muted); transition:border-color .2s, background .2s; }
.imgpick-dz:hover, .imgpick-dz:focus-visible{ border-color:var(--green); outline:none; }
.imgpick-dz.drag{ border-color:var(--green); background:var(--green-tint); }
.imgpick-dz.busy{ opacity:.65; pointer-events:none; }
.imgpick-cta{ font-size:12.5px; }
.imgpick-cta b{ color:var(--green); }
.imgpick-status{ font-size:11.5px; min-height:14px; }
.imgpick-status.warn{ color:#a3541c; font-weight:600; }
.imgpick input[type=url]{ margin-top:8px; }

/* ---------- Modal ---------- */
.modal-back{ position:fixed; inset:0; background:rgba(20,30,24,.5); display:flex; align-items:flex-start;
  justify-content:center; padding:40px 16px; z-index:100; overflow:auto; }
.modal{ background:var(--white); border-radius:18px; box-shadow:0 40px 90px -30px rgba(0,0,0,.5); width:100%;
  max-width:680px; padding:26px 28px; }
.modal h2{ font-size:23px; margin-bottom:4px; }
.modal .modal-foot{ display:flex; justify-content:flex-end; gap:10px; margin-top:22px; }
.row2{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }

/* ---------- Catalog tabs ---------- */
.tabs{ display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 18px; border-bottom:1px solid var(--line, #e6e3dc); }
.tabs .tab{ display:inline-flex; align-items:center; gap:8px; padding:9px 16px; border-radius:10px 10px 0 0;
  font-weight:600; font-size:14px; color:var(--muted, #6b6b63); text-decoration:none; border-bottom:2px solid transparent;
  margin-bottom:-1px; }
.tabs .tab:hover{ color:var(--ink, #2b2b28); background:rgba(0,0,0,.03); }
.tabs .tab.active{ color:var(--green, #4f7d5c); border-bottom-color:var(--green, #4f7d5c); }
.tabs .tab-c{ font-size:12px; font-weight:600; background:rgba(0,0,0,.06); color:inherit; border-radius:999px;
  padding:1px 8px; min-width:20px; text-align:center; }
.tabs .tab.active .tab-c{ background:var(--green, #4f7d5c); color:#fff; }

/* ---------- Zones: the site's own Healing / Happiness / Social tree ---------- */
.crumbs{ display:flex; align-items:center; flex-wrap:wrap; gap:7px; font-size:13px; margin:-12px 0 18px;
  color:var(--muted, #6b6b63); }
.crumbs a{ color:var(--green, #4f7d5c); font-weight:600; text-decoration:none; }
.crumbs a:hover{ text-decoration:underline; }
.crumbs i{ font-style:normal; opacity:.4; }
.crumbs span{ font-weight:600; color:var(--ink, #2b2b28); }
.site-link{ font-size:12.5px; color:var(--muted, #6b6b63); text-decoration:none; white-space:nowrap; }
.site-link:hover{ color:var(--green, #4f7d5c); text-decoration:underline; }

.zone-chips{ display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:10px; margin:0 0 20px; }
.zone-chip{ display:block; background:var(--white, #fff); border:1px solid var(--line, #e6e3dc); border-radius:12px;
  padding:12px 14px; text-decoration:none; color:inherit; transition:border-color .18s, box-shadow .18s, transform .18s; }
.zone-chip:hover{ border-color:var(--green, #4f7d5c); box-shadow:var(--shadow); transform:translateY(-1px); }
.zone-chip b{ display:block; font-size:14px; font-weight:600; color:var(--ink, #2b2b28); }
.zone-chip span{ display:block; font-size:12.5px; color:var(--muted, #6b6b63); margin-top:2px; }

/* ---------- Landing-page editor ---------- */
.head-actions{ display:flex; gap:10px; align-items:center; }
.group-head{ font-size:13px; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--muted, #6b6b63); margin:26px 0 12px; }
.group-head:first-of-type{ margin-top:6px; }

/* Every card the same height, whatever its title or summary runs to:
   equal-height grid rows, a fixed-ratio image that cannot shrink, and a body
   that fills the rest with line-clamped text. */
.page-cards{ display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  grid-auto-rows:1fr; gap:14px; align-items:stretch; }
.page-card{ position:relative; display:flex; flex-direction:column; background:var(--white, #fff); border:1px solid var(--line, #e6e3dc);
  border-radius:var(--radius, 14px); overflow:hidden;
  transition:border-color .18s, box-shadow .18s, transform .18s; }
.page-card:hover{ border-color:var(--green, #4f7d5c); box-shadow:var(--shadow); transform:translateY(-2px); }
.page-card-link{ display:flex; flex-direction:column; flex:1 1 auto; min-height:0; text-decoration:none; color:inherit; }
.card-reorder{ position:absolute; top:6px; right:6px; z-index:2; display:flex; gap:2px;
  background:rgba(255,255,255,.92); border-radius:8px; padding:2px; box-shadow:var(--shadow); }
.card-reorder .btn{ padding:2px 7px; min-width:24px; line-height:1.2; }
.card-reorder.inline{ position:static; background:none; box-shadow:none; padding:0; }
.page-card-media{ flex:0 0 auto; aspect-ratio:16/9; background:#f1efe9;
  display:flex; align-items:center; justify-content:center; overflow:hidden; }
.page-card-media img{ display:block; width:100%; height:100%; object-fit:cover; }
.page-card-media .ph{ font-size:12px; color:var(--muted, #6b6b63); }
.page-card-body{ flex:1 1 auto; padding:12px 14px; display:flex; flex-direction:column; gap:3px; }
.page-card-body b{ font-size:14.5px; line-height:1.3; }
.page-card-meta{ font-size:12px; color:var(--muted, #6b6b63); line-height:1.4; }
/* Clamp *and* reserve the clamped height, so a one-line title and a two-line one
   produce the same card. Without the min-height the cards line up within a grid
   row but the groups drift apart from each other. */
.page-card-body b, .page-card-meta{ display:-webkit-box; -webkit-box-orient:vertical; overflow:hidden;
  -webkit-line-clamp:2; line-clamp:2; overflow-wrap:anywhere; }
.page-card-body b{ min-height:2.6em; }                 /* 2 lines at 1.3 */
.page-card-meta{ min-height:2.8em; }                   /* 2 lines at 1.4 */
.page-card-meta--path{ -webkit-line-clamp:1; line-clamp:1; min-height:1.4em; }
.page-card-meta:last-child{ margin-top:auto; padding-top:3px; }

.prose-note{ background:#f6f8f6; border:1px solid var(--line, #e6e3dc); border-left:3px solid var(--green, #4f7d5c);
  border-radius:10px; padding:10px 14px; margin:0 0 18px; font-size:12.5px; color:var(--muted, #6b6b63); }
.prose-note b{ color:var(--ink, #2b2b28); }
.prose-note code{ background:rgba(0,0,0,.06); border-radius:4px; padding:1px 5px; font-size:12px; }

.edit-sec{ margin-bottom:18px; }
.edit-sec-head{ font-size:12px; font-weight:700; letter-spacing:.07em; text-transform:uppercase;
  color:var(--green, #4f7d5c); margin:0 0 16px; padding-bottom:10px; border-bottom:1px solid var(--line, #e6e3dc); }
.field .opt{ font-weight:400; font-size:11.5px; color:var(--muted, #6b6b63); text-transform:none; letter-spacing:0; }

/* an opt-in offer inside a form — "also build a landing page for this event" */
.opt-card{ border:1px solid var(--line, #e6e3dc); border-radius:10px; background:#fbfaf7;
  padding:12px 14px; margin:4px 0 16px; }
.opt-check{ display:flex; align-items:flex-start; gap:10px; cursor:pointer; margin:0; }
.opt-check input{ width:auto; margin:2px 0 0; flex:0 0 auto; }
.opt-check > span{ display:block; }
.opt-check b{ display:block; font-size:13.5px; }
.opt-check .hint{ margin-top:3px; }

.list-rows{ display:flex; flex-direction:column; gap:10px; margin-bottom:10px; }
.list-row{ display:flex; align-items:flex-start; gap:10px; padding:10px; border:1px solid var(--line, #e6e3dc);
  border-radius:10px; background:#fbfaf7; }
.list-row > :not(.row-tools){ flex:1; min-width:0; }
.list-row .row2{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
/* three short columns — an agenda slot, a speaker's name and role */
.row3{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
/* a pair whose second value is a sentence: full width, one above the other */
.row-stack{ display:grid; grid-template-columns:1fr; gap:8px; }
/* the two short columns of a stacked trio keep sharing one line */
.row-stack > .row2{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.list-row textarea, .list-row input{ margin:0; }
.list-row .field{ margin:0; }
.row-tools{ display:flex; flex-direction:column; gap:4px; flex:0 0 auto; }
.row-tools .btn{ padding:3px 8px; line-height:1.2; min-width:30px; }

/* a gallery is a column of pickers; the full-size chrome would swamp it */
.imgpick--compact{ margin:0; }
.imgpick--compact .imgpick-row{ margin-bottom:8px; }
.imgpick--compact .imgpick-preview{ width:96px; height:64px; }

.save-bar{ position:sticky; bottom:0; display:flex; align-items:center; justify-content:space-between; gap:16px;
  background:var(--white, #fff); border:1px solid var(--line, #e6e3dc); border-radius:var(--radius, 14px);
  padding:12px 16px; box-shadow:var(--shadow); margin-top:6px; }

/* ---------- Reporting: metrics, charts, breakdowns ---------- */
.range-custom{ display:inline-flex; align-items:center; gap:7px; }
.range-custom input[type=date]{ width:auto; }
.range-custom[hidden]{ display:none; }

.metric-row{ display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; margin-bottom:16px; }
.metric{ background:var(--white, #fff); border:1px solid var(--line, #e6e3dc); border-radius:12px; padding:14px 16px; }
.metric-label{ font-size:11px; font-weight:700; letter-spacing:.07em; text-transform:uppercase;
  color:var(--muted, #6b6b63); }
.metric-value{ font-size:26px; font-weight:600; line-height:1.15; margin-top:5px; font-family:'Fraunces',serif; }
.metric-meta{ font-size:12px; color:var(--muted, #6b6b63); margin-top:2px; }

.chart{ margin-bottom:16px; }
.chart-head{ display:flex; justify-content:space-between; align-items:baseline; gap:12px;
  font-size:13px; margin-bottom:10px; }
.spark{ width:100%; height:110px; display:block; }
.spark rect{ fill:var(--green, #4f7d5c); opacity:.85; }
.spark rect:hover{ opacity:1; }

.report-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:14px; margin-bottom:20px; }
.breakdown{ margin:0; }
.bd-row{ display:grid; grid-template-columns:minmax(0,1fr) 84px auto; align-items:center; gap:10px;
  font-size:13px; padding:4px 0; }
.bd-key{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bd-bar{ background:rgba(0,0,0,.06); border-radius:999px; height:7px; overflow:hidden; }
.bd-bar i{ display:block; height:100%; background:var(--green, #4f7d5c); border-radius:999px; }
.bd-n{ font-variant-numeric:tabular-nums; white-space:nowrap; font-size:12.5px; }

/* ---------- Testimonials ---------- */
td.ord{ width:70px; white-space:nowrap; padding-right:0; }
td.ord .btn{ padding:2px 7px; min-width:26px; line-height:1.2; }
.media-cell-thumb2{ width:64px; padding-right:0; }
.quote-cell{ max-width:420px; color:var(--muted, #6b6b63); font-size:13px; }
.ytpreview{ display:flex; align-items:center; gap:12px; margin:0 0 14px; min-height:4px; }
.ytpreview img{ width:104px; height:70px; object-fit:cover; border-radius:8px; background:#f1efe9; }
.ytpreview code{ background:rgba(0,0,0,.06); border-radius:4px; padding:1px 5px; font-size:12px; }

/* ---------- Media library ---------- */
.media-stats{ display:flex; flex-wrap:wrap; gap:18px; align-items:center; margin:-8px 0 16px; font-size:13px;
  color:var(--muted, #6b6b63); }
.media-stats b{ color:var(--ink, #2b2b28); font-size:14.5px; }
.media-stats .warn{ color:#a3541c; }
.media-stats .warn b{ color:#a3541c; }

.media-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); grid-auto-rows:1fr; gap:12px; }
.media-tile{ display:flex; flex-direction:column; text-align:left; padding:0; background:var(--white, #fff);
  border:1px solid var(--line, #e6e3dc); border-radius:12px; overflow:hidden; cursor:pointer; font:inherit; color:inherit;
  transition:border-color .18s, box-shadow .18s, transform .18s; }
.media-tile:hover{ border-color:var(--green, #4f7d5c); box-shadow:var(--shadow); transform:translateY(-2px); }
.media-thumb{ flex:0 0 auto; aspect-ratio:1/1; background:#f1efe9; display:flex; align-items:center; justify-content:center;
  overflow:hidden; }
.media-thumb img, .media-thumb video{ width:100%; height:100%; object-fit:cover; display:block; }
.media-ext{ font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted, #6b6b63); }
.media-ext.big{ font-size:22px; }
.media-meta{ flex:1 1 auto; padding:9px 10px; display:flex; flex-direction:column; gap:3px; min-width:0; }
.media-meta b{ font-size:12.5px; line-height:1.35; overflow-wrap:anywhere;
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; overflow:hidden; min-height:2.7em; }
.media-sub{ font-size:11.5px; color:var(--muted, #6b6b63); }
.media-badges{ display:flex; flex-wrap:wrap; gap:4px; margin-top:auto; padding-top:4px; }
.media-badge{ font-size:10px; font-weight:700; letter-spacing:.03em; text-transform:uppercase;
  border-radius:999px; padding:2px 7px; background:rgba(0,0,0,.06); color:var(--muted, #6b6b63); }
.media-badge.ok{ background:rgba(79,125,92,.14); color:var(--green, #4f7d5c); }
.media-badge.warn{ background:rgba(163,84,28,.14); color:#a3541c; }

.tool-label{ font-size:12.5px; font-weight:600; color:var(--muted, #6b6b63); }
.viewtoggle{ display:inline-flex; border:1px solid var(--line, #e6e3dc); border-radius:9px; overflow:hidden;
  background:var(--white, #fff); }
.viewtoggle .vt{ display:flex; align-items:center; justify-content:center; width:34px; height:34px; padding:0;
  border:0; background:transparent; color:var(--muted, #6b6b63); cursor:pointer; }
.viewtoggle .vt + .vt{ border-left:1px solid var(--line, #e6e3dc); }
.viewtoggle .vt svg{ width:17px; height:17px; }
.viewtoggle .vt:hover{ background:rgba(0,0,0,.04); color:var(--ink, #2b2b28); }
.viewtoggle .vt[aria-pressed="true"]{ background:var(--green, #4f7d5c); color:#fff; }

.media-table td{ vertical-align:middle; }
.media-table tbody tr{ cursor:pointer; }
.media-table .num{ text-align:right; white-space:nowrap; }
.media-cell-thumb{ width:52px; padding-right:0; }
.media-rowthumb{ display:flex; align-items:center; justify-content:center; width:40px; height:40px;
  border-radius:7px; overflow:hidden; background:#f1efe9; }
.media-rowthumb img, .media-rowthumb video{ width:100%; height:100%; object-fit:cover; display:block; }

.media-pager{ display:flex; align-items:center; justify-content:center; gap:14px; margin-top:20px; font-size:13px; }
.media-detail{ background:#f1efe9; border-radius:12px; overflow:hidden; margin-bottom:16px;
  display:flex; align-items:center; justify-content:center; max-height:340px; }
.media-detail img, .media-detail video{ max-width:100%; max-height:340px; object-fit:contain; display:block; }
.media-uses{ margin:0; padding-left:18px; font-size:13px; }
.media-uses li{ margin:3px 0; }

/* ---------- Toast + misc ---------- */
.toast-wrap{ position:fixed; right:20px; bottom:20px; z-index:200; display:flex; flex-direction:column; gap:10px; }
.toast{ background:var(--ink); color:#fff; padding:12px 18px; border-radius:12px; font-size:13.5px; box-shadow:var(--shadow);
  animation:toast-in .25s ease; max-width:340px; }
.toast.ok{ background:#26543a; } .toast.err{ background:#7c2f22; }
@keyframes toast-in{ from{ opacity:0; transform:translateY(10px); } }
.form-error{ background:var(--danger-tint); color:var(--danger); padding:10px 12px; border-radius:10px; font-size:13px; margin-bottom:12px; }
.pagination{ display:flex; gap:8px; align-items:center; justify-content:flex-end; margin-top:14px; color:var(--muted); font-size:13px; }
.detail-row{ display:flex; gap:10px; padding:7px 0; border-bottom:1px solid var(--line); font-size:13.5px; }
.detail-row .k{ width:130px; color:var(--muted); flex:0 0 auto; }
.chips{ display:flex; flex-wrap:wrap; gap:8px; }
.chip{ background:var(--green-tint); color:#356b45; border-radius:999px; padding:4px 12px; font-size:12.5px; display:inline-flex; gap:6px; align-items:center; }
.chip button{ border:0; background:none; color:#356b45; font-size:14px; line-height:1; padding:0; }
.chip-x{ cursor:pointer; opacity:.7; } .chip-x:hover{ opacity:1; color:var(--danger); }
.loading{ text-align:center; color:var(--muted); padding:50px; }

@media (max-width:860px){
  .app{ grid-template-columns:1fr; }
  .sidebar{ position:static; height:auto; flex-direction:row; flex-wrap:wrap; align-items:center; gap:6px; }
  .sidebar .brand{ padding:6px; }
  .nav{ flex-direction:row; flex-wrap:wrap; flex:1 1 100%; }
  .nav a{ padding:8px 10px; }
  .sidebar .foot{ border:0; padding-top:0; }
  .main{ padding:22px 18px 50px; }
  .two-col{ grid-template-columns:1fr; }
  .row2{ grid-template-columns:1fr; }
  .row3, .row-stack > .row2, .list-row .row2{ grid-template-columns:1fr; }
}

/* publish control: the static site only changes when this runs */
.foot .pub{ margin-bottom:14px; }
.pub-note{ margin-top:7px; font-size:11.5px; color:rgba(255,255,255,.55); line-height:1.4; }
.pub-note .pub-fail{ color:#e88; }
.hint{ margin-top:5px; font-size:11.5px; color:var(--muted,#8a8a82); line-height:1.4; }
.hint.warn{ color:#a3541c; font-weight:600; }
/* live character count on the search-listing fields */
.hint.charc{ font-variant-numeric:tabular-nums; }

/* ---------- Trust strips ---------- */
/* One card per page. A page with the strip off collapses to its header row, so
   the list stays scannable when most pages are off. */
.trust-row{ margin-bottom:12px; }
.trust-row.off{ opacity:.72; }
.trust-head{ display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.trust-toggle{ display:flex; align-items:center; gap:10px; margin:0; cursor:pointer; font-size:15px; }
.trust-toggle input{ width:16px; height:16px; margin:0; accent-color:var(--green,#4f7d5c); }

/* Inline checkbox field — same visual language as .trust-toggle: a real
   checkbox, the green accent, the label in normal case alongside it. */
.field-check{ display:flex; align-items:center; gap:10px; margin:0 0 14px; cursor:pointer; font-size:13.5px; color:var(--ink); }
.field-check input{ width:16px; height:16px; margin:0; flex:0 0 auto; accent-color:var(--green,#4f7d5c); cursor:pointer; }
.field-check .hint{ flex:1; min-width:0; }
.trust-body{ margin-top:16px; padding-top:16px; border-top:1px solid var(--line,#e6e3dc); }
.trust-body .field{ margin-bottom:12px; }
/* What the page will actually render, defaults folded in. */
.trust-preview{ margin:14px 0 12px; padding:14px 16px; border-radius:10px;
  background:var(--green-tint,#eef3ee); border:1px solid var(--line,#e6e3dc); }
.trust-stars{ color:#b8860b; font-size:11px; letter-spacing:4px; margin-bottom:6px; }
.trust-preview blockquote{ margin:0 0 6px; font-family:Fraunces,Georgia,serif; font-style:italic;
  font-size:15px; line-height:1.55; color:var(--ink,#2b2b28); }
.trust-foot{ display:flex; align-items:center; gap:12px; }

/* ---------- Availability & Slots ---------- */
.day-pills{ display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }
.day-pill{ display:inline-flex; align-items:center; justify-content:center; padding:7px 15px;
  border-radius:999px; border:1px solid var(--line,#e6e3dc); font-size:13px; font-weight:500;
  color:var(--ink,#2b2b28); background:var(--white,#fff); cursor:pointer; transition:all .18s ease; user-select:none; }
.day-pill input{ position:absolute; opacity:0; pointer-events:none; width:0; height:0; }
.day-pill.active, .day-pill:has(input:checked){ background:var(--green,#4f7d5c); color:#fff; border-color:var(--green,#4f7d5c); font-weight:600; box-shadow:0 3px 10px rgba(79,125,92,.35); }
.day-pill:hover{ border-color:var(--green,#4f7d5c); }
.time-textarea{ font-family:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace; font-size:13.5px; line-height:1.6; padding:10px 14px; min-height:100px; width:100%; box-sizing:border-box; }
.time-presets{ display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; align-items:center; }
.time-preset-btn{ border:1px solid var(--line,#e6e3dc); background:var(--cream-2,#f2eee6); border-radius:999px; padding:3px 10px; font-size:11.5px; color:var(--ink,#2b2b28); cursor:pointer; font-family:inherit; transition:background .15s, border-color .15s; }
.time-preset-btn:hover{ background:var(--green-tint,#e7efe6); border-color:var(--green,#4f7d5c); color:var(--green,#4f7d5c); }
.slot-chip{ display:inline-flex; align-items:center; gap:6px; padding:5px 10px 5px 12px;
  border-radius:999px; background:var(--green-tint,#e7efe6); border:1px solid rgba(79,125,92,.22);
  font-size:12.5px; color:var(--ink,#2b2b28); margin:2px 4px 2px 0; font-variant-numeric:tabular-nums; }
.slot-time{ font-weight:600; color:#2c5436; }
.slot-cap{ font-size:11px; color:var(--muted,#6b6b63); background:rgba(0,0,0,.06); border-radius:999px; padding:1px 6px; }
.slot-del{ border:0; background:none; color:var(--muted,#6b6b63); font-size:14px; line-height:1; padding:0 2px; cursor:pointer; border-radius:50%; transition:color .15s; }
.slot-del:hover{ color:var(--danger,#c44); }

/* ---------- Gallery ---------- */
/* Two separate sections: "Featured" (a horizontal strip that mirrors the
   page's lookbook order) and "All Photos" (the full album, carousel order).
   Tool buttons are uniform icon squares using the panel's stroke-icon set. */
.gal-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:16px; }
.gal-tile,.gal-feat-tile{ border:1px solid var(--line,#e6e3dc); border-radius:12px; overflow:hidden;
  background:#fff; display:flex; flex-direction:column; }
.gal-thumb{ position:relative; aspect-ratio:4/3; background:#f2f0ea; }
.gal-feat-tile .gal-thumb{ aspect-ratio:3/4; }
.gal-thumb img,.gal-thumb video{ width:100%; height:100%; object-fit:cover; display:block; }
.gal-badge{ position:absolute; top:8px; left:8px; display:inline-flex; align-items:center; gap:4px;
  font-size:10.5px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; padding:4px 8px;
  border-radius:999px; background:rgba(255,255,255,0.92); color:#7a5c14; }
.gal-badge .ico{ width:11px; height:11px; }
.gal-badge-dark{ background:var(--ink,#2b2b28); color:#fff; }
.gal-order{ position:absolute; top:8px; right:8px; width:22px; height:22px; border-radius:50%;
  background:var(--green,#4f7d5c); color:#fff; font-size:11.5px; font-weight:700;
  display:flex; align-items:center; justify-content:center; }
.gal-cap-line{ font-size:13px; line-height:1.45; color:var(--ink,#2b2b28);
  padding:10px 12px 6px; min-height:20px; word-break:break-word; }
.gal-tools{ display:flex; gap:5px; padding:8px 10px 10px; margin-top:auto; }
.gal-tools button{ flex:1; height:30px; padding:0; border:1px solid var(--line,#e6e3dc); background:none;
  border-radius:8px; cursor:pointer; color:var(--ink,#2b2b28);
  display:flex; align-items:center; justify-content:center; }
.gal-tools button .ico{ width:15px; height:15px; opacity:.7; transition:opacity .2s ease; }
.gal-tools button:hover:not(:disabled){ background:var(--green-tint,#eef3ee); }
.gal-tools button:hover:not(:disabled) .ico{ opacity:1; }
.gal-tools button[data-on]{ color:#7a5c14; }
.gal-tools button[data-on] .ico{ fill:#b8860b; stroke:#b8860b; opacity:1; }
.gal-tools button[data-act="remove"]:hover:not(:disabled){ background:#fdecec; }
.gal-tools button:disabled{ opacity:.35; cursor:default; }
.gal-tile.is-featured{ border-color:#d9c48a; }
.gal-hidden .gal-thumb img,.gal-hidden .gal-thumb video{ opacity:.55; filter:grayscale(.7); }
/* Featured strip */
.gal-feat-row{ display:flex; gap:14px; overflow-x:auto; padding:2px 2px 8px; }
.gal-feat-tile{ flex:0 0 148px; }

/* Number ranking inside All Photos: type a slot number, the photo jumps there.
   Sits between the caption and the tool buttons, quiet until focused. */
.gal-rank{ display:flex; align-items:center; gap:6px; padding:0 12px 8px;
  font-size:12px; color:var(--muted,#6b6b63); }
.gal-rank input{ width:56px; height:26px; padding:0 6px; border:1px solid var(--line,#e6e3dc);
  border-radius:6px; font:inherit; font-size:12.5px; color:var(--ink,#2b2b28); background:#fff; }
.gal-rank input:focus{ outline:none; border-color:var(--green,#4f7d5c); }

/* Helper text under plain section names (Featured / All Photos). */
.gal-hint{ font-size:12px; color:var(--muted,#6b6b63); margin:-4px 0 14px; }

/* ---------- Wall of Fame ---------- */
/* The focal-point preview is the site's own circular medallion: every value
   below is copied from .wof-medal in scripts/wof_pages.py (WOF_CSS) so the
   editor sees the exact crop, vignette and scrim a visitor sees.
   Circular frame is 1/1 with 50% radius. The row's sliders (and a drag on
   the portrait) drive --wof-fx / --wof-fy / --wof-z — the same custom
   properties the built page puts on each .wof-medal. Only additions: the
   grab cursor that marks the drag-to-pan target. */
.wof-medal{ position:relative; display:block; width:min(100%,170px); margin:0 auto;
  aspect-ratio:1 / 1; border-radius:50%; overflow:hidden; background:#0e1d16;
  border:1px solid rgba(233,200,125,.55);            /* thin gold hairline ring */
  box-shadow:0 0 0 7px rgba(201,154,71,.14);          /* wider translucent outer ring */
  transition:box-shadow .35s ease, border-color .35s ease;
  touch-action:none;
  cursor:grab; }
.wof-medal:active{ cursor:grabbing; }
.wof-medal img{ width:100%; height:100%; object-fit:cover; display:block;
  transform:translate(calc((50% - var(--wof-fx,50%)) * 0.2 / (var(--wof-z,125) / 100)), calc((50% - var(--wof-fy,50%)) * 0.2 / (var(--wof-z,125) / 100))) scale(calc(var(--wof-z,125) / 100));
  transform-origin:var(--wof-fx,50%) var(--wof-fy,50%);
  -webkit-user-drag:none; user-select:none; -webkit-user-select:none; }
/* Bottom scrim in the page's own colour, as on the site. */
.wof-medal::before{ content:""; position:absolute; inset:0; z-index:1;
  border-radius:50%; pointer-events:none;
  background:linear-gradient(180deg, rgba(11,22,17,0) 58%, rgba(11,22,17,.82) 100%); }
/* Soft radial vignette: the photo's edge melts into the page. */
.wof-medal::after{ content:""; position:absolute; inset:0; z-index:2;
  border-radius:50%; pointer-events:none;
  box-shadow:inset 0 0 34px rgba(4,10,7,.5); }
/* Monogram fallback (the site's .wof-mono). The site uses var(--hh-green);
   the panel's --green (#4f7d5c) is the same colour the site resolves to. */
.wof-mono{ width:100%; height:100%; display:flex; align-items:center; justify-content:center;
  background:radial-gradient(circle at 30% 25%, #4f7d5c 0%, #233a2c 70%);
  color:#f3e9d2; font-family:'Fraunces',serif; font-size:56px; font-weight:500; letter-spacing:.08em; }

/* The preview sits on the site's dark page colour (#0b1611, .hh-dark-page) so
   the scrim and vignette read exactly as they do on the live wall. */
.wof-medal-stage{ position:relative; background:#0b1611; border-radius:16px; padding:14px 8px; }
/* Corner zoom handle: drag outward to zoom into the crop, inward to pull back.
   Lives on the stage (outside the clipped circle) so it is always grabbable. */
.wof-zoom-handle{ position:absolute; right:6px; bottom:6px; width:30px; height:30px;
  display:flex; align-items:center; justify-content:center; padding:0;
  border-radius:50%; border:1px solid rgba(201,154,71,.55);
  background:rgba(11,18,13,.8); color:#e9c87d; font-size:14px; line-height:1;
  cursor:nwse-resize; touch-action:none; z-index:3;
  transition:background .2s ease, color .2s ease; }
.wof-zoom-handle:hover{ background:var(--gold,#c99a47); color:#241a06; }

/* One editable person per row. */
.wof-person{ border:1px solid var(--line,#e6e3dc); border-radius:12px; background:#fbfaf7;
  padding:12px 14px; margin-bottom:12px; }
.wof-person-head{ display:flex; align-items:center; gap:10px; margin-bottom:10px; flex-wrap:wrap; }
/* Hub card photo preview: wide tile thumb matching the site's zcard media. */
.wof-hub-thumb{ margin-bottom:10px; }
.wof-hub-thumb img{ width:100%; max-width:216px; aspect-ratio:16/9; object-fit:cover;
  border-radius:12px; display:block; background:#0b1611; }
.wof-person-head b{ font-size:14.5px; }
.wof-person-head .tag{ font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; }
.wof-person.is-hidden .wof-person-head b{ opacity:.55; }
.wof-person-foot{ display:flex; gap:8px; margin-top:2px; }
.wof-ord{ display:flex; align-items:center; gap:6px; font-size:12px; color:var(--muted,#6b6b63); margin:0; }
.wof-ord input{ width:58px; padding:4px 6px; font-size:12.5px; }

/* Cultural Corridor ordering: same pattern as the gallery All Photos list —
   arrows swap with the neighbour, typing a number ranks the row at that
   slot. Every move saves immediately (see ccMove/ccRankByNumber in app.js). */
.cc-move{ display:inline-flex; gap:4px; }
.cc-move button{ width:28px; height:26px; padding:0; border:1px solid var(--line,#e6e3dc);
  background:none; border-radius:8px; cursor:pointer; color:inherit; }
.cc-move button .ico{ width:14px; height:14px; opacity:.7; }
.cc-move button:hover:not(:disabled){ background:var(--green-tint,#eef3ee); }
.cc-move button:hover:not(:disabled) .ico{ opacity:1; }
.cc-move button:disabled{ opacity:.35; cursor:default; }
.cc-idxrow{ display:grid; grid-template-columns:190px minmax(120px,1fr) minmax(0,2fr) auto;
  gap:12px; align-items:end; padding:10px 0; }
.cc-ordcell{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.cc-idxrow + .cc-idxrow{ border-top:1px solid var(--line,#e6e3dc); }
.cc-idxrow > b{ padding-bottom:10px; }
.cc-idxrow.is-hidden > b{ opacity:.55; }
.cc-idxrow .field{ margin:0; }
@media (max-width:860px){
  .cc-idxrow{ grid-template-columns:1fr; }
  .cc-idxrow > b{ padding-bottom:0; }
}
.wof-person-grid{ display:grid; grid-template-columns:216px 1fr; gap:16px; align-items:start; }

/* Focal-point sliders (0-100, whole steps — exactly what the API stores). */
.wof-focal{ margin-top:10px; }
.wof-focal-row{ display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.wof-focal-row label{ flex:0 0 auto; margin:0; font-size:10.5px; font-weight:600;
  letter-spacing:.05em; text-transform:uppercase; color:var(--muted,#6b6b63); }
.wof-focal-row input[type=range]{ flex:1 1 auto; width:auto; min-height:0; padding:0;
  border:0; background:transparent; box-shadow:none; accent-color:var(--green,#4f7d5c); }
.wof-focal-row input[type=range]:focus{ box-shadow:none; }
.wof-focal-row output{ flex:0 0 28px; text-align:right; font-size:12px; color:var(--muted,#6b6b63);
  font-variant-numeric:tabular-nums; }
/* Per-photo revert sits under the zoom slider, in the red danger style. */
.wof-revert{ margin-top:8px; }

/* The five-up warning banner — shown whenever active ≠ 5. */
.wof-banner{ background:#fbf0db; border:1px solid #ecd9a8; border-left:3px solid var(--gold,#c99a47);
  color:#7a5c14; border-radius:10px; padding:10px 14px; margin:0 0 18px; font-size:13px; }

.wof-addrow{ display:flex; gap:10px; margin-top:6px; }
.wof-addrow input{ max-width:340px; }

/* Cultural Corridor side column: backdrop preview full sidebar width on top,
   dropzone beneath it at the same width. Scoped to .cc-side only — the
   shared .imgpick-row stays horizontal everywhere else in the panel. */
.cc-side .imgpick-row{ flex-direction:column; align-items:stretch; }
.cc-side .imgpick-preview{ flex:none; width:100%; height:auto; aspect-ratio:16/10; }
.cc-side .imgpick-dz{ width:100%; }

@media (max-width:860px){
  .wof-person-grid{ grid-template-columns:1fr; }
  .wof-addrow{ flex-direction:column; align-items:stretch; }
  .wof-addrow input{ max-width:none; }
}
