/* MagikBooth Cloud web panel — the same look as the MagikBooth desktop app (src/MagikBooth.App/Themes/Tokens.xaml):
   Outfit font, #202020 background, #0C0C0C top bar, #2D2D2D rounded cards, pink #D7366C pills and switches. */
@font-face { font-family: "Outfit"; src: url("fonts/Outfit-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("fonts/Outfit-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("fonts/Outfit-SemiBold.ttf") format("truetype"); font-weight: 600 700; font-display: swap; }

:root {
  --bg: #202020;        /* BgApp */
  --bar: #0c0c0c;       /* BgBar */
  --bg-2: #272727;      /* BgMenu */
  --card: #2d2d2d;      /* BgCard */
  --card-2: #363636;    /* BgCardHover */
  --input: #1a1a1a;     /* BgInput */
  --line: #4a4a4a;      /* Border */
  --text: #ffffff;      /* TextPrimary */
  --muted: #b5b5b5;     /* TextSecondary */
  --faint: #7a7a7a;     /* TextMuted */
  --accent: #d7366c;    /* Accent */
  --accent-2: #e4507f;  /* AccentHover */
  --sel: #5e2b3d;       /* selected row (accent over card) */
  --ok: #3ccf8e;
  --warn: #f5b400;      /* Warning */
  --bad: #ff6b6b;
  --radius: 14px;       /* CardRadius */
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 "Outfit", "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 30px; margin: 0 0 6px; font-weight: 500; }
h2 { font-size: 18px; margin: 0 0 14px; font-weight: 600; }
h3 { font-size: 16px; margin: 0 0 8px; font-weight: 600; }
h1:focus { outline: none; }
p { margin: 0 0 10px; }
small, .muted { color: var(--muted); }
code { background: var(--input); padding: 1px 6px; border-radius: 4px; }

/* ----- Top bar (desktop: 100 px black bar, title centred, round pink menu button) ----- */
.top-stack { position: sticky; top: 0; z-index: 60; }
.bar {
  position: relative; height: 96px; background: var(--bar);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 0 28px;
}
.bar-left, .bar-right { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bar-right { justify-content: flex-end; }
.bar-title { font-size: 30px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; text-align: center; }
.app-mark {
  width: 38px; height: 38px; border-radius: 9px; overflow: hidden; color: #fff; font-weight: 600; font-size: 19px;
  display: grid; place-items: center; flex: none; background: var(--accent);
}
.app-mark img { width: 100%; height: 100%; display: block; }
.app-mark:has(img) { background: none; }
.app-mark:hover { text-decoration: none; filter: brightness(1.12); }
.brand-logo { display: inline-flex; align-items: center; }
.brand-logo img { height: 46px; width: auto; display: block; }
.brand-logo:hover { filter: brightness(1.1); }
.brand-name { color: var(--text); font-size: 22px; font-weight: 500; }
.brand-name:hover { text-decoration: none; }
.event-switch { position: relative; min-width: 0; }
.event-name {
  display: flex; align-items: center; gap: 10px; background: none; border: 0; color: var(--text); cursor: pointer;
  font: 500 24px "Outfit", sans-serif; padding: 4px 2px; max-width: 34vw;
}
.event-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev-sm { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 2; flex: none; }
.cloud-ic { width: 24px; height: 24px; fill: none; stroke: var(--text); stroke-width: 1.6; flex: none; opacity: .9; }
.event-pop {
  display: none; position: absolute; top: calc(100% + 10px); left: 0; min-width: 280px; max-height: 60vh; overflow: auto;
  background: var(--bg-2); border-radius: 12px; padding: 8px; box-shadow: 0 14px 40px rgba(0,0,0,.6); z-index: 70;
}
.event-switch.open .event-pop { display: block; }
.event-pop a { display: block; padding: 10px 14px; border-radius: 8px; color: var(--text); font-size: 16px; }
.event-pop a:hover { background: var(--card-2); text-decoration: none; }
.event-pop a.on { background: var(--sel); }
.pop-sep { height: 1px; background: var(--line); margin: 6px 4px; }
body.has-bar-title .main .page-head h1 { display: none; }

/* Round pink menu button (desktop: 90 px circle with a white chevron; flips when the menu is open). */
.menu-fab {
  width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--accent); cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.45); flex: none; transition: background .15s;
}
.menu-fab:hover { background: var(--accent-2); }
.menu-fab svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 2.2; transition: transform .2s; }
.app.open .menu-fab svg { transform: rotate(180deg); }

/* Pills in the bar: "Open event" (desktop: Launch event) and the public Sign in / Create account. */
.pill {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 30px; border-radius: 999px; font-size: 19px; font-weight: 500;
  color: #fff; white-space: nowrap; border: 1.5px solid transparent;
}
.pill:hover { text-decoration: none; }
.pill.launch { background: var(--accent); }
.pill.launch:hover { background: var(--accent-2); }
.pill.ghost { border-color: #fff; }
.pill.ghost:hover { border-color: var(--accent); }
.pill svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.8; }

/* ----- Column menu (desktop operator menu) ----- */
.mega {
  display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 55; background: var(--bg-2); padding: 26px 32px 30px;
  box-shadow: 0 18px 40px rgba(0,0,0,.55); max-height: calc(100vh - 96px); overflow: auto;
}
.app.open .mega { display: block; }
.mega-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px 28px; max-width: 1500px; }
.mega-col { display: flex; flex-direction: column; align-items: flex-start; }
.mega-col a, .mega-col button {
  color: var(--text); font: 400 16px "Outfit", sans-serif; padding: 6px 0; background: none; border: 0; cursor: pointer; text-align: left;
}
.mega-col a:hover, .mega-col button:hover { color: var(--accent-2); text-decoration: none; }
.mega-col .mega-pink { color: var(--accent); font-size: 17px; font-weight: 500; padding-bottom: 2px; }
.mega-head { color: var(--faint); font-size: 12px; letter-spacing: .02em; margin: 12px 0 4px; }
.mega-head.top { margin-top: 28px; }
.mega-note { color: var(--muted); font-size: 12px; margin: -2px 0 6px; word-break: break-all; }
.mega form { margin: 0; }

.main { padding: 28px 40px 70px; max-width: 1240px; width: 100%; margin: 0 auto; }
.public-main { max-width: 1100px; margin: 0 auto; padding: 32px 20px 60px; }

@media (max-width: 860px) {
  .bar { height: 72px; padding: 0 14px; grid-template-columns: 1fr auto; }
  .bar-title { display: none; }
  body.has-bar-title .main .page-head h1 { display: block; }
  .event-name { font-size: 18px; max-width: 52vw; }
  .cloud-ic, .pill.launch svg { display: none; }
  .pill { height: 42px; padding: 0 16px; font-size: 15px; }
  .bar-right .pill.launch { display: none; }
  .bar.public .bar-right .pill.launch { display: inline-flex; }
  .menu-fab { width: 52px; height: 52px; }
  .mega { max-height: calc(100vh - 72px); padding: 18px 20px 24px; }
  .mega-cols { grid-template-columns: 1fr 1fr; }
  .main { padding: 18px 16px 60px; }
}

/* ----- Building blocks ----- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .muted { font-size: 14px; }
.card { background: var(--card); border-radius: var(--radius); padding: 22px 24px; }
.card + .card { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.spacer { flex: 1; }
.stat { font-size: 32px; font-weight: 500; }
.stat-label { color: var(--muted); font-size: 13px; }

/* Buttons (desktop: white outlined pills; the main action is a filled pink pill; Delete is outlined pink). */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid #fff; background: transparent;
  color: var(--text); padding: 8px 22px; border-radius: 999px; font: 500 15px "Outfit", sans-serif; cursor: pointer; white-space: nowrap;
  text-decoration: none; min-height: 40px; transition: background .12s, border-color .12s;
}
.btn:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.danger { border-color: var(--accent); color: #fff; }
.btn.danger:hover { background: rgba(215,54,108,.15); }
.btn.small { padding: 4px 16px; font-size: 14px; min-height: 32px; }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: none; }
.btn:disabled { opacity: .45; cursor: default; }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px 8px; font-size: 16px; border-radius: 6px; }
.icon-btn:hover { color: var(--text); background: var(--card-2); }

/* Inputs (desktop: dark box with a grey border). */
input, select, textarea {
  background: var(--input); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px;
  font: 15px "Outfit", sans-serif; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input[type=color] { padding: 2px; height: 38px; width: 60px; }
textarea { min-height: 90px; resize: vertical; }

/* Switches (desktop toggle: pink when on, with ON / OFF beside it). Every checkbox in the panel is a switch. */
input[type=checkbox] {
  appearance: none; -webkit-appearance: none; width: 40px; height: 22px; border-radius: 999px; background: #5c5c5c; position: relative;
  cursor: pointer; margin: 0; padding: 0; border: 0; flex: none; transition: background .15s;
}
input[type=checkbox]::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s;
}
input[type=checkbox]:checked { background: var(--accent); }
input[type=checkbox]:checked::before { left: 21px; }
.switch { display: inline-flex; align-items: center; gap: 12px; }
.switch b { font-weight: 400; font-size: 14px; color: var(--text); min-width: 28px; }
.switch input + b::after { content: "OFF"; }
.switch input:checked + b::after { content: "ON"; }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
label.check { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.form { display: flex; flex-direction: column; gap: 16px; max-width: 480px; }

table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-weight: 500; color: var(--faint); font-size: 13px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
table.list td { padding: 12px; border-bottom: 1px solid #3a3a3a; vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: var(--card-2); }
.table-wrap { overflow-x: auto; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; background: var(--input); color: var(--muted); border: 1px solid var(--line); vertical-align: middle; }
.badge.ok { color: var(--ok); border-color: rgba(60,207,142,.45); }
.badge.warn { color: var(--warn); border-color: rgba(245,180,0,.45); }
.badge.bad { color: var(--bad); border-color: rgba(255,107,107,.45); }
.badge.accent { color: #fff; background: var(--accent); border-color: var(--accent); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--faint); }
.dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }

.alert { padding: 12px 16px; border-radius: 10px; background: var(--card); margin-bottom: 16px; border-left: 4px solid var(--line); }
.alert.bad { border-left-color: var(--bad); color: #ffc2c2; }
.alert.ok { border-left-color: var(--ok); color: #b9f3d8; }
.alert.warn { border-left-color: var(--warn); color: #ffe39a; }

/* Tabs (event pages): text tabs with the pink underline. */
.tabs { display: flex; gap: 6px; margin-bottom: 22px; overflow-x: auto; border-bottom: 1px solid #3a3a3a; }
.tabs a, .tabs button { padding: 10px 16px; color: var(--muted); border: 0; background: none; font: 16px "Outfit", sans-serif; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--text); text-decoration: none; }
.tabs .on { color: var(--text); border-bottom-color: var(--accent); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.code-big { font-size: 42px; letter-spacing: .12em; font-weight: 600; font-family: Consolas, monospace; color: #fff; }

/* ----- Saved events (desktop: search + list on the left, pill buttons on the right) ----- */
.saved { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.saved-tools { display: flex; align-items: center; gap: 22px; margin-bottom: 16px; flex-wrap: wrap; }
.saved-tools .search { flex: 1; min-width: 220px; position: relative; }
.saved-tools .search input { padding-left: 38px; height: 46px; border-color: #8a8a8a; }
.saved-tools .search svg { position: absolute; left: 12px; top: 13px; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.saved-list { background: var(--card); border-radius: 10px; min-height: 380px; overflow: hidden; }
.saved-list .item { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; font-size: 19px; }
.saved-list .item:hover { background: var(--card-2); }
.saved-list .item.on { background: var(--sel); }
.saved-list .item small { color: var(--muted); font-size: 13px; white-space: nowrap; }
.saved-actions { display: flex; flex-direction: column; gap: 14px; }
.saved-actions .btn { width: 100%; min-height: 46px; font-size: 16px; }
.saved-actions .btn.primary { min-height: 58px; font-size: 19px; margin-bottom: 14px; }
.saved-actions .link { background: none; border: 0; color: var(--text); font: 15px "Outfit", sans-serif; text-align: left; padding: 4px 4px; cursor: pointer; }
@media (max-width: 860px) { .saved { grid-template-columns: 1fr; } }

/* ----- Settings (desktop: "‹ Previous | Title | Next ›" header, cards of label / control rows) ----- */
.settings-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 4px 0 22px; }
.settings-nav a { color: var(--muted); font-size: 20px; display: flex; align-items: center; gap: 10px; }
.settings-nav a:hover { color: var(--text); text-decoration: none; }
.settings-nav .next { justify-content: flex-end; }
.settings-nav .now { font-size: 26px; font-weight: 500; text-align: center; }
.settings-page { max-width: 820px; margin: 0 auto; }
.fields { display: flex; flex-direction: column; gap: 16px; }
.fields > label.field, .fields > .field {
  display: grid; grid-template-columns: 220px minmax(0, 420px); align-items: center; column-gap: 26px;
  font-size: 15px; font-weight: 500; color: var(--text);
}
.fields > label.field > input:not([type=checkbox]), .fields > label.field > select { max-width: 420px; }
.fields > label.field.toggle { grid-template-columns: 220px auto; }
.fieldset { border-top: 1px solid #3a3a3a; padding: 18px 0 4px; margin-top: 6px; }
.fieldset > .legend { font-weight: 600; font-size: 17px; margin-bottom: 14px; }
.asset-list { display: flex; flex-wrap: wrap; gap: 8px; }
.asset-chip { display: flex; align-items: center; gap: 6px; background: var(--input); border: 1px solid var(--line); border-radius: 8px; padding: 4px 4px 4px 8px; font-size: 13px; max-width: 260px; }
.asset-chip img { width: 34px; height: 34px; object-fit: cover; border-radius: 4px; }
.asset-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.save-bar { position: sticky; bottom: 0; background: var(--bg); padding: 14px 0; margin-top: 20px; display: flex; gap: 12px; align-items: center; border-top: 1px solid #3a3a3a; z-index: 5; }
@media (max-width: 860px) {
  .fields > label.field, .fields > .field, .fields > label.field.toggle { grid-template-columns: 1fr; row-gap: 6px; }
  .settings-nav a { font-size: 15px; }
  .settings-nav .now { font-size: 20px; }
}

/* ----- Layout editor: the booth's Photo Layout page (MagikBooth.App PhotoLayoutView + DesignEditorView) ----- */
.panel { display: flex; flex-direction: column; gap: 12px; }
.prop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Canvas drawing */
.el { cursor: move; }
/* Locked layers let clicks through to what's below (as on the booth); select them from the Layers list. */
.el.locked { cursor: default; pointer-events: none; }
.page-edge { fill: none; stroke: rgba(255,255,255,.28); stroke-width: 1px; vector-effect: non-scaling-stroke; pointer-events: none; }
.sel-box { fill: none; stroke: var(--accent); stroke-width: 1.5px; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.handle { fill: #fff; stroke: var(--accent); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.h-tl, .h-br { cursor: nwse-resize; }
.h-tr, .h-bl { cursor: nesw-resize; }
.guide { stroke: #00e5ff; stroke-width: 1.5px; vector-effect: non-scaling-stroke; visibility: hidden; pointer-events: none; }

/* Page: header, toolbar, designer */
.pl-page { display: flex; flex-direction: column; background: var(--bg); border: 1px solid #333; border-radius: 10px; overflow: visible;
  /* As wide as the browser window (the booth's page fills its window), centred under the event's tabs. */
  width: min(1800px, calc(100vw - 40px)); margin-left: calc(50% - min(900px, 50vw - 20px)); }
.pl-page > .pl-head { border-radius: 10px 10px 0 0; }
.pl-head { display: flex; align-items: center; background: #0c0c0c; padding: 10px 26px; }
.pl-title { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pl-pick { position: relative; display: flex; align-items: center; gap: 6px; }
.pl-pick select { min-width: 240px; max-width: 460px; }
.pl-ibtn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.pl-ibtn:hover { background: #333; color: #fff; }
.pl-ibtn .ico { width: 16px; height: 16px; }
.pl-ibtn.fav { color: #ecb131; }
.ico.filled { fill: currentColor; }
.pl-state { font-size: 13px; color: var(--muted); margin-left: 8px; white-space: nowrap; }
.pl-summary { font-size: 13px; }

.pl-tools { display: flex; align-items: center; flex-wrap: wrap; row-gap: 12px; background: #1a1a1a; border-bottom: 1px solid #333; padding: 12px 26px; position: relative; z-index: 5; }
.pl-tools-solo { border: 1px solid #333; border-radius: 10px 10px 0 0; border-bottom: 1px solid #333; width: min(1800px, calc(100vw - 40px)); margin-left: calc(50% - min(900px, 50vw - 20px)); }
.pl-tool { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; margin-right: 26px; background: none; border: 0; color: #fff; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; padding: 0; }
.pl-tool .ico { width: 22px; height: 22px; stroke-width: 1.6; }
.pl-tool:hover { opacity: .75; }
.pl-tool:disabled { opacity: .35; cursor: default; }
.pl-caret { color: var(--accent); font-size: 10px; margin-left: 3px; }
.pl-sep { width: 1px; align-self: stretch; background: #444; margin: 4px 26px 4px 0; }
.pl-field { display: flex; flex-direction: column; gap: 4px; }
.pl-paper { width: 190px; }
.pl-gap18 { margin-left: 18px; }
.pl-gap22 { margin-left: 22px; }
.pl-radio { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; font-size: 14px; cursor: pointer; white-space: nowrap; }
.pl-radio input { accent-color: var(--accent); }
.pl-size { width: 76px; }
.pl-x { margin: 0 6px; }
.pl-apply { margin-left: 8px; }
.pl-anchor { position: relative; }
.pl-head { position: relative; z-index: 6; }
.pl-backdrop { position: fixed; inset: 0; z-index: 4; }
.pl-pop { position: absolute; top: calc(100% + 8px); z-index: 60; background: #1a1a1a; border: 1px solid #3a3a3a; padding: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.6); text-align: left; }
.pl-presets { left: 0; width: 586px; max-height: 480px; overflow: auto; }
.pl-manage { left: 0; width: 340px; padding: 16px; }
.pl-poptitle { font-size: 18px; font-weight: 600; color: #fff; }
.pl-poptitle.pl-sub { font-size: 15px; margin: 10px 0 6px; }
.pl-presets .le-caption { margin: 4px 0 12px; }
.pl-cards { display: flex; flex-wrap: wrap; }
.pl-card { width: 128px; margin: 0 8px 8px 0; padding: 8px; border: 1px solid transparent; border-radius: 8px; background: none; color: #fff; font: inherit; font-size: 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.pl-card svg { height: 78px; width: auto; max-width: 110px; }
.pl-card:hover { background: rgba(215,54,108,.2); border-color: var(--accent); }
.pl-other { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: 6px; background: none; color: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.pl-other:hover { background: rgba(215,54,108,.2); }
.pl-wide { width: 100%; }
.pl-gap8 { margin-top: 8px; }
.pl-gap12 { margin-top: 12px; }
.pl-gap14 { margin-top: 14px; }
.pl-alert { margin: 10px 16px 0; display: flex; justify-content: space-between; align-items: center; }
.pl-empty { margin: 16px; }

/* Designer: 250 px Add/Layers | canvas | 310 px Selected */
.le-editor { display: grid; grid-template-columns: 250px minmax(0, 1fr) 310px; height: max(560px, calc(100vh - 300px)); outline: none; }
.pl-tools-solo + .le-editor { border: 1px solid #333; border-top: 0; border-radius: 0 0 10px 10px; overflow: hidden; width: min(1800px, calc(100vw - 40px)); margin-left: calc(50% - min(900px, 50vw - 20px)); }
.le-left, .le-right { background: #262626; min-height: 0; display: flex; flex-direction: column; }
.le-right { overflow-y: auto; }
.le-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 10px 12px 4px; }
.le-tab { background: none; border: 0; color: var(--muted); font: inherit; font-size: 15px; cursor: pointer; padding: 4px 0 6px; border-bottom: 3px solid #3a3a3a; border-radius: 0; }
.le-tab.on { color: #fff; border-bottom-color: var(--accent); }
.le-tab .muted { color: var(--muted); }
.le-addlist { overflow-y: auto; flex: 1; }
.le-ph { font-size: 17px; font-weight: 600; margin: 16px 18px 8px; }
.le-add { display: flex; align-items: center; width: 100%; padding: 11px 18px; background: none; border: 0; border-bottom: 1px solid #3a3a3a; color: #fff; font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.le-add:hover { background: rgba(255,255,255,.2); }
.le-add .ico { width: 18px; height: 18px; margin-right: 12px; stroke-width: 1.6; }
.le-canvasprops { margin: 0 18px 18px; }
.le-layers { flex: 1; overflow-y: auto; padding: 4px 6px 0; }
.le-layer { display: flex; align-items: center; gap: 2px; padding: 4px 6px; border-radius: 6px; cursor: pointer; user-select: none; }
.le-layer:hover { background: #333; }
.le-layer.on { background: rgba(215,54,108,.27); }
.le-lname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: #fff; }
.le-lbtn { width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: none; color: #fff; border-radius: 6px; cursor: pointer; }
.le-lbtn:hover { background: #3a3a3a; }
.le-lbtn.dim { opacity: .45; }
.le-lbtn .ico { width: 15px; height: 15px; }
.le-lnote { margin: 8px 16px 12px; font-size: 11.5px; }

.le-center { position: relative; background: #3a3a3a; min-width: 0; min-height: 0; }
.le-scroll { position: absolute; inset: 0; overflow: auto; display: grid; }
.le-stage { margin: 28px; place-self: center; line-height: 0; }
.le-stage svg { display: block; filter: drop-shadow(0 4px 15px rgba(0,0,0,.5)); touch-action: none; user-select: none; overflow: visible; }
.le-zoom { position: absolute; right: 22px; bottom: 18px; display: flex; align-items: center; gap: 2px; background: rgba(26,26,26,.9); border: 1px solid #444; border-radius: 18px; padding: 3px 6px; }
.le-zbtn { width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: none; color: #fff; border-radius: 15px; cursor: pointer; }
.le-zbtn:hover { background: #333; }
.le-zbtn .ico { width: 13px; height: 13px; }
.le-zlabel { width: 50px; text-align: center; font-size: 13px; }
.le-link { background: none; border: 0; color: var(--accent-2); font: inherit; font-size: 13px; cursor: pointer; padding: 0 6px; }
.le-link:hover { text-decoration: underline; }

.le-sel { padding: 4px 18px 18px; }
.le-sh { font-size: 16px; font-weight: 600; margin: 14px 0 8px; }
.le-sh-first { font-size: 17px; }
.le-caption { font-size: 13px; color: var(--muted); line-height: 1.4; }
.le-cap-gap { margin: 10px 0 4px; }
.le-cap-gap8 { margin: 8px 0 4px; }
.le-cap-gap4 { margin-top: 4px; }
.le-ph-caption { margin: 4px 0 6px; }
.le-input { width: 100%; background: var(--input, #1a1a1a); border: 1px solid #8a8a8a; border-radius: 3px; color: #fff; padding: 5px 8px; font: inherit; font-size: 14px; margin-bottom: 10px; }
.le-input:focus, .le-num:focus, .le-select:focus { border-color: var(--accent); outline: none; }
.le-text { min-height: 60px; resize: vertical; margin-bottom: 0; }
.le-num { width: 84px; background: var(--input, #1a1a1a); border: 1px solid #8a8a8a; border-radius: 3px; color: #fff; padding: 4px 6px; font: inherit; font-size: 14px; }
.le-select { background: var(--input, #1a1a1a); border: 1px solid #8a8a8a; border-radius: 3px; color: #fff; padding: 4px 6px; font: inherit; font-size: 14px; width: 110px; }
.le-xywh { display: grid; grid-template-columns: auto auto auto auto; align-items: center; column-gap: 6px; row-gap: 8px; justify-content: start; margin-bottom: 6px; }
.le-xywh .le-num { margin-right: 8px; }
.le-row { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.le-checks { gap: 20px; margin-top: 4px; }
.le-gap10 { margin-top: 10px; gap: 20px; }
.le-gap-b10 { margin-bottom: 10px; }
.le-gap6 { margin-top: 6px; }
.le-fitlabel { width: 40px; }
.le-fitlabel + .le-select { width: 130px; }
.le-wrap { display: flex; flex-wrap: wrap; gap: 0 8px; margin-top: 10px; }
.le-wrap .le-pill { margin-bottom: 8px; }
.le-pill.on { border-color: var(--accent); background: rgba(215,54,108,.18); }
.le-pill { border-radius: 999px; font-size: 13px; padding: 5px 14px; min-height: 0; }
.le-pill-sm { font-size: 12px; padding: 4px 10px; }
.le-arrange { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.le-arrange .le-pill { padding: 5px 8px; }
.le-align { border-top: 1px solid #3a3a3a; padding: 0 18px 8px; }
.le-align .le-sh { margin: 10px 0 6px; }
.le-aligns { display: grid; grid-template-columns: repeat(6, 40px); justify-content: space-between; }
.le-aligns button { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: #fff; border-radius: 6px; cursor: pointer; }
.le-aligns button:hover { background: #333; }
.le-aligns button:disabled { opacity: .35; cursor: default; background: none; }
.le-aligns .ico { width: 18px; height: 18px; stroke-width: 1.6; }

/* SliderRow (narrow): label 78 | slider | value 76 */
.ed-slider { display: grid; grid-template-columns: 78px minmax(0, 1fr) 76px; align-items: center; margin: 5px 0; }
.ed-slabel { font-size: 14px; }
.ed-slider input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; border: 0; padding: 0; margin: 10px 8px 10px 0;
  background: linear-gradient(to right, var(--accent) var(--p, 0%), #5a5a5a var(--p, 0%)); cursor: pointer;
}
.ed-slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.ed-slider input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; }
.ed-sval { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.ed-sbox { width: 48px; height: 30px; border: 1px solid #8a8a8a; display: flex; align-items: center; justify-content: flex-end; padding-right: 6px; font-size: 14px; }
.ed-sunit { font-size: 14px; min-width: 14px; }

/* ColorField */
.ed-ctop { display: flex; align-items: center; }
.ed-swatch { width: 28px; height: 28px; border-radius: 4px; border: 1px solid gray; margin-right: 8px; position: relative; overflow: hidden; cursor: pointer;
  background-image: linear-gradient(45deg, #555 25%, transparent 25%, transparent 75%, #555 75%), linear-gradient(45deg, #555 25%, transparent 25%, transparent 75%, #555 75%); background-size: 10px 10px; background-position: 0 0, 5px 5px; }
.ed-swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ed-hex { width: 96px; background: var(--input, #1a1a1a); border: 1px solid #8a8a8a; border-radius: 3px; color: #fff; padding: 3px 6px; font: inherit; font-size: 13px; }
.ed-quick { display: flex; flex-wrap: wrap; margin-top: 6px; }
.ed-q { width: 20px; height: 20px; margin: 0 4px 4px 0; border: 1px solid dimgray; border-radius: 3px; cursor: pointer; padding: 0; }
.ed-none { font: inherit; font-size: 11px; padding: 1px 6px; margin: 0 4px 4px 0; background: #333; color: #fff; border: 1px solid #555; border-radius: 3px; cursor: pointer; }

@media (max-width: 1100px) {
  .le-editor { grid-template-columns: 210px minmax(0, 1fr) 280px; }
}

/* Phones: the canvas first, then Add / Layers, then the selected item; the page scrolls. */
@media (max-width: 860px) {
  .pl-page, .pl-tools-solo, .pl-tools-solo + .le-editor { width: calc(100vw - 16px); margin-left: calc(50% - 50vw + 8px); }
  .pl-head { padding: 10px 12px; }
  .pl-title, .pl-pick { flex: 1; min-width: 0; gap: 6px; }
  .pl-title { flex-wrap: wrap; }
  .pl-pick { flex-basis: 100%; }
  .pl-pick select { flex: 1; min-width: 0; max-width: none; }
  .pl-state { margin-left: 2px; font-size: 12px; }
  .pl-tools { padding: 10px 12px; row-gap: 14px; }
  .pl-tool { margin-right: 18px; }
  .pl-sep { display: none; }
  .pl-field, .pl-gap18, .pl-gap22 { margin-left: 0; margin-right: 18px; }
  .pl-presets, .pl-manage { width: min(586px, calc(100vw - 48px)); max-height: 60vh; overflow: auto; }
  .pl-manage { max-width: 340px; }
  .le-editor { grid-template-columns: minmax(0, 1fr); height: auto; }
  .le-center { order: 0; height: 56vh; min-height: 320px; }
  .le-left { order: 1; max-height: 50vh; }
  .le-right { order: 2; overflow: visible; border-top: 1px solid #3a3a3a; }
  .le-zoom { right: 10px; bottom: 10px; }
  .le-stage { margin: 14px; }
  .le-lbtn { width: 40px; height: 40px; }
  .handle { stroke-width: 3px; }
}

/* ----- Landing + gallery ----- */
.hero { text-align: center; padding: 60px 10px 40px; }
.hero h1 { font-size: 42px; line-height: 1.15; margin-bottom: 14px; }
.hero p { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 auto 26px; }
.plan { display: flex; flex-direction: column; gap: 10px; }
.plan .price { font-size: 32px; font-weight: 600; }
.plan ul { margin: 0; padding-left: 18px; color: var(--muted); }
.plan.current { border-color: var(--accent); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gallery-grid figure { margin: 0; background: var(--card); border-radius: 12px; overflow: hidden; }
.gallery-grid img, .gallery-grid video { width: 100%; display: block; background: #000; }
.gallery-grid figcaption { padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.thumbs a { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #000; aspect-ratio: 1; }
.thumbs img, .thumbs video { width: 100%; height: 100%; object-fit: cover; }

.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: var(--card); border-radius: 14px; padding: 22px 24px; width: min(520px, 100%); max-height: 90vh; overflow: auto; }

#blazor-error-ui {
  background: #5b1525; color: #fff; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0;
  padding: .6rem 1.25rem .7rem 1.25rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
#blazor-error-ui a { color: #fff; text-decoration: underline; }
.blazor-error-boundary { background: #5b1525; padding: 1rem; color: white; border-radius: 8px; }
.blazor-error-boundary::after { content: "Something went wrong on this part of the page."; }

/* Radio buttons (desktop: pink dot in a white ring). */
input[type=radio] { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #fff; margin: 0; padding: 0; background: transparent; cursor: pointer; flex: none; }
input[type=radio]:checked { border-color: #fff; background: radial-gradient(circle, var(--accent) 0 5px, transparent 5.5px); }
.card .save-bar { background: var(--card); margin: 20px -24px -22px; padding: 14px 24px; border-radius: 0 0 var(--radius) var(--radius); }

/* "Login as": shown above the bar while the super admin is viewing someone's account. */
.imp-banner {
  display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; padding: 8px 20px;
  background: var(--warn); color: #1a1a1a; font-size: 14px; text-align: center;
}
.imp-banner form { margin: 0; }
.imp-banner .btn { border-color: #1a1a1a; color: #1a1a1a; min-height: 30px; }
.imp-banner .btn:hover { background: rgba(0,0,0,.08); }

/* =====================================================================================================
   Settings pages drawn from the desktop app (DesktopSettings / DNode) - same sizes as the WPF controls:
   720 px column, cards 24x18 padding with a 14 px radius and 18 px apart, 200 px label column, sliders with a
   48x30 value box and unit, toggle cards (title + switch; body hidden when off), 96 px mode tiles, 150 px drop zones.
   ===================================================================================================== */
.settings-page { max-width: 720px; margin: 0 auto; }
.settings-nav {
  background: var(--bar); box-shadow: 0 0 0 100vmax var(--bar); clip-path: inset(0 -100vmax);
  margin: -28px 0 24px; padding: 0 0 26px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.settings-nav a { color: var(--muted); font-size: 22px; display: flex; align-items: center; gap: 14px; }
.settings-nav a .chev { font-size: 26px; line-height: 1; }
.settings-nav a:hover { color: var(--text); text-decoration: none; }
.settings-nav .next { justify-content: flex-end; }
.settings-nav .now { font-size: 32px; font-weight: 500; margin: 0; text-align: center; }
body.has-bar-title .settings-nav .now { visibility: hidden; font-size: 1px; }

.d-page { display: flex; flex-direction: column; }
.card.d-card { border-radius: 14px; padding: 18px 24px; margin: 0 0 18px; box-shadow: 0 4px 14px rgba(0,0,0,.28); }
.card + .card.d-card { margin-top: 0; }
.d-stack { display: flex; flex-direction: column; min-width: 0; }
.d-stack.d-h { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
.d-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.d-ugrid { display: grid; gap: 0 18px; }
.d-dock { display: flex; align-items: center; gap: 12px; }
.d-dock-fill { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.d-sub { background: #262626; border-radius: 8px; padding: 6px 14px; margin: 0 0 8px; }
.d-sep { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; }

.d-ctitle { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.d-body { font-size: 14px; color: var(--text); margin: 12px 0 4px; }
.d-caption { font-size: 12.5px; color: var(--muted); margin: 4px 0 8px; white-space: pre-wrap; }
.d-bold { font-weight: 600; }
.d-warn { color: var(--warn); }

/* SettingRow: label (200 px) | control, description underneath. */
.d-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: center; margin: 6px 0; min-height: 34px; }
.d-label { font-size: 14px; color: var(--text); }
.d-ctl { min-width: 0; display: flex; align-items: center; gap: 10px; }
.d-ctl > .d-stack { flex: 1; }
.d-desc { font-size: 12.5px; color: var(--muted); margin: -2px 0 8px; }
.d-input { background: var(--input); border: 1px solid #8a8a8a; border-radius: 3px; height: 34px; padding: 5px 10px; font-size: 14px; width: 100%; }
textarea.d-input { height: auto; resize: vertical; }
.d-input:focus { border-color: var(--accent); }

/* SliderRow: label | slider (pink up to the value, white knob) | value box + unit. */
.d-slider { display: grid; grid-template-columns: 200px minmax(0, 1fr) 100px; align-items: center; margin: 7px 0; }
.d-sl { display: flex; flex-direction: column; padding-right: 18px; }
.d-sl input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; border: 0; padding: 0; margin: 10px 0;
  background: linear-gradient(to right, var(--accent) var(--p, 0%), #5a5a5a var(--p, 0%)); cursor: pointer;
}
.d-sl input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.d-sl input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; }
.d-caps { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: -4px; }
.d-val { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.d-num {
  width: 48px; height: 30px; border: 1px solid #8a8a8a; border-radius: 0; background: transparent; color: #fff; text-align: right;
  padding: 0 6px; font-size: 14px; -moz-appearance: textfield;
}
.d-num::-webkit-outer-spin-button, .d-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.d-unit { font-size: 14px; color: var(--text); min-width: 26px; }

/* ToggleCard: title (18 px semibold) with the switch on the right; the body shows only when it's on. */
.d-tchead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.d-tctitle { font-size: 18px; font-weight: 600; }
.d-tcbody { margin-top: 16px; }

/* Plain CheckBox (not a switch): white square, pink when ticked. */
.d-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.d-check input.box { width: 18px; height: 18px; border-radius: 3px; background: transparent; border: 1.5px solid #fff; }
.d-check input.box::before { display: none; }
.d-check input.box:checked { background-color: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Cpath d=%22M5 12l5 5 9-10%22 fill=%22none%22 stroke=%22white%22 stroke-width=%223%22/%3E%3C/svg%3E"); background-position: center; background-size: 14px; background-repeat: no-repeat; }

/* Mode tiles (Capture page): 96 px circle, filled white when that mode is on. */
.d-stack:has(> .d-tile) { align-items: center; text-align: center; }
.d-stack:has(> .d-tile) .d-caption { text-align: center; margin: 6px 8px 0; font-size: 12px; }
.d-tile { background: none; border: 0; color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; width: 150px; padding: 0; font-family: "Outfit", sans-serif; }
.d-tile-circle { width: 96px; height: 96px; border-radius: 50%; border: 1.5px solid #bdbdbd; display: grid; place-items: center; transition: background .12s, border-color .12s; }
.d-tile-circle svg { width: 40px; height: 40px; fill: none; stroke: #bdbdbd; stroke-width: 1.5; stroke-linejoin: round; }
.d-tile.on .d-tile-circle { background: #fff; border-color: #fff; }
.d-tile.on .d-tile-circle svg { stroke: #202020; }
.d-tile:hover .d-tile-circle { border-color: var(--accent); }
.d-tile-label { font-size: 16px; margin-top: 12px; }
.card.d-card:has(.d-tile) { padding: 24px 20px; }

.d-iconbtn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; flex: none; }
.d-iconbtn:hover { background: rgba(255,255,255,.1); }
.d-iconbtn svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }
.d-link { background: none; border: 0; color: var(--accent); font: 14px "Outfit", sans-serif; cursor: pointer; padding: 4px 0; }
.d-color { display: flex; align-items: center; gap: 10px; }
.d-color input[type=color] { width: 44px; height: 34px; border: 1px solid #8a8a8a; border-radius: 3px; padding: 2px; background: transparent; }

/* Media drop zone: dashed 150 px square (Choose / or drag and drop / hint), then 150 px file tiles. */
.mz { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0; }
.mz-drop {
  position: relative; width: 150px; height: 150px; border: 1.5px dashed #9a9a9a; border-radius: 4px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 2px;
}
.mz-drop.small { height: 60px; width: 150px; }
.mz-drop.busy { opacity: .6; }
.mz-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.mz-drop .btn { pointer-events: none; min-height: 30px; padding: 2px 22px; font-size: 13px; }
.mz-or { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.mz-hint { font-size: 12px; color: #fff; margin-top: 2px; }
.mz-sub { font-size: 11px; color: var(--muted); }
.mz-item { width: 150px; height: 150px; border: 1px solid #8a8a8a; background: #151515; display: grid; grid-template-rows: 1fr 28px; }
.mz-thumb { display: grid; place-items: center; overflow: hidden; padding: 6px; }
.mz-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mz-thumb span { font-size: 22px; color: #9a9a9a; }
.mz-bar { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 0 8px; font-size: 11px; color: var(--muted); }
.mz-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mz-bar .d-iconbtn { width: 26px; height: 26px; }

.d-status { font-size: 12.5px; color: var(--muted); text-align: center; padding: 6px 0 30px; }
.d-status .ok { color: var(--ok); }

@media (max-width: 860px) {
  .settings-nav a { font-size: 15px; }
  .d-row, .d-slider { grid-template-columns: 1fr; row-gap: 6px; }
  .d-slider .d-val { justify-content: flex-start; }
  .d-ugrid { grid-template-columns: 1fr 1fr !important; }
}

/* Desktop buttons keep their own width (HorizontalAlignment="Left"), they do not stretch across the card. */
.d-page .d-stack > .btn, .d-page > .btn { align-self: flex-start; }

/* Plan notices: session types / features the account's plan leaves out (booths hide them from guests). */
.d-lock-card { display: flex; align-items: center; gap: 18px; border: 1.5px solid var(--warn); font-size: 14px; }
.d-lock-card span { flex: 1; }
.d-lock-card .btn { flex: none; }
.d-lock-bar { margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: rgba(245,180,0,.1); color: var(--warn); font-size: 13px; }
.d-lock-bar a { color: var(--warn); font-weight: 600; text-decoration: underline; }
.d-lock-note { display: block; color: var(--warn); font-size: 12px; margin-top: 4px; text-align: center; }
.d-lock-note:hover { color: var(--warn); }
.d-tile.locked .d-tile-circle { opacity: .55; }
.d-stack:has(> .d-tile) > .d-caption { order: 1; }
.d-stack:has(> .d-tile) > .d-lock-note { order: 2; }
.console-tag { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: var(--accent); color: #fff; border-radius: 6px; padding: 2px 8px; margin-left: 8px; vertical-align: middle; }

/* ----- Admin console: overview ----- */
.ov-head { font-size: 13px; font-weight: 500; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; margin: 26px 0 10px; }
.stat.warn { color: var(--warn); }
.stat-link { color: inherit; display: block; }
.stat-link:hover { text-decoration: none; }
.bc-svg { width: 100%; height: auto; display: block; }
.bc-grid { stroke: #3a3a3a; stroke-width: 1; }
.bc-base { stroke: #5a5a5a; stroke-width: 1; }
.bc-axis { fill: var(--faint); font: 10.5px "Outfit", sans-serif; }
.bc-fill { fill: var(--accent); }
.bc-hit { fill: transparent; }
.bc-bar:hover .bc-fill { fill: var(--accent-2); }
.bc-bar:hover .bc-hit { fill: rgba(255,255,255,.04); }
.bc-table { margin-top: 8px; font-size: 13px; color: var(--muted); }
.bc-table summary { cursor: pointer; }
.bc-table table { margin-top: 6px; }

/* Announcements from MagikBooth (top of the panel). */
.announce { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; background: var(--card); border-left: 4px solid var(--accent); border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }
.announce.warning { border-left-color: var(--warn); }
.announce button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; }
.log-view { background: #161616; border-radius: 8px; padding: 12px; max-height: 420px; overflow: auto; font-size: 12px; white-space: pre-wrap; word-break: break-all; color: #ddd; }
.steps { margin: 0 0 6px; padding-left: 20px; color: var(--muted); }
.totp-qr svg { width: 180px; height: 180px; border-radius: 8px; display: block; }

/* ----- Galleries: events, then an event's media ----- */
.event-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.event-gallery { background: var(--card); border-radius: var(--radius); overflow: hidden; color: var(--text); display: flex; flex-direction: column; }
.event-gallery:hover { text-decoration: none; background: var(--card-2); }
.eg-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--input); display: grid; place-items: center; }
.eg-thumb img, .eg-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.eg-count { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.7); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.eg-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.eg-body .muted { font-size: 13px; }
.media-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.media-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: none; color: var(--muted); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.media-tile { position: relative; border-radius: 10px; overflow: hidden; background: var(--input); aspect-ratio: 1; outline: 2px solid transparent; }
.media-tile.sel { outline-color: var(--accent); }
.media-open { all: unset; cursor: zoom-in; display: block; width: 100%; height: 100%; }
.media-open img, .media-open video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-play { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.6); pointer-events: none; }
.media-check { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.55); border-radius: 6px; padding: 3px 4px; line-height: 0; }
.media-check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.media-kind { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.65); border-radius: 999px; padding: 1px 8px; font-size: 12px; pointer-events: none; }
.media-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.media-tile:hover .media-actions, .media-tile:focus-within .media-actions { opacity: 1; }
.media-actions a, .media-actions button { background: rgba(0,0,0,.7); color: #fff; border: 0; border-radius: 8px; width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer; font-size: 16px; }
.media-actions a:hover, .media-actions button:hover { background: var(--accent); text-decoration: none; }
@media (hover: none) { .media-actions { opacity: 1; } }
.viewer-back { position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 120; display: flex; padding: 16px; }
.viewer { margin: auto; width: 100%; max-width: 1200px; height: 100%; display: flex; flex-direction: column; gap: 10px; }
.viewer-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.viewer-media { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
/* Fit the whole picture on screen, portrait or landscape (the top bar and padding take about 90px). */
.viewer-media img, .viewer-media video { display: block; max-width: 100%; max-height: calc(100vh - 92px); width: auto; height: auto; object-fit: contain; border-radius: 8px; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 30px; cursor: pointer; }
.viewer-nav:hover { background: var(--accent); }
.viewer-nav.prev { left: 6px; } .viewer-nav.next { right: 6px; }

/* ----- Public event gallery: owner's share card ----- */
.share-card { margin-bottom: 16px; }
.share-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.share-body { display: flex; gap: 20px; align-items: flex-start; margin-top: 16px; flex-wrap: wrap; }
.share-qr { width: 140px; flex: none; background: #fff; border-radius: 10px; padding: 6px; line-height: 0; }
.share-qr svg { width: 100%; height: auto; aspect-ratio: 1; display: block; }
.share-link { display: flex; gap: 8px; }
.share-link input { flex: 1; min-width: 0; }

/* ----- Public event gallery: guests' page ----- */
.guest { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
.guest-head { background: var(--bar); padding: 26px 20px 22px; text-align: center; }
.guest-head h1 { font-size: 32px; font-weight: 600; margin: 0 0 6px; }
.guest-main { max-width: 1240px; width: 100%; margin: 0 auto; padding: 20px 16px 50px; flex: 1; }
.guest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.guest-grid a { position: relative; display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--input); }
.guest-grid img, .guest-grid video { width: 100%; height: 100%; object-fit: cover; display: block; }
.guest-grid .media-play { font-size: 28px; }
.guest-foot { text-align: center; color: var(--faint); font-size: 13px; padding: 20px; }
.lb { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 200; display: flex; flex-direction: column; padding: 12px; }
.lb-top { display: flex; justify-content: flex-end; gap: 8px; }
.lb-media { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; }
.lb-media img, .lb-media video { max-width: 100%; max-height: calc(100vh - 80px); object-fit: contain; border-radius: 8px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 30px; cursor: pointer; }
.lb-nav.prev { left: 4px; } .lb-nav.next { right: 4px; }

/* ===== Subscriptions (Plan & billing): one card per platform, and each platform's own page ===== */
.ico { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.sub-card { background: var(--card); border-radius: 18px; padding: 26px 28px; display: flex; flex-direction: column; gap: 18px; border: 1px solid transparent; }
.sub-card:hover { border-color: #3d3d3d; }
.sub-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.sub-brand { display: flex; gap: 14px; align-items: center; }
.sub-logo { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), #8e2a73); color: #fff; font-size: 28px; font-weight: 600; }
.sub-logo.tablet { background: linear-gradient(135deg, #2f80ed, #1aa3c8); }
img.sub-logo.img { background: none; padding: 0; display: block; }
.sub-name { font-size: 26px; font-weight: 600; line-height: 1.1; color: var(--accent); }
.sub-logo.tablet + div .sub-name { color: #5aa9ff; }
.sub-logo.share { background: linear-gradient(135deg, #12a37f, #2bc4a0); }
.sub-logo.share + div .sub-name { color: #3fd1ad; }
.sub-for { color: var(--muted); font-size: 14px; display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.sub-meta { display: grid; grid-template-columns: auto auto; gap: 6px 10px; margin: 0; font-size: 15px; text-align: right; }
.sub-meta dt { color: var(--muted); }
.sub-meta dd { margin: 0; font-weight: 600; text-align: left; }
.sub-meta .st-active { color: var(--ok); } .sub-meta .st-trial { color: #5aa9ff; } .sub-meta .st-warn { color: var(--warn); } .sub-meta .st-none { color: var(--muted); }
.sub-plan { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.sub-plan b { font-size: 22px; font-weight: 600; }
.sub-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.sub-btn { display: flex; gap: 10px; align-items: center; justify-content: center; min-height: 56px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--accent); color: var(--text); background: none; font: 16px "Outfit", sans-serif; cursor: pointer; text-align: center; }
.sub-btn:hover { background: rgba(215,54,108,.14); text-decoration: none; }
.sub-btn .ico { color: var(--accent); }
.sub-btn.blue { border-color: #2f80ed; } .sub-btn.blue .ico { color: #5aa9ff; } .sub-btn.blue:hover { background: rgba(47,128,237,.14); }
.sub-btn.green { border-color: #12a37f; } .sub-btn.green .ico { color: #3fd1ad; } .sub-btn.green:hover { background: rgba(18,163,127,.14); }

.back-link { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); margin-bottom: 14px; }
.back-link:hover { color: var(--text); text-decoration: none; }
.sub-title { display: flex; gap: 16px; align-items: center; margin: 0 0 24px; }
.sub-title .ico { width: 44px; height: 44px; stroke-width: 1.6; color: var(--muted); }
.sub-title h1 { margin: 0; font-size: 30px; font-weight: 500; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 26px; }
.tile { background: var(--card); border-radius: 16px; padding: 20px 22px; position: relative; text-align: left; border: 1px solid transparent; color: var(--text); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.tile:hover { border-color: #444; }
.tile .chev { position: absolute; top: 18px; right: 18px; color: var(--faint); }
.tile-ico { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 12px; }
.tile-ico .ico { width: 26px; height: 26px; }
.tile-ico.pink { background: rgba(215,54,108,.16); color: #ff6fa0; }
.tile-ico.blue { background: rgba(47,128,237,.16); color: #5aa9ff; }
.tile-ico.green { background: rgba(60,207,142,.15); color: var(--ok); }
.tile-ico.violet { background: rgba(155,93,229,.18); color: #b98cff; }
.tile-ico.amber { background: rgba(245,180,0,.15); color: var(--warn); }
.tile-label { font-size: 16px; }
.tile-value { font-size: 19px; font-weight: 600; }
.tile-sub { color: var(--muted); font-size: 14px; display: flex; gap: 6px; align-items: center; }
.meter { height: 8px; border-radius: 99px; background: var(--input); overflow: hidden; margin-top: 8px; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.chip { display: inline-flex; gap: 4px; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 13px; margin-top: 8px; width: fit-content; }
.chip.warn { background: rgba(245,180,0,.16); color: var(--warn); }
.addon { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; align-items: center; }
.addon span:first-child { display: flex; gap: 8px; align-items: center; }
.addon .ico { width: 16px; height: 16px; color: #ff6fa0; }
.addon .on { color: var(--ok); } .addon .off { color: var(--faint); }

.sub-panel { background: var(--card); border-radius: 18px; padding: 0 28px 28px; }
.sub-panel .tabs { margin: 0 -28px 24px; padding: 0 12px; }
.sub-panel .tabs button { flex: 1; display: flex; gap: 8px; align-items: center; justify-content: center; padding: 16px; font-size: 17px; border-bottom-width: 3px; }
.sub-panel .tabs .on { color: var(--accent); border-bottom-color: var(--accent); }
.banner { border-radius: 14px; padding: 22px 26px; display: flex; gap: 18px; align-items: flex-start; border: 1px solid; }
.banner .ico { width: 34px; height: 34px; }
.banner h3 { margin: 0 0 6px; font-size: 24px; font-weight: 500; }
.banner p { margin: 4px 0; display: flex; gap: 8px; align-items: center; }
.banner.ok { background: rgba(47,128,237,.12); border-color: rgba(90,169,255,.35); color: #a9d0ff; }
.banner.ok h3 { color: #fff; } .banner.ok .ico { color: #5aa9ff; }
.banner.trial { background: rgba(155,93,229,.12); border-color: rgba(185,140,255,.35); color: #d7c2ff; }
.banner.trial h3 { color: #fff; } .banner.trial .ico { color: #b98cff; }
.banner.warn { background: rgba(245,180,0,.10); border-color: rgba(245,180,0,.35); color: #ffe39a; }
.banner.warn h3 { color: #fff; } .banner.warn .ico { color: var(--warn); }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 12px; }
.quick-item { display: flex; gap: 18px; align-items: center; padding: 18px 22px; border: 1px solid var(--line); border-radius: 14px; background: none; color: var(--text); font: 18px "Outfit", sans-serif; cursor: pointer; text-align: left; }
.quick-item:hover { border-color: var(--accent); text-decoration: none; }
.quick-item .q-ico { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: rgba(215,54,108,.16); color: #ff6fa0; flex: none; }
.quick-item .q-ico .ico { width: 24px; height: 24px; }
.quick-item .chev { margin-left: auto; color: var(--faint); }
.dev-row { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid #3a3a3a; }
.dev-row:last-child { border-bottom: 0; }
.dev-row .grow { flex: 1; min-width: 0; }

/* ===== Subscriptions › Payments ===== */
.pay-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.pay-summary > div { background: var(--input); border: 1px solid #3a3a3a; border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.ps-label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.pay-summary b { font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ps-sub { color: var(--faint); font-size: 13px; }

.pay-notice { display: flex; gap: 16px; border-radius: 14px; padding: 20px 22px; margin-bottom: 20px; border: 1px solid; }
.pay-notice.bad { background: rgba(255,107,107,.07); border-color: rgba(255,107,107,.35); }
.pay-notice.warn { background: rgba(245,180,0,.07); border-color: rgba(245,180,0,.35); }
.pn-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.pay-notice.bad .pn-icon { background: rgba(255,107,107,.15); color: var(--bad); }
.pay-notice.warn .pn-icon { background: rgba(245,180,0,.15); color: var(--warn); }
.pn-icon .ico { width: 24px; height: 24px; }
.pn-body { flex: 1; min-width: 0; }
.pn-body h3 { margin: 0 0 4px; font-size: 19px; font-weight: 600; }
.pn-body > p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.pn-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; margin: 0; font-size: 14px; }
.pn-grid dt { color: var(--muted); }
.pn-grid dd { margin: 0; }
.pn-reason { color: #ffb4b4; font-weight: 500; }
.mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: .02em; }

.pay-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.bill-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.bill-form .bf-wide { grid-column: 1 / -1; }
@media (max-width: 700px) { .bill-form { grid-template-columns: 1fr; } }
.pay-card { border: 1px solid #3a3a3a; border-radius: 14px; padding: 20px 22px; }
.pc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.pc-head h3 { margin: 0; font-size: 18px; font-weight: 600; }
.pc-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.pay-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pay-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 0 12px 10px; border-bottom: 1px solid #3a3a3a; }
.pay-table td { padding: 14px 12px; border-bottom: 1px solid #333; vertical-align: top; }
.pay-table tr:last-child td { border-bottom: 0; }
.pay-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.pay-table .nowrap { white-space: nowrap; }
.pay-table .sub { color: var(--faint); font-size: 12px; margin-top: 3px; }
.pay-table .bad-text { color: #ff9b9b; }
.pay-table .btn .ico { width: 15px; height: 15px; margin-right: 4px; }
.pstat { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1.5; white-space: nowrap; background: rgba(255,255,255,.06); color: var(--muted); }
.pstat.ok { background: rgba(60,207,142,.14); color: var(--ok); }
.pstat.warn { background: rgba(245,180,0,.14); color: var(--warn); }
.pstat.bad { background: rgba(255,107,107,.14); color: #ff8f8f; }
.pay-empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.pay-empty .ico { width: 34px; height: 34px; color: var(--faint); }

/* ----- Phones: panel and admin pages ----- */
@media (max-width: 600px) {
  .card { padding: 18px 16px; }
  .grid, .grid.cols-2, .grid.cols-3 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid > .card + .card { margin-top: 0; }
  .stat { font-size: 25px; overflow-wrap: anywhere; }
  /* Form columns share the width two by two instead of running off the page */
  .prop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .prop-grid > * { min-width: 0; }
  .prop-grid input, .prop-grid select { width: 100%; min-width: 0; }
  /* Tables: readable columns, sideways scrolling inside the card when they don't fit */
  .card:has(> table.list) { overflow-x: auto; }
  table.list th, table.list td { padding: 10px 8px; }
  table.list td { min-width: 60px; }
  .badge { white-space: nowrap; }
  .card code { overflow-wrap: anywhere; }
  .save-bar { flex-wrap: wrap; }
  .card .save-bar { margin: 20px -16px -18px; padding: 14px 16px; }
  .card > a.row + p.muted { margin-left: 0 !important; }
  .page-head > * { min-width: 0; }
}
@media (max-width: 860px) {
  /* Settings pages: the page's name (the top bar has no room for it), then ‹ previous · next › */
  .settings-nav { margin-top: -18px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding-top: 14px; padding-bottom: 12px; }
  .settings-nav .now, body.has-bar-title .settings-nav .now { visibility: visible; font-size: 22px; grid-column: 1 / -1; grid-row: 1; justify-self: center; text-align: center; }
  .settings-nav .next { justify-self: end; text-align: right; }
}
@media (max-width: 600px) {
  .d-ugrid:has(> .card) { grid-template-columns: minmax(0, 1fr) !important; }
  .d-ugrid > * { min-width: 0; }
  .saved-tools .search { flex: 1 0 100%; }
}

/* ----- Screen Editor: sharing screen ----- */
.sp-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.sp-tools select { min-width: 190px; }
.sp-wrap { background: #3a3a3a; border-radius: var(--radius); padding: 24px; }
.sp-stage { position: relative; margin: 0 auto; background: #202020; outline: 2px solid #111; overflow: hidden; container-type: inline-size; touch-action: none; user-select: none; }
.sp-photo { position: absolute; inset: 3%; background: repeating-linear-gradient(45deg, #2b2b40 0 14px, #30304a 14px 28px); border-radius: 6px; }
.sp-btn { position: absolute; transform: translate(-50%, -50%); border-radius: 999px; display: grid; place-items: center; color: #fff; cursor: move; touch-action: none; white-space: nowrap; }
.sp-btn:hover { outline: 2px solid #fff; }
.sp-retake { border: 1.5px solid #fff; background: #202020; }
.sp-done { background: var(--accent); }
.sp-email { background: #ecb131; } .sp-sms { background: #2f80ed; } .sp-whatsapp { background: #25d366; } .sp-qr { background: #9d24c9; } .sp-print { background: #ef4b45; }
@media (max-width: 600px) { .sp-wrap { padding: 10px; } }
