/* ============================================================
   FUNBOX 玩盒 — Neo-Brutalism 新粗野主义
   奶白纸面 / 粗黑边框 / 硬阴影 / 撞色块 / 大字报排版
   （与 TOOLBENCH 工程面板、NEXUS 极光玻璃风完全不同）
   ============================================================ */

:root {
  --ink: #141414;
  --paper: #fff8e8;
  --card: #fffdf7;
  --yellow: #ffd400;
  --red: #ff4d2e;
  --blue: #2e6bff;
  --green: #12b35f;
  --purple: #8b5cf6;
  --pink: #ff5ea8;
  --cyan: #19c2d6;
  --orange: #ff7a1a;
  --line: 3px solid var(--ink);
  --line-2: 2px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --shadow-lg: 8px 8px 0 var(--ink);
  --sans: "Arial Black", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  --body-font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body-font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image: radial-gradient(rgba(20, 20, 20, .09) 1.4px, transparent 1.4px);
  background-size: 20px 20px;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
::selection { background: var(--yellow); color: var(--ink); }

/* ---------- 顶部跑马灯 ---------- */
.marquee {
  background: var(--ink); color: var(--yellow);
  border-bottom: 3px solid var(--ink);
  overflow: hidden; white-space: nowrap;
}
.marquee-track {
  display: inline-block;
  padding: 7px 0;
  font-family: var(--sans); font-weight: 900; font-size: 13px;
  letter-spacing: 1px;
  animation: marquee 26s linear infinite;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- 应用骨架：左栏 + 工作区 ---------- */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: calc(100vh - 38px); }

/* ---------- 侧栏 ---------- */
.sidebar {
  border-right: var(--line);
  background: var(--yellow);
  background-image: repeating-linear-gradient(-45deg, rgba(20,20,20,.05) 0 10px, transparent 10px 20px);
  padding: 24px 18px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.brand-mark {
  width: 46px; height: 46px; flex-shrink: 0;
  background: var(--ink); color: var(--yellow);
  font-family: var(--sans); font-weight: 900; font-size: 26px;
  display: grid; place-items: center;
  border: var(--line-2); box-shadow: var(--shadow-sm);
  transform: rotate(-4deg);
}
.brand-name {
  font-family: var(--sans); font-weight: 900; font-size: 21px; line-height: 1;
  letter-spacing: -.5px;
}
.brand-name em { font-style: normal; color: var(--red); }
.brand-name small {
  display: block; font-family: var(--body-font); font-size: 11.5px; font-weight: 800;
  margin-top: 5px; letter-spacing: 2px;
}
.side-note { font-size: 12px; font-weight: 700; margin: 0 0 16px; color: rgba(20,20,20,.72); }

.sidenav { display: flex; flex-direction: column; gap: 9px; flex: 1; }
.sidenav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: var(--card);
  border: var(--line-2); box-shadow: var(--shadow-sm);
  font-weight: 800; font-size: 13.5px;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.sidenav a .n {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  background: var(--ink); color: #fff; padding: 2px 6px;
}
.sidenav a .ico { font-size: 17px; }
.sidenav a:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); background: #fff; }
.sidenav a.active { background: var(--ink); color: var(--yellow); box-shadow: var(--shadow-sm); }
.sidenav a.active .n { background: var(--yellow); color: var(--ink); }

.side-foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.sticker {
  font-family: var(--sans); font-weight: 900; font-size: 11px;
  padding: 4px 10px; border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-2deg);
}
.sticker.yellow { background: var(--yellow); }
.sticker.pink { background: var(--pink); color: #fff; transform: rotate(2deg); }
.sticker.blue { background: var(--blue); color: #fff; }

/* ---------- 主工作区 ---------- */
.main { padding: 38px 44px 0; min-width: 0; display: flex; flex-direction: column; }
#app { flex: 1; }
.foot {
  margin-top: 56px;
  border-top: var(--line);
  padding: 16px 0;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; font-weight: 700;
}

/* ---------- 通用大字标题 ---------- */
.t-head { margin-bottom: 26px; }
.t-head .t-no {
  display: inline-block;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  background: var(--accent, var(--yellow)); color: var(--ink);
  border: var(--line-2); padding: 3px 10px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm); transform: rotate(-1.5deg);
}
.t-head h1 {
  margin: 0 0 8px;
  font-family: var(--sans); font-size: 38px; font-weight: 900;
  letter-spacing: -1px; line-height: 1.08;
}
.t-head h1 .hl {
  background: var(--accent, var(--yellow));
  padding: 0 8px; border: var(--line-2); box-shadow: var(--shadow-sm);
  display: inline-block; transform: rotate(-.8deg);
}
.t-head p { margin: 0; font-weight: 600; color: rgba(20,20,20,.7); font-size: 14.5px; }

/* ---------- 卡片 / 面板 ---------- */
.panel {
  background: var(--card);
  border: var(--line); box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 20px;
}
.panel-title {
  font-family: var(--sans); font-weight: 900; font-size: 15px;
  margin: 0 0 14px; display: flex; align-items: center; gap: 9px;
}
.panel-title::before {
  content: ""; width: 14px; height: 14px; background: var(--accent, var(--yellow));
  border: 2px solid var(--ink); display: inline-block;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

/* ---------- 表单控件：全部硬边黑框 ---------- */
label.fld { display: block; font-weight: 800; font-size: 13px; margin: 0 0 7px; }
.fld-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
input[type=text], input[type=number], input[type=search], input[type=password], select, textarea {
  width: 100%;
  padding: 11px 13px;
  font-family: inherit; font-size: 14px; color: var(--ink);
  background: #fff;
  border: var(--line-2); border-radius: 0;
  outline: none;
}
textarea { font-family: var(--mono); font-size: 13px; line-height: 1.7; resize: vertical; }
input:focus, select:focus, textarea:focus {
  box-shadow: var(--shadow-sm);
  transform: translate(-1px, -1px);
  border-color: var(--ink);
}
input[type=range] { width: 100%; accent-color: var(--ink); height: 26px; }
select {
  appearance: none; cursor: pointer; font-weight: 700;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23141414' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}

.check {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 13.5px; cursor: pointer;
  padding: 8px 12px; background: #fff; border: var(--line-2);
  user-select: none;
}
.check input { width: 17px; height: 17px; accent-color: var(--ink); }
.check.on { background: var(--accent, var(--yellow)); box-shadow: var(--shadow-sm); }

/* ---------- 按钮：按压位移 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  font-family: var(--sans); font-weight: 900; font-size: 14px;
  background: #fff; color: var(--ink);
  border: var(--line-2); box-shadow: var(--shadow-sm);
  cursor: pointer; transition: transform .1s, box-shadow .1s;
  white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn.primary { background: var(--accent, var(--yellow)); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.dark:hover { background: #2a2a2a; }
.btn.sm { padding: 7px 13px; font-size: 12.5px; box-shadow: 2px 2px 0 var(--ink); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: var(--shadow-sm); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- 数据展示块 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat {
  background: #fff; border: var(--line-2); box-shadow: var(--shadow-sm);
  padding: 14px 16px;
}
.stat b { font-family: var(--sans); font-size: 26px; font-weight: 900; display: block; line-height: 1.1; }
.stat span { font-size: 12px; font-weight: 700; color: rgba(20,20,20,.65); }
.stat.acc { background: var(--accent, var(--yellow)); }

.kv { font-family: var(--mono); font-size: 13px; }
.tag {
  display: inline-block; font-size: 11.5px; font-weight: 800;
  padding: 2px 9px; border: 2px solid var(--ink); background: #fff;
}

/* ---------- Toast（硬边贴纸风） ---------- */
.toast-wrap {
  position: fixed; bottom: 26px; left: 50%;
  transform: translate(-50%, 120%); z-index: 300;
  transition: transform .22s cubic-bezier(.2,1.4,.4,1);
}
.toast-wrap.show { transform: translate(-50%, 0); }
.toast {
  background: var(--ink); color: var(--yellow);
  font-weight: 800; font-size: 14px;
  padding: 13px 24px; border: var(--line-2); box-shadow: var(--shadow);
}

/* ============================================================
   首页
   ============================================================ */
.hero { padding: 18px 0 10px; }
.hero h1 {
  margin: 0 0 18px;
  font-family: var(--sans); font-weight: 900;
  font-size: clamp(40px, 6vw, 78px);
  line-height: .98; letter-spacing: -2.5px;
}
.hero h1 .row2 { display: block; }
.hero h1 .mark {
  background: var(--red); color: #fff;
  padding: 0 14px; display: inline-block;
  border: var(--line); box-shadow: var(--shadow);
  transform: rotate(-1.2deg);
}
.hero h1 .mark2 {
  background: var(--blue); color: #fff;
  padding: 0 14px; display: inline-block;
  border: var(--line); box-shadow: var(--shadow);
  transform: rotate(1deg);
}
.hero p.lead { font-size: 16.5px; font-weight: 600; max-width: 560px; margin: 0 0 22px; }
.hero-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 42px; }
.hero-meta .hm {
  font-weight: 800; font-size: 13.5px; padding: 8px 15px;
  background: #fff; border: var(--line-2); box-shadow: var(--shadow-sm);
}
.hero-meta .hm b { font-family: var(--sans); font-size: 17px; }

/* 磁贴网格：大小不一，每块撞色 */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.tile {
  position: relative;
  display: block;
  background: var(--tile, var(--yellow));
  border: var(--line); box-shadow: var(--shadow);
  padding: 22px 20px 18px;
  min-height: 172px;
  transition: transform .13s, box-shadow .13s;
  overflow: hidden;
}
.tile:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }
.tile:active { transform: translate(3px, 3px); box-shadow: 0 0 0; }
.tile.big { grid-column: span 2; min-height: 190px; }
.tile .t-num {
  font-family: var(--mono); font-weight: 700; font-size: 13px;
  background: var(--ink); color: #fff; padding: 3px 9px;
  display: inline-block; margin-bottom: 14px;
}
.tile .t-ico { font-size: 30px; display: block; margin-bottom: 8px; }
.tile h3 {
  margin: 0 0 6px; font-family: var(--sans); font-size: 21px; font-weight: 900;
  letter-spacing: -.3px;
}
.tile p { margin: 0; font-size: 13px; font-weight: 600; max-width: 320px; }
.tile .t-go {
  position: absolute; right: 16px; bottom: 14px;
  font-family: var(--sans); font-weight: 900; font-size: 13px;
  background: var(--ink); color: #fff; padding: 5px 12px;
}
.tile.on-dark h3, .tile.on-dark .t-num { color: var(--ink); }
.tile.on-dark .t-go { background: #fff; color: var(--ink); }

.howto { margin-top: 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: var(--line); box-shadow: var(--shadow); background: var(--card); }
.howto .h { padding: 20px 22px; font-weight: 600; font-size: 13.5px; border-right: var(--line-2); }
.howto .h:last-child { border-right: 0; }
.howto .h b { display: block; font-family: var(--sans); font-size: 15px; margin-bottom: 4px; }

/* ============================================================
   01 密码制造机
   ============================================================ */
.pw-stage { text-align: center; padding: 30px 20px; }
.pw-out {
  font-family: var(--mono); font-size: clamp(18px, 3vw, 28px); font-weight: 700;
  word-break: break-all; line-height: 1.4;
  background: #fff; border: var(--line-2); box-shadow: inset 3px 3px 0 rgba(20,20,20,.07);
  padding: 22px 18px; margin-bottom: 16px; min-height: 76px;
  display: flex; align-items: center; justify-content: center;
}
.strength { display: flex; gap: 7px; justify-content: center; margin: 4px 0 16px; }
.strength i {
  width: 46px; height: 14px; border: var(--line-2); background: #fff; display: inline-block;
}
.strength i.lv1 { background: var(--red); }
.strength i.lv2 { background: var(--orange); }
.strength i.lv3 { background: var(--yellow); }
.strength i.lv4 { background: var(--green); }
.pw-history { display: flex; flex-direction: column; gap: 8px; }
.pw-history .h-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: #fff; border: var(--line-2); padding: 8px 12px;
  font-family: var(--mono); font-size: 13px; cursor: pointer;
}
.pw-history .h-item:hover { background: var(--yellow); }
.pw-history .h-item span { color: rgba(20,20,20,.55); font-family: var(--body-font); font-size: 11.5px; font-weight: 700; }

/* ============================================================
   02 配色制造机
   ============================================================ */
.pal-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.swatch { border: var(--line); box-shadow: var(--shadow-sm); background: #fff; overflow: hidden; }
.swatch .sw-color { height: 96px; border-bottom: var(--line-2); cursor: pointer; position: relative; }
.swatch .sw-color.locked::after {
  content: "🔒"; position: absolute; top: 8px; right: 8px; font-size: 13px;
  background: #fff; border: 2px solid var(--ink); width: 26px; height: 26px;
  display: grid; place-items: center;
}
.swatch .sw-meta { padding: 8px 10px; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.swatch .sw-acts { display: flex; gap: 6px; padding: 0 8px 8px; }
.swatch .sw-acts button { flex: 1; font-size: 11px; font-weight: 800; padding: 5px 0; background: #fff; border: 2px solid var(--ink); cursor: pointer; }
.swatch .sw-acts button:hover { background: var(--yellow); }
.pal-preview { display: flex; height: 64px; border: var(--line); margin-top: 16px; box-shadow: var(--shadow-sm); }
.pal-preview i { flex: 1; border-right: 2px solid var(--ink); }
.pal-preview i:last-child { border-right: 0; }

/* ============================================================
   03 占位文工厂
   ============================================================ */
.lorem-out {
  min-height: 260px; white-space: pre-wrap;
  font-family: var(--body-font); font-size: 14.5px; line-height: 1.9;
  background: #fff; border: var(--line-2); padding: 18px; margin-top: 16px;
  box-shadow: inset 3px 3px 0 rgba(20,20,20,.06);
}
.seg { display: inline-flex; border: var(--line-2); box-shadow: var(--shadow-sm); }
.seg button {
  padding: 9px 18px; font-weight: 900; font-family: var(--sans); font-size: 13px;
  background: #fff; border: 0; cursor: pointer; border-right: var(--line-2);
}
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: var(--yellow); }

/* ============================================================
   04 Markdown 小笔记本
   ============================================================ */
.md-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: var(--line); box-shadow: var(--shadow); background: var(--card); }
.md-editor, .md-preview { min-height: 480px; }
.md-editor { border-right: var(--line); display: flex; flex-direction: column; }
.md-toolbar { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px; border-bottom: var(--line-2); background: var(--yellow); }
.md-toolbar button {
  font-family: var(--mono); font-weight: 700; font-size: 13px;
  background: #fff; border: 2px solid var(--ink); padding: 4px 10px; cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
}
.md-toolbar button:active { transform: translate(2px, 2px); box-shadow: 0 0 0; }
.md-editor textarea { border: 0; flex: 1; }
.md-editor textarea:focus { transform: none; box-shadow: none; }
.md-preview { padding: 20px 22px; overflow-wrap: break-word; background: #fff; }
.md-preview h1, .md-preview h2, .md-preview h3 { font-family: var(--sans); margin: 18px 0 8px; line-height: 1.25; }
.md-preview h1 { font-size: 26px; border-bottom: 3px solid var(--ink); padding-bottom: 6px; }
.md-preview h2 { font-size: 22px; }
.md-preview h3 { font-size: 18px; }
.md-preview p { margin: 8px 0; }
.md-preview code {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--yellow); border: 1.5px solid var(--ink); padding: 1px 6px;
}
.md-preview pre {
  background: var(--ink); color: #e8e8e8; padding: 14px 16px; overflow-x: auto;
  border: var(--line-2); box-shadow: var(--shadow-sm);
}
.md-preview pre code { background: none; border: 0; padding: 0; color: inherit; }
.md-preview blockquote {
  margin: 10px 0; padding: 8px 14px; background: var(--paper);
  border-left: 6px solid var(--ink); font-weight: 600;
}
.md-preview ul, .md-preview ol { padding-left: 24px; }
.md-preview li { margin: 4px 0; }
.md-preview a { color: var(--blue); font-weight: 800; text-decoration: 3px underline var(--yellow); }
.md-preview hr { border: 0; border-top: var(--line-2); margin: 16px 0; }
.md-preview table { border-collapse: collapse; margin: 10px 0; }
.md-preview th, .md-preview td { border: 2px solid var(--ink); padding: 6px 12px; }
.md-preview th { background: var(--yellow); }

/* ============================================================
   05 文本加工台
   ============================================================ */
.op-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.op-grid .btn { padding: 10px 6px; font-size: 12.5px; }

/* ============================================================
   06 番茄时钟
   ============================================================ */
.pomo { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: stretch; }
.pomo-clock {
  background: var(--ink); color: #fff;
  border: var(--line); box-shadow: var(--shadow-lg);
  padding: 40px 24px; text-align: center;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.pomo-clock .mode-tag {
  position: absolute; top: 16px; left: 16px;
  font-family: var(--sans); font-weight: 900; font-size: 12px;
  background: var(--yellow); color: var(--ink); padding: 4px 12px; border: 2px solid var(--ink);
}
.pomo-time {
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(64px, 10vw, 110px); line-height: 1;
  margin: 18px 0 6px; letter-spacing: -2px;
}
.pomo-round { font-weight: 800; color: rgba(255,255,255,.75); margin-bottom: 26px; }
.pomo-round .dots { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: middle; }
.pomo-round .dots i { width: 12px; height: 12px; border: 2px solid #fff; display: inline-block; }
.pomo-round .dots i.on { background: var(--yellow); border-color: var(--yellow); }
.pomo-side .pomo-modes { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.pomo-modes button {
  text-align: left; padding: 14px 16px; background: #fff; border: var(--line-2);
  box-shadow: var(--shadow-sm); cursor: pointer; font-weight: 800; font-size: 14px;
  display: flex; justify-content: space-between;
}
.pomo-modes button.on { background: var(--yellow); transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.pomo-modes button small { font-family: var(--mono); font-weight: 700; opacity: .6; }

/* ============================================================
   07 帮我决定
   ============================================================ */
.pick-stage {
  text-align: center; padding: 40px 20px; min-height: 260px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.pick-result {
  font-family: var(--sans); font-weight: 900;
  font-size: clamp(30px, 5vw, 52px);
  letter-spacing: -1px; line-height: 1.2;
  word-break: break-all;
  margin: 12px 0;
  padding: 8px 26px;
  transition: transform .08s;
}
.pick-result.rolling { color: rgba(20,20,20,.4); }
.pick-result.done { background: var(--green); color: #fff; border: var(--line); box-shadow: var(--shadow); transform: rotate(-1.2deg); }

/* ============================================================
   08 图片压一压
   ============================================================ */
.dropzone {
  border: var(--line); box-shadow: var(--shadow);
  background: var(--cyan);
  padding: 44px 20px; text-align: center; cursor: pointer;
  transition: transform .13s, box-shadow .13s;
}
.dropzone:hover, .dropzone.drag { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }
.dropzone .dz-ico { font-size: 46px; display: block; margin-bottom: 10px; }
.dropzone b { font-family: var(--sans); font-size: 19px; }
.dropzone span { display: block; font-size: 13px; font-weight: 700; margin-top: 6px; }
.img-result { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.img-result img {
  width: 100%; border: var(--line-2); box-shadow: var(--shadow-sm); display: block;
  background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 16px 16px;
}
.compare-table { width: 100%; border-collapse: collapse; font-weight: 700; font-size: 13.5px; }
.compare-table td { padding: 10px 12px; border: var(--line-2); }
.compare-table td:first-child { background: var(--paper); white-space: nowrap; width: 110px; }
.compare-table .save { color: var(--green); font-family: var(--sans); }
.compare-table .bigger { color: var(--red); }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--ink); border: 3px solid var(--paper); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1080px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .tile.big { grid-column: auto; }
  .howto { grid-template-columns: 1fr; }
  .howto .h { border-right: 0; border-bottom: var(--line-2); }
  .howto .h:last-child { border-bottom: 0; }
  .grid-2, .pomo, .md-layout, .img-result { grid-template-columns: 1fr; }
  .md-editor { border-right: 0; border-bottom: var(--line); }
  .pal-row { grid-template-columns: repeat(3, 1fr); }
  .op-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static; height: auto;
    border-right: 0; border-bottom: var(--line);
    padding: 16px;
  }
  .side-note, .side-foot { display: none; }
  .brand { margin-bottom: 12px; }
  .sidenav { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .sidenav a { flex-shrink: 0; }
  .sidenav a .t-name { display: none; }
  .sidenav a { padding: 10px 13px; }
  .main { padding: 26px 18px 0; }
  .t-head h1 { font-size: 30px; }
  .tile-grid { grid-template-columns: 1fr; }
  .pal-row { grid-template-columns: repeat(2, 1fr); }
  .op-grid { grid-template-columns: repeat(2, 1fr); }
  .foot { flex-direction: column; gap: 4px; }
}
