/* Shared styles for every page: tokens, base, buttons, header, footer, forms, tags, auth pages */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f5f2;
  --ink: #0d1530;
  --ink-soft: #5b606b;
  --line: #e6e4df;
  --brand: #0784ee;
  --brand-ink: #ffffff;
  --brand-soft: #e8f3fe;
  --accent: #061b50;
  --danger: #b42318;
  --danger-soft: #fdecec;
  --success: #1a7f53;
  --success-soft: #e7f6ef;
  --radius: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
section { padding: 96px 0; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 14px;
}
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
.lead { font-size: 18px; color: var(--ink-soft); max-width: 640px; }
.center { text-align: center; }
.center .lead { margin: 16px auto 0; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px;
  border-radius: 999px; font-family: inherit; font-weight: 700; font-size: 15px; line-height: 1.2;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
  border: 2px solid transparent; cursor: pointer; background: transparent; color: inherit;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -8px var(--brand); }
.btn-ghost { border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.link-arrow { font-weight: 700; color: var(--brand); display: inline-flex; gap: 6px; align-items: center; }
.link-arrow:hover { gap: 10px; }
.link-btn { background: none; border: 0; font: inherit; color: var(--brand); font-weight: 600; cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.text-link { color: var(--brand); font-weight: 700; }
.text-link:hover { text-decoration: underline; }

/* Header */
header {
  position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.logo { font-weight: 800; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.logo img { height: 44px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; font-weight: 600; font-size: 15px; }
.nav-links > li > a:hover, .dropdown-toggle:hover, .nav-links a[aria-current="page"] { color: var(--brand); }
.dropdown { position: relative; }
.dropdown-toggle { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.dropdown-menu {
  position: absolute; top: calc(100% + 12px); left: -12px; min-width: 180px; list-style: none;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 8px;
  box-shadow: 0 16px 40px -12px rgba(0,0,0,.18); opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: .15s;
}
.dropdown:hover .dropdown-menu, .dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.dropdown-menu a { display: block; padding: 8px 12px; border-radius: 8px; }
.dropdown-menu a:hover { background: var(--bg-soft); }
.nav-cta { display: flex; gap: 10px; }
.nav-cta .btn { padding: 10px 20px; }
.nav-links .mobile-only { display: none; }
.menu-btn { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 6px; }

/* Show/hide by login state (members-store.js sets html[data-auth]) */
html[data-auth="member"] [data-show="guest"],
html:not([data-auth="member"]) [data-show="member"] { display: none !important; }
html:not([data-admin="true"]) [data-show="admin"] { display: none !important; }

/* Footer */
footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 72px 0 32px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; }
footer h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
footer ul { list-style: none; display: grid; gap: 10px; color: var(--ink-soft); }
footer ul a:hover { color: var(--brand); }
footer .logo img { height: 56px; }
footer .about { color: var(--ink-soft); margin-top: 14px; max-width: 300px; }
.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.socials a:hover { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink-soft); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 14px; }
footer.footer-slim { padding: 28px 0; }
.footer-slim .footer-bottom { margin-top: 0; padding-top: 0; border-top: 0; align-items: center; }
.footer-slim .socials { margin-top: 0; }
.footer-slim .socials a { width: 34px; height: 34px; font-size: 12px; }

/* Forms */
.field { display: grid; gap: 6px; }
.field > label, .field-label { font-weight: 600; font-size: 14px; }
.field .optional { font-weight: 500; color: var(--ink-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 15px; background: var(--bg); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
textarea.input { resize: vertical; min-height: 110px; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input[readonly] { background: var(--bg-soft); color: var(--ink-soft); }
.hint { font-size: 13px; color: var(--ink-soft); }
.hint-row { display: flex; justify-content: space-between; gap: 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.check input { margin-top: 4px; width: 16px; height: 16px; accent-color: var(--brand); flex: none; }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 64px; }
.password-wrap .link-btn { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 13px; }
.alert { border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 600; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-info { background: var(--brand-soft); color: var(--accent); }
.alert-success { background: var(--success-soft); color: var(--success); }

/* Photo upload */
.photo-field { display: flex; gap: 18px; align-items: center; }
.photo-field .actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }

/* Photo editor (drag + zoom inside a circle) */
dialog.cropper {
  border: 0; border-radius: 24px; padding: 28px; width: min(420px, calc(100% - 32px)); margin: auto;
  color: var(--ink); box-shadow: 0 30px 80px -20px rgba(6,27,80,.45);
}
dialog.cropper::backdrop { background: rgba(6,27,80,.55); backdrop-filter: blur(3px); }
.cropper h2 { font-size: 22px; letter-spacing: -0.01em; }
.cropper .hint { margin: 4px 0 18px; }
.crop-stage {
  position: relative; width: min(300px, 100%); aspect-ratio: 1; margin: 0 auto; overflow: hidden;
  border-radius: 16px; background: #0d1530; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.crop-stage.dragging { cursor: grabbing; }
.crop-stage:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.crop-stage img { position: absolute; top: 0; left: 0; max-width: none; pointer-events: none; }
.crop-stage img.animate { transition: transform .25s ease; }
.crop-ring {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  border: 2px solid rgba(255,255,255,.9); box-shadow: 0 0 0 999px rgba(6,27,80,.6);
}
.crop-zoom { display: flex; align-items: center; gap: 12px; margin: 20px auto 0; max-width: 300px; font-weight: 700; color: var(--ink-soft); }
.crop-zoom input { flex: 1; accent-color: var(--brand); }
.crop-actions { display: flex; gap: 10px; align-items: center; margin-top: 22px; flex-wrap: wrap; }
.crop-spacer { flex: 1; }

/* Avatars */
.avatar {
  border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center;
  font-weight: 800; letter-spacing: .02em;
}

/* Tags and chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--ink);
  font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.3; cursor: pointer; transition: .15s;
}
.chip:hover:not([disabled]) { border-color: var(--brand); color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip[aria-pressed="true"]:hover { color: #fff; }
.chip[disabled] { opacity: .4; cursor: not-allowed; }
.chip .count { font-size: 12px; font-weight: 700; opacity: .55; }
.chip[aria-pressed="true"] .count { opacity: .85; }
.tag-pill {
  display: inline-block; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-soft); line-height: 1.4;
}
.tag-pill.hit { background: var(--brand-soft); color: var(--brand); }

/* Tag picker */
.tp-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.tp-head .input { max-width: 280px; padding: 10px 14px; }
.tp-count { margin-left: auto; font-weight: 700; font-size: 14px; color: var(--ink-soft); white-space: nowrap; }
.tp-count.full { color: var(--brand); }
.tp-group { border: 0; margin-bottom: 18px; }
.tp-group legend { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
.tp-note { font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 12.5px; }
.tp-note.full { color: var(--brand); font-weight: 700; }
.tp-other { margin-top: 12px; max-width: 360px; }
.tp-selected { margin-bottom: 18px; min-height: 28px; }

/* Auth pages: photo panel + form */
.auth { display: grid; grid-template-columns: 1fr 1.1fr; min-height: calc(100vh - 72px); }
.auth-side {
  position: relative; color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: flex-end;
  background: #061b50 center / cover no-repeat;
}
.auth-side::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,27,80,.25), rgba(6,27,80,.88)); }
.auth-side > * { position: relative; }
.auth-side h2 { font-size: clamp(28px, 3vw, 38px); }
.auth-side p { opacity: .85; margin-top: 12px; max-width: 420px; }
.auth-side ul { list-style: none; display: grid; gap: 10px; margin-top: 24px; }
.auth-side li::before { content: "✓"; font-weight: 800; margin-right: 10px; color: #4fb0ff; }
.auth-main { display: flex; align-items: flex-start; justify-content: center; padding: 64px 24px; }
.auth-card { width: 100%; max-width: 520px; }
.auth-card.wide { max-width: 680px; }
.auth-card h1 { font-size: clamp(30px, 3.5vw, 40px); font-weight: 800; }
.auth-card .sub { color: var(--ink-soft); margin: 10px 0 28px; }
.auth-form { display: grid; gap: 18px; }
.auth-foot { margin-top: 24px; font-size: 15px; color: var(--ink-soft); text-align: center; }

/* Signup stepper */
.stepper { display: flex; gap: 8px; list-style: none; margin: 0 0 28px; }
.stepper li { flex: 1; font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.stepper li::before { content: ""; display: block; height: 4px; border-radius: 4px; background: var(--line); margin-bottom: 8px; transition: background .2s; }
.stepper li.done::before, .stepper li.current::before { background: var(--brand); }
.stepper li.current { color: var(--ink); }
.step-actions { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 8px; }
.step-actions .btn-primary { margin-left: auto; }

/* Responsive */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav-links, .nav-cta { display: none; }
  header.open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; top: 72px; left: 0; right: 0; background: var(--bg);
    padding: 16px 20px 8px; border-bottom: 1px solid var(--line);
  }
  header.open .nav-links > li { width: 100%; padding: 8px 0; }
  header.open .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 4px 0 0 12px; }
  header.open .nav-links .mobile-only { display: flex; gap: 10px; }
}
@media (max-width: 600px) {
  section { padding: 64px 0; }
  .wrap { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .auth-main { padding: 40px 16px; }
  .tp-head { flex-wrap: wrap; }
  .tp-head .input { max-width: none; }
}

/* Profile completion bar */
.meter { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: var(--bg); }
.meter-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; font-size: 15px; }
.meter-pct { font-weight: 800; font-size: 20px; color: var(--brand); }
.meter-track { height: 10px; border-radius: 999px; background: #e9eef6; overflow: hidden; }
.meter-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #4fb0ff, var(--brand)); transition: width .4s ease; }
.meter.complete .meter-pct { color: var(--success); }
.meter.complete .meter-fill { background: var(--success); }
.meter-tips { margin-top: 10px; font-size: 14px; color: var(--ink-soft); }
.meter-tips .link-btn { font-size: 14px; text-align: left; }

/* Page header band (events, directory) */
.page-hero { background: var(--accent); color: #fff; padding: 56px 0 48px; }
.page-hero .eyebrow { color: #9fd3ff; }
.page-hero h1 { font-size: clamp(34px, 5vw, 52px); font-weight: 800; }
.page-hero p { color: rgba(255,255,255,.82); margin-top: 10px; max-width: 580px; font-size: 17px; }

/* Event cards */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.ev-card {
  display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--bg); transition: transform .15s, box-shadow .15s;
}
.ev-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -22px rgba(6,27,80,.45); }
.ev-cover { position: relative; aspect-ratio: 2 / 1; overflow: hidden; background: linear-gradient(135deg, #4fb0ff, var(--accent)); }
.ev-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ev-date {
  position: absolute; top: 12px; right: 12px; background: #fff; color: var(--accent); border-radius: 12px;
  padding: 6px 12px; text-align: center; font-size: 12px; font-weight: 700; text-transform: uppercase; line-height: 1.2;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.35);
}
.ev-date strong { display: block; font-size: 22px; line-height: 1.1; }
.ev-flag { position: absolute; bottom: 12px; right: 12px; background: rgba(13,21,48,.8); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.ev-body { padding: 18px 20px 22px; display: grid; gap: 6px; }
.ev-cat { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.ev-body h3 { font-size: 19px; }
.ev-meta { color: var(--ink-soft); font-size: 14px; }
.ev-price { font-weight: 700; font-size: 15px; }
.ev-price span { font-weight: 500; color: var(--ink-soft); }
.ev-going { font-size: 13px; font-weight: 700; color: var(--success); }
.ev-card.is-past .ev-cover img { filter: grayscale(.35); }

/* Status pills (admin) */
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill-live { background: var(--success-soft); color: var(--success); }
.pill-draft { background: #fff4e5; color: #b54708; }
.pill-past { background: var(--bg-soft); color: var(--ink-soft); }
.ev-flag.draft { background: #b54708; }
.team-badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }

/* Privacy notice agreement for existing members */
.consent-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 760px; margin: 0 auto;
  background: var(--accent); color: #fff; border-radius: 18px; padding: 16px 18px;
  display: flex; gap: 16px; align-items: center; box-shadow: 0 20px 50px -18px rgba(6,27,80,.6);
}
.consent-bar p { font-size: 14.5px; flex: 1; }
.consent-bar a:not(.btn) { color: #9fd3ff; text-decoration: underline; }
.consent-bar .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.consent-actions { display: flex; gap: 8px; flex: none; }
@media (max-width: 600px) {
  .consent-bar { flex-direction: column; align-items: stretch; }
  .consent-actions .btn { flex: 1; justify-content: center; }
}

/* Incomplete-profile prompts */
.needs-attention { position: relative; }
.needs-attention::after {
  content: ""; position: absolute; top: 4px; right: 4px; width: 11px; height: 11px; border-radius: 50%;
  background: #e5484d; box-shadow: 0 0 0 2px var(--bg);
}
.btn-nag { animation: nag-pulse 2s ease-in-out infinite; }
.btn-nag .nag-pct { background: rgba(255,255,255,.22); border-radius: 999px; padding: 2px 9px; font-size: 13px; }
@keyframes nag-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(7,132,238,.55); } 50% { box-shadow: 0 0 0 10px rgba(7,132,238,0); } }
@media (prefers-reduced-motion: reduce) { .btn-nag { animation: none; } }
dialog.nag-dialog {
  border: 0; border-radius: 22px; padding: 28px; width: min(460px, calc(100% - 32px)); margin: auto;
  color: var(--ink); box-shadow: 0 30px 80px -20px rgba(6,27,80,.45);
}
dialog.nag-dialog::backdrop { background: rgba(6,27,80,.55); }
.nag-dialog h2 { font-size: 22px; letter-spacing: -0.01em; }
.nag-dialog > p { color: var(--ink-soft); margin: 8px 0 16px; font-size: 15px; }
.nag-dialog ul { list-style: none; display: grid; gap: 8px; margin: 18px 0 22px; }
.nag-dialog li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; padding: 8px 12px; background: var(--bg-soft); border-radius: 10px; }
.nag-dialog li span { color: var(--brand); font-weight: 700; }
.nag-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* Newsroom cards */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.news-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg); transition: transform .15s, box-shadow .15s; }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -22px rgba(6,27,80,.45); }
.news-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #4fb0ff, var(--accent)); }
.news-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: 18px 20px 22px; display: grid; gap: 8px; }
.news-body h3 { font-size: 19px; line-height: 1.3; }
.news-summary { color: var(--ink-soft); font-size: 15px; }

/* Cover designer (assets/js/banner.js) */
dialog.designer {
  border: 0; border-radius: 24px; padding: 0; width: min(1360px, calc(100% - 24px)); height: min(900px, calc(100% - 24px));
  max-width: none; max-height: none; margin: auto; color: var(--ink); box-shadow: 0 30px 80px -20px rgba(6,27,80,.45); overflow: hidden;
}
dialog.designer::backdrop { background: rgba(6,27,80,.6); backdrop-filter: blur(3px); }
.designer-grid { display: grid; grid-template-columns: 1fr 390px; height: 100%; }
.designer-stage { padding: 22px; display: flex; flex-direction: column; gap: 14px; background: var(--bg-soft); overflow-y: auto; min-width: 0; }
.designer-main { position: relative; }
.designer-main canvas { width: 100%; height: auto; display: block; border-radius: 14px; box-shadow: 0 14px 34px -16px rgba(6,27,80,.5); background: #fff; }
.designer-busy { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; color: var(--ink-soft); }
.designer-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.designer-options button { padding: 0; border: 3px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; background: #fff; line-height: 0; }
.designer-options button[aria-selected="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.designer-options canvas { width: 100%; height: auto; display: block; }
.designer-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.designer-spacer { flex: 1; }
.designer-controls { padding: 22px 22px 28px; overflow-y: auto; display: grid; gap: 14px; align-content: start; border-left: 1px solid var(--line); }
.designer-controls h2 { font-size: 22px; letter-spacing: -0.01em; }
.designer-controls details { border-top: 1px solid var(--line); padding-top: 12px; }
.designer-controls details[open] { padding-bottom: 4px; }
.designer-controls summary { font-weight: 800; cursor: pointer; font-size: 15px; }
.designer-controls details > * + * { margin-top: 10px; }
.designer-controls .field label, .designer-controls .field-label { font-size: 13px; font-weight: 700; }
.designer-controls .input { padding: 9px 12px; font-size: 14px; }
.designer-controls .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.designer-photos { display: grid; grid-template-columns: repeat(5, 1fr); grid-auto-rows: 46px; gap: 6px; max-height: 160px; overflow-y: auto; padding: 3px; }
.designer-photos button { position: relative; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--bg-soft); height: 100%; }
.designer-photos img { width: 100%; height: 100%; object-fit: cover; }
.designer-photos button[aria-pressed="true"] { border-color: var(--brand); }
.designer-photos span { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; line-height: 1; }
.designer-upload { justify-self: start; }
.designer-controls .field-label { display: block; }
.designer-controls details > .designer-upload { display: inline-flex; }
.designer-chosen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.designer-chosen figure, .designer-slot { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 10px; }
.designer-chosen figure > button[data-first] { width: 100%; height: 100%; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; display: block; }
.designer-chosen figure:first-child > button[data-first] { box-shadow: 0 0 0 3px var(--brand); }
.designer-chosen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.designer-chosen figure > span { position: absolute; left: 4px; bottom: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; pointer-events: none; }
.designer-slot { border: 1.5px dashed var(--line); background: var(--bg-soft); display: grid; place-items: center; font-size: 22px; color: var(--ink-soft); cursor: pointer; }
.designer-slot:hover { border-color: var(--brand); color: var(--brand); }
.row-x { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.logo-list { display: grid; gap: 6px; }
.logo-row { display: grid; grid-template-columns: 56px 1fr 124px 22px; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.logo-thumb { height: 36px; display: grid; place-items: center; background: var(--bg-soft); border-radius: 6px; padding: 3px; }
.logo-thumb img { max-height: 30px; max-width: 58px; width: auto; }
.logo-name { font-size: 13px; font-weight: 700; min-width: 0; line-height: 1.25; overflow-wrap: anywhere; }
.logo-row .input { padding: 6px 8px; font-size: 13px; }
.logo-row .row-x { position: static; }
.logo-picker { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--bg-soft); display: grid; gap: 10px; }
.logo-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.logo-chip { position: relative; }
.logo-chip > button[data-use-logo] { height: 46px; padding: 6px 10px; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; display: grid; place-items: center; }
.logo-chip > button[data-use-logo] img { max-height: 30px; max-width: 110px; width: auto; }
.logo-chip > button[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.logo-x { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; display: none; }
.logo-chip:hover .logo-x, .logo-x:focus-visible { display: block; }
.logo-add { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
@media (max-width: 980px) {
  dialog.designer { height: calc(100% - 24px); overflow-y: auto; }
  .designer-grid { grid-template-columns: 1fr; height: auto; }
  .designer-controls { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .designer-stage { overflow: visible; }
}
