/* Docmend PDF toolkit. Picks up the host page's colours when they exist. */
.tk {
  --tk-brand: var(--brand, #5b4dff);
  --tk-brand2: var(--brand-2, var(--brand2, #9b5cff));
  --tk-ink: var(--ink, #15142b);
  --tk-ink2: var(--ink-2, var(--ink2, #3a3957));
  --tk-muted: var(--muted, #64627f);
  --tk-ok: var(--ok, #0f9d63);
  --tk-bad: var(--bad, #d7334a);
  --tk-card: var(--glass, rgba(255, 255, 255, .72));
  --tk-card2: var(--glass-strong, rgba(255, 255, 255, .9));
  --tk-line: var(--glass-edge, rgba(120, 115, 170, .22));
  --tk-field: var(--field, rgba(255, 255, 255, .9));
  --tk-soft: var(--brand-soft, rgba(91, 77, 255, .1));
  --tk-shadow: var(--glass-shadow, 0 10px 30px -18px rgba(40, 30, 120, .35));
  --tk-r: 16px;
  color: var(--tk-ink);
  font-size: 14px;
  display: block;
}

.tk *, .tk *::before, .tk *::after { box-sizing: border-box; }
.tk :where(button) { font: inherit; color: inherit; cursor: pointer; }
.tk .tk-i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* home */
.tk-home { display: flex; flex-direction: column; gap: 22px; }
.tk-gtitle { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--tk-muted); margin: 0 0 10px; font-weight: 700; }
.tk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.tk-compact .tk-grid { grid-template-columns: 1fr; gap: 8px; }
.tk-card { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 13px; border-radius: var(--tk-r); border: 1px solid var(--tk-line); background: var(--tk-card); box-shadow: var(--tk-shadow); transition: transform .15s, box-shadow .15s, border-color .15s; }
.tk-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tk-brand) 40%, transparent); box-shadow: var(--tk-shadow), 0 14px 30px -18px var(--tk-brand); }
.tk-card:focus-visible { outline: 2px solid var(--tk-brand); outline-offset: 2px; }
.tk-ctext { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tk-ctext b { font-size: 14px; }
.tk-ctext small { color: var(--tk-muted); font-size: 12.5px; line-height: 1.4; }
.tk-compact .tk-card { padding: 11px; }
.tk-compact .tk-ctext small { font-size: 12px; }
.tk-cico, .tk-hico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.tk-cico .tk-i, .tk-hico .tk-i { width: 19px; height: 19px; }
.g-organize { background: linear-gradient(135deg, #5b4dff, #9b5cff); }
.g-optimize { background: linear-gradient(135deg, #14b87a, #0f9d63); }
.g-convert { background: linear-gradient(135deg, #2f7cf6, #34b6ff); }
.g-edit { background: linear-gradient(135deg, #ff5fa2, #b14dff); }

/* tool screen */
.tk-tool { display: flex; flex-direction: column; gap: 14px; }
.tk-head { display: flex; gap: 12px; align-items: center; }
.tk-head h2 { font-size: 19px; margin: 0; letter-spacing: -.01em; }
.tk-head p { margin: 2px 0 0; color: var(--tk-muted); font-size: 13px; }
.tk-back { width: 34px; height: 34px; border-radius: 11px; border: 1px solid var(--tk-line); background: var(--tk-card); display: grid; place-items: center; flex: none; }
.tk-drop { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 26px 14px; border-radius: var(--tk-r); border: 1.5px dashed color-mix(in srgb, var(--tk-brand) 45%, transparent); background: var(--tk-card); text-align: center; cursor: pointer; transition: background .15s, transform .15s; }
.tk-drop:hover, .tk-drop.over { background: var(--tk-soft); transform: translateY(-1px); }
.tk-drop:focus-visible { outline: 2px solid var(--tk-brand); outline-offset: 3px; }
.tk-drop b { font-size: 15px; }
.tk-drop small { color: var(--tk-muted); font-size: 12.5px; }
.tk-dico { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--tk-brand), var(--tk-brand2)); margin-bottom: 4px; }
.tk-drop.small { flex-direction: row; padding: 10px 14px; gap: 10px; justify-content: center; }
.tk-drop.small .tk-dico { width: 30px; height: 30px; margin: 0; border-radius: 10px; }
.tk-drop.small small { display: none; }
.tk-drop.small b { font-size: 13.5px; color: var(--tk-brand); }

.tk-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.tk-file { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 13px; border: 1px solid var(--tk-line); background: var(--tk-card); }
.tk-fico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--tk-soft); color: var(--tk-brand); flex: none; }
.tk-fmeta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tk-fmeta b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-fmeta small { color: var(--tk-muted); font-size: 11.5px; }
.tk-ib { width: 28px; height: 28px; border-radius: 9px; border: 0; background: transparent; display: grid; place-items: center; color: var(--tk-ink2); flex: none; }
.tk-ib:hover:not(:disabled) { background: var(--tk-soft); color: var(--tk-brand); }
.tk-ib:disabled { opacity: .3; cursor: default; }
.tk-ib .tk-i { width: 16px; height: 16px; }

.tk-opts { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--tk-r); border: 1px solid var(--tk-line); background: var(--tk-card); }
.tk-l { font-size: 12px; font-weight: 700; color: var(--tk-ink2); margin-top: 4px; display: block; }
.tk-l small { font-weight: 500; color: var(--tk-muted); }
.tk-in { width: 100%; border: 1px solid var(--tk-line); border-radius: 11px; background: var(--tk-field); padding: 9px 11px; font: inherit; color: var(--tk-ink); }
.tk-in:focus { outline: none; border-color: var(--tk-brand); box-shadow: 0 0 0 3px var(--tk-soft); }
.tk-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 12px; border: 1px solid var(--tk-line); background: var(--tk-field); }
.tk-seg button { border: 0; background: none; border-radius: 9px; padding: 7px 4px; font-size: 12.5px; font-weight: 650; color: var(--tk-muted); }
.tk-seg button[aria-pressed="true"] { background: var(--tk-card2); color: var(--tk-ink); box-shadow: 0 2px 8px -4px rgba(30, 20, 90, .35); }
.tk-row { display: flex; gap: 10px; align-items: flex-end; }
.tk-row > div { flex: 1; min-width: 0; }
.tk-row input[type="range"] { width: 100%; accent-color: var(--tk-brand); }
.tk-colorbox { flex: 0 0 auto !important; }
.tk input[type="color"] { width: 46px; height: 34px; border: 1px solid var(--tk-line); border-radius: 9px; padding: 2px; background: var(--tk-field); }
.tk-check { display: flex; gap: 8px; align-items: center; font-size: 13px; margin-top: 4px; }
.tk-check input { accent-color: var(--tk-brand); width: 16px; height: 16px; }
.tk-hint { color: var(--tk-muted); font-size: 12px; line-height: 1.45; margin: 0; }
.tk-privacy { color: var(--tk-muted); font-size: 11.5px; margin: 0; text-align: center; }

.tk-actions { position: sticky; bottom: 8px; z-index: 3; display: flex; flex-direction: column; gap: 6px; }
.tk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 12px 16px; font-weight: 700; font-size: 14px; }
.tk-primary { color: #fff; background: linear-gradient(135deg, var(--tk-brand), var(--tk-brand2)); box-shadow: 0 12px 26px -12px var(--tk-brand); }
.tk-primary:disabled { opacity: .55; cursor: default; box-shadow: none; }
.tk-run { width: 100%; }
.tk-progress { height: 5px; border-radius: 9px; background: var(--tk-line); overflow: hidden; }
.tk-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--tk-brand), #34b6ff); transition: width .2s; }
.tk-spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: tkspin .7s linear infinite; display: inline-block; }
@keyframes tkspin { to { transform: rotate(360deg); } }
.tk-link { border: 0; background: none; padding: 0; color: var(--tk-brand); font-weight: 650; font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; }
.tk-link .tk-i { width: 15px; height: 15px; }
.tk-loading { display: flex; gap: 8px; align-items: center; color: var(--tk-muted); padding: 18px; justify-content: center; }

.tk-result { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--tk-r); border: 1px solid color-mix(in srgb, var(--tk-ok) 35%, transparent); background: color-mix(in srgb, var(--tk-ok) 8%, var(--tk-card)); }
.tk-done { display: flex; gap: 10px; align-items: center; }
.tk-done b { display: block; font-size: 14px; }
.tk-done small { color: var(--tk-muted); font-size: 12.5px; }
.tk-dbadge { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--tk-ok); flex: none; }
.tk-outs { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow: auto; display: grid; gap: 4px; }
.tk-outs li { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 4px 2px; border-bottom: 1px solid var(--tk-line); }
.tk-outs li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-preview { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; resize: vertical; }
.tk-next { display: flex; justify-content: center; }

/* organize */
.tk-otools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.tk-ocount { font-weight: 700; font-size: 13px; margin-right: auto; }
.tk-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.tk-compact .tk-pages { grid-template-columns: repeat(2, 1fr); }
.tk-pg { position: relative; border-radius: 12px; border: 1px solid var(--tk-line); background: var(--tk-card); padding: 8px 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: grab; user-select: none; }
.tk-pg.dragging { opacity: .4; }
.tk-pg.drop-before { box-shadow: -4px 0 0 var(--tk-brand); }
.tk-pg.drop-after { box-shadow: 4px 0 0 var(--tk-brand); }
.tk-pg.removed { opacity: .45; }
.tk-pg.removed .tk-pgimg { filter: grayscale(1); }
.tk-pgimg { width: 100%; aspect-ratio: 3 / 4; display: grid; place-items: center; }
.tk-pgimg img { max-width: 100%; max-height: 100%; box-shadow: 0 2px 10px -4px rgba(0, 0, 0, .35); background: #fff; transform: rotate(var(--r)) scale(var(--s, 1)); transition: transform .2s; }
.tk-pgno { position: absolute; top: 6px; left: 8px; font-size: 11px; font-weight: 700; background: var(--tk-card2); border-radius: 999px; padding: 1px 7px; }
.tk-pgbar { display: flex; gap: 2px; }

/* edit */
.tk-etool { position: sticky; top: 0; z-index: 4; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px; border-radius: 14px; border: 1px solid var(--tk-line); background: var(--tk-card2); box-shadow: var(--tk-shadow); }
.tk-etool [data-et] { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; border-radius: 9px; padding: 6px 8px; font-size: 12.5px; font-weight: 650; color: var(--tk-ink2); }
.tk-etool [data-et][aria-pressed="true"] { background: var(--tk-soft); color: var(--tk-brand); }
.tk-compact .tk-etool [data-et] span { display: none; }
.tk-esep { flex: 1; }
.tk-sw { display: inline-flex; gap: 5px; align-items: center; }
.tk-sw button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--tk-line); cursor: pointer; padding: 0; }
.tk-sw button:hover { transform: scale(1.12); }
.tk-eopt select { border: 1px solid var(--tk-line); border-radius: 9px; background: var(--tk-field); padding: 6px; font: inherit; color: var(--tk-ink); }
.tk-eopt input[type="color"] { width: 34px; height: 30px; }
.tk-epages { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.tk-epage { position: relative; width: 100%; max-width: 760px; background: #fff; box-shadow: 0 6px 24px -10px rgba(20, 15, 70, .4); border-radius: 4px; overflow: hidden; }
.tk-epage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tk-layer { position: absolute; inset: 0; touch-action: none; }
.tk-epages[data-mode="text"] .tk-layer { cursor: text; }
.tk-epages[data-mode="highlight"] .tk-layer, .tk-epages[data-mode="rect"] .tk-layer, .tk-epages[data-mode="whiteout"] .tk-layer, .tk-epages[data-mode="ink"] .tk-layer { cursor: crosshair; }
.tk-epno { position: absolute; right: 8px; bottom: 6px; font-size: 11px; color: #777; background: rgba(255, 255, 255, .85); border-radius: 6px; padding: 1px 6px; pointer-events: none; }
.tk-item { position: absolute; }
.tk-item.sel { outline: 1.5px dashed var(--tk-brand); outline-offset: 2px; }
.tk-item.t-rect { border: 2px solid #d92d4a; }
.tk-item.t-whiteout { background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.tk-item.t-highlight { background: rgba(255, 225, 77, .38); mix-blend-mode: multiply; }
.tk-item img { width: 100%; height: 100%; display: block; pointer-events: none; }
.tk-isvg { width: 100%; height: 100%; overflow: visible; display: block; }
.tk-itext { min-width: 30px; white-space: pre; line-height: 1.15; font-family: Helvetica, Arial, sans-serif; outline: none; padding: 0 1px; cursor: text; }
.tk-itext:empty::before { content: 'Type here'; color: rgba(0, 0, 0, .35); }
.tk-idel { position: absolute; top: -11px; right: -11px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--tk-bad); color: #fff; font-size: 14px; line-height: 1; display: none; z-index: 2; }
.tk-item.sel .tk-idel { display: block; }
.tk-ires { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; border-radius: 3px; background: var(--tk-brand); cursor: nwse-resize; display: none; }
.tk-item.sel .tk-ires { display: block; }
.tk-item:not(.t-text) { cursor: move; }
.tk-form details { border-radius: var(--tk-r); border: 1px solid var(--tk-line); background: var(--tk-card); padding: 10px 14px; }
.tk-form summary { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.tk-form summary small { color: var(--tk-muted); margin-left: auto; }
.tk-fields { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 360px; overflow: auto; padding-right: 4px; }
.tk-flat { margin-top: 10px; }

/* ---------- website frame (docmend.app/tools) ---------- */
.tk-plan { border: 1px solid var(--tk-line, rgba(120,115,170,.22)); background: rgba(255,255,255,.75); border-radius: 999px; padding: 6px 12px; font: 600 12.5px/1 inherit; color: #3a3957; cursor: pointer; }
.tk-plan.pro { color: #fff; border-color: transparent; background: linear-gradient(135deg, #5b4dff, #9b5cff); }
.tk-toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 60; max-width: min(520px, calc(100vw - 32px)); padding: 11px 16px; border-radius: 13px; background: #15142b; color: #fff; font-size: 13.5px; box-shadow: 0 14px 40px -12px rgba(0,0,0,.45); transition: opacity .2s, transform .2s; }
.tk-toast.show { opacity: 1; transform: translate(-50%, 0); }
.tk-toast.err { background: #b3263c; }
.tk-sheetback { position: fixed; inset: 0; z-index: 50; background: rgba(10,10,30,.4); backdrop-filter: blur(5px); display: grid; place-items: center; padding: 16px; }
.tk-sheet { position: relative; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #fff; color: #15142b; border-radius: 22px; padding: 26px 22px 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 80px -20px rgba(20,16,80,.5); }

.tk-sheet h2 { margin: 0; font-size: 21px; }
.tk-sclose { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 24px; line-height: 1; color: inherit; cursor: pointer; opacity: .6; }
.tk-ulist { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: 13.5px; }
.tk-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tk-price { display: flex; flex-direction: column; padding: 11px 13px; border-radius: 14px; border: 1px solid rgba(120,115,170,.25); text-decoration: none; color: inherit; }
.tk-price b { font-size: 22px; }
.tk-price span { font-size: 12px; opacity: .7; }
.tk-price.alt { border-color: #5b4dff; background: rgba(91,77,255,.08); }
.tk-wide { width: 100%; text-decoration: none; }
.tk-ghost { background: rgba(91,77,255,.1); color: #4636e6; }
.tk-licform .tk-row { align-items: stretch; }
.tk-sigpad { min-height: 170px; }

@media (max-width: 600px) { .tk-etool [data-et] span { display: none; } .tk-etool [data-et] { padding: 7px; } }

/* ---- more tools (Oct 2026) */
.g-scan { background: linear-gradient(135deg, #f59e0b, #f2633a); }
.tk .tk-sr { position: absolute; left: -9999px; }
/* remove pages: click to pick */
.tk-pg.pick { cursor: pointer; }
.tk-pg.pick:hover { border-color: var(--tk-brand); }
.tk-pg.pick:focus-visible { outline: 2px solid var(--tk-brand); outline-offset: 2px; }
.tk-pgx { position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--tk-card2); border: 1px solid var(--tk-line); color: var(--tk-muted); }
.tk-pgx .tk-i { width: 14px; height: 14px; }
.tk-pg.pick.removed { opacity: 1; border-color: var(--tk-bad); background: color-mix(in srgb, var(--tk-bad) 6%, var(--tk-card)); }
.tk-pg.pick.removed .tk-pgimg { opacity: .35; }
.tk-pg.pick.removed .tk-pgx { background: var(--tk-bad); border-color: var(--tk-bad); color: #fff; }
/* crop */
.tk-cropwrap { display: flex; justify-content: center; padding: 8px 0; }
.tk-croppage { position: relative; width: min(520px, 100%); background: #fff; border: 1px solid var(--tk-line); border-radius: 6px; overflow: hidden; touch-action: none; box-shadow: var(--tk-shadow); }
.tk-croppage canvas { display: block; width: 100%; height: 100%; }
.tk-cropbox { position: absolute; border: 2px solid var(--tk-brand); box-shadow: 0 0 0 9999px rgba(21, 20, 43, .45); cursor: move; outline: none; }
.tk-cropbox:focus-visible { border-color: #fff; }
.tk-cropbox i { position: absolute; width: 18px; height: 18px; background: #fff; border: 2px solid var(--tk-brand); border-radius: 50%; }
.tk-cropbox i[data-h=nw] { left: -10px; top: -10px; cursor: nwse-resize; } .tk-cropbox i[data-h=ne] { right: -10px; top: -10px; cursor: nesw-resize; }
.tk-cropbox i[data-h=sw] { left: -10px; bottom: -10px; cursor: nesw-resize; } .tk-cropbox i[data-h=se] { right: -10px; bottom: -10px; cursor: nwse-resize; }
.tk-cropnums { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--tk-muted); font-variant-numeric: tabular-nums; }
/* compare */
.tk-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tk-cmpside { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tk-cmphead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tk-cmphead b { font-size: 15px; }
.tk-cmpopen { cursor: pointer; }
.tk-cmptext { min-height: 220px; resize: vertical; font-size: 13.5px; line-height: 1.5; }
.tk-diffkey { display: flex; gap: 8px; margin: 10px 0 6px; font-size: 12.5px; font-weight: 600; }
.tk-diffkey span { padding: 2px 9px; border-radius: 6px; }
.tk-diffkey .add, .tk-diff ins { background: #d6f5e3; color: #0b5d36; text-decoration: none; }
.tk-diffkey .del, .tk-diff del { background: #fde0e4; color: #9b1c2c; }
.tk-diff { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 460px; overflow: auto; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--tk-line); background: var(--tk-field); font-size: 14px; line-height: 1.6; }
.tk-diff ins, .tk-diff del { border-radius: 4px; padding: 0 2px; }
/* signature */
.tk-stage .sp-tabs, .tk-stage .sp-area { max-width: 620px; }
.tk-sigout { display: flex; justify-content: center; margin: 12px 0; padding: 18px; border-radius: 12px; border: 1px dashed var(--tk-line); background-color: #fff; background-image: linear-gradient(45deg, #f1f0f7 25%, transparent 25%), linear-gradient(-45deg, #f1f0f7 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f1f0f7 75%), linear-gradient(-45deg, transparent 75%, #f1f0f7 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.tk-sigout img { max-width: 100%; max-height: 140px; }
@media (max-width: 640px) { .tk-cmp { grid-template-columns: 1fr; } }

/* ---- image tools (Oct 2026) */
.g-imgsize { background: linear-gradient(135deg, #00a99b, #21c4f0); }
.g-imgconv { background: linear-gradient(135deg, #2f7bff, #5b4dff); }
.g-imgedit { background: linear-gradient(135deg, #c13cff, #ff5fa2); }
.g-imgform { background: linear-gradient(135deg, #ff8a3d, #ff3b6b); }
.ti-boxwrap { display: flex; justify-content: center; padding: 6px 0; }
.ti-boxpage { position: relative; width: min(560px, 100%); max-height: 70vh; border: 1px solid var(--tk-line); border-radius: 8px; overflow: hidden; touch-action: none; background: #fff; box-shadow: var(--tk-shadow); }
.ti-boxpage canvas { display: block; width: 100%; height: 100%; }
.ti-box { position: absolute; border: 2px solid var(--tk-brand); box-shadow: 0 0 0 9999px rgba(21, 20, 43, .42); cursor: move; outline: none; touch-action: none; }
.ti-box.round { border-radius: 50%; }
.ti-box:focus-visible { border-color: #fff; }
.ti-box i { position: absolute; width: 20px; height: 20px; background: #fff; border: 2px solid var(--tk-brand); border-radius: 50%; touch-action: none; }
.ti-box i[data-h=nw] { left: -11px; top: -11px; cursor: nwse-resize; } .ti-box i[data-h=ne] { right: -11px; top: -11px; cursor: nesw-resize; }
.ti-box i[data-h=sw] { left: -11px; bottom: -11px; cursor: nesw-resize; } .ti-box i[data-h=se] { right: -11px; bottom: -11px; cursor: nwse-resize; }
.ti-ratios { margin-bottom: 8px; flex-wrap: wrap; }
.ti-paint { cursor: crosshair; }
.ti-area { position: absolute; border: 2px solid var(--tk-brand); background: rgba(91, 77, 255, .08); cursor: move; }
.ti-area.ghost { border-style: dashed; pointer-events: none; }
.ti-area button { position: absolute; right: -10px; top: -10px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--tk-bad); color: #fff; font: 700 14px/22px system-ui, sans-serif; cursor: pointer; padding: 0; }
.ti-turnprev { display: flex; justify-content: center; align-items: center; min-height: 240px; padding: 20px; }
.ti-turnprev canvas { max-width: 100%; max-height: 300px; border-radius: 8px; box-shadow: var(--tk-shadow); transition: transform .25s; }
.ti-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 12px; }
.ti-chips button { border: 1px solid var(--tk-line); background: var(--tk-field); border-radius: 999px; padding: 8px 13px; font-weight: 600; font-size: 13.5px; font-family: inherit; color: var(--tk-ink); cursor: pointer; }
.ti-chips button[aria-pressed=true] { border-color: var(--tk-brand); background: var(--tk-soft); color: var(--tk-brand); }
.ti-chips button:focus-visible { outline: 2px solid var(--tk-brand); outline-offset: 2px; }
.ti-note { font-size: 13.5px; color: var(--tk-ink2); background: var(--tk-soft); border-radius: 10px; padding: 9px 12px; margin: 10px 0 0; }
.ti-spec { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 12px 0 8px; }
.ti-spec code { font: 600 13px ui-monospace, 'Geist Mono', Menlo, monospace; color: var(--tk-brand); background: var(--tk-soft); padding: 7px 11px; border-radius: 9px; }
.ti-edit { flex-wrap: wrap; margin-bottom: 8px; } .ti-edit > div { flex: 1 1 100px; }
.ti-work { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 6px; }
@media (max-width: 760px) { .ti-work { grid-template-columns: 1fr; } }
.tk-compact .ti-work { grid-template-columns: 1fr; }
.ti-tools { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-top: 6px; }
.ti-tools .tk-hint { margin: 0; }
.ti-right { display: grid; gap: 10px; align-content: start; }
.ti-right .tk-check { align-items: flex-start; font-size: 14px; }
.ti-right .tk-check small { display: block; color: var(--tk-muted); font-size: 12.5px; }
.ti-res { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px; border-radius: 14px; background: color-mix(in srgb, var(--tk-ok) 9%, var(--tk-card)); border: 1px solid color-mix(in srgb, var(--tk-ok) 28%, transparent); }
.ti-resimg { background: #fff; border-radius: 8px; border: 1px solid var(--tk-line); display: grid; place-items: center; padding: 4px; min-height: 60px; }
.ti-resimg img { display: block; max-width: 100%; max-height: 120px; height: auto; }
.ti-big { display: block; font: 800 30px/1 var(--display, 'Bricolage Grotesque', system-ui, sans-serif); color: var(--tk-ok); font-variant-numeric: tabular-nums; }
.ti-big.bad { color: var(--tk-bad); }
.ti-checks { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 3px; font-size: 13px; }
.ti-checks li::before { content: "✓"; color: var(--tk-ok); font-weight: 800; margin-right: 7px; }
.ti-checks li.bad { color: var(--tk-bad); } .ti-checks li.bad::before { content: "!"; color: var(--tk-bad); }
.ti-small { font-size: 12.5px; margin-top: 10px; }
.tk-sigout.ti-out img { max-height: 260px; }
