:root {
  /* Horizon / �ƺ� �� v1.1 */
  --mist: #f2f5f9;
  --foam: #d7e6f2;
  --altitude: #2b6cb0;
  --altitude-deep: #1e4f86;
  --ink: #152238;
  --graphite: #5a6678;
  --thread: #c44536;
  --ok: #2f8f6d;
  --danger: #c45c5c;

  --bg: var(--mist);
  --bg2: #e8eef6;
  --card: rgba(255, 255, 255, .52);
  --card-solid: rgba(255, 255, 255, .78);
  --glass: rgba(255, 255, 255, .58);
  --glass-strong: rgba(255, 255, 255, .82);
  --line: rgba(30, 79, 134, .16);
  --line-strong: rgba(30, 79, 134, .28);
  --text: var(--ink);
  --muted: var(--graphite);
  --accent: var(--altitude);
  --accent-soft: rgba(43, 108, 176, .12);
  --spider: var(--thread);
  --shadow: 0 14px 40px rgba(21, 34, 56, .1);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, .88);
  --radius: 14px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --font-display: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-latin: "Syne", "Segoe UI", sans-serif;
  --mono: "Cascadia Mono", Consolas, "Courier New", monospace;
  --header-h: 58px;
  --footer-h: 64px;
  --bg-art: none;
  --hero-art: none;
}

* { box-sizing: border-box; }
html { height: 100%; }
body {
  margin: 0; min-height: 100%;
  display: flex; flex-direction: column;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--altitude-deep); }
code { font-family: var(--mono); font-size: .92em; color: #3d4f68; }

.bg-mesh {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(43, 108, 176, .14), transparent 60%),
    radial-gradient(900px 480px at 92% 0%, rgba(126, 182, 217, .12), transparent 55%),
    linear-gradient(180deg, #f2f5f9 0%, #e8eef6 48%, #f2f5f9 100%);
}
.bg-mesh::before {
  content: "";
  position: absolute; inset: 0;
  background-image: var(--bg-art);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  opacity: .12;
  filter: saturate(.8) contrast(.92);
  pointer-events: none;
}
.bg-mesh::after {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 64px, rgba(30, 79, 134, .035) 65px),
    repeating-linear-gradient(90deg, transparent, transparent 64px, rgba(30, 79, 134, .035) 65px);
  mask-image: radial-gradient(ellipse at center, #000 16%, transparent 78%);
  opacity: .5;
}

#spidey-fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}
.site-header, .main, .site-footer { position: relative; z-index: 3; }

.main {
  flex: 1 0 auto;
  padding: 22px 0 28px;
}

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .7);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border-bottom: 1px solid rgba(255,255,255,.65);
  box-shadow: var(--glass-inset), 0 6px 22px rgba(40, 80, 140, .08);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 10px 0; flex-wrap: wrap; min-height: var(--header-h);
}
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); }
.logo-img {
  width: 36px; height: 36px; border-radius: 10px; object-fit: cover;
  border: 1px solid var(--line); background: rgba(255,255,255,.9);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.logo-text { font-weight: 700; letter-spacing: .2px; line-height: 1.15; font-size: 15px; font-family: var(--font-display); }
.logo-text small {
  display: block; font-weight: 700; font-size: 10px;
  letter-spacing: 1.6px; color: var(--muted); text-transform: uppercase;
  font-family: var(--font-latin);
}

.nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nav-link, .nav-dd-btn {
  color: var(--muted); padding: 7px 13px; border-radius: 999px;
  border: 1px solid transparent; font-size: 13px; background: transparent;
  cursor: pointer; font-family: inherit;
}
.nav-link:hover, .nav-link.on, .nav-dd-btn:hover, .nav-dd-btn.on {
  color: var(--ink);
  background: rgba(255, 255, 255, .72);
  border-color: var(--line);
  box-shadow: var(--glass-inset);
}
.nav-dd { position: relative; }
.nav-dd-btn { display: inline-flex; align-items: center; gap: 4px; }
.nav-dd-btn .caret { font-size: 10px; opacity: .7; }
.nav-dd-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 220px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow), var(--glass-inset); padding: 8px; z-index: 50;
}
.nav-dd.open .nav-dd-menu { display: block; }
.nav-dd-title {
  font-size: 11px; color: var(--muted); padding: 6px 10px 8px;
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.nav-dd-menu a {
  display: block; padding: 9px 10px; border-radius: 8px; color: var(--text);
}
.nav-dd-menu a:hover { background: var(--accent-soft); }
.nav-dd-menu a.on { background: var(--accent-soft); border: 1px solid rgba(61, 107, 179, .28); }
.nav-dd-menu a b { display: block; font-size: 13px; }
.nav-dd-menu a span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.nav-dd-menu-wide { min-width: 280px; max-height: 70vh; overflow: auto; }
.nav-dd-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--altitude);
  padding: 10px 10px 4px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
}
.nav-dd-menu .nav-dd-cat:first-of-type { border-top: 0; margin-top: 0; }

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: var(--glass-inset);
  color: var(--muted);
  font-size: 12px;
  padding: 18px 0 20px;
}
.footer-inner {
  text-align: center;
  line-height: 1.65;
}
.footer-inner p { margin: 0; }
.footer-meta { opacity: .9; }
.footer-copy { margin-top: 2px !important; }
.footer-icp { margin-top: 4px !important; }
.footer-icp a {
  color: var(--muted);
  text-decoration: none;
}
.footer-icp a:hover {
  color: var(--altitude-deep);
  text-decoration: underline;
}

/* Hero �� horizon signature */
.hero {
  position: relative;
  min-height: 200px;
  margin-bottom: 28px;
  padding: 36px 32px 34px;
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, .72);
  background:
    linear-gradient(160deg, rgba(255,255,255,.62), rgba(215, 230, 242, .28));
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  box-shadow:
    0 18px 44px rgba(21, 34, 56, .1),
    inset 0 1px 0 rgba(255, 255, 255, .9);
}
.hero-mark {
  position: absolute;
  right: 4%;
  top: 42%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(120px, 18vw, 220px);
  font-weight: 700;
  color: rgba(43, 108, 176, .07);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.hero-media,
.hero-shade { display: none; }
.hero-panel {
  position: relative;
  z-index: 2;
  max-width: min(640px, 100%);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.hero-kicker {
  margin: 0 0 12px;
  font-family: var(--font-latin);
  font-size: 12px;
  color: var(--altitude);
  letter-spacing: 2.4px;
  text-transform: uppercase;
  font-weight: 700;
}
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.5vw, 44px);
  letter-spacing: .02em;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
}
.hero-horizon {
  position: relative;
  height: 1px;
  margin: 18px 0 16px;
  max-width: 280px;
  background: linear-gradient(90deg, var(--altitude), rgba(43,108,176,.15) 70%, transparent);
}
.hero-horizon-dot {
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: var(--thread);
  box-shadow: 0 0 0 3px rgba(196, 69, 54, .15);
}
.hero .slogan {
  margin: 0;
  color: var(--graphite);
  font-size: 16px;
  letter-spacing: .35px;
  font-family: var(--font-display);
}

.section-title {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin: 4px 0 16px; flex-wrap: wrap;
}
.section-title h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--ink);
  padding: 0;
  border: 0;
  background: none;
  backdrop-filter: none;
  font-family: var(--font-display);
}
.section-title p { margin: 0; color: var(--muted); font-size: 13px; }

.minibox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 720px) {
  .minibox-grid { grid-template-columns: 1fr; }
}
.minibox {
  display: block; position: relative;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.7);
  background: linear-gradient(165deg, rgba(255,255,255,.55), rgba(255,255,255,.22));
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  padding: 20px 18px 18px 22px;
  box-shadow:
    0 12px 30px rgba(21, 34, 56, .08),
    inset 0 1px 0 rgba(255,255,255,.88);
  color: var(--text);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  min-height: 156px;
  overflow: hidden;
}
.minibox::after {
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--altitude), rgba(43,108,176,.2));
}
.minibox::before {
  content: none;
}
.minibox:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.92);
  box-shadow:
    0 18px 40px rgba(21, 34, 56, .12),
    inset 0 1px 0 rgba(255,255,255,.95);
  color: var(--text);
}
.minibox .ico {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 700; margin-bottom: 14px;
  font-family: var(--font-display);
  color: var(--altitude-deep);
  background: rgba(43, 108, 176, .1);
  border: 1px solid rgba(43, 108, 176, .16);
  box-shadow: none;
}
.minibox h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-family: var(--font-display);
  font-weight: 700;
}
.minibox p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.minibox .go {
  margin-top: 16px; display: inline-flex; font-size: 13px;
  color: var(--altitude); font-weight: 700;
  font-family: var(--font-latin);
  letter-spacing: .02em;
}
.minibox .badge {
  position: absolute; top: 14px; right: 14px;
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
  background: rgba(255,255,255,.5); color: var(--graphite);
  border: 1px solid rgba(255,255,255,.7);
  backdrop-filter: blur(8px);
  font-family: var(--font-latin);
}

.card {
  border: 1px solid rgba(255,255,255,.7);
  background: linear-gradient(165deg, rgba(255,255,255,.55), rgba(255,255,255,.24));
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border-radius: 16px;
  box-shadow:
    0 14px 34px rgba(21, 34, 56, .09),
    inset 0 1px 0 rgba(255,255,255,.88);
  padding: 16px;
  margin-bottom: 14px;
}
.card-hd {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
}
.card-hd h2 {
  margin: 0; font-size: 16px;
  font-family: var(--font-display); font-weight: 700;
}
.card-hd .sub { color: var(--muted); font-size: 12px; }

.page-head { margin-bottom: 18px; }
.page-head h1 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 28px);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink);
}
.page-head p { margin: 0; color: var(--muted); font-size: 14px; }

.btn {
  border: 1px solid rgba(30, 79, 134, .35);
  background: linear-gradient(180deg, #3d7fc4, var(--altitude));
  color: #fff; border-radius: 10px;
  padding: 8px 13px; cursor: pointer; font-size: 13px;
  box-shadow: 0 6px 16px rgba(43, 108, 176, .22);
  font-family: inherit;
}
.btn:hover { filter: brightness(1.05); }
.btn:focus-visible {
  outline: 2px solid var(--altitude);
  outline-offset: 2px;
}
.btn.ghost {
  background: rgba(255, 255, 255, .82); border-color: var(--line); color: var(--text);
  box-shadow: none;
}
.btn.ghost:hover { background: #fff; }
.btn.danger {
  background: rgba(255, 255, 255, .82); border-color: #e2bcbc; color: var(--danger);
  box-shadow: none;
}

/* Motion �� horizon breathe + staggered tiles */
@keyframes horizon-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes mark-drift {
  from { opacity: 0; transform: translateY(-46%) translateX(12px); }
  to { opacity: 1; transform: translateY(-50%) translateX(0); }
}
.hero-panel { animation: horizon-in .55s ease both; }
.hero-mark { animation: mark-drift .8s ease .12s both; }
.minibox {
  animation: horizon-in .5s ease both;
}
.minibox:nth-child(1) { animation-delay: .08s; }
.minibox:nth-child(2) { animation-delay: .14s; }
.minibox:nth-child(3) { animation-delay: .2s; }
.minibox:nth-child(4) { animation-delay: .26s; }
@media (prefers-reduced-motion: reduce) {
  .hero-panel, .hero-mark, .minibox { animation: none; }
  .minibox:hover { transform: none; }
}

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.toolbar input[type="search"], .toolbar input[type="text"] {
  flex: 1; min-width: 180px;
  background: rgba(255, 255, 255, .85); border: 1px solid var(--line);
  color: var(--text); border-radius: 10px; padding: 9px 12px; outline: none;
}
.toolbar input:focus { border-color: #9eb0c8; box-shadow: 0 0 0 3px rgba(61, 107, 179, .14); }
.check { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* Converter */
.convert-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: start;
}
.convert-grid.is-stack {
  grid-template-columns: 1fr;
}
.convert-grid.is-stack .convert-actions {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  padding: 4px 0;
}
@media (max-width: 900px) {
  .convert-grid { grid-template-columns: 1fr; }
  .convert-actions { flex-direction: row !important; justify-content: center; }
}
.pane {
  border: 1px dashed var(--line-strong);
  border-radius: 12px; background: rgba(244, 245, 247, .65);
  display: flex; flex-direction: column;
  min-width: 0;
  transition: border-color .15s ease, background .15s ease;
}
.pane.dragover {
  border-color: var(--accent);
  background: rgba(238, 243, 249, .9);
}
.pane-hd {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 12px;
}
.pane-hd b { color: var(--text); font-size: 13px; }
.pane textarea {
  display: block;
  width: 100%;
  min-width: 180px;
  min-height: 260px;
  height: 300px;
  max-width: 100%;
  resize: both;
  border: 0; outline: none; background: rgba(255, 255, 255, .92);
  color: var(--text); padding: 12px;
  font-family: var(--mono); font-size: 13px; line-height: 1.5;
  border-radius: 0 0 12px 12px;
}
.convert-actions {
  display: flex; flex-direction: column; gap: 8px;
  justify-content: flex-start; align-items: stretch;
  padding-top: 36px; min-width: 120px;
}
.hint { color: var(--muted); font-size: 12px; margin: 10px 0 0; line-height: 1.55; }

/* Palette board */
.board-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(260px, .95fr);
  gap: 16px;
}
@media (max-width: 920px) { .board-layout { grid-template-columns: 1fr; } }
.board {
  background: rgba(240, 242, 245, .7);
  border-radius: 16px; padding: 14px;
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.board-title {
  display: flex; justify-content: space-between; align-items: center;
  color: var(--muted); font-size: 12px; margin-bottom: 10px;
}
.board-title b { color: var(--text); font-size: 13px; letter-spacing: .3px; }
.sv-wrap {
  position: relative; width: 100%; aspect-ratio: 1.25 / 1;
  border-radius: 12px; overflow: hidden; cursor: crosshair;
  border: 1px solid var(--line);
  touch-action: none; user-select: none;
}
#svCanvas { display: block; width: 100%; height: 100%; }
.sv-cursor {
  position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border: 2px solid #fff; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.2);
  pointer-events: none;
}
.hue-wrap {
  position: relative; margin-top: 12px; height: 16px;
  border-radius: 999px; overflow: hidden; cursor: pointer; touch-action: none;
  border: 1px solid var(--line);
}
#hueCanvas { display: block; width: 100%; height: 100%; }
.hue-cursor {
  position: absolute; top: 50%; width: 12px; height: 20px; margin: -10px 0 0 -6px;
  border-radius: 4px; border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.3); pointer-events: none;
}
.board-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.hex-field {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 160px;
  background: rgba(255, 255, 255, .88); border: 1px solid var(--line);
  border-radius: 10px; padding: 6px 10px 6px 8px;
}
.live-sw {
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid var(--line); flex-shrink: 0;
}
.hex-field input {
  flex: 1; border: 0; outline: none; background: transparent;
  color: var(--text); font-family: var(--mono); font-size: 14px;
}
.side-panel { display: flex; flex-direction: column; gap: 12px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmp {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: rgba(255, 255, 255, .85); cursor: pointer;
}
.cmp .sw { height: 72px; }
.cmp .meta { padding: 10px 12px; font-size: 12px; color: var(--muted); }
.cmp .meta b { display: block; color: var(--text); margin-bottom: 3px; font-size: 13px; }
.result {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  background: rgba(247, 248, 250, .75);
}
.result .big {
  height: 84px; border-radius: 10px; margin-bottom: 10px;
  border: 1px solid var(--line);
}
.kv {
  display: grid; grid-template-columns: 72px 1fr auto;
  gap: 8px; align-items: center; margin: 7px 0;
}
.kv label { color: var(--muted); font-size: 12px; }
.kv code {
  background: rgba(255, 255, 255, .9); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.copy {
  border: 0; background: var(--accent); color: #fff; border-radius: 8px;
  padding: 7px 11px; cursor: pointer; font-size: 12px;
}
.copy:hover { background: #2f5694; }

.grid {
  display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 4px;
}
.cell {
  aspect-ratio: 1; border-radius: 6px; border: 1px solid rgba(0,0,0,.08);
  cursor: pointer; position: relative; outline: none; padding: 0;
}
.cell:hover { transform: scale(1.08); z-index: 2; box-shadow: 0 4px 10px rgba(0,0,0,.14); }
.cell.active { outline: 2px solid #2a3038; outline-offset: 1px; z-index: 3; }
.cell .idx {
  display: none; position: absolute; inset: 0;
  align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.7);
  background: rgba(0,0,0,.2); border-radius: 6px;
}
.show-idx .cell .idx { display: flex; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 80;
  transform: translateX(-50%) translateY(20px);
  background: #2f3640; color: #fff; padding: 10px 16px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: .2s ease; font-size: 13px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Recommend */
.sticky-tools { position: sticky; top: 58px; z-index: 25; }
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.cat-tab {
  color: var(--muted); font-size: 12px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 10px; background: rgba(255, 255, 255, .8);
}
.cat-tab:hover { color: var(--text); border-color: rgba(61, 107, 179, .35); }
.rec-section { scroll-margin-top: 140px; }
.rec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 12px;
}
.rec-item {
  display: block; width: 100%; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: rgba(255, 255, 255, .88); color: var(--text); cursor: pointer;
  padding: 0; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.rec-item:hover {
  transform: translateY(-2px);
  border-color: rgba(61, 107, 179, .35);
  box-shadow: 0 8px 18px rgba(40,48,64,.1);
}
.rec-block {
  height: 92px; display: flex; align-items: flex-end; justify-content: flex-end;
  padding: 8px;
}
.rec-hex-tag {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.45);
  background: rgba(0,0,0,.28); border-radius: 999px; padding: 3px 8px;
}
.rec-block.light .rec-hex-tag {
  color: #222; text-shadow: none; background: rgba(255,255,255,.72);
}
.rec-info { padding: 10px 12px 12px; }
.rec-name { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.rec-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px;
}
.rec-row .hex { color: var(--accent); }
.rec-row .idx { color: var(--muted); }

.recommend-dock {
  position: sticky; bottom: 12px; z-index: 26;
  display: grid; grid-template-columns: 64px 1fr auto;
  gap: 12px; align-items: center;
  margin-bottom: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow), var(--glass-inset);
}
.dock-sw {
  width: 64px; height: 64px; border-radius: 12px;
  border: 1px solid var(--line);
}
.dock-meta { min-width: 0; }
.dock-meta b { display: block; font-size: 15px; margin-bottom: 2px; }
.dock-meta span {
  display: block; font-size: 12px; color: var(--muted);
  font-family: var(--mono); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.dock-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 720px) {
  .recommend-dock { grid-template-columns: 52px 1fr; }
  .dock-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Coord adjust tool */
.coord-layout {
  display: grid;
  grid-template-columns: 1.45fr .7fr;
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .coord-layout { grid-template-columns: 1fr; }
}
.coord-editor {
  display: flex;
  flex-direction: column;
  min-height: 840px;
  position: relative;
}
.coord-hl-wrap {
  position: relative;
  flex: 1;
  min-height: 840px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, .94);
}
.coord-hl-wrap:focus-within {
  border-color: rgba(47, 111, 214, .45);
  box-shadow: 0 0 0 3px rgba(47, 111, 214, .14);
}
.coord-highlight {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 12px;
  overflow: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  color: transparent;
  pointer-events: none;
  z-index: 0;
}
.coord-highlight mark.coord-mark {
  color: transparent;
  background: rgba(255, 46, 99, .62);
  border-radius: 3px;
  box-shadow:
    0 0 0 1px rgba(255, 46, 99, .95),
    inset 0 -2px 0 #ff2e63;
}
.coord-editor textarea {
  position: relative;
  z-index: 1;
  flex: none;
  display: block;
  width: 100%;
  height: 1040px;
  min-height: 840px;
  resize: vertical;
  border: 0;
  border-radius: 12px;
  outline: none;
  background: transparent;
  color: var(--text);
  caret-color: var(--text);
  padding: 12px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.coord-ops {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.coord-status {
  font-size: 13px;
  color: var(--text);
  line-height: 1.55;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(247, 248, 250, .7);
  border: 1px solid var(--line);
  min-height: 52px;
}
.coord-ops .check { margin: 0; }
.coord-ops .offset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.coord-ops .offset-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.coord-ops .offset-row input[type="number"] {
  width: 88px;
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
}
.coord-ops .offset-row input[type="number"]:focus {
  border-color: rgba(61, 107, 179, .45);
  box-shadow: 0 0 0 3px rgba(61, 107, 179, .14);
}
.coord-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.coord-tip {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

/* Tips generator */
.tips-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
  margin-bottom: 12px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .tips-layout { grid-template-columns: 1fr; }
}
.tips-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
}
.tips-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tips-col textarea,
.tips-out,
#tipsExplain {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.92);
  color: var(--text);
  outline: none;
}
#tipsNames {
  flex: 1 1 auto;
  min-height: 280px;
  max-height: 70vh;
  resize: vertical;
}
.tips-out { min-height: 280px; }
#tipsExplain { min-height: 180px; border: 0; background: transparent; }
.tips-opts input[type="text"],
.tips-opts select {
  display: block;
  width: 100%;
  margin-top: 4px;
  margin-bottom: 10px;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
  outline: none;
}
.tips-mode {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.tips-std {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}
.tips-std label {
  font-size: 12px;
  color: var(--muted);
}
.tips-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
#tipsRefs[disabled],
#tipsInline[disabled] {
  opacity: .55;
  background: rgba(240,244,250,.9);
}

/* Timing stats */
.timing-drop { cursor: pointer; min-height: 200px; }
.timing-drop textarea {
  width: 100%;
  min-height: 140px;
  border: 0;
  background: transparent;
  resize: vertical;
  font-family: var(--mono);
  font-size: 13px;
  padding: 8px 12px 12px;
  outline: none;
  color: var(--text);
}
.timing-filelist {
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
  color: var(--muted);
  font-size: 13px;
}
.timing-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(43, 108, 176, .1);
  border: 1px solid rgba(43, 108, 176, .2);
  color: var(--ink);
  font-size: 12px;
}
.timing-chip-x {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}
.timing-summary {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.6;
}
.timing-points {
  margin: 0;
  padding-left: 18px;
  color: var(--graphite);
  font-size: 13px;
  line-height: 1.7;
}
.timing-group { margin-bottom: 18px; }
.timing-group h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-family: var(--font-display);
}
.timing-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.7);
}
.timing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.timing-table th,
.timing-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.timing-table th {
  background: rgba(43, 108, 176, .08);
  font-weight: 650;
  color: var(--ink);
}
.timing-table tr:last-child td { border-bottom: 0; }
.timing-table code {
  color: var(--altitude-deep);
  font-size: 12px;
}

/* Tips XML -? JSON */
.tipsxml-drop textarea {
  width: 100%;
  min-height: 160px;
  border: 0;
  background: transparent;
  resize: vertical;
  font-family: var(--mono);
  font-size: 13px;
  padding: 8px 12px 12px;
  outline: none;
  color: var(--text);
}
.tipsxml-json {
  margin: 0;
  max-height: 520px;
  overflow: auto;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.88);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  cursor: pointer;
  color: var(--ink);
}
.tipsxml-json:hover {
  border-color: rgba(43, 108, 176, .45);
  box-shadow: 0 0 0 3px rgba(43, 108, 176, .12);
}

.cat-title { margin-top: 28px; }
.cat-title:first-of-type { margin-top: 4px; }

/* ���� ���ܹ���-? Bench ���� */
.bench-page { padding-bottom: 40px; }
.bench-hero {
  margin: 4px 0 22px;
  max-width: 640px;
}
.bench-kicker {
  margin: 0 0 8px;
  font-family: var(--font-latin);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--altitude);
}
.bench-hero h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .02em;
}
.bench-lead {
  margin: 0;
  color: var(--graphite);
  font-size: 15px;
  line-height: 1.55;
}
.bench-card {
  border: 1px solid rgba(255,255,255,.72);
  background: linear-gradient(165deg, rgba(255,255,255,.62), rgba(255,255,255,.28));
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(21, 34, 56, .08), inset 0 1px 0 rgba(255,255,255,.9);
  padding: 18px 18px 16px;
}
.bench-h {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.bench-calli-rail .bench-h { margin-top: 16px; }
.bench-calli-rail .bench-h:first-child { margin-top: 0; }
.bench-status {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-latin);
}
.bench-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}
.bench-result-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.bench-result-hd .bench-h { margin: 0; }
.bench-empty {
  margin: 28px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.bench-split {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 16px;
  align-items: stretch;
}
.bench-split[hidden],
.bench-split-wide[hidden] {
  display: none !important;
}
.bench-split-wide {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  min-height: min(72vh, 820px);
}
.bench-split-wide > .bench-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.bench-split-wide > .bench-card:last-child {
  min-height: 420px;
}
@media (max-width: 900px) {
  .bench-split,
  .bench-split-wide { grid-template-columns: 1fr; min-height: 0; }
}
.bench-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.bench-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.bench-field-block { margin-bottom: 10px; }
.bench-field-block b {
  font-weight: 700;
  color: var(--altitude-deep);
  font-variant-numeric: tabular-nums;
}
.bench-field input[type="range"] {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  accent-color: var(--altitude, #2b6cb0);
}
.bench-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
}
.bench-progress-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(21,34,56,.08);
  overflow: hidden;
}
.bench-progress-bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #0ea5e9);
  transition: width .15s ease;
}
.bench-progress-txt {
  flex: 0 0 auto;
  min-width: 40px;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: var(--altitude-deep);
  font-variant-numeric: tabular-nums;
}
.bench-hd-btn {
  padding: 4px 10px !important;
  font-size: 12px !important;
  min-height: 0;
}
.bench-field input,
.bench-field select,
.bench-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.bench-field textarea { resize: vertical; min-height: 84px; font-family: var(--font-display); font-size: 18px; }
.bench-field input:focus,
.bench-field select:focus,
.bench-field textarea:focus {
  border-color: rgba(43,108,176,.45);
  box-shadow: 0 0 0 3px rgba(43,108,176,.12);
}

.bench-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.bench-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.bench-chip input { position: absolute; opacity: 0; pointer-events: none; }
.bench-chip span {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.7);
  font-family: var(--font-latin);
  font-size: 12px;
  font-weight: 700;
  color: var(--graphite);
  transition: .15s ease;
}
.bench-chip input:checked + span {
  background: rgba(43,108,176,.12);
  border-color: rgba(43,108,176,.35);
  color: var(--altitude-deep);
}
.bench-chip-block { margin-bottom: 8px; }

.bench-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.bench-mode {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  color: var(--graphite);
  font: inherit;
  font-family: var(--font-latin);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: .15s ease;
}
.bench-mode:hover { border-color: rgba(43,108,176,.4); color: var(--altitude-deep); }
.bench-mode.on {
  background: rgba(43,108,176,.14);
  border-color: rgba(43,108,176,.4);
  color: var(--altitude-deep);
  box-shadow: 0 0 0 3px rgba(43,108,176,.1);
}

.img-stage {
  flex: 1;
  min-height: 360px;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 16px;
  background: rgba(255,255,255,.55);
}
.img-stage .bench-empty {
  margin: 0;
  white-space: nowrap;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.img-stage img,
.img-stage canvas {
  max-width: 100%;
  max-height: min(68vh, 720px);
  display: block;
  border-radius: 8px;
}

/* GIF / 结果区空状态：无棋盘、无内嵌底，提示真正居中 */
.bench-result-body {
  flex: 1;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.bench-result-body > .bench-empty {
  margin: 0;
  white-space: nowrap;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bench-result-body > img {
  max-width: 100%;
  max-height: min(68vh, 720px);
  display: block;
  border-radius: 8px;
}
.bench-result-body.img-gallery:has(.img-card) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
  align-content: start;
  align-items: stretch;
  justify-content: stretch;
  padding: 4px 2px 8px;
  max-height: min(68vh, 760px);
}

.img-gallery {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
  align-content: start;
  min-height: 280px;
  max-height: min(68vh, 760px);
  overflow: auto;
  padding: 4px 2px 8px;
}
/* 空状态：flex 居中（比 grid 行高更稳） */
.img-gallery:not(:has(.img-card)) {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-template-columns: unset;
  align-content: unset;
  max-height: none;
}
.img-gallery .bench-empty {
  margin: 0;
  white-space: nowrap;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.img-gallery-layers {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}
.img-gallery-layers:not(:has(.img-card)) {
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-card {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.88);
  padding: 10px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: .15s ease;
  color: inherit;
  font: inherit;
}
.img-card:hover {
  border-color: rgba(43,108,176,.45);
  box-shadow: 0 10px 28px rgba(21,34,56,.1);
  transform: translateY(-1px);
}
.img-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 10px;
  background:
    linear-gradient(45deg, #e8eef6 25%, transparent 25%) 0 0 / 14px 14px,
    linear-gradient(-45deg, #e8eef6 25%, transparent 25%) 0 7px / 14px 14px,
    linear-gradient(45deg, transparent 75%, #e8eef6 75%) 7px -7px / 14px 14px,
    linear-gradient(-45deg, transparent 75%, #e8eef6 75%) -7px 0 / 14px 14px,
    #cfd6e0;
}
.img-card span {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.img-card em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}

.tga-preview-card {
  padding-bottom: 14px;
  /* 与 bench-split-wide 同高，图层多时在卡片内滚动，不向下撑开整页 */
  max-height: min(72vh, 820px);
  overflow: hidden;
}
.tga-preview-stack {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.tga-preview-pane {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.tga-preview-pane.is-on {
  display: flex;
}
.tga-composite-stage {
  flex: 1;
  min-height: 0;
  max-height: none;
  display: grid;
  place-items: center;
  overflow: auto;
}
.tga-composite-stage .bench-empty {
  margin: 0;
  white-space: nowrap;
  text-align: center;
}
.tga-layer-gallery {
  flex: 1;
  min-height: 0;
  /* 取消「无上限」；高度由右侧卡片约束，内部 overflow 滚动 */
  max-height: none;
  overflow: auto;
}
.tga-layers-pane:not(.has-layers) .tga-layer-gallery {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-template-columns: unset;
  align-content: unset;
}

.bench-mono-out {
  width: 100%;
  min-height: 360px;
  height: calc(100% - 28px);
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
  background: #152238;
  color: #d7e6f2;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  letter-spacing: .04em;
  resize: vertical;
  outline: none;
}
.bench-result-panel {
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.bench-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 220px;
  padding: 28px 20px;
  border-radius: 14px;
  border: 1.5px dashed rgba(30, 79, 134, .28);
  background:
    radial-gradient(600px 180px at 50% 0%, rgba(43,108,176,.1), transparent 70%),
    rgba(255,255,255,.45);
  cursor: pointer;
  text-align: center;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.bench-drop-sm { min-height: 140px; margin-bottom: 12px; }
.bench-drop:hover,
.bench-drop.is-drag {
  border-color: var(--altitude);
  background: rgba(43,108,176,.08);
  transform: translateY(-1px);
}
.bench-drop-mark {
  font-size: 28px;
  line-height: 1;
  color: var(--altitude);
  opacity: .85;
}
.bench-drop strong {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink);
  font-weight: 700;
}
.bench-drop em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.bench-cut { display: flex; flex-direction: column; gap: 16px; }
.cut-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 720px) {
  .cut-split { grid-template-columns: 1fr; }
}
.cut-fig { margin: 0; }
.cut-fig figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  font-family: var(--font-latin);
  letter-spacing: .04em;
}
.cut-frame {
  border-radius: 12px;
  border: 1px solid var(--line);
  min-height: 280px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(255,255,255,.65);
}
.cut-frame img {
  max-width: 100%;
  max-height: 440px;
  display: block;
}
.cut-checker {
  background-color: #cfd6e0;
  background-image:
    linear-gradient(45deg, #e8eef6 25%, transparent 25%),
    linear-gradient(-45deg, #e8eef6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8eef6 75%),
    linear-gradient(-45deg, transparent 75%, #e8eef6 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}

.cmp-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  min-height: 200px;
}
.cmp-tile {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.78);
  color: var(--text);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cmp-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(21,34,56,.1);
  color: var(--text);
}
.cmp-tile img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #d7e0ec;
}
.cmp-tile div { padding: 10px 12px 12px; }
.cmp-tile b { display: block; font-size: 13px; margin-bottom: 4px; word-break: break-all; }
.cmp-tile span { font-size: 11px; color: var(--muted); line-height: 1.45; }

.bench-calli {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 960px) {
  .bench-calli { grid-template-columns: 1fr; }
}
.bench-sliders {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}
.bench-slider {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.bench-slider b {
  color: var(--altitude);
  font-family: var(--mono);
  font-weight: 600;
}
.bench-slider input[type="range"] { width: 100%; }
.bench-color {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.bench-color input[type="color"] {
  width: 52px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.calli-stage {
  border-radius: 14px;
  border: 1px solid var(--line);
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
}
.calli-stage canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

.bench-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
}

.bench-anno {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .bench-anno { grid-template-columns: 1fr; }
}
.anno-viewport {
  border-radius: 12px;
  border: 1px solid var(--line);
  min-height: 360px;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 12px;
}
.anno-viewport canvas {
  max-width: 100%;
  height: auto;
  cursor: crosshair;
  display: block;
  background: #fff;
}

.qr-stage {
  min-height: 320px;
  display: grid;
  place-items: center;
  padding: 20px;
  border-radius: 12px;
  background: rgba(255,255,255,.55);
  border: 1px solid var(--line);
}
.qr-stage canvas {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(21,34,56,.1);
}
.qr-split { align-items: start; }
.qr-controls { max-height: calc(100vh - 160px); overflow: auto; }
.qr-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.qr-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.85);
  color: var(--text);
  font-size: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  cursor: pointer;
}
.qr-tab.on {
  background: rgba(43,108,176,.12);
  border-color: rgba(43,108,176,.4);
  color: var(--altitude);
  font-weight: 600;
}
.qr-pane { display: none; margin-bottom: 10px; }
.qr-pane.on { display: block; }
.qr-chips { margin-bottom: 10px; }
.qr-em {
  font-style: normal;
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
  margin-left: 6px;
}
.qr-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  margin-bottom: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: rgba(255,255,255,.6);
  cursor: pointer;
  color: var(--altitude);
  font-size: 13px;
  font-weight: 600;
}
.qr-upload:hover { border-color: rgba(43,108,176,.5); background: rgba(43,108,176,.06); }
.qr-mini { margin-bottom: 10px; }
.qr-actions { margin-top: 8px; }
.qr-gen { flex: 1; min-width: 140px; }
.qr-preview-card { position: sticky; top: 76px; }
.bench-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.bench-check input { margin-top: 3px; }

.stitch-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 8px;
  max-height: 360px;
  overflow: auto;
}
.stitch-item {
  display: grid;
  grid-template-columns: 28px 48px 1fr 28px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.82);
  cursor: grab;
}
.stitch-item.is-dragging { opacity: .55; }
.stitch-item.is-over { border-color: rgba(43,108,176,.55); background: rgba(43,108,176,.08); }
.stitch-handle {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: grab;
  padding: 4px 0;
}
.stitch-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #d7e0ec;
}
.stitch-meta { min-width: 0; }
.stitch-ord {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(43,108,176,.1);
  color: var(--altitude-deep);
  font-size: 12px;
  font-weight: 700;
}
.stitch-meta b {
  display: block;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stitch-meta span {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
}
.stitch-rm {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}
.stitch-rm:hover { color: #b33; background: rgba(180,40,40,.08); }

.grid-preview { min-height: 240px; padding: 8px; border-radius: 12px; }
.grid-board {
  display: grid;
  gap: 8px;
}
.grid-cell {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}
.grid-cell:hover { color: var(--text); box-shadow: 0 8px 20px rgba(21,34,56,.12); }
.grid-cell img { width: 100%; display: block; aspect-ratio: 1; object-fit: cover; }
.grid-cell span {
  position: absolute;
  left: 6px; bottom: 6px;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(21,34,56,.72);
  color: #fff;
  font-family: var(--font-latin);
}

.stitch-stage {
  min-height: 280px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 12px;
  overflow: auto;
  display: grid;
  place-items: center;
}
.stitch-stage canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

.wb-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: center;
  margin-bottom: 14px;
}
.wb-size { min-width: 160px; }
.wb-stage {
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}
.wb-stage canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
}

/* ���� DrawKit: annotate + whiteboard (top toolbar + big canvas) ���� */
.draw-page .draw-hero {
  margin-bottom: 14px;
}
.draw-shell {
  padding: 12px 14px 14px;
}
.draw-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(244,248,252,.88));
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset;
}
.draw-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.draw-group + .draw-group {
  padding-left: 10px;
  border-left: 1px solid rgba(21,34,56,.08);
}
.draw-tools {
  flex: 1 1 auto;
  min-width: 0;
}
.draw-tool {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.85);
  color: var(--text);
  font-size: 12px;
  line-height: 1;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
}
.draw-tool:hover {
  border-color: rgba(43,108,176,.35);
  color: var(--altitude);
}
.draw-tool.on {
  background: rgba(43,108,176,.12);
  border-color: rgba(43,108,176,.45);
  color: var(--altitude);
  font-weight: 600;
}
.draw-file {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.draw-file span {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(43,108,176,.1);
  color: var(--altitude);
  font-size: 12px;
  font-weight: 600;
}
.draw-file:hover span {
  border-color: rgba(43,108,176,.4);
}
.draw-meta {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.draw-color {
  display: inline-flex;
  align-items: center;
}
.draw-color input[type="color"] {
  width: 36px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.draw-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.draw-size input[type="range"] {
  width: 88px;
}
.draw-size b {
  min-width: 18px;
  font-family: var(--mono);
  color: var(--altitude);
}
.draw-stage {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--line);
  min-height: 420px;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 10px;
}
.draw-stage.is-drag {
  outline: 2px dashed rgba(43,108,176,.55);
  outline-offset: -4px;
}
.draw-stage-wb {
  background: #e8eef5;
  padding: 0;
  overflow: hidden;
}
.draw-stage canvas {
  display: block;
  max-width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
  box-shadow: 0 8px 28px rgba(21,34,56,.08);
}
.draw-stage-wb canvas {
  width: 100%;
  box-shadow: none;
}
.draw-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
}
.draw-tip {
  margin: 10px 2px 0;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 900px) {
  .draw-group + .draw-group {
    padding-left: 0;
    border-left: 0;
  }
  .draw-toolbar { gap: 8px; }
}

/* ���� Annotate v2 (FloGravity-inspired) ���� */
.anno-page .draw-hero { margin-bottom: 12px; }
.anno-shell { padding: 10px 12px 12px; }
.anno-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(241,246,252,.9));
  box-shadow: 0 1px 0 rgba(255,255,255,.75) inset;
}
.anno-bar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.anno-bar-sub {
  padding-top: 6px;
  border-top: 1px solid rgba(21,34,56,.06);
}
.anno-sep {
  width: 1px;
  height: 22px;
  background: rgba(21,34,56,.1);
  margin: 0 2px;
}
.anno-file { cursor: pointer; }
.anno-file span {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(43,108,176,.28);
  background: rgba(43,108,176,.1);
  color: var(--altitude);
  font-size: 12px;
  font-weight: 700;
}
.anno-meta {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.anno-tools { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.anno-tool {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #334155;
  cursor: pointer;
}
.anno-tool svg { width: 18px; height: 18px; display: block; }
.anno-tool:hover {
  background: rgba(43,108,176,.08);
  color: var(--altitude);
}
.anno-tool.on {
  background: rgba(43,108,176,.14);
  border-color: rgba(43,108,176,.4);
  color: var(--altitude);
}
.anno-palette { display: inline-flex; align-items: center; gap: 4px; }
.anno-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(21,34,56,.15);
  background: var(--sw, #ccc);
  cursor: pointer;
  padding: 0;
}
.anno-swatch.on {
  outline: 2px solid var(--altitude);
  outline-offset: 1px;
}
.anno-swatch-custom {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(45deg, #e11d48 25%, #f97316 0 50%, #22c55e 0 75%, #3b82f6 0);
}
.anno-swatch-custom input {
  position: absolute;
  inset: -4px;
  opacity: 0;
  cursor: pointer;
}
.anno-range {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}
.anno-range input[type="range"] { width: 72px; }
.anno-range b {
  min-width: 16px;
  font-family: var(--mono);
  color: var(--altitude);
}
.anno-textbg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}
.anno-textbg input[type="color"] {
  width: 24px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.anno-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text);
}
.anno-wm-text {
  width: 140px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  font-size: 12px;
  background: #fff;
}
.anno-hint {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}
.anno-act { padding: 7px 10px; font-size: 12px; }
.anno-stickers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px dashed rgba(43,108,176,.28);
  background: rgba(43,108,176,.04);
}
.anno-sticker {
  width: 52px;
  height: 52px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
.anno-sticker:hover {
  border-color: rgba(43,108,176,.45);
  transform: translateY(-1px);
}
.anno-sticker img { width: 100%; height: 100%; display: block; }
.anno-stage {
  min-height: 480px;
  max-height: min(72vh, 900px);
  align-items: start;
  justify-items: start;
  place-items: start;
  overflow: auto;
  background-color: #d8dee8;
}
.anno-stage canvas {
  max-width: none;
  width: auto;
  height: auto;
  margin: 0 auto;
}
.anno-stage .draw-empty {
  place-items: center;
}
.anno-text-editor {
  position: absolute;
  z-index: 5;
  min-width: 120px;
  min-height: 1.4em;
  padding: 4px 6px;
  border: 2px solid var(--altitude);
  border-radius: 6px;
  outline: none;
  resize: both;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(21,34,56,.18);
}
@media (max-width: 900px) {
  .anno-hint { display: none; }
  .anno-sep { display: none; }
}


/* Align tools (script / cfg) */
.align-drop {
  margin-bottom: 12px;
}
.align-drop textarea {
  tab-size: 8;
  -moz-tab-size: 8;
  font-family: Consolas, "Sarasa Mono SC", "Microsoft YaHei Mono", monospace;
  width: 100%;
  min-height: 320px;
  max-height: 70vh;
  border: 0;
  background: transparent;
  resize: vertical;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 12px 12px;
  color: var(--text);
  outline: none;
}
.align-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 0 0 8px;
}
.align-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: end;
}
.align-opts .tips-label {
  margin: 0;
  width: 118px;
}
.align-opts .tips-label select {
  display: block;
  width: 100%;
  margin-top: 4px;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
  outline: none;
}
.align-actions {
  margin: 0;
  margin-left: auto;
}
@media (max-width: 720px) {
  .align-toolbar { align-items: stretch; }
  .align-actions { margin-left: 0; width: 100%; }
}

/* ---- 访问统计报表 ---- */
.stats-page .page-head p { color: var(--muted); font-size: 14px; }
.stats-note { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.stats-note code {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(43, 108, 176, .08);
}
.stats-login-form { max-width: 360px; }
.stats-field { display: block; margin-bottom: 12px; }
.stats-field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.stats-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 18px;
  margin-bottom: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.7);
  background: linear-gradient(165deg, rgba(255,255,255,.55), rgba(255,255,255,.22));
}
.stats-toolbar-left { display: flex; flex-direction: column; gap: 12px; }
.stats-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.stats-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.stats-check input { accent-color: var(--altitude); }
.stats-region { display: flex; flex-wrap: wrap; gap: 6px; }
.stats-region-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.65);
  color: var(--text);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
}
.stats-region-btn.on {
  background: rgba(43, 108, 176, .14);
  border-color: rgba(43, 108, 176, .35);
  color: var(--altitude-deep);
  font-weight: 700;
}
.stats-range { display: flex; flex-wrap: wrap; gap: 8px; }
.stats-range-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.65);
  color: var(--text);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
}
.stats-range-btn.on {
  background: rgba(43, 108, 176, .14);
  border-color: rgba(43, 108, 176, .35);
  color: var(--altitude-deep);
  font-weight: 700;
}
.stats-toolbar-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.stats-day-pick span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.stats-day-pick input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  background: rgba(255,255,255,.9);
}
.stats-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stats-kpi {
  padding: 16px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.72);
  background: linear-gradient(165deg, rgba(255,255,255,.58), rgba(255,255,255,.24));
  box-shadow: 0 8px 22px rgba(21, 34, 56, .06);
}
.stats-kpi b {
  display: block;
  font-size: 22px;
  font-family: var(--font-display);
  color: var(--altitude-deep);
  margin-bottom: 4px;
}
.stats-kpi span { font-size: 12px; color: var(--muted); }
.stats-kpi-muted b { font-size: 15px; }
.stats-kpi-cn b { color: #1e6b4a; }
.stats-kpi-bot b { color: var(--graphite); font-size: 18px; }
.stats-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.7);
  color: var(--muted);
  white-space: nowrap;
}
.stats-tag-cn {
  color: #1e6b4a;
  background: rgba(47, 143, 109, .12);
  border-color: rgba(47, 143, 109, .28);
}
.stats-tag-over {
  color: #6b4a1e;
  background: rgba(196, 140, 69, .12);
  border-color: rgba(196, 140, 69, .28);
}
.stats-tag-local {
  color: var(--graphite);
}
.stats-tag-bot {
  color: #8a3b3b;
  background: rgba(196, 92, 92, .12);
  border-color: rgba(196, 92, 92, .28);
  margin-left: 4px;
}
.stats-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.stats-daily { display: flex; flex-direction: column; gap: 10px; }
.stats-daily-row { display: grid; gap: 6px; }
.stats-daily-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.stats-daily-day { font-weight: 700; color: var(--text); }
.stats-daily-num { color: var(--muted); }
.stats-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(43, 108, 176, .08);
  overflow: hidden;
}
.stats-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(43, 108, 176, .55), rgba(43, 108, 176, .9));
}
.stats-table-wrap { overflow: auto; }
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.stats-table th,
.stats-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(190, 210, 240, .45);
  vertical-align: top;
}
.stats-table th {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.stats-table td { color: var(--text); word-break: break-all; }
.stats-table-wide .stats-table { min-width: 960px; }
.stats-ua { cursor: help; }
.stats-empty { margin: 0; color: var(--muted); font-size: 13px; }
@media (max-width: 960px) {
  .stats-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid-2 { grid-template-columns: 1fr; }
}

/* ���� Item log analyzer (Horizon theme) ���� */
.itemlog-page .itemlog-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.itemlog-chip {
  position: relative;
  cursor: pointer;
  user-select: none;
}
.itemlog-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.itemlog-chip span {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  color: var(--muted);
  font-size: 13px;
  transition: .15s ease;
}
.itemlog-chip input:checked + span {
  color: var(--altitude-deep);
  border-color: rgba(43,108,176,.45);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(43,108,176,.1);
  font-weight: 600;
}
.itemlog-pane-block { margin-top: 2px; }
.itemlog-drop {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  min-height: 112px;
  margin: 0;
}
.itemlog-drop.drag,
.itemlog-drop.dragover {
  border-color: rgba(43,108,176,.45);
  box-shadow: 0 0 0 3px rgba(43,108,176,.12);
}
.itemlog-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  opacity: 0;
}
.itemlog-filehint {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px 14px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.45;
  word-break: break-all;
}
.itemlog-urlpane { margin-top: 4px; }
.itemlog-locked-tip {
  margin: 4px 0 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px dashed var(--line-strong);
  background: var(--accent-soft);
  color: var(--altitude-deep);
  font-size: 13px;
  line-height: 1.55;
}
.itemlog-analyze-body.is-locked {
  opacity: .48;
  pointer-events: none;
  user-select: none;
  filter: grayscale(.15);
}
.itemlog-analyze-body.is-locked .btn {
  filter: none;
}
.itemlog-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.itemlog-progress {
  height: 6px;
  background: rgba(30,79,134,.1);
  border-radius: 99px;
  margin-top: 12px;
  overflow: hidden;
}
.itemlog-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--altitude), #7eb6d9);
  transition: width .35s ease;
}
.itemlog-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px 14px;
  margin: 4px 0 12px;
}
.itemlog-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.itemlog-input,
.itemlog-field .itemlog-input,
#itemlogUrl.itemlog-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
#itemlogUrl.itemlog-input {
  min-height: 84px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 12px;
}
.itemlog-input:focus {
  border-color: rgba(43,108,176,.45);
  box-shadow: 0 0 0 3px rgba(43,108,176,.12);
}

.itemlog-filters .itemlog-input {
  text-align: center;
  text-align-last: center;
}
.itemlog-filters select.itemlog-input option {
  text-align: center;
}
#itemlogUrl.itemlog-input {
  text-align: left;
  text-align-last: auto;
}

.itemlog-warn {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(196,69,54,.25);
  background: rgba(196,69,54,.08);
  color: var(--thread);
  font-size: 13px;
}
.itemlog-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.itemlog-kpi-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card-solid);
  border: 1px solid var(--line);
  box-shadow: var(--glass-inset);
}
.itemlog-kpi-item b {
  display: block;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 4px;
  font-family: var(--font-latin);
}
.itemlog-kpi-item span {
  font-size: 12px;
  color: var(--muted);
}
.itemlog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}
.itemlog-panel {
  padding: 14px;
  border-radius: var(--radius);
  background: var(--card-solid);
  border: 1px solid var(--line);
  box-shadow: var(--glass-inset);
}
.itemlog-panel h3 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--ink);
}
.itemlog-panel-sub {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}
.itemlog-panel-wide { grid-column: 1 / -1; }
.itemlog-table-wrap {
  overflow: auto;
  max-height: 360px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.65);
}
.itemlog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.itemlog-table th,
.itemlog-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--text);
}
.itemlog-table th {
  color: var(--muted);
  font-weight: 600;
  position: sticky;
  top: 0;
  background: #eef3f8;
}
.itemlog-table tr:hover td { background: rgba(43,108,176,.05); }
@media (max-width: 900px) {
  .itemlog-grid { grid-template-columns: 1fr; }
}
