/* Totteng Lab free tools: shared look */
@font-face { font-family: "Totteng"; src: url("../../fonts/TTFirsNeue-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Totteng"; src: url("../../fonts/TTFirsNeue-DemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Totteng"; src: url("../../fonts/TTFirsNeue-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --ink: #11130f;
  --ink-2: #1a1d17;
  --ink-3: #23271f;
  --cream: #f6f1e4;
  --paper: #fffdf6;
  --leaf: #a9c936;
  --leaf-deep: #5f7318;
  --orange: #ff8a00;
  --muted-dark: rgba(246, 241, 228, .72);
  --muted-light: rgba(17, 19, 15, .64);
  --line-dark: rgba(246, 241, 228, .16);
  --line-light: rgba(17, 19, 15, .14);
  --error: #ffb4a8;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: "Totteng", "Noto Sans Bengali", Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}
img, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
.wrap { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; }
[hidden] { display: none !important; }

/* icons */
.ti { display: block; flex: 0 0 auto; overflow: visible; fill: currentColor; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--line-dark);
  background: linear-gradient(110deg, rgba(17, 19, 15, .86), rgba(26, 30, 23, .72));
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  backdrop-filter: blur(22px) saturate(1.3);
}
.nav-row { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand-logo { width: 150px; height: auto; }
.nav-links { display: flex; align-items: center; gap: 10px; }
.nav-back {
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 6px;
  color: var(--muted-dark); font-size: 15px; font-weight: 600; text-decoration: none;
}
.nav-back:hover { color: var(--cream); }
.nav-cta {
  min-height: 46px; display: inline-flex; align-items: center; padding: 0 20px;
  border-radius: 999px; background: var(--leaf); color: var(--ink);
  font-size: 15px; font-weight: 900; text-decoration: none;
  transition: background-color 180ms ease, transform 180ms ease;
}
.nav-cta:hover { background: #badb43; transform: translateY(-2px); }
.lang-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line-dark); border-radius: 999px; }
.lang-switch button {
  min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted-dark);
  font-size: 13px; font-weight: 900; cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--cream); color: var(--ink); }

/* hero */
.tool-hero { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 80px) 0 clamp(28px, 4vw, 44px); }
.tool-hero::before {
  position: absolute; inset: auto -10% -60% 35%; height: 100%;
  background: radial-gradient(closest-side, rgba(169, 201, 54, .14), transparent);
  content: ""; pointer-events: none;
}
.tool-hero-row { position: relative; display: flex; align-items: flex-start; gap: clamp(18px, 3vw, 34px); }
.tool-hero-icon {
  width: clamp(72px, 9vw, 112px); height: clamp(72px, 9vw, 112px); padding: clamp(14px, 1.8vw, 22px);
  border-radius: 28px; background: var(--leaf); color: var(--ink); flex: 0 0 auto;
  transform: rotate(-4deg); box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.tool-hero-icon .ti { width: 100%; height: 100%; color: var(--ink); }
.eyebrow {
  display: flex; align-items: center; gap: 12px; margin: 0 0 16px;
  color: var(--orange); font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
}
.eyebrow::before { width: 38px; height: 2px; background: currentColor; content: ""; }
h1 {
  margin: 0 0 18px; font-size: clamp(40px, 6.2vw, 84px); font-weight: 900;
  line-height: .92; letter-spacing: -.05em;
}
h1 em { font-style: normal; color: var(--leaf); }
.tool-lead { max-width: 640px; margin: 0 0 22px; color: var(--muted-dark); font-size: clamp(17px, 1.5vw, 20px); }
.privacy-pill {
  display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 10px 16px 10px 12px;
  border: 1px solid rgba(169, 201, 54, .45); border-radius: 999px; background: rgba(169, 201, 54, .1);
  font-size: 15px; font-weight: 600;
}
.privacy-pill .ti { width: 22px; height: 22px; color: var(--leaf); }

/* app area */
.tool-app { padding: 0 0 clamp(48px, 6vw, 80px); }
.dropzone {
  position: relative; display: grid; place-items: center; gap: 14px; min-height: 280px; padding: 36px 20px;
  border: 2px dashed rgba(246, 241, 228, .3); border-radius: 28px; background: var(--ink-2);
  text-align: center; cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--leaf); background: #20251a; }
.dropzone.is-over { transform: scale(1.01); }
.dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone-icon { width: 60px; height: 60px; color: var(--leaf); }
.dropzone-title { margin: 0; font-size: clamp(22px, 2.6vw, 32px); font-weight: 900; letter-spacing: -.02em; }
.dropzone-or { margin: 0; color: var(--muted-dark); font-size: 15px; }
.dropzone-button {
  min-height: 52px; display: inline-flex; align-items: center; padding: 0 26px; border-radius: 999px;
  background: var(--leaf); color: var(--ink); font-size: 17px; font-weight: 900; pointer-events: none;
}
.dropzone-types { margin: 0; color: var(--muted-dark); font-size: 14px; font-weight: 600; }
.dropzone:focus-within { border-color: var(--leaf); }

.tool-status { min-height: 0; margin: 14px 0 0; font-size: 16px; font-weight: 600; }
.tool-status:empty { display: none; }
.tool-status.is-busy { color: var(--muted-dark); }
.tool-status.is-busy::before {
  display: inline-block; width: 16px; height: 16px; margin-right: 10px; vertical-align: -3px;
  border: 3px solid var(--line-dark); border-top-color: var(--leaf); border-radius: 50%;
  animation: spin 800ms linear infinite; content: "";
}
.tool-status.is-error { padding: 14px 18px; border-radius: 16px; background: rgba(179, 38, 30, .18); color: var(--error); }
@keyframes spin { to { transform: rotate(360deg); } }

.tool-view { margin-top: 18px; }
.tool-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; margin-bottom: 12px;
  border: 1px solid var(--line-dark); border-radius: 20px; background: var(--ink-2);
}
.tool-file { display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto; padding: 0 8px; }
.tool-file b { overflow: hidden; max-width: 46vw; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.tool-file small { color: var(--muted-dark); font-size: 13px; white-space: nowrap; }
.tool-file > div { min-width: 0; }
.tool-file > .ti { width: 34px; height: 34px; --ti-bg: var(--ink-2); }
.tbtn {
  min-height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px;
  border: 1px solid var(--line-dark); border-radius: 999px; background: transparent; color: var(--cream);
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.tbtn:hover { border-color: rgba(246, 241, 228, .45); background: rgba(246, 241, 228, .06); }
.tbtn[aria-pressed="true"] { border-color: var(--cream); background: var(--cream); color: var(--ink); }
.tbtn--main { border-color: var(--leaf); background: var(--leaf); color: var(--ink); font-weight: 900; }
.tbtn--main:hover { border-color: #badb43; background: #badb43; }
.tbtn-group { display: inline-flex; flex-wrap: wrap; gap: 4px; max-width: 100%; padding: 3px; border: 1px solid var(--line-dark); border-radius: 22px; }
.tbtn-group .tbtn { min-height: 34px; border: 0; }
.tool-range { display: inline-flex; align-items: center; gap: 8px; padding: 0 10px; color: var(--muted-dark); font-size: 14px; font-weight: 600; }
.tool-range input { width: 110px; accent-color: var(--leaf); }
.tool-input {
  min-height: 40px; padding: 0 14px; border: 1px solid var(--line-dark); border-radius: 999px;
  background: var(--ink); color: var(--cream); font: inherit; font-size: 14px;
}
.tool-input::placeholder { color: rgba(246, 241, 228, .5); }
.tool-stage {
  position: relative; overflow: auto; min-height: 420px; border: 1px solid var(--line-dark); border-radius: 22px; background: var(--ink-2);
}
.tool-stage.is-light { background: #f3f1ea; }
.tool-stage.is-lime { background: var(--leaf); }
.checker {
  background-color: #f2f2f2;
  background-image:
    linear-gradient(45deg, #dcdcdc 25%, transparent 25%), linear-gradient(-45deg, #dcdcdc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #dcdcdc 75%), linear-gradient(-45deg, transparent 75%, #dcdcdc 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.tool-note { margin: 10px 4px 0; color: var(--muted-dark); font-size: 14px; }

/* help */
.tool-help { padding: clamp(48px, 6vw, 80px) 0; background: var(--cream); color: var(--ink); }
.help-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 64px); }
.tool-help h2, .tool-more h2 { margin: 0 0 22px; font-size: clamp(30px, 3.6vw, 48px); font-weight: 900; line-height: 1; letter-spacing: -.04em; }
.steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  position: relative; padding: 18px 20px 18px 70px; border: 1px solid var(--line-light); border-radius: 20px; background: var(--paper);
  counter-increment: step; font-size: 16.5px;
}
.steps li::before {
  position: absolute; left: 18px; top: 16px; width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%; background: var(--leaf); color: var(--ink); font-weight: 900; content: counter(step);
}
.steps b { display: block; font-size: 18px; }
.notes { margin: 0; padding: 22px 24px; border-radius: 22px; background: var(--ink); color: var(--cream); list-style: none; display: grid; gap: 12px; }
.notes li { position: relative; padding-left: 22px; font-size: 15.5px; }
.notes li::before { position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); content: ""; }

/* more tools */
.tool-more { padding: clamp(48px, 6vw, 80px) 0; }
.tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tool-card {
  display: flex; align-items: flex-start; gap: 16px; padding: 20px; border: 1px solid var(--line-dark); border-radius: 22px;
  background: var(--ink-2); color: var(--cream); text-decoration: none;
  transition: transform 200ms ease, border-color 200ms ease;
}
.tool-card:hover { transform: translateY(-3px); border-color: var(--leaf); }
.tool-card .ti { width: 40px; height: 40px; color: var(--leaf); transition: transform 220ms ease; }
.tool-card:hover .ti { transform: rotate(-6deg) scale(1.06); }
.tool-card b { display: block; font-size: 18px; line-height: 1.15; }
.tool-card small { display: block; margin-top: 4px; color: var(--muted-dark); font-size: 14px; }
.more-link { display: inline-flex; margin-top: 18px; color: var(--leaf); font-weight: 900; text-decoration: none; }
.more-link:hover { text-decoration: underline; }

.tool-cta { padding: 0 0 clamp(56px, 7vw, 96px); }
.cta-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  padding: clamp(24px, 3vw, 36px); border-radius: 28px; background: var(--leaf); color: var(--ink);
}
.cta-box p { margin: 0; font-size: clamp(22px, 2.6vw, 34px); font-weight: 900; line-height: 1.05; letter-spacing: -.03em; }
.cta-box a {
  min-height: 52px; display: inline-flex; align-items: center; padding: 0 24px; border-radius: 999px;
  background: var(--ink); color: var(--cream); font-weight: 900; text-decoration: none;
}

/* footer */
.site-footer { padding: 40px 0 48px; border-top: 1px solid var(--line-dark); color: var(--muted-dark); font-size: 14px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.foot-row a { text-decoration: none; font-weight: 600; }
.foot-row a:hover { color: var(--leaf); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* tool: 3D */
.mv-stage { height: min(68vh, 640px); min-height: 380px; overflow: hidden; }
.mv-stage model-viewer { width: 100%; height: 100%; --poster-color: transparent; background: transparent; }

/* tool: sheet */
.sheet-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; padding-bottom: 4px; }
.sheet-tabs button {
  flex: 0 0 auto; min-height: 38px; padding: 0 16px; border: 1px solid var(--line-dark); border-radius: 12px 12px 4px 4px;
  background: var(--ink-2); color: var(--muted-dark); font-size: 14px; font-weight: 600; cursor: pointer;
}
.sheet-tabs button[aria-selected="true"] { border-color: var(--leaf); background: var(--leaf); color: var(--ink); font-weight: 900; }
.sheet-stage { max-height: 70vh; background: var(--paper); color: var(--ink); }
.sheet-table { border-collapse: separate; border-spacing: 0; font-size: 14px; font-family: "Totteng", "Noto Sans Bengali", Arial, sans-serif; }
.sheet-table th, .sheet-table td {
  max-width: 340px; padding: 6px 10px; border-right: 1px solid #e3e0d6; border-bottom: 1px solid #e3e0d6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: top;
}
.sheet-table thead th { position: sticky; top: 0; z-index: 2; background: #ece8db; color: var(--muted-light); font-weight: 600; text-align: center; }
.sheet-table tbody th { position: sticky; left: 0; z-index: 1; background: #f4f1e8; color: var(--muted-light); font-weight: 600; text-align: right; }
.sheet-table thead th:first-child { left: 0; z-index: 3; }
.sheet-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.sheet-table tr.is-hit td { background: #f3f8dc; }

/* tool: word */
.doc-stage { max-height: 78vh; background: #e9e6dd; }
.doc-stage .docx-wrapper { background: transparent; padding: 24px 12px; }
.doc-stage .docx-wrapper > section.docx { box-shadow: 0 10px 30px rgba(0, 0, 0, .15); margin-bottom: 24px; }
.doc-zoom { transform-origin: top center; }

/* tool: psd + ai */
.img-stage { display: grid; place-items: center; padding: 24px; max-height: 76vh; }
.img-stage canvas { max-width: 100%; height: auto; box-shadow: 0 10px 34px rgba(0, 0, 0, .3); }
.img-stage.is-zoomed { place-items: start; }
.img-stage.is-zoomed canvas { max-width: none; }
.psd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; }
.layers {
  max-height: 76vh; overflow: auto; padding: 12px; border: 1px solid var(--line-dark); border-radius: 22px; background: var(--ink-2);
}
.layers h3 { margin: 4px 6px 10px; font-size: 16px; font-weight: 900; }
.layers ul { margin: 0; padding: 0; list-style: none; }
.layers ul ul { padding-left: 16px; border-left: 1px dashed var(--line-dark); margin-left: 10px; }
.layer-btn {
  width: 100%; min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 6px 8px;
  border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--cream); text-align: left; cursor: pointer;
}
.layer-btn:hover { background: rgba(246, 241, 228, .06); }
.layer-btn[aria-pressed="true"] { border-color: var(--leaf); background: rgba(169, 201, 54, .12); }
.layer-btn.is-hidden { opacity: .5; }
.layer-thumb { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 8px; overflow: hidden; display: grid; place-items: center; }
.layer-thumb canvas { max-width: 40px; max-height: 40px; box-shadow: none; }
.layer-name { min-width: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.layer-folder { padding: 6px 8px; color: var(--muted-dark); font-size: 13px; font-weight: 900; }
.pages { display: grid; gap: 18px; justify-items: center; }
.page-wrap { display: grid; gap: 8px; justify-items: center; }
.page-wrap .tbtn { min-height: 34px; }
.page-label { color: var(--muted-light); font-size: 13px; font-weight: 600; }
.tool-stage:not(.is-light):not(.is-lime) .page-label { color: var(--muted-dark); }

/* tool: bijoy */
.conv { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; }
.conv-box { display: flex; flex-direction: column; gap: 8px; }
.conv-box label { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; font-weight: 900; }
.conv-box label small { color: var(--muted-dark); font-weight: 600; }
.conv-box textarea {
  width: 100%; min-height: 300px; padding: 16px 18px; resize: vertical; border: 1px solid var(--line-dark); border-radius: 20px;
  background: var(--paper); color: var(--ink); font: inherit; font-family: "Noto Sans Bengali", "Totteng", Arial, sans-serif; font-size: 18px; line-height: 1.7;
}
.conv-box textarea.is-bijoy { font-family: "SutonnyMJ", "Totteng", Arial, sans-serif; }
.conv-mid { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.conv-mid .tbtn { justify-content: center; }
.conv-dir { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 14px; border: 1px solid var(--line-dark); border-radius: 999px; }
.conv-dir button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted-dark); font-size: 15px; font-weight: 900; cursor: pointer; }
.conv-dir button[aria-pressed="true"] { background: var(--leaf); color: var(--ink); }
.conv-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.conv-hint { margin: 10px 2px 0; color: var(--orange); font-size: 14px; font-weight: 600; }
.conv-hint:empty { display: none; }

/* tool: font tester */
.font-stage { padding: clamp(18px, 3vw, 32px); background: var(--paper); color: var(--ink); --test-font: "Totteng", sans-serif; }
.font-stage.is-dark { background: var(--ink); color: var(--cream); }
.font-stage.is-lime { background: var(--leaf); color: var(--ink); }
.font-stage h3 { margin: 28px 0 10px; font-family: "Totteng", "Noto Sans Bengali", sans-serif; font-size: 13px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; opacity: .6; }
.font-edit { min-height: 1.4em; padding: 10px 12px; border: 1px dashed rgba(17, 19, 15, .25); border-radius: 14px; font-family: var(--test-font); outline: none; overflow-wrap: anywhere; }
.font-stage.is-dark .font-edit { border-color: rgba(246, 241, 228, .28); }
.font-edit:focus { border-style: solid; border-color: var(--leaf-deep); }
.font-hint { margin: 0 0 8px; font-size: 13px; opacity: .6; }
.font-warn { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: #fff1d6; color: #7a4a00; font-size: 14px; font-weight: 600; }
.water-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid rgba(17, 19, 15, .08); }
.font-stage.is-dark .water-row { border-color: rgba(246, 241, 228, .1); }
.water-row span { font-family: "Totteng", sans-serif; font-size: 12px; opacity: .55; }
.water-row p { margin: 0; overflow: hidden; font-family: var(--test-font); line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.glyphs p { margin: 0 0 8px; font-family: var(--test-font); font-size: 30px; line-height: 1.45; overflow-wrap: anywhere; }
.font-info dl { display: grid; gap: 10px; margin: 0 6px; }
.font-info dt { color: var(--muted-dark); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.font-info dd { margin: 2px 0 0; font-size: 15px; overflow-wrap: anywhere; }

/* tool: resize */
.resize-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; }
.resize-layout > *, .zip-layout > *, .qr-layout > *, .psd-layout > * { min-width: 0; }
.resize-side { position: sticky; top: 88px; padding: 14px; border: 1px solid var(--line-dark); border-radius: 22px; background: var(--ink-2); }
.resize-side h3 { margin: 16px 2px 8px; font-size: 15px; font-weight: 900; }
.orig-box { position: relative; overflow: hidden; border-radius: 14px; cursor: crosshair; }
.orig-box img { width: 100%; height: auto; }
.focus-dot { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 3px solid #fff; border-radius: 50%; background: rgba(169, 201, 54, .85); box-shadow: 0 0 0 2px rgba(0, 0, 0, .4); pointer-events: none; }
.picks { display: grid; gap: 6px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.pick:hover { background: rgba(246, 241, 228, .06); }
.pick input { width: 18px; height: 18px; accent-color: var(--leaf); }
.pick b { display: block; font-size: 14px; line-height: 1.2; }
.pick small { color: var(--muted-dark); font-size: 12.5px; }
.size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.size-card { min-width: 0; }
.size-card { margin: 0; padding: 12px; border: 1px solid var(--line-dark); border-radius: 18px; background: var(--ink-2); }
.size-canvas { width: 100%; height: auto; max-height: 360px; object-fit: contain; border-radius: 8px; background: #0b0c0a; }
.size-card figcaption { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.size-card figcaption b { display: block; font-size: 13.5px; line-height: 1.2; }
.size-card figcaption small { color: var(--muted-dark); font-size: 12px; }
.size-card .tbtn { min-height: 34px; padding: 0 12px; }

/* tool: compressor */
.sum-box { margin: 0 0 12px; font-size: 17px; font-weight: 900; color: var(--leaf); }
.sum-box:empty { display: none; }
.img-list { display: grid; gap: 8px; }
.img-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--line-dark); border-radius: 18px; background: var(--ink-2); }
.img-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.img-mid { min-width: 0; }
.img-mid b { display: block; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.img-mid small { color: var(--muted-dark); font-size: 13px; }
.save-badge { padding: 6px 12px; border-radius: 999px; background: var(--leaf); color: var(--ink); font-size: 14px; font-weight: 900; white-space: nowrap; }
.save-badge.is-bigger { background: var(--orange); }

/* tool: zip */
.zip-layout { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 12px; }
.zip-list { max-height: 70vh; }
.zip-folder { margin: 10px 6px 4px; color: var(--muted-dark); font-size: 13px; font-weight: 900; overflow-wrap: anywhere; }
.zip-row { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--cream); text-align: left; cursor: pointer; }
.zip-row.is-nested { padding-left: 22px; }
.zip-row:hover { background: rgba(246, 241, 228, .06); }
.zip-row[aria-pressed="true"] { border-color: var(--leaf); background: rgba(169, 201, 54, .12); }
.zip-name { min-width: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.zip-row small { flex: 0 0 auto; color: var(--muted-dark); font-size: 12px; }
.zip-preview { min-height: 420px; max-height: 70vh; padding: 16px; }
.zip-empty { margin: 40px 0; color: var(--muted-dark); text-align: center; }
.zip-prev-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.zip-prev-bar b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zip-img { max-width: 100%; max-height: 58vh; margin: 0 auto; border-radius: 10px; }
.zip-text { margin: 0; padding: 14px; max-height: 58vh; overflow: auto; border-radius: 12px; background: var(--ink); color: var(--cream); font: 13px/1.55 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.zip-media { width: 100%; max-height: 58vh; border-radius: 10px; }

/* tool: lottie */
.lottie-stage { position: relative; display: block; height: min(66vh, 620px); min-height: 340px; overflow: hidden; }
.lottie-stage.is-light { background: #f3f1ea; }
.lottie-box { position: absolute; inset: 20px; }
.lottie-box svg { width: 100% !important; height: 100% !important; }

/* tool: qr */
.qr-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 440px); gap: 18px; align-items: start; }
.qr-form { padding: 18px; border: 1px solid var(--line-dark); border-radius: 22px; background: var(--ink-2); }
.qr-form h3 { margin: 18px 0 8px; font-size: 15px; font-weight: 900; }
.field-group { display: grid; gap: 10px; }
.fld { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.fld input:not([type=range]):not([type=file]):not([type=color]), .fld textarea, .fld select {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-dark); border-radius: 14px;
  background: var(--ink); color: var(--cream); font: inherit; font-size: 16px;
}
.fld input[type=range] { accent-color: var(--leaf); }
.fld input[type=file] { color: var(--muted-dark); font-size: 14px; }
.qr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 12px; }
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.preset { width: 40px; height: 40px; border: 2px solid var(--line-dark); border-radius: 12px; background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%); cursor: pointer; }
.preset:hover { border-color: var(--cream); }
.color-pick { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line-dark); border-radius: 999px; font-size: 13px; font-weight: 600; }
.color-pick input { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.qr-preview { position: sticky; top: 88px; display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line-dark); border-radius: 22px; background: var(--ink-2); }
.qr-preview canvas { width: 100%; height: auto; border-radius: 14px; }
.qr-check { margin: 0; font-size: 15px; font-weight: 900; }
.qr-check.is-good { color: var(--leaf); }
.qr-check.is-bad { color: var(--orange); }

@media (max-width: 900px) {
  .resize-layout, .zip-layout, .qr-layout { grid-template-columns: 1fr; }
  .resize-side, .qr-preview { position: static; }
  .zip-list { max-height: 320px; }
}
@media (max-width: 640px) {
  .img-row { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .img-row .tbtn { grid-column: 2 / -1; justify-self: start; }
  .img-thumb { width: 52px; height: 52px; }
  .size-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .size-card { padding: 8px; }
  .size-card figcaption { flex-wrap: wrap; }
  .glyphs p { font-size: 24px; }
  .qr-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .help-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .psd-layout { grid-template-columns: 1fr; }
  .layers { max-height: 320px; }
  .conv { grid-template-columns: 1fr; }
  .conv-mid { flex-direction: row; flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 640px) {
  .nav-back { display: none; }
  .nav-cta { display: none; }
  .brand-logo { width: 120px; }
  .tool-hero-row { flex-direction: column; gap: 16px; }
  .tool-hero-icon { width: 72px; height: 72px; padding: 13px; border-radius: 20px; }
  .tools-grid { grid-template-columns: 1fr; }
  .dropzone { min-height: 230px; border-radius: 22px; }
  .tool-file { width: 100%; margin-right: 0; }
  .tool-file b { display: block; max-width: 100%; }
  .tool-file small { white-space: normal; }
  .mv-stage { height: 60vh; min-height: 320px; }
  .conv-box textarea { min-height: 200px; }
}
@media print {
  .site-header, .tool-hero, .tool-bar, .tool-help, .tool-more, .tool-cta, .site-footer, .dropzone, .tool-status { display: none !important; }
  body { background: #fff; color: #000; }
  .tool-stage, .doc-stage { max-height: none; overflow: visible; border: 0; background: #fff; }
  .doc-stage .docx-wrapper { padding: 0; }
  .doc-stage .docx-wrapper > section.docx { box-shadow: none; margin: 0; }
  .doc-zoom { transform: none !important; }
}
