/*
 * PixelForge: the tool's own components, styled in the site's design language (12 Nov 2026, on the UltraCompress Pro
 * template, after GIF Forge, whose shared block the first part of this file follows). Base: /libs/site-pages.css (tokens,
 * Inter and Space Grotesk, theme toggle, focus rings) and /libs/shared-nav.css (the site's header and footer). The second
 * part is the original's components (the start screen and drop zone, the stage, the crop box, the text handles and the
 * marks for the background, the collage cells, the tool panels) on the site's tokens. The scripts build their parts with
 * the original's class names (btn primary, small-btn, seg, chip, psec ...), so those names are styled here. Text on the
 * photo uses the original's Anton, Caveat, DM Sans, Great Vibes and Playfair Display (SIL Open Font License,
 * fonts/LICENSES.txt and fonts/OFL.txt). Light is the default; dark applies when <html> has no data-theme. Written once
 * from GIF Forge's file and the original's style.css, then edited by hand: this file is the source.
 */

/* ----- Fonts for text on the photo (stored with the tool, see fonts/LICENSES.txt) ----- */
@font-face { font-family: "PF Anton"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/anton-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "PF Anton"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/anton-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PF Caveat"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/caveat-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "PF Caveat"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/caveat-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PF DM Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/dmsans-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "PF DM Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/dmsans-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PF Playfair"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("fonts/playfair-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "PF Playfair"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("fonts/playfair-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "PF Great Vibes"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/greatvibes-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "PF Great Vibes"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/greatvibes-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ----- Tokens the tool adds ----- */
:root {
    --surface: #ffffff;
    --surface-2: #f3f4f8;
    --ring: rgba(139, 92, 246, 0.18);
    --app-max: 1600px;
    --radius-lg: 16px;
    --line: rgba(0, 0, 0, 0.1);
    --line-strong: rgba(0, 0, 0, 0.24);
    --ok: #166534;
    --ok-soft: rgba(22, 101, 52, 0.09);
    --bad: #b91c1c;
    --bad-soft: rgba(185, 28, 28, 0.08);
    --warn: #92400e;
    --warn-soft: rgba(217, 119, 6, 0.1);
    --info: #1d4ed8;
    --mark: #7c3aed;           /* the crop box, the chosen look, cell and layout, the progress bars (the original's violet) */
    --mark-soft: rgba(139, 92, 246, 0.12);
    --check-a: #ffffff;        /* the checkerboard behind see-through parts */
    --check-b: #e4e6ea;
    --head: 81px;              /* the site's header */
}
:root:not([data-theme="light"]) {
    --surface: #14141f;
    --surface-2: rgba(255, 255, 255, 0.05);
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.26);
    --ok: #4ade80;
    --ok-soft: rgba(74, 222, 128, 0.1);
    --bad: #f87171;
    --bad-soft: rgba(248, 113, 113, 0.1);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, 0.1);
    --info: #93c5fd;
    --mark: #a78bfa;
    --mark-soft: rgba(167, 139, 250, 0.16);
    --check-a: #2a2e35;
    --check-b: #22262c;
}
@media (max-width: 639.98px) { :root { --head: 65px; } }

/* ----- Page: full width, the page provides the side space ----- */
.container.app-container { max-width: calc(var(--app-max) + 2 * var(--content-gutter)); margin-top: 16px; }
@media (min-width: 640px) { .container.app-container { margin-top: 24px; } }

/* ----- The site header is the first thing on the page and stays at the top ----- */
body { padding-top: 0; }
body > header { position: sticky; top: 0; z-index: 50; }
header .site-nav { position: relative; top: auto; }
.theme-toggle { top: 90px; }
@media (max-width: 639.98px) { .theme-toggle { top: 75px; } } /* the header is 81 px tall from 640 px, 65 px below */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ----- Hero ----- */
.app-hero { margin: 0 0 2rem; text-align: center; }
.app-brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 1.25rem; font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--text-strong); }
.app-brand img { width: 44px; height: 44px; border-radius: 12px; display: block; }
.app-hero h1 { margin-bottom: 0.75rem; }
.app-tagline { color: var(--text-2); font-size: 1.125rem; line-height: 1.6; max-width: 46rem; margin: 0 auto; }

/* ----- Small helpers ----- */
main [hidden], .dialog [hidden], body > [hidden] { display: none !important; } /* the scripts hide parts that carry their own display */
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--text-2); }
.small { font-size: 0.9rem; }
.hint { color: var(--text-3); font-size: 0.82rem; font-weight: 400; line-height: 1.45; }
.hint:empty { display: none; }
.hint.sub { display: block; margin-top: 2px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; gap: 8px 16px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions.center { justify-content: center; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.link:hover { color: var(--link-hover); }
code { font-size: 0.85em; padding: 1px 6px; border-radius: 6px; background: var(--code-bg); color: var(--code-text); }
kbd { font-family: inherit; font-size: 0.72rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--chip-border); border-bottom-width: 2px; background: var(--chip); color: var(--text-strong); }

/* ----- Buttons (the scripts' class names: btn, primary, ghost, danger, on, big, small-btn) ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border: 1px solid var(--surface-border); border-radius: 9999px; background: var(--surface); color: var(--text-strong); font-family: inherit; font-weight: 600; font-size: 0.925rem; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease; }
.btn .ico { width: 17px; height: 17px; }
.btn:hover:not([disabled]) { border-color: var(--brand); color: var(--link); transform: translateY(-2px); }
.btn.primary, .btn.big { background: var(--gradient-brand); color: #fff; border-color: transparent; box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3); }
.btn.primary:hover:not([disabled]), .btn.big:hover:not([disabled]) { color: #fff; border-color: transparent; box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(185, 28, 28, 0.35); }
.btn.danger:hover:not([disabled]) { background: var(--danger-strong); color: #fff; border-color: transparent; }
.btn.on { border-color: var(--brand); color: var(--link); background: var(--tint-brand); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn.big { min-height: 52px; padding: 12px 28px; font-size: 1rem; }
.btn.small-btn, .small-btn { min-height: 38px; padding: 7px 15px; font-size: 0.85rem; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--surface-border); background: var(--surface); cursor: pointer; display: inline-grid; place-items: center; color: var(--text-strong); flex: none; padding: 0; font-family: inherit; transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease; }
.icon-btn:hover:not([disabled]) { border-color: var(--brand); color: var(--link); }
.icon-btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.icon-btn[aria-pressed="true"] { border-color: var(--brand); color: var(--link); background: var(--tint-brand); }
.icon-btn:focus-visible, .link:focus-visible, .btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ----- Toolbar ----- */
.app-shell { margin: 0 0 3rem; scroll-margin-top: 90px; }
.app-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 0 0 1.25rem; }
.toolbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.view-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 9999px; background: var(--surface-2); max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.view-tab { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 16px; border: 0; border-radius: 9999px; background: transparent; font-family: inherit; font-size: 0.85rem; font-weight: 600; color: var(--text-2); cursor: pointer; white-space: nowrap; transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }
.view-tab .ico { width: 16px; height: 16px; }
.view-tab:hover { color: var(--link); }
.view-tab[aria-current="page"] { background: var(--gradient-brand); color: #fff; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); }
.view-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.view-tab .short { display: none; }
@media (max-width: 1279.98px) { .view-tab .long { display: none; } .view-tab .short { display: inline; } }
.shell-hint { margin-top: 18px; color: var(--text-3); font-size: 0.85rem; }

/* ----- Fields ----- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field.end { justify-content: flex-end; }
.fields { display: flex; flex-direction: column; gap: 14px; }
.fields-row { gap: 10px 12px; align-items: flex-end; }
.fields-row .field { flex: 0 1 auto; }
.label { font-weight: 600; font-size: 0.85rem; color: var(--text-strong); }
.unit { color: var(--text-2); font-size: 0.85rem; }
.times { color: var(--text-2); padding-bottom: 12px; }
.input { width: 100%; min-width: 0; min-height: 44px; padding: 10px 14px; background: var(--field); border: 1px solid var(--field-border); border-radius: 12px; font-family: inherit; font-size: 0.95rem; color: var(--text); outline: none; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.input.num { max-width: 7.5rem; }
.input.tiny { max-width: 5.4rem; min-height: 34px; padding: 4px 8px; font-size: 0.875rem; text-align: right; font-variant-numeric: tabular-nums; }
textarea.input { min-height: 76px; resize: vertical; line-height: 1.45; }
.check-row { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 0.925rem; color: var(--text); padding: 4px 0; }
.check-row input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; align-self: flex-start; }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 13px; border-radius: 9999px; border: 1px solid var(--chip-border); background: var(--surface); font-family: inherit; font-size: 0.85rem; font-weight: 600; color: var(--text-2); cursor: pointer; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease; }
.seg button:hover:not([disabled]) { border-color: var(--brand); color: var(--link); transform: translateY(-1px); }
.seg button[aria-checked="true"] { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.seg button[disabled] { opacity: 0.4; cursor: not-allowed; }
.seg button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 12px; border-radius: 9999px; border: 1px solid var(--chip-border); background: var(--chip); font-family: inherit; font-size: 0.8rem; font-weight: 600; color: var(--text-2); cursor: pointer; transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.chip:hover { border-color: var(--brand); color: var(--link); transform: translateY(-1px); }
.chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.chip[aria-pressed="true"] { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.small-chip { min-height: 30px; padding: 2px 10px; font-size: 0.8rem; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; font-weight: 600; padding: 2px 10px; border-radius: 9999px; }
.pill.good { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.note { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-top: 2px solid currentColor; font-size: 0.9rem; }
.note > span { color: var(--text); flex: 1; min-width: 12rem; }
.note.bad { color: var(--bad); }
.note.warn { color: var(--warn); }
.note.info { color: var(--info); }
.color-field { flex-direction: row; align-items: center; gap: 8px; }
.swatch { width: 48px; height: 38px; padding: 3px; border: 1px solid var(--field-border); border-radius: 10px; background: var(--field); cursor: pointer; }
/* sliders: the filled part follows the value (the script sets --p) */
.slider .slider-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.slider-val { display: inline-flex; align-items: center; gap: 4px; }
.range { width: 100%; height: 28px; margin: 0; background: transparent; accent-color: var(--brand); -webkit-appearance: none; appearance: none; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--brand) var(--p, 50%), var(--line-strong) var(--p, 50%)); }
.range::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line-strong); }
.range::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--brand); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.range:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* ----- Windows (the scripts put the heading inside the body) ----- */
.dialog { margin: auto; border: 1px solid var(--surface-border); border-radius: 20px; padding: 0; width: min(560px, calc(100vw - 16px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--text); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35); }
.dialog.wide { width: min(880px, calc(100vw - 16px)); }
.dialog::backdrop { background: rgba(10, 10, 20, 0.6); backdrop-filter: blur(6px); }
.dialog[open] { animation: pop 0.2s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } }
.dialog-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; margin: 0; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-head h2 { margin: 0; font-size: 1.2rem; color: var(--text-strong); }
.dialog-head .icon-btn { border-radius: 50%; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 4px; align-items: center; }
.help p { max-width: 75ch; color: var(--text-2); }
.help h3 { font-size: 1rem; margin-top: 6px; color: var(--text-strong); }
.keys { display: grid; gap: 6px; margin: 0; }
.keys div { display: flex; gap: 12px; }
.keys dt { min-width: 9rem; }
.keys dd { margin: 0; color: var(--text-2); }

/* ----- Toasts ----- */
.toasts { position: fixed; bottom: 24px; right: 24px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { pointer-events: auto; background: #0a0a14; color: #fff; border: 1px solid rgba(255, 255, 255, 0.12); border-left: 4px solid var(--brand); border-radius: 14px; padding: 12px 16px; display: flex; align-items: center; gap: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3); min-width: 260px; max-width: 420px; font-size: 0.875rem; font-weight: 500; overflow-wrap: anywhere; animation: slideIn 0.3s ease; transition: opacity 0.3s ease, transform 0.3s ease; }
.toast button { background: none; border: 0; padding: 0; color: #c4b5fd; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; white-space: nowrap; min-height: 32px; flex: none; }
.toast.bad { border-left-color: #f87171; }
.toast.leaving { opacity: 0; transform: translateX(40px); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ----- Information sections ----- */
.info-section { margin: 0 0 2.5rem; }
.info-section h2 { font-size: 1.75rem; margin: 0 0 1.25rem; }
.info-section .info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.info-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 1rem 0 1.5rem; }
.info-stack { display: grid; gap: 12px; }
.info-card { background: var(--surface); border: 1px solid var(--surface-border); border-radius: 16px; box-shadow: var(--surface-shadow); padding: 20px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.info-card:hover { transform: translateY(-4px); box-shadow: var(--surface-hover-shadow); }
.info-card--small { padding: 16px; box-shadow: none; }
.info-card h3 { margin: 0 0 0.75rem; font-size: 1.15rem; }
.info-card p { color: var(--text-2); margin-bottom: 0.75rem; }
.info-card p:last-child { margin-bottom: 0; }
.step-card { position: relative; padding-top: 24px; }
.step-num { position: absolute; top: -16px; left: 20px; width: 34px; height: 34px; border-radius: 50%; background: var(--gradient-brand); color: #fff; font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 0.75rem; }
.step-head h3 { margin: 0; }
.step-emoji { font-size: 1.6rem; line-height: 1; }
.info-section details.info-card { padding: 0; }
.info-section details.info-card summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--text-strong); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.info-section details.info-card summary::-webkit-details-marker { display: none; }
.info-section details.info-card summary::after { content: '+'; color: var(--link); font-weight: 700; font-size: 1.2rem; line-height: 1; flex-shrink: 0; }
.info-section details.info-card[open] summary::after { content: '\2212'; }
.info-section details.info-card p { padding: 0 20px 16px; margin: 0; color: var(--text-2); }

/* ===== PixelForge components ===== */

/* ----- The site's text rules (p, ul, li, headings, tables, dl) must not reach the tool: same weight as the site's, loaded later ----- */
:where(.app-shell) p, :where(.app-shell) ul, :where(.app-shell) ol, :where(.app-shell) li, :where(.app-shell) dl, :where(.app-shell) dd,
:where(.dialog) p, :where(.dialog) dl, :where(.dialog) dd { margin: 0; line-height: 1.5; }
:where(.app-shell) ul, :where(.app-shell) ol { padding: 0; list-style: none; }
:where(.app-shell) h2, :where(.app-shell) h3, :where(.app-shell) h4, :where(.dialog) h2, :where(.dialog) h3 { margin: 0; line-height: 1.25; }
:where(.app-shell) img { max-width: none; }

/* ----- Long words (a file name or a text typed without spaces) break inside the tool instead of widening the page ----- */
.app-shell, .dialog { overflow-wrap: anywhere; }

/* ----- A view ----- */
.screen { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.screen:focus, .screen h2:focus, .ws-side h2:focus { outline: none; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.view-head h2 { font-size: 1.5rem; color: var(--text-strong); }
.lead { margin-top: 4px; color: var(--text-2); max-width: 72ch; }
.panel-head .lead { margin-top: 6px; }
.empty { color: var(--text-2); border: 1px dashed var(--line-strong); border-radius: 14px; padding: 24px 12px; text-align: center; font-size: 0.925rem; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty.big { padding: 48px 12px; min-height: 320px; justify-content: center; background: var(--surface); }
.empty-ico { width: 44px; height: 44px; color: var(--mark); stroke-width: 1.6; }
.empty-title { color: var(--text-strong); font-weight: 700; font-size: 1.1rem; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--mark); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--gradient-brand); border-radius: 4px; transition: width 0.15s; }
details.fold > summary { cursor: pointer; font-weight: 700; min-height: 36px; display: flex; align-items: center; gap: 6px; list-style: none; color: var(--text-strong); }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); margin: 0 4px 0 2px; transition: transform 0.15s; }
details.fold[open] > summary::before { transform: rotate(45deg); }
details.fold[open] > summary { margin-bottom: 8px; }
.fold-body { display: flex; flex-direction: column; gap: 14px; }
details.fold.psec { gap: 0; }
/* the two-sided fill of sliders that go both ways from zero, and the dot of a slider that was moved */
.range.center::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--line-strong) var(--a, 50%), var(--brand) var(--a, 50%), var(--brand) var(--b, 50%), var(--line-strong) var(--b, 50%)); }
.range.center::-moz-range-progress { background: transparent; }
.slider.moved .label::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mark); margin-left: 7px; vertical-align: middle; }
/* colour dots */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dot-btn { width: 34px; height: 34px; border-radius: 50%; padding: 0; border: 1px solid var(--line-strong); background: var(--c); box-shadow: inset 0 0 0 2px var(--surface); cursor: pointer; }
.dot-btn[aria-checked="true"] { outline: 3px solid var(--mark); outline-offset: 2px; }
.dot-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.swatch.own { width: 48px; height: 36px; }

/* ----- Open: the drop zone as on the other tools (dashed brand edge, tint and lift on hover, the gradient circle) ----- */
.drop-zone { position: relative; background: var(--surface); border: 3px dashed rgba(139, 92, 246, 0.45); border-radius: 24px; padding: 3.5rem 2rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; box-shadow: var(--surface-shadow); transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease; }
.drop-zone:hover, .drop-zone:focus-within { border-color: var(--brand); background: var(--tint-brand); transform: translateY(-4px); box-shadow: var(--surface-hover-shadow); }
.upload-icon { width: 96px; height: 96px; border-radius: 50%; background: var(--gradient-brand); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 0.75rem; box-shadow: 0 10px 30px rgba(139, 92, 246, 0.35); transition: transform 0.3s ease; }
.upload-icon .dz-ico { width: 44px; height: 44px; stroke-width: 1.8; }
.drop-zone:hover .upload-icon { transform: scale(1.1); }
.dz-title { font-weight: 700; font-size: 1.5rem; color: var(--text-strong); font-family: 'Space Grotesk', 'Inter', sans-serif; }
.drop-zone .actions { margin-top: 0.75rem; }
@media (hover: hover) and (pointer: fine) { .camera-btn { display: none; } }
.keep-note { margin-top: -8px; }
.tasks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 640px) { .tasks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.task { display: flex; align-items: flex-start; gap: 12px; text-align: left; padding: 16px; background: var(--surface); border: 1px solid var(--surface-border); border-radius: 16px; min-height: 76px; box-shadow: var(--surface-shadow); font-family: inherit; color: var(--text); cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.task:hover { transform: translateY(-4px); box-shadow: var(--surface-hover-shadow); }
.task:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.task-ico { width: 26px; height: 26px; color: var(--link); margin-top: 2px; }
.task-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.task-title { font-weight: 700; color: var(--text-strong); }
.task-sub { color: var(--text-2); font-size: 0.85rem; }
.big-choices { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.open-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 48px; align-items: start; }
@media (min-width: 1100px) { .open-grid { grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr); } .open-grid.solo { grid-template-columns: minmax(0, 1fr); } }
.open-pic { display: flex; flex-direction: column; gap: 12px; }
.open-thumb { max-width: 100%; height: auto; border-radius: 10px; background: repeating-conic-gradient(var(--check-a) 0% 25%, var(--check-b) 0% 50%) 0 0 / 16px 16px; border: 1px solid var(--surface-border); align-self: flex-start; max-height: 460px; object-fit: contain; }
.open-info { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.facts { margin: 0; display: grid; gap: 0; border-top: 2px solid var(--text-strong); }
.facts div { display: grid; grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--surface-border); }
.facts dt { color: var(--text-2); font-size: 0.9rem; }
.facts dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
@media (max-width: 520px) { .facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* ----- The studio: the stage beside the tool panel ----- */
.studio { padding-bottom: 8px; }
.ws { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 40px; align-items: start; }
@media (min-width: 1100px) {
    .ws { grid-template-columns: minmax(0, 1fr) minmax(340px, 410px); }
    .ws-main { position: sticky; top: calc(var(--head) + 16px); }
}
.ws-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ws-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.stage-sticky { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 1099.98px) {
    .ws { gap: 18px; }
    .ws-main { display: contents; }
    .stage-sticky { order: 0; }
    .ws-side { order: 2; }
}
@media (max-width: 759.98px) {
    .stage-sticky { position: sticky; top: var(--head); z-index: 10; padding: 8px 0 6px; margin: -8px 0 -6px; background: var(--bg); } /* a backing only where the stage sticks */
    body.typing .stage-sticky { position: static; }
}
#stageMain { display: flex; flex-direction: column; gap: 8px; }
.stage-view { position: relative; display: flex; align-items: center; justify-content: center; min-height: 160px; border-radius: 16px; background: var(--surface); border: 1px solid var(--surface-border); padding: 0; overflow: hidden; }
.stage-view.scrolls { overflow: auto; justify-content: flex-start; align-items: flex-start; max-height: 76vh; }
.stage-view.is-frame { padding: 16px; }
.canvas-wrap { position: relative; flex: none; background: repeating-conic-gradient(var(--check-a) 0% 25%, var(--check-b) 0% 50%) 0 0 / 16px 16px; touch-action: manipulation; }
#view { display: block; width: 100%; height: 100%; max-width: none; }
.overlay { position: absolute; inset: 0; }
.before-tag, .drawing-tag { position: absolute; top: 10px; left: 10px; display: none; align-items: center; gap: 8px; background: rgba(10, 10, 20, 0.78); color: #fff; font-size: 0.8rem; font-weight: 700; padding: 3px 10px; border-radius: 9999px; pointer-events: none; }
.showing-before .before-tag { display: inline-flex; }
.drawing .drawing-tag { display: inline-flex; }
.stage-bar { display: flex; align-items: center; gap: 10px; }
.size-label { flex: 1; text-align: center; color: var(--text-2); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
#beforeBtn { user-select: none; -webkit-user-select: none; touch-action: none; }
#beforeBtn[aria-pressed="true"] { border-color: var(--brand); color: var(--link); background: var(--tint-brand); }

/* crop box */
.crop-shade { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.crop-hole { position: absolute; box-shadow: 0 0 0 9999px rgba(10, 12, 16, 0.55); }
.crop-box { position: absolute; outline: 2px solid var(--mark); cursor: move; touch-action: none; }
.crop-box:focus-visible { outline: 3px solid var(--brand); }
.crop-box .thirds { position: absolute; inset: 0; pointer-events: none; opacity: 0.7;
    background: linear-gradient(to right, transparent 33.1%, rgba(255, 255, 255, 0.6) 33.3%, transparent 33.5%, transparent 66.5%, rgba(255, 255, 255, 0.6) 66.7%, transparent 66.9%),
                linear-gradient(to bottom, transparent 33.1%, rgba(255, 255, 255, 0.6) 33.3%, transparent 33.5%, transparent 66.5%, rgba(255, 255, 255, 0.6) 66.7%, transparent 66.9%); }
.crop-box.dragging .thirds { opacity: 1; }
.handle { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; touch-action: none; z-index: 1; }
.handle::after { content: ""; position: absolute; inset: 5px; border-radius: 3px; background: #fff; border: 2px solid var(--mark); }
.h-nw { left: 0; top: 0; cursor: nwse-resize; } .h-n { left: 50%; top: 0; cursor: ns-resize; } .h-ne { left: 100%; top: 0; cursor: nesw-resize; }
.h-e { left: 100%; top: 50%; cursor: ew-resize; } .h-se { left: 100%; top: 100%; cursor: nwse-resize; } .h-s { left: 50%; top: 100%; cursor: ns-resize; }
.h-sw { left: 0; top: 100%; cursor: nesw-resize; } .h-w { left: 0; top: 50%; cursor: ew-resize; }
@media (pointer: coarse) { .handle { width: 34px; height: 34px; margin: -17px 0 0 -17px; } .handle::after { inset: 9px; } }
/* text and picture handles */
.layer-box { position: absolute; border: 1.5px dashed rgba(255, 255, 255, 0.85); outline: 1.5px dashed rgba(0, 0, 0, 0.6); outline-offset: 1.5px; cursor: grab; touch-action: none; border-radius: 4px; transform-origin: 50% 50%; }
.layer-box:hover, .layer-box.is-open { border-style: solid; border-color: var(--mark); outline-color: transparent; }
.layer-box:focus-visible { outline: 3px solid var(--brand); }
.size-handle { position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--mark); cursor: nwse-resize; touch-action: none; display: none; }
.layer-box.is-open .size-handle, .layer-box:hover .size-handle { display: block; }
@media (pointer: coarse) { .size-handle { width: 28px; height: 28px; right: -14px; bottom: -14px; display: block; } }
/* marks for the background */
.mark-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; max-width: none; }
.mark-pad { position: absolute; inset: 0; cursor: none; touch-action: none; }
.mark-pad.cross { cursor: crosshair; }
.brush-ring { position: absolute; border-radius: 50%; border: 2px solid #22c55e; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); transform: translate(-50%, -50%); pointer-events: none; }
.brush-ring.remove { border-color: #ef4444; }
.pick-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--c); display: grid; place-items: center; padding: 0; color: #fff; cursor: pointer; }
.pick .ico { filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.9)); opacity: 0; }
.pick:hover .ico, .pick:focus-visible .ico { opacity: 1; }
.pick:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* collage cells on the stage */
.cell { position: absolute; border-radius: 4px; cursor: grab; touch-action: none; }
.cell:hover { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.35); }
.cell:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.cell.is-sel { box-shadow: inset 0 0 0 3px var(--mark); }
.cell.empty-cell { cursor: pointer; display: grid; place-items: center; }
.cell.drop-on { box-shadow: inset 0 0 0 3px var(--mark); background: var(--mark-soft); }
.cell-add { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); color: var(--text-strong); border: 1px solid var(--line-strong); border-radius: 9999px; padding: 4px 12px; font-weight: 600; font-size: 0.85rem; }
.grip { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--gradient-brand); color: #fff; cursor: move; }

/* the tool panel */
.panel-head { display: flex; flex-direction: column; gap: 4px; }
.panel-head h2 { font-size: 1.35rem; color: var(--text-strong); }
.psec { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--surface-border); padding-top: 16px; min-width: 0; }
.psec-title { font-size: 1rem; color: var(--text-strong); }
.out-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.out-size { font-weight: 600; color: var(--text); }
.go-row { padding-top: 4px; }
.busy-box { display: flex; flex-direction: column; gap: 8px; border-top: 2px solid var(--mark); padding-top: 10px; color: var(--text); }
.busy-box .btn { align-self: flex-start; }
.note.good { color: var(--ok); }
.result { display: flex; flex-direction: column; gap: 12px; border-top: 2px solid var(--ok); padding-top: 12px; }
.result-size { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.result-size b { font-size: 1.7rem; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: var(--text-strong); font-family: 'Space Grotesk', 'Inter', sans-serif; }
.looks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 420px) { .looks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 520px) and (max-width: 1099.98px) { .looks { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.look { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px; border: 2px solid transparent; border-radius: 12px; background: var(--surface); box-shadow: 0 0 0 1px var(--surface-border); font-family: inherit; font-size: 0.78rem; font-weight: 600; color: var(--text-2); cursor: pointer; transition: box-shadow 0.2s ease, color 0.2s ease; }
.look:hover { color: var(--link); box-shadow: 0 0 0 1px var(--brand); }
.look[aria-pressed="true"] { border-color: var(--mark); color: var(--text-strong); }
.look:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.look-pic { width: 100%; height: 56px; object-fit: cover; border-radius: 8px; display: block; max-width: none; background: var(--surface-2); }
.look span { line-height: 1.15; text-align: center; min-height: 2.3em; display: flex; align-items: center; }
.layers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.layer { border: 1px solid var(--surface-border); border-radius: 14px; background: var(--surface); }
.layer.open { border-color: var(--tint-brand-border); box-shadow: var(--surface-shadow); }
.layer.off .layer-title { opacity: 0.55; }
.layer-head { display: flex; align-items: center; gap: 2px; padding: 2px 4px 2px 2px; }
.layer-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; text-align: left; background: none; border: 0; padding: 8px; border-radius: 10px; font-family: inherit; color: var(--text); cursor: pointer; }
.layer-title > span:first-of-type { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.layer-title .hint { flex: none; }
.layer-tools { display: flex; }
.sq-btn { width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); display: inline-grid; place-items: center; padding: 0; flex: none; cursor: pointer; }
.sq-btn:hover { background: var(--surface-2); color: var(--link); }
.sq-btn:focus-visible, .layer-title:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.layer-body { display: flex; flex-direction: column; gap: 14px; padding: 8px 8px 12px; border-top: 1px solid var(--surface-border); }
.text-field textarea { min-height: 64px; }
.place-grid { display: grid; grid-template-columns: repeat(3, 44px); gap: 4px; }
.place { width: 44px; height: 36px; padding: 0; border-radius: 10px; border: 1px solid var(--surface-border); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.place i { width: 10px; height: 10px; border-radius: 3px; background: var(--line-strong); }
.place:hover i { background: var(--mark); }
.place:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* the collage panel */
.tray { display: flex; flex-wrap: wrap; gap: 8px; }
.tray-item { position: relative; }
.tray-pic { width: 64px; height: 64px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: var(--surface-2); display: block; cursor: pointer; }
.tray-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tray-pic:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tray-item.unused .tray-pic { border-style: dashed; border-color: var(--warn); }
.tray-x { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; padding: 0; display: grid; place-items: center; background: var(--surface); color: var(--text-strong); border: 1px solid var(--line-strong); cursor: pointer; }
.tray-x .ico { width: 14px; height: 14px; }
.lays { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 8px; }
.lay { height: 60px; padding: 6px; border-radius: 12px; border: 2px solid transparent; background: var(--surface); box-shadow: 0 0 0 1px var(--surface-border); display: grid; place-items: center; cursor: pointer; font-family: inherit; }
.lay:hover { box-shadow: 0 0 0 1px var(--brand); }
.lay:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.lay[aria-pressed="true"] { border-color: var(--mark); }
.lay-ico { position: relative; width: 100%; height: 100%; display: block; }
.lay-ico i { position: absolute; box-sizing: border-box; border: 1.5px solid var(--surface); background: var(--line-strong); border-radius: 3px; }
.lay[aria-pressed="true"] .lay-ico i { background: var(--mark); opacity: 0.85; }
.rows-lay { grid-column: span 2; display: flex; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--text-2); }

/* dropping files anywhere on the page */
.drop-overlay { position: fixed; inset: 0; z-index: 2900; display: grid; place-items: center; pointer-events: none; background: color-mix(in srgb, var(--bg) 82%, transparent); border: 3px dashed var(--brand); }
.drop-overlay span { background: var(--surface); color: var(--text-strong); border: 1px solid var(--tint-brand-border); border-radius: 14px; padding: 14px 18px; font-weight: 700; box-shadow: var(--surface-shadow); }

/* ----- Phones ----- */
@media (max-width: 639px) {
    .app-hero { margin-bottom: 1.5rem; }
    .app-tagline { font-size: 1rem; }
    .app-toolbar { gap: 10px; }
    /* seven tabs at 16 px do not fit one row on a phone: four, then three, each row full */
    .app-toolbar .view-tabs { width: 100%; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); overflow: visible; border-radius: 24px; }
    .app-toolbar .view-tab { grid-column: span 3; padding: 8px 4px; gap: 5px; min-width: 0; }
    .app-toolbar .view-tab:nth-child(n + 5) { grid-column: span 4; }
    .toolbar-right { width: 100%; }
    .toolbar-right .btn { flex: 1 1 auto; }
    .drop-zone { padding: 2.5rem 1rem; border-radius: 20px; }
    .upload-icon { width: 76px; height: 76px; }
    .upload-icon .dz-ico { width: 36px; height: 36px; }
    .dz-title { font-size: 1.25rem; }
    .toasts { bottom: 16px; right: 16px; left: 16px; align-items: stretch; }
    .toast { min-width: 0; max-width: none; }
    .dialog-body { padding: 16px; }
    .info-section h2 { font-size: 1.4rem; }
    .info-section .info-grid, .info-three { grid-template-columns: 1fr; }
    .info-card { padding: 16px; }
    .step-num { left: 16px; }
}
@media (max-width: 459px) {
    .view-tab .ico { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .btn, .info-card, .dialog, .dialog[open], .toast, .seg button, .chip, .view-tab, .task, .look, .drop-zone, .upload-icon,
    .progress i, .spinner, details.fold > summary::before { transition: none; animation: none; }
}
@media (forced-colors: active) {
    .progress i { forced-color-adjust: none; }
    .crop-box { outline: 2px solid Highlight; }
}
@media print {
    .app-toolbar, .ws-side, .toasts, .theme-toggle { display: none !important; }
}
/* Phones: 16 px text, 44 px tap targets (AdSense audit H-04, 8 Oct 2026). The stage, the look pictures and the layout icons are drawings. */
@media (max-width: 639.98px) {
    main button, main select, main summary, main [role="button"],
    main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="range"]):not([type="color"]) { min-height: 44px; }
    main .seg button, main .view-tab, main .chip, main .small-chip, main .btn.small-btn { min-height: 44px; }
    main .icon-btn, main .sq-btn { width: 44px; height: 44px; min-width: 44px; }
    main .range { min-height: 44px; }
    main .swatch, main .swatch.own { width: 52px; height: 44px; }
    main .dot-btn { width: 44px; height: 44px; }
    main .place-grid { grid-template-columns: repeat(3, 48px); }
    main .place { width: 48px; height: 44px; }
    main .pick { width: 44px; height: 44px; }
    main .tray-x { width: 44px; height: 44px; top: -12px; right: -12px; background: transparent; border: 0; }
    main .tray-x .ico { width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-strong); box-sizing: content-box; }
    main .input.tiny { min-height: 44px; max-width: 6rem; }
    main .check-row input { width: 22px; height: 22px; }
    main .seg button, .dialog .seg button { min-width: 44px; }
    main .check-row, .dialog .check-row { min-height: 44px; align-items: center; }
    main details.fold > summary, .dialog details.fold > summary { min-height: 44px; }
    main :is(p, li, dt, dd, .hint, .label, .unit, .input, kbd, .seg button, .chip, .lead, .btn, .view-tab, .task-sub, .note, .pill,
        .size-label, .shell-hint, .look, .cell-add, .rows-lay, details.fold > summary) { font-size: 1rem; }
    .dialog button, .dialog .btn, .dialog select, .dialog summary,
    .dialog input:not([type="checkbox"]):not([type="range"]):not([type="color"]) { min-height: 44px; }
    .dialog .range { min-height: 44px; }
    .dialog .icon-btn { width: 44px; height: 44px; }
    .dialog .swatch { width: 52px; height: 44px; }
    .dialog :is(p, .hint, .label, .unit, .input, kbd, dt, dd, .seg button, .chip, .btn) { font-size: 1rem; }
}
