/*!
 * 3D Model Converter — neumorphic UI
 * By WonderMayank — https://wondermayank.in
 */

/* ------------------------------------------------------------------ tokens */
:root {
  --bg: #e0e5ec;
  --sl: #ffffff;          /* light shadow */
  --sd: #a3b1c6;          /* dark shadow  */
  --text: #353b5e;
  --muted: #5d6685;
  --accent: #4f46e5;
  --accent-2: #6d5dfc;
  --accent-soft: rgba(79, 70, 229, .14);
  --ok: #14804a;
  --err: #c42a3b;
  --warn: #9a5a00;
  --info: #2563c9;
  --viewport-bg: #d9dfe8;

  --out: 9px 9px 18px var(--sd), -9px -9px 18px var(--sl);
  --out-sm: 5px 5px 11px var(--sd), -5px -5px 11px var(--sl);
  --out-xs: 3px 3px 7px var(--sd), -3px -3px 7px var(--sl);
  --in: inset 6px 6px 12px var(--sd), inset -6px -6px 12px var(--sl);
  --in-sm: inset 3px 3px 7px var(--sd), inset -3px -3px 7px var(--sl);

  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #2a2e39;
  --sl: #353a48;
  --sd: #1d2028;
  --text: #e7eaf6;
  --muted: #a6aec9;
  --accent: #a3a5ff;
  --accent-2: #7f72ff;
  --accent-soft: rgba(163, 165, 255, .16);
  --ok: #4fd08a;
  --err: #ff7b88;
  --warn: #f0b052;
  --info: #7db3ff;
  --viewport-bg: #232731;
  color-scheme: dark;
}

/* -------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  transition: background-color .25s ease, color .25s ease;
}
h1, h2, h3, p { margin: 0; }
h2 { font-size: 1.12rem; font-weight: 700; letter-spacing: .1px; display: flex; align-items: center; gap: 10px; }
h3 { font-size: 1rem; font-weight: 700; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); text-underline-offset: 3px; }
code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; }
kbd { padding: 1px 7px; border-radius: 7px; box-shadow: var(--out-xs); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .82em; font-weight: 500; }
.center { text-align: center; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 1000; padding: 10px 16px; background: var(--bg); box-shadow: var(--out-sm); border-radius: 12px; }
.skip-link:focus { top: 12px; }

/* ------------------------------------------------------------------ topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: 100%; max-width: 1280px; margin: 0 auto; padding: 22px 24px 8px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; min-width: 0; }
.brand-mark {
  flex: none; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center;
  box-shadow: var(--out-sm); background: var(--bg);
}
.brand-mark img { width: 44px; height: 44px; border-radius: 12px; display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-title { font-size: 1.35rem; font-weight: 800; letter-spacing: .2px; line-height: 1.15; }
.brand-sub { font-size: .85rem; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  font-size: .82rem; font-weight: 600; color: var(--ok); box-shadow: var(--in-sm);
}

.icon-btn {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--bg); color: var(--text);
  display: inline-grid; place-items: center; box-shadow: var(--out-sm); transition: box-shadow .15s, transform .15s, color .15s;
}
.icon-btn.has-label { width: auto; padding: 0 16px; border-radius: 999px; display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.icon-btn:hover { color: var(--accent); }
.icon-btn:active { box-shadow: var(--in-sm); transform: scale(.97); }
#themeBtn .i-sun { display: none; }
:root[data-theme="dark"] #themeBtn .i-sun { display: block; }
:root[data-theme="dark"] #themeBtn .i-moon { display: none; }

/* ------------------------------------------------------------------ layout */
.layout {
  width: 100%; max-width: 1280px; margin: 0 auto; padding: 18px 24px 8px;
  display: grid; gap: 26px; grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "upload" "viewer" "format" "options" "actions";
}
.area-upload { grid-area: upload; }
.area-viewer { grid-area: viewer; }
.area-format { grid-area: format; }
.area-options { grid-area: options; }
.area-actions { grid-area: actions; }

@media (min-width: 980px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
    grid-template-areas:
      "upload  viewer"
      "format  viewer"
      "options viewer"
      "actions viewer";
    grid-template-rows: auto auto auto 1fr;
    align-items: start;
  }
  .area-viewer { position: sticky; top: 18px; }
}

.card { background: var(--bg); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--out); display: flex; flex-direction: column; gap: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.step {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: .86rem; font-weight: 800; color: var(--accent); box-shadow: var(--in-sm);
}

/* ---------------------------------------------------------------- dropzone */
.dropzone {
  border-radius: var(--r-md); padding: 30px 18px; text-align: center; cursor: pointer; box-shadow: var(--in);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  outline-offset: 4px; transition: box-shadow .2s, transform .2s;
  border: 2px dashed transparent;
}
.dropzone:hover { border-color: var(--accent-soft); }
.dropzone.is-over { border-color: var(--accent); transform: scale(1.01); }
.dz-icon { color: var(--accent); display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; box-shadow: var(--out-sm); margin-bottom: 8px; }
.dz-title { font-weight: 700; font-size: 1.05rem; }
.dz-link { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.dz-sub { color: var(--muted); font-size: .88rem; max-width: 46ch; }

.drop-overlay { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .15s; }
.drop-overlay.show { opacity: 1; }
.drop-overlay-card { padding: 38px 54px; border-radius: 34px; box-shadow: var(--out); background: var(--bg); display: grid; justify-items: center; gap: 10px; color: var(--accent); font-weight: 700; font-size: 1.15rem; border: 3px dashed var(--accent); }

/* ------------------------------------------------------------------- queue */
.queue-wrap { display: flex; flex-direction: column; gap: 12px; }
.queue { list-style: none; margin: 0; padding: 4px 4px 8px; display: flex; flex-direction: column; gap: 12px; max-height: 300px; overflow: auto; }
.queue-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 16px; box-shadow: var(--out-xs); background: var(--bg); cursor: pointer;
  border: 2px solid transparent; transition: box-shadow .15s;
}
.queue-item:hover { border-color: var(--accent-soft); }
.queue-item.is-active { box-shadow: var(--in-sm); border-color: var(--accent-soft); }
.queue-item.is-error { border-color: color-mix(in srgb, var(--err) 45%, transparent); }
.q-badge { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: .78rem; letter-spacing: .5px; color: var(--accent); box-shadow: var(--in-sm); }
.q-main { min-width: 0; display: flex; flex-direction: column; }
.q-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-meta { font-size: .8rem; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.q-meta .err { color: var(--err); font-weight: 600; }
.q-meta .ok { color: var(--ok); font-weight: 600; }
.q-remove { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--bg); color: var(--muted); display: grid; place-items: center; box-shadow: var(--out-xs); }
.q-remove:hover { color: var(--err); }
.q-remove:active { box-shadow: var(--in-sm); }
.queue-foot { display: flex; justify-content: space-between; align-items: center; font-size: .86rem; gap: 10px; flex-wrap: wrap; }
.link-btn { background: none; border: 0; padding: 4px 6px; color: var(--accent); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; border-radius: 8px; align-self: flex-start; }
.link-btn:hover { filter: brightness(1.1); }

/* ------------------------------------------------------------------ viewer */
.toolbar { display: flex; gap: 10px; }
.tool-btn { width: 40px; height: 40px; border: 0; border-radius: 13px; background: var(--bg); color: var(--text); display: grid; place-items: center; box-shadow: var(--out-xs); transition: color .15s; }
.tool-btn:hover { color: var(--accent); }
.tool-btn:active, .tool-btn.is-on[aria-pressed="true"] { box-shadow: var(--in-sm); color: var(--accent); }
.viewport {
  position: relative; border-radius: var(--r-md); box-shadow: var(--in); overflow: hidden; background: var(--viewport-bg);
  height: clamp(300px, 56vh, 620px); touch-action: none;
}
.viewport:fullscreen { height: 100vh; border-radius: 0; }
.viewport-canvas { width: 100%; height: 100%; display: block; outline: none; cursor: grab; }
.viewport-canvas:active { cursor: grabbing; }
.view-empty, .view-busy {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center; color: var(--muted); pointer-events: none; padding: 20px;
}
.view-empty svg { opacity: .55; }
.view-empty p { font-weight: 650; }
.view-empty small { font-size: .82rem; }
.view-busy { background: color-mix(in srgb, var(--viewport-bg) 82%, transparent); color: var(--text); font-weight: 650; flex-direction: row; gap: 12px; }
.view-fail { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); }

.stats { margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.stats > div { padding: 10px 8px; border-radius: 14px; box-shadow: var(--out-xs); text-align: center; min-width: 0; }
.stats .wide { grid-column: 1 / -1; box-shadow: var(--in-sm); }
.stats dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); font-weight: 700; }
.stats dd { margin: 2px 0 0; font-weight: 750; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ----------------------------------------------------------------- formats */
.formats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 560px) { .formats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fmt { position: relative; display: block; cursor: pointer; }
.fmt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.fmt-face {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px; border-radius: var(--r-md);
  box-shadow: var(--out-sm); transition: box-shadow .18s, color .18s, transform .18s; text-align: center;
}
.fmt-face b { font-size: 1.22rem; letter-spacing: .6px; }
.fmt-face small { font-size: .72rem; color: var(--muted); line-height: 1.25; }
.fmt:hover .fmt-face { transform: translateY(-1px); }
.fmt input:checked + .fmt-face { box-shadow: var(--in); color: var(--accent); }
.fmt input:checked + .fmt-face small { color: var(--text); }
.fmt input:focus-visible + .fmt-face { outline: 3px solid var(--accent); outline-offset: 3px; }
.note { font-size: .86rem; color: var(--muted); min-height: 1.3em; }
.note b { color: var(--text); }

/* ----------------------------------------------------------------- options */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: minmax(0, 1fr); } }
label, .label { font-weight: 650; font-size: .92rem; }
.help { font-size: .8rem; color: var(--muted); }
.neu-input {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 0; border-radius: 14px; background: var(--bg); color: var(--text);
  box-shadow: var(--in-sm); outline-offset: 3px; appearance: none; -webkit-appearance: none;
}
.neu-input:focus-visible { outline: 3px solid var(--accent); }
.select-wrap { position: relative; }
.select-wrap::after { content: ""; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
.select-wrap select { padding-right: 38px; cursor: pointer; text-overflow: ellipsis; }
.scale-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: center; }
@media (max-width: 560px) { .scale-row { grid-template-columns: minmax(0, 1fr); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 0; background: var(--bg); padding: 7px 11px; border-radius: 11px; font-size: .8rem; font-weight: 650; box-shadow: var(--out-xs); transition: color .15s; }
.chip:hover { color: var(--accent); }
.chip:active, .chip.is-on { box-shadow: var(--in-sm); color: var(--accent); }

.seg { display: inline-grid; grid-auto-flow: column; gap: 10px; }
.seg label { position: relative; cursor: pointer; font-weight: 600; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; flex-direction: column; align-items: center; padding: 9px 18px; border-radius: 13px; box-shadow: var(--out-xs); transition: box-shadow .15s, color .15s; line-height: 1.2; }
.seg small { font-size: .7rem; color: var(--muted); font-weight: 500; }
.seg input:checked + span { box-shadow: var(--in-sm); color: var(--accent); }
.seg input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }

.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; position: relative; }
.switch input { position: absolute; opacity: 0; width: 52px; height: 28px; margin: 0; cursor: pointer; }
.switch-ui { flex: none; width: 52px; height: 28px; border-radius: 999px; box-shadow: var(--in-sm); position: relative; transition: background .2s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); box-shadow: var(--out-xs); transition: transform .2s, background .2s; }
.switch input:checked + .switch-ui { background: var(--accent-soft); }
.switch input:checked + .switch-ui::after { transform: translateX(22px); background: var(--accent); box-shadow: 2px 2px 5px rgba(0, 0, 0, .25); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ----------------------------------------------------------------- buttons */
.btn-primary {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 58px;
  border: 0; border-radius: 20px; padding: 14px 22px; font-weight: 800; font-size: 1.08rem; letter-spacing: .3px; color: #fff;
  background: linear-gradient(135deg, var(--accent-2), #4a3fe0);
  box-shadow: 7px 7px 16px var(--sd), -7px -7px 16px var(--sl); transition: transform .15s, box-shadow .15s, filter .15s;
}
:root[data-theme="dark"] .btn-primary { background: linear-gradient(135deg, #7b6cff, #5648e8); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); box-shadow: inset 4px 4px 10px rgba(0, 0, 0, .28), inset -3px -3px 8px rgba(255, 255, 255, .12); }
.btn-primary:disabled { cursor: not-allowed; color: var(--muted); background: var(--bg); box-shadow: var(--in-sm); }
.btn-soft { border: 0; border-radius: 14px; padding: 10px 16px; background: var(--bg); color: var(--accent); font-weight: 750; box-shadow: var(--out-sm); }
.btn-soft:hover { filter: brightness(1.05); }
.btn-soft:active { box-shadow: var(--in-sm); }

.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .75s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- progress */
.progress { display: flex; flex-direction: column; gap: 8px; }
.progress-track { height: 16px; border-radius: 999px; box-shadow: var(--in-sm); overflow: hidden; padding: 3px; }
.progress-bar { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .25s ease; }

/* ----------------------------------------------------------------- results */
.results { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.result-list { list-style: none; margin: 0; padding: 4px; display: flex; flex-direction: column; gap: 12px; }
.result-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 16px; box-shadow: var(--out-xs); }
.result-item.is-error { box-shadow: var(--in-sm); }
.r-badge { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: .78rem; color: var(--ok); box-shadow: var(--in-sm); }
.result-item.is-error .r-badge { color: var(--err); }
.r-main { min-width: 0; display: flex; flex-direction: column; }
.r-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-meta { font-size: .8rem; color: var(--muted); }
.r-meta .err { color: var(--err); font-weight: 600; white-space: normal; }
.dl-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 13px; padding: 10px 14px; background: var(--bg); color: var(--accent); font-weight: 750; box-shadow: var(--out-sm); text-decoration: none; }
.dl-btn:active { box-shadow: var(--in-sm); }

/* ------------------------------------------------------------- about / faq */
.about { width: 100%; max-width: 980px; margin: 34px auto 6px; padding: 0 24px; display: flex; flex-direction: column; gap: 16px; color: var(--muted); }
.about h2 { color: var(--text); font-size: 1.25rem; }
.about strong { color: var(--text); }
.combos { list-style: none; margin: 0; padding: 4px; display: flex; flex-wrap: wrap; gap: 12px; }
.combos li { padding: 8px 14px; border-radius: 13px; box-shadow: var(--out-xs); font-weight: 650; color: var(--text); font-size: .9rem; }
.faq { display: flex; flex-direction: column; gap: 12px; padding: 4px; }
.faq details { border-radius: 16px; box-shadow: var(--out-xs); padding: 12px 16px; }
.faq details[open] { box-shadow: var(--in-sm); }
.faq summary { cursor: pointer; font-weight: 700; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin-top: 8px; font-size: .94rem; }

/* ------------------------------------------------------------------ footer */
.site-footer { margin-top: auto; padding: 34px 24px calc(30px + env(safe-area-inset-bottom)); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.credit { font-weight: 700; }
.credit a { text-decoration: none; }
.credit a:hover { text-decoration: underline; }
.credit-sub { font-size: .82rem; color: var(--muted); }
.credit-sub a { color: var(--muted); }
.heart { color: #e5484d; }
.noscript { margin: 20px auto; max-width: 560px; padding: 16px 20px; border-radius: 16px; box-shadow: var(--in-sm); text-align: center; }

/* ------------------------------------------------------------------ toasts */
#toasts { position: fixed; z-index: 1200; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 14px; width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; overflow: hidden;
  padding: 14px 14px 16px 14px; border-radius: 20px; background: var(--bg); box-shadow: var(--out); pointer-events: auto;
  animation: toast-in .32s cubic-bezier(.2, .9, .3, 1.2) both; --tone: var(--info);
}
.toast-success { --tone: var(--ok); }
.toast-error { --tone: var(--err); }
.toast-warning { --tone: var(--warn); }
.toast-info { --tone: var(--info); }
.toast-out { animation: toast-out .26s ease forwards; }
.toast-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--tone); box-shadow: var(--in-sm); }
.toast-icon svg { width: 22px; height: 22px; }
.toast-body { min-width: 0; padding-top: 1px; }
.toast-title { display: block; font-weight: 750; color: var(--tone); }
.toast-msg { font-size: .9rem; overflow-wrap: anywhere; }
.toast-hint { font-size: .8rem; color: var(--muted); margin-top: 3px; }
.toast-actions { display: flex; gap: 8px; margin-top: 8px; }
.toast-action { border: 0; padding: 6px 12px; border-radius: 10px; background: var(--bg); color: var(--tone); font-weight: 750; box-shadow: var(--out-xs); }
.toast-action:active { box-shadow: var(--in-sm); }
.toast-close { width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--bg); color: var(--muted); display: grid; place-items: center; box-shadow: var(--out-xs); }
.toast-close:hover { color: var(--text); }
.toast-close svg { width: 14px; height: 14px; }
.toast-bar { position: absolute; left: 14px; right: 14px; bottom: 6px; height: 4px; border-radius: 4px; background: var(--tone); opacity: .55; transform-origin: left; animation: toast-bar linear forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(26px) scale(.96); } }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 560px) { #toasts { right: 16px; left: 16px; bottom: 14px; width: auto; } }

/* ----------------------------------------------------------------- intro.js */
.introjs-overlay { background: rgba(20, 24, 40, .45) !important; }
.introjs-helperLayer { border-radius: 22px !important; box-shadow: 0 0 0 3px var(--accent), 0 0 0 9999px rgba(20, 24, 40, .45) !important; background: transparent !important; }
.introjs-tooltip.neu-tour {
  background: var(--bg); color: var(--text); border-radius: 24px; box-shadow: var(--out); font-family: var(--font);
  min-width: 270px; max-width: min(380px, calc(100vw - 32px)); padding: 6px 4px 4px;
}
.neu-tour .introjs-tooltip-header { padding: 14px 18px 0; min-height: 0; }
.neu-tour .introjs-tooltip-title { font-size: 1.08rem; font-weight: 800; color: var(--text); }
.neu-tour .introjs-tooltiptext { padding: 10px 18px 6px; font-size: .94rem; line-height: 1.5; color: var(--text); }
.neu-tour .introjs-tooltiptext b { color: var(--accent); }
.neu-tour .introjs-skipbutton { color: var(--muted); font-size: 1.4rem; top: 8px; right: 10px; }
.neu-tour .introjs-progress { height: 12px; border-radius: 999px; box-shadow: var(--in-sm); background: var(--bg); margin: 8px 18px 4px; overflow: hidden; }
.neu-tour .introjs-progressbar { background: linear-gradient(90deg, var(--accent-2), var(--accent)); height: 100%; border-radius: 999px; }
.neu-tour .introjs-tooltipbuttons { border-top: 0; padding: 10px 14px 14px; display: flex; gap: 10px; justify-content: flex-end; }
.neu-tour .introjs-button {
  text-shadow: none; font-family: var(--font); font-weight: 750; font-size: .9rem; border: 0; border-radius: 13px; padding: 9px 16px;
  background: var(--bg); color: var(--accent); box-shadow: var(--out-xs);
}
.neu-tour .introjs-button:hover, .neu-tour .introjs-button:focus { background: var(--bg); color: var(--accent); box-shadow: var(--out-xs); outline: 3px solid var(--accent); outline-offset: 2px; }
.neu-tour .introjs-button:active { box-shadow: var(--in-sm); }
.neu-tour .introjs-nextbutton, .neu-tour .introjs-donebutton { background: linear-gradient(135deg, var(--accent-2), #4a3fe0); color: #fff; }
.neu-tour .introjs-nextbutton:hover, .neu-tour .introjs-donebutton:hover { background: linear-gradient(135deg, var(--accent-2), #4a3fe0); color: #fff; }
.neu-tour .introjs-disabled { color: var(--muted); opacity: .55; box-shadow: none; }
.neu-tour .introjs-arrow { display: none; }
.neu-tour .introjs-dontShowAgain { padding: 0 18px 6px; }
.neu-tour .introjs-dontShowAgain label { color: var(--muted); font-size: .8rem; }

/* ------------------------------------------------------------ misc / a11y */
@media (max-width: 560px) {
  .topbar { padding: 16px 16px 4px; }
  .layout { padding: 14px 16px 4px; gap: 20px; }
  .card { padding: 18px; border-radius: 24px; }
  .brand-title { font-size: 1.12rem; }
  .brand-sub { display: none; }
  .pill { display: none; }
  .about { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .card, .fmt-face, .dropzone, .neu-input, .btn-primary { border: 1px solid CanvasText; }
}
@media print { .topbar, .site-footer, #toasts { display: none; } }
