/* ---------- Design tokens ---------- */
:root {
  color-scheme: light;
  --bg: #f4f2ec;
  --surface: #fffdf8;
  --surface-2: #f8f5ee;
  --surface-3: #efebe2;
  --ink: #1b1c19;
  --ink-soft: #35362f;
  --muted: #74766e;
  --faint: #9a9c93;
  --line: #dedad0;
  --line-strong: #c9c5ba;
  --accent: #f05a28;
  --accent-ink: #d94a1c;
  --accent-soft: #ffe4d8;
  --inverse-bg: #181914;
  --inverse-ink: #f7f4ea;
  --inverse-muted: rgba(247, 244, 234, 0.58);
  --inverse-line: rgba(247, 244, 234, 0.15);
  --green: #1e7d5c;
  --blue: #2d68c4;
  --header-bg: rgba(244, 242, 236, 0.82);
  --shadow-sm: 0 1px 2px rgba(28, 28, 23, 0.04), 0 4px 14px rgba(28, 28, 23, 0.04);
  --shadow-md: 0 18px 50px rgba(28, 28, 23, 0.09), 0 3px 10px rgba(28, 28, 23, 0.04);
  --shadow-lg: 0 30px 80px rgba(28, 28, 23, 0.13);
  --dot: rgba(27, 28, 25, 0.11);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 15px;
  --radius-sm: 10px;
  --font-sans: "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, "Liberation Mono", monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11120f;
  --surface: #1a1b17;
  --surface-2: #20211c;
  --surface-3: #292a24;
  --ink: #f2f0e7;
  --ink-soft: #dcdbd1;
  --muted: #a3a59a;
  --faint: #7c7e74;
  --line: #34362e;
  --line-strong: #45473d;
  --accent: #ff7a47;
  --accent-ink: #ff8f62;
  --accent-soft: #3b2218;
  --inverse-bg: #20211b;
  --inverse-ink: #f7f4ea;
  --inverse-muted: rgba(247, 244, 234, 0.56);
  --inverse-line: rgba(247, 244, 234, 0.14);
  --green: #57c69c;
  --blue: #7aa7ed;
  --header-bg: rgba(17, 18, 15, 0.82);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2), 0 4px 14px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 18px 50px rgba(0, 0, 0, 0.35), 0 3px 10px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.5);
  --dot: rgba(242, 240, 231, 0.09);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(240, 90, 40, 0.10), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(45, 104, 196, 0.06), transparent 30%);
}

html[data-theme="dark"] body::before {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 122, 71, 0.08), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(122, 167, 237, 0.05), transparent 30%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: radial-gradient(var(--dot) 0.55px, transparent 0.55px);
  background-size: 17px 17px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 78%);
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

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

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
[hidden] { display: none !important; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.shell {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--radius-sm);
}

.brand-mark {
  width: 38px;
  height: 38px;
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  border-radius: 11px;
  background: var(--inverse-bg);
  box-shadow: 0 5px 14px rgba(27, 28, 25, 0.16);
  flex: 0 0 auto;
}

.brand-mark i {
  display: block;
  border-radius: 2px;
  background: var(--inverse-ink);
}

.brand-mark i:nth-child(1) { background: var(--accent); }
.brand-mark i:nth-child(4) { opacity: 0.45; }

.brand-text {
  display: flex;
  flex-direction: column;
  font-weight: 750;
  font-size: 16px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.brand-text small {
  margin-top: 2px;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.header-actions { display: flex; align-items: center; gap: 12px; }

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}

.privacy-pill svg { width: 15px; height: 15px; color: var(--green); }

/* 跨站入口：AI 导航 */
.site-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.site-link:hover { border-color: var(--accent); transform: translateY(-1px); }
.site-link svg { width: 15px; height: 15px; color: var(--accent); }

.footer-inner a { color: var(--muted); text-decoration: none; }
.footer-inner a:hover { color: var(--ink); }

.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover { transform: rotate(8deg); border-color: var(--line-strong); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

/* ---------- Shared text ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

.highlight {
  position: relative;
  white-space: nowrap;
  z-index: 0;
}

.highlight::after {
  content: "";
  position: absolute;
  left: -0.03em;
  right: -0.03em;
  bottom: 0.06em;
  height: 0.36em;
  border-radius: 3px;
  background: var(--accent);
  opacity: 0.22;
  z-index: -1;
  transform: rotate(-1.2deg);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(390px, 0.94fr);
  align-items: center;
  gap: 30px;
  padding: 76px 0 88px;
  min-height: 610px;
}

.hero-copy { position: relative; z-index: 2; }

.hero-copy .eyebrow { margin-bottom: 22px; }

.hero h1 {
  font-size: clamp(44px, 5.5vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.055em;
  font-weight: 800;
  margin-bottom: 24px;
}

.hero-sub {
  max-width: 560px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 30px;
}

.hero-search {
  width: min(100%, 590px);
  height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 19px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hero-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent), var(--shadow-sm);
  transform: translateY(-1px);
}

.hero-search svg { width: 20px; height: 20px; color: var(--faint); flex: 0 0 auto; }
.hero-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
}
.hero-search input::placeholder { color: var(--faint); }

.hero-search kbd, .shortcut-note kbd {
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
}

.quick-searches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 15px;
  font-size: 12px;
  color: var(--faint);
}

.quick-searches button {
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 5px 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  transition: all 0.18s ease;
}

.quick-searches button:hover {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
  transform: translateY(-1px);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 30px;
  font-size: 12px;
  color: var(--muted);
}

.hero-meta b { color: var(--ink); font-weight: 750; }
.meta-line { width: 1px; height: 13px; background: var(--line-strong); }

/* Hero art */
.hero-stage {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-stage::before {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 19%, transparent), transparent 68%);
  filter: blur(8px);
}

.stage-orbit {
  position: absolute;
  border: 1px dashed color-mix(in srgb, var(--line-strong) 65%, transparent);
  border-radius: 50%;
  animation: spin 30s linear infinite;
}

.orbit-one { width: 390px; height: 390px; }
.orbit-two { width: 500px; height: 500px; animation-direction: reverse; animation-duration: 42s; }

.mini-window {
  position: relative;
  width: 330px;
  background: var(--inverse-bg);
  color: var(--inverse-ink);
  border: 1px solid var(--inverse-line);
  border-radius: 24px;
  box-shadow: 0 34px 70px rgba(20, 20, 16, 0.3), 0 0 0 8px rgba(255, 255, 255, 0.035);
  transform: rotate(-2.5deg);
  overflow: hidden;
  z-index: 2;
  animation: float-slow 8s ease-in-out infinite;
}

.mini-bar {
  height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(247, 244, 234, 0.55);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.mini-dots { display: flex; gap: 4px; }
.mini-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.mini-dots i:first-child { background: var(--accent); }

.mini-body { padding: 22px 22px 24px; }
.mini-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: rgba(247, 244, 234, 0.42);
  text-transform: uppercase;
}
.mini-amount {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 25px;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.mini-rule {
  height: 1px;
  margin: 18px 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 0.14), transparent);
}
.mini-result {
  margin-top: 8px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #ff8a5b;
  line-height: 1.45;
}
.mini-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 18px;
  padding: 5px 9px;
  border-radius: 99px;
  background: rgba(255, 138, 91, 0.10);
  color: #ff9b73;
  font-size: 10px;
  font-weight: 600;
}
.mini-check svg { width: 12px; height: 12px; }

.float-card {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px 11px 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: var(--shadow-md);
  font-size: 11px;
  animation: float 7s ease-in-out infinite;
}

.float-card small {
  display: block;
  font-size: 9px;
  color: var(--faint);
  line-height: 1.3;
  letter-spacing: 0.04em;
}
.float-card b { display: block; font-size: 12px; font-weight: 750; line-height: 1.35; }

/* Hero links */
a.mini-window,
a.float-card {
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
a.mini-window:hover {
  border-color: rgba(255, 138, 91, 0.55);
  box-shadow: 0 40px 84px rgba(20, 20, 16, 0.38), 0 0 0 8px rgba(255, 255, 255, 0.05);
}
a.float-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: var(--shadow-lg);
}
a.mini-window:focus-visible,
a.float-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.float-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.float-icon svg { width: 17px; height: 17px; }
.float-icon-blue { color: #2d68c4; background: #e6effd; }
.float-icon-purple { color: #7752c9; background: #eee9fc; font-family: var(--font-mono); font-size: 12px; font-weight: 700; }
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #1ea672;
  box-shadow: 0 0 0 3px rgba(30, 166, 114, 0.13);
  margin-left: 4px;
}

.float-ip { top: 26px; right: -4px; animation-delay: -2s; }
.float-json { bottom: 54px; left: -12px; animation-delay: -4s; }
.float-local {
  right: 8px;
  bottom: 5px;
  padding: 9px 13px;
  border-radius: 99px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}
.float-local svg { width: 14px; height: 14px; color: var(--green); }

/* ---------- Tool library ---------- */
.tool-library { padding: 22px 0 70px; }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin-top: 8px;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.section-note {
  color: var(--faint);
  font-size: 13px;
  padding-bottom: 6px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  border-radius: 18px;
}

.filters {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }

.filter {
  flex: 0 0 auto;
  border: 0;
  border-radius: 11px;
  padding: 8px 13px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.filter:hover { background: var(--surface-2); color: var(--ink); }
.filter.is-active { background: var(--ink); color: var(--bg); }
.filter .count { opacity: 0.5; font-size: 10px; margin-left: 4px; }
.filter-fav { display: inline-flex; align-items: center; gap: 5px; }
.filter-fav svg { width: 13px; height: 13px; }

.result-count {
  padding-right: 9px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

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

.tool-card {
  --accent: var(--orange);
  position: relative;
  min-height: 205px;
  padding: 21px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.23s ease, border-color 0.23s ease, box-shadow 0.23s ease;
  animation: card-in 0.45s both;
  animation-delay: calc(var(--i, 0) * 32ms);
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: var(--shadow-md);
}

.tool-card:hover .card-open svg { transform: translateX(3px); }
.tool-card:hover .tool-icon { transform: rotate(-4deg) scale(1.04); }

.card-link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-link:focus-visible { outline-offset: -4px; }

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

.tool-icon {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  transition: transform 0.23s ease;
}
.tool-icon svg { width: 22px; height: 22px; }

.star-btn {
  position: relative;
  z-index: 2;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.star-btn svg { width: 16px; height: 16px; }
.star-btn:hover { background: var(--surface-2); color: var(--accent); transform: scale(1.08); }
.star-btn.is-fav { color: var(--accent); }
.star-btn.is-fav svg { fill: currentColor; }

.tool-card h3 {
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 750;
  margin-bottom: 7px;
}

.tool-card p {
  min-height: 42px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--faint);
  text-transform: uppercase;
}

.card-open {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.card-open svg { width: 13px; height: 13px; transition: transform 0.2s ease; }

.empty-state {
  padding: 70px 20px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 45%, transparent);
}
.empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--surface-2);
  color: var(--faint);
}
.empty-icon svg { width: 25px; height: 25px; }
.empty-state h3 { font-size: 18px; margin-bottom: 6px; }
.empty-state p { color: var(--muted); font-size: 13px; margin-bottom: 18px; }

/* ---------- Local strip ---------- */
.local-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 27px 30px;
  margin: 10px 0 80px;
  border-radius: var(--radius-xl);
  background: var(--inverse-bg);
  color: var(--inverse-ink);
  box-shadow: var(--shadow-md);
}

.local-strip-icon {
  width: 49px;
  height: 49px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}
.local-strip-icon svg { width: 24px; height: 24px; }
.local-strip h3 { font-size: 16px; margin-bottom: 3px; }
.local-strip p { color: var(--inverse-muted); font-size: 12.5px; line-height: 1.65; max-width: 740px; }
.local-strip a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: gap 0.2s ease;
}
.local-strip a:hover { gap: 9px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 35%, transparent);
  position: relative;
  z-index: 1;
}
.footer-inner {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--faint);
  font-size: 11.5px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 650; }
.brand-mark-sm { width: 29px; height: 29px; padding: 6px; gap: 2px; border-radius: 8px; }
.footer-inner p { color: var(--muted); }

/* ---------- Tool view shared ---------- */
.tool-view { padding: 38px 0 84px; min-height: calc(100vh - 250px); }

.tool-view-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  transition: color 0.18s ease, gap 0.18s ease;
}
.back-link:hover { color: var(--ink); gap: 6px; }
.back-link svg { width: 16px; height: 16px; }

.tool-category-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--faint);
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
}

.tool-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.tool-title-wrap { display: flex; align-items: flex-start; gap: 18px; min-width: 0; }

.tool-page-icon {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, transparent);
}
.tool-page-icon svg { width: 28px; height: 28px; }

.tool-page-head h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.045em;
  font-weight: 800;
  margin-bottom: 7px;
}
.tool-page-head p { color: var(--muted); font-size: 13.5px; max-width: 680px; }

.fav-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  transition: all 0.18s ease;
}
.fav-button svg { width: 15px; height: 15px; }
.fav-button:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.fav-button.is-fav { color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.fav-button.is-fav svg { fill: currentColor; }

.tool-content { display: flex; flex-direction: column; gap: 16px; }

.tool-view-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.shortcut-note { color: var(--faint); font-size: 11px; }

/* ---------- Panels & forms ---------- */
.panel {
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.panel + .panel { margin-top: 0; }
.panel-soft { background: var(--surface-2); box-shadow: none; }
.panel-dark { background: var(--ink); color: var(--bg); border-color: transparent; }

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.panel-head h2 { font-size: 17px; font-weight: 750; letter-spacing: -0.02em; }
.panel-head p { color: var(--muted); font-size: 12px; margin-top: 3px; }

.panel-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.two-col-wide { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); }

.field { display: flex; flex-direction: column; gap: 7px; }
.field + .field { margin-top: 18px; }
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-soft);
}
.field-label .optional { color: var(--faint); font-weight: 400; font-size: 10.5px; }

.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--ink);
  outline: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.input, .select { height: 47px; padding: 0 14px; font-size: 14px; }
.textarea {
  min-height: 170px;
  padding: 14px 15px;
  resize: vertical;
  line-height: 1.7;
  font-size: 13.5px;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }

.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent);
}

.input.mono, .textarea.mono, .select.mono { font-family: var(--font-mono); font-size: 13px; }
.input-lg { height: 54px; font-size: 16px; }
.textarea-sm { min-height: 120px; }
.textarea-lg { min-height: 220px; }

.input-prefix {
  position: relative;
  display: flex;
  align-items: center;
}
.input-prefix > span {
  position: absolute;
  left: 15px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 15px;
  pointer-events: none;
}
.input-prefix .input { padding-left: 34px; }

.select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 15px; height: 15px; }
.btn-sm { height: 35px; padding: 0 12px; font-size: 11.5px; border-radius: 9px; }
.btn-primary { background: var(--ink); color: var(--bg); box-shadow: 0 5px 16px rgba(27, 28, 25, 0.14); }
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-soft { background: var(--surface-2); border-color: var(--line); color: var(--ink-soft); }
.btn-soft:hover { background: var(--surface-3); border-color: var(--line-strong); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-icon { width: 39px; padding: 0; }

.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.btn-row-end { justify-content: flex-end; }

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.panel-actions .btn-row { min-width: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--muted);
  padding: 6px 11px;
  font-size: 11px;
  transition: all 0.16s ease;
}
.chip:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line-strong); }
.chip.active { background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }

.hint, .note {
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.7;
}
.hint { margin-top: 12px; }
.note-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 11px 13px;
  margin-top: 15px;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}
.note-box svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; color: var(--green); }
.note-box.warn svg { color: var(--accent); }

.error-text {
  margin-top: 10px;
  color: #c33c2b;
  font-size: 12px;
  line-height: 1.6;
}
html[data-theme="dark"] .error-text { color: #ff8d7c; }

/* segmented */
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.segmented button {
  border: 0;
  border-radius: 7px;
  padding: 6px 12px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  transition: all 0.16s ease;
}
.segmented button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* copy field */
.copy-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  overflow: hidden;
}
.copy-field input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 13px;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.copy-field .copy-btn {
  width: 46px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: background 0.16s ease, color 0.16s ease;
}
.copy-field .copy-btn:hover { background: var(--surface-3); color: var(--ink); }
.copy-btn svg { width: 15px; height: 15px; }
.copy-btn.copied { color: var(--green); }

.output-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  padding: 16px;
  min-height: 90px;
}
.output-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.output-value {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.65;
  word-break: break-all;
  white-space: pre-wrap;
}
.output-value.large { font-size: 18px; letter-spacing: 0.01em; }

.copy-icon-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--faint);
  display: grid;
  place-items: center;
  transition: all 0.16s ease;
}
.copy-icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.copy-icon-btn svg { width: 13px; height: 13px; }
.copy-icon-btn.copied { color: var(--green); }

/* ---------- RMB tool ---------- */
.rmb-wrap { max-width: 940px; margin: 0 auto; }
.rmb-input-row { display: flex; gap: 10px; }
.rmb-input-row .input-prefix { flex: 1; }

.rmb-result {
  margin-top: 22px;
  padding: 25px 27px;
  border: 1px dashed color-mix(in srgb, var(--accent) 36%, var(--line));
  border-radius: 17px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent 60%),
    var(--surface-2);
  position: relative;
}
.rmb-result .output-label { color: var(--accent); }
.rmb-output {
  font-size: clamp(23px, 3.3vw, 33px);
  font-weight: 750;
  letter-spacing: 0.04em;
  line-height: 1.5;
  word-break: break-all;
}
.rmb-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.rmb-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }

/* ---------- IP tool ---------- */
.ip-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 92% 0%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 38%),
    var(--inverse-bg);
  color: var(--inverse-ink);
  overflow: hidden;
  position: relative;
}
.ip-banner::after {
  content: "";
  position: absolute;
  right: 10%;
  bottom: -55px;
  width: 170px;
  height: 170px;
  border: 1px solid color-mix(in srgb, var(--inverse-ink) 9%, transparent);
  border-radius: 50%;
}
.ip-main-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--inverse-muted);
  text-transform: uppercase;
}
.ip-value {
  margin: 5px 0 6px;
  font-family: var(--font-mono);
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.2;
  word-break: break-all;
}
.ip-location { color: var(--inverse-muted); font-size: 13px; }
.ip-actions {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ip-refresh:disabled { opacity: 0.42; cursor: not-allowed; }

.ip-refresh {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 1px solid var(--inverse-line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--inverse-ink) 7%, transparent);
  color: var(--inverse-ink);
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}
.ip-refresh:hover { background: var(--accent); border-color: var(--accent); }
.ip-refresh svg { width: 19px; height: 19px; }
.ip-refresh.loading svg { animation: spin 1s linear infinite; }

.ip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.info-tile {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  min-width: 0;
}
.info-tile .info-label {
  display: block;
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.info-tile .info-value {
  display: block;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
  word-break: break-word;
}
.info-tile .info-value.mono { font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; }

.ip-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: 12px;
}
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---------- Timestamp ---------- */
.now-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.now-value {
  font-family: var(--font-mono);
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.now-sub { color: var(--faint); font-size: 11px; margin-top: 4px; }

.ts-result {
  margin-top: 14px;
  padding: 14px;
  min-height: 80px;
  background: var(--surface-2);
  border-radius: 12px;
  border: 1px solid var(--line);
}
.ts-result-value {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  word-break: break-all;
}
.ts-result-extra { color: var(--faint); font-size: 11px; margin-top: 4px; }

/* ---------- JSON / text editors ---------- */
.editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.editor-box { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.editor-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}
.editor-label span:last-child { color: var(--faint); font-family: var(--font-mono); font-size: 9px; font-weight: 400; }
.editor-box .textarea { min-height: 280px; }
textarea[readonly] { color: var(--ink-soft); }

/* ---------- Text stats ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}
.stat-card {
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}
.stat-value {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(22px, 2.5vw, 29px);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.2;
  color: var(--ink);
}
.stat-label { display: block; margin-top: 4px; color: var(--faint); font-size: 10px; }
.stat-card.accent .stat-value { color: var(--accent); }

/* ---------- Case convert ---------- */
.case-list { display: flex; flex-direction: column; gap: 1px; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--line); }
.case-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 15px;
  background: var(--surface);
  min-width: 0;
}
.case-name {
  flex: 0 0 130px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.case-value {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  word-break: break-all;
}
.case-row .copy-icon-btn { flex: 0 0 auto; }

/* ---------- Password ---------- */
.password-display {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  border-radius: 15px;
  background: var(--inverse-bg);
  color: var(--inverse-ink);
  min-height: 76px;
}
.password-value {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: clamp(18px, 3.3vw, 25px);
  font-weight: 600;
  letter-spacing: 0.04em;
  word-break: break-all;
  line-height: 1.4;
}
.password-actions { display: flex; gap: 7px; flex: 0 0 auto; }
.password-actions .btn { background: color-mix(in srgb, var(--inverse-ink) 10%, transparent); color: var(--inverse-ink); border-color: var(--inverse-line); }
.password-actions .btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.range-wrap { display: flex; align-items: center; gap: 15px; }
.range-wrap input[type="range"] {
  flex: 1;
  height: 4px;
  appearance: none;
  background: linear-gradient(to right, var(--accent) var(--range-progress, 25%), var(--line) var(--range-progress, 25%));
  border-radius: 99px;
  outline: none;
}
.range-wrap input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--ink);
  cursor: pointer;
}
.range-wrap input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--ink);
  cursor: pointer;
}
.range-value {
  flex: 0 0 52px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.checkbox-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  font-size: 12px;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.check-item:hover { border-color: var(--line-strong); background: var(--surface-2); }
.check-item input { width: 15px; height: 15px; accent-color: var(--accent); margin: 0; cursor: pointer; }

.strength { margin-top: 15px; }
.strength-head { display: flex; justify-content: space-between; color: var(--faint); font-size: 10.5px; margin-bottom: 6px; }
.strength-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; height: 4px; }
.strength-bar i { display: block; border-radius: 99px; background: var(--line); transition: background 0.2s ease; }
.strength-bar[data-level="1"] i:nth-child(1) { background: #d74936; }
.strength-bar[data-level="2"] i:nth-child(-n+2) { background: #d99522; }
.strength-bar[data-level="3"] i:nth-child(-n+3) { background: #8dab2f; }
.strength-bar[data-level="4"] i { background: #1e9b6b; }

/* ---------- Color ---------- */
.color-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: start; }
.color-preview {
  height: 210px;
  border-radius: 16px;
  border: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  padding: 14px;
  transition: background 0.15s ease;
  position: relative;
  overflow: hidden;
}
.color-preview span {
  position: relative;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.46);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.color-native {
  width: 100%;
  height: 45px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  margin-top: 10px;
}
.color-input-row { display: flex; gap: 8px; }
.color-input-row .input { flex: 1; min-width: 0; }
.color-values { display: flex; flex-direction: column; gap: 10px; }
.shades { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.shade {
  height: 46px;
  border: 0;
  border-radius: 9px;
  color: transparent;
  transition: transform 0.15s ease;
}
.shade:hover { transform: translateY(-2px); }
.shade:focus-visible { outline-offset: 1px; }

/* ---------- UUID ---------- */
.uuid-list { display: flex; flex-direction: column; gap: 7px; }
.uuid-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.uuid-row .idx { flex: 0 0 25px; color: var(--faint); font-size: 9.5px; }
.uuid-row .uuid-value { flex: 1; min-width: 0; word-break: break-all; }

/* ---------- Base convert ---------- */
.base-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.base-result { padding: 15px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); min-width: 0; }
.base-result .output-label { margin-bottom: 5px; }
.base-result .output-value { font-size: 14px; }

/* ---------- Toast ---------- */
.toast-stack {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  font-weight: 600;
  animation: toast-in 0.25s ease both;
  max-width: calc(100vw - 32px);
}
.toast svg { width: 14px; height: 14px; color: #62d3a4; flex: 0 0 auto; }
.toast.error svg { color: #ff8d7c; }
.toast.leaving { animation: toast-out 0.2s ease both; }

.noscript-warning {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 300;
  padding: 14px 18px;
  border-radius: 12px;
  background: #c33c2b;
  color: #fff;
  font-size: 13px;
  text-align: center;
}

/* ---------- Shared extras ---------- */
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }

.status-box {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.6;
}
.status-box svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 2px; }
.status-box.ok { background: color-mix(in srgb, #1e9b6b 9%, transparent); border-color: color-mix(in srgb, #1e9b6b 26%, var(--line)); }
.status-box.ok svg { color: #1e9b6b; }
.status-box.warn { background: color-mix(in srgb, #d99522 10%, transparent); border-color: color-mix(in srgb, #d99522 28%, var(--line)); }
.status-box.warn svg { color: #b7791f; }
.status-box.bad { background: color-mix(in srgb, #d74936 9%, transparent); border-color: color-mix(in srgb, #d74936 26%, var(--line)); }
.status-box.bad svg { color: #c33c2b; }

.code-block {
  margin: 0;
  padding: 14px 16px;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
}

.table-wrap {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: auto;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th, .data-table td {
  padding: 10px 13px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.data-table th {
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--surface-2);
  white-space: nowrap;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table td.mono { word-break: break-all; }

/* ---------- Regex ---------- */
.regex-preview {
  padding: 14px 16px;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}
.regex-preview mark {
  background: color-mix(in srgb, var(--accent) 24%, transparent);
  color: var(--ink);
  border-radius: 3px;
  padding: 0 1px;
}
.match-list { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.match-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  font-size: 12px;
}
.match-index { color: var(--faint); font-family: var(--font-mono); font-size: 10px; }
.match-value { font-family: var(--font-mono); font-size: 12px; color: var(--accent); word-break: break-all; }
.match-pos { color: var(--faint); font-size: 10.5px; }
.match-groups { color: var(--muted); font-size: 10.5px; }

/* ---------- Markdown ---------- */
.markdown-body {
  min-height: 420px;
  max-height: 620px;
  overflow: auto;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.78;
}
.markdown-body > *:first-child { margin-top: 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3,
.markdown-body h4, .markdown-body h5, .markdown-body h6 {
  margin: 22px 0 10px;
  color: var(--ink);
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.markdown-body h1 { font-size: 24px; }
.markdown-body h2 { font-size: 20px; }
.markdown-body h3 { font-size: 17px; }
.markdown-body h4 { font-size: 15px; }
.markdown-body p { margin: 10px 0; }
.markdown-body ul, .markdown-body ol { margin: 10px 0; padding-left: 22px; }
.markdown-body li { margin: 4px 0; }
.markdown-body blockquote {
  margin: 14px 0;
  padding: 8px 16px;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
}
.markdown-body blockquote p { margin: 4px 0; }
.markdown-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.markdown-body hr { margin: 20px 0; border: 0; border-top: 1px solid var(--line); }
.markdown-body code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-3);
  font-family: var(--font-mono);
  font-size: 12px;
}
.markdown-body pre.md-code {
  margin: 14px 0;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--inverse-bg);
  color: var(--inverse-ink);
  overflow: auto;
}
.markdown-body pre.md-code code { padding: 0; background: none; color: inherit; font-size: 12px; line-height: 1.7; }
.markdown-body img { max-width: 100%; border-radius: 8px; }

/* ---------- Text diff ---------- */
.diff-view {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: auto;
  max-height: 460px;
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.65;
}
.diff-line {
  display: grid;
  grid-template-columns: 46px 46px 22px minmax(0, 1fr);
  gap: 0;
  padding: 2px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  white-space: pre-wrap;
  word-break: break-word;
}
.diff-line:last-child { border-bottom: 0; }
.diff-no { color: var(--faint); text-align: right; padding-right: 8px; user-select: none; }
.diff-sign { text-align: center; color: var(--faint); user-select: none; }
.diff-text { padding-right: 12px; }
.diff-line.add { background: color-mix(in srgb, #1e9b6b 10%, transparent); }
.diff-line.add .diff-sign { color: #1e9b6b; }
.diff-line.del { background: color-mix(in srgb, #d74936 10%, transparent); }
.diff-line.del .diff-sign { color: #d74936; }
.diff-empty { color: var(--faint); font-style: italic; }

/* ---------- Date ---------- */
.date-offset-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) minmax(0, 0.8fr); gap: 8px; }

/* ---------- Unit ---------- */
.unit-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}
.unit-swap { height: 47px; width: 47px; align-self: end; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.result-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  min-width: 0;
}
.result-tile.active {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.result-tile-value { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--ink); word-break: break-all; }
.result-tile.active .result-tile-value { color: var(--accent); }
.result-tile-label { color: var(--faint); font-size: 10px; }

/* ---------- BMI ---------- */
.output-value.good { color: #1e9b6b; }
.output-value.warn { color: #c08518; }
.output-value.bad { color: #c33c2b; }
.bmi-scale {
  position: relative;
  height: 12px;
  margin: 26px 6px 0;
  border-radius: 99px;
  background: linear-gradient(to right, #7fb3d5 0 22%, #1e9b6b 22% 55%, #d99522 55% 78%, #d74936 78% 100%);
}
.bmi-marker {
  position: absolute;
  top: -7px;
  left: 0;
  width: 4px;
  height: 26px;
  border-radius: 99px;
  background: var(--ink);
  box-shadow: 0 0 0 3px var(--surface);
  transform: translateX(-50%);
  transition: left 0.2s ease;
}
.bmi-ticks {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 0.8fr;
  margin-top: 12px;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.5;
}
.bmi-ticks span:nth-child(2), .bmi-ticks span:nth-child(3), .bmi-ticks span:nth-child(4) { text-align: right; }

/* ---------- Image ---------- */
.img-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 24px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 16px;
  background: var(--surface-2);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.img-dropzone:hover, .img-dropzone.is-dragging {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface-2));
}
.img-drop-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 2px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--accent);
}
.img-drop-icon svg { width: 22px; height: 22px; }
.img-dropzone p { font-size: 13px; color: var(--ink-soft); }
.img-dropzone p b { color: var(--ink); }
.img-dropzone > span { font-size: 11.5px; }
.img-compare { margin-top: 16px; }
.img-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.img-pane-label { color: var(--faint); font-size: 10px; letter-spacing: 0.05em; }
.preview-img {
  display: block;
  max-width: 100%;
  max-height: 320px;
  margin: 0 auto;
  border-radius: 10px;
  object-fit: contain;
}

/* ---------- Video tools ---------- */
.video-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.video-player {
  display: block;
  width: 100%;
  max-height: 340px;
  border-radius: 10px;
  background: #000;
}

/* ---------- Progress ---------- */
.progress-track {
  height: 8px;
  border-radius: 99px;
  background: var(--surface-3);
  overflow: hidden;
}
.progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  transition: width 0.25s ease, background 0.25s ease;
}
.progress-track > span.good { background: #1e9b6b; }
.progress-track > span.warn { background: #d99522; }
.progress-track > span.bad { background: #c33c2b; }

/* ---------- Misc components ---------- */
.color-input {
  width: 100%;
  height: 42px;
  padding: 4px;
  cursor: pointer;
}
.status-code {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.issue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.issue-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}
.issue-list li svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; color: var(--faint); }
.issue-list li.is-ok svg { color: #1e9b6b; }
.issue-list li.is-bad svg { color: #c33c2b; }

/* ---------- World clock ---------- */
.clock-local {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--inverse-bg);
  color: var(--inverse-ink);
}
.clock-local-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--inverse-muted);
}
.clock-local b { font-family: var(--font-mono); font-size: 26px; font-weight: 700; letter-spacing: 0.02em; }
.clock-local #wcLocalMeta { margin-left: auto; font-size: 12px; color: var(--inverse-muted); }
.clock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.clock-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.clock-card.is-night { border-color: var(--line-strong); background: var(--surface-3); }
.clock-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.clock-card-head b { font-size: 14px; font-weight: 700; }
.clock-card-head small {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: var(--faint);
}
.clock-card-time {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.clock-card.is-night .clock-card-time { color: var(--muted); }
.clock-card-date { font-size: 11px; color: var(--muted); }
.clock-card-diff { margin-top: 2px; font-size: 11px; font-weight: 600; color: var(--accent); }
.clock-card-diff.same { color: var(--green); }

/* ---------- Countdown ---------- */
.countdown-display {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 18px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.countdown-unit b {
  font-family: var(--font-mono);
  font-size: clamp(26px, 5.2vw, 40px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.countdown-unit span { font-size: 11px; color: var(--faint); letter-spacing: 0.08em; }
.countdown-display.is-finished .countdown-unit b { color: var(--accent); }
.countdown-hint { margin-top: 14px; font-size: 12.5px; color: var(--muted); }

@media (max-width: 720px) {
  .clock-local b { font-size: 22px; }
  .clock-local #wcLocalMeta { margin-left: 0; width: 100%; }
  .clock-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .countdown-display { gap: 6px; }
  .countdown-unit { padding: 14px 4px; }
}

/* ---------- Stopwatch ---------- */
.stopwatch-display {
  margin-top: 8px;
  padding: 26px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--inverse-bg);
  color: var(--inverse-ink);
  font-family: var(--font-mono);
  font-size: clamp(38px, 8vw, 58px);
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

/* ---------- File hash ---------- */
.hash-row { display: flex; gap: 8px; align-items: stretch; }
.hash-row .input { flex: 1; min-width: 0; font-size: 12px; }
.hash-row .btn { flex: 0 0 auto; }

/* ---------- Color picker ---------- */
.color-history {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.color-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.color-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.color-card b { font-size: 13px; color: var(--ink); }
.color-swatch {
  display: block;
  height: 52px;
  border-radius: 9px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 6px;
}

/* ---------- Lucky draw ---------- */
.lucky-result {
  margin-top: 14px;
  min-height: 64px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.lucky-name {
  font-size: 18px;
  font-weight: 750;
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 99px;
  background: var(--accent-soft);
}

/* ---------- Dice ---------- */
.dice-result {
  margin-top: 16px;
  min-height: 64px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.dice-face {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: 17px;
  font-weight: 750;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ---------- Keyboard test ---------- */
.keyboard-stage {
  margin-top: 4px;
  min-height: 130px;
  display: grid;
  place-items: center;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  text-align: center;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.keyboard-stage:focus { border-color: var(--accent); }
.modifier-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mod-pill {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 650;
  color: var(--faint);
  transition: all 0.12s ease;
}
.mod-pill.is-on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

@media (max-width: 720px) {
  .hash-row { flex-direction: column; }
}

/* ---------- Motion ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes float-slow { 0%, 100% { transform: rotate(-2.5deg) translateY(0); } 50% { transform: rotate(-1.5deg) translateY(-9px); } }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px) scale(0.98); } }

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
  .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 58px 0 50px;
    min-height: 0;
  }
  .hero-copy { max-width: 720px; }
  .hero-stage { min-height: 440px; margin-top: 18px; }
  .hero h1 { font-size: clamp(42px, 8vw, 62px); }
  .ip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .device-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { align-items: flex-start; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .result-count { padding-left: 10px; }
  .local-strip { grid-template-columns: auto minmax(0, 1fr); }
  .local-strip a { grid-column: 2; }
  .editor-grid { grid-template-columns: 1fr; }
  .editor-box .textarea { min-height: 180px; }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { height: 68px; }
  .privacy-pill { display: none; }
  .hero { padding-top: 46px; }
  .hero-sub { font-size: 14.5px; }
  .hero-meta { gap: 10px; flex-wrap: wrap; }
  .hero-stage { min-height: 405px; transform: scale(0.9); margin-left: -5%; margin-right: -5%; }
  .float-ip { right: 0; }
  .float-json { left: 0; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-card { min-height: 196px; padding: 18px; }
  .tool-card p { font-size: 12px; }
  .footer-inner { flex-wrap: wrap; padding: 18px 0; gap: 8px; }
  .footer-inner p { order: 3; flex-basis: 100%; }
  .tool-page-head { flex-direction: column; gap: 16px; }
  .tool-title-wrap { gap: 13px; }
  .tool-page-icon { width: 48px; height: 48px; border-radius: 14px; }
  .tool-page-icon svg { width: 24px; height: 24px; }
  .fav-button { align-self: flex-start; }
  .panel { padding: 18px; border-radius: 18px; }
  .two-col, .two-col-wide { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .checkbox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .color-layout { grid-template-columns: 1fr; }
  .color-preview { height: 150px; }
  .base-results { grid-template-columns: 1fr; }
  .now-banner { flex-direction: column; align-items: flex-start; }
  .rmb-input-row { flex-direction: column; }
  .rmb-input-row .btn { width: 100%; }
  .case-name { flex-basis: 105px; }
  .ip-banner { padding: 22px; }
  .password-display { flex-wrap: wrap; }
  .password-actions { width: 100%; justify-content: flex-end; }
  .panel-head { flex-direction: column; gap: 8px; }
  .local-strip { padding: 22px; margin-bottom: 55px; }
  .unit-row { grid-template-columns: 1fr; }
  .markdown-body { min-height: 300px; max-height: 480px; }
  .diff-line { grid-template-columns: 34px 34px 18px minmax(0, 1fr); }
  .img-dropzone { padding: 28px 16px; }
}

@media (max-width: 520px) {
  .brand-text { font-size: 15px; }
  .hero h1 { font-size: 40px; }
  .hero-stage { min-height: 350px; transform: scale(0.78); margin: -25px -12%; }
  .mini-window { width: 310px; }
  .float-local { display: none; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 0; }
  .tool-card p { min-height: 0; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .device-grid, .ip-grid { grid-template-columns: 1fr 1fr; }
  .check-item { font-size: 11.5px; }
  .tool-page-head h1 { font-size: 29px; }
  .tool-view-top { margin-bottom: 24px; }
  .shortcut-note { display: none; }
  .uuid-row { font-size: 11px; }
  .case-name { flex-basis: 92px; font-size: 9px; }
  .case-value { font-size: 11.5px; }
  .local-strip { grid-template-columns: 1fr; }
  .local-strip a { grid-column: 1; }
  .date-offset-row { grid-template-columns: 1fr 1fr; }
  .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bmi-ticks { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
