/* =========================================================
   YTSave – Free Image Tools
   Light theme · Inter font · Card-based · Mobile-first
   Color palette (max 5):
   - Primary brand: #2563eb (blue-600)
   - Secondary brand: #1e40af (blue-800)
   - Neutral background: #ffffff
   - Neutral surface:    #f8fafc (slate-50)
   - Text/dark:          #0f172a (slate-900)
   ========================================================= */

* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }

:root {
  --brand: #2563eb;
  --brand-dark: #1e40af;
  --bg: #ffffff;
  --surface: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #475569;
  --muted-2: #64748b;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --maxw: 1160px;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }

html {
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-dark); }

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

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.logo:hover { color: var(--text); }
.logo-mark {
  width: 34px;
  height: 34px;
  color: var(--brand);
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(37, 99, 235, 0.25));
}
svg.logo-mark { width: 34px; height: 34px; }
.logo-mark > svg { width: 100%; height: 100%; display: block; }
.logo-text { font-size: 19px; letter-spacing: -0.015em; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  color: var(--muted);
  font-weight: 500;
  font-size: 14.5px;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a[aria-current="page"] {
  color: var(--brand-dark);
  background: rgba(37, 99, 235, 0.08);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 40px; height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

@media (max-width: 820px) {
  .nav-links {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
  }
  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a {
    width: 100%;
    padding: 12px 8px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(37, 99, 235, 0.10), transparent 60%),
    var(--bg);
  text-align: center;
}
.badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-dark);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.15);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 16px;
  text-wrap: balance;
}
.hero-sub {
  max-width: 720px;
  margin: 0 auto 28px;
  font-size: 17px;
  color: var(--muted);
  text-wrap: pretty;
}
.hero-sub strong { color: var(--text); font-weight: 600; }
.hero-cta { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  font-family: inherit;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: #eef2f7; color: var(--text); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---------- Tools grid ---------- */
.tools-grid-section { padding: 56px 0; }
.section-title {
  font-size: clamp(26px, 3.4vw, 36px);
  letter-spacing: -0.01em;
  font-weight: 800;
  margin: 0 0 8px;
  text-align: center;
  text-wrap: balance;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 36px;
  text-wrap: pretty;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.tool-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.tool-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
  z-index: 1;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--text);
}
.tool-card:hover::before { transform: scaleX(1); }
.tool-card .num {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-2);
  letter-spacing: 0.1em;
}
.tool-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}
.tool-icon svg { width: 26px; height: 26px; }
.tool-card:hover .tool-icon { background: var(--brand); color: #fff; transform: scale(1.05); }
.tool-card h3 { margin: 6px 0 0; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.tool-card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.tool-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.tool-card .tag {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-dark);
  background: rgba(37, 99, 235, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.tool-link {
  color: var(--brand);
  font-weight: 600;
  font-size: 14px;
  margin-top: auto;
  padding-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition), color var(--transition);
}
.tool-link::after {
  content: "→";
  transition: transform var(--transition);
  display: inline-block;
}
.tool-card:hover .tool-link { color: var(--brand-dark); }
.tool-card:hover .tool-link::after { transform: translateX(4px); }

/* ---------- Tool page hero (separate pages) ---------- */
.tool-hero {
  padding: 56px 0 28px;
  background:
    radial-gradient(900px 360px at 50% -120px, rgba(37, 99, 235, 0.10), transparent 60%),
    var(--bg);
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.breadcrumbs {
  font-size: 13px;
  color: var(--muted-2);
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.breadcrumbs a { color: var(--muted); font-weight: 500; }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs span[aria-current="page"] { color: var(--text); font-weight: 600; }
.breadcrumbs .sep { color: var(--muted-2); opacity: 0.6; }
.tool-hero .tool-h1 { margin-top: 6px; }
.tool-hero .tool-lead { max-width: 680px; margin: 12px auto 0; }
.tool-hero .badge { margin-bottom: 14px; }

/* ---------- Tool sections ---------- */
.tool-section { padding: 72px 0; }
.tool-section.alt { background: var(--surface); }
.tool-header { text-align: center; max-width: 760px; margin: 0 auto 28px; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  background: rgba(37, 99, 235, 0.08);
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.tool-h1 {
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.015em;
  font-weight: 800;
  margin: 0 0 12px;
  text-wrap: balance;
}
.tool-lead { color: var(--muted); font-size: 16.5px; margin: 0; text-wrap: pretty; }

.tool-card-large {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  max-width: 920px;
  margin: 0 auto;
}

/* ---------- Dropzone ---------- */
.dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--surface);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.dropzone:hover, .dropzone:focus-visible {
  border-color: var(--brand);
  background: rgba(37, 99, 235, 0.04);
  outline: none;
}
.dropzone.is-dragover {
  border-color: var(--brand);
  background: rgba(37, 99, 235, 0.08);
  transform: scale(1.005);
}
.dz-content { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); }
.dz-icon { width: 48px; height: 48px; color: var(--brand); }
.dz-content p { margin: 0; font-size: 15.5px; }
.dz-content p strong { color: var(--text); font-weight: 600; }
.dz-sub { font-size: 13px; color: var(--muted-2); }

/* ---------- Tool output ---------- */
.tool-output { margin-top: 22px; display: flex; flex-direction: column; gap: 18px; }
.preview-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.preview-wrap img {
  max-height: 380px;
  width: auto;
  max-width: 100%;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.meta { color: var(--muted); font-size: 13.5px; text-align: center; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- Resizer controls ---------- */
.resizer-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.resizer-controls .field { display: flex; flex-direction: column; gap: 6px; }
.resizer-controls label { font-size: 13.5px; font-weight: 600; color: var(--text); }
.resizer-controls input[type="number"] {
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.resizer-controls input[type="number"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
.switch {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.switch input { accent-color: var(--brand); width: 18px; height: 18px; }

/* ---------- Compressor controls ---------- */
.compressor-controls {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.compressor-controls label { font-weight: 600; color: var(--text); font-size: 14.5px; }
#cm-quality {
  width: 100%;
  accent-color: var(--brand);
}
.size-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.size-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.size-card span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-2); font-weight: 600; }
.size-card strong { font-size: 17px; font-weight: 700; color: var(--text); }
.size-card.highlight { border-color: var(--brand); background: rgba(37, 99, 235, 0.05); }
.size-card.highlight strong { color: var(--brand-dark); }

/* ---------- PDF thumbs ---------- */
.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  cursor: grab;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.thumb:active { cursor: grabbing; }
.thumb.dragging { opacity: 0.5; }
.thumb.drop-target { box-shadow: 0 0 0 3px var(--brand); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-index {
  position: absolute;
  top: 6px; left: 6px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 999px;
}
.thumb-remove {
  position: absolute;
  top: 6px; right: 6px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
}
.thumb-remove:hover { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }

/* ---------- Tool content (SEO) ---------- */
.tool-content {
  max-width: 760px;
  margin: 36px auto 0;
  color: var(--text);
}
.tool-content h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 28px 0 10px;
}
.tool-content ol, .tool-content ul { padding-left: 22px; color: var(--muted); }
.tool-content li { margin: 6px 0; }
.tool-content p { color: var(--muted); }
.related { margin-top: 28px; font-size: 14px; color: var(--muted-2); }
.related a { font-weight: 500; }

/* ---------- Why ---------- */
.why-section { padding: 64px 0; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.why-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.why-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.why-ico {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
}
.why-ico svg { width: 20px; height: 20px; }
.why-card h3 { margin: 4px 0 0; font-size: 17px; font-weight: 700; }
.why-card p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- FAQ ---------- */
.faq-section { padding: 64px 0; background: var(--surface); }
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-list details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: box-shadow var(--transition);
}
.faq-list details[open] { box-shadow: var(--shadow); }
.faq-list summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
  transition: transform var(--transition);
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { margin: 12px 0 0; color: var(--muted); }

/* ---------- Footer ---------- */
.footer {
  padding: 36px 0;
  border-top: 1px solid var(--border);
  background: #fff;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
}
.footer-brand:hover { color: var(--text); }
.footer-brand .logo-mark { color: var(--brand); }
.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a { color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--text); }
.copyright { color: var(--muted-2); font-size: 13.5px; margin: 0; text-align: center; }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-top: 14px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
  width: 100%;
  max-width: 360px;
}
.footer-legal a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.footer-legal a:hover { color: var(--brand); }
.footer-legal .dot { color: var(--muted-2); opacity: 0.5; font-size: 13px; }

/* ---------- Legal / Contact pages ---------- */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 0 24px;
}
.legal-content h2 {
  font-size: 22px;
  margin: 32px 0 8px;
  letter-spacing: -0.01em;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li {
  color: var(--muted);
  line-height: 1.7;
  font-size: 15.5px;
}
.legal-content ul { padding-left: 22px; }
.legal-content .updated {
  display: inline-block;
  font-size: 13px;
  color: var(--muted-2);
  background: var(--surface);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 22px 0 8px;
  box-shadow: var(--shadow-sm);
}
.contact-card .label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
}
.contact-card .email {
  font-size: 22px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.01em;
  word-break: break-all;
}
.contact-card .email:hover { color: var(--brand-dark); }
.contact-card .note { font-size: 14px; color: var(--muted); margin: 4px 0 0; }

/* ---------- AdSense ad slots ---------- */
.ad-section {
  padding: 6px 0 30px;
}
.ad-slot {
  width: 100%;
  margin: 24px 0;
  padding: 14px 18px 18px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-align: center;
}
.ad-slot--banner {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.ad-slot--inline { margin: 28px 0 22px; }
.ad-slot .ad-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-2);
}
.ad-slot ins.adsbygoogle {
  display: block;
  width: 100%;
  min-height: 90px;
}
@media (max-width: 560px) {
  .ad-slot { padding: 10px 12px 14px; margin: 18px 0; }
  .ad-section { padding: 4px 0 22px; }
}

/* ---------- Progress bar ---------- */
.progress {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 14px;
}
.progress .bar {
  width: 30%;
  height: 100%;
  background: var(--brand);
  animation: indet 1.1s ease-in-out infinite;
  transform-origin: 0 0;
}
@keyframes indet {
  0%   { transform: translateX(-100%) scaleX(0.4); }
  50%  { transform: translateX(40%)   scaleX(0.7); }
  100% { transform: translateX(220%)  scaleX(0.4); }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 100;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 560px) {
  .hero { padding: 48px 0 36px; }
  .tool-section { padding: 48px 0; }
  .tool-card-large { padding: 16px; }
  .resizer-controls { grid-template-columns: 1fr; }
  .size-grid { grid-template-columns: 1fr; }
  .nav-links a { font-size: 15px; }
}
