:root {
  color-scheme: dark;
  --bg: #07090d;
  --bg2: #0b1018;
  --panel: rgba(22, 25, 31, .92);
  --panel2: rgba(14, 16, 21, .96);
  --line: rgba(255,255,255,.11);
  --line2: rgba(120, 255, 220, .35);
  --text: #f2f6ff;
  --muted: #9fb0c8;
  --dim: #627189;
  --green: #77ffda;
  --green2: #00ff88;
  --blue: #8cb6ff;
  --purple: #b7a0ff;
  --danger: #ff6d7c;
  --amber: #f5cf79;
  --shadow: 0 24px 70px rgba(0,0,0,.42);
  --radius: 22px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 16% 0%, rgba(119, 255, 218, .16), transparent 34rem),
    radial-gradient(circle at 88% 6%, rgba(140, 182, 255, .15), transparent 34rem),
    linear-gradient(180deg, #090c13 0%, #06080c 100%);
  color: var(--text);
}

button, input, select {
  font: inherit;
}

.shell {
  min-height: 100vh;
  padding-bottom: 36px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 12px 18px;
  background: rgba(9, 11, 15, .84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 210px;
}

.logo-dot {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: conic-gradient(from 220deg, var(--green), var(--blue), var(--purple), var(--green));
  box-shadow: 0 0 24px rgba(119, 255, 218, .4);
}

.brand strong {
  display: block;
  font-size: 18px;
  letter-spacing: -.02em;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 1px;
}

.transport {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn, .pill {
  appearance: none;
  border: 1px solid rgba(255,255,255,.12);
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.06));
  border-radius: 999px;
  padding: 10px 15px;
  cursor: pointer;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
  transition: transform .15s ease, border-color .15s ease, filter .15s ease, background .15s ease;
  white-space: nowrap;
}

.btn:hover, .pill:hover {
  transform: translateY(-1px);
  border-color: rgba(119,255,218,.5);
}

.btn:disabled, .pill:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.btn.primary {
  color: #06110f;
  background: linear-gradient(135deg, var(--green), var(--blue));
  border-color: transparent;
}

.btn.white {
  color: #0b0d12;
  background: #f7fbff;
  border-color: transparent;
}

.btn.danger {
  color: #fff;
  background: linear-gradient(135deg, rgba(255,109,124,.95), rgba(145,32,52,.95));
  border-color: rgba(255,109,124,.35);
}

.btn.glow {
  border-color: rgba(119,255,218,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 28px rgba(119,255,218,.08);
}

.btn.toggle[aria-pressed="true"] {
  color: #071310;
  background: linear-gradient(135deg, #f5cf79, #77ffda);
}

.btn.full, .file-label.full { width: 100%; text-align: center; }

select, input[type="text"], input[type="number"] {
  min-height: 38px;
  color: var(--text);
  background: rgba(8, 12, 18, .72);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 8px 10px;
  outline: none;
}

select:focus, input:focus {
  border-color: rgba(119,255,218,.58);
  box-shadow: 0 0 0 3px rgba(119,255,218,.08);
}

.check, .pill-check, .power {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 750;
  user-select: none;
}

.check input, .pill-check input, .power input {
  accent-color: var(--green);
}

.pill-check, .power {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  border-radius: 999px;
  padding: 8px 11px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: center;
  width: min(1380px, calc(100% - 44px));
  margin: 38px auto 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 950;
}

.hero h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(38px, 6vw, 84px);
  letter-spacing: -.07em;
  line-height: .86;
}

.lede {
  max-width: 820px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.hero-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  padding: 22px;
  box-shadow: var(--shadow);
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 18px var(--green);
  margin-right: 8px;
}

.hero-card strong { display: inline-block; margin-bottom: 8px; }
.hero-card p { color: var(--muted); margin: 0; line-height: 1.45; }

.workspace {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(440px, 1fr) minmax(330px, 430px);
  gap: 18px;
  width: min(1540px, calc(100% - 44px));
  margin: 0 auto;
  align-items: start;
}

.left-rail, .right-rail, .center-panel {
  min-width: 0;
}

.module, .center-panel, .wave-card, .quality-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025)), var(--panel2);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.module {
  margin-bottom: 14px;
}

.module summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 17px;
  font-weight: 950;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  border-bottom: 1px solid transparent;
}

.module[open] summary {
  border-bottom-color: var(--line);
}

.module summary::after {
  content: "▾";
  color: var(--green);
  transition: transform .2s ease;
}

.module:not([open]) summary::after {
  transform: rotate(-90deg);
}

.module-body {
  padding: 16px;
}

.stacked { display: grid; gap: 10px; }

.schema-link {
  color: var(--green);
  text-decoration: none;
  text-align: center;
  font-weight: 800;
}

.drop-zone, .batch-drop {
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px dashed rgba(255,255,255,.28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 10%, rgba(119,255,218,.11), transparent 9rem),
    rgba(0,0,0,.16);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  padding: 18px;
}

.drop-zone.drag, .batch-drop.drag {
  border-color: var(--green);
  background: rgba(119,255,218,.08);
}

.drop-zone input { display: none; }

.upload-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255,255,255,.08);
  color: var(--green);
  font-size: 27px;
  margin-bottom: 10px;
}

.drop-zone small {
  color: var(--muted);
  margin-top: 6px;
}

.file-card {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
}

.file-card h2 {
  margin: 0 0 4px;
  font-size: 21px;
  letter-spacing: -.03em;
  word-break: break-word;
}

.file-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.mini-grid, .meter-readouts, .stat-grid {
  display: grid;
  gap: 10px;
}

.mini-grid {
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
}

.mini-grid > div, .meter-readouts > div, .stat {
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  padding: 13px 14px;
}

.mini-grid span, .meter-readouts span, .stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.mini-grid strong, .meter-readouts strong, .stat strong {
  font-size: 20px;
  letter-spacing: -.03em;
}

.vu, .wave, .eq-curve {
  display: block;
  width: 100%;
  background: #080a0f;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
}

.vu { aspect-ratio: 560 / 300; height: auto; }

.meter-readouts {
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
}

.analysis-report {
  color: var(--muted);
  line-height: 1.55;
}

.analysis-report strong { color: var(--text); }
.analysis-report em { color: var(--green); font-style: normal; font-weight: 900; }

.center-panel {
  padding: 16px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.tab {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 15px;
  cursor: pointer;
  font-weight: 900;
}

.tab.active {
  color: #06110f;
  background: linear-gradient(135deg, var(--green), var(--blue));
  border-color: transparent;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.stat-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 14px;
}

.wave-grid {
  display: grid;
  gap: 14px;
}

.wave-card {
  padding: 16px;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pill {
  padding: 8px 14px;
}

.wave {
  height: 238px;
}

.quality-grid {
  display: grid;
  gap: 14px;
}

.quality-card {
  padding: 18px;
}

.quality-card h3 {
  margin: 0 0 10px;
  letter-spacing: -.03em;
}

.progress-wrap {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width .18s ease;
}

#renderLog {
  margin: 0;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  color: #c6d3e9;
  background: rgba(0,0,0,.24);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 14px;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid label {
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.form-grid .wide { grid-column: 1 / -1; }

.control {
  display: grid;
  grid-template-columns: minmax(108px, 1fr) 94px;
  gap: 10px;
  align-items: center;
  margin-bottom: 11px;
}

.control label {
  color: var(--muted);
  font-weight: 750;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.control output {
  color: var(--text);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.control input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--green);
  cursor: pointer;
}

.control.mini {
  grid-template-columns: 1fr 72px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  margin-bottom: 8px;
}

.eq-curve {
  aspect-ratio: 760 / 240;
  margin-bottom: 12px;
}

.eq-bands {
  display: grid;
  gap: 10px;
}

.eq-band {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.035);
  border-radius: 14px;
  padding: 10px;
}

.eq-band-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-weight: 900;
  margin-bottom: 8px;
}

.eq-band-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.eq-band-grid .control {
  margin: 0;
  grid-template-columns: 1fr;
}

.eq-band-grid .control label {
  font-size: 12px;
}

.switch-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.hint {
  color: var(--dim);
  font-size: 12px;
}

.batch-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.inline-field {
  color: var(--muted);
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-weight: 800;
}

.inline-field input {
  width: 84px;
}

.batch-drop {
  min-height: 82px;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 900;
}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(0,0,0,.18);
}

.batch-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

.batch-table th, .batch-table td {
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding: 10px;
  color: var(--muted);
  text-align: left;
  vertical-align: middle;
}

.batch-table th {
  color: var(--text);
  background: rgba(255,255,255,.06);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.batch-table tr:hover td {
  background: rgba(119,255,218,.035);
}

.batch-table input, .batch-table select {
  width: 100%;
  min-height: 32px;
  padding: 5px 7px;
  border-radius: 9px;
}

.toasts {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 10px;
  z-index: 50;
}

.toast {
  max-width: 360px;
  background: rgba(16,20,26,.95);
  color: var(--text);
  border: 1px solid rgba(119,255,218,.28);
  border-radius: 16px;
  padding: 13px 15px;
  box-shadow: var(--shadow);
  animation: toastIn .24s ease both;
}

@keyframes toastIn {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 1260px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .right-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
  .right-rail .module { margin-bottom: 0; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 780px) {
  .topbar { position: static; }
  .transport { justify-content: flex-start; }
  .hero, .workspace { width: min(100% - 24px, 1540px); }
  .right-rail { grid-template-columns: 1fr; }
  .hero h1 { font-size: 46px; }
  .stat-grid, .meter-readouts { grid-template-columns: 1fr; }
  .eq-band-grid { grid-template-columns: 1fr; }
}


/* Rack UX pass ------------------------------------------------------------ */
.hero {
  margin-top: 24px;
  margin-bottom: 18px;
}
.hero h1 {
  max-width: 980px;
}
.production-rack {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 104px);
  overflow: auto;
  padding-right: 4px;
}
.rack-header {
  display: grid;
  gap: 2px;
  margin: 0 0 12px;
  padding: 14px 16px;
  border: 1px solid rgba(119,255,218,.26);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(119,255,218,.15), rgba(140,182,255,.08)),
    rgba(8, 11, 16, .82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 16px 40px rgba(0,0,0,.22);
}
.rack-header span {
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 11px;
  font-weight: 950;
}
.rack-header strong {
  font-size: 22px;
  letter-spacing: -.04em;
}
.rack-module {
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.025)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 34px),
    rgba(14, 16, 21, .98);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 18px 50px rgba(0,0,0,.32);
}
.rack-module summary {
  display: grid;
  grid-template-columns: minmax(126px, 1fr) minmax(116px, auto);
  gap: 8px 12px;
  align-items: center;
  padding: 13px 15px;
}
.rack-module summary::after {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}
.rack-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.rack-title b {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 24px;
  border-radius: 9px;
  color: #06110f;
  background: linear-gradient(135deg, var(--green), var(--blue));
  font-size: 12px;
  letter-spacing: -.02em;
}
.rack-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rack-state {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  padding-right: 24px;
  text-align: right;
  white-space: nowrap;
}
.rack-mini {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 62px minmax(120px, 1fr) 76px;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 13px;
  background: rgba(0,0,0,.18);
  cursor: default;
}
.rack-mini span {
  color: var(--dim);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.rack-mini input {
  width: 100%;
  accent-color: var(--green);
}
.rack-mini output {
  color: var(--text);
  font-size: 12px;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.rack-module .module-body {
  padding-top: 14px;
  background:
    linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.0));
}
.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--muted);
  font-weight: 850;
  margin-bottom: 8px;
}
.progress-head strong {
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.progress-bar {
  position: relative;
  overflow: hidden;
}
.progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: translateX(-100%);
  animation: progressSweep 1.5s linear infinite;
}
@keyframes progressSweep {
  to { transform: translateX(100%); }
}
.memory-stat {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 10px 0 0;
}
.status-cell {
  min-width: 230px;
}
.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.status-line span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-line strong {
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.row-progress {
  height: 6px;
  margin-top: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
}
.row-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width .18s ease;
}
.batch-table tr.active-row td {
  background: rgba(119,255,218,.06);
}
.control output, .meter-readouts strong, .stat strong {
  font-variant-numeric: tabular-nums;
}

@media (min-width: 1261px) {
  .workspace {
    grid-template-columns: minmax(260px, 300px) minmax(520px, 1fr) minmax(380px, 430px);
  }
  .center-panel {
    min-height: 620px;
  }
}

@media (max-width: 1260px) {
  .production-rack {
    position: static;
    max-height: none;
  }
  .rack-header {
    grid-column: 1 / -1;
  }
}



/* Official/legal/footer and paid export UI */
.site-footer {
  width: min(1380px, calc(100% - 2rem));
  margin: 28px auto 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  color: var(--muted);
  text-align: center;
}
.footer-brand {
  margin: 0 0 12px;
  color: var(--text);
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 18px;
}
.site-footer a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }
.footer-fineprint {
  max-width: 780px;
  margin: 14px auto 0;
  line-height: 1.55;
}

.payment-modal[hidden],
.delivery-panel[hidden] {
  display: none;
}
.payment-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.payment-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 12, 0.72);
  backdrop-filter: blur(10px);
}
.payment-card {
  position: relative;
  width: min(540px, 100%);
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(115,251,211,.16), transparent 22rem),
    linear-gradient(180deg, rgba(18,23,34,.98), rgba(12,16,24,.98));
  color: var(--text);
  box-shadow: 0 34px 120px rgba(0,0,0,.58);
}
.payment-card h2 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: .95;
  letter-spacing: -.06em;
}
.payment-copy,
.payment-fineprint {
  color: var(--muted);
  line-height: 1.6;
}
.payment-fineprint {
  font-size: .9rem;
  margin-bottom: 0;
}
.payment-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line);
  font-size: 1.5rem;
}
.payment-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 16px;
  padding: 16px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0,0,0,.18);
}
.payment-summary span { color: var(--muted); }
.payment-summary strong { text-align: right; overflow-wrap: anywhere; }
.payment-method { width: 100%; margin-top: 4px; }
.paypal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted);
  font-size: .9rem;
}
.paypal-divider::before,
.paypal-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}
.paypal-buttons { min-height: 48px; }
.status.error, .payment-card .status.error { color: var(--danger); }
.status.success, .payment-card .status.success { color: var(--accent); }

.delivery-panel {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 90;
  width: min(760px, calc(100% - 28px));
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid rgba(115,251,211,.30);
  border-radius: 20px;
  background: rgba(13,18,27,.96);
  box-shadow: 0 28px 90px rgba(0,0,0,.45);
}
.delivery-panel strong { display: block; color: var(--text); margin-bottom: 4px; }
.delivery-panel p { margin: 0; color: var(--muted); line-height: 1.45; }
.delivery-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .82rem 1rem;
  border-radius: 999px;
  color: #061012;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 900;
  text-decoration: none;
  text-align: center;
}
.delivery-link:hover { text-decoration: none; }

@media (max-width: 720px) {
  .site-footer nav { gap: 10px; }
  .payment-card { padding: 22px; border-radius: 24px; }
  .payment-close { width: 44px; height: 44px; }
  .payment-method { min-height: 52px; }
  .paypal-buttons { min-height: 150px; }
  .delivery-panel { align-items: stretch; flex-direction: column; }
  .delivery-link { width: 100%; }
}


.confidence-list {
  margin: 8px 0 0 1.15rem;
  padding: 0;
  color: var(--muted);
}

.confidence-list li {
  margin: 4px 0;
}


/* Urgent Pro lock: clear playback state + clean payment iframe containment */
.play-state {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #071310;
  background: linear-gradient(135deg, var(--green), var(--amber));
  font-size: .68rem;
  letter-spacing: .12em;
  font-weight: 950;
  vertical-align: middle;
  box-shadow: 0 0 20px rgba(119,255,218,.18);
}
.play-state[hidden] { display: none; }
.wave-card.is-playing {
  border-color: rgba(119,255,218,.55);
  box-shadow: var(--shadow), 0 0 0 1px rgba(119,255,218,.14), 0 0 34px rgba(119,255,218,.08);
}
.wave-card.is-playing .card-title strong {
  color: var(--green);
}
.paypal-buttons {
  background: transparent !important;
  overflow: hidden;
  border-radius: 18px;
}
.paypal-buttons > div {
  background: transparent !important;
  max-width: 100% !important;
}
.paypal-buttons iframe {
  max-width: 100% !important;
  border-radius: 14px !important;
}
.payment-card {
  isolation: isolate;
}
.payment-card .paypal-buttons {
  margin-top: 8px;
}
@media (max-width: 720px) {
  .play-state { margin-left: 6px; font-size: .62rem; padding: 2px 7px; }
}


/* Patch: keep PayPal funding buttons visually contained without changing payment logic. */
.paypal-buttons {
  display: grid;
  gap: 10px;
  min-height: 48px;
  background: transparent !important;
  overflow: visible;
  border-radius: 18px;
}
.paypal-slot {
  display: block;
  min-height: 48px;
  line-height: 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0,0,0,.18);
}
.paypal-slot[hidden] { display: none !important; }
.paypal-slot > div {
  max-width: 100% !important;
  background: transparent !important;
}
.paypal-slot iframe {
  display: block !important;
  max-width: 100% !important;
  border-radius: 999px !important;
  background: transparent !important;
}
.payment-card .paypal-buttons {
  padding: 0;
  margin-top: 8px;
}


/* Patch: restore a clean PayPal/card checkout surface.
   The PayPal hosted card fields use white iframes; keep them rectangular and
   readable instead of clipping them into a huge pill/oval. */
.paypal-buttons {
  display: grid;
  gap: 10px;
  min-height: 48px;
  background: transparent !important;
  overflow: visible !important;
  border-radius: 0 !important;
}
.paypal-slot {
  display: block;
  min-height: 48px;
  line-height: normal;
  overflow: visible !important;
  border-radius: 14px !important;
  background: transparent !important;
}
.paypal-slot[hidden] { display: none !important; }
.paypal-slot > div {
  max-width: 100% !important;
  background: transparent !important;
  overflow: visible !important;
  border-radius: 14px !important;
}
.paypal-slot iframe {
  display: block !important;
  max-width: 100% !important;
  border-radius: 14px !important;
}
#paypalCardSlot {
  background: #fff !important;
  color: #111 !important;
  overflow: hidden !important;
  border-radius: 16px !important;
  padding: 0 !important;
}
#paypalCardSlot iframe {
  background: #fff !important;
  border-radius: 16px !important;
}
#paypalPayPalSlot,
#paypalPayLaterSlot {
  background: transparent !important;
  overflow: hidden !important;
  border-radius: 999px !important;
}
#paypalPayPalSlot iframe,
#paypalPayLaterSlot iframe {
  border-radius: 999px !important;
}
