/* =========================================================
   NAPIZO Design System
   "Dil-kash" theme: warm cream paper, deep plum ink,
   violet -> rose gradient brand. All text colors meet
   WCAG AA contrast (4.5:1 normal text, 3:1 large text).
   ========================================================= */

:root {
  /* Color — "Dil-kash" lovely theme: warm cream paper, deep plum ink,
     violet -> rose gradient brand */
  --ink: #33263F;
  --ink-soft: #7A6A8A;
  --paper: #FDF8F4;
  --surface: #FFFFFF;
  --line: #F0E4DA;
  --line-strong: #DECDBD;
  --brand: #D63384;
  --brand-dark: #AD2569;
  --brand-tint: #FCE9F3;
  --brand-grad: linear-gradient(135deg, #7C3AED 0%, #C42B7E 60%, #CE2F80 100%);
  --brand-glow: 0 10px 24px rgba(196, 43, 126, 0.28);
  --steel: #7C3AED;
  --steel-tint: #EEE9FD;
  --good: #2C7A54;
  --good-tint: #E4F4EB;
  --bad: #B33636;
  --bad-tint: #FBE7E7;

  /* Type */
  --font-display: 'Space Grotesk', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --max-w: 1160px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-soft: 0 8px 22px rgba(51, 38, 63, 0.07);
  --shadow-lift: 0 18px 40px rgba(139, 92, 246, 0.16);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--steel); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--ink);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; max-width: 68ch; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Focus states */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* =========================
   Header / Navigation
   ========================= */
.site-header {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 14px rgba(51,38,63,.05);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 20px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo .dot { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.main-nav {
  display: none;
  gap: 4px;
  flex: 1;
}
.main-nav a {
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: var(--radius);
}
.main-nav a:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.main-nav a[aria-current="page"] { color: var(--brand-dark); }

.nav-toggle {
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--ink);
  position: relative; transition: transform .15s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

@media (min-width: 900px) {
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
}
.mobile-nav a:hover { background: var(--paper); text-decoration: none; }
@media (min-width: 900px) { .mobile-nav { display: none !important; } }

/* =========================
   Buttons
   ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: var(--brand-glow); }
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 14px 30px rgba(214, 51, 132, 0.36); }
.btn-primary:disabled { background: var(--line-strong); cursor: not-allowed; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand-dark); transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }

/* =========================
   Search box
   ========================= */
.search-box {
  display: flex;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
  max-width: 520px;
  box-shadow: var(--shadow-soft);
}
.search-box input {
  flex: 1;
  border: 0;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: transparent;
  color: var(--ink);
}
.search-box input:focus { outline: none; }
.search-box button {
  background: var(--brand-grad);
  color: #fff;
  border: 0;
  padding: 0 22px;
  font-weight: 600;
  cursor: pointer;
}
.search-box button:hover { filter: brightness(1.08); }
.search-results {
  max-width: 520px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: none;
}
.search-results.open { display: block; }
.search-results a {
  display: block;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.92rem;
}
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover { background: var(--paper); text-decoration: none; }
.search-empty { padding: 10px 14px; color: var(--ink-soft); font-size: 0.9rem; }

/* =========================
   Sections / hero
   ========================= */
section { padding: 56px 0; }
.section-tight { padding: 36px 0; }
.section-head { margin-bottom: 28px; }
.section-head p { color: var(--ink-soft); }

.hero {
  background: linear-gradient(135deg, #5B21B6 0%, #A21CAF 48%, #DB2777 100%);
  border-bottom: none;
  position: relative;
  overflow: hidden;
  color: #fff;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(620px 320px at 12% 18%, rgba(255,255,255,.16), transparent 60%),
    radial-gradient(520px 300px at 88% 82%, rgba(255,255,255,.10), transparent 60%),
    radial-gradient(400px 400px at 60% 110%, rgba(251,191,36,.18), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero h1 { color: #fff; }
.hero-inner { padding: 64px 0 56px; }
.hero .eyebrow {
  display: inline-block;
  background: rgba(59, 20, 60, 0.35);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero p.lede { font-size: 1.15rem; color: #fff; max-width: 56ch; }
.hero .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 14px 0;
}
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb .sep { margin: 0 6px; color: var(--line-strong); }
.breadcrumb .current { color: var(--ink); }

/* =========================
   Cards / grids
   ========================= */
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card, .tool-card, .category-card, .blog-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover, .tool-card:hover, .category-card:hover, .blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

.tool-card { display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; }
.tool-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--brand-grad); }
.tool-card .tag { font-size: 0.75rem; font-weight: 700; color: var(--brand-dark); }
.tool-card h2, .tool-card h3 { margin-bottom: 2px; font-size: 1.25rem; }
.tool-card p { color: var(--ink-soft); font-size: 0.94rem; flex: 1; }
.tool-card .btn { align-self: flex-start; margin-top: 6px; }

.category-card { position: relative; overflow: hidden; }
.category-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, #7C3AED, #CE2F80); }
.category-card .count { font-size: 0.8rem; color: var(--ink-soft); }

.blog-card { display: flex; flex-direction: column; gap: 6px; }
.blog-card .meta { font-size: 0.8rem; color: var(--ink-soft); }
.blog-card h2 { font-size: 1.25rem; }
.blog-card h2 a, .blog-card h3 a { color: var(--ink); }
.blog-card p { color: var(--ink-soft); font-size: 0.93rem; }

.why-grid .card { position: relative; overflow: hidden; }
.why-grid .card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, #2C7A54, #86D9A8); }

/* Steps (genuine sequence only) */
.steps { counter-reset: step; display: grid; gap: 18px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; padding-left: 44px; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 32px; height: 32px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
}

/* =========================
   Tool workspace (compressor/resizer)
   ========================= */
.tool-workspace {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.upload-box {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--paper);
  transition: border-color .12s ease, background .12s ease;
}
.upload-box:hover, .upload-box.dragover {
  border-color: var(--brand);
  background: var(--brand-tint);
  box-shadow: var(--shadow-soft);
}
.upload-box input[type="file"] { display: none; }
.upload-box .upload-icon {
  width: 46px; height: 46px; margin: 0 auto 12px;
  border: 1.5px solid var(--ink); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.upload-box p { margin: 0; color: var(--ink-soft); }
.upload-box .upload-title { font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.upload-hint { font-size: 0.82rem; color: var(--ink-soft); margin-top: 14px; }

.workspace-body { display: none; }
.workspace-body.active { display: block; }

.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  margin: 20px 0;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.control-group { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.control-group label { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.control-group input[type="number"], .control-group input[type="text"], .control-group input[type="password"], .control-group textarea {
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--font-body);
  width: 130px;
}
.control-group textarea { width: 100%; min-height: 90px; resize: vertical; font-family: var(--font-body); }
.control-group input.field-wide { width: 100%; }
.control-group input[type="range"] { width: 180px; }
.range-value { font-weight: 700; color: var(--brand-dark); font-size: 0.9rem; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: 18px; height: 18px; }
.checkbox-row label { font-size: 0.88rem; color: var(--ink); font-weight: 500; }

.preview-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 20px 0; }
@media (min-width: 700px) { .preview-grid { grid-template-columns: 1fr 1fr; } }
.preview-panel { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.preview-panel .panel-label {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; font-size: 0.8rem; font-weight: 700; color: var(--ink-soft);
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.preview-panel .panel-img-wrap { display: flex; align-items: center; justify-content: center; min-height: 160px; padding: 10px; }
.preview-panel img { max-height: 320px; }
.size-pill { font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.size-pill.good { background: var(--good-tint); color: var(--good); border-color: transparent; }

.result-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  padding: 18px; margin: 18px 0;
  border: 1px solid var(--good); background: var(--good-tint);
  border-radius: var(--radius);
}
.result-box .result-stat { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--good); }
.result-box .result-label { font-size: 0.82rem; color: var(--ink); }
.result-box .result-details { flex: 1; min-width: 200px; }

.progress-bar { height: 8px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 14px 0; display: none; }
.progress-bar.active { display: block; }
.progress-bar-fill { height: 100%; background: var(--brand-grad); width: 0%; transition: width .15s ease; }

.alert { padding: 14px 16px; border-radius: var(--radius); margin: 14px 0; font-size: 0.92rem; border: 1px solid; display: none; }
.alert.active { display: block; }
.alert-error { background: var(--bad-tint); border-color: var(--bad); color: #7A2323; }
.alert-info { background: var(--steel-tint); border-color: var(--steel); color: var(--steel); }

.workspace-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

/* =========================
   Multi-file list (Part 3 PDF/image tools)
   ========================= */
.file-list { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.file-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.file-item.dragging { opacity: 0.45; }
.file-drag-handle { cursor: grab; color: var(--ink-soft); flex-shrink: 0; padding: 0 2px; font-size: 1rem; user-select: none; }
.file-thumb { width: 48px; height: 48px; border-radius: var(--radius); object-fit: cover; background: var(--paper); border: 1px solid var(--line); flex-shrink: 0; }
.file-thumb.icon { display: flex; align-items: center; justify-content: center; font-size: 0.72rem; color: var(--steel); font-weight: 700; }
.file-info { flex: 1; min-width: 0; }
.file-name { font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 0.8rem; color: var(--ink-soft); }
.file-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.file-move, .file-remove { border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius); width: 30px; height: 30px; cursor: pointer; font-size: 0.9rem; line-height: 1; }
.file-move:hover, .file-remove:hover { border-color: var(--ink); }
.file-remove { color: var(--bad); }
.file-move:disabled { opacity: 0.35; cursor: not-allowed; }

.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented button { padding: 8px 14px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 20px; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.segmented button.active { background: var(--brand-grad); border-color: transparent; color: #fff; box-shadow: var(--brand-glow); }

.control-group select {
  padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.9rem; background: var(--surface); color: var(--ink);
}

.page-thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; margin: 18px 0; }
.page-thumb { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.page-thumb img { width: 100%; display: block; }
.page-thumb .page-thumb-foot { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; font-size: 0.76rem; color: var(--ink-soft); gap: 4px; }
.page-thumb .page-thumb-foot a { font-weight: 600; }
.page-thumb label { display: flex; align-items: center; gap: 4px; }

.compress-levels { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 14px 0; }
@media (min-width: 640px) { .compress-levels { grid-template-columns: repeat(3, 1fr); } }
.compress-level { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; background: var(--surface); text-align: left; }
.compress-level.active { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand), var(--shadow-soft); background: var(--brand-tint); }
.compress-level h2, .compress-level h4 { margin: 0 0 4px; font-size: 0.95rem; }
.compress-level p { margin: 0; font-size: 0.8rem; color: var(--ink-soft); }

.info-strip { display: flex; flex-wrap: wrap; gap: 16px; margin: 14px 0; font-size: 0.85rem; color: var(--ink-soft); }
.info-strip strong { color: var(--ink); }

/* =========================
   FAQ
   ========================= */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0;
  padding: 16px 4px; font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; gap: 12px;
}
.faq-q .icon { flex-shrink: 0; color: var(--brand); font-weight: 700; }
.faq-a { padding: 0 4px 16px; color: var(--ink-soft); display: none; }
.faq-item.open .faq-a { display: block; }

/* =========================
   Content pages (legal, blog article)
   ========================= */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.article-meta { color: var(--ink-soft); font-size: 0.88rem; margin-bottom: 8px; }

.ad-slot {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.8rem;
  background: var(--paper);
  margin: 28px 0;
}

/* =========================
   Footer
   ========================= */
.site-footer { background: #251A35; color: #CFC3DA; margin-top: 40px; position: relative; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--brand-grad); }
.footer-inner { padding: 48px 0 28px; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; margin-bottom: 32px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-grid h2, .footer-grid h4 { color: #fff; font-size: 0.85rem; text-transform: none; margin-bottom: 12px; }
/* SEO: contact card sub-heading keeps its compact size after h3->h2 promotion */
.card h2 { font-size: 1.25rem; }
.footer-grid a { color: #CFC3DA; display: block; padding: 4px 0; font-size: 0.9rem; }
.footer-grid a:hover { color: #F9A8D4; }
.footer-grid a:hover { color: #fff; }
.footer-brand .logo { color: #fff; }
.footer-brand p { color: #A08FB5; font-size: 0.88rem; margin-top: 10px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 20px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  font-size: 0.8rem; color: #A08FB5;
}

/* =========================
   404
   ========================= */
.page-404 { text-align: left; padding: 80px 0; }
.page-404 .code { font-family: var(--font-display); font-size: 5rem; line-height: 1; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Utility */
.mt-0 { margin-top: 0; }
.text-soft { color: var(--ink-soft); }

/* =========================
   PART 4 — password field, position picker, selectable page thumbs,
   range-split results (Protect / Unlock / Page Numberer)
   ========================= */
.password-field { position: relative; width: 100%; max-width: 280px; }
.password-field input { width: 100%; padding-right: 46px !important; }
.password-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 0.72rem;
  font-weight: 700; color: var(--brand-dark); padding: 6px 8px; letter-spacing: 0.02em;
}
.password-toggle:hover { text-decoration: underline; }

.position-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 320px; }
.position-picker button {
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius);
  padding: 14px 6px; font-size: 0.7rem; font-weight: 600; color: var(--ink-soft);
  cursor: pointer; text-align: center; line-height: 1.3;
}
.position-picker button.active { border-color: transparent; background: var(--brand-grad); color: #fff; }

.page-thumb.selectable { cursor: pointer; position: relative; border-width: 2px; user-select: none; }
.page-thumb.selectable.selected { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand), var(--shadow-soft); }
.page-thumb .page-check {
  position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; border-radius: 4px;
  background: rgba(255,255,255,.92); border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; color: transparent;
}
.page-thumb.selectable.selected .page-check { background: var(--brand-grad); border-color: transparent; color: #fff; }
.page-thumb .page-number-badge {
  position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.55); color: #fff;
  font-size: 0.68rem; font-weight: 700; padding: 2px 6px; border-radius: 10px;
}

.range-result-list { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.range-result-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); flex-wrap: wrap;
}
.range-result-item .range-name { font-weight: 600; font-size: 0.92rem; }
.range-result-item .range-meta { font-size: 0.8rem; color: var(--ink-soft); }

.text-output {
  width: 100%; min-height: 260px; max-height: 480px; overflow-y: auto; resize: vertical;
  padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-family: 'Courier New', monospace; font-size: 0.86rem; line-height: 1.5; background: var(--surface);
  white-space: pre-wrap;
}

::selection { background: #F9CDE3; color: #33263F; }

/* Placeholder text — explicit AA-passing color (browser default is too faint) */
input::placeholder, textarea::placeholder { color: #7A6A8A; opacity: 1; }
