/* FriendsPDF — mobile first. Breakpoints: 640px (tablet), 1024px (desktop). */
@font-face { font-family: "PJS"; src: url("../fonts/pjs-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PJS"; src: url("../fonts/pjs-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "PJS"; src: url("../fonts/pjs-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "PJS"; src: url("../fonts/pjs-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "PJS"; src: url("../fonts/pjs-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --ink: #141A2E; --muted: #535B70; --line: #E6E8EF; --soft: #F6F7FB;
  --tint: #F4F6FF; --tint-bd: #DCE3FA; --brand: #1D4ED8; --brand-d: #1E40AF;
  --ok: #067647; --ok-t: #E7F6EE; --ok-d: #05603A; --warn: #6B4A00; --warn-t: #FFF6E0;
  --danger: #B4233C; --danger-t: #FFE6E9; --amber: #8A5300; --amber-t: #FFF3D6;
  --violet: #5B3FD6; --violet-t: #EFEAFF; --navy: #0F2A5C; --forest: #0F3D2E;
  --cream: #FFFBF0; --cream-bd: #EDE3C6; --yellow: #FFC83D;
  --r: 18px; --pad: 16px; --tabbar: 0px;
  --font: "PJS", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}
@media (min-width: 640px) { :root { --pad: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: #fff; overflow-x: hidden; }
body.cream { background: var(--cream); }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(28px, 6vw, 46px); }
h2 { font-size: clamp(22px, 4vw, 34px); }
.h3, h3 { font-size: 20px; }
p { margin: 0 0 1em; }
button, input, select { font: inherit; color: inherit; }
[hidden], [data-hidden] { display: none !important; }
:focus-visible { outline: 3px solid #F59E0B; outline-offset: 2px; border-radius: 6px; }
.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; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; justify-content: center; }
.lead { font-size: clamp(16px, 2.4vw, 19px); color: var(--muted); max-width: 640px; }
svg { width: 20px; height: 20px; flex: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; border: 1.5px solid transparent; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; background: #fff; color: var(--ink); transition: background .15s, transform .05s; position: relative; }
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 56px; font-size: 17px; padding: 0 24px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-d); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-outline { border-color: #C9D5F5; background: #fff; }
.btn-soft { background: #EAF0FF; color: var(--brand); min-height: 44px; padding: 0 16px; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-violet { background: var(--violet); color: #fff; min-height: 48px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 12px; background: #F2F4F8; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.link-btn { border: 0; background: none; padding: 0; min-height: 44px; color: var(--brand); font-weight: 700; text-decoration: underline; cursor: pointer; }
.link-btn.danger { color: var(--danger); }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; background: #fff; border: 1px solid var(--tint-bd); color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.chip-lg { min-height: 44px; padding: 0 14px; background: #F2F4F8; border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 20px; letter-spacing: -0.3px; flex: none; }
.logo b { color: var(--brand); font-weight: 800; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; }
.logo-mark svg { width: 18px; height: 18px; }
.main-nav { display: none; gap: 20px; align-items: center; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; }
.main-nav a[aria-current="page"] { color: var(--brand); border-color: var(--brand); }
.header-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.search-pill { display: none; align-items: center; gap: 8px; min-height: 44px; width: 210px; padding: 0 14px; border-radius: 12px; background: #F2F4F8; color: var(--muted); text-decoration: none; font-size: 15px; }
.install-btn { display: none; min-height: 44px; font-size: 15px; }
.mobile-menu { border-top: 1px solid var(--line); background: #fff; }
.mobile-menu nav { display: flex; flex-direction: column; padding-top: 8px; padding-bottom: 16px; }
.mobile-menu a { min-height: 48px; display: flex; align-items: center; color: var(--ink); text-decoration: none; font-weight: 700; border-bottom: 1px solid #F0F1F5; }
.mobile-menu .btn { margin-top: 12px; }
@media (min-width: 640px) {
  .main-nav { display: flex; }
  .menu-btn { display: none; }
  .mobile-menu { display: none !important; }
}
@media (min-width: 1024px) {
  .main-nav { gap: 28px; }
  .search-pill { display: inline-flex; }
  .search-icon { display: none; }
  .install-btn:not([hidden]) { display: inline-flex; }
}

/* ---------- tab bar (mobile) ---------- */
.tab-bar { display: none; }
@media (max-width: 639.98px) {
  :root { --tabbar: 76px; }
  body { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
  body.is-tool { padding-bottom: 0; }
  .tab-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; }
  body.is-tool .tab-bar { display: none; }
  .tab-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; color: #5E6579; text-decoration: none; font-size: 12px; font-weight: 800; }
  .tab-bar a[aria-current="page"] { color: var(--brand); }
  .tab-bar svg { width: 22px; height: 22px; }
  .tab-bar .tab-fab { justify-self: center; width: 58px; height: 58px; margin-top: -24px; border: 4px solid #fff; border-radius: 50%; background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(29, 78, 216, .35); }
  .tab-bar .tab-fab svg { width: 26px; height: 26px; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--soft); border-top: 1px solid var(--line); padding: 40px 0 24px; font-size: 15px; margin-top: 64px; }
.foot-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.foot-brand { font-weight: 800; font-size: 18px; margin-bottom: 6px; }
.foot-brand b { color: var(--brand); }
.foot-h { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
.site-footer nav a { display: flex; align-items: center; min-height: 36px; color: var(--ink); text-decoration: none; }
.site-footer nav a:hover { color: var(--brand); text-decoration: underline; }
.foot-pop { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.foot-pop .chips a { padding: 4px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: #3A4256; text-decoration: none; font-size: 14px; min-height: 32px; display: inline-flex; align-items: center; }
.foot-bottom { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: var(--muted); font-size: 14px; }
.ok-line { display: inline-flex; align-items: center; gap: 6px; color: var(--ok-d); font-weight: 600; }
.ok-line svg { width: 16px; height: 16px; }

/* ---------- shared bits ---------- */
.card { background: #fff; border: 1px solid var(--tint-bd); border-radius: 24px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--tint-bd); font-weight: 700; font-size: 14px; color: #3A4256; }
.pill svg { width: 16px; height: 16px; color: var(--ok); }
.checks { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-weight: 700; font-size: 15px; }
.checks li { display: flex; align-items: center; gap: 6px; }
.checks svg { width: 18px; height: 18px; color: var(--ok); }
.checks.light svg { color: #9DB3F2; }
.checks.light { flex-direction: column; margin-bottom: 22px; }
.private-line { display: flex; align-items: center; gap: 8px; margin: 12px 4px 0; color: var(--ok); font-size: 14px; font-weight: 700; }
.private-line svg { width: 16px; height: 16px; }
.crumbs ol { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: #A0A6B6; }
.crumbs a { color: var(--brand); }
.sec { margin-top: 56px; }
@media (min-width: 640px) { .sec { margin-top: 80px; } }
.sec.narrow, .narrow { max-width: 860px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sec-head h1, .sec-head h2 { margin: 0; }
.sec-head a { font-weight: 700; }
.sec-sub { margin: -4px 0 18px; }
.page-pad { padding-top: 20px; padding-bottom: 24px; }
@media (min-width: 640px) { .page-pad { padding-top: 32px; } }

/* ---------- searchbar ---------- */
.searchbar { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--tint-bd); border-radius: 999px; padding: 6px 6px 6px 18px; max-width: 560px; box-shadow: 0 8px 24px rgba(29, 78, 216, .08); }
.searchbar > svg { color: #6A7186; }
.searchbar input { flex: 1; min-width: 0; min-height: 46px; border: 0; outline: none; background: transparent; font-size: 16px; }
.searchbar .btn { min-height: 46px; border-radius: 999px; }
.searchbar.wide { max-width: 640px; border-radius: 16px; background: var(--tint); }
.searchbar:focus-within { border-color: var(--brand); }

/* ---------- home ---------- */
.hero { background: var(--tint); }
.hero-row { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; padding-top: 32px; padding-bottom: 40px; }
@media (min-width: 640px) { .hero-row { padding-top: 48px; padding-bottom: 56px; } }
@media (min-width: 1024px) { .hero-row { padding-top: 72px; padding-bottom: 72px; gap: 48px; } }
.hero-copy { flex: 1 1 520px; min-width: 0; }
.hero h1 { font-size: clamp(34px, 6.5vw, 58px); line-height: 1.08; margin: 18px 0 14px; }
.hl { color: var(--brand); }
.popular { margin-top: 14px; font-size: 14px; }
.quick { flex: 1 1 400px; min-width: 0; padding: 16px; box-shadow: 0 20px 40px rgba(20, 26, 46, .08); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--tint-bd); background: #fff; color: #3A4256; font-weight: 700; font-size: 14px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.quick-drop { border: 2px dashed #9DB3F2; background: #F7F9FF; border-radius: 18px; padding: 28px 18px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
@media (min-width: 640px) { .quick-drop { padding: 40px 24px; } }
.quick-drop .btn { max-width: 320px; }
.quick-title { font-size: 22px; font-weight: 800; margin: 0; }
.dz-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; }
.dz-icon svg { width: 30px; height: 30px; }
.dz-hint { color: var(--muted); font-size: 14px; margin: 0; }
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: none; }
@media (min-width: 640px) { .strip { display: block; } }
.strip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px; font-weight: 700; color: #3A4256; font-size: 15px; }
.strip i { color: #9DB3F2; font-style: normal; }
.install-banner { margin-top: 24px; display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--ink); color: #fff; }
.install-banner div { flex: 1; min-width: 0; }
.install-banner strong { display: block; font-size: 15px; }
.install-banner span { color: #C3C8D6; font-size: 13px; }
.ib-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--brand); display: flex; align-items: center; justify-content: center; }
.install-banner .btn { min-height: 44px; border-radius: 999px; }
@media (min-width: 1024px) { .install-banner { display: none !important; } }
.recent-strip { margin-top: 32px; }
.recent-list { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .recent-strip .recent-list { grid-template-columns: repeat(3, 1fr); } }
.recent-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: #fff; min-width: 0; }
.recent-item .fi { flex: none; }
.recent-item .ri-text { flex: 1; min-width: 0; }
.recent-item strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-item small { color: var(--muted); font-size: 13px; }
.recent-list.big .recent-item { padding: 14px; }
.fi { width: 36px; height: 44px; border-radius: 6px; background: var(--danger-t); color: var(--danger); font-size: 10px; font-weight: 800; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; }
.fi.img { background: #EAF0FF; color: var(--brand); }
.fi.zip { background: var(--amber-t); color: var(--amber); }
.top4 { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .top4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.top4-card { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 132px; padding: 18px; border-radius: 20px; background: var(--tint); color: var(--ink); text-decoration: none; }
.top4-card.hero { background: var(--brand); color: #fff; }
.top4-card strong { display: block; font-size: 19px; line-height: 1.2; }
.top4-card small { font-size: 13px; font-weight: 700; color: var(--muted); }
.top4-card.hero small { color: #DCE6FF; }
.conv { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 12px; }
.conv span { background: #fff; color: var(--brand); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.conv svg { width: 16px; height: 16px; }
.wide-card, .guide-card { margin-top: 12px; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 20px; background: var(--ok-t); color: var(--ink); text-decoration: none; }
.wide-card > span:nth-child(2), .guide-card > span:nth-child(2) { flex: 1; min-width: 0; }
.wide-card strong, .guide-card strong { display: block; font-size: 18px; }
.wide-card small, .guide-card small { color: #3A4256; font-size: 14px; }
.wc-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; background: #fff; color: var(--ok); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.guide-card { background: var(--cream); border: 2px solid var(--cream-bd); margin-top: 32px; }
.band { border-radius: 28px; padding: 24px; display: flex; flex-wrap: wrap; gap: 28px; align-items: center; color: #fff; }
@media (min-width: 640px) { .band { padding: 40px; } }
.band-copy { flex: 1 1 360px; min-width: 0; }
.band p { color: rgba(255, 255, 255, .82); }
.band.navy { background: var(--navy); }
.band.forest { background: var(--forest); }
.band.ink { background: var(--ink); padding-bottom: 0; align-items: flex-end; overflow: hidden; }
.band.ink .band-copy { padding-bottom: 24px; }
@media (min-width: 640px) { .band.ink .band-copy { padding-bottom: 40px; } }
.band.blue { background: var(--brand); justify-content: space-between; }
.band.blue h2 { margin: 0; max-width: 560px; }
.kicker { display: inline-block; background: var(--yellow); color: var(--ink); border-radius: 6px; padding: 0 8px; font-weight: 800; font-size: 12px; letter-spacing: .04em; }
.band h2 { margin-top: 12px; }
.band-link { display: inline-flex; min-height: 44px; align-items: center; color: #fff; font-weight: 700; margin-top: 8px; }
.exam-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.exam-tabs button { min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid #5A76B0; background: transparent; color: #fff; font-weight: 700; cursor: pointer; }
.exam-tabs button[aria-selected="true"] { background: #fff; color: var(--navy); border-color: #fff; }
.exam-card { flex: 1 1 380px; min-width: 0; background: #fff; color: var(--ink); border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.exam-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #EEF0F5; }
.exam-doc { flex: 1; min-width: 0; }
.exam-doc strong { display: block; }
.exam-doc small { color: var(--muted); font-size: 14px; }
.exam-tag { flex: none; width: 42px; height: 42px; border-radius: 12px; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; background: #EAF0FF; color: var(--brand); }
.exam-tag.k-sig { background: var(--amber-t); color: var(--amber); }
.exam-tag.k-pdf { background: var(--ok-t); color: var(--ok); }
.exam-note, .band .exam-note { margin: 0; padding: 10px 16px; background: var(--warn-t); color: var(--warn); font-size: 13px; }
.band .exam-card p { color: inherit; }
.exam-h { padding: 16px 16px 0; margin: 0; font-size: 20px; }
.exam-h small { font-size: 14px; color: var(--muted); font-weight: 600; }
.have-grid, .doc-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .have-grid { grid-template-columns: repeat(2, 1fr); } }
.have { display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 12px 16px; border-radius: 20px; border: 2px solid var(--cream-bd); background: var(--cream); color: var(--ink); text-decoration: none; }
.have strong { display: block; font-size: 17px; line-height: 1.3; }
.have small { color: var(--muted); font-size: 14px; }
.have-tag { flex: none; width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: var(--ink); background: #FFE9A8; }
.t-pdf { background: #FFD9CF; } .t-doc { background: #D6E6FF; } .t-many { background: #DDF2DF; } .t-q { background: var(--yellow); }
.doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1024px) { .doc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.doc { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 104px; padding: 16px; border-radius: 18px; background: #F2F8F4; border: 1px solid #DCE7E0; color: #13241D; text-decoration: none; }
.doc strong { font-size: 17px; }
.doc small { color: #4C5F56; font-size: 13px; }
.num-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.num-list li { display: flex; gap: 12px; color: rgba(255, 255, 255, .9); }
.num-list b { flex: none; color: #9FE0BE; }
.band-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.flow { display: flex; align-items: center; justify-content: center; gap: 14px; }
.flow-phone { width: 84px; height: 132px; border: 3px solid #fff; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #9FE0BE; font-size: 12px; font-weight: 700; }
.flow-phone span { color: #fff; }
.flow-line { width: 48px; border-top: 2px dashed #6E9C86; }
.flow-cloud { width: 84px; height: 84px; border: 3px dashed #6E9C86; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #9DBDAD; font-size: 11px; font-weight: 700; }
.flow svg { width: 28px; height: 28px; }
.test-card { display: flex; gap: 12px; align-items: center; background: #fff; color: #13241D; border-radius: 16px; padding: 14px; }
.test-card svg { width: 26px; height: 26px; color: #1F7A52; }
.test-card strong { display: block; }
.test-card span { font-size: 14px; color: #4C5F56; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 20px; }
.compare { width: 100%; min-width: 540px; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-top: 1px solid var(--line); }
.compare thead th { border-top: 0; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.compare .us { background: var(--tint); font-weight: 700; }
.compare thead .us { color: var(--brand); }
.compare td:not(.us) { color: var(--muted); }
.phone-mock { flex: 0 0 240px; margin: 0 auto; height: 330px; background: #0A0E1A; border-radius: 38px 38px 0 0; padding: 12px 12px 0; }
.pm-screen { height: 100%; background: #fff; border-radius: 28px 28px 0 0; padding: 20px 14px; color: var(--ink); display: flex; flex-direction: column; gap: 10px; }
.pm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pm-grid i { height: 76px; border-radius: 12px; background: #EAF0FF; }
.pm-grid i:nth-child(2) { background: var(--amber-t); } .pm-grid i:nth-child(3) { background: var(--ok-t); } .pm-grid i:nth-child(4) { background: var(--danger-t); }
.pm-btn { margin-top: auto; height: 44px; border-radius: 12px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.big-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .big-steps { grid-template-columns: repeat(3, 1fr); } }
.big-steps li { padding: 20px; border-radius: 20px; border: 1px solid var(--line); }
.big-steps b { display: block; font-size: 40px; font-weight: 800; color: var(--brand); line-height: 1; }
.big-steps strong { display: block; font-size: 18px; margin: 10px 0 4px; }
.big-steps span { color: var(--muted); }
.faq { border-top: 1px solid var(--line); padding: 14px 0; }
.faq:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 17px; min-height: 32px; display: flex; align-items: center; list-style-position: inside; }
.faq p { margin: 8px 0 0; color: var(--muted); }
.cta { justify-content: space-between; margin-bottom: 0; }

/* ---------- tiles ---------- */
.tile-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .tile-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.tile { --tint: #EAF0FF; --ink-c: #1D4ED8; position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 150px; padding: 16px; border-radius: 20px; background: var(--tint); color: var(--ink); text-decoration: none; transition: transform .15s; }
a.tile:hover { transform: translateY(-2px); }
.cat-convert { --tint: #EAF0FF; --ink-c: #1D4ED8; }
.cat-organize { --tint: #FFF3D6; --ink-c: #8A5300; }
.cat-optimize { --tint: #E7F6EE; --ink-c: #067647; }
.cat-protect { --tint: #EFEAFF; --ink-c: #5B3FD6; }
.tile-icon { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--ink-c); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; }
.tile-name { margin-top: auto; font-size: 17px; line-height: 1.25; }
.tile-desc { color: #3A4256; font-size: 13px; line-height: 1.4; }
.tile-badge { position: absolute; top: 12px; right: 12px; border-radius: 999px; padding: 0 9px; font-size: 12px; font-weight: 800; }
.tile-badge.dark { background: var(--ink); color: #fff; }
.tile-badge.violet { background: #fff; color: var(--violet); }
.tile-badge.soonb { background: #fff; color: var(--amber); }
.tile.soon { opacity: .8; border: 1px dashed #C7CBD6; }
.row-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .row-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .row-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile.tile-row { min-height: 84px; flex-direction: row; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); padding: 14px 16px; }
.tile.tile-row .tile-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--tint); flex: none; }
.tile.tile-row .tile-name { margin: 0; display: block; }
.tile.tile-row .tile-desc { display: block; }
.tile.tile-row .tile-badge { position: static; align-self: flex-start; margin-left: auto; }
.tile.tile-row.soon { background: #FAFAFC; }
.tile-row > .tile-name, .tile-row > .tile-desc { flex: 1; }
.tool-group { margin-top: 28px; }
.tool-group h2 { font-size: 20px; }
.filter-chips { display: flex; gap: 8px; margin: 18px 0 8px; overflow-x: auto; padding-bottom: 4px; }
@media (min-width: 640px) { .filter-chips { flex-wrap: wrap; } }
.filter-chips button { flex: none; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--tint-bd); background: #fff; color: #3A4256; font-weight: 700; cursor: pointer; }
.filter-chips button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.no-results { margin-top: 20px; color: var(--muted); }

/* tile-row layout: icon | text | badge */
.tile.tile-row { display: grid; grid-template-columns: 48px 1fr auto; grid-template-rows: auto auto; column-gap: 14px; row-gap: 0; }
.tile.tile-row .tile-icon { grid-row: 1 / 3; }
.tile.tile-row .tile-name { grid-column: 2; align-self: end; }
.tile.tile-row .tile-desc { grid-column: 2; align-self: start; }
.tile.tile-row .tile-badge { grid-column: 3; grid-row: 1 / 3; align-self: center; }

/* ---------- exam page ---------- */
.page-hero { color: #fff; padding: 20px 0 32px; }
@media (min-width: 640px) { .page-hero { padding: 32px 0 56px; } }
.page-hero.navy { background: var(--navy); }
.page-hero .crumbs ol, .page-hero .crumbs a { color: #C9D6F0; }
.page-hero h1 { margin-top: 12px; max-width: 820px; }
.page-hero .lead { color: #C9D6F0; }
.exam-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.exam-main { flex: 2 1 480px; min-width: 0; }
.exam-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 1024px) { .exam-side { margin-top: 52px; } }
.exam-page h2 { font-size: 20px; margin-top: 8px; }
.exam-cards { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 28px; }
@media (min-width: 640px) { .exam-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.exam-cards button { min-height: 76px; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--line); background: #fff; text-align: left; cursor: pointer; }
.exam-cards button strong { display: block; font-size: 17px; }
.exam-cards button small { color: var(--muted); font-size: 13px; }
.exam-cards button[aria-selected="true"] { border-color: var(--brand); background: #EAF0FF; }
.custom-kb { padding: 18px; border-radius: 20px; background: var(--violet-t); }
.custom-kb strong { display: block; font-size: 17px; }
.kb-row { display: flex; align-items: center; gap: 8px; }
.kb-row input { flex: 1; min-width: 0; min-height: 48px; border: 1.5px solid #CFC5F2; border-radius: 12px; padding: 0 12px; background: #fff; }
.kb-row span { font-weight: 700; color: var(--muted); }
.note { display: flex; gap: 12px; padding: 16px; border-radius: 18px; font-size: 14px; }
.note svg { width: 22px; height: 22px; }
.note strong { display: block; font-size: 15px; }
.note.ok { background: var(--ok-t); color: var(--ok-d); }
.note.warn { background: var(--warn-t); color: var(--warn); }
.note.err { background: var(--danger-t); color: #8E1B2F; }

/* ---------- prose ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 22px; margin-top: 28px; }
.prose p { color: #3A4256; }
.empty { padding: 24px; border: 1px dashed var(--line); border-radius: 18px; text-align: center; color: var(--muted); }
.toggle-row { display: flex; align-items: center; gap: 14px; padding: 16px; margin-top: 24px; border-radius: 18px; cursor: pointer; }
.toggle-row > span { flex: 1; }
.toggle-row strong { display: block; }
.toggle-row small { color: var(--muted); font-size: 13px; }
.toggle-row input { width: 24px; height: 24px; accent-color: var(--ok); flex: none; }

/* ---------- guide ---------- */
.guide { max-width: 760px; padding-top: 20px; padding-bottom: 32px; }
.guide-top { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.g-step { margin-left: auto; font-size: 14px; font-weight: 800; color: #6B5B45; }
.progress { margin-top: 6px; height: 8px; border-radius: 4px; background: #F1E6C8; overflow: hidden; }
.progress span { display: block; height: 100%; width: 33%; background: var(--ink); border-radius: 4px; transition: width .2s; }
.g-chips { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.g-chips span { padding: 2px 12px; border-radius: 999px; background: #fff; border: 2px solid var(--cream-bd); font-size: 14px; font-weight: 700; }
.guide h1 { margin-top: 18px; font-size: clamp(28px, 5vw, 40px); }
.g-options { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 16px; }
@media (min-width: 640px) { .g-options { grid-template-columns: 1fr 1fr; } }
.g-opt { display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 12px 16px; border-radius: 20px; border: 2px solid var(--cream-bd); background: #fff; text-align: left; cursor: pointer; }
.g-opt[aria-checked="true"] { border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink); }
.g-opt strong { display: block; font-size: 18px; line-height: 1.3; }
.g-opt small { color: #6B5B45; font-size: 14px; }
.g-kb { margin-top: 14px; padding: 16px; border-radius: 18px; background: #fff; border: 2px solid var(--cream-bd); }
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.seg3 button { min-height: 48px; border-radius: 14px; border: 2px solid var(--cream-bd); background: var(--cream); font-weight: 800; cursor: pointer; }
.seg3 button[aria-pressed="true"] { border-color: var(--ink); background: var(--yellow); }
.g-final { margin-top: 8px; border: 2px dashed #CDB98A; background: #fff; border-radius: 22px; padding: 28px 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.g-final .btn { max-width: 340px; }
.g-next-bar { position: sticky; bottom: var(--tabbar); background: var(--cream); border-top: 2px solid #F1E6C8; padding: 12px 0 16px; z-index: 20; }
.g-next-bar .container { max-width: 760px; }

/* ---------- tool page ---------- */
.tool-hero { background: var(--tint); padding: 16px 0 28px; }
@media (min-width: 640px) { .tool-hero { padding: 24px 0 48px; } }
.tool-layout { display: flex; flex-wrap: wrap; gap: 24px 32px; align-items: center; margin-top: 8px; }
.tool-head { flex: 1 1 400px; min-width: 0; }
.tool-head h1 { margin-bottom: 10px; }
.badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--tint-bd); font-weight: 700; font-size: 14px; }
.badge.ok { background: var(--ok-t); border-color: transparent; color: var(--ok-d); }
.badge svg { width: 14px; height: 14px; }
.app { flex: 1 1 460px; min-width: 0; }
.dropzone { border: 2px dashed #9DB3F2; background: #fff; border-radius: 24px; padding: 28px 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; transition: background .15s, border-color .15s; }
@media (min-width: 640px) { .dropzone { padding: 44px 24px; } }
.dropzone.over { background: #EAF0FF; border-color: var(--brand); border-style: solid; }
.dropzone .dz-icon { background: #EAF0FF; color: var(--brand); border-radius: 18px; }
.dz-title { font-size: 20px; font-weight: 800; margin: 0; display: none; }
@media (hover: hover) and (pointer: fine) { .dz-title { display: block; } }
.dz-btn, .dz-cam { width: 100%; max-width: 340px; cursor: pointer; }
.dz-btn:focus-within, .dz-cam:focus-within { outline: 3px solid #F59E0B; outline-offset: 2px; }
.dz-cam { display: none; }
@media (hover: none), (pointer: coarse) { .dz-cam { display: inline-flex; } }
.seo { margin-top: 40px; }
.seo h2 { font-size: clamp(22px, 3.4vw, 28px); }
.seo section { margin-top: 40px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { display: flex; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; }
.step-n { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #EAF0FF; color: var(--brand); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.feature-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .feature-grid { grid-template-columns: repeat(3, 1fr); } }
.feature { padding: 16px; border-radius: 18px; background: var(--tint); }
.feature strong { display: block; }
.feature span { color: #3A4256; font-size: 14px; }
.two-col { display: flex; flex-wrap: wrap; gap: 0 40px; }
.col-wide { flex: 2 1 480px; min-width: 0; }
.col-narrow { flex: 1 1 260px; min-width: 0; }

/* ---------- workspace ---------- */
body.working .tool-head .lead, body.working .tool-head .badges { display: none; }
body.working .tool-layout { display: block; }
body.working .tool-head h1 { font-size: clamp(24px, 4vw, 32px); }
.ws { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; margin-top: 8px; }
.ws-main { flex: 999 1 520px; min-width: 0; }
.ws-side { flex: 1 1 320px; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 1024px) { .ws-side { position: sticky; top: 88px; } }
.ws-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.ws-bar .hint { color: var(--muted); font-size: 14px; }
.ws-bar .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--forest); color: #fff; font-size: 13px; font-weight: 700; }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9FE0BE; }
.thumbs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.thumb-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.thumb-card.selected { border: 2px solid var(--brand); background: #F4F7FF; }
.thumb-card.off { opacity: .45; }
.thumb { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; background: #F1F3F8; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.thumb img, .thumb canvas { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .2s; background: #fff; }
.thumb[data-rot="90"] canvas { transform: rotate(90deg) scale(.75); }
.thumb[data-rot="180"] canvas { transform: rotate(180deg); }
.thumb[data-rot="270"] canvas { transform: rotate(270deg) scale(.75); }
.thumb .ph { width: 60%; height: 80%; background: #fff; border-radius: 4px; }
button.thumb { width: 100%; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.err-text { color: var(--danger) !important; }
.thumb .num { position: absolute; top: 8px; left: 8px; z-index: 1; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.thumb .check { position: absolute; top: 8px; right: 8px; z-index: 1; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; }
.thumb .check svg { width: 16px; height: 16px; }
.thumb-card.off .check { background: #fff; border: 2px solid #9AA0B2; color: transparent; }
.tname { font-size: 13px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tsize { font-size: 12px; color: var(--muted); margin-top: -6px; }
.tbtns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.tbtns.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tbtns.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tbtns button { min-height: 40px; padding: 0; border: 1px solid var(--tint-bd); border-radius: 10px; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.tbtns button:disabled { opacity: .35; cursor: default; }
.tbtns button.del { color: var(--danger); }
.tbtns svg { width: 16px; height: 16px; }
.add-tile { width: 100%; height: 100%; min-height: 160px; border: 2px dashed #9DB3F2; border-radius: 18px; background: transparent; color: var(--brand); font-weight: 800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.add-tile svg { width: 28px; height: 28px; }
.sortable-ghost { opacity: .35; }
.sortable-chosen .thumb-card, .sortable-chosen.file-row { box-shadow: 0 10px 24px rgba(20, 26, 46, .18); }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.file-row .n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.file-row .prev { flex: none; width: 42px; height: 52px; border-radius: 6px; background: var(--soft); border: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.file-row .prev img, .file-row .prev canvas { width: 100%; height: 100%; object-fit: cover; }
.file-row .meta { flex: 1; min-width: 0; }
.file-row .meta strong { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .meta small { color: var(--muted); font-size: 13px; }
.file-row .mini { display: flex; gap: 4px; }
.file-row .mini button { width: 40px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: #5E6579; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.file-row .mini button:disabled { opacity: .3; }
.file-row .mini svg { width: 18px; height: 18px; }
.handle { cursor: grab; touch-action: none; }
.add-row { margin-top: 12px; width: 100%; min-height: 56px; border: 2px dashed #9DB3F2; border-radius: 18px; background: transparent; color: var(--brand); font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.field-label { font-weight: 800; font-size: 15px; margin-bottom: 8px; display: block; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.seg.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 400px) { .seg.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.seg button { min-height: 44px; padding: 0 4px; border-radius: 12px; border: 1.5px solid var(--tint-bd); background: #fff; color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer; line-height: 1.15; }
.seg button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sizes button { min-height: 54px; border-radius: 14px; border: 2px solid var(--tint-bd); background: #fff; color: var(--ink); font-weight: 800; font-size: 17px; cursor: pointer; }
.sizes button[aria-pressed="true"] { border-color: var(--brand); background: #EAF0FF; color: var(--brand); }
.inline-input { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.inline-input input { width: 110px; min-height: 46px; border: 1.5px solid var(--tint-bd); border-radius: 12px; padding: 0 12px; background: #fff; }
.text-input { width: 100%; min-height: 46px; border: 1.5px solid var(--tint-bd); border-radius: 12px; padding: 0 12px; background: #fff; }
.name-field { display: flex; align-items: center; border: 1.5px solid var(--tint-bd); border-radius: 12px; overflow: hidden; background: #fff; }
.name-field input { flex: 1; min-width: 0; min-height: 44px; border: 0; padding: 0 12px; background: transparent; outline: none; }
.name-field span { padding: 0 12px; color: var(--muted); font-weight: 600; }
.name-field:focus-within { border-color: var(--brand); }
.opt-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #EEF0F5; cursor: pointer; }
.opt-row > span { flex: 1; }
.opt-row strong { display: block; font-size: 14px; }
.opt-row small { color: var(--muted); font-size: 13px; }
.opt-row input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--ok); flex: none; }
.preview-mini { display: flex; gap: 14px; align-items: center; }
.pv-page { flex: none; width: 74px; height: 104px; background: var(--soft); border: 1.5px solid var(--ink); border-radius: 4px; padding: 6px; display: flex; transition: all .2s; }
.pv-page i { flex: 1; background: #BFD0F5; border-radius: 2px; }
.pv-page.land { width: 104px; height: 74px; }
.pv-text { font-size: 14px; color: var(--muted); }
.pv-text strong { display: block; color: var(--ink); font-size: 15px; }
.actionbar { position: sticky; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); padding: 12px var(--pad) calc(14px + env(safe-area-inset-bottom)); margin-top: 20px; }
.actionbar .inner { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; }
.actionbar .btn-primary, .actionbar .btn-ok { flex: 1; }
.actionbar p { text-align: center; font-size: 12px; color: var(--muted); margin: 6px 0 0; }
@media (min-width: 1024px) { .actionbar { display: none; } }
.side-cta { display: none; }
@media (min-width: 1024px) { .side-cta { display: flex; } }
.progress-line { height: 6px; border-radius: 3px; background: #E3E8F5; overflow: hidden; margin-top: 8px; }
.progress-line span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.alert { margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-size: 14px; font-weight: 600; }
.alert.err { background: var(--danger-t); color: #8E1B2F; }
.alert.warn { background: var(--warn-t); color: var(--warn); }
.alert.info { background: #EAF0FF; color: #1E3A8A; }
.result-card { background: #fff; border: 2px solid var(--ok); border-radius: 20px; overflow: hidden; }
.result-card.soft { border-color: #F2C46D; }
.ba { padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ba small { color: var(--muted); font-size: 14px; display: block; }
.ba .before { font-size: 22px; font-weight: 800; color: #8A90A2; text-decoration: line-through; }
.ba .after { font-size: 32px; font-weight: 800; color: var(--ok); line-height: 1.1; }
.result-card.soft .after { color: #9A5B00; }
.ba svg { color: #8A90A2; width: 28px; height: 28px; }
.result-note { margin: 0; padding: 10px 18px; background: var(--ok-t); color: var(--ok-d); font-weight: 700; }
.result-card.soft .result-note { background: var(--warn-t); color: var(--warn); }
.page-previews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.page-previews canvas, .page-previews img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: zoom-in; }

/* ---------- done / result ---------- */
.done { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 20px; }
@media (min-width: 640px) { .done { padding: 28px; } }
.done-preview { flex: 0 1 300px; min-width: 0; margin: 0 auto; background: var(--tint); border-radius: 20px; padding: 20px; display: flex; justify-content: center; }
.done-preview img, .done-preview canvas { max-width: 100%; max-height: 300px; height: auto; border-radius: 6px; box-shadow: 0 12px 30px rgba(20, 26, 46, .14); background: #fff; }
.done-main { flex: 1 1 360px; min-width: 0; }
.done-head { display: flex; align-items: center; gap: 14px; }
.done-check { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--ok); color: #fff; display: flex; align-items: center; justify-content: center; }
.done-check svg { width: 30px; height: 30px; }
.done-head h2 { margin: 0; font-size: clamp(24px, 4vw, 32px); }
.done-head p { margin: 2px 0 0; color: var(--muted); }
.file-card { margin-top: 18px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); }
.file-card .meta { flex: 1; min-width: 0; }
.file-card strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-card small { color: var(--muted); font-size: 14px; }
.done-btns { margin-top: 14px; display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .done-btns { grid-template-columns: 1fr 1fr; } }
.done-links { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 0 18px; }
.done-links a, .done-links button { min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; }
.next-grid { margin-top: 24px; display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .next-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .next-grid { grid-template-columns: repeat(4, 1fr); } }
.next-grid a { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--tint); color: var(--ink); text-decoration: none; font-weight: 800; }
.next-grid .tile-icon { width: 40px; height: 40px; flex: none; }
.img-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .img-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.img-list a { display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 700; }
.img-list img { width: 100%; height: 120px; object-fit: contain; background: var(--soft); border-radius: 8px; }

/* ---------- zoom dialog & toast ---------- */
.zoom { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 92vh; }
.zoom::backdrop { background: rgba(10, 14, 26, .82); }
.zoom img { max-width: 96vw; max-height: 84vh; background: #fff; border-radius: 8px; }
.zoom button { margin: 10px auto 0; display: flex; }
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 20px); transform: translateX(-50%); z-index: 60; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 14px; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.ios-help { border: 0; border-radius: 20px; padding: 22px; max-width: 360px; }
.ios-help::backdrop { background: rgba(10, 14, 26, .6); }
.ios-help ol { padding-left: 20px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .tab-bar, .actionbar { display: none !important; } }

.card.pad { padding: 16px; margin-top: 12px; border-color: var(--line); border-radius: 20px; }
.card.pad .h3 { margin-bottom: 12px; }
.ws-main > .file-card { margin-top: 0; background: #fff; }
.chip-violet { background: var(--violet-t); border-color: #D9D2F5; color: #3B2A8C; cursor: pointer; min-height: 40px; }
.sec-sm { margin-top: 28px; }
.ba .right { text-align: right; }
.next-h { margin-top: 32px; }
.big-thumb { aspect-ratio: auto; max-height: 360px; margin-top: 12px; padding: 12px; }
.big-thumb img { max-height: 336px; }
.faq.px { border: 0; padding: 0; }
.faq.px summary { font-size: 15px; }
.stamp-stage { position: relative; display: inline-block; max-width: 100%; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; line-height: 0; }
.stamp-stage canvas { max-width: 100%; height: auto; }
.stamp-marker { position: absolute; line-height: 1.2; font-weight: 700; color: var(--ink); background: rgba(255, 200, 61, .35); outline: 2px dashed var(--brand); padding: 1px 4px; border-radius: 3px; font-size: 12px; white-space: nowrap; }
.stamp-marker[data-size="small"] { font-size: 10px; } .stamp-marker[data-size="large"] { font-size: 15px; }
.stamp-marker[data-pos^="top"] { top: 4%; } .stamp-marker[data-pos^="bottom"] { bottom: 4%; }
.stamp-marker[data-pos$="left"] { left: 5%; } .stamp-marker[data-pos$="right"] { right: 5%; }
.stamp-marker[data-pos$="center"] { left: 50%; transform: translateX(-50%); }
.stamp-wm { position: absolute; left: 50%; top: 50%; line-height: 1.1; font-weight: 800; white-space: nowrap; pointer-events: none; transform: translate(-50%, -50%) rotate(-54deg); font-size: 26px; opacity: .32; color: #737885; max-width: none; }
.stamp-wm[data-style="center"] { transform: translate(-50%, -50%); }
.stamp-wm[data-style="bottom-center"] { top: auto; bottom: 4%; transform: translateX(-50%); font-size: 12px; }
.stamp-wm[data-size="small"] { font-size: 17px; } .stamp-wm[data-size="large"] { font-size: 34px; }
.stamp-wm[data-style="bottom-center"][data-size] { font-size: 12px; }
.stamp-wm[data-opacity="light"] { opacity: .18; } .stamp-wm[data-opacity="strong"] { opacity: .55; }
.stamp-wm[data-color="red"] { color: #BF1F29; } .stamp-wm[data-color="blue"] { color: #1C4DD9; }

.tile-icon.sym { font-size: 21px; font-weight: 700; line-height: 1; }
