:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --surface: #161617;
  --line: #2a2a2c;
  --text: #ffffff;
  --soft: #cfcac2;
  --faint: #8f8b84;
  --accent: #ff6a00;
  --accent-text: #140b02;
  --danger: #ff5a4d;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.05rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.wrap { max-width: 46rem; margin: 0 auto; padding: 1.75rem 1rem 4.5rem; }
.brand { color: var(--accent); font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; font-size: .85rem; margin: 0 0 1.5rem; }
.brand a { color: inherit; text-decoration: none; }
h1 { font-size: 2.35rem; line-height: 1.08; letter-spacing: -.015em; margin: 0 0 .8rem; }
h2 { font-size: 1.5rem; letter-spacing: -.01em; margin: 2.4rem 0 .85rem; }
p.lede { font-size: 1.2rem; line-height: 1.55; color: var(--soft); margin: 0 0 1.5rem; }
.loading { color: var(--soft); font-size: 1.2rem; padding: 2rem 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.4rem; padding: .8rem 1.5rem; border-radius: 12px;
  font-size: 1.15rem; font-weight: 700; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; background: var(--surface);
  color: var(--text); font-family: inherit;
  transition: filter .15s ease, transform .1s ease, border-color .15s ease;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, input:focus-visible, textarea:focus-visible,
.design-card:focus-visible {
  outline: 3px solid rgba(255, 106, 0, .55); outline-offset: 2px;
}
.btn-main { background: var(--accent); color: var(--accent-text); }
.btn-ghost { border-color: var(--line); }
.btn-danger { color: var(--danger); border-color: var(--line); }
.btn-small { min-height: 2.8rem; font-size: 1rem; padding: .5rem 1rem; }
.btn[disabled] { opacity: .55; cursor: default; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1rem 0; }
.card { background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 1.4rem; margin-bottom: 1rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
.card h3 { font-size: 1.35rem; margin: 0 0 .25rem; }
.card .when { color: var(--accent); font-weight: 700; margin: 0 0 .35rem; }
.card .meta { color: var(--soft); margin: 0 0 .35rem; }
.badge { display: inline-block; font-size: .85rem; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; border-radius: 999px;
  padding: .2rem .7rem; margin-bottom: .5rem; }
.badge-live { background: var(--accent); color: var(--accent-text); }
.badge-draft { background: #26262a; color: var(--soft); }
label { display: block; font-weight: 700; margin: 1.25rem 0 .4rem; }
.card form label:first-child { margin-top: .25rem; }
label .hint { display: block; font-weight: 500; color: var(--faint);
  font-size: .95rem; margin-top: .15rem; }
input[type="text"], input[type="email"], input[type="password"],
input[type="date"], input[type="time"], textarea {
  width: 100%; min-height: 3.2rem; padding: .7rem .95rem; border-radius: 12px;
  border: 1px solid var(--line); background: #101011; color: var(--text);
  font-size: 1.1rem; font-family: inherit; line-height: 1.45;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus,
input[type="date"]:focus, input[type="time"]:focus, textarea:focus {
  border-color: var(--accent); outline: none;
  box-shadow: 0 0 0 3px rgba(255, 106, 0, .22);
}
textarea { min-height: 6rem; resize: vertical; }
input[type="file"] { font-size: 1rem; color: var(--soft); margin-top: .25rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.check { display: flex; gap: .7rem; align-items: flex-start; margin: 1.2rem 0; }
.check input { width: 1.6rem; height: 1.6rem; margin-top: .15rem; accent-color: var(--accent); }
.check span { font-size: 1.1rem; font-weight: 600; }
.error { background: #2a1210; border: 1px solid var(--danger); color: #ffd9d5;
  border-radius: 12px; padding: 1rem 1.1rem; margin: 1rem 0; font-size: 1.05rem; }
.notice { background: #1c150c; border: 1px solid var(--accent); color: #ffe3cc;
  border-radius: 12px; padding: 1rem 1.1rem; margin: 1rem 0; font-size: 1.05rem; }
.addr { font-size: 1.15rem; font-weight: 700; color: var(--accent);
  word-break: break-all; }
img.thumb { width: 100%; max-height: 12rem; object-fit: cover;
  border-radius: 12px; margin-bottom: .75rem; border: 1px solid var(--line); }
img.logo-preview { width: 5rem; height: 5rem; object-fit: cover;
  border-radius: 14px; border: 2px solid var(--accent); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.foot { margin-top: 3rem; color: var(--faint); font-size: .95rem; }
a { color: var(--accent); }
.hidden { display: none; }
.design-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0 1.25rem; }
.design-card { display: block; margin: 0; cursor: pointer; background: var(--surface);
  border: 3px solid var(--line); border-radius: 16px; padding: .8rem;
  width: 100%; text-align: left; font: inherit; color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease; }
.design-card:hover { border-color: #4c4c50; }
.design-card:active { transform: translateY(1px); }
.design-card[disabled] { opacity: .6; cursor: default; }
.design-card input { position: absolute; opacity: 0; }
.design-card img { width: 100%; border-radius: 10px; display: block; }
.design-card .design-name { display: block; font-size: 1.3rem; font-weight: 800; margin: .7rem 0 .2rem; }
.design-card .design-blurb { display: block; font-weight: 500; color: var(--soft); font-size: 1rem; line-height: 1.45; }
.design-card.picked { border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, .18), 0 12px 28px rgba(0, 0, 0, .35); }
.design-card .current-tag { display: inline-block; background: var(--accent);
  color: var(--accent-text); font-size: .82rem; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase; border-radius: 999px;
  padding: .22rem .7rem; margin: 0 0 .35rem; }
.preview-frame { width: 100%; height: 34rem; border: 1px solid var(--line);
  border-radius: 12px; background: #ffffff; }
.sched-row { display: flex; gap: .5rem; margin-bottom: .6rem; align-items: center; }
.sched-row .sr-time { flex: 0 0 8.5rem; }
.sched-row .sr-label { flex: 1; }
.editor-section { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 1rem 1.1rem; margin-top: 1.2rem; }
.editor-section > h3 { margin: 0 0 .4rem; display: flex; align-items: center; gap: .6rem; }
.editor-section .secnum { display: inline-flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: .95rem; font-weight: 900; flex: 0 0 auto; }
.faq-row { border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem; margin-top: .6rem; }
.faq-row .faq-q { font-weight: 700; margin: 0 0 .45rem; }
.faq-row .faq-a { width: 100%; }
.faq-row .btn { margin-top: .5rem; }
@media (max-width: 40rem) {
  .design-grid { grid-template-columns: 1fr; }
  .sched-row { flex-wrap: wrap; }
  .editor-section { padding: .85rem .8rem; }
  .preview-frame { height: 70vh; }
  .faq-row { padding: .6rem; }
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.35rem; }
}
.checklist .step { margin: .3rem 0; font-size: 1.05rem; }
.checklist .step.done { color: var(--soft); }
.checklist .step.todo a { font-weight: 700; }
.card.past { opacity: .62; }
.char-count { display: block; text-align: right; color: var(--faint); font-size: .85rem; font-weight: 500; margin-top: .2rem; }
.offline-banner { background: #2a1210; border: 1px solid var(--danger); color: #ffd9d5; border-radius: 12px; padding: .8rem 1.1rem; margin: 1rem 0; font-size: 1.05rem; }
.page-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.page-tab { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: .5rem 1.1rem; font-weight: 700; font-size: .95rem; cursor: pointer; }
.page-tab.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.member-box { border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; margin-top: 1rem; }
.soc-row { display: flex; align-items: center; gap: .6rem; margin-top: .6rem; flex-wrap: wrap; }
.soc-row .soc-icon { width: 1.6rem; height: 1.6rem; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.soc-row .soc-icon svg { width: 1.35rem; height: 1.35rem; display: block; }
.soc-row select { width: auto; flex: 0 0 auto; }
.soc-row .soc-url { flex: 1; min-width: 10rem; }

/* Photo position nudgers in the dashboard */
.posctl { display: flex; align-items: center; gap: .3rem; margin-top: .45rem; flex-wrap: wrap; }
.posctl span { font-size: .85rem; opacity: .75; margin-right: .15rem; }
.posctl button { border: 1px solid var(--border, #ccc); background: var(--surface, #fff); color: inherit; border-radius: .45rem; padding: .28rem .55rem; font-size: .8rem; cursor: pointer; line-height: 1; }
.posctl button:hover { border-color: var(--accent, #b08a2e); }
.posctl[hidden] { display: none; }

/* Your colors pickers in the dashboard */
.color-row { display: flex; align-items: center; gap: .6rem; margin-top: .3rem; }
.color-row input[type="color"] { width: 3.4rem; height: 2.2rem; padding: .15rem; border: 1px solid var(--border, #ccc); border-radius: .5rem; background: var(--surface, #fff); cursor: pointer; }

/* ===== Editor layout (dashboard, mockup-style) ===== */
.wrap:has(.editor) { max-width: 1100px; }
.editor { --ed-panel: #171717; --ed-line: #333333; --ed-muted: #aeaaa7; }
.ed-chrome { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--ed-line); padding: .9rem 0; }
.ed-brand { font-size: .9rem; letter-spacing: .08em; font-weight: 900; }
.ed-brand i { color: var(--accent); font-style: normal; }
.ed-chrome-right { display: flex; align-items: center; gap: 1rem; }
.ed-livesite { font-weight: 700; }
.ed-areanav { display: flex; gap: .5rem; overflow-x: auto; border-bottom: 1px solid var(--ed-line); margin-bottom: 1.6rem; }
.ed-areanav button { white-space: nowrap; border: 0; border-radius: 0; background: transparent; color: var(--ed-muted); border-bottom: 2px solid transparent; padding: .8rem .85rem; font: inherit; font-weight: 650; cursor: pointer; }
.ed-areanav button[aria-pressed="true"] { border-bottom-color: var(--accent); color: #ffffff; }
.editor h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: 0; }
.editor small { color: var(--ed-muted); display: block; margin-top: .25rem; }
.ed-between { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.ed-addpage { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.ed-addpage input { min-height: 2.8rem; }
.ed-pills { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .3rem; margin: 1.2rem 0; }
.ed-pills .page-tab { border: 1px solid var(--ed-line); background: transparent; color: var(--text); border-radius: 999px; padding: .55rem 1.15rem; font-weight: 650; white-space: nowrap; cursor: pointer; font-size: 1rem; }
.ed-pills .page-tab.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.ed-panel { background: var(--ed-panel); border: 1px solid var(--ed-line); border-radius: 16px; overflow: hidden; margin-top: 1.2rem; }
.ed-panel-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1.1rem 1.4rem; }
.ed-panel-head h2 { margin: 0; font-size: 1.6rem; }
.ed-panel-head small { margin-top: .1rem; }
.ed-tabs { display: flex; gap: .25rem; overflow-x: auto; padding: 0 1rem; border-bottom: 1px solid var(--ed-line); }
.ed-tabs button { white-space: nowrap; border: 0; border-radius: 0; background: transparent; color: var(--ed-muted); border-bottom: 2px solid transparent; padding: .75rem .8rem; font: inherit; font-weight: 650; cursor: pointer; }
.ed-tabs button[aria-pressed="true"] { border-bottom-color: var(--accent); color: #ffffff; }
.ed-content { padding: 1.2rem 1.4rem 1.4rem; }
.ed-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
.ed-fields > label { margin: 0; }
.ed-fields > label.full { grid-column: 1 / -1; }
.ed-fields .check { margin: .4rem 0; align-self: start; }
.ed-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; border-top: 1px solid var(--ed-line); background: var(--ed-panel); padding: 1rem 1.4rem; margin: 1.4rem -1.4rem -1.4rem; position: sticky; bottom: 0; }
.ed-footer .meta { margin: 0; }
.ed-row { border: 1px solid var(--ed-line); border-radius: 12px; padding: .9rem 1.1rem; margin-top: 1.2rem; background: var(--ed-panel); }
.ed-row summary { cursor: pointer; font-weight: 700; }
.ed-row .step { margin: .45rem 0; }
.ed-row .step.done { color: var(--ed-muted); }
.photo-field img.thumb { width: 42%; aspect-ratio: 2 / 1; max-height: none; }
.photo-field .posctl { margin-top: .5rem; }
.editor .card { background: var(--ed-panel); border-color: var(--ed-line); box-shadow: none; }
.ed-dialog { width: min(1150px, 97vw); max-height: 92vh; background: #171717; border: 1px solid var(--ed-line); border-radius: 14px; color: var(--text); padding: 1.2rem; }
.ed-dialog::backdrop { background: rgba(0, 0, 0, .72); }
.ed-dialog .preview-frame { height: 74vh; margin-top: .8rem; }
select { width: 100%; min-height: 3.2rem; padding: .7rem .95rem; border-radius: 12px; border: 1px solid var(--line); background: #101011; color: var(--text); font-size: 1.1rem; font-family: inherit; }
.soc-row select { width: auto; min-height: 2.6rem; }
.check-row { display: flex; gap: .7rem; align-items: center; font-weight: 600; }
.check-row input { width: 1.4rem; height: 1.4rem; accent-color: var(--accent); }
@media (max-width: 620px) {
  .ed-fields { grid-template-columns: 1fr; }
  .ed-content { padding: 1rem .9rem 1.1rem; }
  .ed-footer { margin: 1.1rem -.9rem -1.1rem; padding: .9rem; }
  .ed-panel-head { padding: .9rem; }
  .photo-field img.thumb { width: 58%; }
}

[hidden] { display: none !important; }
