/* MokIII Tools — app.v1.css
   Blue/white design system for the home page and every tool page.
   No @import, no external fonts, no third-party assets. */

:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --brand: #1d4ed8;
  --brand-hover: #1e40af;
  --brand-bright: #2563eb;
  --brand-soft: #eff6ff;
  --brand-line: #bfdbfe;
  --ok: #15803d;
  --ok-soft: #f0fdf4;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
  --container: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(84px + env(safe-area-inset-top, 0px));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 800;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

code,
pre {
  font-family: var(--mono);
}

code {
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

::selection {
  background: #dbeafe;
  color: #0f172a;
}

:focus-visible {
  outline: 3px solid rgba(29, 78, 216, 0.35);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.nowrap {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--brand);
  color: #fff;
  padding: 9px 16px;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

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

.file-preview-note {
  padding: 9px 16px;
  border-bottom: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.file-preview-note code {
  border-color: #fde68a;
  background: #fff7d6;
  color: #78350f;
}

.file-preview-note a {
  color: #92400e;
  font-weight: 700;
  text-decoration: underline;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.28);
}

.brand-text {
  font-size: 17px;
  white-space: nowrap;
}

.brand-text b {
  color: var(--brand);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 600;
}

.nav a {
  color: var(--muted);
}

.nav a:hover {
  color: var(--brand);
  text-decoration: none;
}

.header-cta {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
}

.header-cta:hover {
  background: #dbeafe;
  text-decoration: none;
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 46px;
  background:
    radial-gradient(1000px 420px at 12% -20%, #dbeafe 0%, rgba(219, 234, 254, 0) 65%),
    radial-gradient(800px 360px at 92% 0%, #e0e7ff 0%, rgba(224, 231, 255, 0) 60%),
    linear-gradient(180deg, #eef4ff 0%, var(--bg) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.5;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.hero h1 {
  max-width: 860px;
  margin: 16px 0 12px;
  font-size: clamp(2.05rem, 5.2vw, 3.4rem);
  letter-spacing: -0.035em;
}

.lead {
  max-width: 760px;
  margin: 0;
  color: var(--text-2);
  font-size: clamp(15.5px, 2vw, 17px);
  line-height: 1.7;
}

.search-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 720px;
  margin-top: 26px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 10px;
  color: var(--muted);
}

.search-field svg {
  flex: none;
}

.search-field input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.search-field input::placeholder {
  color: #94a3b8;
}

.search-field input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.search-btn {
  flex: none;
  min-width: 92px;
}

.search-hint {
  margin: 9px 2px 0;
  color: var(--muted);
  font-size: 12.5px;
}

.quick-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.quick-label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.quick-tag {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.quick-tag:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  margin-top: 26px;
}

.stat {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.stat b {
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat span {
  color: var(--muted);
  font-size: 12.5px;
}

/* ----------------------------------------------------------- value strip */

.value-strip {
  padding: 22px 0 4px;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.value-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 4px 14px;
}

.value-item + .value-item {
  border-left: 1px solid var(--line);
}

.value-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--brand-soft);
  border: 1px solid #dbeafe;
  color: var(--brand);
}

.value-item b {
  display: block;
  margin-bottom: 2px;
  font-size: 14.5px;
}

.value-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* --------------------------------------------------------------- sections */

.section {
  padding: 46px 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 20px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 6px 0 6px;
  font-size: clamp(1.45rem, 3.4vw, 2rem);
}

.section-head p {
  max-width: 650px;
  color: var(--muted);
  font-size: 14.5px;
}

.count-pill {
  flex: none;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chip:hover {
  border-color: var(--brand-line);
  color: var(--brand);
}

.chip[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.22);
}

.chip-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.chip[aria-pressed="true"] .chip-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.no-results {
  margin-bottom: 18px;
  padding: 30px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.no-results-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}

.no-results h3 {
  margin-bottom: 4px;
  font-size: 17px;
}

.no-results p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13.5px;
}

.noscript-note {
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 13px;
}

/* ----------------------------------------------------------------- cards */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-line);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.tool-card:focus-visible {
  border-color: var(--brand);
}

.feature-card {
  min-height: 230px;
  padding: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.icon-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--brand-soft);
  border: 1px solid #dbeafe;
  color: var(--brand);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: var(--brand-soft);
  color: #1e40af;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

.tool-card h3 {
  margin-bottom: 6px;
  font-size: 19px;
}

.tool-card > p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tag {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.card-output {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  color: var(--brand);
  font-size: 13.5px;
  font-weight: 700;
}

.card-cta svg {
  transition: transform 0.15s ease;
}

.tool-card:hover .card-cta svg {
  transform: translateX(2px);
}

/* --------------------------------------------------------------- privacy */

.privacy-band {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 26px;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 72%);
  box-shadow: var(--shadow-sm);
}

.privacy-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--surface);
  border: 1px solid #dbeafe;
  color: var(--brand);
  box-shadow: 0 6px 18px rgba(29, 78, 216, 0.08);
}

.privacy-copy {
  min-width: 0;
}

.privacy-copy h2 {
  margin-bottom: 8px;
  font-size: clamp(1.25rem, 2.8vw, 1.6rem);
}

.privacy-copy p {
  margin-bottom: 8px;
  color: var(--text-2);
  font-size: 14.5px;
}

.privacy-copy p:last-child {
  margin-bottom: 0;
}

.privacy-link a {
  font-weight: 700;
}

/* ------------------------------------------------------------------- api */

.api-card {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.api-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 20px;
  margin-bottom: 16px;
}

.api-head h2 {
  margin: 6px 0;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
}

.api-head p {
  max-width: 760px;
  color: var(--text-2);
  font-size: 14.5px;
}

.endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 12px 14px;
  overflow-x: auto;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.method {
  flex: none;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.endpoint code {
  border: 0;
  padding: 0;
  background: none;
  color: #e2e8f0;
  font-size: 13px;
  white-space: nowrap;
}

.endpoint-note {
  margin-left: auto;
  color: #94a3b8;
  font-family: var(--mono);
  font-size: 11.5px;
}

.api-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12.5px;
}

.api-details {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.api-details summary {
  cursor: pointer;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
}

.api-details[open] summary {
  margin-bottom: 12px;
}

.api-details-body {
  min-width: 0;
}

.code-block {
  max-width: 100%;
  margin: 12px 0;
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12.5px;
  line-height: 1.65;
  -webkit-overflow-scrolling: touch;
}

.code-block code {
  border: 0;
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  white-space: pre;
}

.api-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

/* -------------------------------------------------------------------- faq */

.faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 920px;
}

.faq details {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 0.15s ease;
}

.faq details[open] {
  border-color: var(--brand-line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 700;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--brand);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  padding: 0 18px 15px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.7;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
    transform 0.1s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: #fff;
  text-decoration: none;
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text-2);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-soft);
  border-color: #94a3b8;
  color: var(--text);
  text-decoration: none;
}

.btn-sm {
  min-height: 36px;
  padding: 0 13px;
  font-size: 13px;
}

/* ------------------------------------------------------------- tool page */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 26px 0 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb .sep {
  color: #cbd5e1;
}

.breadcrumb li[aria-current="page"] {
  color: var(--text-2);
  font-weight: 600;
}

.page-head {
  padding: 16px 0 22px;
}

.page-head h1 {
  margin: 10px 0 10px;
  font-size: clamp(2rem, 4.8vw, 2.8rem);
  letter-spacing: -0.035em;
}

.page-head .lead {
  max-width: 800px;
  font-size: 16.5px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tool-shell {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.meta-pill svg {
  flex: none;
}

.meta-ok {
  border-color: #bbf7d0;
  background: var(--ok-soft);
  color: var(--ok);
  font-weight: 700;
}

/* --------------------------------------------------------------- dropzone */

.dropzone {
  padding: 28px 18px;
  border: 2px dashed #c7d2e5;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
  text-align: center;
  cursor: pointer;
  outline: none;
  transition: border-color 0.16s ease, background 0.16s ease,
    box-shadow 0.16s ease;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-drag {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(29, 78, 216, 0.08);
}

.dropzone.is-drag {
  background: #dbeafe;
}

.dz-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 6px 18px rgba(29, 78, 216, 0.08);
}

.dz-title {
  margin-bottom: 4px;
  font-size: 16.5px;
  font-weight: 700;
}

.dz-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.dz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 12px;
  padding: 0 16px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.dropzone:hover .dz-btn {
  background: var(--brand-hover);
}

.dz-btn:focus-visible {
  outline: 3px solid rgba(29, 78, 216, 0.35);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- options */

.options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.options.options-single {
  grid-template-columns: minmax(0, 1fr);
}

.options.options-jpg {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.upload-alert {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.field {
  min-width: 0;
}

.field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  color: #475569;
  font-size: 12.5px;
  font-weight: 700;
}

.field-value {
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.field select,
.field input[type="number"] {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
}

.field select:hover,
.field input[type="number"]:hover {
  border-color: #94a3b8;
}

.field select:focus,
.field input[type="number"]:focus {
  outline: 2px solid rgba(29, 78, 216, 0.28);
  outline-offset: 0;
  border-color: var(--brand);
}

.field input[type="range"] {
  display: block;
  width: 100%;
  height: 32px;
  margin: 6px 0 0;
  padding: 0;
  accent-color: var(--brand);
  background: transparent;
}

.option-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.option-note.warn {
  color: var(--warn);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* --------------------------------------------------------------- progress */

.progress-wrap {
  margin-top: 18px;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eefb;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d4ed8, #38bdf8);
  transition: width 0.22s ease;
}

.progress-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------- results */

.results {
  min-width: 0;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 12px;
}

.results-head h2 {
  margin-bottom: 2px;
  font-size: 17px;
}

.result-summary {
  color: var(--muted);
  font-size: 13px;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.file-row:hover {
  border-color: #d7e2f5;
}

.file-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.file-name {
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.file-right {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.pdf-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.pdf-file-row:hover {
  border-color: #d7e2f5;
}

.pdf-file-row.dragging {
  opacity: 0.45;
}

.pdf-file-row.drag-over {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.pdf-order {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pdf-drag {
  flex: none;
  width: 14px;
  overflow: hidden;
  color: #9aa9bf;
  font-size: 12px;
  line-height: 1;
  letter-spacing: -2px;
  cursor: grab;
  user-select: none;
}

.pdf-drag:active {
  cursor: grabbing;
}

.pdf-file-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pdf-file-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.pdf-file-head .file-name {
  flex: 1 1 auto;
  min-width: 0;
}

.pdf-file-size {
  flex: none;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.pdf-status {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.pdf-status.pending {
  background: #eef2f7;
  color: #64748b;
}

.pdf-status.working {
  background: var(--primary-soft);
  color: var(--primary);
}

.pdf-status.done {
  background: var(--ok-soft);
  color: var(--ok);
}

.pdf-status.error {
  background: #fee2e2;
  color: #b91c1c;
}

.pdf-row-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
}

.pdf-row-actions .mini {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 14px;
}

.pdf-row-actions .mini.danger {
  color: #b91c1c;
}

.pdf-row-actions .mini.danger:hover {
  border-color: #fecaca;
  background: #fef2f2;
}

.result-size {
  color: var(--ok);
  font-size: 13.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.result-pct {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 11.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.result-pct.up {
  background: var(--warn-soft);
  color: var(--warn);
}

.result-warn {
  color: var(--warn);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.file-status {
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.file-status.working {
  color: var(--brand);
}

.file-status.working::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border: 2px solid #bfdbfe;
  border-top-color: var(--brand);
  border-radius: 50%;
  vertical-align: -1px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-text {
  max-width: 300px;
  color: var(--danger);
  font-size: 12.5px;
  text-align: right;
  overflow-wrap: anywhere;
}

.error-tag {
  font-weight: 800;
  white-space: nowrap;
}

.mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.mini:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand);
}

.mini.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.mini.primary:hover {
  background: var(--brand-hover);
  color: #fff;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.empty-state {
  padding: 24px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
  list-style: none;
}

.local-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.local-note svg {
  flex: none;
  margin-top: 2px;
  color: var(--ok);
}

/* -------------------------------------------------------------- favicon */

.favicon-panel {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.favicon-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 18px;
  margin-bottom: 16px;
}

.favicon-panel-head h2 {
  margin: 6px 0 4px;
  font-size: 20px;
}

.favicon-panel-head p {
  color: var(--muted);
  font-size: 13px;
}

.favicon-preview-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.favicon-preview-tile {
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
}

.favicon-canvas-box {
  display: grid;
  place-items: center;
  height: 112px;
  margin-bottom: 8px;
  overflow: hidden;
  border-radius: 9px;
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f7 75%);
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
}

.favicon-preview-tile canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  image-rendering: pixelated;
}

.favicon-preview-tile canvas[data-favicon-preview="16"],
.favicon-preview-tile canvas[data-favicon-preview="32"],
.favicon-preview-tile canvas[data-favicon-preview="48"] {
  width: 64px;
  height: 64px;
}

.favicon-preview-tile canvas[data-favicon-preview="180"],
.favicon-preview-tile canvas[data-favicon-preview="192"],
.favicon-preview-tile canvas[data-favicon-preview="512"] {
  width: 100px;
  height: 100px;
  image-rendering: auto;
}

.favicon-preview-tile b {
  display: block;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.favicon-preview-tile > span:last-child {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.favicon-code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.favicon-code-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.favicon-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.favicon-code-head h3 {
  font-size: 13.5px;
}

.favicon-code {
  max-height: 220px;
  margin: 0;
  padding: 10px 12px;
  overflow: auto;
  border-radius: 8px;
  background: #0f172a;
  color: #dbeafe;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.favicon-panel-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

/* ------------------------------------------------------------ QR code */

[data-tool="qr"] .tool-meta [data-limits],
[data-tool="qr"] .dropzone,
[data-tool="qr"] #uploadAlert,
[data-tool="qr"] .actions,
[data-tool="qr"] #progressWrap,
[data-tool="qr"] #results,
[data-tool="qr"] .local-note,
[data-tool="qr"] > noscript {
  display: none !important;
}

.qr-tool {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 24px;
  align-items: start;
}

.qr-form {
  min-width: 0;
}

.qr-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.qr-field label {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.qr-field textarea,
.qr-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.qr-field textarea {
  min-height: 132px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.6;
}

.qr-field select {
  height: 42px;
  padding: 0 10px;
}

.qr-field textarea:focus,
.qr-field select:focus {
  outline: 2px solid rgba(29, 78, 216, 0.18);
  border-color: var(--primary);
}

.qr-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.qr-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.qr-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.qr-error {
  margin: 12px 0 0;
  padding: 9px 11px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12.5px;
  line-height: 1.55;
}

.qr-result {
  min-width: 0;
}

.qr-result-title {
  margin: 0 0 10px;
  font-size: 18px;
}

.qr-preview {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.qr-preview canvas {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
}

.qr-result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.qr-status {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.qr-code-card {
  min-width: 0;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}

.qr-code-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.qr-code-head h3 {
  font-size: 13.5px;
}

.qr-code-head span {
  color: var(--muted);
  font-size: 11.5px;
}

.qr-code {
  max-height: 180px;
  margin: 0;
  padding: 10px 12px;
  overflow: auto;
  border-radius: 8px;
  background: #0f172a;
  color: #dbeafe;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------- API/legal */

.api-subtitle {
  margin: 22px 0 8px;
  font-size: 15px;
}

.api-limit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.api-limit {
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.api-limit b {
  display: block;
  color: var(--primary);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.api-limit span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
}

.pro-card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, #eff6ff, #ffffff 65%);
}

.pro-copy h2 {
  margin: 6px 0 8px;
  font-size: 24px;
}

.pro-copy p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

.pro-form {
  min-width: 0;
  align-self: center;
}

.pro-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.pro-form-row {
  display: flex;
  gap: 8px;
}

.pro-form input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.pro-form input:focus {
  outline: 2px solid rgba(29, 78, 216, 0.18);
  border-color: var(--primary);
}

.pro-form .btn {
  flex: none;
  height: 44px;
}

.pro-hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.pro-status {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.pro-status.success {
  color: var(--ok);
}

.pro-status.error {
  color: #b91c1c;
}

.api-link-row {
  margin: 12px 0 0;
}

.pro-privacy {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.privacy-page {
  max-width: 820px;
  padding-bottom: 30px;
}

.privacy-updated {
  color: var(--muted);
  font-size: 12.5px;
}

.developer-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 22px 24px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.developer-band h2 {
  margin: 6px 0 4px;
  font-size: 22px;
}

.developer-band p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* --------------------------------------------------------------- how to */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.step-num {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.step b {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

.step p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

/* ---------------------------------------------------------------- prose */

.prose {
  max-width: 880px;
}

.prose h3 {
  margin: 26px 0 8px;
  font-size: 18px;
}

.prose h3:first-child {
  margin-top: 0;
}

.prose p {
  margin-bottom: 10px;
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.75;
}

.prose ul {
  margin: 8px 0 12px;
  padding-left: 20px;
  color: var(--text-2);
  font-size: 14.5px;
}

.prose li {
  margin: 4px 0;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  margin: 14px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table-wrap th,
.table-wrap td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table-wrap th {
  background: var(--surface-soft);
  font-weight: 700;
  white-space: nowrap;
}

.table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

.table-wrap tbody tr:nth-child(even) td {
  background: #fcfdff;
}

.reading-links {
  margin-top: 22px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 2;
}

.reading-sep {
  margin: 0 7px;
  color: var(--line-strong);
}

.link-more {
  flex: none;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  margin-top: 50px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 44px 0 30px;
}

.footer-brand .brand {
  margin-bottom: 10px;
}

.brand-footer .brand-mark {
  width: 30px;
  height: 30px;
  font-size: 16px;
}

.footer-brand p {
  max-width: 300px;
  color: var(--muted);
  font-size: 13.5px;
}

.footer-col h3 {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.footer-links a {
  color: var(--text-2);
}

.footer-links a:hover {
  color: var(--brand);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  padding-top: 18px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

/* ----------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 120;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 13.5px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.24);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .value-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .value-item {
    padding: 10px 8px;
  }

  .value-item + .value-item {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 26px;
  }

  .favicon-preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .favicon-code-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav {
    display: none;
  }

  .header-cta {
    display: inline-flex;
  }

  .hero {
    padding: 44px 0 36px;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 38px 0;
  }

  .page-head {
    padding-top: 10px;
  }

  .qr-tool {
    grid-template-columns: 1fr;
  }

  .pro-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .api-limit-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 0 16px;
  }

  .options.options-jpg {
    grid-template-columns: 1fr;
  }

  .favicon-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .favicon-panel-head {
    align-items: flex-start;
  }

  .favicon-code-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .pdf-file-row {
    gap: 7px;
    padding: 9px 8px;
  }

  .pdf-drag {
    display: none;
  }

  .pdf-order {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .pdf-row-actions {
    gap: 2px;
  }

  .pdf-row-actions .mini {
    width: 25px;
    height: 25px;
  }

  .qr-options {
    grid-template-columns: 1fr;
  }

  .qr-preview {
    min-height: 220px;
  }

  .pro-form-row {
    flex-direction: column;
  }

  .pro-form .btn {
    width: 100%;
  }

  .developer-band {
    align-items: flex-start;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-stats {
    gap: 8px 18px;
  }

  .search-panel {
    flex-direction: column;
    align-items: stretch;
    padding: 9px;
  }

  .search-field {
    padding: 0 6px;
  }

  .search-btn {
    width: 100%;
  }

  .tool-shell {
    padding: 16px;
    border-radius: 16px;
  }

  .dropzone {
    padding: 22px 12px;
  }

  .options {
    grid-template-columns: 1fr;
  }

  .file-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .file-right {
    justify-content: flex-start;
  }

  .file-name {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .error-text {
    max-width: 100%;
    text-align: left;
  }

  .privacy-band {
    flex-direction: column;
    padding: 20px;
  }

  .api-card {
    padding: 20px;
  }

  .endpoint {
    padding: 10px 12px;
  }

  .endpoint-note {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-top: 34px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .feature-card {
    padding: 20px;
  }
}

@media (max-width: 380px) {
  .brand-text {
    font-size: 16px;
  }

  .header-cta {
    padding: 0 11px;
    font-size: 13px;
  }

  .hero h1 {
    font-size: 1.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
