/* =============================================================
   TOKENBURNERS BIOPIC GENERATOR
   ============================================================= */

@font-face {
  font-family: 'Tektur';
  src: url('assets/fonts/Tektur.ttf') format('truetype-variations');
  font-weight: 400 900;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/InterVariable.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/InterVariable-Italic.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/JetBrainsMono.ttf') format('truetype-variations');
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --black:  #0B0B0B;
  --ink:    #050505;
  --soot:   #141414;
  --smoke:  #1C1C1C;
  --ash:    #2A2A2A;
  --fog:    #3D3D3D;
  --steel:  #6B6B6B;
  --pearl:  #B8B8B8;
  --bone:   #E8E8E8;
  --white:  #FFFFFF;
  --lime:   #03FF00;
  --cyan:   #00E5FF;

  --font-d: 'Tektur', system-ui, sans-serif;
  --font-s: 'Inter', system-ui, sans-serif;
  --font-m: 'JetBrains Mono', ui-monospace, monospace;

  --glow:   0 0 20px rgba(3,255,0,0.4);
  --t:      140ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
  overflow-y: hidden;
  overflow-x: auto;
}

body {
  height: 100%;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-s);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow-y: hidden;
  overflow-x: auto;
}

/* grid pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
  z-index: 0;
}

/* ── App shell ── */
.app {
  position: relative;
  z-index: 1;
  height: 100%;
  min-width: 700px;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.header {
  flex-shrink: 0;
  height: 44px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ash);
}
.hd-left {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-m);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hd-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 6px var(--lime);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
@keyframes border-pulse {
  0%,100% { border-color: var(--fog); box-shadow: none; }
  50%      { border-color: var(--lime); box-shadow: 0 0 14px rgba(3,255,0,0.25); }
}
.hd-brand { color: var(--bone); }
.hd-brand .sl { color: var(--lime); }
.hd-label { color: var(--steel); }
.hd-right {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
}
.hd-right .sl { color: var(--lime); }

/* ── Main layout ── */
main {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 256px 1fr;
  gap: 0;
}

/* ── Sidebar ── */
.sidebar {
  border-right: 1px solid var(--ash);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Intro block: fixed height, no scroll */
.sidebar-intro {
  flex-shrink: 0;
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-bottom: 1px solid var(--ash);
}

/* Scroll-fade at the bottom of the logo list */
.sidebar-chooser-head {
  position: relative;
}
.sidebar-chooser-head::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: linear-gradient(to bottom, transparent, var(--black));
  pointer-events: none;
  z-index: 1;
}

/* Chooser block: fills remaining space, logo list scrolls */
.sidebar-chooser {
  flex: 1 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 20px 0;
}
.sidebar-chooser-head {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-ring {
  flex-shrink: 0;
  padding: 12px 0 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Upload zone ── */
.upload-zone {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border: 1px dashed var(--fog);
  border-radius: 4px;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--t), background var(--t);
  flex-shrink: 0;
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--lime);
  background: rgba(3,255,0,0.025);
}
.upload-zone.has-photo {
  border-style: solid;
  border-color: var(--ash);
}
.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.upload-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.upload-ph svg { color: var(--fog); }
.upload-ph span {
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  text-align: center;
  line-height: 1.6;
}
.upload-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.upload-zone.has-photo .upload-img { display: block; }
.upload-zone.has-photo .upload-ph { display: none; }
.upload-swap {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 6px;
  background: rgba(5,5,5,0.88);
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  text-align: center;
  opacity: 0;
  transition: opacity var(--t);
}
.upload-zone.has-photo:hover .upload-swap { opacity: 1; }

/* ── Section heading ── */
.s-head {
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.s-head::before { content: "//"; color: var(--lime); font-weight: 700; }

/* ── Option pills ── */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pill {
  padding: 5px 11px;
  border: 1px solid var(--ash);
  border-radius: 3px;
  background: transparent;
  color: var(--steel);
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--t), color var(--t), background var(--t);
  white-space: nowrap;
}
.pill:hover { border-color: var(--fog); color: var(--pearl); }
.pill.on {
  border-color: var(--lime);
  color: var(--lime);
  background: rgba(3,255,0,0.06);
}

/* ── Logo list ── */
.logo-list {
  flex: 1;
  min-height: 170px;
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--ash) transparent;
}
.logo-list::-webkit-scrollbar { display: block; width: 3px; }
.logo-list::-webkit-scrollbar-track { background: transparent; }
.logo-list::-webkit-scrollbar-thumb { background: var(--ash); border-radius: 2px; }
.logo-list::-webkit-scrollbar-thumb:hover { background: var(--fog); }
.logo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background var(--t), border-color var(--t);
}
.logo-item:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--ash);
}
.logo-item.on {
  border-color: var(--lime);
  background: rgba(3,255,0,0.04);
}
.logo-thumb {
  width: 52px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(255,255,255,0.03);
  border-radius: 2px;
}
.logo-label {
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--steel);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.logo-item.on .logo-label { color: var(--lime); }

/* ── Sidebar download section ── */
.sidebar-foot {
  flex-shrink: 0;
  padding: 16px 20px;
  border-top: 1px solid var(--ash);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-dl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  background: var(--lime);
  color: var(--black);
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background var(--t), box-shadow var(--t);
}
.btn-dl:hover { background: #4DFF4D; box-shadow: var(--glow); }
.btn-dl:active { background: #00CC00; }
.btn-dl:disabled { opacity: 0.3; cursor: not-allowed; box-shadow: none; }
.btn-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  color: var(--steel);
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--ash);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color var(--t), color var(--t);
}
.btn-copy:hover { border-color: var(--fog); color: var(--pearl); }
.btn-copy:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Preview area ── */
.preview-area {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  gap: 0;
}
.canvas-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.canvas-actions {
  display: flex;
  gap: 8px;
}
.canvas-actions .btn-cam {
  width: auto;
  margin-top: 0;
  padding: 7px 16px;
}
.btn-change-photo { display: none; }
.btn-change-photo.visible { display: flex; }
.canvas-wrap {
  position: relative;
  width: min(calc(100vh - 200px), 420px);
  aspect-ratio: 1;
  flex-shrink: 0;
}
.canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 2px;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}
.canvas-drag-hint {
  text-align: center;
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
  display: none;
}
.canvas-drag-hint.visible { display: block; }

.canvas-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  pointer-events: auto;
  background: var(--black);
}

/* Upload zone inside the main canvas area */
.canvas-empty .upload-zone {
  width: 68%;
  aspect-ratio: 4 / 3;
  animation: border-pulse 2.4s ease-in-out infinite;
}
.canvas-empty .upload-zone:hover,
.canvas-empty .upload-zone.drag-over {
  animation: none;
}
.canvas-empty .btn-cam {
  width: 68%;
  margin-top: 0;
}

/* ── About block ── */
.about-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.about-logo {
  width: 100%;
  max-width: 160px;
  height: auto;
  display: block;
  opacity: 0.92;
}
.about-copy {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.about-copy p {
  font-family: var(--font-s);
  font-size: 12px;
  line-height: 1.65;
  color: var(--pearl);
}
.about-tag {
  font-family: var(--font-d);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--lime);
  margin-top: 4px;
  text-decoration: none;
  display: inline-block;
}
.about-tag:hover { color: #4DFF4D; }
.about-tag .sl { color: var(--lime); }


/* ── Upload error ── */
.upload-error {
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff4d4d;
  margin-top: 6px;
  line-height: 1.5;
  min-height: 0;
}

/* ── Camera button ── */
.btn-cam {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding: 7px 12px;
  background: transparent;
  color: var(--steel);
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--ash);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color var(--t), color var(--t);
}
.btn-cam:hover { border-color: var(--lime); color: var(--lime); }

/* ── Camera modal ── */
.cam-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5,5,5,0.88);
  align-items: center;
  justify-content: center;
}
.cam-modal.open { display: flex; }
.cam-inner {
  background: var(--soot);
  border: 1px solid var(--ash);
  border-radius: 4px;
  width: min(90vw, 480px);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}
.cam-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ash);
}
.cam-title {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
}
.cam-close {
  background: transparent;
  border: none;
  color: var(--steel);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 2px;
  transition: color var(--t);
}
.cam-close:hover { color: var(--white); }
.cam-preview-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: var(--ink);
  overflow: hidden;
}
.cam-preview-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cam-preview-wrap video.cam-mirrored {
  transform: scaleX(-1);
  will-change: transform;
}
.cam-flip {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(5,5,5,0.72);
  border: 1px solid var(--ash);
  border-radius: 3px;
  color: var(--pearl);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  transition: border-color var(--t), color var(--t);
}
.cam-flip:hover { border-color: var(--lime); color: var(--lime); }
.cam-capture {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px;
  padding: 11px 16px;
  background: var(--lime);
  color: var(--black);
  font-family: var(--font-d);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background var(--t), box-shadow var(--t);
}
.cam-capture:hover { background: #4DFF4D; box-shadow: var(--glow); }
.cam-capture:active { background: #00CC00; }

/* ── Slider with min/max labels ── */
.slider-range-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.slider-range-wrap .tb-range { flex: 1; }
.range-label {
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--fog);
  flex-shrink: 0;
}

/* ── Slider row ── */
.s-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.s-val {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
}
.tb-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: var(--ash);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.tb-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--lime);
  cursor: pointer;
  box-shadow: 0 0 6px var(--lime);
}
.tb-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--lime);
  border: none;
  cursor: pointer;
  box-shadow: 0 0 6px var(--lime);
}

/* ── Zoom control ── */
.zoom-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-left: 20px;
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t);
}
.zoom-control.visible {
  opacity: 1;
  pointer-events: auto;
}
.zoom-label {
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
}
.zoom-track-wrap {
  position: relative;
  width: 20px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.zoom-range {
  position: absolute;
  -webkit-appearance: none;
  appearance: none;
  width: 200px;
  height: 2px;
  background: var(--ash);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  transform: rotate(-90deg);
  transform-origin: center;
}
.zoom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--lime);
  cursor: pointer;
  box-shadow: 0 0 6px var(--lime);
}
.zoom-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--lime);
  border: none;
  cursor: pointer;
  box-shadow: 0 0 6px var(--lime);
}
.zoom-val {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--lime);
}

/* ── Footer ── */
footer {
  flex-shrink: 0;
  height: 36px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--ash);
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
}
footer .sl { color: var(--lime); }
.footer-left { display: flex; align-items: center; gap: 10px; }
.footer-sep  { color: var(--lime); }
.footer-brand {
  color: var(--steel);
  text-decoration: none;
  transition: color var(--t);
}
.footer-brand:hover { color: var(--bone); }
.footer-brand .sl { color: var(--lime); }
.footer-link {
  background: transparent;
  border: none;
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
  cursor: pointer;
  padding: 0;
  transition: color var(--t);
}
.footer-link:hover { color: var(--bone); }

/* ── Privacy Policy modal ── */
.pp-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5,5,5,0.88);
  align-items: center;
  justify-content: center;
}
.pp-modal.open { display: flex; }
.pp-inner {
  background: var(--soot);
  border: 1px solid var(--ash);
  border-radius: 4px;
  width: min(90vw, 420px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pp-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pp-body p {
  font-family: var(--font-s);
  font-size: 13px;
  line-height: 1.7;
  color: var(--pearl);
}

/* ── Privacy bar ── */
.privacy-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 24px;
  background: rgba(3,255,0,0.05);
  border-bottom: 1px solid rgba(3,255,0,0.18);
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--steel);
  text-transform: uppercase;
}
.privacy-ok {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--fog);
  color: var(--steel);
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
  cursor: pointer;
  transition: border-color var(--t), color var(--t);
}
.privacy-ok:hover { border-color: var(--lime); color: var(--lime); }

/* ── Mobile ── */
@media (max-width: 680px) {
  /* unlock fixed-viewport layout → page scrolls */
  html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .app {
    height: auto;
    min-height: 100dvh;
    min-width: 0;
  }

  main {
    display: flex;
    flex-direction: column;
    overflow: visible;
    height: auto;
  }

  /* sidebar: unwrap so children become direct flex items of main */
  .sidebar { display: contents; }

  /* mobile order: about → upload → logo chooser → download */
  .sidebar-intro   { order: 1; padding: 14px 16px; border-bottom: 1px solid var(--ash); }
  .preview-area    { order: 2; }
  .sidebar-chooser { order: 3; flex: none; padding: 12px 16px 8px; border-top: 1px solid var(--ash); }
  .sidebar-foot    { order: 4; }

  /* hide scroll-fade on mobile */
  .sidebar-chooser-head::after { display: none; }

  /* logo list: horizontal swipe carousel on mobile */
  .logo-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    flex: none;
    max-height: none;
    gap: 6px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .logo-list::-webkit-scrollbar { display: none; }
  .logo-item {
    flex-direction: column;
    flex-shrink: 0;
    width: 72px;
    align-items: center;
    padding: 6px;
    gap: 5px;
  }
  .logo-thumb { width: 56px; height: 36px; }
  .logo-label { font-size: 9px; text-align: center; }

  /* upload canvas area */
  .preview-area {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 12px;
    overflow: visible;
  }

  .canvas-wrap {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    flex-shrink: 0;
  }

  .canvas-drag-hint { font-size: 9px; }

  /* zoom: horizontal bar below canvas */
  .zoom-control {
    flex-direction: row;
    align-items: center;
    padding-left: 0;
    gap: 8px;
    width: calc(100vw - 32px);
    flex-shrink: 0;
  }
  .zoom-track-wrap {
    flex: 1;
    width: auto;
    height: 20px;
    display: flex;
    align-items: center;
  }
  .zoom-range {
    position: static;
    width: 100%;
    height: 2px;
    transform: none;
  }
  .zoom-val { flex-shrink: 0; }


  /* canvas action buttons: stack vertically on mobile */
  .canvas-actions { flex-direction: column; width: calc(100vw - 32px); }
  .canvas-actions .btn-cam { width: 100%; }

  /* download buttons: fixed bottom strip */
  .sidebar-foot {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: var(--soot);
    flex-direction: row;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    gap: 8px;
    border-top: 1px solid var(--ash);
  }
  .btn-dl   { flex: 1; padding: 9px 8px; font-size: 11px; }
  .btn-copy { flex: 0 0 auto; }

  /* space so fixed bar doesn't overlap last content */
  .sidebar-chooser { padding-bottom: 80px; }

  /* header: hide dimension label */
  .hd-right { display: none; }

  /* privacy bar: tighter padding */
  .privacy-bar { padding: 7px 16px; gap: 10px; }
}
