/* The single-backdrop page: the backdrop fills the screen, with an info card,
   a settings drawer and a player dock floating over it. */
body.viewer { overflow: hidden; height: 100vh; height: 100svh; }
body.viewer .scrim { background: linear-gradient(180deg, rgba(6, 7, 12, .45) 0%, rgba(6, 7, 12, 0) 16%, rgba(6, 7, 12, 0) 60%, rgba(6, 7, 12, .5) 100%); }
body.viewer.bare .nav, body.viewer.bare .info, body.viewer.bare .settings { opacity: 0; pointer-events: none; }
body.viewer.bare .dock { opacity: .0; }
body.viewer.bare .dock:hover, body.viewer.bare .dock:focus-within { opacity: 1; }
.nav, .info, .settings, .dock { transition: opacity .45s var(--ease), transform .45s var(--ease); }

.info {
  position: fixed; left: max(12px, env(safe-area-inset-left)); bottom: 92px; z-index: 10;
  width: min(430px, calc(100vw - 24px)); padding: 22px 22px 18px;
}
.info h1 { font-size: clamp(30px, 3.4vw, 42px); margin-top: 8px; padding-right: 40px; }
.info .tagline { color: rgba(240, 238, 250, .82); margin-top: 6px; font-size: 16px; }
.info .desc { color: var(--muted); margin-top: 12px; font-size: 14.5px; }
.info .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.info .fine { color: var(--faint); font-size: 12.5px; margin-top: 12px; }
.info .fine a { color: var(--muted); }
.info .credit { color: var(--faint); font-size: 12px; margin-top: 8px; }
.info .credit a { color: var(--muted); }
.info .collapse { position: absolute; top: 14px; right: 14px; }
.info.min { transform: translateY(calc(100% - 64px)); }
.info.min .collapse svg { transform: rotate(45deg); }
@media (max-width: 700px) {
  .info { bottom: 84px; padding: 18px; max-height: 55vh; overflow: auto; }
  .info .desc { display: none; }
}

.settings {
  position: fixed; right: max(12px, env(safe-area-inset-right)); top: 76px; bottom: 92px; z-index: 11;
  width: min(340px, calc(100vw - 24px)); padding: 18px 20px; overflow: auto;
}
.settings-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.settings h2 { font-size: 20px; letter-spacing: -.02em; }
input[type=range] { accent-color: var(--accent); }

.dock {
  position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 12;
  display: flex; align-items: center; gap: 6px; padding: 7px; border-radius: 18px; max-width: calc(100vw - 16px);
}
/* the time-of-day slider in the settings drawer */
.day-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.day-row input[type=range] { flex: 1; margin-top: 0; }
.day-icon { width: 20px; height: 20px; color: var(--accent); display: grid; place-items: center; flex: none; }
.day-icon svg { width: 18px; height: 18px; }
.day-row output { width: 42px; text-align: right; }
.chip.small { height: 28px; padding: 0 10px; font-size: 12.5px; }
#basics .ctl:last-child { border-bottom: 1px solid var(--line); }

#downloads { width: min(780px, calc(100vw - 32px)); max-width: min(780px, calc(100vw - 32px)); max-height: calc(100svh - 32px); overflow: auto; }

/* Your shape and size: preview on the left, choices on the right (stacked on phones). */
.maker { display: grid; grid-template-columns: 300px 1fr; gap: 18px; margin-top: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .maker { grid-template-columns: 1fr; } }
.mk-preview { display: grid; place-items: center; align-content: center; align-self: start; gap: 8px; min-height: 220px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); padding: 10px; }
.mk-preview canvas { max-width: 100%; max-height: 300px; border-radius: 6px; box-shadow: 0 8px 30px -10px rgba(0, 0, 0, .7); }
.mk-preview span { font: 500 12.5px/1.3 var(--mono); color: var(--muted); text-align: center; }
.mk-shapes { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-controls .chip[aria-checked="true"] { background: color-mix(in srgb, var(--accent) 24%, transparent); border-color: color-mix(in srgb, var(--accent) 65%, transparent); color: var(--ink); }
.mk-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 12px; color: var(--muted); font-size: 14px; }
.mk-row select, .mk-row input { height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .06); color: var(--ink); border: 1px solid var(--line); padding: 0 8px; font: inherit; }
.mk-row input { width: 84px; font-family: var(--mono); font-size: 13px; }
.mk-status { font-size: 13.5px; color: var(--muted); }
#mk-progress { width: 100%; height: 6px; margin-top: 10px; accent-color: var(--accent); }
.mk-done { color: var(--ink); font-size: 14px; margin-top: 8px; }
.mk-done a, #mk-result a { color: var(--accent); }

.dl-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dl-list { display: grid; gap: 8px; margin-top: 16px; }
.dl-group { font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-top: 10px; }
.dl {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; text-decoration: none;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line); transition: background .2s, border-color .2s;
}
.dl:hover { background: rgba(255, 255, 255, .09); border-color: var(--line-strong); }
.dl svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.dl .what { flex: 1; }
.dl .what b { display: block; font-weight: 580; }
.dl .what span { color: var(--muted); font-size: 13px; }
.dl .size { font: 500 12.5px/1 var(--mono); color: var(--faint); }

/* The open dropdown list is drawn by the browser (usually white), so its
   options need dark text or they're invisible until hovered. */
select option, select optgroup { color: #000; background: #fff; }
