/* Omnipilot — clean UI layer (loaded after app.css). */
.topbar .brand-sub, .auth-solo .brand-sub { display: none; }
.topbar { gap: 18px; }

.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; max-width: 980px; margin: 24px auto 0; }
.tool-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  min-height: 160px; padding: 28px 16px; text-align: center; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl, 16px);
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease); }
a.tool-tile:hover, a.tool-tile:focus-visible { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow); outline: none; }
.tool-tile .tt-ic { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px; background: var(--brand-soft); color: var(--brand); }
a.tool-tile:hover .tt-ic { background: var(--brand); color: var(--on-brand); }
.tool-tile .tt-name { font-family: var(--display); font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; }
.tool-tile.is-soon { opacity: .5; cursor: default; }
.tool-tile .tt-soon { position: absolute; top: 12px; right: 12px; font-size: 11px; color: var(--text-3); }

.auth-solo { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; position: relative; }
.auth-solo .auth-top { position: absolute; top: 16px; right: 16px; }
.auth-solo .auth-brand { margin-bottom: 22px; display: inline-flex; }
.auth-solo .auth-card { width: 100%; max-width: 400px; }
.auth-solo h1 { margin-bottom: 18px; }

.page-head h1 .subtle { font-size: .6em; font-weight: 500; margin-left: 6px; }
@media (max-width: 640px) { .tools-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .tool-tile { min-height: 130px; } }

/* ---- free tools ---- */
.ft { max-width: 760px; margin: 8px auto 0; }
.ft-title { font-size: 26px; margin-bottom: 16px; }
.ft-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ft-tab { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: var(--r-pill, 999px); padding: 8px 16px; font: inherit; font-size: 14px; cursor: pointer; }
.ft-tab.active { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 600; }
.ft-panel { display: none; padding: 22px; }
.ft-panel.active { display: flex; flex-direction: column; gap: 14px; }
.ft-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 140px; border: 2px dashed var(--border-strong); border-radius: var(--r-lg); color: var(--text-2); cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.ft-drop:hover { border-color: var(--brand); background: var(--brand-soft); }
.ft-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ft-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ft-list li { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); font-size: 14px; }
.ft-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-mini { border: 0; background: transparent; color: var(--text-2); cursor: pointer; padding: 2px 8px; border-radius: 6px; font-size: 14px; }
.ft-mini:hover { background: var(--surface-3); color: var(--text); }
.ft-opts { display: flex; gap: 10px; flex-wrap: wrap; }
.ft-opts .input { flex: 1; min-width: 180px; }
.ft-out { font-size: 14px; color: var(--text-2); }
.ft-out:empty { display: none; }
.ft-out.bad { color: var(--danger); }
.ft-sub { margin-top: 8px; font-size: 13px; color: var(--text-3); }
.ft-note { margin-top: 14px; font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; justify-content: center; }
.btn.loading { opacity: .7; pointer-events: none; }
.ft-print { display: none; }
@media print {
  /* Word → PDF: the JS moves #ft-print to be a direct child of <body> before printing.
     Hide every other top-level element with display:none (not visibility:hidden), so the
     rest of the page takes no space and the PDF has no trailing blank pages. */
  body.ft-printing > *:not(.ft-print) { display: none !important; }
  body.ft-printing { background: #fff !important; }
  body.ft-printing .ft-print { display: block !important; color: #000; background: #fff; font: 12pt/1.5 Georgia, serif; }
  body.ft-printing .ft-print img { max-width: 100%; }
  body.ft-printing .ft-print table { border-collapse: collapse; }
  body.ft-printing .ft-print td, body.ft-printing .ft-print th { border: 1px solid #999; padding: 4px 6px; }
}
.ft-range { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.ft-range input { width: 160px; accent-color: var(--brand); }
.ft-range b { min-width: 2ch; color: var(--text); }
.ft-opts .check { align-self: center; }
.ft-fields { display: flex; flex-direction: column; gap: 10px; }
.ft-fields[hidden], [data-show][hidden] { display: none !important; }
.ft-color { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.ft-color input { width: 38px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: none; cursor: pointer; }
.qr-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.qr-preview { padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.qr-preview canvas { width: 240px; height: 240px; border-radius: 12px; background: #fff; image-rendering: pixelated; }
@media (max-width: 760px) { .qr-grid { grid-template-columns: 1fr; } }
.bg-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bg-compare[hidden] { display: none; }
.bg-compare figure { margin: 0; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; display: grid; place-items: center; min-height: 160px; background: var(--surface-2); }
.bg-compare canvas { max-width: 100%; height: auto; display: block; }
.bg-compare .checker { background-color: #fff; background-image: linear-gradient(45deg,#e6e6e6 25%,transparent 25%),linear-gradient(-45deg,#e6e6e6 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e6e6e6 75%),linear-gradient(-45deg,transparent 75%,#e6e6e6 75%); background-size: 18px 18px; background-position: 0 0,0 9px,9px -9px,-9px 0; }
@media (max-width: 640px) { .bg-compare { grid-template-columns: 1fr; } }

/* Instagram Story downloader: Coming soon state (inline styles are blocked by CSP) */
.ig-form[hidden] { display: none !important; }
.ig-soon { text-align: center; padding: 28px 20px; margin: 16px 0; }
.ig-soon strong { display: block; font-size: 18px; margin-bottom: 6px; }
