/* ============================================================================
   域名小本本 · Risograph 印刷风设计系统
   ----------------------------------------------------------------------------
   规则摘要（硬约束）
   · 2–4 色墨：荧光粉 #ff6b9d / 蓝 #2563eb / 荧光橙 #ff8a00 / 绿 #22c55e + 纸白 #fffbf0
   · 圆角只用 2px（rounded-sm）；无 rounded-lg/xl/full 的界面元素
   · 阴影永远零模糊、永远双向（两块油墨版错位）
   · 过渡一律 100ms linear；禁止 ease / ease-in-out
   · 无渐变、无玻璃态、无写实光照；纹理靠 SVG 网点与颗粒
   ========================================================================== */

/* ------------------------------- 1. Token -------------------------------- */

:root {
  /* 油墨 */
  --paper: #fffbf0;
  --paper-2: #f5f0e6;
  --ink: #1a1a1a;
  --pink: #ff6b9d;
  --blue: #2563eb;
  --orange: #ff8a00;
  --green: #22c55e;

  /* 油墨的浅色版（仍是纯色，不是渐变） */
  --pink-15: #ffe3ec;
  --blue-10: #dde7fd;
  --ink-12: rgba(26, 26, 26, 0.12);
  --ink-20: rgba(26, 26, 26, 0.2);
  --ink-60: #5f5a52;
  --ink-70: #4a463f;

  /* 形状 */
  --radius: 2px;
  --line: 2px;
  --border: 2px solid var(--ink);

  /* 套印错位阴影：右下粉版 + 左上蓝版 */
  --sh-xs: 2px 2px 0 var(--pink), -1px -1px 0 var(--blue);
  --sh-sm: 3px 3px 0 var(--pink), -2px -2px 0 var(--blue);
  --sh-md: 4px 4px 0 var(--pink), -3px -3px 0 var(--blue);
  --sh-lg: 6px 6px 0 var(--pink), -4px -4px 0 var(--blue);
  --sh-press: 6px 6px 0 var(--blue), -4px -4px 0 var(--orange);

  /* 印刷机是机械的 */
  --dur: 100ms;
  --ease: linear;

  /* 字体：等宽优先，中文落到无衬线 */
  --font-mono: "IBM Plex Mono", "JetBrains Mono", "Cascadia Mono", ui-monospace,
    SFMono-Regular, Menlo, Consolas, "Noto Sans Mono CJK SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", monospace;

  /* 纹理 */
  --tex-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
  --tex-dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Ccircle cx='2' cy='2' r='1.5' fill='%23ff6b9d'/%3E%3C/svg%3E");
  --tex-dots-blue: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='7'%3E%3Ccircle cx='1.8' cy='1.8' r='1.2' fill='%232563eb'/%3E%3C/svg%3E");
  --tex-dots-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Ccircle cx='1.6' cy='1.6' r='1' fill='%231a1a1a'/%3E%3C/svg%3E");
}

/* ------------------------------- 2. 基础 --------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--paper-2);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.65;
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
  padding: 26px 18px 40px;
}

/* 颗粒叠加：整页一层，模拟油墨吃纸 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--tex-grain);
  background-size: 180px 180px;
  opacity: 0.5;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 9998;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.15;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(28px, 4vw, 46px);
}

h2 {
  font-size: clamp(20px, 2.4vw, 27px);
}

h3 {
  font-size: 18px;
}

h4 {
  font-size: 15px;
}

p {
  margin: 0 0 12px;
  max-width: 72ch;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

a:hover {
  background: var(--pink);
  color: var(--ink);
  text-decoration-color: var(--ink);
}

/* 点线链接：网点下划线，替代手绘波浪线 */
.wavy {
  text-decoration: none;
  padding-bottom: 3px;
  background-image: var(--tex-dots);
  background-repeat: repeat-x;
  background-position: 0 100%;
  background-size: 8px 4px;
}

.wavy:hover {
  background-image: none;
}

code,
pre,
.code {
  font-family: var(--font-mono);
  font-size: 0.94em;
  background: var(--paper-2);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 1px 5px;
  word-break: break-all;
}

pre.snippet {
  display: block;
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.7;
  white-space: pre;
  box-shadow: var(--sh-sm);
  border: var(--border);
}

pre.snippet code {
  border: 0;
  background: none;
  padding: 0;
  font-size: 12.5px;
}

b,
strong {
  font-weight: 700;
}

hr {
  border: 0;
  border-top: var(--border);
  margin: 22px 0;
}

/* ------------------------------ 3. 版面 ---------------------------------- */

.sheet {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 9px 9px 0 var(--pink), -7px -7px 0 var(--blue);
  padding: 0 0 26px;
}

/* 左侧裁切/套印规线列 */
.sheet__holes {
  position: absolute;
  top: 104px;
  bottom: 30px;
  left: 12px;
  width: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.hole {
  position: relative;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--blue);
  border-radius: 0;
  background: none;
  opacity: 0.85;
}

.hole::before,
.hole::after {
  content: "";
  position: absolute;
  background: var(--blue);
}

.hole::before {
  top: 50%;
  left: -5px;
  right: -5px;
  height: 1.5px;
  margin-top: -0.75px;
}

.hole::after {
  left: 50%;
  top: -5px;
  bottom: -5px;
  width: 1.5px;
  margin-left: -0.75px;
}

.wrap {
  padding: 0 clamp(16px, 3.2vw, 42px) 0 clamp(38px, 5vw, 62px);
}

/* -------------------------------- 4. 导航 -------------------------------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--pink);
  color: var(--ink);
  border: var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-weight: 700;
  z-index: 10000;
}

.skip:focus {
  left: 12px;
  top: 12px;
}

.nav {
  position: relative;
  border-bottom: var(--border);
  background: var(--paper);
  padding: 0 clamp(16px, 3.2vw, 42px);
  margin-bottom: 26px;
}

.nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 6px;
  background-image: var(--tex-dots-blue);
  background-size: 7px 7px;
  opacity: 0.9;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 0 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
}

.brand:hover {
  background: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--pink);
  color: var(--ink);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--sh-xs);
  flex: none;
}

.brand__mark svg {
  width: 20px;
  height: 20px;
}

.brand__text {
  display: block;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
}

.brand__sub {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav__link {
  display: inline-block;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
  transition: all var(--dur) var(--ease);
}

.nav__link:hover {
  background: var(--paper);
  border-color: var(--ink);
  box-shadow: var(--sh-xs);
  transform: translate(1px, 1px);
}

.nav__link.is-active {
  background: var(--blue);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow: var(--sh-xs);
}

.nav__link.is-active:hover {
  background: var(--blue);
  color: var(--paper);
  transform: none;
}

/* -------------------------------- 5. 标题区 ------------------------------ */

.page-head {
  position: relative;
  padding: 8px 0 22px;
}

.page-head__deco {
  position: absolute;
  top: 2px;
  right: 0;
  width: clamp(120px, 16vw, 190px);
  pointer-events: none;
  mix-blend-mode: multiply;
}

.page-head__deco svg {
  width: 100%;
  height: auto;
  display: block;
}

.hero__title {
  position: relative;
  display: inline-block;
  font-size: clamp(34px, 5.4vw, 62px);
  letter-spacing: 0.01em;
  margin-bottom: 14px;
  text-shadow: 3px 3px 0 var(--pink);
}

.hero__sub {
  max-width: 62ch;
  color: var(--ink-70);
  font-size: 14px;
  margin-bottom: 20px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* 荧光粉油墨块：盖在字后面，替代荧光笔 */
.marker {
  position: relative;
  display: inline-block;
  padding: 0 8px;
  background: var(--pink);
  color: var(--ink);
  box-shadow: var(--sh-sm);
  text-shadow: none;
}

.marker--teal {
  background: var(--blue);
  color: var(--paper);
}

/* -------------------------------- 6. 按钮 -------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--sh-xs);
  cursor: pointer;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.btn:hover {
  background: var(--paper);
  color: var(--ink);
  transform: translate(2px, 2px);
  box-shadow: var(--sh-press);
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: none;
  background: var(--blue);
  color: var(--paper);
  border-color: var(--ink);
}

.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 1;
  color: var(--ink-60);
  background: var(--paper-2);
  box-shadow: var(--sh-xs);
  cursor: not-allowed;
  transform: none;
}

.btn__icon {
  width: 15px;
  height: 15px;
  flex: none;
}

.btn--sm {
  padding: 7px 11px;
  font-size: 11px;
  letter-spacing: 0.08em;
  box-shadow: var(--sh-xs);
}

.btn--ink {
  background: var(--pink);
  box-shadow: 3px 3px 0 var(--blue), -2px -2px 0 var(--orange);
}

.btn--ink:hover {
  background: var(--pink);
  box-shadow: 6px 6px 0 var(--blue), -4px -4px 0 var(--orange);
}

.btn--red {
  background: var(--orange);
  box-shadow: 3px 3px 0 var(--blue), -2px -2px 0 var(--pink);
}

.btn--danger {
  background: var(--orange);
  box-shadow: 3px 3px 0 var(--blue), -2px -2px 0 var(--pink);
}

.btn--danger:hover {
  background: var(--orange);
  box-shadow: 6px 6px 0 var(--blue), -4px -4px 0 var(--pink);
}

.btn--teal {
  background: var(--green);
  box-shadow: 3px 3px 0 var(--pink), -2px -2px 0 var(--blue);
}

.btn--yellow {
  background: var(--orange);
  box-shadow: 3px 3px 0 var(--pink), -2px -2px 0 var(--blue);
}

.btn--ghost {
  background: var(--paper);
}

/* -------------------------------- 7. 卡片 -------------------------------- */

.card {
  position: relative;
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--sh-md);
  padding: 20px 22px;
}

.card + .card {
  margin-top: 18px;
}

.card--flat {
  box-shadow: var(--sh-sm);
}

.card--red {
  background: var(--pink);
}

.card--yellow {
  background: var(--orange);
}

.card--ink {
  background: var(--ink);
  color: var(--paper);
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.card__title {
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

/* 卡片角上的绿色套印规线：静止错位，hover 归位 */
.pin {
  position: absolute;
  top: -11px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--green);
  border: var(--border);
  border-radius: var(--radius);
  transform: translate(8px, -8px);
  transition: transform var(--dur) var(--ease);
  pointer-events: none;
  z-index: 2;
}

.pin svg {
  width: 16px;
  height: 16px;
  stroke: var(--ink) !important;
  fill: var(--ink) !important;
}

.card:hover .pin,
.zone-card:hover .pin,
.card:focus-within .pin {
  transform: translate(0, 0);
}

/* 油墨条：替代胶带 */
.tape {
  position: absolute;
  top: -12px;
  left: 26px;
  width: 84px;
  height: 22px;
  background: var(--pink);
  background-image: var(--tex-dots-ink);
  background-size: 6px 6px;
  border: 1.5px solid var(--ink);
  transform: rotate(-1.2deg);
  pointer-events: none;
}

.tape--left {
  left: 18px;
}

.tape--teal {
  background-color: var(--blue);
  background-image: var(--tex-dots-ink);
  left: auto;
  right: 30px;
  transform: rotate(1deg);
}

/* 网点小方块：替代回形针 */
.clip {
  position: absolute;
  top: -9px;
  right: 34px;
  width: 20px;
  height: 20px;
  background: var(--paper);
  background-image: var(--tex-dots-blue);
  background-size: 7px 7px;
  border: 1.5px solid var(--ink);
  transform: rotate(6deg);
  pointer-events: none;
}

/* 轻微错位：手送纸的歪斜 */
.tilt-1 {
  transform: rotate(-0.5deg);
}

.tilt-2 {
  transform: rotate(0.4deg);
}

.tilt-3 {
  transform: rotate(-0.25deg);
}

/* -------------------------------- 8. 标签 -------------------------------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  white-space: nowrap;
}

.tag--teal {
  background: var(--green);
}

.tag--red {
  background: var(--pink);
}

.tag--yellow {
  background: var(--orange);
}

.tag--blue {
  background: var(--blue);
  color: var(--paper);
}

.dot {
  width: 7px;
  height: 7px;
  background: var(--ink);
  border-radius: 1px;
  display: inline-block;
  flex: none;
}

/* ------------------------------- 9. 提示条 ------------------------------- */

.banner {
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 13px;
  align-items: flex-start;
  padding: 15px 18px;
  margin: 0 0 20px;
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--sh-sm);
}

/* 网点只压在右侧一条，绝不盖字 */
.banner::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 92px;
  background-image: var(--tex-dots-ink);
  background-size: 8px 8px;
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}

.banner > * {
  position: relative;
  z-index: 1;
}

.banner svg {
  flex: none;
  margin-top: 2px;
}

.banner--info {
  background-color: var(--pink-15);
}

.banner--err {
  background-color: #ffe0e9;
}

.banner--warn {
  background-color: #ffeccd;
}

.banner__title {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.banner__body {
  min-width: 0;
}

/* ------------------------------- 10. 统计 -------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.stat {
  position: relative;
  padding: 14px 16px 15px;
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--sh-sm);
  overflow: hidden;
}

.stat::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 34px;
  height: 34px;
  background-image: var(--tex-dots);
  background-size: 8px 8px;
  mix-blend-mode: multiply;
  opacity: 0.85;
  pointer-events: none;
}

.stat__label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-60);
  margin-bottom: 4px;
}

.stat__value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-shadow: 2px 2px 0 var(--pink);
  font-variant-numeric: tabular-nums;
}

.stat__meta {
  font-size: 11px;
  color: var(--ink-60);
  margin-top: 3px;
}

/* ------------------------------- 11. 表单 --------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  min-width: 0;
}

.label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.hint {
  font-size: 11px;
  color: var(--ink-60);
  letter-spacing: 0;
  text-transform: none;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  appearance: none;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--ink-60);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 2px 2px 0 var(--pink), -2px -2px 0 var(--blue);
}

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231a1a1a' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 30px;
  cursor: pointer;
}

.textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.6;
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  border-radius: 0;
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 18px;
}

.form-grid .span-2 {
  grid-column: 1 / -1;
}

/* 开关：方头墨块，瞬时切换 */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: 54px;
  min-height: 24px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
}

.switch input {
  position: absolute;
  left: 0;
  top: 50%;
  width: 42px;
  height: 22px;
  margin: -11px 0 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.switch::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  margin-top: -11px;
  width: 42px;
  height: 22px;
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 2px 2px 0 var(--ink-20);
  transition: background-color var(--dur) var(--ease);
}

.switch::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
  pointer-events: none;
}

.switch:has(input:checked)::before {
  background: var(--blue);
}

.switch:has(input:checked)::after {
  transform: translateX(19px);
  background: var(--paper);
}

.switch input:focus-visible ~ span {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ------------------------------- 12. 标签页 ------------------------------ */

.tabs {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  margin: 0 0 22px;
  border-bottom: var(--border);
}

.tab {
  padding: 11px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper);
  border: var(--border);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  margin-right: -2px;
  cursor: pointer;
  position: relative;
  top: 2px;
  transition: all var(--dur) var(--ease);
}

.tab:hover {
  background: var(--paper-2);
}

.tab.is-active {
  background: var(--blue);
  color: var(--paper);
  top: 0;
  box-shadow: 3px 0 0 var(--pink);
  z-index: 1;
}

.tab:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -4px;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}

.chip:hover {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--pink);
}

.chip.is-active {
  background: var(--blue);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--pink), -1px -1px 0 var(--orange);
  transform: translate(1px, 1px);
}

/* ------------------------------- 13. 工具条 ------------------------------ */

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 16px;
}

.toolbar__search {
  min-width: 210px;
  flex: 1 1 220px;
  max-width: 340px;
  margin-bottom: 0;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.row--between {
  justify-content: space-between;
  align-items: flex-start;
}

.stack > * + * {
  margin-top: 18px;
}

.grid {
  display: grid;
  gap: 18px;
}

/* ------------------------------ 14. 域名卡 ------------------------------- */

.zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 20px;
}

.zone-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 16px;
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--sh-md);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.zone-card:hover {
  box-shadow: var(--sh-press);
  transform: translate(2px, 2px);
}

.zone-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.zone-card__name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  word-break: break-all;
  line-height: 1.3;
  text-decoration: none;
  color: var(--ink);
  text-transform: none;
}

.zone-card__name:hover {
  background: var(--pink);
}

.zone-card__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--ink-60);
}

.zone-card__ns {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-60);
  border-top: 1.5px solid var(--ink-12);
  padding-top: 9px;
  overflow-wrap: anywhere;
}

.zone-card__ns-label {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  flex: none;
}

.zone-card__foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

/* ------------------------------- 15. 表格 -------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--sh-sm);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  min-width: 760px;
}

.table thead th {
  padding: 10px 12px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--blue);
  border-bottom: var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.table tbody td {
  padding: 10px 12px;
  border-bottom: 1.5px solid var(--ink-12);
  vertical-align: middle;
}

.table tbody tr:nth-child(even) {
  background: rgba(255, 107, 157, 0.06);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: var(--pink-15);
}

.table .cell-name {
  font-weight: 700;
  word-break: break-all;
  max-width: 260px;
}

.table .cell-content {
  word-break: break-all;
  max-width: 380px;
  color: var(--ink-70);
}

.table .cell-actions {
  text-align: right;
  white-space: nowrap;
}

.table .row-actions {
  display: inline-flex;
  gap: 6px;
  justify-content: flex-end;
}

.table td .code {
  border: 0;
  background: none;
  padding: 0;
  font-size: 12.5px;
}

.table__empty {
  padding: 40px 18px;
  text-align: center;
  color: var(--ink-60);
}

/* 记录类型：扁平墨色标签 */
.rec-type {
  display: inline-block;
  min-width: 46px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: center;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
}

.rec-type--A,
.rec-type--AAAA {
  background: var(--pink);
}

.rec-type--CNAME,
.rec-type--NS {
  background: var(--blue);
  color: var(--paper);
}

.rec-type--MX,
.rec-type--SRV,
.rec-type--URI,
.rec-type--HTTPS {
  background: var(--orange);
}

.rec-type--TXT,
.rec-type--CAA,
.rec-type--PTR,
.rec-type--CERT {
  background: var(--green);
}

.proxy-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
}

.proxy-pill--on {
  background: var(--green);
}

/* 分页 / 批量条 */
.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 14px;
  font-size: 12px;
}

.bulkbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: var(--ink);
  color: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--sh-sm);
  font-size: 12px;
}

.bulkbar .btn {
  box-shadow: none;
}

.bulkbar .btn:hover {
  box-shadow: 2px 2px 0 var(--pink);
}

.bulkbar__count {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ------------------------------- 16. 弹窗 -------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(26, 26, 26, 0.55);
  animation: riso-fade var(--dur) var(--ease) both;
}

.modal.is-out {
  animation: riso-fade-out var(--dur) var(--ease) both;
}

.modal__box {
  position: relative;
  width: min(680px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  padding: 22px 24px 18px;
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--pink), -6px -6px 0 var(--blue);
  animation: riso-pop var(--dur) var(--ease) both;
}

.modal__box--wide {
  width: min(900px, 100%);
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: var(--border);
}

.modal__head h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.08em;
}

.modal__x {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 17px;
  line-height: 1;
  color: var(--ink);
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}

.modal__x:hover {
  background: var(--pink);
  box-shadow: 2px 2px 0 var(--blue);
}

.modal__body {
  padding-bottom: 4px;
}

.modal__foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1.5px solid var(--ink-12);
}

/* ------------------------------- 17. Toast ------------------------------- */

.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 36px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--sh-sm);
  animation: riso-pop var(--dur) var(--ease) both;
}

.toast.is-out {
  animation: riso-fade-out var(--dur) var(--ease) both;
}

.toast__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper-2);
}

.toast__icon svg {
  width: 14px;
  height: 14px;
}

.toast--ok .toast__icon {
  background: var(--green);
}

.toast--err .toast__icon {
  background: var(--pink);
}

.toast--info .toast__icon {
  background: var(--orange);
}

.toast__body {
  min-width: 0;
  flex: 1 1 auto;
}

.toast__msg {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
}

.toast__hint {
  font-size: 11.5px;
  color: var(--ink-60);
  margin-top: 3px;
  line-height: 1.5;
}

.toast__x {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
  color: var(--ink);
  background: none;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}

.toast__x:hover {
  border-color: var(--ink);
  background: var(--pink);
}

/* --------------------------- 18. 域名详情页头部 -------------------------- */

.zone-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: var(--border);
}

.zone-head__title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.zone-head__name {
  margin: 0;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: 0.01em;
  text-transform: none;
  word-break: break-all;
  text-shadow: 2px 2px 0 var(--pink);
}

.zone-head__facts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--ink-60);
  margin-top: 8px;
}

/* ----------------------------- 19. 步骤 / 权限 --------------------------- */

.steps {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  margin: 18px 0 26px;
}

.step {
  position: relative;
  padding: 18px 18px 16px;
  background: var(--paper);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--sh-sm);
}

.step__num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  background: var(--pink);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: 2px 2px 0 var(--blue);
}

.perm-table {
  width: 100%;
  border-collapse: collapse;
  border: 1.5px solid var(--ink);
  font-size: 12px;
  background: var(--paper);
}

.perm-table thead th {
  padding: 8px 11px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--paper-2);
  border-bottom: var(--border);
  white-space: nowrap;
}

.perm-table td {
  padding: 8px 11px;
  border-bottom: 1px solid var(--ink-12);
  vertical-align: middle;
}

.perm-table tbody tr:last-child td {
  border-bottom: none;
}

.perm-table tbody tr:hover {
  background: var(--pink-15);
}

.perm-table .code {
  border: 0;
  background: none;
  padding: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
}

.perm-table .tag {
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

/* ----------------------------- 20. 日志 / 探针 --------------------------- */

.log-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  max-height: 340px;
  overflow-y: auto;
  overflow-x: hidden;
}

.log-item {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 2px;
  align-items: baseline;
  padding: 8px 12px;
  font-size: 11.5px;
  line-height: 1.5;
  border-bottom: 1.5px solid var(--ink-12);
}

.log-item > * {
  min-width: 0;
}

.log-item__time {
  grid-column: 1;
  grid-row: 1;
  white-space: nowrap;
}

.log-item__action {
  grid-column: 2;
  grid-row: 1;
}

.log-item__detail {
  grid-column: 1 / -1;
  grid-row: 2;
}

.log-item:last-child {
  border-bottom: none;
}

.log-item__time {
  color: var(--ink-60);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}

.log-item__action {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.log-item__detail {
  color: var(--ink-60);
  word-break: break-all;
}

.probe {
  padding: 12px 0;
  border-bottom: 1.5px solid var(--ink-12);
}

.probe:last-child {
  border-bottom: none;
}

.probe__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.probe__desc {
  margin-top: 5px;
  font-size: 11.5px;
  max-width: 68ch;
}

.probe__msg {
  margin-top: 5px;
  max-width: 68ch;
}

.probe__label {
  font-weight: 700;
  font-size: 12.5px;
}

.probe__msg {
  font-size: 11.5px;
  color: var(--ink-60);
  word-break: break-word;
}

.probe__state {
  display: inline-block;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  white-space: nowrap;
}

.probe__state--ok {
  background: var(--green);
}

.probe__state--no {
  background: var(--pink);
}

.probe__state--skip {
  background: var(--orange);
}

/* --------------------------- 21. 设置行 / Token -------------------------- */

.setting-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1.5px solid var(--ink-12);
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-row__label {
  font-size: 12.5px;
  font-weight: 700;
  word-break: break-word;
}

.setting-row__control {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.setting-row.is-busy {
  background: var(--pink-15);
}

.token-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.token-row .field {
  flex: 1 1 280px;
  margin-bottom: 0;
}

.token-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* -------------------------------- 22. 杂项 ------------------------------- */

.empty {
  text-align: center;
  padding: 22px 10px;
}

.empty__art {
  width: 78px;
  height: 78px;
  margin: 0 auto 10px;
  display: block;
  mix-blend-mode: multiply;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 34px;
  padding: 18px clamp(16px, 3.2vw, 42px) 0 clamp(38px, 5vw, 62px);
  border-top: var(--border);
  font-size: 11.5px;
  color: var(--ink-60);
}

.foot__brand {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden,
[hidden] {
  display: none !important;
}

.small {
  font-size: 12px;
}

.tiny {
  font-size: 11px;
}

.muted {
  color: var(--ink-60);
}

.mb-0 {
  margin-bottom: 0;
}

.mb-2 {
  margin-bottom: 8px;
}

.mt-1 {
  margin-top: 6px;
}

.mt-2 {
  margin-top: 12px;
}

.mt-3 {
  margin-top: 18px;
}

.mt-4 {
  margin-top: 26px;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ------------------------------- 23. 动效 -------------------------------- */

@keyframes riso-pop {
  from {
    opacity: 0.4;
    transform: translate(4px, 4px);
  }
  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

@keyframes riso-fade {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 1;
  }
}

@keyframes riso-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    transform: none !important;
  }

  .zone-card:hover,
  .btn:hover,
  .btn:active,
  .chip:hover {
    transform: none;
  }
}

/* ------------------------------- 24. 响应式 ------------------------------ */

@media (max-width: 860px) {
  body {
    padding: 14px 10px 30px;
  }

  .sheet {
    box-shadow: 6px 6px 0 var(--pink), -5px -5px 0 var(--blue);
  }

  .sheet__holes {
    display: none;
  }

  .wrap,
  .foot {
    padding-left: 18px;
    padding-right: 18px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .page-head__deco {
    display: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 13px;
  }

  .hero__title {
    font-size: 30px;
  }

  .stat__value {
    font-size: 24px;
  }

  .nav__inner {
    padding: 12px 0 14px;
  }

  .nav__links {
    width: 100%;
    gap: 4px;
  }

  .nav__link {
    padding: 6px 9px;
    font-size: 11px;
  }

  .btn {
    padding: 9px 13px;
    font-size: 11.5px;
  }

  .card,
  .modal__box {
    padding: 16px 15px;
  }

  .toolbar__search {
    max-width: none;
  }

  .log-item {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1px;
  }

  .log-item__time,
  .log-item__action,
  .log-item__detail {
    grid-column: 1;
  }

  .log-item__time { grid-row: 1; }
  .log-item__action { grid-row: 2; }
  .log-item__detail { grid-row: 3; }

  .probe {
    grid-template-columns: 1fr;
  }

  .toasts {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: none;
  }
}
