/* DriveDeck Studio. Loaded after styles.css, which gives the colours, the type, the buttons and the deck
   (the launcher's 1024 x 600 screen). Phones first: the screen on top, the tools in a sheet under it.
   From 1000 px: tools left, screen in the middle, style and properties right. */

html, body.sd { height: 100%; }
body.sd { overflow: hidden; overscroll-behavior: none; }
.sd-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.sd-app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; min-width: 0; }

/* ---------- Top bar ---------- */
.sd-top {
  flex: none; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px;
  padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right));
  border-bottom: 1px solid var(--line); background: var(--night-2);
}
.sd-top .brand__word, .sd-top__tag { display: none; }
.sd-top__tag {
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-teal); color: var(--teal);
  font-size: var(--fs-label); font-weight: 500;
}
.sd-name { flex: 1 1 120px; min-width: 0; max-width: 340px; }
.sd-name input {
  width: 100%; min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid transparent; background: transparent;
  color: var(--ink); font: 500 1rem/1 var(--font); text-overflow: ellipsis;
}
.sd-name input:hover { border-color: var(--line); }
.sd-name input:focus { outline: none; border-color: var(--teal); background: rgba(0, 0, 0, .35); }
.sd-top__tools { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; }
.sd-saved { display: none; margin-right: 6px; font-size: var(--fs-label); color: var(--ink-3); white-space: nowrap; }
.sd-icon {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--ink);
  transition: border-color .2s, background-color .2s, opacity .2s;
}
.sd-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sd-icon:hover:not(:disabled) { border-color: var(--line-teal); background: rgba(140, 201, 190, .08); }
.sd-icon:disabled { opacity: .35; cursor: default; }
.sd-top [data-import], .sd-top [data-export] { display: none; }

/* ---------- Steps ---------- */
.sd-steps { flex: none; border-bottom: 1px solid var(--line); background: var(--night); }
.sd-steps ol { list-style: none; margin: 0; padding: 4px 6px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
.sd-steps button {
  width: 100%; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 4px 2px; border: 0; border-radius: 12px; cursor: pointer; background: transparent; color: var(--ink-3);
  font: 500 .6875rem/1 var(--font);
}
.sd-steps b {
  width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; border: 1px solid currentColor;
  font-size: .6875rem; font-weight: 500;
}
.sd-steps span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-steps button:hover { color: var(--ink); }
.sd-steps button[aria-current="step"] { color: var(--ink); background: rgba(240, 238, 233, .07); }
.sd-steps button[aria-current="step"] b { background: var(--teal); border-color: var(--teal); color: var(--on-teal); }

/* ---------- Main: the screen, then the sheet ---------- */
.sd-main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.sd-stage { flex: none; background: #060B0C; }
.sd-stage__fit { display: grid; place-items: center; }
.sd-frame { width: 100%; max-width: calc(44vh * 1024 / 600); margin: 0 auto; }
.sd .deck { border: 0; border-radius: 0; box-shadow: none; }
.sd-stagebar { display: flex; align-items: center; gap: 12px; padding: 6px 12px; min-height: 44px; }
.sd-hint { min-width: 0; font-size: var(--fs-label); line-height: 1.3; color: var(--ink-3); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.sd-seg-small button { min-height: 32px; padding: 0 10px; }
.sd-seg-small.seg--icons span { display: none; }

.sd-sheet { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; border-top: 1px solid var(--line); background: var(--night-2); border-radius: 18px 18px 0 0; }
.sd-sheettabs { position: sticky; top: 8px; z-index: 2; display: flex; margin: 8px 12px 0; background: #0B1415; box-shadow: 0 0 0 12px var(--night-2); }
.sd-sheettabs button { flex: 1; min-height: 36px; }
.sd-sheettabs button[aria-selected="true"] { background: var(--ink); color: var(--night); }
.sd-tools, .sd-props { padding: 16px 16px 24px; }
.sd-tools:focus { outline: none; }
.sd-app[data-sheet="tools"] .sd-props, .sd-app[data-sheet="style"] .sd-tools { display: none; }

/* ---------- Bottom bar ---------- */
.sd-foot {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 12px; padding-bottom: max(8px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--night-2);
}
.sd-foot__where { font-size: var(--fs-label); color: var(--ink-3); }
.sd-foot .pill { min-width: 96px; cursor: pointer; font-family: var(--font); }
.sd-foot .pill:disabled { opacity: .35; cursor: default; }
.sd .pill { cursor: pointer; }
.sd .pill:disabled { opacity: .4; cursor: default; }

/* ---------- Panel contents ---------- */
.sd-h { font-size: 1.375rem; font-weight: 300; line-height: 1.2; letter-spacing: -.01em; }
.sd-h2 { margin-top: 26px; margin-bottom: 10px; font-size: 1rem; font-weight: 500; line-height: 1.3; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sd-h2 small { font-size: var(--fs-label); font-weight: 400; color: var(--ink-3); }
.sd-props > .sd-h2:first-child, .sd-sel .sd-h2 { margin-top: 0; }
.sd-lead { margin-top: 6px; margin-bottom: 14px; font-size: var(--fs-small); line-height: 1.5; color: var(--ink-2); }
.sd-note { margin-top: 10px; font-size: var(--fs-label); line-height: 1.5; color: var(--ink-3); }
.sd-note:empty, .sd-status:empty { display: none; }
.sd-note--warn { color: #FFB3A7; }
.sd-gap { margin-top: 18px; }
.sd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; }
.sd-row--end { justify-content: flex-end; }

.sd-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sd-fields--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sd-field { display: grid; gap: 6px; min-width: 0; }
.sd-field > span { font-size: var(--fs-label); font-weight: 500; color: var(--ink-2); }
.sd-field input:not([type="range"]):not([type="color"]), .sd-field select {
  width: 100%; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(0, 0, 0, .4); color: var(--ink); font: 500 1rem/1 var(--font);
}
.sd-field select { appearance: none; -webkit-appearance: none; padding-right: 30px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23F0EEE9' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; }
.sd-field select option { background: #0F1A1B; color: #F0EEE9; }
.sd-field input:focus, .sd-field select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(140, 201, 190, .18); }
.sd-field input:disabled { opacity: .4; }
.sd-field--range { margin-top: 12px; grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
.sd-field--range input { width: 100%; min-height: 32px; accent-color: var(--teal); }
.sd-field--colour { margin-top: 12px; grid-template-columns: 1fr auto; align-items: center; }
.sd-field--colour input { width: 56px; height: 36px; padding: 2px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .4); cursor: pointer; }

.sd-seg-wide { display: flex; width: 100%; }
.sd-seg-wide button { flex: 1 1 0; min-width: 0; padding: 0 6px; }
.sd-swatches { gap: 10px; padding: 4px; }
.sd-swatches .swatch { width: 36px; height: 36px; }
.sd-search { display: block; width: 100%; margin: 14px 0 12px; }
.sd-towns { display: flex; flex-wrap: wrap; gap: 6px; }
.sd-towns .chip { min-height: 42px; padding: 3px 13px 3px 3px; }

/* Layouts to start from: a small drawing of each, made by studio.js from the same numbers the design uses */
.sd-templates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sd-tpl {
  display: grid; gap: 8px; padding: 8px 8px 10px; border-radius: 14px; cursor: pointer; text-align: left;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--ink-2); font: 500 .875rem/1.2 var(--font);
  transition: border-color .2s, background-color .2s, color .2s;
}
.sd-tpl:hover { border-color: rgba(240, 238, 233, .3); color: var(--ink); }
.sd-tpl[aria-checked="true"] { border-color: var(--teal); background: rgba(140, 201, 190, .1); color: var(--ink); }
.sd-tpl svg { width: 100%; height: auto; border-radius: 8px; background: linear-gradient(#27474A 0 65%, #1B2022 65%); }
.sd-tpl rect { fill: rgba(240, 238, 233, .82); }
.sd-tpl span { padding: 0 4px; }

.sd-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.sd-list:empty { display: none; }
.sd-list li {
  display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 6px 0 12px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
}
.sd-list li.is-sel { border-color: var(--teal); background: rgba(140, 201, 190, .1); }
.sd-list input[type="checkbox"] { width: 20px; height: 20px; flex: none; accent-color: var(--teal); cursor: pointer; }
.sd-list img { width: 32px; height: 32px; flex: none; object-fit: contain; border-radius: 6px; background: rgba(255, 255, 255, .08); }
.sd-list .sd-pick {
  flex: 1; min-width: 0; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer;
  font: 500 .9375rem/1.2 var(--font); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sd-list .sd-x { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--ink-2); cursor: pointer; }
.sd-list .sd-x:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.sd-list .sd-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.sd-summary { margin: 14px 0 18px; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: var(--fs-small); }
.sd-summary dt { color: var(--ink-3); }
.sd-summary dd { margin: 0; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.sd-build { display: grid; gap: 4px; }
.sd-build .pill { margin-top: 14px; font-family: var(--font); }
.sd-status { margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-teal); background: rgba(31, 94, 94, .28); font-size: var(--fs-small); line-height: 1.5; color: var(--ink); }
.sd-status.is-bad { border-color: rgba(229, 72, 58, .5); background: rgba(229, 72, 58, .12); }

/* The crop box for your own photo: 16:9, as the app shows it */
.sd-crop { margin-top: 14px; }
.sd-crop__view { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.sd-crop__view canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.sd-crop__view canvas:active { cursor: grabbing; }
.sd-crop__view canvas:focus-visible { outline-offset: -3px; }
.sd-crop__horizon { position: absolute; left: 0; right: 0; top: 68.6%; height: 0; border-top: 2px dashed #fff; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .9)); pointer-events: none; }
.sd-crop__horizon span { position: absolute; right: 8px; top: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font: 500 .6875rem/1.4 var(--font); font-style: normal; }

/* ---------- The deck inside the studio ---------- */
/* The clock is a card here, so it can be moved like the others. */
.sd-clock svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sd .t-turnbg { fill: var(--eco, #2BC48A); }
.sd [data-weather] { display: none; }
.sd-stickers { position: absolute; inset: 0; z-index: 2; pointer-events: none; --u: calc(100cqw / 1024); }
.sd-stickers img { max-width: none; object-fit: fill; }
.deck[data-scene="own"][data-time="night"] .deck__photo { filter: brightness(.45) saturate(.8); }
.sd .deck__photo { transition: opacity .3s ease, filter .6s; }

/* Theme: the cards can stay white or dark whatever the time of day. data-hud is what the cards follow. */
.sd .deck[data-hud="day"] .deck__hud {
  color: #16191C; --g-top: rgba(255, 255, 255, .36); --g-bot: rgba(242, 244, 247, .26); --g-chip: rgba(255, 255, 255, .47);
  --g-edge-top: rgba(255, 255, 255, 1); --g-edge-bot: rgba(255, 255, 255, .25);
}
.sd .deck[data-hud="day"][data-glass="frosted"] .deck__hud { --g-top: rgba(255, 255, 255, .78); --g-bot: rgba(242, 244, 247, .69); --g-chip: rgba(255, 255, 255, .78); }
.sd .deck[data-hud="day"][data-glass="clearest"] .deck__hud { --g-top: rgba(255, 255, 255, .22); --g-bot: rgba(242, 244, 247, .15); --g-chip: rgba(255, 255, 255, .35); }
.sd .deck[data-hud="night"] .deck__hud {
  color: #F2F5F7; --g-top: rgba(20, 24, 32, .35); --g-bot: rgba(10, 13, 18, .47); --g-chip: rgba(12, 16, 22, .44);
  --g-edge-top: rgba(255, 255, 255, .3); --g-edge-bot: rgba(255, 255, 255, .06);
}
.sd .deck[data-hud="night"][data-glass="frosted"] .deck__hud { --g-top: rgba(20, 24, 32, .77); --g-bot: rgba(10, 13, 18, .85); --g-chip: rgba(12, 16, 22, .69); }
.sd .deck[data-hud="night"][data-glass="clearest"] .deck__hud { --g-top: rgba(20, 24, 32, .22); --g-bot: rgba(10, 13, 18, .31); --g-chip: rgba(12, 16, 22, .31); }
.sd .deck[data-hud="day"] .t-pill { fill: rgba(255, 255, 255, .28); }
.sd .deck[data-hud="night"] .t-pill { fill: rgba(0, 0, 0, .22); }

/* ---------- Editing layer ---------- */
.sd-edit { position: absolute; inset: 0; z-index: 6; --u: calc(100cqw / 1024); display: none; }
.sd-app:not([data-step="preview"]):not([data-step="download"]) .sd-edit { display: block; }
.sd-item {
  position: absolute; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u));
  border-radius: calc(12 * var(--u)); cursor: move; touch-action: none; -webkit-tap-highlight-color: transparent;
  outline: 1px dashed rgba(255, 255, 255, .55); outline-offset: 1px;
}
.sd-item::before { content: ""; position: absolute; inset: -6px; }   /* a little easier to catch on a phone */
.sd-item:hover { outline: 2px solid #fff; }
.sd-item:focus-visible { outline: 2px solid #fff; border-radius: calc(12 * var(--u)); box-shadow: 0 0 0 5px rgba(140, 201, 190, .9); }
.sd-item.is-sel { outline: 2px solid #fff; box-shadow: 0 0 0 4px #1F5E5E, 0 0 0 5px rgba(255, 255, 255, .5); z-index: 2; }
.sd-handle {
  display: none; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid #1F5E5E;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .5); touch-action: none;
}
.sd-handle::before { content: ""; position: absolute; inset: -10px; }
.sd-item.is-sel .sd-handle { display: block; }
.sd-handle[data-handle="e"] { right: -11px; top: 50%; margin-top: -9px; cursor: ew-resize; }
.sd-handle[data-handle="se"] { right: -11px; bottom: -11px; cursor: nwse-resize; }
.sd-safe, .sd-keep, .sd-guide { position: absolute; pointer-events: none; }
.sd-safe { left: calc(8 * var(--u)); top: calc(4 * var(--u)); right: calc(8 * var(--u)); bottom: calc(8 * var(--u)); border: 1px dashed rgba(255, 255, 255, .7); border-radius: calc(10 * var(--u)); opacity: 0; transition: opacity .15s; }
.sd-keep {
  left: calc(850 * var(--u)); top: 0; right: 0; height: calc(56 * var(--u)); opacity: 0; transition: opacity .15s; overflow: hidden;
  background: repeating-linear-gradient(135deg, rgba(229, 72, 58, .5) 0 4px, rgba(229, 72, 58, .18) 4px 8px);
}
.sd-keep span { display: none; }
.sd-edit.is-dragging .sd-safe, .sd-edit.is-dragging .sd-keep { opacity: 1; }
.sd-guide { background: #FF5FA2; z-index: 3; }
.sd-guide--v { top: 0; bottom: 0; width: 1px; left: calc(var(--at) * var(--u)); }
.sd-guide--h { left: 0; right: 0; height: 1px; top: calc(var(--at) * var(--u)); }

@media (min-width: 560px) {
  .sd-top { padding: 8px 16px; gap: 14px; }
  .sd-top .brand__word, .sd-top__tag { display: inline; }
  .sd-saved { display: inline; }
  .sd-top [data-import], .sd-top [data-export] { display: grid; }
  .sd-steps ol { max-width: 640px; margin: 0 auto; }
  .sd-steps button { flex-direction: row; gap: 8px; font-size: .875rem; }
  .sd-seg-small.seg--icons span { display: inline; }
  .sd-tools, .sd-props { max-width: 560px; margin: 0 auto; }
  .sd-sheettabs { max-width: 528px; margin-left: auto; margin-right: auto; }
}

/* A short screen (a phone on its side): let the page scroll instead of squeezing the sheet. */
@media (max-height: 520px) and (max-width: 999px) {
  html, body.sd { height: auto; }
  body.sd { overflow: auto; }
  .sd-app { height: auto; min-height: 100dvh; }
  .sd-sheet { overflow: visible; }
  .sd-frame { max-width: calc(70vh * 1024 / 600); }
}

/* ---------- Wide screens: tools, screen, properties ---------- */
@media (min-width: 1000px) {
  .sd-main { display: grid; grid-template-columns: minmax(260px, 22vw) minmax(0, 1fr) minmax(240px, 20vw); grid-template-areas: "tools stage props"; }
  .sd-sheet { display: contents; }
  .sd-sheettabs { display: none; }
  .sd-tools, .sd-props { max-width: none; margin: 0; padding: 22px 20px 28px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; background: var(--night-2); min-height: 0; }
  .sd-tools { grid-area: tools; border-right: 1px solid var(--line); }
  .sd-props { grid-area: props; border-left: 1px solid var(--line); }
  .sd-app[data-sheet] .sd-tools, .sd-app[data-sheet] .sd-props { display: block; }
  .sd-stage { grid-area: stage; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: radial-gradient(120% 90% at 50% 0, #10201F, #060B0C 70%); }
  .sd-stage__fit { flex: 1 1 auto; min-height: 0; container-type: size; margin: 20px 20px 8px; }
  .sd-frame { max-width: none; margin: 0; padding: 10px; border-radius: 24px; background: var(--bezel); width: min(100cqw, calc((100cqh - 20px) * 1024 / 600 + 20px)); box-shadow: 0 0 0 1px rgba(140, 201, 190, .2), 0 50px 90px -40px rgba(0, 0, 0, .9), 0 0 80px -30px rgba(140, 201, 190, .4); }
  .sd .deck { border-radius: 14px; }
  .sd-stagebar { justify-content: center; padding: 8px 28px 18px; }
  .sd-hint { -webkit-line-clamp: 1; }
  .sd-keep span { display: block; padding: 3px 6px; color: #fff; font: 500 10px/1.2 var(--font); text-shadow: 0 1px 2px #000; }
  .sd-foot { padding: 10px 20px; }
  .sd-steps ol { padding: 6px; }
}

@media (pointer: coarse) {
  .sd-handle { width: 24px; height: 24px; }
  .sd-handle[data-handle="e"] { right: -14px; margin-top: -12px; }
  .sd-handle[data-handle="se"] { right: -14px; bottom: -14px; }
}
@media (prefers-reduced-motion: reduce) {
  .sd .deck__photo, .sd-safe, .sd-keep, .sd-icon, .sd-tpl { transition: none; }
}

/* ---------- Second round: sizes, icon packs, clocks, lettering, own car ---------- */
.sd-seg-wrap { flex-wrap: wrap; border-radius: 18px; }
.sd-seg-wrap button { flex: 1 1 auto; padding: 0 10px; }
.sd-nudge { gap: 6px; }
.sd-handle[data-handle="se"] { border-radius: 5px; }
.sd-chips__in { position: absolute; left: 0; top: 0; width: calc(224 * var(--u)); height: calc(38 * var(--u)); transform-origin: 0 0; transform: scale(var(--k, 1)); }
.sd-paints { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sd-paint { aspect-ratio: 16 / 10; border-radius: 12px; border: 1px solid var(--line); padding: 0; cursor: pointer; background: linear-gradient(var(--a), var(--b) 68%, #2A3034 68%); }
.sd-paint[aria-checked="true"] { outline: 2px solid var(--teal); outline-offset: 3px; }
.sd-text { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; margin-top: 14px; }
.sd-text .pill { grid-column: 1 / -1; justify-self: start; }
.sd-field--swatch input { width: 48px; height: 44px; padding: 3px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .4); cursor: pointer; }
.sd-list .sd-x:disabled { opacity: .25; cursor: default; }
.sd-carphoto { margin-top: 14px; }
.sd-carphoto img { width: 100%; max-height: 120px; object-fit: contain; border-radius: 12px; padding: 8px; background: repeating-conic-gradient(rgba(255, 255, 255, .07) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }

/* Icon packs and shapes, lettering */
.sd .deck[data-icons="accent"] .hud-dock svg > g > rect { fill: var(--eco, #2BC48A); }
.sd .deck[data-icons="glass"] .hud-dock svg > g > rect { fill: rgba(128, 136, 142, .3); stroke: rgba(255, 255, 255, .45); stroke-width: 1.2; }
.sd .deck[data-icons="line"] .hud-dock svg > g > rect { fill: none; stroke: currentColor; stroke-width: 1.6; opacity: .8; }
.sd .deck[data-icons="line"] .hud-dock .ic-s, .sd .deck[data-icons="line"] .hud-dock .ic-ring { stroke: currentColor; }
.sd .deck[data-icons="line"] .hud-dock .ic-f, .sd .deck[data-icons="line"] .hud-dock .ic-gear rect { fill: currentColor; }
.sd .deck[data-font="condensed"] .deck__hud { font-family: "Roboto Condensed", "Arial Narrow", sans-serif; }
.sd .deck[data-font="serif"] .deck__hud { font-family: "Noto Serif", Georgia, serif; }
.sd .deck[data-font="mono"] .deck__hud { font-family: "Roboto Mono", ui-monospace, Menlo, monospace; }
.sd .t-clock-big { font-size: 64px; font-weight: 300; letter-spacing: -1px; }

/* The car cutout dialog */
.sd-dlg { width: min(880px, 100vw); max-width: 100vw; max-height: 100dvh; margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--night-2); color: var(--ink); }
.sd-dlg::backdrop { background: rgba(0, 0, 0, .7); }
.sd-dlg__in { display: grid; gap: 12px; padding: 16px; }
.sd-dlg__top, .sd-dlg__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sd-dlg .sd-status { margin: 0; }
.sd-cut { position: relative; width: 100%; max-width: calc(52dvh * var(--ar, 1.5)); margin: 0 auto; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); line-height: 0; background: #2a2f31 repeating-conic-gradient(rgba(255, 255, 255, .08) 0 25%, transparent 0 50%) 0 0 / 20px 20px; }
.sd-cut canvas { display: block; width: 100%; height: auto; touch-action: none; }
.sd-cut[data-tool="erase"] canvas, .sd-cut[data-tool="restore"] canvas { cursor: crosshair; }
.sd-wheel { position: absolute; left: calc(var(--x) * 100%); top: calc(var(--y) * 100%); width: calc(var(--d) * 100%); aspect-ratio: 1; transform: translate(-50%, -50%); padding: 0; border-radius: 50%; border: 3px solid #fff; background: rgba(140, 201, 190, .18); box-shadow: 0 0 0 2px #1F5E5E, inset 0 0 0 2px #1F5E5E; cursor: move; touch-action: none; }
.sd-wheel::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #1F5E5E; }
.sd-cut:not([data-tool="wheels"]) .sd-wheel { opacity: .35; pointer-events: none; }
.sd-cuttools { display: grid; gap: 4px; }
@media (max-width: 559px) { .sd-dlg { border-radius: 0; border: 0; width: 100vw; height: 100dvh; } .sd-cut { max-width: calc(40dvh * var(--ar, 1.5)); } }
.sd-pick--label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.sd-dlg { overflow: auto; }
