/*
 * uiocean theme (v5) — "viewfinder" design with ocean colours.
 * Loaded after style.css and overrides its look. The idea: everything here is about frames and sizes,
 * so the visual language borrows from a camera viewfinder — crop-corner marks in sun yellow,
 * a deep ink cutting-mat hero, and one cobalt colour for every action.
 */

/* ---------- Self-hosted fonts (SIL Open Font License, see assets/fonts) ---------- */
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/unbounded-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/unbounded-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Unbounded"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/unbounded-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/figtree-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/figtree-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/figtree-latin-800-normal.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --bg: #F4F6FB;
  --surface: #FFFFFF;
  --surface-2: #F7F8FC;
  --ink: #151B3B;
  --ink-deep: #11163A;
  --muted: #5B6382;
  --line: #E2E6F0;
  --accent: #0B6BDC;      /* ocean blue: buttons, links, focus */
  --accent-hover: #0858B8;
  --accent-ink: #FFFFFF;
  --accent-soft: #E3F0FD;
  --sea: #38C6E8;         /* second wave in the logo */
  --sun: #FFC93C;
  --sun-soft: #FFF4D6;
  --tint: var(--accent);
  --tint-soft: var(--accent-soft);
  --radius: 22px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(21, 27, 59, .05), 0 12px 32px -14px rgba(21, 27, 59, .22);
  --shadow-lg: 0 2px 6px rgba(21, 27, 59, .06), 0 28px 60px -20px rgba(21, 27, 59, .35);
  --font-display: "Unbounded", "Figtree", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tabbar-h: 0px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D1124;
    --surface: #151B36;
    --surface-2: #1A2142;
    --ink: #EEF1FF;
    --ink-deep: #0A0E20;
    --muted: #A2A9CC;
    --line: #262E55;
    --accent: #5AB0FF;
    --accent-hover: #7DC1FF;
    --accent-ink: #06152E;
    --accent-soft: #0F2A4C;
    --sun-soft: #3A3014;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -14px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 28px 60px -20px rgba(0, 0, 0, .7);
  }
}
.lang-hi { --font-display: "Noto Sans Devanagari", "Unbounded", system-ui, sans-serif; --font-body: "Noto Sans Devanagari", "Figtree", system-ui, sans-serif; }
.lang-gu { --font-display: "Noto Sans Gujarati", "Unbounded", system-ui, sans-serif; --font-body: "Noto Sans Gujarati", "Figtree", system-ui, sans-serif; }

/* Each platform's pages pick up its colour for small accents */
.grp-ig  { --tint: var(--ig);  --tint-soft: var(--ig-soft); }
.grp-pin { --tint: var(--pin); --tint-soft: var(--pin-soft); }
.grp-tt  { --tint: var(--tt);  --tint-soft: var(--tt-soft); }
.grp-all { --tint: var(--all); --tint-soft: var(--all-soft); }

/* ---------- Base ---------- */
body { font: 16.5px/1.6 var(--font-body); background: var(--bg); color: var(--ink); }
h1, .section-h, .more-tools h2, .how h2, .faq h2, .seo-content h2, .prose h2 { font-family: var(--font-display); }
h1 { font-weight: 600; font-size: clamp(1.75rem, 4.6vw, 3rem); line-height: 1.12; letter-spacing: -.02em; }
.hero-compact h1 { font-size: clamp(1.55rem, 3.8vw, 2.35rem); }
.lang-hi h1, .lang-gu h1 { font-weight: 700; letter-spacing: 0; line-height: 1.3; }
.lede { font-size: 1.08rem; color: var(--muted); }
::selection { background: var(--sun); color: #151B3B; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1160px; }

/* ---------- Header ---------- */
.site-header { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { height: 66px; }
.brand-mark { color: var(--ink); }
@media (prefers-color-scheme: dark) { .brand-mark { color: var(--accent-soft); } }
.brand-name { font: 600 1.05rem/1 var(--font-display); letter-spacing: -.01em; }
.nav-link, .menu > summary { border-radius: 999px; padding: 8px 14px; font-weight: 600; color: var(--ink); }
.nav-link:hover, .menu > summary:hover, .menu[open] > summary { background: var(--surface); box-shadow: 0 0 0 1px var(--line); }

/* ---------- Tools menu ---------- */
.menu-panel { border-radius: 24px; border-color: var(--line); box-shadow: var(--shadow-lg); }
.menu-tools { padding: 14px; }
.menu-group-h, .tool-group-h { text-transform: none; letter-spacing: 0; font: 700 .92rem var(--font-body); color: var(--ink); display: flex; align-items: center; gap: 8px; }
.menu-group-h::before, .tool-group-h::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); flex: none; }
.menu-group-ig .menu-group-h::before, .hub-group[data-group="ig"] .tool-group-h::before { background: var(--ig); }
.menu-group-pin .menu-group-h::before, .hub-group[data-group="pin"] .tool-group-h::before { background: var(--pin); }
.menu-group-tt .menu-group-h::before, .hub-group[data-group="tt"] .tool-group-h::before { background: var(--tt); }
.menu-group-all .menu-group-h::before, .hub-group[data-group="all"] .tool-group-h::before { background: var(--all); }
.menu-tool { border-radius: 14px; }
.menu-tool strong { font: 700 .95rem/1.3 var(--font-body); }
.menu-icon, .tool-icon { border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.menu-search { border-radius: 14px; background: var(--surface-2); }
.menu-search kbd { font-family: var(--font-body); }
.sheet-close { display: none; }

/* ---------- Buttons & controls ---------- */
.btn { font: 700 .98rem var(--font-body); border-radius: 14px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--accent) 75%, transparent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); filter: none; transform: translateY(-1px); }
.btn-primary.is-done { background: #12805C; color: #fff; }
.btn-ghost { background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; }
.btn-ghost:hover, .btn-ghost[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.btn-lg { height: 56px; border-radius: 16px; font-size: 1.02rem; }

input[type="text"], input[type="number"], input[type="search"], select, textarea {
  border-radius: 12px; background: var(--surface-2); border: 1.5px solid var(--line); font-family: var(--font-body); color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.menu-search input:focus, .hub-search input:focus, .grab-field input:focus { box-shadow: none; }
.field-label { font-weight: 700; font-size: .93rem; }

.segmented { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.segmented button { border-radius: 10px; color: var(--muted); font-weight: 700; }
.segmented button.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(21, 27, 59, .08), 0 2px 8px -2px rgba(21, 27, 59, .18); }
@media (prefers-color-scheme: dark) { .segmented button.is-active { background: var(--accent); color: var(--accent-ink); } }

.chip { border-radius: 999px; font-weight: 700; background: var(--surface); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- Tool page hero: title framed by crop corners ---------- */
.hero-compact { padding: 34px 0 22px; }
.hero-compact .wrap {
  max-width: 820px; padding: 26px 30px;
  --c: var(--sun); --cl: 26px; --cw: 3px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--cl) var(--cw) no-repeat,
    linear-gradient(var(--c), var(--c)) top left / var(--cw) var(--cl) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--cl) var(--cw) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--cw) var(--cl) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--cl) var(--cw) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--cw) var(--cl) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--cl) var(--cw) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--cw) var(--cl) no-repeat;
}
.hero-compact .lede { max-width: 600px; }
.crumbs { margin-bottom: 14px; font-weight: 600; }
.crumbs a:nth-of-type(2) { color: var(--tint); background: var(--tint-soft); padding: 2px 10px; border-radius: 999px; }
.crumbs a:nth-of-type(2):hover { text-decoration: none; filter: brightness(.96); }

/* ---------- Home hero: ink cutting mat + live viewfinder ---------- */
.hero-home {
  position: relative; padding: 56px 0 44px; text-align: left; color: #EEF1FF;
  background-color: var(--ink-deep);
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px),
    radial-gradient(120% 90% at 85% 10%, rgba(53, 84, 245, .45), transparent 60%);
  background-size: 32px 32px, 32px 32px, auto;
}
@media (prefers-color-scheme: dark) { .hero-home { border-bottom: 1px solid var(--line); } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px 56px; align-items: center; }
.hero-home .eyebrow { background: rgba(255, 201, 60, .14); color: var(--sun); font-weight: 700; letter-spacing: 0; }
.hero-home h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.35rem); max-width: 13ch; }
.lang-hi .hero-home h1, .lang-gu .hero-home h1 { max-width: 16ch; }
.hero-home .lede { color: #C3C9E6; margin: 0 0 26px; max-width: 520px; }
.hero-home .grab { margin: 0; max-width: 620px; }
.hero-home .grab-field { border: 0; border-radius: 16px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 18px 40px -18px rgba(0, 0, 0, .6); }
.hero-home .grab-field:focus-within { box-shadow: 0 0 0 3px var(--sun), 0 18px 40px -18px rgba(0, 0, 0, .6); }
.hero-home .btn-primary { background: var(--sun); color: #151B3B; box-shadow: 0 12px 26px -10px rgba(255, 201, 60, .55); }
.hero-home .btn-primary:hover:not(:disabled) { background: #FFD45F; }
.hero-home .spinner { border-color: rgba(21, 27, 59, .25); border-top-color: #151B3B; }
.hero-home .hint { color: #9AA2C7; text-align: left; }
.hero-home .hint code { background: rgba(255, 255, 255, .1); color: #fff; }
.hero-home .error { margin-left: 0; }
.hero-links { grid-column: 1 / -1; justify-content: flex-start; margin: 4px 0 0; max-width: none; }
.hero-links > span { color: #9AA2C7; }
.hero-links .chip { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); color: #fff; }
.hero-links .chip:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .3); }

.viewfinder { display: grid; justify-items: center; gap: 18px; }
.vf-stage { --s: 300px; width: var(--s); height: var(--s); display: grid; place-items: center; }
.vf-frame {
  --vw: 16; --vh: 9;
  position: relative;
  width: calc(var(--s) * min(1, var(--vw) / var(--vh)));
  height: calc(var(--s) * min(1, var(--vh) / var(--vw)));
  border-radius: 6px;
  background:
    radial-gradient(60% 50% at 30% 30%, rgba(255, 201, 60, .55), transparent 70%),
    radial-gradient(70% 60% at 75% 75%, rgba(255, 92, 122, .55), transparent 70%),
    linear-gradient(135deg, #0B6BDC, #17B4CC);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
  transition: width .7s cubic-bezier(.65, 0, .25, 1), height .7s cubic-bezier(.65, 0, .25, 1);
}
.vf-grid { position: absolute; inset: 0; border-radius: inherit; background:
  linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255, 255, 255, .35) calc(33.33% - .5px), rgba(255, 255, 255, .35) calc(33.33% + .5px), transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255, 255, 255, .35) calc(66.66% - .5px), rgba(255, 255, 255, .35) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
  linear-gradient(transparent calc(33.33% - .5px), rgba(255, 255, 255, .35) calc(33.33% - .5px), rgba(255, 255, 255, .35) calc(33.33% + .5px), transparent calc(33.33% + .5px), transparent calc(66.66% - .5px), rgba(255, 255, 255, .35) calc(66.66% - .5px), rgba(255, 255, 255, .35) calc(66.66% + .5px), transparent calc(66.66% + .5px)); }
.vf-c { position: absolute; width: 22px; height: 22px; border: 3px solid var(--sun); }
.vf-c.tl { top: -9px; left: -9px; border-right: 0; border-bottom: 0; border-top-left-radius: 4px; }
.vf-c.tr { top: -9px; right: -9px; border-left: 0; border-bottom: 0; border-top-right-radius: 4px; }
.vf-c.bl { bottom: -9px; left: -9px; border-right: 0; border-top: 0; border-bottom-left-radius: 4px; }
.vf-c.br { bottom: -9px; right: -9px; border-left: 0; border-top: 0; border-bottom-right-radius: 4px; }
.vf-label { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(17, 22, 58, .72); color: #fff; font: 700 .78rem var(--font-body); white-space: nowrap; }
.vf-size { position: absolute; right: 10px; bottom: 10px; color: #fff; font: 700 .8rem var(--font-body); font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); white-space: nowrap; }
.vf-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.vf-steps li { padding: 5px 11px; border-radius: 999px; color: #9AA2C7; font: 600 .82rem var(--font-body); cursor: pointer; border: 1px solid transparent; }
.vf-steps li:hover { color: #fff; }
.vf-steps li.is-on { color: var(--sun); border-color: rgba(255, 201, 60, .4); background: rgba(255, 201, 60, .08); }

/* ---------- Panels, drop zones, outputs ---------- */
.panel { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 22px; }
.tool { padding: 6px 0 48px; }
.tool-split { gap: 22px; grid-template-columns: minmax(300px, 410px) 1fr; }
.dropzone { border-radius: 18px; border: 2px dashed color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); min-height: 172px; }
.dropzone:hover, .dropzone.is-drag, .dropzone:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.dz-empty .icon { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }
.dz-empty span { font-weight: 700; }
.mock-stage, .igr-stage, .rs-canvas-wrap, .igg-preview, .tts-stage, .emb-preview, .pin-stage { border-radius: var(--radius); }
.preset { border-radius: 14px; background: var(--surface-2); }
.preset.is-active { border-color: var(--tint); background: var(--tint-soft); }
.preset.is-active .preset-shape { color: var(--tint); }
.size-card.is-current { border-color: var(--tint); box-shadow: 0 0 0 3px var(--tint-soft); }
.stats > div { border-radius: 14px; }
.stats dd { font-family: var(--font-body); font-weight: 800; }
.check-list li, .tip-list li { border-radius: 12px; }
.notice { border-radius: 12px; }
.meter { height: 7px; }

/* Results (thumbnail downloader) */
.card { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.card-title { font-family: var(--font-body); font-weight: 800; }
.badge { background: rgba(17, 22, 58, .8); }

/* ---------- Tool cards (hub + more tools) ---------- */
.tool-grid { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tool-card { border-radius: 18px; padding: 18px; box-shadow: none; transition: border-color .15s, background .15s; }
.tool-card:hover { transform: none; border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 35%, var(--surface)); }
.tool-card-ig:hover { border-color: var(--ig); background: color-mix(in srgb, var(--ig-soft) 45%, var(--surface)); }
.tool-card-pin:hover { border-color: var(--pin); background: color-mix(in srgb, var(--pin-soft) 45%, var(--surface)); }
.tool-card-tt:hover { border-color: var(--tt); background: color-mix(in srgb, var(--tt-soft) 45%, var(--surface)); }
.tool-card-all:hover { border-color: var(--all); background: color-mix(in srgb, var(--all-soft) 45%, var(--surface)); }
.tool-card strong { font: 800 1.02rem var(--font-body); }
.more-tools { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.more-tools .tool-card { background: var(--bg); }
.more-tools h2, .how h2, .faq h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 600; letter-spacing: -.01em; }
.tool-group-h { margin: 26px 0 12px; }

/* All tools page */
.hub-search { border-radius: 18px; border-width: 1.5px; }
.hub-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }

/* ---------- How it works (a real sequence, so numbered) ---------- */
.steps li { border-radius: var(--radius); }
.step-n { background: var(--sun); color: #151B3B; border-radius: 10px; font-family: var(--font-display); }

/* ---------- Guide text + FAQ ---------- */
.seo-content { background: transparent; }
.seo-content h2 { font-size: clamp(1.25rem, 3vw, 1.6rem); font-weight: 600; letter-spacing: -.01em; }
.prose h2 { font-weight: 600; letter-spacing: -.01em; font-size: 1.35rem; }
details:not(.menu) { border: 1px solid var(--line); border-radius: 16px; padding: 2px 18px; margin-bottom: 10px; background: var(--surface); }
details:not(.menu)[open] { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
details:not(.menu) > summary::after { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); font: 600 1.1rem/1 var(--font-body); right: 0; }
.faq { border-top: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-deep); color: #A8AFD3; border-top: 0; padding-top: 48px; }
.site-footer .brand-name, .footer-h { color: #fff; }
.footer-h { font: 700 .95rem var(--font-body); }
.footer-links a { color: #C9CEEA; }
.footer-links a:hover { color: #fff; }
.footer-legal { border-top-color: rgba(255, 255, 255, .1); color: #8A92BA; }

/* ---------- Toast ---------- */
.toast { border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 600; }

/* ---------- Mobile bottom tab bar + "See result" ---------- */
.tabbar, .jump-result { display: none; }
@media (max-width: 760px) {
  :root { --tabbar-h: 64px; }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .tabbar a, .tabbar button {
    display: grid; justify-items: center; align-content: center; gap: 3px;
    border: 0; background: none; color: var(--muted); text-decoration: none; font: 700 .7rem var(--font-body); cursor: pointer;
  }
  .tabbar .is-on { color: var(--accent); }
  .tabbar .is-on .icon { background: var(--accent-soft); border-radius: 10px; padding: 3px 12px; width: 46px; height: 28px; }
  .jump-result {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); z-index: 41;
    display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border: 0; border-radius: 999px;
    background: var(--ink); color: var(--bg); font: 700 .95rem var(--font-body); box-shadow: var(--shadow-lg); cursor: pointer;
  }
  .jump-result[hidden] { display: none; }
  .jump-result .icon { transform: rotate(90deg); }
  .toast { bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); }
  /* The header keeps just the brand and Tools; the tab bar covers the rest */
  .nav-all, .nav .nav-link { display: none; }
}

/* ---------- Tablet & phone layout ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .viewfinder { order: 2; }
  .hero-links { order: 3; }
  .vf-stage { --s: 220px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 14px; }
  .header-inner { height: 58px; }
  .hero-home { padding: 30px 0 30px; }
  .hero-home h1 { font-size: clamp(1.7rem, 8vw, 2.2rem); }
  .hero-home .lede { font-size: 1rem; margin-bottom: 18px; }
  .hero-compact { padding: 18px 0 10px; }
  .hero-compact .wrap { padding: 18px 16px; --cl: 18px; }
  .panel { padding: 16px; border-radius: 18px; }
  .tool-split { gap: 14px; }
  .btn-lg { height: 54px; }
  .vf-stage { --s: 190px; }
  .vf-steps li { padding: 4px 9px; font-size: .78rem; }
  .steps li { padding: 18px; }

  /* Tools menu becomes a full-screen sheet */
  .nav > details.menu:not(.menu-lang) > .menu-tools {
    position: fixed; inset: 0; top: 0; left: 0; right: 0; width: auto; max-width: none; max-height: none; height: 100dvh;
    border-radius: 0; border: 0; padding: 62px 14px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; z-index: 70;
  }
  .sheet-close { display: grid; place-items: center; position: fixed; top: 10px; right: 12px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink); cursor: pointer; z-index: 71; }
  .sheet-open, .sheet-open body { overflow: hidden; }
  .menu-tool { padding: 12px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .vf-frame { transition: none; }
}

/* ---------- Review fixes ---------- */
h1, .hero-home h1 { text-wrap: balance; }
.hero-home h1 { max-width: 16ch; }
.lede { text-wrap: pretty; }
.menu-search input[type="search"] { border: 0; background: transparent; box-shadow: none; padding: 10px 0; border-radius: 0; }
@media (hover: none), (max-width: 760px) { .menu-search kbd { display: none; } }
@media (min-width: 1100px) { .vf-stage { --s: 360px; } }

/* Phones: "More free tools" rows swipe sideways instead of stacking 20 cards */
@media (max-width: 640px) {
  .more-tools .tool-grid {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin: 0 -14px; padding: 2px 14px 10px; scrollbar-width: none;
  }
  .more-tools .tool-grid::-webkit-scrollbar { display: none; }
  .more-tools .tool-card { flex: 0 0 74%; scroll-snap-align: start; padding: 16px; }
  .more-tools { padding: 34px 0; }
  .more-tools .tool-group-h { margin: 18px 0 10px; }
  .site-footer { padding-top: 36px; }
}

/* Tools stack into one column on tablets and phones (re-stated here because the theme sets the desktop columns) */
@media (max-width: 900px) {
  .tool-split, .cc-split { grid-template-columns: minmax(0, 1fr); }
  .tool-split > * { min-width: 0; }
}
/* Keep the title frame's crop corners inside the screen on phones */
@media (max-width: 640px) {
  .hero-compact .wrap { width: auto; margin: 0 12px; }
}

/* ===== v4.1: platform badges, step guide, brand motif ===== */
.badge-svg{flex:none;display:inline-block;vertical-align:middle;border-radius:28%;box-shadow:0 1px 2px rgba(17,22,58,.18)}
.chip .badge-svg,.segmented button .badge-svg{margin-right:2px}
.platform-chips .chip,.chip-badge,.segmented button[data-app],#tts-platform button{display:inline-flex;align-items:center;gap:7px}
.chip-badge{padding-left:6px}
.menu-group-h,.footer-h-badge,.tool-group-badge{display:flex;align-items:center;gap:9px}
.menu-group-h::before{display:none!important}
.crumb-badge{display:inline-flex;align-items:center;gap:6px}
.cc-name{display:inline-flex;align-items:center;gap:8px}
.tool-card{position:relative}
.card-badge{position:absolute;top:14px;right:14px;line-height:0;opacity:.95}
.platform-links a{display:inline-flex;align-items:center;gap:8px}
.vf-label{display:inline-flex;align-items:center;gap:7px}
.vf-label b{font:inherit}
.vf-steps li{display:inline-flex;align-items:center;gap:7px}

/* Step guide: numbered like the logo — each number sits inside yellow crop corners */
.steps{list-style:none;margin:0 0 18px;padding:10px 12px;display:flex;flex-wrap:wrap;align-items:center;gap:6px 4px;
  background:var(--surface,#fff);border:1px solid var(--line,#E3E7F2);border-radius:16px}
.steps li[data-step]{display:flex;align-items:center;gap:9px;padding:6px 12px 6px 6px;border-radius:12px;color:var(--muted,#5B6285);font-weight:600;font-size:.95rem;transition:background .2s,color .2s}
.steps li[data-step]+li[data-step]::before{content:"";width:18px;height:2px;background:var(--line,#E3E7F2);margin:0 4px 0 -8px;border-radius:2px}
.step-n{position:relative;width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:var(--bg,#F4F6FB);color:var(--ink,#151B3B);font-family:Unbounded,Figtree,sans-serif;font-size:.85rem;font-weight:700}
.step-n::before{content:"";position:absolute;inset:3px;border-radius:4px;
  background:
   linear-gradient(var(--sun) 0 0) 0 0/7px 2px,linear-gradient(var(--sun) 0 0) 0 0/2px 7px,
   linear-gradient(var(--sun) 0 0) 100% 0/7px 2px,linear-gradient(var(--sun) 0 0) 100% 0/2px 7px,
   linear-gradient(var(--sun) 0 0) 0 100%/7px 2px,linear-gradient(var(--sun) 0 0) 0 100%/2px 7px,
   linear-gradient(var(--sun) 0 0) 100% 100%/7px 2px,linear-gradient(var(--sun) 0 0) 100% 100%/2px 7px;
  background-repeat:no-repeat;opacity:0;transition:opacity .2s}
.steps li.is-now{background:var(--ink-deep,#11163A);color:#fff}
.steps li.is-now .step-n{background:#fff1;color:#fff}
.steps li.is-now .step-n::before{opacity:1}
.steps li.is-done{color:var(--ink,#151B3B)}
.steps li.is-done .step-n{background:var(--accent);color:#fff;font-size:0}
.steps li.is-done .step-n::after{content:"";width:10px;height:5px;border:solid #fff;border-width:0 0 2.5px 2.5px;transform:translateY(-1px) rotate(-45deg)}
.steps-now{margin-left:auto;display:flex;align-items:center;gap:8px;font-weight:700;color:var(--ink,#151B3B);font-size:.9rem;min-width:0}
.steps-badge{line-height:0}
.steps-what{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.steps.is-complete li.is-done .step-n{background:#1E9E57}
@media (max-width:640px){
  .steps{padding:8px;gap:6px}
  .steps li[data-step]{padding:4px 8px 4px 4px;font-size:.82rem;gap:6px}
  .steps li[data-step]:not(.is-now) .step-t{display:none}
  .steps li[data-step]+li[data-step]::before{width:10px;margin:0 2px 0 -4px}
  .step-n{width:26px;height:26px}
  .steps-now{flex-basis:100%;margin-left:0;padding:4px 4px 0;border-top:1px dashed var(--line,#E3E7F2)}
  .steps-now:has(.steps-what:empty){display:none}
  .card-badge{top:12px;right:12px}
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .steps{background:var(--surface);border-color:var(--line)}
  :root:not([data-theme="light"]) .steps li.is-now{background:var(--accent)}
  :root:not([data-theme="light"]) .step-n{background:#ffffff14;color:#fff}
  :root:not([data-theme="light"]) .badge-svg{box-shadow:0 0 0 1px #ffffff22}
}

/* ===== v5: uiocean brand ===== */
.brand { gap: 10px; }
.brand-mark { line-height: 0; color: inherit; }
.logo-svg { display: block; border-radius: 28%; }
.brand-name { font: 700 1.15rem/1 var(--font-display); letter-spacing: -.02em; color: var(--ink); text-transform: none; }
.brand-ui { color: var(--accent); }
.site-footer .brand { display: inline-flex; align-items: center; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-ui { color: var(--sea); }
.footer-tagline { margin: 6px 0 0; color: var(--sea); font-weight: 700; font-size: .9rem; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-name { color: #fff; }
  :root:not([data-theme="light"]) .logo-svg { box-shadow: 0 0 0 1px #ffffff22; }
}

/* Official logo files from assets/platforms/ (used instead of a badge when present) */
.badge-img{flex:none;display:inline-block;vertical-align:middle;object-fit:contain}
.chip .badge-img,.segmented button .badge-img{margin-right:2px}
