/* Color tokens: light values on :root; dark values follow the OS unless the
   viewer picked a mode (theme-mode.js sets data-theme on <html>). The sidebar,
   hero, notices and QR surfaces keep fixed brand colors in both modes. */
:root {
  color-scheme: light;
  --ink: #261f3d;
  --muted: #6f6681;
  --purple: #7559ee;
  --lavender: #e7dfff;
  --on-lavender: #261f3d;
  --paper: #f7f6fb;
  --line: #e5e0ef;
  --line-strong: #d9d1e7;
  --surface: #fff;
  --white: var(--surface);
  --surface-raised: #fbfaff;
  --surface-sunken: #efedf4;
  --field: #fff;
  --tint: #efebff;
  --tint-strong: #f3eeff;
  --accent-ink: #5935bc;
  --link: #7559ee;
  --focus: #bca9ff;
  --night: #261f3d;
  --checker: #dfdbe7;
  --switch-off: #d4cde1;
  --danger: #9b302b;
  --danger-soft: #fff1ef;
  --danger-solid: #9b302b;
  --warn: #775113;
  --warn-soft: #fff7df;
  --success: #20634e;
  --success-soft: #edf8f1;
  --info: #2c5fb3;
  --info-soft: #e8effc;
  --chart-bar: #7559ee;
  --card-gap: 24px;
  --section-gap: 28px;
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #eeeaf8;
    --muted: #a9a0bd;
    --paper: #110d19;
    --line: #322a45;
    --line-strong: #4a3f60;
    --surface: #1a1526;
    --surface-raised: #201a2f;
    --surface-sunken: #161120;
    --field: #140f1d;
    --tint: #2a2142;
    --tint-strong: #2f2550;
    --accent-ink: #c4b6ff;
    --link: #b3a1ff;
    --focus: #9b85ff;
    --night: #0b0812;
    --checker: #2a2338;
    --switch-off: #3d3352;
    --danger: #ff9d94;
    --danger-soft: #3a1714;
    --warn: #f2c25b;
    --warn-soft: #33270d;
    --success: #6fd3a3;
    --success-soft: #12301f;
    --info: #94b8ff;
    --info-soft: #15233b;
    --chart-bar: #8b72f7;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eeeaf8;
  --muted: #a9a0bd;
  --paper: #110d19;
  --line: #322a45;
  --line-strong: #4a3f60;
  --surface: #1a1526;
  --surface-raised: #201a2f;
  --surface-sunken: #161120;
  --field: #140f1d;
  --tint: #2a2142;
  --tint-strong: #2f2550;
  --accent-ink: #c4b6ff;
  --link: #b3a1ff;
  --focus: #9b85ff;
  --night: #0b0812;
  --checker: #2a2338;
  --switch-off: #3d3352;
  --danger: #ff9d94;
  --danger-soft: #3a1714;
  --warn: #f2c25b;
  --warn-soft: #33270d;
  --success: #6fd3a3;
  --success-soft: #12301f;
  --info: #94b8ff;
  --info-soft: #15233b;
  --chart-bar: #8b72f7;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--purple);
  color: white;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;
}
button:hover,
.button:hover {
  filter: brightness(0.95);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.danger {
  background: var(--danger-soft);
  color: var(--danger);
}
a {
  color: var(--link);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(26px, 2.5vw, 34px);
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin-bottom: 12px;
}
h2 {
  font-size: 22px;
  letter-spacing: -0.5px;
}
h3 {
  font-size: 17px;
}
p {
  line-height: 1.65;
}
.muted,
small {
  color: var(--muted);
}
small {
  font-size: 12px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 16px;
}
.shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  padding: 28px 18px;
  background: #1c152c;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  color: #f6f3ff;
  /* Only shown when the menu is taller than the window; thin and dark. */
  scrollbar-width: thin;
  scrollbar-color: #4a3a66 transparent;
}
.sidebar small,
.sidebar .nav button,
.sidebar-bottom a {
  color: #c6bdd8;
}
.sidebar .workspace {
  border-color: #403250;
}
.sidebar .workspace strong,
.sidebar label {
  color: #f6f3ff;
}
.sidebar .workspace small {
  display: block;
  margin-top: 6px;
}
.sidebar select {
  color: var(--on-lavender);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.5px;
}
.brandmark {
  display: block;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}
.workspace {
  padding: 14px;
  background: #2a203e;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.workspace select {
  width: 100%;
  margin-top: 9px;
  background: #fff;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav button {
  text-align: left;
  justify-content: flex-start;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  padding: 11px 14px;
}
.nav button.active {
  background: #3c2b58;
  color: white;
  box-shadow: inset 3px 0 var(--lavender);
}
.nav button:hover {
  background: #30243f;
  filter: none;
}
.nav-copy {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 650;
}
.nav-copy small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  margin-top: 5px;
}
.nav-symbol {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.nav-copy > span:not(.nav-count) {
  flex: 1;
  min-width: 0;
}
.nav-copy {
  width: 100%;
}
.nav-count {
  flex-shrink: 0;
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #d2463c;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.topbar-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.menu-toggle,
.nav-backdrop {
  display: none;
}
.workspace-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--surface-sunken);
  border-radius: 12px;
  margin-bottom: 24px;
}
.workspace-tabs button {
  min-height: 40px;
  padding: 8px 16px;
  background: transparent;
  color: var(--muted);
  border: none;
}
.workspace-tabs button.active {
  background: var(--surface);
  color: var(--accent-ink);
  box-shadow: 0 1px 4px #261f3d18;
}
.page-context {
  display: block;
  margin-bottom: 5px;
}
.hero-summary {
  align-self: center;
  border-left: 1px solid #695680;
  padding: 20px;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 200;
  background: var(--surface);
  color: var(--ink);
  padding: 12px;
}
.skip-link:focus {
  top: 12px;
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 12px;
  line-height: 1.7;
}
.sidebar-bottom a {
  margin-right: 8px;
}
/* A typical laptop browser leaves ~700px of height: tighten the desktop
   sidebar so the whole menu and its footer fit without scrolling. */
@media (min-width: 851px) and (max-height: 820px) {
  .sidebar {
    padding: 18px 14px;
    gap: 14px;
  }
  .workspace {
    padding: 10px 12px;
  }
  .workspace select {
    margin-top: 6px;
  }
  .nav {
    gap: 2px;
  }
  .nav button {
    padding: 8px 12px;
  }
  .nav-copy small {
    margin-top: 2px;
  }
}
@media (min-width: 851px) and (max-height: 640px) {
  .nav-copy small {
    display: none;
  }
}
.content {
  min-width: 0;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 38px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  gap: 16px;
}
.theme-control {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.theme-control select {
  min-height: 36px;
  padding: 6px 10px;
}
.login-form > .theme-control {
  align-self: flex-end;
}
.topbar strong {
  font-size: 13px;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 20px;
  background: var(--tint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
}
.badge.local {
  background: var(--warn-soft);
  color: var(--warn);
}
.main {
  padding: 34px 38px;
  max-width: 1600px;
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}
/* The .main flex gap is the only spacing between page sections. The doubled
   class outranks component margins (.cards, .hero, .filters, .panel, ...). */
.main.main > * {
  margin-block: 0;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}
.heading p {
  color: var(--muted);
  max-width: 650px;
}
.heading p:last-child {
  margin-bottom: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: var(--card-gap);
  margin-bottom: 26px;
}
.card,
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}
.panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.panel > * {
  margin-block: 0;
}
.panel > button,
.panel > a {
  align-self: flex-start;
}
.card .metric {
  display: block;
  font-size: 32px;
  font-weight: 700;
  margin: 14px 0 4px;
  letter-spacing: -1px;
}
.card small {
  display: block;
}
/* Label, number and detail share row tracks across a row of cards, so a label
   that wraps to two lines does not push its number below its neighbours'. */
.cards > .metric-card {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  row-gap: 0;
}
.metric-card > small:first-child {
  align-self: end;
}
/* Long amounts (IDR 16,140,000) shrink with the card instead of overflowing
   it; short counts keep the full size. */
/* The container sits on the number row, not the card: containment on the card
   itself would switch off its subgrid. */
.metric-card .metric {
  container-type: inline-size;
}
.metric-card .metric-long {
  font-size: clamp(18px, 11.5cqi, 32px);
  white-space: nowrap;
}
.hero {
  background: var(--night);
  color: white;
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 32px;
  border-radius: 18px;
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 24px;
  margin-bottom: 24px;
}
.hero p {
  color: #d6cde6;
  max-width: 580px;
}
.hero .eyebrow {
  color: var(--lavender);
}
.hero .button {
  background: var(--lavender);
  color: var(--on-lavender);
}
.orb {
  width: 150px;
  height: 150px;
  border: 1px solid #bca9ff;
  border-radius: 30px;
  transform: rotate(15deg);
  align-self: center;
  display: grid;
  place-items: center;
  font-size: 80px;
  color: var(--lavender);
  box-shadow:
    14px 14px 0 #493570,
    -14px -14px 0 #312448;
}
.split {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--card-gap);
  margin-bottom: 20px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.section-space {
  margin: 24px 0;
}
.steps {
  counter-reset: step;
  list-style: none;
  counter-set: list-item 0;
  padding: 0;
}
.steps li {
  counter-increment: step;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.steps li:before {
  content: counter(step);
  background: var(--tint);
  color: var(--purple);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--card-gap);
}
.theme-card {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  background: var(--surface);
}
.theme-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}
.theme-card .details {
  padding: 15px;
}
.theme-card h3 {
  margin-bottom: 8px;
}
.theme-card.selected {
  outline: 3px solid var(--purple);
  outline-offset: 1px;
}
.theme-card button {
  width: 100%;
  margin-top: 10px;
  font-size: 12px;
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.preview-grid img {
  width: 100%;
  border-radius: 10px;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--card-gap);
}
.plan .price {
  font-size: 27px;
  font-weight: 700;
  margin: 20px 0 3px;
}
.plan ul {
  padding-left: 18px;
  line-height: 1.9;
  font-size: 13px;
  min-height: 165px;
}
/* Only the active plan gets the purple frame; "Popular" is marked by its badge. */
.plan.highlight .badge {
  background: var(--purple);
  color: white;
}
.plan button {
  width: 100%;
  margin-top: auto;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th,
td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
/* Headers, chips and buttons stay on one line; cell text wraps so tables in
   narrow panels fit instead of scrolling sideways. Truly wide tables still
   scroll inside .table-wrap. */
th,
td button,
td .button {
  white-space: nowrap;
}
td {
  white-space: normal;
  overflow-wrap: break-word;
  min-width: 72px;
}
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  background: var(--surface-raised);
}
td button {
  padding: 7px 10px;
  min-height: 34px;
  font-size: 12px;
}
tr:last-child td {
  border-bottom: 0;
}
#guest-payment-history table { min-width: 760px; }
#guest-payment-history td { white-space: normal; vertical-align: top; }
#guest-payment-history td:first-child { min-width: 140px; max-width: 200px; }
#guest-payment-history td:first-child small { overflow-wrap: anywhere; }
#guest-payment-history td:nth-child(4) { min-width: 160px; }
#guest-payment-history .payment-sync-note { min-width: 180px; max-width: 280px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.subscription-summary { display:flex; flex-wrap:wrap; justify-content:space-between; gap:20px; }
.plan.current-plan { border:2px solid var(--purple); background:var(--tint-strong); }
.plan.current-plan button:disabled { opacity:1; background:var(--tint); color:var(--accent-ink); }
.empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--surface-raised);
}
form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}
input,
select,
textarea {
  border: 1px solid var(--line-strong);
  background: var(--field);
  color: var(--ink);
  border-radius: 9px;
  padding: 11px 12px;
  max-width: 100%;
  min-height: 44px;
}
textarea {
  min-height: 140px;
  resize: vertical;
}
.checkbox {
  flex-direction: row;
  align-items: flex-start;
  font-weight: 400;
  line-height: 1.55;
}
.checkbox input {
  min-height: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--purple);
}

.checkbox input.event-switch {
  appearance: none;
  flex: 0 0 48px;
  width: 48px;
  height: 28px;
  padding: 2px;
  border: 1px solid #786d93;
  border-radius: 999px;
  background: var(--switch-off);
  cursor: pointer;
}
.checkbox input.event-switch::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px #0003;
}
.checkbox input.event-switch:checked { background: #7355ee; }
.checkbox input.event-switch:checked::before { transform: translateX(20px); }
.checkbox input.event-switch:focus-visible { outline: 3px solid #7355ee; outline-offset: 3px; }
form button {
  align-self: flex-start;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.asset-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 18px;
}
.asset-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  overflow-wrap: anywhere;
}
.asset-card h3 { margin: 0; font-size: 14px; }
.asset-card label { min-width: 0; }
.asset-card .checkbox { min-height: 44px; align-items: center; }
.asset-card-kind { color: var(--muted); font-size: 12px; font-weight: 600; }
/* Event theme picker: preview cards with a checkbox (2026-10-08). */
.theme-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 132px), 1fr)); gap: 12px; }
.theme-pick { display: grid; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; min-width: 0; transition: border-color 160ms, box-shadow 160ms; }
.theme-pick img, .theme-pick-empty { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; display: block; background: var(--tint); }
.theme-pick-name { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.theme-pick-name input { flex: none; margin-top: 2px; }
.theme-pick:has(input:checked) { border-color: var(--purple); box-shadow: 0 0 0 2px color-mix(in srgb, var(--purple) 30%, transparent); }
.theme-pick:has(input:disabled) { opacity: .55; cursor: not-allowed; }
/* Kiosk logo & heading colour over the theme background (2026-10-10). */
.chrome-tone { display: grid; gap: 12px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.chrome-tone legend { padding: 0 6px; font-weight: 600; }
.chrome-tone-sample { display: grid; justify-items: center; align-content: space-between; gap: 18px; max-width: 320px; aspect-ratio: 9 / 16; max-height: 360px; padding: 26px 16px 18px; border-radius: 12px; background: linear-gradient(180deg, #8f81bb 0%, #a79bce 26%, #d6cfe9 62%, #f4f2f9 86%, #f8f7fb 100%); background-size: cover; background-position: center; box-shadow: 0 6px 18px rgba(40, 24, 80, .16); text-align: center; }
.chrome-tone-mark { font-size: 20px; letter-spacing: .12em; font-weight: 700; }
.chrome-tone-title { font-size: 17px; font-weight: 300; letter-spacing: .08em; }
.chrome-tone-handle { font-size: 12px; font-weight: 600; letter-spacing: .06em; }
.chrome-tone-options { display: flex; flex-wrap: wrap; gap: 10px; }
.chrome-tone .chrome-tone-option { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); cursor: pointer; font-weight: 600; }
.chrome-tone-option input { width: auto; min-height: 0; height: auto; margin: 0; padding: 0; accent-color: var(--purple); }
.chrome-tone-swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); }
.chrome-tone-option:has(input:checked) { border-color: var(--purple); box-shadow: 0 0 0 2px color-mix(in srgb, var(--purple) 30%, transparent); }
/* Landscape print: where the WHX mark goes, with previews (2026-10-09). */
.print-logo { display: grid; gap: 12px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.print-logo legend { padding: 0 6px; font-weight: 600; }
.print-logo svg { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 6px 18px rgba(40, 24, 80, .16); }
.print-logo-preview { max-width: 560px; }
.print-logo-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.print-logo-option { display: grid; gap: 8px; align-content: start; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; min-width: 0; }
.print-logo-option svg { box-shadow: 0 2px 8px rgba(40, 24, 80, .14); }
.print-logo-text { color: var(--muted); font-size: 13px; line-height: 1.45; }
.print-logo-name { display: flex; align-items: flex-start; gap: 8px; font-weight: 600; }
.print-logo-name input { flex: none; width: auto; min-height: 0; height: auto; margin: 3px 0 0; padding: 0; accent-color: var(--purple); }
.print-logo-option:has(input:checked) { border-color: var(--purple); box-shadow: 0 0 0 2px color-mix(in srgb, var(--purple) 30%, transparent); }
.asset-card-new { border-color: var(--purple); box-shadow: 0 0 0 2px color-mix(in srgb, var(--purple) 30%, transparent); }
.asset-preview {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-sunken);
  color: var(--muted);
}
/* The stage has the shape of the place the asset is shown. */
.asset-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 200px;
  overflow: hidden;
  border-radius: 8px;
}
.asset-stage--portrait { width: auto; height: 300px; min-height: 0; aspect-ratio: 9 / 16; background: #100d18; }
.asset-stage--landscape { min-height: 0; aspect-ratio: 16 / 9; background: #100d18; }
.asset-stage > img, .asset-stage > video { position: absolute; inset: 0; width: 100%; height: 100%; }
.asset-stage > figcaption { position: relative; padding: 18px; font-size: 13px; text-align: center; color: var(--muted); }
.asset-stage--portrait > figcaption, .asset-stage--landscape > figcaption { color: #d9d2ec; }
.asset-stage:not(.asset-stage--portrait):not(.asset-stage--landscape) > .asset-media { object-fit: contain; }
.asset-sample-photo { object-fit: cover; }
/* media.final stretches the frame to the result size; show exactly that. */
.asset-preview--frame .asset-media { object-fit: fill; }
.asset-preview--background .asset-media { object-fit: cover; }
.asset-preview--ad .asset-media { object-fit: contain; background: #000; }
.asset-preview--welcome-video .asset-media { object-fit: cover; background: #000; }
.asset-preview--photo-wall-logo .asset-stage {
  background: radial-gradient(ellipse at center, #2a1f45 0%, #100d18 70%);
}
.asset-preview--photo-wall-logo .asset-media {
  inset: auto;
  left: 50%;
  top: 50%;
  width: 44%;
  height: 32%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .54));
}
.asset-usage { font-size: 12px; line-height: 1.4; text-align: center; color: var(--muted); }
.asset-warning { font-size: 12px; line-height: 1.4; text-align: center; color: var(--warn); }
.asset-preview [hidden] { display: none; }
.notice {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  background: var(--night);
  color: white;
  max-width: 480px;
  padding: 18px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 30px #261f3d22;
}
.notice.error {
  background: var(--danger-solid);
}
.notice:not([hidden]) {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.notice-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.55;
}
.notice-close {
  flex-shrink: 0;
  min-height: 32px;
  width: 32px;
  padding: 0;
  margin: -6px -10px -6px 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font-size: 20px;
  line-height: 1;
}
.notice-close:hover {
  background: #ffffff22;
  filter: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0;
  width: min(750px, 94vw);
  max-height: 90vh;
  color: var(--ink);
  background: var(--surface);
  overflow: hidden;
}
dialog[open] {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}
#modal-content {
  padding: 28px;
  overflow: auto;
  overscroll-behavior: contain;
  min-height: 0;
}
#modal-content > * + * {
  margin-top: 20px;
}
.modal-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 28px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.modal-actions button {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
.modal-actions #close-modal {
  flex: 0 0 auto;
}
dialog::backdrop {
  background: #1c152c88;
  backdrop-filter: blur(3px);
}
.login-back {
  color: var(--lavender);
  margin-top: 24px;
  font-size: 14px;
}
.qr {
  display: block;
  width: 220px;
  max-width: 100%;
  margin: 20px auto;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-intro {
  padding: 70px;
  background: var(--night);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-intro h1 {
  font-size: clamp(38px, 5vw, 64px);
  margin: 55px 0 24px;
  max-width: 520px;
}
.login-intro p {
  max-width: 440px;
  color: #d6cde6;
}
.login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 70px;
  max-width: 640px;
}
.login-form h2 {
  font-size: 30px;
}
.login-form .row {
  margin: 24px 0;
}
.login-form .button {
  width: 100%;
}
.sim-logins {
  padding: 20px;
  background: var(--warn-soft);
  border-radius: 12px;
  margin-top: 24px;
}
.sim-logins button {
  font-size: 12px;
  margin: 8px 6px 0 0;
  padding: 9px 11px;
}
.loading {
  display: grid;
  place-items: center;
  min-height: 70vh;
  align-content: center;
  gap: 20px;
}
.legal-page,
.result-page {
  max-width: 1000px;
  margin: 40px auto;
  padding: 30px;
}
.legal-page pre {
  white-space: pre-wrap;
  font:
    15px/1.8 Segoe UI,
    sans-serif;
  overflow-wrap: anywhere;
}
.result-page {
  text-align: center;
}
.result-photo {
  max-height: 65vh;
  max-width: 100%;
  border-radius: 14px;
}
.wall-grid {
  columns: 4 200px;
  column-gap: 18px;
}
.wall-item {
  break-inside: avoid;
  margin-bottom: 18px;
}
.wall-item img {
  width: 100%;
  border-radius: 14px;
}
/* Generate from folder: one row per photo, its own theme and progress. */
.folder-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 50vh; overflow-y: auto; }
.folder-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 48px; gap: 10px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 12px; }
.folder-item > img, .folder-result img { width: 48px; height: 64px; object-fit: cover; border-radius: 8px; display: block; }
.folder-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9em; }
@media (max-width: 640px) {
  .folder-item { grid-template-columns: 48px minmax(0, 1fr) 48px; }
  .folder-item select { grid-column: 2 / 4; }
  .folder-item > span:nth-of-type(2) { grid-column: 2 / 4; }
}
.subtle {
  font-size: 12px;
  color: var(--muted);
}
.sticky-actions {
  position: sticky;
  bottom: 16px;
  background: var(--night);
  color: white;
  padding: 16px 22px;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-top: 25px;
  box-shadow: 0 6px 25px #0002;
}
.sticky-actions button {
  background: var(--lavender);
  color: var(--on-lavender);
}
.sticky-actions button.secondary {
  background: transparent;
  color: #fff;
  border-color: #ffffff55;
}
.sticky-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.sticky-actions .unsaved-note {
  color: var(--lavender);
  font-size: 12px;
  font-weight: 600;
}
.theme-filters {
  align-items: flex-end;
}
.theme-filters > .checkbox {
  flex: 0 1 auto;
  align-items: center;
  min-height: 44px;
}
.theme-filters > small {
  padding-bottom: 12px;
}
.theme-filters > .theme-slot-usage {
  margin-bottom: 10px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 100%;
  background: #9c82ed;
  display: inline-block;
  margin-right: 8px;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  color: var(--info);
  background: var(--info-soft);
}
.status-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.status-chip.success { color: var(--success); background: var(--success-soft); }
.status-chip.danger { color: var(--danger); background: var(--danger-soft); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.report-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.report-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-block: 14px; }
.report-tile { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.report-tile strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.report-tile span { color: var(--muted); font-variant-numeric: tabular-nums; }
.report-tile[data-status="paid"] { border-color: var(--success); }
.report-tile[data-status="open"] { border-color: var(--warn); }
.outcome-summary .report-tile small.muted { font-size: 12px; line-height: 1.35; }
.report-invoice { font-size: 12px; word-break: break-all; }
/* Event editor: live preview of the chosen Photo Wall transition on a sample
   photo framed like a wall card (photo-wall-transitions.js). */
.wall-transition-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.wall-transition-preview > .stack { flex: 1 1 200px; gap: 10px; }
.wall-transition-preview > .stack > button { align-self: flex-start; }
.wall-transition-stage { position: relative; flex: 0 0 auto; width: 180px; height: 260px; display: grid; place-items: center;
  overflow: hidden; border-radius: 12px; background: #1c152c; perspective: 700px; }
.wall-transition-sample { position: relative; width: 117px; height: 208px; border: 4px solid rgba(244, 237, 221, 0.92);
  border-radius: 3px; background: #0a0c13; transform-style: preserve-3d; }
.wall-transition-sample > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wall-transition-sample.is-assembling > img { opacity: 0; }
/* Audit detail: key facts as label/value pairs, IDs shortened, raw data folded. */
.audit-detail { display: grid; gap: 6px; min-width: 220px; max-width: 520px; }
.audit-detail dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 0; font-size: 13px; }
.audit-detail dt { color: var(--muted); }
.audit-detail dd { margin: 0; overflow-wrap: anywhere; }
.audit-ids { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.audit-ids code { font-size: 12px; color: var(--muted); }
.audit-detail details summary { cursor: pointer; font-size: 12px; color: var(--link); }
.audit-detail pre { margin: 6px 0 0; padding: 10px 12px; max-height: 240px; overflow: auto; font-size: 12px; line-height: 1.5;
  white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-sunken); border-radius: 8px; }
.event-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.event-cards > .panel { gap: 14px; }
.event-actions { gap: 8px; flex-wrap: wrap; margin-top: auto; }
.event-actions button { min-height: 38px; padding: 8px 14px; }
.status-chip.warn { color: var(--warn); background: var(--warn-soft); }
.status-chip.neutral { color: var(--muted); background: var(--surface-sunken); }
.client-filters {
  align-items: flex-end;
  margin-bottom: 0;
}
.client-filters > small {
  padding-bottom: 12px;
}
.doku-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.doku-head h2,
.doku-head p {
  margin: 0;
}
.setup-steps.doku-steps li {
  align-items: flex-start;
}
.doku-steps .setup-copy > * + * {
  margin-top: 10px;
}
.doku-key {
  max-height: 140px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-sunken);
  font: 11px/1.5 ui-monospace, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.doku-credentials > summary,
.legacy-archive > summary,
.failed-history > summary {
  cursor: pointer;
  font-weight: 650;
  min-height: 32px;
}
.doku-credentials[open] > summary {
  margin-bottom: 12px;
}
.legacy-archive,
.failed-history {
  gap: 14px;
}
/* Flex summaries drop the native disclosure marker; draw one so the panel reads as expandable. */
.legacy-archive > summary,
.failed-history > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
}
.legacy-archive > summary::-webkit-details-marker,
.failed-history > summary::-webkit-details-marker {
  display: none;
}
.legacy-archive > summary::before,
.failed-history > summary::before {
  content: "\25B8";
  color: var(--muted);
  transition: transform 0.15s;
}
.legacy-archive[open] > summary::before,
.failed-history[open] > summary::before {
  transform: rotate(90deg);
}
.insight-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}
.segmented {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-sunken);
}
.segmented button {
  min-height: 36px;
  padding: 6px 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--accent-ink);
  box-shadow: 0 1px 4px #261f3d18;
}
.insight-controls .checkbox {
  align-items: center;
}
.insight-chart {
  margin: 0;
}
.insight-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: var(--card-gap);
  /* An empty chart keeps its own short height beside a full one. */
  align-items: start;
}
.insight-charts > *,
.insight-chart {
  min-width: 0;
}
.insight-chart h3 {
  margin: 0;
}
.chart-wrap {
  position: relative;
}
.insight-svg {
  display: block;
  overflow: visible;
}
.chart-wrap {
  min-height: 220px;
}
.chart-grid {
  stroke: var(--line);
  stroke-width: 1;
}
.chart-axis {
  fill: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.chart-peak {
  fill: var(--ink);
  font-size: 11px;
  font-weight: 650;
}
.chart-bar {
  fill: var(--chart-bar);
}
.chart-hit {
  fill: transparent;
  outline: none;
  cursor: default;
}
.chart-hit:hover,
.chart-hit:focus-visible {
  fill: var(--tint);
  fill-opacity: 0.45;
}
.chart-tooltip {
  position: absolute;
  top: 0;
  transform: translate(-50%, -8px);
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 6px 20px #0000002e;
  font-size: 12px;
  pointer-events: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.chart-table > summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
}
.chart-table[open] > summary {
  margin-bottom: 12px;
}
.share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.share-track {
  width: 72px;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-sunken);
  overflow: hidden;
}
.share-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--chart-bar);
}
.preset-payments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}
.preset-payments li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  min-width: 0;
}
.preset-payments li:last-child {
  border-bottom: 0;
}
.preset-payments li > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.identity-cell {
  display: grid;
  gap: 2px;
}
.job-reason {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  white-space: normal;
}
.job-reason code {
  font-size: 11px;
  color: var(--muted);
}
.help {
  padding: 18px;
  background: var(--tint);
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.7;
}
@media (max-width: 1200px) {
  .plan-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .main {
    padding: 25px;
  }
  .topbar {
    padding: 18px 25px;
  }
}
@media (max-width: 850px) {
  :root {
    --card-gap: 20px;
    --section-gap: 24px;
  }
  .panel {
    padding: 24px;
  }
  #modal-content {
    padding: 22px;
  }
  .modal-actions {
    padding: 16px 22px;
  }
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  /* The sidebar becomes a drawer so the studio switcher and links stay reachable. */
  .sidebar {
    display: none;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 150;
    width: min(300px, 86vw);
    height: 100dvh;
    padding: 20px 16px;
    box-shadow: 0 10px 40px #0006;
  }
  .shell.nav-open .sidebar {
    display: flex;
  }
  .shell.nav-open .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 140;
    background: #1c152c88;
  }
  .menu-toggle {
    display: inline-flex;
    min-height: 40px;
    padding: 8px 14px;
  }
  /* Name and guide link stay in the drawer; the select keeps its aria-label. */
  .topbar .row > small,
  .topbar .topbar-guide,
  .topbar .theme-control-text {
    display: none;
  }
  .topbar {
    padding: 14px 18px;
    flex-wrap: wrap;
  }
  .main {
    padding: 20px 18px;
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .orb {
    display: none;
  }
  .login {
    grid-template-columns: minmax(0, 1fr);
  }
  .login-intro {
    padding: 35px;
  }
  .login-intro h1 {
    margin: 24px 0;
    font-size: 35px;
  }
  .login-form {
    padding: 35px;
  }
  .heading {
    flex-direction: column;
    gap: 8px;
  }
  .preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
}
@media (max-width: 480px) {
  :root {
    --card-gap: 16px;
  }
  .panel {
    padding: 22px;
  }
  .modal-actions {
    gap: 10px;
  }
  .modal-actions button {
    padding: 10px 12px;
  }
  .plan-grid {
    grid-template-columns: 1fr;
  }
  .theme-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .theme-card .details {
    padding: 10px;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .card {
    padding: 16px;
  }
  .card .metric {
    font-size: 25px;
  }
  /* Two cards per row on a phone: a long amount wraps at its space instead. */
  .metric-card .metric-long {
    font-size: clamp(16px, 13cqi, 25px);
    white-space: normal;
  }
  .topbar {
    font-size: 12px;
  }
  .notice {
    right: 12px;
    left: 12px;
    bottom: 12px;
  }
  .sticky-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
/* Filters size to their content instead of stretching a single select across
   the page; search fields still grow. */
.filters > label {
  flex: 0 1 260px;
  min-width: 0;
}
.filters > label:has(input[type="search"]) {
  flex: 1 1 260px;
}
/* Standalone controls placed directly in a page keep a readable width. */
.main > label {
  align-self: flex-start;
  width: min(100%, 320px);
}
.main > button,
.main > a.button {
  align-self: flex-start;
}
/* A choice among a few options does not need the full form width. */
form label > select {
  max-width: 420px;
}
.result-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 20px;
  margin: 20px 0;
}
.result-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
/* Results are always 9:16 (media.final, 720x1280): the photo fills the card
   width at that shape, whole and without side bars. Placeholders share the
   shape so every card in a row lines up and stays quiet. */
.result-card > img,
.result-placeholder {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  display: block;
}
.result-card > img {
  object-fit: cover;
}
.result-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface-sunken);
}
.result-copy {
  padding: 16px 18px 18px;
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.result-copy > * {
  margin: 0;
}
.result-copy .status-chip {
  white-space: normal;
  max-width: 100%;
}
.result-copy > a {
  margin-top: auto;
  align-self: flex-start;
}
.result-copy h3 {
  margin-top: 0;
}
[hidden] {
  display: none !important;
}
.user-guide {
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.user-guide h2 {
  margin-top: 2.2em;
  padding-top: 0.8em;
  border-top: 1px solid var(--line);
}
.user-guide li {
  margin: 0.6em 0;
}
.payment-card {
  --payment-color: var(--accent-ink);
  --payment-tint: var(--tint);
  display: grid;
  gap: 22px;
  min-width: 0;
}
.setup-steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.setup-steps li { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--surface); }
.setup-steps li.complete { border-color: var(--line-strong); background: var(--tint); }
.setup-indicator { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--surface-sunken); color: var(--muted); font-weight: 700; }
.setup-steps .complete .setup-indicator { background: #6947c7; color: white; }
.setup-copy { flex: 1; min-width: 0; }
.setup-copy p { margin: 6px 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.setup-copy small { font-size: 11px; font-weight: 600; color: var(--accent-ink); }
.setup-steps button { flex-shrink: 0; max-width: 140px; font-size: 12px; }
@media (max-width: 600px) {
  .setup-steps li { flex-wrap: wrap; }
  .setup-copy { flex: 1 0 calc(100% - 44px); }
  .setup-steps button { margin-left: 44px; max-width: none; }
}
.payment-card[data-phase="success"],
.payment-badge[data-phase="success"] {
  --payment-color: var(--success);
  --payment-tint: var(--success-soft);
}
.payment-card:is([data-phase="expired"], [data-phase="cancelled"], [data-phase="failed"]),
.payment-badge:is([data-phase="expired"], [data-phase="cancelled"], [data-phase="failed"]) {
  --payment-color: var(--danger);
  --payment-tint: var(--danger-soft);
}
.payment-card:is([data-phase="review"], [data-phase="refund"]),
.payment-badge:is([data-phase="review"], [data-phase="refund"]) {
  --payment-color: var(--warn);
  --payment-tint: var(--warn-soft);
}
.payment-summary, .payment-deadline .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
#modal:has(.payment-card) .modal-actions { align-items: stretch; }
.payment-summary strong {
  font-size: 26px;
  letter-spacing: -0.7px;
}
.payment-state {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  background: var(--payment-tint);
}
.payment-state h3 { margin: 0 0 8px; color: var(--payment-color); }
.payment-state p { margin: 0; line-height: 1.6; }
.payment-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--surface);
  background: var(--payment-color);
  font-size: 24px;
}
.payment-sandbox {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--tint);
  padding: 14px 18px;
  font-size: 13px;
  color: var(--accent-ink);
}
.payment-sandbox strong { font-size: 11px; letter-spacing: 1.2px; }
.payment-sandbox p { margin: 6px 0 0; line-height: 1.55; }
.payment-deadline { display: grid; gap: 10px; }
.payment-clock { font-size: 26px; font-variant-numeric: tabular-nums; color: var(--accent-ink); }
.payment-deadline.urgent .payment-clock { color: var(--danger); }
.payment-deadline progress {
  appearance: none;
  border: none;
  width: 100%;
  height: 6px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--line);
  accent-color: var(--purple);
}
.payment-deadline progress::-webkit-progress-bar { background: var(--line); }
.payment-deadline progress::-webkit-progress-value { background: var(--purple); }
.payment-deadline progress::-moz-progress-bar { background: var(--purple); }
.payment-deadline small, .payment-reference small { color: var(--muted); }
.payment-qr {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  background: #fff;
  color: #261f3d;
}
.payment-qr .qr { width: 216px; max-width: 100%; height: auto; margin: 0; padding: 0; border: none; border-radius: 0; }
.payment-qr small { color: #6f6681; }
.integration-icon { width: 24px; height: 24px; object-fit: contain; flex: 0 0 24px; }
.integration-label { display: inline-flex; align-items: center; gap: 10px; }
.google-button, a.button.google-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; background: #fff; border: 1px solid #747775; border-radius: 8px; color: #1f1f1f; font-weight: 600; text-decoration: none; }
.google-button:hover { background: #f2f2f2; color: #1f1f1f; }
.google-button .integration-icon { width: 20px; height: 20px; flex-basis: 20px; }
.admin-login .login-form { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
.admin-login .login-form h2, .admin-login .login-form > p { margin: 0; }
.payment-qr.qris-display { max-width: 380px; width: 100%; box-sizing: border-box; margin: auto; border: 1px solid #dedee3; border-top: 6px solid #d91e36; border-radius: 12px; background: #fff; color: #202124; padding: 24px; gap: 12px; }
.qris-heading { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 20px; padding-bottom: 16px; border-bottom: 1px solid #eee; }
.qris-heading .qris-logo { width: 106px; height: auto; }
.qris-heading span { font-size: 10px; font-weight: 700; max-width: 95px; text-align: right; letter-spacing: .05em; }
.qris-merchant { overflow-wrap: anywhere; font-size: 16px; }
.qris-amount { font-size: 24px; font-weight: 750; }
.qris-code { padding: 16px; background: #fff; max-width: 100%; }
.qris-display small { max-width: 270px; text-align: center; color: #555; }
.payment-simulator { display: flex; flex-wrap: wrap; gap: 12px; }
.payment-simulator > * { flex: 1 1 180px; font-size: 13px; }
.payment-steps { display: flex; list-style: none; gap: 12px; margin: 0; padding: 0; counter-reset: payment-step; }
.payment-steps li { flex: 1; font-size: 12px; color: var(--muted); line-height: 1.5; border-top: 3px solid var(--line); padding-top: 10px; }
.payment-steps li::before { counter-increment: payment-step; content: counter(payment-step) ". "; font-weight: 700; }
.payment-steps li.complete { border-color: var(--purple); color: var(--accent-ink); }
.payment-connection { color: var(--warn); background: var(--warn-soft); border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.6; margin: 0; }
.payment-reference { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 18px; }
.payment-reference code { font-size: 12px; overflow-wrap: anywhere; }
.payment-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--payment-color, var(--accent-ink));
  background: var(--payment-tint, var(--tint));
}
@media (max-width: 480px) {
  .payment-card { gap: 18px; }
  .payment-state { padding: 16px; gap: 12px; }
  .payment-state h3 { font-size: 17px; }
  .payment-icon { width: 34px; height: 34px; font-size: 20px; }
  .payment-summary strong { font-size: 23px; }
  .payment-steps { gap: 8px; }
}
/* Theme bank and prompt studio share the dashboard palette. */
.theme-bank-grid,.studio-result-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:24px;margin:24px 0}
.theme-bank-grid>.panel{margin:0;min-width:0}
/* The bank holds dozens of themes: compact cards, four or more per row on desktop. */
.theme-bank-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,200px),1fr));gap:16px}
.theme-bank-grid>.panel{padding:14px;gap:8px;border-radius:14px}
.theme-bank-grid .theme-image{height:190px;border-radius:10px}
.theme-bank-grid h3{font-size:15px;margin:0;overflow-wrap:anywhere}
.theme-bank-grid .row{gap:6px;flex-wrap:wrap;align-items:center}
.theme-bank-grid p{margin:0;font-size:13px}
.theme-bank-grid button{padding:6px 10px;font-size:12.5px;min-height:32px}
.theme-image{display:block;width:100%;height:230px;object-fit:contain;background:var(--surface-sunken);border-radius:12px}
.preview-editor{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr));gap:18px;margin:18px 0}
.preview-tile{padding:12px;border:1px solid var(--line);border-radius:14px;min-width:0;display:flex;flex-direction:column;gap:12px}
.preview-tile .theme-image{height:180px}
.studio-reference-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .studio-reference-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .studio-reference-grid { grid-template-columns: minmax(0, 1fr); } }
.studio-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 24px 32px; align-items: start; }
.studio-form-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.studio-form-col > * { margin-block: 0; }
.studio-form-col .studio-reference-grid { margin: 0; }
.studio-history { display: grid; gap: 22px; }
.studio-run.panel { margin: 0; min-width: 0; }
.studio-run-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; list-style: none; min-height: 48px; }
.studio-run-summary::-webkit-details-marker { display: none; }
.studio-run-summary > span:first-child { min-width: 0; }
.studio-run-title { display: block; font-size: 17px; overflow-wrap: anywhere; }
.studio-run-meta { display: block; margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.studio-run-toggle { display: inline-flex; align-items: center; flex-shrink: 0; gap: 9px; color: var(--accent-ink); font-size: 13px; font-weight: 700; }
.studio-run-chevron { display: inline-block; font-size: 26px; line-height: 1; }
.studio-run-close-label, .studio-run[open] > summary .studio-run-open-label { display: none; }
.studio-run[open] > summary .studio-run-close-label { display: inline; }
.studio-run[open] > summary .studio-run-chevron { transform: rotate(90deg); }
.studio-run-summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 7px; border-radius: 4px; }
.studio-run-body { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.preview-tile button{font-size:12px;padding:9px 11px}
.studio-warning{padding:12px 16px;border-left:3px solid #8a63bc;background:var(--tint);font-size:13px;line-height:1.65}
.studio-count{font-weight:700;color:var(--accent-ink)}
.studio-result{border:1px solid var(--line);border-radius:16px;padding:18px;display:flex;flex-direction:column;gap:14px;min-width:0}
.studio-comparison{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.studio-comparison figure{margin:0;min-width:0}
.studio-comparison img{width:100%;height:auto;aspect-ratio:9/16;object-fit:contain;background:var(--surface-sunken);border-radius:10px}
.kiosk-color-preview{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:24px;padding:24px;border-radius:16px}
.kiosk-color-button{padding:14px 20px;border-radius:30px;font-weight:650}
input[type=color]{width:100%;min-height:48px;padding:6px;cursor:pointer}
.studio-comparison figcaption{font-size:12px;text-align:center;margin-top:8px;color:var(--muted)}
.studio-prompt{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:13px;max-height:260px;overflow:auto;background:var(--surface-raised);padding:16px}
/* Product references keep their own spacing and never act as kiosk backgrounds. */
.product-reference-panel { padding: 24px; margin-block: 20px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface-raised); }
.product-reference-panel > * + * { margin-top: 16px; }
.product-editor .theme-image { object-fit: contain; background: var(--surface-sunken); }
.provider-tag { color: var(--accent-ink); font-weight: 650; }
.provider-balance { font-size: 2.6rem; font-weight: 750; color: var(--accent-ink); font-variant-numeric: tabular-nums; margin-block: 20px 4px; }
.provider-monitor { margin-top: 28px; }
.system-content .cards { grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); }
.system-content .cards > * { min-width:0; overflow-wrap:anywhere; }
.system-content .integration-card button { max-width:100%; white-space:normal; }
.provider-readiness { margin-block: 12px; }
@media(max-width:600px) { .product-reference-panel { padding:16px; } }
/* Admin curation uses normal readable controls, independent of the marketing deck. */
.bank-curation-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 20px; margin-top: 20px; }
.bank-curation-item { padding: 12px; border: 1px solid var(--border,#705588); border-radius: 14px; }
.bank-curation-item .theme-image { width: 100%; height: 180px; object-fit: contain; border-radius: 9px; background: var(--paper); }
.bank-curation-item:has(input:checked) { background: var(--tint-strong); border-color: var(--purple); }
.bank-curation-item[hidden] { display: none; }
.bank-curation-item label { margin-top: 10px; min-height: 44px; }
.bank-curation-unavailable { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
html:has(dialog.photo-wall-viewer[open]),
body:has(dialog.photo-wall-viewer[open]) {
  overflow: hidden;
  overscroll-behavior: none;
}
:root dialog.photo-wall-viewer {
  position: fixed; inset: 0; width: 100vw; height: 100dvh;
  max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; border-radius: 0; overflow: hidden; background: #e3e5e8;
}
.photo-wall-viewer iframe { display: block; border: 0; width: 100%; height: 100%; }
