
:root {
  --bg: #ECEFEA; --surface: #FFFFFF; --surface-2: #F5F7F3; --ink: #141B18; --muted: #56615B; --line: #D3D9D1; --line-strong: #B9C1B7;
  --accent: #2741D3; --accent-ink: #FFFFFF; --accent-soft: #E2E6FB; --dot: #C7CEC4; --danger: #B3261E; --ok: #1B7A4B; --warn-bg: #FFF4D6; --warn-ink: #6B4B00;
  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif; --f-body: "Archivo", "Helvetica Neue", Arial, sans-serif; --f-mono: "Fragment Mono", ui-monospace, Menlo, Consolas, monospace;
  --paper-shadow: 0 1px 2px rgba(20,27,24,.12), 0 8px 24px -12px rgba(20,27,24,.35);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0E1210; --surface: #161B18; --surface-2: #1C221F; --ink: #E4EAE6; --muted: #98A49D; --line: #2A322E; --line-strong: #3A443F;
  --accent: #8E9DFF; --accent-ink: #0E1210; --accent-soft: #232A4E; --dot: #29312D; --danger: #FF8A80; --ok: #6FD39E; --warn-bg: #3A3016; --warn-ink: #F5D98A; color-scheme: dark;
  --paper-shadow: 0 1px 2px rgba(0,0,0,.5), 0 10px 30px -12px rgba(0,0,0,.8); } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 14px; line-height: 1.5; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.top { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 10px 20px; height: 57px; }
.mark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: 19px; letter-spacing: -0.01em; white-space: nowrap; color: var(--ink); text-decoration: none; }
.mark svg { width: 26px; height: 26px; flex: none; }
.tool-name { color: var(--muted); font-weight: 600; font-size: 14px; border-left: 1px solid var(--line-strong); padding-left: 14px; white-space: nowrap; }
.top .links { margin-left: auto; display: flex; gap: 16px; font-size: 13.5px; }
.top .links a { color: var(--muted); white-space: nowrap; }

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 7px 12px; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; min-height: 34px; }
.btn:hover:not(:disabled) { border-color: var(--ink); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); border-color: var(--accent); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn.quiet:hover:not(:disabled) { color: var(--ink); background: var(--surface-2); }
.btn.danger { color: var(--danger); }
.btn.icon { padding: 6px; min-width: 34px; }
.fld { display: grid; gap: 5px; min-width: 0; }
.fld > label, .fld-label { font-size: 12.5px; font-weight: 600; }
.fld input[type=text], .fld input[type=password], .fld input[type=number], .fld select, .fld textarea, .inp {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 7px; padding: 7px 9px; background: var(--surface); min-width: 0; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.fgrid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wide { grid-column: 1 / -1; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.note { color: var(--muted); font-size: 12.5px; margin: 6px 0 0; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg label { padding: 6px 11px; font-size: 13px; font-weight: 600; cursor: pointer; border-left: 1px solid var(--line); }
.seg label:first-child { border-left: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--ink); color: var(--bg); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.range { display: flex; align-items: center; gap: 10px; }
.range input { flex: 1; accent-color: var(--accent); min-width: 0; }
.range output { font-family: var(--f-mono); font-size: 12px; color: var(--muted); min-width: 3em; text-align: right; }

/* Start screen */
.start { max-width: 1080px; margin: 0 auto; padding: 44px 24px 64px; }
.start h1 { font-family: var(--f-display); font-stretch: 112%; font-weight: 800; font-size: clamp(32px, 5vw, 50px); line-height: 1.04; letter-spacing: -0.025em; max-width: 16ch; }
.start .lede { color: var(--muted); font-size: 18px; max-width: 40em; margin: 14px 0 26px; }
.drop { display: grid; place-items: center; text-align: center; gap: 10px; border: 2px dashed var(--line-strong); border-radius: 16px; padding: 44px 20px; background: var(--surface);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 18px 18px; cursor: pointer; transition: border-color .15s, background-color .15s; }
.drop:hover, body.dragging .drop { border-color: var(--accent); background-color: var(--accent-soft); }
.drop strong { font-size: 19px; }
.drop .btn { pointer-events: none; }
.privacy-line { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--muted); font-size: 13.5px; margin-top: 14px; }
.privacy-line svg { color: var(--ok); }
.tiles-h { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 40px 0 14px; font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.tile { display: grid; grid-template-columns: 38px 1fr; gap: 4px 12px; align-items: start; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px; cursor: pointer; }
.tile:hover { border-color: var(--ink); }
.tile .ic { grid-row: span 2; width: 38px; height: 38px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; color: var(--accent); }
.tile b { font-size: 14.5px; }
.tile span:last-child { color: var(--muted); font-size: 12.5px; line-height: 1.4; }

/* Workspace */
.work { display: flex; flex-direction: column; height: calc(100dvh - 57px); }
.bar { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.tabs { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.tabs button { border: 0; background: transparent; border-radius: 6px; padding: 6px 13px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.bar .sum { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.bar .grp { display: inline-flex; gap: 4px; align-items: center; }
.view { flex: 1; min-height: 0; overflow: auto; }

/* Pages view */
.ptools { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.ptools .sel { font-size: 12.5px; color: var(--muted); margin-right: 6px; min-width: 7em; }
.ptools .sp { flex: 1; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tw, 150px), 1fr)); gap: 22px 18px; padding: 20px 16px 60px; }
.card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; border-radius: 10px; padding: 8px; cursor: default; user-select: none; -webkit-user-select: none; outline: none; }
.card:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.card.sel { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.card:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.card.dragging { opacity: .35; }
.card.drop-before::before, .card.drop-after::after { content: ""; position: absolute; top: 8px; bottom: 30px; width: 3px; border-radius: 2px; background: var(--accent); }
.card.drop-before::before { left: -11px; } .card.drop-after::after { right: -11px; }
.thumb { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1 / 1.25; }
.thumb .paper { position: relative; background: #fff; box-shadow: var(--paper-shadow); max-width: 100%; max-height: 100%; }
.thumb canvas { display: block; width: 100%; height: 100%; }
.thumb svg.items { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.thumb .spin { position: absolute; inset: 0; display: grid; place-items: center; color: #9aa; font-size: 11px; }
.card .lbl { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-family: var(--f-mono); max-width: 100%; }
.card .src { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.card .badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 4px; }
.card .badge { font-size: 10.5px; font-weight: 700; background: var(--ink); color: var(--bg); padding: 1px 6px; border-radius: 99px; }
.card .acts { position: absolute; top: 12px; right: 12px; display: flex; gap: 3px; opacity: 0; transition: opacity .12s; }
.card:hover .acts, .card:focus-within .acts, .card.sel .acts { opacity: 1; }
@media (hover: none) { .card .acts { opacity: 1; } }
.card .acts button { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; padding: 0; }
.card .acts button:hover { border-color: var(--ink); }
.card .acts svg.i { width: 15px; height: 15px; }
.card .tick { position: absolute; bottom: 36px; right: 14px; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; cursor: pointer; padding: 0; }
.card.sel .tick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.card .tick svg { width: 14px; height: 14px; opacity: 0; } .card.sel .tick svg { opacity: 1; }
.addcard { display: grid; place-items: center; align-content: center; gap: 8px; border: 2px dashed var(--line-strong); border-radius: 10px; color: var(--muted); font-weight: 600; cursor: pointer; min-height: 160px; background: transparent; }
.addcard:hover { border-color: var(--accent); color: var(--accent); }

/* Edit view */
.edit { display: grid; grid-template-columns: 56px 132px minmax(0, 1fr) 260px; height: 100%; min-height: 0; }
.tools { display: flex; flex-direction: column; gap: 3px; padding: 8px 7px; border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; }
.tools button { width: 42px; height: 40px; border-radius: 8px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--ink); flex: none; }
.tools button:hover { background: var(--surface-2); }
.tools button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.tools hr { width: 70%; border: 0; border-top: 1px solid var(--line); margin: 4px auto; }
.strip { overflow-y: auto; border-right: 1px solid var(--line); padding: 10px 14px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.strip .card { padding: 4px; } .strip .thumb { aspect-ratio: 1 / 1.3; }
.strip .card .acts, .strip .card .tick { display: none; }
.strip .card.cur { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.stage { position: relative; overflow: auto; background-color: var(--bg); background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 18px 18px; }
.stage-inner { padding: 24px 24px 76px; min-width: min-content; display: flex; justify-content: center; }
.pagebox { position: relative; background: #fff; box-shadow: var(--paper-shadow); flex: none; touch-action: none; }
.pagebox canvas.pg { display: block; width: 100%; height: 100%; }
.pagebox svg.items { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pagebox svg.items { pointer-events: none; }
.pagebox[data-tool="select"] svg.items [data-id] { pointer-events: visiblePainted; cursor: move; touch-action: none; }
.pagebox[data-tool="select"] svg.items [data-id][pointer-events="all"] { pointer-events: all; }
.pagebox[data-tool="select"] { touch-action: pan-x pan-y pinch-zoom; }
.pagebox[data-tool="text"], .pagebox[data-tool="rect"], .pagebox[data-tool="ellipse"], .pagebox[data-tool="line"], .pagebox[data-tool="arrow"], .pagebox[data-tool="ink"],
.pagebox[data-tool="highlight"], .pagebox[data-tool="whiteout"], .pagebox[data-tool="redact"], .pagebox[data-tool="check"], .pagebox[data-tool="cross"], .pagebox[data-tool="crop"] { cursor: crosshair; }
.pagebox[data-tool="text"] { cursor: text; }
.forms { position: absolute; inset: 0; pointer-events: none; }
.forms > * { position: absolute; pointer-events: auto; background: rgba(39, 65, 211, .08); border: 1px solid rgba(39, 65, 211, .45); border-radius: 2px; font-family: Helvetica, Arial, sans-serif; color: #111; padding: 0 3px; margin: 0; }
.forms input[type=checkbox], .forms input[type=radio] { accent-color: #2741D3; padding: 0; }
.forms textarea { resize: none; }
.pagebox:not([data-tool="select"]) .forms > * { pointer-events: none; }
.textlines { position: absolute; inset: 0; pointer-events: none; }
.pagebox[data-tool="edittext"] .textlines { pointer-events: auto; }
.textlines div { position: absolute; cursor: text; border-radius: 2px; }
.textlines div:hover { background: rgba(39, 65, 211, .14); box-shadow: 0 0 0 1px rgba(39, 65, 211, .6); }
.selbox { position: absolute; border: 1.5px solid var(--accent); pointer-events: none; }
.selbox .h { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; background: #fff; border: 1.5px solid #2741D3; border-radius: 3px; pointer-events: auto; touch-action: none; }
.selbox .h[data-h="nw"], .selbox .h[data-h="se"] { cursor: nwse-resize; } .selbox .h[data-h="ne"], .selbox .h[data-h="sw"] { cursor: nesw-resize; }
.selbox .h[data-h="n"], .selbox .h[data-h="s"] { cursor: ns-resize; } .selbox .h[data-h="e"], .selbox .h[data-h="w"] { cursor: ew-resize; }
.selbox .h[data-h="p1"], .selbox .h[data-h="p2"] { cursor: move; border-radius: 50%; }
.draft { position: absolute; border: 1.5px dashed #2741D3; background: rgba(39, 65, 211, .06); pointer-events: none; }
.cropmask { position: absolute; inset: 0; pointer-events: none; }
.texted { position: absolute; z-index: 4; border: 1.5px dashed #2741D3; background: transparent; resize: none; overflow: hidden; padding: 0; margin: 0; line-height: 1.2; white-space: pre-wrap; overflow-wrap: break-word; outline: none; }
.pager { position: sticky; bottom: 12px; display: flex; justify-content: center; pointer-events: none; margin-top: -12px; }
.pager > div { pointer-events: auto; display: inline-flex; gap: 4px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 4px; box-shadow: var(--paper-shadow); font-size: 12.5px; }
.pager span { min-width: 76px; text-align: center; font-family: var(--f-mono); color: var(--muted); }
.props { border-left: 1px solid var(--line); background: var(--surface); overflow-y: auto; padding: 14px 16px 30px; }
.props h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 4px 0 10px; }
.props section + section { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.props .help { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.props .row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.swatches { display: flex; gap: 5px; flex-wrap: wrap; }
.swatches button { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0; }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }
.swatches input[type=color] { width: 28px; height: 28px; border: 0; padding: 0; background: none; cursor: pointer; }
.swatches button.none { background: linear-gradient(135deg, #fff 45%, #d33 45%, #d33 55%, #fff 55%); }
.fieldlist { display: grid; gap: 6px; }
.fieldlist button { text-align: left; border: 1px solid var(--line); background: var(--surface-2); border-radius: 7px; padding: 6px 9px; cursor: pointer; font-size: 12.5px; display: flex; justify-content: space-between; gap: 8px; }
.fieldlist button span:last-child { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50%; }

/* Export view */
.export { max-width: 1100px; margin: 0 auto; padding: 22px 20px 70px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.xcol { display: grid; gap: 16px; }
.xcard { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.xcard.hl { box-shadow: 0 0 0 2px var(--accent); }
.xcard h2 { font-size: 16px; display: flex; gap: 9px; align-items: center; margin-bottom: 4px; }
.xcard h2 svg { color: var(--accent); }
.xcard > p.sub { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.xcard .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.xcard details summary { cursor: pointer; font-weight: 700; font-size: 15px; list-style: none; display: flex; gap: 9px; align-items: center; }
.xcard details summary::-webkit-details-marker { display: none; }
.xcard details summary::after { content: "+"; margin-left: auto; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; }
.xcard details[open] summary::after { content: "–"; }
.xcard details summary svg { color: var(--accent); }
.xcard details summary .on { font-size: 11px; font-weight: 700; color: var(--ok); text-transform: uppercase; letter-spacing: .06em; }
.xcard details > div { padding-top: 12px; }
.main-dl { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 20px; align-items: end; }
.main-dl h2 { font-size: 20px; }
.status { min-height: 1.4em; font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.status.err { color: var(--danger); } .status.ok { color: var(--ok); }
.warnbox { background: var(--warn-bg); color: var(--warn-ink); border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-top: 10px; }

/* Dialogs, toasts, busy */
dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); padding: 0; width: min(560px, calc(100vw - 24px)); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
dialog::backdrop { background: rgba(14, 18, 16, .45); }
dialog form, dialog > div { padding: 20px 22px; }
dialog h2 { font-size: 19px; margin-bottom: 6px; }
dialog .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.sigpad { position: relative; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; touch-action: none; height: 200px; }
.sigpad canvas { width: 100%; height: 100%; display: block; border-radius: 10px; cursor: crosshair; }
.sigpad .base { position: absolute; left: 24px; right: 24px; bottom: 46px; border-top: 1px dashed #b8bfb6; pointer-events: none; }
.sigtype { font-size: 34px; text-align: center; padding: 30px 8px; background: #fff; color: #111; border: 1px solid var(--line-strong); border-radius: 10px; min-height: 108px; overflow: hidden; white-space: nowrap; }
.fontpick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.fontpick button { border: 1px solid var(--line-strong); background: #fff; color: #111; border-radius: 8px; padding: 4px 10px; font-size: 20px; cursor: pointer; }
.fontpick button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.saved-sigs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.saved-sigs .s { position: relative; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px; cursor: pointer; }
.saved-sigs img { height: 40px; display: block; }
.saved-sigs .x { position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); font-size: 12px; line-height: 1; cursor: pointer; padding: 0; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 13.5px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); max-width: calc(100vw - 32px); }
.busy { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; background: rgba(14, 18, 16, .35); }
.busy > div { background: var(--surface); border-radius: 12px; padding: 18px 22px; display: flex; gap: 12px; align-items: center; box-shadow: 0 20px 60px -20px rgba(0,0,0,.5); min-width: 240px; }
.busy .sp { width: 20px; height: 20px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hint { position: absolute; z-index: 95; max-width: 260px; background: var(--ink); color: var(--bg); font-size: 12.5px; line-height: 1.4; font-weight: 500; padding: 7px 10px; border-radius: 7px; box-shadow: 0 8px 22px -8px rgba(20,27,24,.45); pointer-events: none; animation: hint-in .12s ease-out; }
.hint::after { content: ""; position: absolute; left: var(--ax, 50%); bottom: -5px; width: 10px; height: 10px; margin-left: -5px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.hint.below::after { bottom: auto; top: -5px; }
@keyframes hint-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hint, .busy .sp { animation: none; } }

@media (max-width: 1100px) { .edit { grid-template-columns: 56px minmax(0, 1fr) 240px; } .strip { display: none; } }
@media (max-width: 860px) {
  .top { padding: 10px 14px; } .tool-name { display: none; }
  .export { grid-template-columns: minmax(0, 1fr); padding: 14px 12px 60px; } .main-dl { grid-template-columns: minmax(0, 1fr); }
  .edit { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
  .tools { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; padding: 6px; }
  .tools hr { width: 1px; height: 26px; border: 0; border-left: 1px solid var(--line); margin: auto 3px; }
  .props { border-left: 0; border-top: 1px solid var(--line); max-height: 34dvh; padding: 10px 14px 16px; }
  .grid { --tw: 112px; gap: 14px 10px; padding: 14px 10px 50px; }
  .card .acts { display: none; } .card.sel .acts { display: flex; }
  .ptools .range { display: none; }
  .bar { padding: 6px 10px; } .bar .sum { display: none; }
  .fgrid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .start { padding: 26px 16px 50px; }
}

@media (max-width: 440px) { .top { gap: 10px; padding-left: 12px; padding-right: 12px; } .top .mark { font-size: 16px; gap: 8px; } .top .links .all { display: none; } .top .mark svg { width: 24px; height: 24px; } .top .links { gap: 10px; font-size: 13px; } }

a.mark { color: inherit; text-decoration: none; }
