/* Ravenry cut-out: the photo tool's page (0.8.0). Its look is the campaign platform's, value for value
   (Rido, 2026-10-16, F-62 to F-69: "please use the real ravenry color ... adjust the styles etc to be same";
   "take a look the current ravenry campgin website how it visuall looks and match it"): the white bar, the
   blue-square label, the square outline and blue buttons, hairline boxes on the page's grey, Inter in the
   design system's ramp. Every value below names its source in the landing-page worktree:
   app/_platform/ui/platform.module.css (.scope, .label, .btnOutline, .appBar), instagram.module.css
   (.dialog, .tool), packages/ui/src/styles/cta.css (.ravenry-cta) and theme.css (the ramp). No navy, no
   capitals but the rare structural label, no curve but the sun. */

:root {
  /* platform.module.css .scope */
  --blue: #0052ca;
  --blue-strong: #0047b3;
  --blue-bright: #1a6dff;
  --blue-deep: #003e9e;
  --amber: #fec452;
  --amber-ink: #3a2a00;
  --ink: #111d2e;
  --ink-soft: #4a5666;
  --ink-muted: #626f80;
  --page: #f6f8fb;
  --cloud: #f2f5f9;
  --mist: #e6ecf4;
  --paper: #ffffff;
  --line: rgb(17 29 46 / 0.1);
  --line-strong: rgb(17 29 46 / 0.2);
  --edge: inset 0 0 0 1px rgb(17 29 46 / 0.08);
  --seat: 0 0.4em 0.6em -0.35em rgb(0 33 82 / 0.42), 0 1.875em 3.75em -1.125em rgb(0 33 82 / 0.38);
  --error: #c0263a;
  --stage: #232323;                          /* Rido's ground for the five steps */
  --glow: 0 8px 18px -10px rgb(0 82 202 / 0.45);
  --glow-up: 0 22px 44px -14px rgb(0 82 202 / 0.55), 0 6px 14px -6px rgb(0 82 202 / 0.35);
  --overlay: inset 0 0 0 1px rgb(17 29 46 / 0.08), 0 1.5em 3em -1em rgb(0 20 60 / 0.45), 0 3em 6em -2em rgb(0 20 60 / 0.4);
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --bar: 64px;
  --rail: 76px;
  --drawer: 300px;
  --inspector: 320px;
}

* { box-sizing: border-box; border-radius: 0 !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden;
  background: var(--page); color: var(--ink);
  font: 400 14px/1.45 "Inter", system-ui, sans-serif;
  font-feature-settings: "cv11" 1, "ss01" 1;     /* the design system's body (typography, "The typeface") */
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: square; stroke-linejoin: miter; flex: none; }
.ico-sm { width: 14px; height: 14px; }
.ico-lg { width: 26px; height: 26px; }
::selection { background: rgb(0 82 202 / 0.16); }
:where(a, button, summary, [tabindex], input, select, textarea):focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---- the bar: the platform's white bar (.appBar), the logo as large as the tool's name (F-66) ---- */
.bar { position: relative; z-index: 30; height: var(--bar); background: var(--paper); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 16px 0 20px; }
/* The tool's name as a cut-out of its own (F-81: "not looks symetics with ranveyr logo and looks a bit not
   interesting"): a blue label cut with the sticker's straight cuts, as tall as the logo's bird is, centred on the
   logo's own middle, tilted as a label laid on by hand; on the pointer it is cut again, a new set of corners, and
   straightens. The logo itself stays exactly the logo. */
.brand { display: flex; align-items: center; gap: 14px; flex: none; color: var(--ink); text-decoration: none; }
.brand img { height: 34px; width: auto; }
.bar-rule { width: 1px; height: 26px; align-self: center; background: var(--line-strong); }
.bar-title { display: inline-grid; place-items: center; height: 30px; padding: 0 13px 1px 12px; background: var(--blue); color: #fff;
  font-size: 16px; font-weight: 800; letter-spacing: -0.015em; line-height: 1; white-space: nowrap; background: #204fbe;   /* the logo's own blue, so the two read as one lockup */
  clip-path: polygon(0 16%, 8% 0, 56% 5%, 100% 0, 97% 54%, 100% 100%, 40% 94%, 3% 100%);
  transform: rotate(-2deg); transition: clip-path 460ms var(--ease-out), transform 460ms var(--ease-out), background-color 200ms var(--ease); }
.brand:hover .bar-title, .brand:focus-visible .bar-title { clip-path: polygon(4% 0, 50% 6%, 95% 0, 100% 44%, 98% 100%, 62% 93%, 0 100%, 2% 46%); transform: rotate(1deg); background: #1a43a6; }
.doc-name { color: var(--ink-muted); font-size: 14px; font-weight: 500; max-width: 22vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 4px; }
.bar-mid { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; }
.bar-sep { width: 1px; height: 22px; background: var(--line); margin: 0 8px; }
.tool { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; transition: background-color 200ms var(--ease), color 200ms var(--ease); }
.tool:hover:not(:disabled) { background: var(--cloud); color: var(--ink); }
.tool:disabled { opacity: 0.32; cursor: default; }
.zoom-label { min-width: 58px; height: 40px; border: 0; background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; transition: background-color 200ms var(--ease); }
.zoom-label:hover { background: var(--cloud); }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.saving { color: var(--ink-muted); font-size: 13px; min-width: 0; white-space: nowrap; }
.saving.busy::before { content: ""; display: inline-block; width: 8px; height: 8px; background: var(--blue); margin-right: 8px; animation: pulse 900ms var(--ease) infinite alternate; }
.warming { font-size: 13px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.warming::before { content: ""; width: 9px; height: 9px; background: var(--amber); animation: pulse 900ms var(--ease) infinite alternate; }

/* ---- buttons: the platform's. The primary is .ravenry-cta; the secondary .btnOutline; both square ---- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid transparent; font-size: 14px; font-weight: 600; letter-spacing: -0.005em; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease), transform 280ms var(--ease), box-shadow 280ms var(--ease), background-position 600ms var(--ease); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary, .btn-gold {
  color: #ffffff; border-color: transparent;
  background: linear-gradient(110deg, var(--blue) 0%, var(--blue) 40%, var(--blue-bright) 60%, var(--blue) 100%);
  background-size: 220% 100%; background-position: 0% 0%; box-shadow: var(--glow);
}
.btn-primary:not(:disabled):hover, .btn-gold:not(:disabled):hover { transform: translateY(-2px); background-position: 100% 0%; box-shadow: var(--glow-up); }
.btn-primary:not(:disabled):active, .btn-gold:not(:disabled):active { transform: none; box-shadow: var(--glow); transition-duration: 80ms; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:not(:disabled):hover { border-color: var(--ink); background: var(--paper); }
.btn-secondary[aria-pressed="true"] { border-color: var(--blue); color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.btn-quiet { background: transparent; color: var(--ink-soft); padding: 0 6px; min-height: 32px; font-weight: 500; }
.btn-quiet:hover:not(:disabled) { color: var(--blue); }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn .arrow { transition: transform 320ms var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---- the download menu ---- */
.export { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); width: 290px; background: var(--paper); color: var(--ink); box-shadow: var(--overlay); padding: 6px 0; z-index: 40; animation: drop 200ms var(--ease-out) both; }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.menu-head { margin: 10px 16px 4px; font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.menu-head:first-child { margin-top: 6px; }
.menu [role="menuitem"] { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; text-align: left; padding: 9px 16px; border: 0; border-left: 3px solid transparent; background: transparent; cursor: pointer; text-decoration: none; color: inherit; }
.menu [role="menuitem"] b { font-size: 14px; font-weight: 600; color: var(--ink); }
.menu [role="menuitem"] span { font-size: 13px; color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.menu [role="menuitem"]:hover, .menu [role="menuitem"]:focus-visible { background: var(--cloud); border-left-color: var(--blue); outline: none; }
.menu [aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

/* ---- the frame of the app ---- */
.app { height: calc(100vh - var(--bar)); display: grid; grid-template-columns: var(--rail) var(--drawer) minmax(0, 1fr) var(--inspector); }
.app.drawer-closed { grid-template-columns: var(--rail) 0 minmax(0, 1fr) var(--inspector); }
.rail { grid-column: 1; grid-row: 1; } .drawer { grid-column: 2; grid-row: 1; } .work { grid-column: 3; grid-row: 1; } .inspector { grid-column: 4; grid-row: 1; }
.app.drawer-closed .drawer { visibility: hidden; }

/* the rail: the panels; white, as the platform's bar, the one chosen in blue */
.rail { background: var(--paper); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 8px 0; gap: 2px; z-index: 20; }
.rail button { position: relative; display: grid; justify-items: center; gap: 5px; padding: 12px 2px 10px; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 12px; font-weight: 500; transition: color 200ms var(--ease), background-color 200ms var(--ease); }
.rail button::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; background: var(--blue); transform: scaleY(0); transition: transform 260ms var(--ease-out); }
.rail button:hover { color: var(--ink); background: var(--cloud); }
.rail button[aria-selected="true"] { color: var(--blue); font-weight: 600; }
.rail button[aria-selected="true"]::before { transform: scaleY(1); }
.rail.still button::before { transition: none; }
.rail button:focus-visible { outline-offset: -2px; }
.rail .ico { width: 24px; height: 24px; transition: transform 200ms var(--ease-out); }
.rail button:active .ico { transform: scale(0.9); transition-duration: 90ms; }
/* each icon's parts move on the pointer and stay so while chosen (F-77: "add animation?"): the photo's hill rises,
   the layout's side panel slides, Add's plus turns, the layers part, a key is pressed */
.rail .ico .mv { transform-box: fill-box; transform-origin: center; transition: transform 420ms var(--ease-out); }
.rail button:hover .hill, .rail button[aria-selected="true"] .hill { transform: translateY(-1.5px); }
.rail button:hover .side, .rail button[aria-selected="true"] .side { transform: translateX(2.5px); }
.rail button:hover .plus, .rail button[aria-selected="true"] .plus { transform: rotate(90deg); }
.rail button:hover .sq1, .rail button[aria-selected="true"] .sq1 { transform: translate(-0.75px, -0.75px); }
.rail button:hover .sq2, .rail button[aria-selected="true"] .sq2 { transform: translate(0.75px, -0.75px); }
.rail button:hover .sq3, .rail button[aria-selected="true"] .sq3 { transform: translate(-0.75px, 0.75px); }
.rail button:hover .top, .rail button[aria-selected="true"] .top { transform: translateY(-1.5px); }
.rail button:hover .low, .rail button[aria-selected="true"] .low { transform: translateY(1px); }
.rail button:hover .space { transform: translateY(1px) scaleX(0.9); }
.rail button:hover .keyrow { transform: translateY(0.5px); }
.rail .rail-keys { margin-top: auto; }

/* the drawer: one panel at a time */
.drawer { background: var(--paper); border-right: 1px solid var(--line); overflow-y: auto; overflow-x: hidden; min-width: 0; z-index: 15; scrollbar-width: thin; }
.pane { padding: 22px 18px 32px; animation: rise 300ms var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* a section's name: the platform's label, a blue square before it (.label) */
.kicker { margin: 0 0 14px; display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 1.3; font-weight: 600; color: var(--ink); }
/* each group named by its own sign, not the same blue square (F-74: "put the icons to make the differentate
   unique"); the sun is the sun, the logo's group the bird */
.kicker > .ico { width: 18px; height: 18px; color: var(--blue); }
.kicker-sun { flex: none; width: 16px; height: 16px; border-radius: 50% !important;
  background: linear-gradient(128.5deg, #fceee0 0%, #fcddba 43%, #fdc88e 63%, #ffb968 100%); box-shadow: inset 0 0 0 1px rgb(17 29 46 / 0.06); }
.kicker-bird { flex: none; width: 18px; height: 18px; background: url("/brand/logo/ravenry-icon.svg") center / contain no-repeat; }
.kicker:not(:first-child) { margin-top: 30px; }
.people[hidden] + .kicker { margin-top: 0; }           /* People leads the Add panel only when there are others */
.kicker .for { font-weight: 500; color: var(--ink-muted); font-size: 13px; margin-left: auto; }
.pane-empty { display: grid; gap: 14px; justify-items: start; padding-top: 4px; }
.pane-empty p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-soft); }

/* the drop zone: the platform's dashed card for what is still to come ("Your next campaign") */
.drop { position: relative; display: grid; justify-items: center; gap: 10px; text-align: center; cursor: pointer; padding: 26px 14px 22px; color: var(--ink-soft); background: var(--paper); border: 1px dashed var(--line-strong); transition: border-color 200ms var(--ease), background-color 200ms var(--ease); }
.drop-plus { width: 44px; height: 44px; display: grid; place-items: center; background: var(--cloud); color: var(--ink); transition: background-color 240ms var(--ease), color 240ms var(--ease), transform 320ms var(--ease-out); }
.drop-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.drop:hover, .drop:focus-visible, .drop.over { border-color: var(--blue); background: rgb(0 82 202 / 0.03); }
.drop:hover .drop-plus, .drop.over .drop-plus { background: var(--blue); color: #fff; transform: translateY(-2px); }
.drop.over { border-style: solid; }

/* the queue */
.queue { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 2px; }
.item { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) 30px; gap: 12px; align-items: center; padding: 8px 6px 8px 10px; border-left: 3px solid transparent; cursor: pointer; transition: background-color 200ms var(--ease); animation: rise 300ms var(--ease-out) both; }
.item:hover { background: var(--cloud); }
.item.sel { background: var(--cloud); border-left-color: var(--blue); }
.item:focus-visible { outline-offset: -2px; }
.item-thumb { width: 48px; height: 48px; object-fit: cover; background: var(--mist); filter: grayscale(1); transition: filter 400ms var(--ease); }
.item.done .item-thumb { filter: none; }
.item-body { display: grid; gap: 5px; min-width: 0; }
.item-name { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-stage { font-size: 13px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item.error .item-stage { color: var(--error); }
.item.done .meter { display: none; }
.meter { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; height: 3px; }
.meter i { background: var(--mist); position: relative; overflow: hidden; }
/* filled to the per cent (setMeter's --f), gliding between the page's polls */
.meter i::after { content: ""; position: absolute; inset: 0; background: var(--blue); transform: scaleX(var(--f, 0)); transform-origin: left; transition: transform 700ms linear; }
@keyframes pulse { from { opacity: 0.4; } to { opacity: 1; } }
.item-add, .item-del { width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink-muted); cursor: pointer; opacity: 0; transition: opacity 160ms, color 160ms, background-color 160ms; }
.item:hover .item-del, .item:focus-within .item-del { opacity: 1; }
.item-del:hover { color: var(--error); background: var(--paper); }
.item .ico { width: 16px; height: 16px; }

/* layouts: each tile the photo itself in that layout (F-67) */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { display: grid; gap: 8px; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; color: var(--ink); }
.tile .shot { position: relative; width: 100%; aspect-ratio: 4 / 5; background: var(--cloud); box-shadow: var(--edge); overflow: hidden; transition: transform 320ms var(--ease-out), box-shadow 320ms var(--ease-out); }
.tile .shot img, .tile .shot canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.tile:hover .shot { transform: translateY(-3px); box-shadow: var(--edge), var(--seat); font-size: 12px; }
/* the chosen layout ringed outside, as the chosen ground: a ring inside vanished on the plate's blue */
.tile[aria-checked="true"] .shot { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--blue); }
.tile[aria-checked="true"]:hover .shot { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--blue), var(--seat); font-size: 12px; }
.tile b { font-size: 13px; font-weight: 600; line-height: 1.3; }
.tile[aria-checked="true"] b { color: var(--blue); }
.tile .shot.loading::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 40%; background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.7), transparent); animation: sweep 1.1s var(--ease) infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.sizes { display: grid; gap: 2px; }
.size { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 8px 8px; border: 0; border-left: 3px solid transparent; background: transparent; cursor: pointer; text-align: left; transition: background-color 200ms var(--ease); }
.size:hover { background: var(--cloud); }
.size[aria-checked="true"] { background: var(--cloud); border-left-color: var(--blue); }
.size i { display: block; border: 1.5px solid var(--ink-soft); justify-self: center; transition: border-color 200ms; }
.size[aria-checked="true"] i { border-color: var(--blue); }
.size b { font-size: 14px; font-weight: 500; color: var(--ink); }
.size b span { color: var(--ink-muted); font-weight: 400; }
.size > span { font-size: 13px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
/* a choice drawn as what it puts on the canvas (js/picto.js, F-74): four to a row, one size, one line of name */
.ptiles, .grounds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 8px; }
.ptile { display: grid; gap: 7px; align-content: start; min-width: 0; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: center; color: var(--ink-soft); }
.ptile .picto { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; transition: transform 280ms var(--ease-out), box-shadow 280ms var(--ease-out); }
.ptile:hover .picto { transform: translateY(-2px); box-shadow: 0 10px 18px -12px rgb(0 33 82 / 0.5); }
.ptile:active .picto { transform: translateY(0) scale(0.97); transition-duration: 90ms; }
.ptile b { font-size: 12px; font-weight: 500; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ptile[aria-checked="true"] .picto { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--blue); }
.ptile[aria-checked="true"] b { color: var(--blue); font-weight: 600; }
.sw { display: block; }
.sw-paper { background: #fff; }
.sw-pale { background: #fff url("/brand/paper/paper-1080x1350.png") center / cover; }
.sw-plate { background: #0052ca url("/brand/plate/plate-1080x1350.png") center / cover; }
.sw-sky { background: #e2eeff; }
.sw-navy { background: #002152; }
.sw-white { background: #fff; }
.sw-ink { background: #25282b; }
.sw-blue { background: #0050c5; }
.sw-clear { background-color: #fff; background-image: linear-gradient(45deg, #e6ecf4 25%, transparent 25%, transparent 75%, #e6ecf4 75%), linear-gradient(45deg, #e6ecf4 25%, transparent 25%, transparent 75%, #e6ecf4 75%); background-size: 12px 12px; background-position: 0 0, 6px 6px; }
.switch { display: flex; align-items: center; gap: 12px; margin-top: 16px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ink); }
.switch input { appearance: none; flex: none; width: 36px; height: 20px; margin: 0; background: rgb(17 29 46 / 0.26); position: relative; cursor: pointer; transition: background-color 200ms var(--ease); }
.switch:hover input:not(:checked):not(:disabled) { background: rgb(17 29 46 / 0.36); }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: #fff; box-shadow: 0 1px 2px rgb(17 29 46 / 0.2); transition: transform 240ms var(--ease-out); }
.switch input:checked { background: var(--blue); }
.switch input:checked::after { transform: translateX(16px); }
.switch input:disabled { opacity: 0.5; cursor: default; }

/* this design, on other photos (0.7.0) */
.house { display: grid; gap: 4px; }
.house .switch { margin-top: 10px; }

/* layers */
.layers { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.layer { display: grid; grid-template-columns: 18px 22px minmax(0, 1fr) 28px 28px; gap: 6px; align-items: center; padding: 6px 4px; border-left: 3px solid transparent; background: var(--paper); cursor: pointer; user-select: none; transition: background-color 160ms var(--ease); }
.layer:hover { background: var(--cloud); }
.layer.sel { background: var(--cloud); border-left-color: var(--blue); }
.layer:focus { outline: none; }
.layer:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.layer.off .layer-name, .layer.off .layer-type { opacity: 0.45; }
.layer.dragging { opacity: 0.5; }
.layer.drop-above { box-shadow: inset 0 2px 0 var(--blue); }
.layer.drop-below { box-shadow: inset 0 -2px 0 var(--blue); }
.layer-grip { width: 18px; height: 22px; cursor: grab; color: var(--ink-muted); background: linear-gradient(currentColor, currentColor) 5px 7px / 8px 1.5px no-repeat, linear-gradient(currentColor, currentColor) 5px 11px / 8px 1.5px no-repeat, linear-gradient(currentColor, currentColor) 5px 15px / 8px 1.5px no-repeat; opacity: 0.6; }
.layer-type { width: 22px; height: 22px; display: grid; place-items: center; color: var(--ink-soft); }
.layer-type .ico { width: 16px; height: 16px; }
.layer.sel .layer-type { color: var(--blue); }
.layer-name { font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.layer-name input { width: 100%; border: 1px solid var(--blue); padding: 2px 4px; font-size: 14px; outline: none; }
/* hide and lock show on the row under the pointer, and stay where a layer is hidden or locked (F-68) */
.layer button { width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink-muted); cursor: pointer; opacity: 0; transition: opacity 160ms var(--ease), color 160ms var(--ease); }
.layer:hover button, .layer:focus-within button, .layer.sel button, .layer button[aria-pressed="true"] { opacity: 1; }
@media (hover: none) { .layer button { opacity: 1; } }
.layer button:hover { color: var(--ink); }
.layer button[aria-pressed="true"] { color: var(--blue); }
.layer button .ico { width: 16px; height: 16px; }
.layer.ground-row { cursor: default; }
.layer.ground-row .layer-name { color: var(--ink-muted); }

/* add: text in the ramp, the sun, containers, the card and the logo, and other photos */
.type-list { display: grid; gap: 6px; }
.type-item { display: grid; gap: 4px; padding: 12px 14px; border: 0; box-shadow: var(--edge); background: var(--paper); cursor: pointer; text-align: left; color: var(--ink); transition: box-shadow 240ms var(--ease-out), transform 240ms var(--ease-out); overflow: hidden; }
.type-item:hover { box-shadow: inset 0 0 0 1px var(--ink), 0 10px 18px -14px rgb(0 33 82 / 0.5); transform: translateY(-1px); }
.type-item .sample { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.1; }
.type-item small { font-size: 12px; color: var(--ink-muted); font-weight: 500; letter-spacing: 0; }
.suns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sun-btn { display: grid; justify-items: center; gap: 6px; padding: 10px 2px; border: 0; box-shadow: var(--edge); background: var(--paper); cursor: pointer; font-size: 11px; color: var(--ink-soft); line-height: 1.2; text-align: center; transition: box-shadow 200ms var(--ease); }
.sun-btn:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.sun-btn[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--blue); color: var(--blue); font-weight: 600; }
.sun-btn canvas { width: 34px; height: 34px; transition: transform 600ms var(--ease-out); }
.sun-btn:hover canvas { transform: rotate(45deg); }
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.person { display: grid; gap: 6px; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.person .shot { position: relative; aspect-ratio: 1; background: var(--cloud); box-shadow: var(--edge); overflow: hidden; transition: transform 280ms var(--ease-out), box-shadow 280ms var(--ease-out); }
.person .shot img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.1); transition: filter 300ms var(--ease); }
.person .shot::after { content: "+"; position: absolute; right: 0; bottom: 0; width: 24px; height: 24px; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 18px; font-weight: 500; transform: translateY(100%); transition: transform 240ms var(--ease-out); }
.person:hover .shot { transform: translateY(-2px); box-shadow: var(--edge), 0 10px 18px -12px rgb(0 33 82 / 0.5); }
.person:hover .shot img { filter: none; }
.person:hover .shot::after { transform: none; }
.person b { font-size: 12px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person[aria-disabled="true"] { opacity: 0.45; cursor: default; pointer-events: none; }
.add-row { margin-top: 12px; }

/* the work: the canvas on the page's grey */
.work { position: relative; min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; background: var(--page); }
.canvas-host { position: relative; min-height: 0; overflow: hidden; transition: box-shadow 160ms var(--ease), background-color 160ms var(--ease); }
/* something from Add being dragged: the canvas says where it can land (F-83) */
.work.drop-ready .canvas-host { box-shadow: inset 0 0 0 1px rgb(0 82 202 / 0.35); }
.work.drop-on .canvas-host { box-shadow: inset 0 0 0 2px var(--blue); background: rgb(0 82 202 / 0.04); }
[data-pane="add"] [draggable="true"] { cursor: grab; }
[data-pane="add"] [draggable="true"]:active { cursor: grabbing; }
.konva-host { position: absolute; inset: 0; }
.konva-host:focus-visible { outline-offset: -2px; }
.text-edit { position: absolute; z-index: 5; margin: 0; padding: 0; border: 0; background: transparent; resize: none; overflow: hidden; white-space: pre-wrap; word-wrap: break-word; outline: 1.5px solid var(--blue); outline-offset: 6px; caret-color: var(--blue); font-kerning: normal; font-synthesis: none; }
.text-edit::selection { background: rgb(0 82 202 / 0.2); }
.text-edit.on-dark { outline-color: #fec452; caret-color: #fec452; }
.text-edit.on-dark::selection { background: rgb(254 196 82 / 0.34); }
.status { height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--paper); border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-muted); }
.status-size { font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; margin-right: 6px; }
.status .push { margin-left: auto; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink-soft); font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color 200ms var(--ease), background-color 200ms var(--ease), color 200ms var(--ease); }
.chip-btn:hover { border-color: var(--ink); color: var(--ink); }
.chip-btn .ico { width: 15px; height: 15px; }
.chip-btn[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }

.work-empty, .work-busy { position: absolute; inset: 0 0 44px 0; display: grid; place-items: center; padding: 24px; overflow: auto; }
.busy-card { width: min(440px, 100%); background: var(--paper); box-shadow: var(--edge), var(--seat); display: grid; animation: rise 360ms var(--ease-out) both; font-size: 14px; overflow: hidden; }
/* the wait, on the plate: the bird folded from its facets and flying, the world streaming past (F-79; js/bird.js) */
.busy-stage { position: relative; height: 200px; background: #0052ca url("/brand/plate/plate-1080x1350.png") center / cover; overflow: hidden; }
.busy-stage .flight { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.busy-body { padding: 20px 22px 22px; display: grid; gap: 12px; }
.busy-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.busy-row img { width: 36px; height: 36px; flex: none; object-fit: cover; filter: grayscale(1); box-shadow: var(--edge); }
.busy-card h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.busy-card p { margin: 0; color: var(--ink-soft); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.busy-card .meter { height: 4px; }
.busy-card.err { padding: 22px; }
.flight .cloud { fill: rgb(255 255 255 / 0.06); animation: flight-pass var(--t) linear calc(var(--d) * -1) infinite; }
.flight .wind { fill: rgb(255 255 255 / 0.6); animation: flight-pass var(--t) linear calc(var(--d) * -1) infinite; }
.flight .bit { fill: rgb(255 255 255 / 0.85); transform-box: fill-box; transform-origin: center; animation: flight-tumble var(--t) linear calc(var(--d) * -1) infinite; }
/* the rigged bird (js/bird.js, F-89, F-94): drawn each frame, its flight too; white, the facets lit by how they turn,
   never gold (F-91) */
.flight .bird { fill: #fff; }
.flight .lit path, .flight .shards path { fill: #fff; }
.flight .feathers path { fill: #fff; opacity: 0; }
.flight .cloud.far { fill: rgb(255 255 255 / 0.035); }
@keyframes flight-pass { from { transform: translateX(470px); } to { transform: translateX(-150px); } }
@keyframes flight-tumble { from { transform: translateX(470px) rotate(0deg); } to { transform: translateX(-150px) rotate(-600deg); } }
.busy-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.busy-pct { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; color: var(--blue); font-variant-numeric: tabular-nums; }
.busy-card.err { grid-template-columns: 1fr; box-shadow: var(--edge), var(--seat), inset 3px 0 0 var(--error); }

/* the empty canvas: the five steps, happening (F-73), and nothing else on the screen but the rail (F-68): the panels,
   the inspector, the canvas's tools and Download step aside until the first photo */
.is-empty .app { grid-template-columns: var(--rail) var(--drawer) minmax(0, 1fr) 0; }
.is-empty .app.drawer-closed { grid-template-columns: var(--rail) 0 minmax(0, 1fr) 0; }
.is-empty .inspector { display: none; }
.is-empty .bar-mid, .is-empty .export, .is-empty .doc-name, .is-empty .saving { visibility: hidden; }
.is-empty .work-empty { bottom: 0; }
.work-empty { container-type: inline-size; }
.intro { width: min(1000px, 100%); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(40px, 7cqi, 96px); align-items: center; animation: rise 520ms var(--ease-out) both; }
.intro h1 { margin: 0 0 18px; font-size: clamp(44px, 4.8cqi, 64px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700; color: var(--ink); text-wrap: balance; }
.intro p { margin: 0 0 32px; font-size: 18px; line-height: 1.55; color: var(--ink-soft); max-width: 24em; text-wrap: pretty; }
.demo { position: relative; aspect-ratio: 4 / 5; background: var(--paper); box-shadow: var(--edge), 0 0.4em 0.6em -0.35em rgb(0 33 82 / 0.42), 0 1.4em 2.8em -1em rgb(0 33 82 / 0.34); overflow: hidden; font-size: 15px; }
.demo svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.demo-steps { display: flex; gap: 6px; margin-top: 28px; }
.demo-steps span { flex: 1; height: 3px; background: var(--line-strong); position: relative; overflow: hidden; }
.demo-steps span::after { content: ""; position: absolute; inset: 0; background: var(--blue); transform: scaleX(0); transform-origin: left; }
.demo-steps span.on::after { transform: scaleX(1); transition: transform 700ms var(--ease-out); }
.demo-label { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--ink); min-height: 1.45em; }
.demo-label::before { content: ""; width: 9px; height: 9px; background: var(--blue); flex: none; }

/* the inspector: what is selected */
.inspector { background: var(--paper); border-left: 1px solid var(--line); overflow-y: auto; overflow-x: hidden; min-width: 0; scrollbar-width: thin; }
.ins-head { position: sticky; top: 0; z-index: 2; background: var(--paper); border-bottom: 1px solid var(--line); padding: 16px 16px 14px; display: flex; align-items: center; gap: 10px; }
.ins-head .layer-type { color: var(--blue); }
.ins-head h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ins-head .for { font-size: 13px; color: var(--ink-muted); }
.ins-head .head-btns { margin-left: auto; display: flex; gap: 2px; }
.icon-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid transparent; background: transparent; color: var(--ink-soft); cursor: pointer; transition: background-color 160ms var(--ease), color 160ms var(--ease); }
.icon-btn:hover:not(:disabled) { color: var(--ink); background: var(--cloud); }
.icon-btn[aria-pressed="true"] { color: #fff; background: var(--blue); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn.danger:hover { color: var(--error); }
.sec { border-bottom: 1px solid var(--line); }
.sec > summary { list-style: none; cursor: pointer; padding: 15px 16px; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--ink); transition: color 160ms var(--ease); }
.sec > summary::-webkit-details-marker { display: none; }
.sec > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 1.75px solid var(--ink-soft); border-bottom: 1.75px solid var(--ink-soft); transform: translateY(-2px) rotate(45deg); transition: transform 240ms var(--ease-out); }
.sec[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.sec > summary:hover { color: var(--blue); }
.sec > summary:focus-visible { outline-offset: -2px; }
.sec-body { padding: 0 16px 18px; display: grid; gap: 14px; animation: rise 260ms var(--ease-out) both; }
.row { display: grid; gap: 8px; }
.row-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.row-label output, .row-label .val { font-weight: 500; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--paper); }
.seg button { border: 0; background: transparent; padding: 8px 4px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--ink-soft); display: inline-flex; align-items: center; justify-content: center; gap: 5px; transition: background-color 160ms var(--ease), color 160ms var(--ease); }
.seg button + button { box-shadow: inset 1px 0 0 var(--line); }
.seg button:hover { background: var(--cloud); color: var(--ink); }
.seg button[aria-checked="true"] { background: var(--blue); color: #fff; font-weight: 600; box-shadow: none; }
.seg button:focus-visible { outline-offset: -2px; position: relative; }
.seg .ico { width: 16px; height: 16px; }
.slider { display: grid; grid-template-columns: 96px minmax(0, 1fr) 64px; gap: 10px; align-items: center; min-height: 30px; }
.sl-name { font-size: 13px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; user-select: none; }
.sl-val { font-size: 13px; color: var(--ink-muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.slider.changed .sl-name { color: var(--ink); }
.slider.changed .sl-name::after { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--blue); margin-left: 6px; vertical-align: 1px; }
.slider .num { height: 30px; }
.num { width: 100%; height: 32px; border: 0; box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--paper); padding: 0 8px; font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
.num:focus { outline: none; box-shadow: inset 0 0 0 2px var(--blue); }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; background: transparent; cursor: pointer; margin: 0; }
.range::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(var(--blue), var(--blue)) 0 / var(--fill, 50%) 100% no-repeat, var(--mist); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -6px; background: var(--blue); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--blue); transition: transform 160ms var(--ease); }
.range:hover::-webkit-slider-thumb { transform: scale(1.18); }
.range::-moz-range-track { height: 2px; background: var(--mist); }
.range::-moz-range-progress { height: 2px; background: var(--blue); }
.range::-moz-range-thumb { width: 14px; height: 14px; background: var(--blue); border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--blue); }
.more { display: grid; gap: 14px; }
.more-btn { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: var(--blue); font-size: 13px; font-weight: 600; cursor: pointer; }
.more-btn .ico { width: 14px; height: 14px; transition: transform 240ms var(--ease-out); }
.more-btn[aria-expanded="true"] .ico { transform: rotate(180deg); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.field { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 28px; height: 28px; border: 0; box-shadow: var(--edge); cursor: pointer; padding: 0; transition: box-shadow 160ms var(--ease), transform 200ms var(--ease-out); }
.swatch:hover { transform: translateY(-2px); }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--blue); }
/* None (0.13.0): white crossed by a hard red stroke, as every design tool marks no colour */
.swatch-none { background: linear-gradient(to top right, var(--paper) calc(50% - 1px), #d0342c calc(50% - 1px) calc(50% + 1px), var(--paper) calc(50% + 1px)); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row .btn { min-height: 36px; padding: 0 10px; font-size: 13px; gap: 6px; }
.btn-row .btn .ico { width: 16px; height: 16px; }
.text-area { width: 100%; min-height: 80px; border: 0; box-shadow: inset 0 0 0 1px var(--line-strong); padding: 10px; font-size: 14px; line-height: 1.45; resize: vertical; color: var(--ink); }
.text-area:focus { outline: none; box-shadow: inset 0 0 0 2px var(--blue); }
.select { width: 100%; height: 36px; border: 0; box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%234a5666' stroke-width='1.6'/%3E%3C/svg%3E") right 10px center no-repeat; padding: 0 30px 0 10px; font-size: 14px; appearance: none; cursor: pointer; color: var(--ink); }
.select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--blue); }
.flag-line { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
.flag { display: inline-flex; align-items: center; gap: 6px; background: var(--amber); color: var(--amber-ink); font-size: 12px; font-weight: 600; padding: 2px 7px; }
.empty-ins { padding: 26px 18px; display: grid; gap: 16px; justify-items: start; }
.empty-ins h2 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }

/* the five steps, in their popup */
.film { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; padding: 20px 24px; background: var(--stage); }
.film figure { margin: 0; display: grid; gap: 8px; }
.film img { width: 100%; aspect-ratio: 4 / 5; object-fit: contain; background: var(--stage); }
.film figcaption { color: #ebebeb; font-size: 13px; font-weight: 500; }
.film-notes { display: grid; gap: 8px; margin: 0; padding: 16px 24px 22px; list-style: none; }

/* ---- the popups: the platform's (instagram.module.css .dialog), full screen a button ---- */
.viewer, .keys, .apply, .steps-pop { padding: 0; border: 0; background: var(--paper); color: var(--ink); box-shadow: var(--overlay); max-width: none; }
.viewer::backdrop, .keys::backdrop, .apply::backdrop, .steps-pop::backdrop { background: rgb(6 24 58 / 0.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.viewer[open], .keys[open], .apply[open], .steps-pop[open] { display: flex; flex-direction: column; animation: dialog-in 460ms var(--ease-out); }
@keyframes dialog-in { from { transform: translateY(32px); opacity: 0; } }
.pop-bar { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 12px; height: var(--bar); padding: 0 16px 0 24px; border-bottom: 1px solid var(--line); }
.pop-bar h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-btns { display: flex; gap: 8px; flex: none; }
.pop-tool { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: border-color 200ms var(--ease); }
.pop-tool:hover:not(:disabled) { border-color: var(--ink); }
.pop-tool:disabled { opacity: 0.4; cursor: default; }
.viewer { width: min(1200px, calc(100vw - 32px)); height: min(880px, calc(100dvh - 48px)); }
.viewer-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 20px; background: var(--stage); }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer:fullscreen, .apply:fullscreen, .steps-pop:fullscreen { width: 100vw; height: 100vh; max-height: none; }
.keys { width: min(560px, calc(100vw - 32px)); }
.keys-list { margin: 0; padding: 16px 24px 22px; display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; font-size: 14px; overflow-y: auto; }
.keys-list dt { font-weight: 600; color: var(--ink); }          /* no tabular figures: they widen Inter's hyphen */
.keys-list dd { margin: 0; color: var(--ink-soft); text-wrap: pretty; }
.keys-switch { margin: 0 24px 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.steps-pop { width: min(1100px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); }
.steps-pop .film { overflow-y: auto; }

/* one design, every photo (0.7.0) */
.apply { width: min(640px, calc(100vw - 32px)); max-height: min(820px, calc(100dvh - 48px)); }
.apply-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 24px 22px; display: grid; gap: 6px; align-content: start; }
.apply-body .kicker { margin-top: 28px; margin-bottom: 12px; }
.apply-body > .kicker:first-child { margin-top: 0; }      /* the Text heading is its own wrap's first child: it keeps its air */
.apply-photos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.apply-photo { display: grid; grid-template-columns: 18px 44px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 10px; box-shadow: var(--edge); cursor: pointer; transition: box-shadow 200ms var(--ease), background-color 200ms var(--ease); }
.apply-photo:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.apply-photo:has(input:checked) { box-shadow: inset 0 0 0 2px var(--blue); }
.apply-photo.off { opacity: 0.5; cursor: default; }
.apply-photo input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.apply-photo img, .apply-photo .ph { width: 44px; height: 44px; object-fit: cover; background: var(--mist); }
.ap-body { display: grid; gap: 2px; min-width: 0; }
.ap-body b { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apply-texts { display: grid; gap: 10px; }
.apply-text { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 12px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.at-words { display: grid; gap: 2px; min-width: 0; }
.at-words b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-words em { font-style: normal; font-size: 13px; color: var(--ink-muted); }
.apply-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--paper); }

/* toasts: what just happened, briefly */
.toast { position: fixed; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 50; background: var(--paper); color: var(--ink); padding: 12px 16px; font-size: 14px; font-weight: 500; box-shadow: var(--overlay); display: flex; gap: 12px; align-items: center; animation: toast-in 360ms var(--ease-out) both; max-width: min(720px, 92vw); }
.toast::before { content: ""; flex: none; width: 9px; height: 9px; background: var(--blue); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 14px); } to { opacity: 1; transform: translate(-50%, 0); } }
.toast.act { padding: 8px 8px 8px 16px; }
.toast.act span { line-height: 1.45; }
.toast.act .btn { min-height: 36px; flex: none; }
/* where every photo's design is drawn for the batch export and the layout tiles, out of sight */
.export-host { position: fixed; left: -12000px; top: 0; width: 540px; height: 680px; visibility: hidden; pointer-events: none; }

/* ---- narrower screens: the drawer floats over the canvas; on a phone everything stacks ---- */
@media (max-width: 1279px) {
  .app, .app.drawer-closed { grid-template-columns: var(--rail) 0 minmax(0, 1fr) 300px; }
  .drawer { position: absolute; top: var(--bar); bottom: 0; left: var(--rail); width: var(--drawer); box-shadow: var(--overlay); }
  .app.drawer-closed .drawer { visibility: hidden; }
  .doc-name { display: none; }
}
@container (max-width: 820px) {
  .intro { grid-template-columns: 1fr; gap: 32px; width: min(440px, 100%); }
  .intro h1 { font-size: 40px; }
}
@container (max-width: 480px) {
  .intro h1 { font-size: 34px; }
  .intro p { font-size: 16px; margin-bottom: 26px; }
}
@media (max-width: 900px) {
  body { overflow: auto; }
  .rail, .drawer, .work, .inspector { grid-column: 1; }
  .rail { grid-row: 1; } .work { grid-row: 2; } .inspector { grid-row: 3; }
  .bar { padding: 0 10px; gap: 10px; }
  .bar-mid { position: static; transform: none; margin-left: auto; }
  .bar-right { margin-left: 0; gap: 8px; }
  .brand img { height: 28px; }
  .bar-title { height: 26px; font-size: 14px; padding: 0 10px 1px 9px; }
  .bar-rule { height: 20px; }
  .saving, #zoom-out, #zoom-in, .bar-sep { display: none; }
  .app, .app.drawer-closed { height: auto; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 62vh auto; }
  .ex-label, #export-btn .ico-sm { display: none; }
  #export-btn { padding: 0 12px; }
  .menu { position: fixed; left: 8px; right: 8px; top: calc(var(--bar) + 4px); width: auto; }
  .rail { flex-direction: row; overflow-x: auto; padding: 0 4px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail button { padding: 8px 12px; }
  .rail button::before { left: 8px; right: 8px; top: auto; bottom: 0; width: auto; height: 3px; transform: scaleX(0); }
  .rail button[aria-selected="true"]::before { transform: scaleX(1); }
  .rail .rail-keys { margin-top: 0; margin-left: auto; }
  .drawer { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: auto; max-height: 60vh; z-index: 35; box-shadow: var(--overlay); animation: sheet-in 320ms var(--ease-out) both; }
  /* a sheet from the foot on a phone or a tablet held upright: a grip on its top edge, and on a wide sheet its
     choices kept to a hand's reach, as small as on the computer (F-85: "make the uiux in any device its perfect") */
  .drawer::before { content: ""; display: block; width: 40px; height: 4px; margin: 10px auto 0; background: var(--line-strong); }
  .drawer .pane { max-width: 640px; margin: 0 auto; }
  .people { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .ptiles, .grounds, .suns { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
  .inspector { border-left: 0; border-top: 1px solid var(--line); }
  /* a phone with no photo yet: the intro in the page's own flow, as tall as it needs */
  .is-empty .app, .is-empty .app.drawer-closed { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; }
  .is-empty .work { grid-template-rows: auto; }
  .is-empty .canvas-host, .is-empty .status { display: none; }
  .is-empty .work-empty { position: static; padding: 28px 16px 40px; }
  .film { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apply-text { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
@media (max-width: 480px) {
  .zoom-label { display: none; }
  .bar { gap: 6px; padding: 0 8px; }
  .brand { gap: 10px; }
  .tool { width: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* the default curve shown while Hold to compare or the backslash key is held (H10) */
.work.comparing::after { content: "The default curve"; position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 6; padding: 6px 12px; background: var(--paper); box-shadow: var(--overlay); color: var(--ink); font-size: 13px; font-weight: 600; pointer-events: none; }
.ap-body em { font-style: normal; font-size: 13px; color: var(--ink-muted); }
.busy-line { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.busy-line::before { content: ""; width: 9px; height: 9px; background: var(--blue); animation: pulse 900ms var(--ease) infinite alternate; }
.person.on .shot { box-shadow: inset 0 0 0 2px var(--blue); }
.person.on .shot img { filter: none; }
.person.on .shot::after { content: ""; transform: none; background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l5 5L19 7' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='square'/%3E%3C/svg%3E") center / 16px no-repeat; }

/* ---- Fix by hand (0.11.0; js/fix.js), as the mock-up Rido saw (mockups/hand-fixes.html) ---- */
.fixpop { padding: 0; border: 0; background: var(--paper); color: var(--ink); box-shadow: var(--overlay); max-width: none; max-height: none;
  width: min(1320px, calc(100vw - 32px)); height: min(920px, calc(100dvh - 48px)); }
.fixpop::backdrop { background: rgb(6 24 58 / 0.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.fixpop[open] { display: grid; grid-template-rows: var(--bar) auto minmax(0, 1fr) auto; animation: dialog-in 460ms var(--ease-out); }
.fixpop:fullscreen { width: 100vw; height: 100vh; }
.fixpop .pop-bar h2 .for { font-weight: 500; color: var(--ink-muted); margin-left: 10px; }
.fix-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 12px 24px; border-bottom: 1px solid var(--line); min-height: 64px; }
.fix-tools > .seg { flex: none; }
.fix-tools .seg button { padding: 9px 14px; font-size: 14px; }
.fix-tools .seg button:disabled { opacity: 0.4; cursor: not-allowed; }
.fix-tools .seg .ico { width: 17px; height: 17px; }
.tool-sep { width: 1px; align-self: stretch; background: var(--line); }
.fix-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.fix-opts[hidden] { display: none; }
.fix-opts .slider { grid-template-columns: auto 160px 64px; margin: 0; }
.fix-opts .switch { margin-top: 0; }
.fix-opts .btn { min-height: 36px; }
.fix-view { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.view-grounds { display: flex; gap: 6px; }
.vg { width: 30px; height: 30px; border: 0; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line-strong); transition: box-shadow 160ms var(--ease); }
.vg[aria-checked="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--blue); }
.vg-blue { background: #0052ca; } .vg-black { background: #000; } .vg-white { background: #fff; }
.vg-photo { background: #8a8f86 center 30% / cover no-repeat; }
.fix-view .seg button { padding: 7px 10px; font-size: 13px; }
.fix-stage { position: relative; min-height: 0; overflow: hidden; touch-action: none; background: #000; }
.fix-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fix-stage[data-tool="keep"], .fix-stage[data-tool="remove"] { cursor: none; }
.fix-stage[data-tool="cut"] { cursor: ns-resize; }
.fix-stage.can-pan { cursor: grab !important; }
.fix-stage.panning { cursor: grabbing !important; }
.fix-foot { display: flex; align-items: center; gap: 8px; padding: 10px 24px; min-height: 64px; border-top: 1px solid var(--line); }
.fix-hint { margin: 0 0 0 10px; font-size: 13px; color: var(--ink-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fix-foot .push { margin-left: auto; display: flex; gap: 10px; flex: none; }
.btn-danger { color: var(--error); border-color: var(--error); }
.btn-danger:not(:disabled):hover { border-color: var(--error); color: var(--error); background: rgb(192 38 58 / 0.06); }
@media (max-width: 900px) {
  .fixpop { width: 100vw; height: 100dvh; }
  .fix-tools { padding: 10px 16px; gap: 10px 12px; }
  .tool-sep { display: none; }
  .fix-view { margin-left: 0; }
  .fix-hint { display: none; }
  .fix-foot { padding: 8px 16px; }
}
@media (max-width: 560px) {
  .fixpop .pop-tool span { display: none; }
  .fix-tools .seg button { padding: 8px 9px; font-size: 13px; gap: 4px; }
  .fix-tools > .seg { width: 100%; }
  .fix-opts .slider { grid-template-columns: auto minmax(80px, 1fr) 56px; }
  .fix-opts { width: 100%; }
  .fix-view { width: 100%; justify-content: space-between; }
}
.flag-note { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--blue); }
.flag-note::before { content: ""; width: 7px; height: 7px; background: var(--blue); }

/* ---- shapes, the pen and icons (0.13.0, F-104 to F-106) ---------------------------------------------------------- */
.ptiles-shapes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ptile[data-pen][aria-pressed="true"] .picto { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--blue); }
.ptile[data-pen][aria-pressed="true"] b { color: var(--blue); font-weight: 600; }
.icon-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink-soft); transition: border-color 160ms var(--ease); }
.icon-search:focus-within { border-color: var(--blue); color: var(--blue); }
.icon-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); }
.icon-search input::-webkit-search-cancel-button { filter: grayscale(1); }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px; margin-top: 12px; }
.icon-tile { display: grid; place-items: center; aspect-ratio: 1; padding: 0; border: 0; background: transparent; color: var(--navy, #002152); cursor: pointer;
  transition: background-color 140ms var(--ease), color 140ms var(--ease), transform 200ms var(--ease-out); }
.icon-tile:hover, .icon-tile:focus-visible { background: var(--cloud); color: var(--blue); transform: translateY(-1px); outline: none; }
.icon-tile:active { transform: scale(0.94); }
.icon-tile .lucide { width: 22px; height: 22px; }
.icon-wait { grid-column: 1 / -1; margin: 6px 0; color: var(--ink-soft); font-size: 13px; }
.icon-more { margin-top: 10px; }
.icon-credit { margin: 12px 0 0; font-size: 12px; color: var(--ink-soft); }
.icon-credit a { color: inherit; }
.work.pen-on .konva-host { cursor: crosshair; }
