/* StipCoach PDF Converter (#/pdf). Builds on the tokens in styles.css. Calm, roomy, one primary action per step. */
.pdft { --pt-r: 22px; padding-top: 24px; }
.pdft .i.xs { width: 14px; height: 14px; }

/* ---------- hero ---------- */
.pt-hero.phead { padding: 52px 56px 112px; margin-bottom: 0; }
.pt-hero .phead-in { max-width: 760px; }
.pt-hero h1 { font: 800 64px/1 "Inter Tight", Inter, sans-serif; letter-spacing: -0.045em; }
.pt-safe { display: inline-flex; align-items: flex-start; gap: 12px; margin-top: 26px; padding: 12px 16px 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .13); color: #C7D2E3; font-size: 14.5px; line-height: 1.5; max-width: 640px; }
.pt-safe svg { color: var(--gold); width: 20px; height: 20px; margin-top: 1px; }
.pt-safe b { color: #fff; font-weight: 600; }

/* ---------- drop zone ---------- */
.pt-drop { position: relative; z-index: 2; margin: -72px 40px 0; }
.dz { width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 44px 24px 30px; background: #fff; border-radius: var(--pt-r); border: 2px dashed #C9D3E2; box-shadow: 0 1px 2px rgba(11, 31, 58, .04), 0 22px 48px -24px rgba(11, 31, 58, .32); transition: border-color .2s, background .2s, box-shadow .2s, transform .2s var(--ease); animation: fadeUp .45s .1s cubic-bezier(.2, .8, .2, 1) both; }
.dz:hover { border-color: #9DB3E8; }
.pdft.dragging .dz, .pdft.dragging .dz-bar { border-color: var(--blue); background: var(--blue-25); box-shadow: 0 0 0 6px rgba(30, 94, 255, .12), 0 22px 48px -24px rgba(11, 31, 58, .32); transform: scale(1.005); }
.dz-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); margin-bottom: 12px; transition: transform .25s var(--ease); }
.dz-ic svg { width: 26px; height: 26px; }
.dz:hover .dz-ic, .pdft.dragging .dz-ic { transform: translateY(-3px); }
.dz-h { font: 700 24px/1.2 "Inter Tight", Inter, sans-serif; letter-spacing: -0.03em; color: var(--navy); }
.dz-s { font-size: 15.5px; color: var(--muted); }
.dz-btn { margin-top: 18px; pointer-events: none; }
.dz-f { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 13px; color: var(--subtle); }
.dz-f svg { color: #4C9A6A; }

.dz-bar { display: flex; align-items: center; gap: 14px; padding: 16px 16px 16px 20px; background: #fff; border-radius: var(--pt-r); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(11, 31, 58, .04), 0 18px 40px -24px rgba(11, 31, 58, .28); transition: border-color .2s, background .2s, box-shadow .2s; }
.dz-bar-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); flex: none; }
.dz-bar-tx { flex: 1; min-width: 0; }
.dz-bar-tx b { display: block; font-weight: 600; font-size: 15.5px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-bar-tx span { font-size: 13.5px; color: var(--muted); }
.dz-bar-act { display: flex; align-items: center; gap: 4px; flex: none; }

/* ---------- tool cards ---------- */
.pt-pick { margin-top: 48px; }
.pt-h { font: 600 13px/1 Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 4px 16px; }
.pt-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tc { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; text-align: left; padding: 20px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-xs); transition: border-color .15s, box-shadow .2s var(--ease), transform .2s var(--ease), background .15s; }
.tc:hover { border-color: #C3CEDE; box-shadow: var(--sh-md); transform: translateY(-2px); }
.tc.on { border-color: var(--blue); background: var(--blue-25); box-shadow: 0 0 0 3px rgba(30, 94, 255, .14); transform: none; }
.tc-tx b { display: block; font: 700 16.5px/1.25 "Inter Tight", Inter, sans-serif; letter-spacing: -0.02em; color: var(--navy); margin-bottom: 4px; }
.tc-tx span { display: block; font-size: 14px; line-height: 1.5; color: var(--muted); }
.tc-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.tc-ic.b { background: var(--blue-50); color: var(--blue); }
.tc-ic.a { background: var(--amber-bg); color: #B97800; }
.tc-ic.n { background: var(--navy); color: #fff; }
.tc-ic.g { background: var(--bg); color: var(--muted); }
.tc-tip { background: var(--bg); border-style: dashed; box-shadow: none; }
.tc-tip.on { background: #fff; border-color: var(--line-2); box-shadow: var(--sh-sm); }

/* compact cards once files are loaded */
.pt-tools.compact { gap: 10px; }
.pt-tools.compact .tc { flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; }
.pt-tools.compact .tc-ic { width: 36px; height: 36px; border-radius: 10px; }
.pt-tools.compact .tc-ic svg { width: 17px; height: 17px; }
.pt-tools.compact .tc-tx span { display: none; }
.pt-tools.compact .tc-tx b { margin: 0; font-size: 15px; }

/* Word / Excel tip */
.pt-tip { margin-top: 14px; padding: 22px 24px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-sm); animation: fadeUp .3s cubic-bezier(.2, .8, .2, 1) both; }
.tip-h { display: flex; gap: 14px; align-items: flex-start; }
.tip-h > div { flex: 1; min-width: 0; }
.tip-h b { font: 700 17px/1.3 "Inter Tight", Inter, sans-serif; color: var(--navy); letter-spacing: -0.02em; }
.tip-h p { color: var(--body); font-size: 14.5px; margin-top: 4px; }
.tip-l { list-style: none; margin: 16px 0 0 56px; display: grid; gap: 8px; }
.tip-l li { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; font-size: 14.5px; padding: 10px 14px; border-radius: 10px; background: var(--bg); }
.tip-l b { color: var(--navy); font-weight: 600; }
.tip-l span { color: var(--body); }
.pt-x { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); flex: none; }
.pt-x:hover { background: var(--bg); color: var(--navy); }

/* ---------- workspace ---------- */
.pt-work { margin-top: 28px; padding: 28px; border-radius: 24px; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(11, 31, 58, .04), 0 24px 56px -32px rgba(11, 31, 58, .28); scroll-margin-top: 88px; animation: fadeUp .35s cubic-bezier(.2, .8, .2, 1) both; }
.pw-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.pw-ht { flex: 1; min-width: 0; }
.pw-ht h2 { font: 700 22px/1.2 "Inter Tight", Inter, sans-serif; letter-spacing: -0.03em; }
.pw-ht p { color: var(--muted); font-size: 15px; margin-top: 2px; }
.pw-meta { flex: none; font-size: 13px; font-weight: 500; color: var(--muted); background: var(--bg); padding: 6px 12px; border-radius: 999px; }
.pw-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-bottom: 18px; }
.pw-body { min-height: 60px; }
.pw-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.pw-optwrap { min-width: 0; flex: 1; }
.pw-opts { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 12px; padding: 16px 18px; border-radius: 14px; background: var(--bg); }
.opt { display: flex; align-items: center; gap: 12px; }
.opt > span { font-size: 14px; font-weight: 500; color: var(--body); }

.pw-go { position: relative; overflow: hidden; min-width: 220px; height: 52px; font-size: 16px; border-radius: 14px; flex: none; isolation: isolate; }
.pw-go.busy { opacity: 1 !important; background: var(--navy); pointer-events: none; }
.pw-go.busy::before { content: ""; position: absolute; inset: 0; z-index: -1; width: var(--p, 0%); background: var(--blue); transition: width .25s var(--ease); }
.pw-go.busy svg { display: none; }

/* small controls */
.pt-ghostbtn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 10px; font-size: 14.5px; font-weight: 500; color: var(--body); transition: background .15s, color .15s; white-space: nowrap; }
.pt-ghostbtn:hover { background: var(--bg); color: var(--navy); }
.pt-ghostbtn[hidden] { display: none; }
.pt-link { color: var(--blue); font-weight: 600; }
.pt-iconbtn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--navy); border: 1px solid var(--line); background: #fff; flex: none; }
.pt-iconbtn:hover { border-color: var(--blue); color: var(--blue); }
.pt-seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 12px; background: var(--bg-2); }
.pt-seg button { height: 34px; padding: 0 14px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--body); transition: background .15s, color .15s, box-shadow .15s; white-space: nowrap; }
.pt-seg button:hover { color: var(--navy); }
.pt-seg button.on { background: #fff; color: var(--navy); font-weight: 600; box-shadow: 0 1px 2px rgba(11, 31, 58, .08), 0 2px 6px rgba(11, 31, 58, .06); }
.pt-field { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 6px 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; transition: border-color .15s, box-shadow .15s; }
.pt-field:focus-within { border-color: var(--blue); box-shadow: var(--ring); }
.pt-field span { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.pt-field input { border: 0; outline: 0; background: none; width: 190px; height: 40px; font: 500 16px "Geist Mono", ui-monospace, monospace; color: var(--navy); }
.pt-field.grow { flex: 1; min-width: 220px; }
.pt-field.grow input { width: 100%; }
.pt-field input::placeholder { color: #A7B2C3; font-family: Inter, sans-serif; font-weight: 400; }
.pt-err { color: var(--red); font-size: 14px; margin: -8px 0 14px 4px; }
.pt-err[hidden] { display: none; }
.pt-hint { color: var(--muted); font-size: 14px; margin: -6px 0 16px 4px; }
.pt-hint.inline { margin: 0 0 0 4px; }
.pt-hint b { font-family: "Geist Mono", ui-monospace, monospace; font-weight: 500; color: var(--navy); }
.pt-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--amber-bg); color: #6E4A07; font-size: 14px; line-height: 1.5; }
.pt-note svg { flex: none; margin-top: 1px; }
.pt-empty { padding: 40px 0; text-align: center; color: var(--muted); }

/* page grid */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 18px 16px; }
.pg { position: relative; display: block; text-align: center; border-radius: 14px; padding: 8px 8px 10px; background: #fff; border: 1px solid transparent; transition: background .15s, border-color .15s, box-shadow .15s, transform .15s; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.pg-th { position: relative; aspect-ratio: 4 / 5; border-radius: 8px; background: var(--bg); display: grid; place-items: center; overflow: hidden; }
.pg-th img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .25s; filter: drop-shadow(0 1px 2px rgba(11, 31, 58, .14)); -webkit-user-drag: none; pointer-events: none; }
.pg-th img.on { opacity: 1; }
.pg-n { display: block; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
button.pg:hover { background: var(--bg); }
.pg-ck { position: absolute; top: 14px; right: 14px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); border: 1.5px solid #C2CCDA; color: transparent; transition: background .15s, border-color .15s, color .15s, transform .15s; }
.pg.on { background: var(--blue-25); border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30, 94, 255, .12); }
.pg.on .pg-ck { background: var(--blue); border-color: var(--blue); color: #fff; transform: scale(1.06); }
.pg.on .pg-n { color: var(--blue); }
.pg.drag { cursor: grab; }
.pg.drag:hover { background: var(--bg); }
.pg-act { display: flex; justify-content: center; gap: 2px; margin-top: 6px; }
.pg-act button, .fr-act button { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); transition: background .15s, color .15s; }
.pg-act button:hover, .fr-act button:hover { background: #fff; color: var(--navy); box-shadow: var(--sh-xs); }
.pg-act button.del:hover, .fr-act button.del:hover { color: var(--red); }
.pg.drag .pg-n { margin-top: 6px; }
.pg-g { position: absolute; left: 14px; top: 14px; font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--navy); color: #fff; }
.pg-g.g1 { background: var(--blue); } .pg-g.g2 { background: #B97800; } .pg-g.g3 { background: #0E7C66; } .pg-g.g4 { background: #7A4BD1; } .pg-g.g5 { background: #C2410C; } .pg-g.g0 { background: var(--navy); }

/* file list */
.fl { display: grid; gap: 10px; }
.fr { display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 8px; border-radius: 14px; background: var(--bg); border: 1px solid transparent; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; transition: background .15s, border-color .15s; }
#ptList .fr { cursor: grab; }
#ptList .fr:hover { border-color: var(--line-2); }
.fl.static .fr { padding-left: 10px; }
.fr-grip { color: #A5B0C0; display: grid; place-items: center; width: 22px; flex: none; }
.fr-th { width: 48px; height: 60px; border-radius: 7px; background: #fff; overflow: hidden; flex: none; box-shadow: var(--sh-xs); }
.fr-th img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .25s; pointer-events: none; -webkit-user-drag: none; }
.fr-th img.on { opacity: 1; }
.fr-tx { flex: 1; min-width: 0; }
.fr-tx b { display: block; font-weight: 600; color: var(--navy); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-tx span { font-size: 13.5px; color: var(--muted); }
.fr-act { display: flex; gap: 2px; flex: none; }
.pt-addrow { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; margin-top: 10px; border-radius: 14px; border: 1.5px dashed var(--line-2); color: var(--body); font-weight: 500; font-size: 14.5px; transition: border-color .15s, color .15s, background .15s; }
.pt-addrow:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-25); }

/* dragging */
.pt-ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; margin: 0; background: #fff !important; border-color: var(--line-2) !important; box-shadow: 0 24px 48px -12px rgba(11, 31, 58, .35); opacity: .96; border-radius: 14px; }
.pt-dragging { opacity: .3; }
.pt-nosel, .pt-nosel * { -webkit-user-select: none !important; user-select: none !important; cursor: grabbing !important; }

/* ---------- results ---------- */
.pt-res { margin-top: 20px; padding: 28px; border-radius: 24px; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(11, 31, 58, .04), 0 24px 56px -32px rgba(11, 31, 58, .28); scroll-margin-top: 88px; animation: fadeUp .35s cubic-bezier(.2, .8, .2, 1) both; }
.pr-head { display: flex; align-items: center; gap: 14px; }
.pr-head h2 { font: 700 22px/1.2 "Inter Tight", Inter, sans-serif; letter-spacing: -0.03em; }
.pr-head p { color: var(--muted); font-size: 15px; margin-top: 2px; }
.pr-ok { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #E3F5EA; color: #13804A; flex: none; }
.rc { display: flex; align-items: center; gap: 18px; margin-top: 22px; padding: 18px 22px; border-radius: 16px; background: var(--bg); }
.rc > div span { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rc > div b { font: 700 28px/1.15 "Inter Tight", Inter, sans-serif; letter-spacing: -0.03em; color: var(--navy); font-variant-numeric: tabular-nums; }
.rc > div.good b { color: #13804A; }
.rc-ar { color: var(--subtle); }
.rlist { display: grid; gap: 10px; margin-top: 20px; }
.rr { display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 14px; border-radius: 14px; border: 1px solid var(--line); }
.rr-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--red-bg); color: var(--red); flex: none; }
.rr-tx { flex: 1; min-width: 0; }
.rr-tx b { display: block; font-weight: 600; color: var(--navy); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-tx span { font-size: 13.5px; color: var(--muted); }
.rr-act { display: flex; gap: 8px; flex: none; }
.rr-act .btn { height: 38px; padding: 0 14px; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 16px; margin-top: 20px; }
.ri-th { display: block; aspect-ratio: 4 / 5; border-radius: 10px; background: var(--bg); overflow: hidden; }
.ri-th img { width: 100%; height: 100%; object-fit: contain; }
.ri-b { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.pr-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.pr-foot .btn-lg { height: 52px; border-radius: 14px; font-size: 15.5px; }
.pr-foot .pt-ghostbtn { margin-left: auto; }

/* ---------- dialog + toast ---------- */
.pt-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(7, 21, 40, .45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: ptFade .2s both; }
.pt-dlg { width: 100%; max-width: 420px; background: #fff; border-radius: 22px; padding: 26px; box-shadow: var(--sh-lg); }
.pt-dlg h3 { font: 700 20px/1.25 "Inter Tight", Inter, sans-serif; margin: 14px 0 6px; }
.pt-dlg p { color: var(--body); font-size: 14.5px; }
.pt-dlg input { width: 100%; height: 48px; margin-top: 16px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); font-size: 16px; outline: 0; }
.pt-dlg input:focus { border-color: var(--blue); box-shadow: var(--ring); }
.dlg-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.pt-toast { position: fixed; left: 50%; bottom: 24px; z-index: 130; max-width: min(520px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 14px; background: var(--navy); color: #fff; font-size: 14.5px; box-shadow: var(--sh-lg); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
.pt-toast.on { opacity: 1; transform: translate(-50%, 0); }
@keyframes ptFade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .pt-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-tools.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- phone ---------- */
@media (max-width: 860px) {
  .pdft { padding-top: 12px; }
  .pt-hero.phead { padding: 28px 20px 88px; }
  .pt-hero h1 { font-size: 44px; }
  .pt-safe { margin-top: 18px; font-size: 13.5px; padding: 12px 14px; }
  .pt-drop { margin: -64px 10px 0; }
  .dz { padding: 30px 18px 22px; }
  .dz-ic { width: 52px; height: 52px; border-radius: 16px; margin-bottom: 8px; }
  .dz-h { font-size: 20px; }
  .dz-s { font-size: 14.5px; }
  .dz-btn { width: 100%; height: 52px; margin-top: 16px; }
  .dz-bar { padding: 12px; gap: 12px; flex-wrap: wrap; }
  .dz-bar-ic { width: 40px; height: 40px; }
  .dz-bar-act { width: 100%; }
  .dz-bar-act .btn { flex: 1; height: 44px; }
  .pt-pick { margin-top: 32px; }
  .pt-tools, .pt-tools.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tc { padding: 16px 14px; gap: 12px; border-radius: 16px; }
  .tc-tx b { font-size: 15.5px; }
  .tc-tx span { font-size: 13px; }
  .pt-tools.compact .tc { padding: 10px; gap: 10px; }
  .pt-tools.compact .tc-ic { width: 32px; height: 32px; }
  .pt-tools.compact .tc-tx b { font-size: 14px; line-height: 1.2; }
  .pt-tip { padding: 18px 16px; }
  .tip-l { margin-left: 0; }
  .tip-l li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pt-work, .pt-res { padding: 18px 14px; border-radius: 20px; margin-left: -4px; margin-right: -4px; }
  .pw-head { margin-bottom: 18px; align-items: flex-start; }
  .pw-head > .tc-ic { display: none; }
  .pw-ht h2, .pr-head h2 { font-size: 20px; }
  .pw-ht p, .pr-head p { font-size: 14.5px; }
  .pw-tools { gap: 8px; }
  .pt-field { flex: 1 1 100%; }
  .pt-field input { width: 100%; flex: 1; }
  .pt-seg { flex: 1 1 100%; }
  .pt-seg button { flex: 1; height: 38px; padding: 0 8px; }
  .pt-hint.inline { flex: 1 1 100%; margin: 2px 0 0 4px; }
  .pgrid, .rgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
  .pg { padding: 5px 5px 6px; border-radius: 12px; }
  .pg-ck { top: 10px; right: 10px; width: 22px; height: 22px; }
  .pg-act button { width: 30px; height: 32px; }
  .pg-g { left: 9px; top: 9px; font-size: 10.5px; padding: 2px 6px; }
  .fr { gap: 10px; padding: 8px 6px 8px 4px; }
  .fr-grip { width: 18px; }
  .fr-th { width: 40px; height: 50px; }
  .fr-act button { width: 36px; height: 40px; }
  .pw-foot { flex-direction: column-reverse; align-items: stretch; gap: 10px; margin-top: 18px; padding-top: 16px; }
  .pw-go { width: 100%; min-width: 0; }
  .pw-optwrap .pt-ghostbtn { width: 100%; justify-content: center; }
  .pw-opts { flex-direction: column; gap: 12px; padding: 14px; }
  .opt { flex-direction: column; align-items: stretch; gap: 6px; }
  .opt .pt-seg button { flex: 1; }
  .rc { gap: 12px; padding: 14px 16px; }
  .rc > div b { font-size: 22px; }
  .rr { padding: 10px; gap: 10px; }
  .rr-ic { display: none; }
  .rr-act .btn { width: 40px; padding: 0; }
  .hide-s { display: none; }
  .pr-foot { flex-direction: column; align-items: stretch; }
  .pr-foot .pt-ghostbtn { margin: 0; justify-content: center; }
}
@media (max-width: 380px) {
  .pt-hero h1 { font-size: 38px; }
  .pgrid, .rgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (hover: hover) and (min-width: 861px) {
  .pg.drag .pg-act { opacity: 0; transition: opacity .15s; }
  .pg.drag:hover .pg-act, .pg.drag:focus-within .pg-act { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .dz, .pt-work, .pt-res, .pt-tip, .tc { animation: none; transition: none; }
}

/* once files are in, the hero steps back */
.pdft.loaded .pt-hero.phead { padding-bottom: 76px; }
.pdft.loaded .pt-drop { margin-top: -44px; }
.pdft.loaded .pt-pick { margin-top: 36px; }
@media (max-width: 860px) {
  .pdft.loaded .pt-hero.phead { padding-bottom: 64px; }
  .pdft.loaded .pt-drop { margin-top: -44px; }
  .pdft.loaded .pt-pick { margin-top: 28px; }
}
.pw-opts[hidden] { display: none; }
@media (min-width: 861px) { .pw-opts { width: fit-content; max-width: 100%; } }

/* red "Clear all" so it stands out (Nick, Nov 20) */
.pt-clearbtn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 10px; font-size: 14.5px; font-weight: 600; white-space: nowrap; color: #D92D20; background: #FEF3F2; border: 1px solid #FECDCA; transition: background .15s, color .15s, border-color .15s; }
.pt-clearbtn:hover { background: #D92D20; border-color: #D92D20; color: #fff; }
.pt-clearbtn:focus-visible { outline: 3px solid rgba(217, 45, 32, .3); outline-offset: 2px; }
.pt-clearbtn svg { width: 16px; height: 16px; }

/* split: tap pages into groups */
.gbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.gc { --gc: var(--navy); display: inline-flex; align-items: center; min-height: 44px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line, #E3E8F0); transition: border-color .15s, box-shadow .15s, background .15s; }
.gc.on { border-color: var(--gc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gc) 18%, transparent); background: color-mix(in srgb, var(--gc) 7%, #fff); }
.gc-nm { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 6px; font-size: 14.5px; font-weight: 600; color: var(--navy); border-radius: 999px; }
.gc.on .gc-nm { cursor: text; padding-right: 6px; }
.gc-dot { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gc); color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.gc-t { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-c { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 2px 8px; }
.gc-x { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-right: 2px; border-radius: 50%; color: var(--muted); }
.gc-x:hover { background: var(--bg); color: #B42318; }
.gc-in { height: 36px; margin: 0 4px 0 6px; padding: 0 12px; width: 170px; max-width: 52vw; border-radius: 999px; border: 1.5px solid var(--gc); font: inherit; font-size: 14.5px; font-weight: 600; color: var(--navy); background: #fff; outline: none; }
.gc-new { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px dashed var(--line, #CBD3DF); font-size: 14.5px; font-weight: 600; color: var(--blue); background: transparent; }
.gc-new:hover { background: var(--bg); }
.gh-n { font-family: inherit !important; font-weight: 700 !important; color: var(--gc) !important; }
.pg.gp { cursor: pointer; border-width: 2px; }
.pg.gp.ingrp { border-color: var(--gc); background: color-mix(in srgb, var(--gc) 8%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gc) 20%, transparent); }
.pg.gp.ingrp .pg-n { color: var(--gc); font-weight: 700; }
.pg-gb { position: absolute; right: 12px; top: 12px; display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px; background: var(--gc); color: #fff; font-size: 13.5px; font-weight: 700; box-shadow: 0 1px 3px rgba(11, 31, 58, .25), 0 0 0 2px #fff; }
.pg.gp.pop { animation: pt-pop .22s ease-out; }
@keyframes pt-pop { 0% { transform: scale(.94); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }
.rr-ic[style] { background: var(--gc) !important; color: #fff !important; }
.rr-gn { font-size: 15px; font-weight: 700; }
@media (max-width: 860px) {
  .gc-t { max-width: 110px; }
  .pg-gb { right: 8px; top: 8px; }
  .rr-ic[style] { display: grid; width: 32px; height: 32px; border-radius: 9px; }
}
@media (prefers-reduced-motion: reduce) { .pg.gp.pop { animation: none; } }
