/* ====================================
   PDF TOOLS — a_style.css
   Design: Clean Minimal (Smallpdf-inspired)
   Font: Kanit + Noto Sans Thai + Noto Sans Mono
   ==================================== */

@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Noto+Sans+Thai:wght@300;400;500;600;700&family=Noto+Sans+Mono:wght@400;500&display=swap');

:root {
  --white:      #ffffff;
  --bg:         #f7f7f5;
  --surface:    #ffffff;
  --border:     #e8e8e4;
  --text:       #1a1a18;
  --text-muted: #7a7a72;
  --text-light: #b0b0a8;
  --primary:    #e85d4a;
  --primary-dk: #c94234;
  --primary-lt: #fff0ee;
  --accent:     #f5a623;
  --success:    #3ecf8e;
  --info:       #5c6bc0;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.12);
  --radius:     12px;
  --radius-sm:  8px;
  --radius-lg:  20px;
  --font:       'Kanit', 'Noto Sans Thai', sans-serif;
  --font-mono:  'Noto Sans Mono', 'Courier New', monospace;
  --transition: .2s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  line-height: 1.7; -webkit-font-smoothing: antialiased;
  /* Kanit + Noto Sans Thai: เพิ่ม line-height เล็กน้อยเพื่อ Thai characters */
  font-feature-settings: "kern" 1, "liga" 1;
}

/* Thai text ให้ใช้ Noto Sans Thai เสริม Kanit
   ยกเว้น <i> tag ที่ใช้สำหรับ Font Awesome icons */
:lang(th):not(i):not([class*="fa"]):not([class*="ti"]) {
  font-family: 'Noto Sans Thai', 'Kanit', sans-serif;
}
/* Font Awesome ต้องใช้ font ของตัวเองเสมอ */
i[class*="fa"], i[class*="ti"], .fas, .far, .fal, .fab, .fad {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 5 Free" !important;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ======== LAYOUT ======== */
.container    { max-width: 1500px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 760px;  margin: 0 auto; padding: 0 24px; }

/* ======== NAV ======== */
.site-nav {
  background: var(--white); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.site-nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; position: relative;
}
.site-nav__logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.1rem; color: var(--primary);
}
.site-nav__logo svg { width: 28px; height: 28px; }
.site-nav__links { display: flex; gap: 4px; list-style: none; }
.site-nav__links a {
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; color: var(--text-muted);
  transition: var(--transition);
}
.site-nav__links a:hover,
.site-nav__links a.active { background: var(--primary-lt); color: var(--primary); }
.site-nav__actions { display: flex; align-items: center; gap: 8px; }

/* ── Nav dropdown ── */
.has-dropdown { position: relative; }
.nav-dropdown {
  position: absolute; top: calc(100% + 4px); left: 50%;
  transform: translateX(-50%);
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 8px; min-width: 260px; width: max-content; max-width: 300px;
  display: none; z-index: 200; flex-direction: column; gap: 2px;
}
/* bridge: fills gap between trigger and dropdown so mouse can travel down */
.nav-dropdown::before {
  content: ''; position: absolute; top: -10px; left: 0; right: 0; height: 10px;
}
/* Mega dropdown */
.nav-dropdown--mega {
  left: 0; transform: none; max-width: none; width: 680px;
  display: none; flex-direction: row; flex-wrap: nowrap; gap: 0; padding: 16px;
}
.nav-dropdown--mega::before {
  content: ''; position: absolute; top: -10px; left: 0; right: 0; height: 10px;
}
.mega-group {
  flex: 1; min-width: 100px; padding: 0 12px;
  border-right: 1px solid var(--border);
}
.mega-group:last-child { border-right: none; }
.mega-group__title {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-muted);
  padding: 0 0 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border);
}
.mega-group .nav-dropdown__item { padding: 6px 8px; }
.mega-group .nav-dropdown__label { font-size: .8rem; }
.mega-group .nav-dropdown__icon { width: 24px; height: 24px; border-radius: 5px; font-size: .72rem; }
/* JS-controlled open state */
.has-dropdown.is-open .nav-dropdown { display: flex; }
.has-dropdown.is-open > a > .fa-chevron-down { transform: rotate(180deg); }
.has-dropdown > a > .fa-chevron-down { transition: transform .15s; }
.nav-dropdown__item {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px;
  border-radius: var(--radius-sm); transition: var(--transition); color: var(--text);
}
.nav-dropdown__item:hover  { background: var(--bg); }
.nav-dropdown__item.active { background: var(--primary-lt); }
.nav-dropdown__icon {
  width: 30px; height: 30px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .8rem;
}
.nav-dropdown__label { font-weight: 600; font-size: .83rem; line-height: 1.2; }
.nav-dropdown__desc  { font-size: .72rem; color: var(--text-muted); margin-top: 1px; }
.lang-switch {
  padding: 5px 11px; border-radius: 100px; border: 1.5px solid var(--border);
  font-size: .8rem; font-weight: 600; color: var(--text-muted);
  transition: var(--transition); white-space: nowrap;
}
.lang-switch:hover { border-color: var(--primary); color: var(--primary); }

/* ======== HERO ======== */
.tool-hero {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 56px 0 48px; text-align: center;
}
.tool-hero__icon {
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--primary-lt); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; margin: 0 auto 20px;
}
.tool-hero__title { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 10px; }
.tool-hero__desc  { color: var(--text-muted); font-size: 1.05rem; max-width: 480px; margin: 0 auto; }

/* ======== DROP ZONE ======== */
.drop-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-lg);
  background: var(--white); padding: 64px 40px; text-align: center;
  cursor: pointer; transition: var(--transition); position: relative;
}
.drop-zone:hover,
.drop-zone.dragover { border-color: var(--primary); background: var(--primary-lt); }

/* FIX: pointer-events:all + z-index:2 ให้ input รับ click/drag ได้ */
.drop-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0;
  cursor: pointer; width: 100%; height: 100%;
  pointer-events: all;
  z-index: 2;
}
.drop-zone__icon  { font-size: 2.5rem; color: var(--primary); margin-bottom: 16px; }
.drop-zone__title { font-size: 1.15rem; font-weight: 600; margin-bottom: 6px; }
.drop-zone__sub   { color: var(--text-muted); font-size: .9rem; }

/* FIX: pointer-events:none ให้ click ทะลุไปยัง input ข้างหลัง */
.drop-zone__btn {
  display: inline-block; margin-top: 20px; padding: 10px 28px;
  background: var(--primary); color: #fff; border-radius: 100px;
  font-weight: 600; font-size: .9rem; transition: var(--transition);
  pointer-events: none; position: relative; z-index: 1;
}
.drop-zone:hover .drop-zone__btn { background: var(--primary-dk); }

/* ======== FILE LIST ======== */
.file-list { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.file-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px;
  transition: var(--transition); cursor: grab;
}
.file-item:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.file-item.dragging { opacity: .5; border-style: dashed; }
.file-item__icon {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--primary-lt); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.file-item__name  { flex: 1; font-weight: 500; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-item__size  { font-size: .8rem; color: var(--text-muted); font-family: var(--font-mono); flex-shrink: 0; }
.file-item__remove {
  background: none; border: none; color: var(--text-light);
  cursor: pointer; padding: 4px; border-radius: 4px;
  transition: var(--transition); line-height: 1; flex-shrink: 0;
}
.file-item__remove:hover { color: var(--primary); }

/* ======== OPTIONS PANEL ======== */
.options-panel {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-top: 24px;
}
.options-panel__title {
  font-weight: 600; font-size: .9rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px;
}
.option-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border);
}
.option-row:last-child { border-bottom: none; }
.option-row label { font-size: .9rem; font-weight: 500; }
.option-row select,
.option-row input[type="text"],
.option-row input[type="number"] {
  padding: 7px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-family: var(--font);
  font-size: .875rem; color: var(--text); background: var(--bg);
  outline: none; transition: var(--transition); min-width: 160px;
}
.option-row select:focus,
.option-row input:focus { border-color: var(--primary); background: var(--white); }

/* ======== BUTTONS ======== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 28px; border-radius: 100px;
  font-family: var(--font); font-weight: 600; font-size: .95rem;
  cursor: pointer; border: none; transition: var(--transition); white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dk); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(232,93,74,.3); }
.btn-primary:active { transform: translateY(0); }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--text); background: var(--bg); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.08); }
.btn-lg   { padding: 15px 36px; font-size: 1rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .45; pointer-events: none; }

/* ======== PROGRESS ======== */
.progress-wrap { margin-top: 24px; }
.progress-label { display: flex; justify-content: space-between; font-size: .85rem; color: var(--text-muted); margin-bottom: 8px; }
.progress-bar-outer { height: 6px; background: var(--border); border-radius: 100px; overflow: hidden; }
.progress-bar-inner { height: 100%; background: var(--primary); border-radius: 100px; width: 0%; transition: width .3s ease; }

/* ======== RESULT BOX ======== */
.result-box {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px; text-align: center;
  margin-top: 24px; display: none;
}
.result-box.show { display: block; animation: fadeUp .3s ease; }
.result-box__icon   { font-size: 3rem; color: var(--success); margin-bottom: 16px; }
.result-box__title  { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.result-box__meta   { font-size: .875rem; color: var(--text-muted); margin-bottom: 24px; font-family: var(--font-mono); }
.result-box__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ======== TOOL GRID ======== */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.tool-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 20px;
  display: flex; flex-direction: column; gap: 14px;
  transition: var(--transition); cursor: pointer;
}
.tool-card:hover { border-color: var(--tool-color, var(--primary)); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.tool-card--active { border-color: var(--tool-color, var(--primary)); }
.tool-card__icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: color-mix(in srgb, var(--tool-color, var(--primary)) 12%, white);
  color: var(--tool-color, var(--primary));
  display: flex; align-items: center; justify-content: center; font-size: 1.25rem;
}
.tool-card__label { font-weight: 600; font-size: .95rem; }
.tool-card__desc  { font-size: .82rem; color: var(--text-muted); }

/* ======== STATS ======== */
.stats-row { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; padding: 32px 0; }
.stat-item { text-align: center; }
.stat-item__num   { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }
.stat-item__label { font-size: .82rem; color: var(--text-muted); }

/* ======== STEPS ======== */
.steps { display: flex; gap: 0; justify-content: center; flex-wrap: wrap; margin: 40px 0; }
.step {
  display: flex; align-items: flex-start; gap: 14px;
  flex: 1; min-width: 180px; max-width: 260px; padding: 0 16px; position: relative;
}
.step:not(:last-child)::after {
  content: ''; position: absolute; right: -1px; top: 20px;
  width: 2px; height: 24px; background: var(--border);
}
.step__num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-lt); color: var(--primary);
  font-weight: 700; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: .9rem;
}
.step__title { font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.step__desc  { font-size: .82rem; color: var(--text-muted); }

/* ======== TOAST ======== */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px; z-index: 9999;
}
.toast {
  background: var(--text); color: #fff; padding: 12px 18px;
  border-radius: var(--radius); font-size: .88rem; font-weight: 500;
  box-shadow: var(--shadow-lg); animation: slideUp .25s ease;
  display: flex; align-items: center; gap: 10px; max-width: 320px;
}
.toast.success { background: var(--success); }
.toast.error   { background: var(--primary); }

/* ======== FOOTER ======== */
.site-footer { background: var(--white); border-top: 1px solid var(--border); padding: 40px 0 32px; margin-top: 80px; }
.site-footer__inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.site-footer__brand { font-weight: 700; color: var(--primary); font-size: 1rem; margin-bottom: 8px; }
.site-footer__copy  { font-size: .82rem; color: var(--text-muted); }
.site-footer__links { display: flex; gap: 20px; list-style: none; flex-wrap: wrap; }
.site-footer__links a { font-size: .875rem; color: var(--text-muted); transition: var(--transition); }
.site-footer__links a:hover { color: var(--text); }

/* ======== ANIMATIONS ======== */
@keyframes fadeUp  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px);  } to { opacity: 1; transform: translateY(0); } }
@keyframes spin    { to { transform: rotate(360deg); } }
.spinner {
  width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite; display: inline-block;
}

/* ======== UTILITIES ======== */
.mt-8  { margin-top: 8px;  } .mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; }
.mb-8  { margin-bottom: 8px;  } .mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.hidden { display: none !important; }
.d-flex { display: flex; } .align-center { align-items: center; }
.gap-12 { gap: 12px; } .flex-1 { flex: 1; }

/* ======== ADS ======== */
.ad-slot { margin: 0 auto; }
.ad-slot--leaderboard   { max-width: 728px; }
.ad-slot--rectangle     { max-width: 300px; }
.ad-slot--sidebar       { max-width: 160px; }
.ad-slot--in_content    { width: 100%; }
.ad-slot--mobile_banner { max-width: 320px; }
.visible-mobile { display: none; }
.hidden-mobile  { display: block; }
@media (max-width: 768px) {
  .visible-mobile { display: block; }
  .hidden-mobile  { display: none;  }
}

/* ======== SHARE BAR ======== */
.share-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; margin-top: 16px; flex-wrap: wrap;
}
.share-bar__label  { font-size: .82rem; font-weight: 600; color: var(--text-muted); flex-shrink: 0; }
.share-bar__input  {
  flex: 1; min-width: 200px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 12px;
  font-family: var(--font-mono); font-size: .8rem;
  background: var(--white); color: var(--text); outline: none;
}
.share-bar__copy {
  flex-shrink: 0; padding: 7px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--white);
  font-family: var(--font); font-size: .82rem; font-weight: 600;
  cursor: pointer; color: var(--text); transition: var(--transition);
}
.share-bar__copy:hover { border-color: var(--primary); color: var(--primary); }

/* ======== MODAL ======== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--white); border-radius: var(--radius-lg);
  width: 100%; max-width: 700px; max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  transform: translateY(12px); transition: transform .25s ease; overflow: hidden;
}
.modal-backdrop.open .modal-box { transform: translateY(0); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal-header h3 { font-size: .95rem; font-weight: 600; }
.modal-close {
  width: 32px; height: 32px; border-radius: 8px; border: none; background: none;
  cursor: pointer; color: var(--text-muted); font-size: 1rem;
  display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.modal-page { width: 100%; max-width: 560px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.modal-footer { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; flex-wrap: wrap; gap: 10px; }
.modal-page-indicator { font-size: .85rem; color: var(--text-muted); font-family: var(--font-mono); }

/* ======== DARK TOGGLE ======== */
.dark-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--white);
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); font-size: .9rem;
}
.dark-toggle:hover { border-color: var(--text); color: var(--text); }

/* ======================================
   DARK MODE
   ====================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --white:      #1e1e1c; --bg:         #141412;
    --surface:    #1e1e1c; --border:     #2e2e2a;
    --text:       #f0f0ec; --text-muted: #8a8a80;
    --text-light: #525248; --primary-lt: #2a1510;
    --shadow-sm:  0 1px 3px rgba(0,0,0,.3);
    --shadow-md:  0 4px 16px rgba(0,0,0,.4);
    --shadow-lg:  0 12px 40px rgba(0,0,0,.5);
  }
  .drop-zone:hover, .drop-zone.dragover { background: #2a1510; }
  .tool-card__icon { background: color-mix(in srgb, var(--tool-color, var(--primary)) 18%, #1e1e1c); }
  .options-panel select, .options-panel input { background: var(--bg); color: var(--text); }
  .preset-btn, .angle-btn, .quality-opt { color: var(--text); }
  .modal-backdrop { background: rgba(0,0,0,.75); }
  .modal-box { background: var(--white); }
}
[data-theme="dark"] {
  --white:      #1e1e1c; --bg:         #141412;
  --surface:    #1e1e1c; --border:     #2e2e2a;
  --text:       #f0f0ec; --text-muted: #8a8a80;
  --text-light: #525248; --primary-lt: #2a1510;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.3);
  --shadow-md:  0 4px 16px rgba(0,0,0,.4);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.5);
}
[data-theme="dark"] .drop-zone:hover,
[data-theme="dark"] .drop-zone.dragover { background: #2a1510; }
[data-theme="dark"] .tool-card__icon    { background: color-mix(in srgb, var(--tool-color, var(--primary)) 18%, #1e1e1c); }
[data-theme="dark"] .options-panel select,
[data-theme="dark"] .options-panel input { background: var(--bg); color: var(--text); }
[data-theme="dark"] .preset-btn,
[data-theme="dark"] .angle-btn,
[data-theme="dark"] .quality-opt { color: var(--text); }

/* ======================================
   RESPONSIVE
   ====================================== */
@media (max-width: 900px) {
  .site-nav__links { display: none; }
  .site-nav__hamburger {
    display: flex; width: 36px; height: 36px;
    align-items: center; justify-content: center;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    background: none; cursor: pointer; color: var(--text-muted);
  }
}

@media (min-width: 769px) {
  .site-nav__mobile-menu { display: none; }
}

@media (max-width: 768px) {
  .dark-toggle { display: none; }
  .tool-hero { padding: 36px 0 28px; }
  .tool-hero__title { font-size: 1.5rem; }
  .drop-zone { padding: 40px 20px; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .steps { flex-direction: column; align-items: center; }
  .step::after { display: none; }
  .site-footer__inner { flex-direction: column; gap: 20px; }
  .btn { min-height: 46px; padding: 12px 22px; }
  .file-item { padding: 12px 14px; }
  .file-item__remove { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }

  /* Mobile menu */
  .site-nav__hamburger {
    display: flex; width: 36px; height: 36px;
    align-items: center; justify-content: center;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    background: none; cursor: pointer; color: var(--text-muted);
  }
  .site-nav__mobile-menu {
    display: none; position: fixed; inset: 60px 0 0 0;
    background: var(--white); z-index: 99; overflow-y: auto;
    padding: 16px 20px; flex-direction: column; gap: 4px;
    border-top: 1px solid var(--border);
  }
  .site-nav__mobile-menu.open { display: flex; }
  .site-nav__mobile-menu a {
    display: flex; align-items: center; padding: 12px 14px;
    border-radius: var(--radius-sm); font-weight: 500;
    font-size: .95rem; color: var(--text); transition: var(--transition);
  }
  .site-nav__mobile-menu a:hover,
  .site-nav__mobile-menu a.active { background: var(--primary-lt); color: var(--primary); }

  /* Mobile accordion */
  .mobile-accordion { border-radius: var(--radius-sm); overflow: hidden; }
  .mobile-accordion__btn {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; background: none; border: none; font-family: var(--font);
    font-size: .875rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .05em; cursor: pointer;
    border-radius: var(--radius-sm); transition: var(--transition);
  }
  .mobile-accordion__btn:hover { background: var(--bg); }
  .mobile-accordion__arrow { transition: transform .2s; font-size: .65rem; }
  .mobile-accordion.open .mobile-accordion__arrow { transform: rotate(90deg); }
  .mobile-accordion__body { display: none; flex-direction: column; gap: 2px; padding: 0 0 8px 8px; }
  .mobile-accordion.open .mobile-accordion__body { display: flex; }
  .mobile-accordion__item {
    display: flex !important; align-items: center; gap: 10px;
    padding: 10px 14px !important; border-radius: var(--radius-sm);
    font-size: .9rem !important; font-weight: 500 !important; color: var(--text) !important;
  }
  .mobile-accordion__item:hover  { background: var(--bg) !important; }
  .mobile-accordion__item.active { background: var(--primary-lt) !important; color: var(--primary) !important; }

  .drop-zone__btn { display: block; }
  .option-row { flex-wrap: wrap; gap: 8px; }
  .option-row select, .option-row input { min-width: unset; width: 100%; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal-box { max-width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 85vh; }
  .share-bar { flex-direction: column; }
  .tool-card { padding: 16px 14px; }
  .tool-card__desc { display: none; }
}

@media (max-width: 480px) {
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .result-box__actions { flex-direction: column; }
}
@media (max-width: 400px) {
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { flex-direction: row; }
}

/* Mega dropdown responsive */
@media (max-width: 1200px) {
  .nav-dropdown--mega { width: 480px; }
  .mega-group { min-width: 80px; }
}
@media (max-width: 1024px) {
  #allToolsNav { display: none; }
}
