
*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--ink);
  background:
    radial-gradient(900px 700px at 10% 10%, rgba(59,130,246,.12), transparent 60%),
    radial-gradient(900px 700px at 85% 20%, rgba(96,165,250,.10), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

a{color:inherit;text-decoration:none}
.container{width:min(1120px, 100%);margin:0 auto;padding:0 16px}

/* Topbar */
.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:var(--topbar-bg);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}
.topbar-inner{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 0}
.brand{display:flex;align-items:center;gap:10px;font-weight:900;letter-spacing:.2px}
.brand-dot{
  width:10px;height:10px;border-radius:999px;
  background:linear-gradient(90deg,var(--a1),var(--a2));
  box-shadow:0 0 0 4px rgba(59,130,246,.18)
}

.nav{display:flex;gap:10px;align-items:center}
.navlink{padding:10px 12px;border-radius:10px;color:var(--muted)}
.navlink:hover{background:var(--hover-bg);color:var(--ink)}
.navbtn{
  display:none;
  background:transparent;
  border:1px solid var(--border);
  color:var(--ink);
  border-radius:10px;
  padding:8px 10px
}

/* Theme toggle */
.themebtn{
  background:transparent;
  border:1px solid var(--border);
  color:var(--ink);
  border-radius:12px;
  padding:8px 10px;
  cursor:pointer;
}
.themebtn:hover{background:var(--hover-bg)}

/* Hero */
/* Hero (TinyWow-ish open layout) */
.hero{
  padding: 28px 0 12px;
}
.hero-inner{
  padding: 0;
}

/* Optional: make homepage feel airy */
.hero h1{
  margin: 0 0 10px;
}
.hero .lead{
  max-width: 72ch;
}




.kicker{color:var(--a2);font-weight:800;text-transform:uppercase;font-size:12px;letter-spacing:.12em}
h1{margin:0 0 8px;font-size:34px;line-height:1.1}
h2{margin:0 0 8px}
h3{margin:0 0 8px}
.lead{margin:0 0 14px;color:var(--muted);font-size:16px;line-height:1.6}

/* Cards */
.cards{display:grid;grid-template-columns:repeat(3, minmax(0, 1fr));gap:12px;margin-top:16px}
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:18px;
  padding:18px
}
.toolcard{transition:transform .15s ease, background .15s ease}
.toolcard:hover{transform:translateY(-2px);background:var(--hover-bg)}
.toolcat{font-size:12px;color:var(--a2);font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.tooltitle{margin-top:6px;font-weight:900}

/* Tool page */
.tool-hero{padding:22px 0 8px}
.tool-head{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:18px;
  padding:20px
}
.breadcrumb{color:var(--muted);font-size:13px;margin-bottom:8px}
.breadcrumb span{opacity:.6;padding:0 6px}
.pillrow{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}
.pill{border:1px solid var(--border);border-radius:999px;padding:6px 10px;color:var(--muted);font-size:12px}

.tool-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:16px;padding:14px 0 18px}
.form{display:grid;gap:10px}
.label{font-weight:800;font-size:13px;color:var(--muted)}
.input{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:var(--inputbg);
  color:var(--ink);
  outline:none;
}
.input:focus{border-color:rgba(59,130,246,.6);box-shadow:0 0 0 4px rgba(59,130,246,.16)}
.btn{
  cursor:pointer;
  border:none;
  border-radius:12px;
  padding:12px 14px;
  font-weight:900;
  background:linear-gradient(90deg, var(--a1), var(--a2));
  color:#061022;
}
html[data-theme="dark"] .btn{color:#ffffff}
.btn:hover{filter:brightness(1.05)}
.muted{color:var(--muted)}
.small{font-size:13px}
.grid-2{display:grid;grid-template-columns:repeat(2, minmax(0,1fr));gap:10px}
.grid-3{display:grid;grid-template-columns:repeat(3, minmax(0,1fr));gap:10px}
.grid-4{display:grid;grid-template-columns:repeat(4, minmax(0,1fr));gap:10px}

/* Tool list + FAQ */
.toollist{display:grid;gap:10px;margin-top:10px;max-height:520px;overflow:auto;padding-right:6px}
.toolitem{
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
  background:var(--panel);
}
.toolitem:hover{background:var(--hover-bg)}
.toolitem.active{border-color:rgba(59,130,246,.6)}
.toolname{font-weight:900}
.tooldesc{font-size:13px;margin-top:4px}

.content{padding:10px 0 26px}
.faq{display:grid;gap:10px}
.faqitem{
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
  background:var(--panel);
}
.faqitem summary{cursor:pointer;font-weight:900}
.faqitem div{margin-top:8px}

/* Footer + Ads */
.footer{
  border-top:1px solid var(--border);
  padding:22px 0 18px;
  margin-top:20px;
  background:var(--panel);
}
.footer-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:16px}
.footer-title{font-weight:900;margin-bottom:6px}
.footer-links{display:grid;gap:6px}
.footer-links a{color:var(--muted)}
.footer-links a:hover{color:var(--ink)}
.footer-bottom{padding-top:12px;font-size:13px}

.adbox{
  margin-top:14px;
  border:1px dashed var(--border);
  border-radius:14px;
  padding:10px;
  background:var(--panel);
  height: 100px;
}

/* Mobile */
@media (max-width: 920px){
  .hero{grid-template-columns:1fr}
  .cards{grid-template-columns:repeat(2, minmax(0,1fr))}
  .tool-grid{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr}
  .navbtn{display:inline-flex}

  .nav{
    display:none;
    position:absolute;
    right:16px;
    top:58px;
    background:var(--nav-bg);
    border:1px solid var(--border);
    border-radius:14px;
    padding:10px;
    flex-direction:column;
    min-width:220px
  }
  .nav.open{display:flex}
}

@media (max-width: 520px){
  .cards{grid-template-columns:1fr}
  h1{font-size:28px}
}


.dropzone{
  border:2px dashed rgba(15, 23, 42, 0.18);
  background: rgba(15, 23, 42, 0.03);
  border-radius: 16px;
  padding: 18px;
  cursor: pointer;
  transition: .15s ease;
}

.dropzone:hover{
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.28);
}

.dropzone.is-dragover{
  background: rgba(45,108,255,0.08);
  border-color: rgba(45,108,255,0.55);
}

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

.dz-inner{ text-align:center; padding: 18px 8px; }
.dz-title{ font-weight: 900; font-size: 16px; }
.dz-sub{ margin-top: 6px; }
.dz-meta{ margin-top: 10px; }

.upload-preview{
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 14px;
  background: #fff;
}

.file-list{
  margin: 0;
  padding-left: 18px;
}

.file-list li{
  padding: 4px 0;
  word-break: break-word;
}


/* ================================
    LIGHT UI OVERRIDES
   Paste at the BOTTOM of app.css
   ================================ */
/* Default = LIGHT */
:root{
  --bg0:#f6f8fb;
  --bg1:#ffffff;
  --card:#ffffff;
  --panel:#ffffff;
  --inputbg:#ffffff;

  --ink:#0b1220;
  --muted:#5b677a;
  --border:rgba(15, 23, 42, .10);

  --a1:#2563eb;
  --a2:#3b82f6;

  --shadow: 0 12px 30px rgba(15, 23, 42, .08);

  --topbar-bg: rgba(255,255,255,.86);
  --nav-bg: rgba(255,255,255,.98);
  --hover-bg: rgba(37,99,235,.06);
}


/* Background: remove heavy gradients for that clean utility look */
body{
  background: linear-gradient(180deg, var(--bg0), var(--bg1));
  color: var(--ink);
}

/* Topbar cleaner */
.topbar{
  box-shadow: 0 6px 18px rgba(15,23,42,.06);
}

/* Typography polish */
h1{ font-size: 40px; letter-spacing: -0.02em; }
@media (max-width:520px){
  h1{ font-size: 30px; }
}
.lead{ font-size: 16px; color: var(--muted); }

/* HERO: make it single-column + cleaner */
.hero{
  display:block;
  padding: 26px 0 10px;
}
.hero-card{
  border-radius: 20px;
  padding: 28px;
}

/* Card system: lighter + tighter */
.card{
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* Tool cards: stronger hover like “directory tiles” */
.toolcard{
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
}
.toolcard:hover{
  transform: translateY(-2px);
  border-color: rgba(37,99,235,.25);
  box-shadow: 0 16px 40px rgba(15,23,42,.10);
  background: #ffffff;
}
.toolcat{
  color: rgba(37,99,235,.95);
  font-weight: 800;
}
.tooltitle{
  font-size: 16px;
}

/* Buttons: more “product” feel */
.btn{
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: 0 10px 22px rgba(37,99,235,.18);
}
.btn:hover{ filter:none; transform: translateY(-1px); }
.btn:active{ transform: translateY(0px); }

/* Inputs: clean white with subtle border */
.input{
  background: var(--inputbg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 14px;
}
.input:focus{
  border-color: rgba(37,99,235,.45);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

/* Pills: look like tiny tags */
.pill{
  background: rgba(37,99,235,.06);
  border-color: rgba(37,99,235,.12);
  color: rgba(37,99,235,.95);
}

/* Footer: cleaner */
.footer{
  background: #ffffff;
}

/* Dropzone: big, friendly, like competitors */
.dropzone{
  border: 2px dashed rgba(37,99,235,.25);
  background: rgba(37,99,235,.04);
  border-radius: 18px;
  padding: 22px;
}
.dropzone:hover{
  background: rgba(37,99,235,.06);
  border-color: rgba(37,99,235,.40);
}
.dropzone.is-dragover{
  background: rgba(37,99,235,.10);
  border-color: rgba(37,99,235,.65);
}
.upload-preview{
  background: #ffffff;
  border-radius: 16px;
}

/* Tool grid pages: slightly roomier */
.tool-head{ padding: 22px; }
.tool-grid{ padding: 18px 0 22px; }

.hero-intro{
  text-align: center;
  margin-bottom: 18px;
}

.hero-intro .lead{
  margin-left: auto;
  margin-right: auto;
  max-width: 70ch;
}


/* Color category cards (TinyWow-ish) */
.catgrid { gap: 14px; }

.catcard{
  display:block;
  border-radius:18px;
  overflow:hidden;
  border:1px solid rgba(15,23,42,.10);
  background:#fff;
  box-shadow: 0 12px 30px rgba(15,23,42,.08);
  transition: transform .14s ease, box-shadow .14s ease;
}

.catcard:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(15,23,42,.12);
}

.cat-top{
  padding:16px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  color:#fff;
}

.cat-icon{
  width:44px;height:44px;
  border-radius:999px;
  display:flex;align-items:center;justify-content:center;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.20);
  font-size:20px;
}

.cat-pill{
  font-size:12px;
  font-weight:800;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.22);
  white-space:nowrap;
}

.cat-body{
  padding:14px 16px 16px;
  color:#fff;
}

.cat-body h3{
  margin: 0 0 4px;
  font-size:18px;
  font-weight:900;
}

.cat-body p{
  margin:0;
  opacity:.92;
  font-size:13px;
  font-weight:700;
}

.cat-bottom{
  margin: 12px 16px 16px;
  background: rgba(108, 214, 173, 0.589);
  border: 1px solid rgba(15,23,42,.08);
  border-radius:12px;
  padding:10px 12px;
  display:flex;
  align-items:center;
  gap:8px;
  color:#0b1220;
}

.cat-label{
  font-size:12px;
  color: rgba(11,18,32,.60);
  font-weight:800;
}

.cat-feature{
  font-size:12px;
  font-weight:900;
  margin-left:auto;
  margin-right:8px;
  white-space:nowrap;
}

.cat-arrow{
  font-weight:900;
  opacity:.85;
}

/* Color variants */
.cat-pdf .cat-top,
.cat-pdf .cat-body{
  background: linear-gradient(135deg, #6d5efc, #7c4dff);
}

.cat-convert .cat-top,
.cat-convert .cat-body{
  background: linear-gradient(135deg, #ff7a18, #ff4d4d);
}

.cat-compress .cat-top,
.cat-compress .cat-body{
  background: linear-gradient(135deg, #1f6feb, #2dd4bf);
}

/* Mobile: stack nicely */
@media (max-width: 920px){
  .catgrid{ grid-template-columns: 1fr; }
}


/* Grid like the screenshot */
.cards{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:18px;
  margin-top:14px;
}

/* Responsive breakpoints */
@media (max-width: 1100px){
  .cards{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px){
  .cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  .cards{ grid-template-columns: 1fr; }
}

/* Card look */
.toolcard{
  display:block;
  background:#fff;
  border:1px solid rgba(15, 23, 42, 0.08);
  border-radius:16px;
  padding:16px 16px 14px;
  text-decoration:none;
  color:inherit;
  box-shadow: 0 10px 30px rgba(10, 22, 45, 0.06);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  min-height: 108px;
}

.toolcard:hover{
  transform: translateY(-2px);
  border-color: rgba(45, 108, 255, 0.22);
  box-shadow: 0 16px 46px rgba(10, 22, 45, 0.10);
}

/* Header row: icon + title/meta */
.toolhead{
  display:flex;
  align-items:flex-start;
  gap:12px;
}

/* Icon tile (soft colored square like screenshot) */
.toolicon{
  width:38px;
  height:38px;
  border-radius:12px;
  background: linear-gradient(135deg, rgba(45,108,255,.14), rgba(139,92,246,.14));
  border:1px solid rgba(45,108,255,.18);
  box-shadow: 0 6px 14px rgba(10, 22, 45, 0.06);
  flex:0 0 auto;
  position:relative;
}

/* Tiny “paper” glyph inside (no images needed) */
.toolicon::after{
  content:"";
  position:absolute;
  inset:10px 12px 10px 12px;
  border-radius:4px;
  background: rgba(45,108,255,.22);
}

/* Title + category */
.toolmeta{ min-width:0; }

.tooltitle{
  font-weight:800;
  font-size:16px;
  line-height:1.15;
  margin:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.toolcat{
  margin-top:4px;
  font-size:12px;
  font-weight:700;
  color:#f97316; /* orange like screenshot category label */
}

/* Description text */
.tooldesc{
  margin-top:10px;
  font-size:13px;
  line-height:1.35;
  color: rgba(15, 23, 42, 0.62);
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

/* Optional: make different categories auto-color (nice touch) */
.toolcard[data-cat="PDF Tools"] .toolicon{
  background: linear-gradient(135deg, rgba(34,197,94,.14), rgba(45,108,255,.12));
  border-color: rgba(34,197,94,.20);
}
.toolcard[data-cat="Image Tools"] .toolicon{
  background: linear-gradient(135deg, rgba(251,146,60,.16), rgba(239,68,68,.10));
  border-color: rgba(251,146,60,.22);
}
.toolcard[data-cat="AI Write"] .toolicon{
  background: linear-gradient(135deg, rgba(139,92,246,.16), rgba(45,108,255,.12));
  border-color: rgba(139,92,246,.22);
}


.page-alert{
  display:none;
  margin: 12px 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(245, 158, 11, 0.12); /* amber */
  color: rgba(15, 23, 42, 0.86);
  font-weight: 650;
  line-height: 1.35;
}

.page-alert.is-error{
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.22);
}

.page-alert.is-ok{
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.22);
}

.page-alert .page-alert-close{
  float:right;
  border:0;
  background:transparent;
  font-size:16px;
  cursor:pointer;
  opacity:.7;
}
.page-alert .page-alert-close:hover{opacity:1;}

.file-reorder{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:8px;
}

.file-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid rgba(15,23,42,.10);
  border-radius:12px;
  background:#fff;
  box-shadow: 0 10px 25px rgba(10,22,45,.05);
}

.file-item.dragging{
  opacity:.6;
}

.file-grip{
  cursor:grab;
  user-select:none;
  font-weight:900;
  opacity:.6;
}

.file-name{
  flex:1;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.file-actions{
  display:flex;
  gap:6px;
}

.btn-mini{
  border:1px solid rgba(15,23,42,.14);
  background:#fff;
  padding:6px 8px;
  border-radius:10px;
  font-weight:800;
  cursor:pointer;
}
.btn-mini:hover{ transform: translateY(-1px); }

.btn-mini.danger{
  border-color: rgba(239,68,68,.25);
}















/* SEO support block (homepage) */
.seo-support{
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.seo-support .seo-title{
  font-size: 14px;
  margin: 0 0 10px 0;
  opacity: .85;
}

.seo-links a,
.footer-pills a{
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
}

.seo-links li{
  margin: 0;
}

.seo-links a{
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);

  text-decoration: none;
  font-size: 13px;
  opacity: .9;
}

.seo-links a:hover,
.footer-pills a:hover{
  color: var(--ink);
  background: var(--hover-bg);
}


/* Footer pill links */
.footer-pills{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-pills a{
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
  text-decoration: none;
  font-size: 13px;
  opacity: .9;
}

.footer-pills a:hover{
  opacity: 1;
}

.seo-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.seo-list li{ margin: 0; }

.seo-list a{
  display: inline-block;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: background .12s ease, color .12s ease, border-color .12s ease, transform .12s ease;
}

.seo-list a:hover{
  background: var(--hover-bg);
  color: var(--ink);
  border-color: rgba(37,99,235,.25);
  transform: translateY(-1px);
}

.howto{
  margin: 10px 0 14px;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}
.howto strong{ color: var(--ink); }

.brand-logo{ display:block; width:28px; height:28px; }
.brand-name{ font-weight:900; letter-spacing:.2px; }


.brand-logo{
  width:28px;
  height:28px;
  border-radius:8px; /* remove if your logo shouldn’t be rounded */
  display:block;
}
.brand-name{font-weight:900;letter-spacing:.2px}



/* =========================================
   MOBILE-ONLY UI OPTIMIZATIONS (DO NOT AFFECT DESKTOP)
   ========================================= */
@media (max-width: 920px){

  /* A1) Category cards: horizontal swipe row */
  .catgrid{
    display:flex !important;
    flex-wrap:nowrap;
    overflow-x:auto;
    -webkit-overflow-scrolling: touch;
    gap:12px;
    padding: 6px 2px 10px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
  }
  .catgrid::-webkit-scrollbar{ display:none; } /* Chrome/Safari */

  .catgrid .catcard{
    flex: 0 0 78%;
    max-width: 78%;
    scroll-snap-align: start;
  }

  /* Make them smaller + more “pro” on mobile */
  .cat-top{ padding: 12px; }
  .cat-icon{ width:38px; height:38px; font-size:18px; }
  .cat-body{ padding: 10px 12px 12px; }
  .cat-body h3{ font-size:16px; }
  .cat-body p{ font-size:12px; }
  .cat-bottom{
    margin: 10px 12px 12px;
    padding: 8px 10px;
    gap:6px;
  }
  .cat-label,.cat-feature{ font-size:11px; }
}


@media (max-width: 520px){

  /* A2) Tool cards: force 2 columns on phones */
  .cards{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  /* Make tool cards more compact (less tall) */
  .toolcard{
    padding: 12px !important;
    border-radius: 14px !important;
    min-height: 96px !important;
  }

  .toolhead{ gap: 10px; }
  .toolicon{ width:34px; height:34px; border-radius: 11px; }
  .tooltitle{ font-size: 14px; }
  .toolcat{ font-size: 11px; }
  .tooldesc{
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.3;
    -webkit-line-clamp: 2;
  }
}

/* Ultra-small phones: fall back to 1 column */
@media (max-width: 360px){
  .cards{ grid-template-columns: 1fr !important; }
}


@media (max-width: 520px){

  /* A3) Fix “Why people use wowPDF” (and similar grid-3 card blocks) */
  .content .grid-3{
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .content .grid-3 .card{
    padding: 12px !important;
    border-radius: 14px !important;
  }

  .content .grid-3 .card h3{
    font-size: 15px;
    margin-bottom: 6px;
  }

  .content .grid-3 .card p{
    font-size: 12.5px;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* Mobile navbar breathing room (DOES NOT AFFECT DESKTOP) */
@media (max-width: 920px){
  .topbar-inner{
    padding-left: 12px;
    padding-right: 12px;
  }

  /* If you want the dropdown menu to align nicely too */
  .nav{
    right: 12px; /* was 16px :contentReference[oaicite:1]{index=1} */
  }
}

@media (max-width: 520px){
  .topbar-inner{
    padding-left: 14px;
    padding-right: 14px;
  }
}


/* PDF editor tool buttons – mobile only */
@media (max-width: 920px){

  /* container: if you have a wrapper, this will help; harmless if not */
  .pdf-tools,
  .pdf-toolbar,
  .tool-row,
  .toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }

  /* shrink + professional look */
  button[data-tool]{
    appearance: none;
    border: 1px solid rgba(15,23,42,0.14);
    background: rgba(255,255,255,0.92);
    color: #0f172a;
    padding: 7px 10px;
    font-size: 12px;
    line-height: 1;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.08);
  }

  /* icon-only pan button: keep it compact */
  button[data-tool="pan"]{
    padding: 7px 10px;
    font-size: 14px;
    min-width: 38px;
    text-align: center;
  }

  /* selected state (your JS uses opacity/fontWeight already, but this looks better) */
  button[data-tool][style*="font-weight: 900"],
  button[data-tool].is-active{
    background: #0f172a;
    color: #ffffff;
    border-color: rgba(15,23,42,0.35);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.18);
  }

  /* pressed feel */
  button[data-tool]:active{
    transform: translateY(1px);
  }
}

/* extra-small phones: even tighter */
@media (max-width: 520px){
  button[data-tool]{
    padding: 6px 9px;
    font-size: 11.5px;
  }
  button[data-tool="pan"]{
    min-width: 36px;
    font-size: 13px;
  }
}


/* PDF editor action buttons (Undo / Clear / Apply) – mobile only */
@media (max-width: 920px){

  #pdfUndo,
  #pdfClear,
  #pdfApplyChanges{
    appearance: none;
    border: 1px solid rgba(15,23,42,0.14);
    background: rgba(255,255,255,0.92);
    color: #0f172a;
    padding: 7px 10px;
    font-size: 12px;
    line-height: 1;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.08);
  }

  /* Primary action */
  #pdfApplyChanges{
    background: #0f172a;
    color: #ffffff;
    border-color: rgba(15,23,42,0.35);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.18);
  }

  /* Clear = subtle warning without loud colors */
  #pdfClear{
    background: rgba(239,68,68,0.08);
    border-color: rgba(239,68,68,0.18);
    color: #7f1d1d;
  }

  /* pressed feel */
  #pdfUndo:active,
  #pdfClear:active,
  #pdfApplyChanges:active{
    transform: translateY(1px);
  }
}

@media (max-width: 520px){
  #pdfUndo,
  #pdfClear,
  #pdfApplyChanges{
    padding: 6px 9px;
    font-size: 11.5px;
  }
}
