/* ============================================================================
   Q友工具箱 · 设计系统
   参照 Apple 原生 App：Liquid Glass 材质、SF 字阶、系统色板、分组列表。
   两条规则贯穿全站：
     1. 内容为主，控件为辅 —— 玻璃只用在浮层和分组容器上。
     2. 一切可点区域 >= 44pt。
   ========================================================================= */

:root {
  color-scheme: light dark;

  /* --- 系统色板（浅色） --- */
  --blue: #007aff;
  --green: #34c759;
  --indigo: #5856d6;
  --orange: #ff9500;
  --pink: #ff2d55;
  --purple: #af52de;
  --red: #ff3b30;
  --teal: #30b0c7;
  --cyan: #32ade6;
  --yellow: #ffcc00;

  /* --- 背景与文字 --- */
  --bg: #f2f2f7;
  --bg-tint-a: rgba(0, 122, 255, .14);
  --bg-tint-b: rgba(52, 199, 89, .10);
  --bg-tint-c: rgba(175, 82, 222, .10);

  --label: #000;
  --label-2: rgba(60, 60, 67, .62);
  --label-3: rgba(60, 60, 67, .34);
  --separator: rgba(60, 60, 67, .17);

  /* --- Liquid Glass 材质 --- */
  --glass-fill: rgba(255, 255, 255, .62);
  --glass-fill-thick: rgba(255, 255, 255, .78);
  --glass-sheen: linear-gradient(152deg,
      rgba(255, 255, 255, .55) 0%,
      rgba(255, 255, 255, .12) 34%,
      rgba(255, 255, 255, 0) 58%,
      rgba(255, 255, 255, .18) 100%);
  --glass-rim:
    inset 0 1px 0 rgba(255, 255, 255, .92),
    inset 0 0 0 .5px rgba(255, 255, 255, .5),
    inset 0 -1px 0 rgba(255, 255, 255, .28);
  --glass-blur: saturate(180%) blur(24px);

  /* 填充色：表单控件、轨道、次级按钮 */
  --fill-1: rgba(118, 118, 128, .12);
  --fill-2: rgba(118, 118, 128, .16);
  --fill-3: rgba(118, 118, 128, .08);
  --elevated: rgba(255, 255, 255, .92);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05), 0 4px 12px -6px rgba(0, 0, 0, .10);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, .06), 0 14px 34px -14px rgba(0, 0, 0, .18);
  --shadow-lg: 0 6px 16px rgba(0, 0, 0, .10), 0 30px 70px -24px rgba(0, 0, 0, .30);
  --shadow-knob: 0 1px 1px rgba(0, 0, 0, .06), 0 3px 8px rgba(0, 0, 0, .14);

  /* 同心圆角：外层大、内层小 */
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 11px;
  --r-pill: 999px;

  --ease: cubic-bezier(.32, .72, 0, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --gutter: clamp(16px, 4vw, 22px);
}

[data-theme="dark"] {
  color-scheme: dark;

  --blue: #0a84ff;
  --green: #30d158;
  --indigo: #5e5ce6;
  --orange: #ff9f0a;
  --pink: #ff375f;
  --purple: #bf5af2;
  --red: #ff453a;
  --teal: #40c8e0;
  --cyan: #64d2ff;
  --yellow: #ffd60a;

  --bg: #000;
  --bg-tint-a: rgba(10, 132, 255, .20);
  --bg-tint-b: rgba(48, 209, 88, .12);
  --bg-tint-c: rgba(191, 90, 242, .14);

  --label: #fff;
  --label-2: rgba(235, 235, 245, .60);
  --label-3: rgba(235, 235, 245, .30);
  --separator: rgba(84, 84, 88, .58);

  --glass-fill: rgba(28, 28, 30, .58);
  --glass-fill-thick: rgba(38, 38, 42, .76);
  --glass-sheen: linear-gradient(152deg,
      rgba(255, 255, 255, .16) 0%,
      rgba(255, 255, 255, .04) 34%,
      rgba(255, 255, 255, 0) 58%,
      rgba(255, 255, 255, .07) 100%);
  --glass-rim:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    inset 0 0 0 .5px rgba(255, 255, 255, .10),
    inset 0 -1px 0 rgba(255, 255, 255, .05);

  --fill-1: rgba(118, 118, 128, .24);
  --fill-2: rgba(118, 118, 128, .32);
  --fill-3: rgba(118, 118, 128, .18);
  --elevated: rgba(44, 44, 46, .92);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, .5), 0 16px 40px -16px rgba(0, 0, 0, .7);
  --shadow-lg: 0 8px 20px rgba(0, 0, 0, .55), 0 34px 80px -28px rgba(0, 0, 0, .85);
  --shadow-knob: 0 1px 2px rgba(0, 0, 0, .5), 0 4px 10px rgba(0, 0, 0, .4);
}

/* ============================================================ 基础 */

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--label);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "PingFang SC", "Helvetica Neue", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 玻璃需要有东西可以折射：一层安静的色彩场 */
body::before {
  position: fixed;
  z-index: -2;
  inset: -20% -10% auto -10%;
  height: 130vh;
  background:
    radial-gradient(52rem 40rem at 12% 4%, var(--bg-tint-a), transparent 62%),
    radial-gradient(46rem 34rem at 92% 12%, var(--bg-tint-c), transparent 60%),
    radial-gradient(56rem 42rem at 58% 96%, var(--bg-tint-b), transparent 62%);
  content: "";
  pointer-events: none;
}

img { max-width: 100%; }
a { color: var(--blue); text-decoration: none; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 55%, transparent);
  outline-offset: 2px;
}

::selection { background: color-mix(in srgb, var(--blue) 26%, transparent); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 99px; background: var(--label-3); background-clip: content-box; }

[hidden] { display: none !important; }

/* ============================================================ Liquid Glass */

.glass {
  position: relative;
  border-radius: var(--r-lg);
  background-color: var(--glass-fill);
  background-image: var(--glass-sheen);
  box-shadow: var(--glass-rim), var(--shadow-md);
  isolation: isolate;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .glass {
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
  }
}

/* ============================================================ 布局 */

.container {
  width: min(1080px, 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.page-main { padding-bottom: 72px; }

main { display: block; }

/* ============================================================ 导航栏 */

.topbar {
  position: sticky;
  z-index: 60;
  top: 10px;
  display: flex;
  width: min(1080px, 100% - var(--gutter) * 2);
  min-height: 54px;
  margin: 10px auto 0;
  padding: 7px 7px 7px 14px;
  align-items: center;
  gap: 12px;
  border-radius: var(--r-pill);
  background-color: var(--glass-fill-thick);
}

.brand {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  gap: 9px;
  color: var(--label);
  font-size: 16px;
  font-weight: 640;
  letter-spacing: -.02em;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(160deg, #5ac8fa, var(--blue));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 2px 6px rgba(0, 122, 255, .3);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.top-nav {
  display: flex;
  min-width: 0;
  margin-inline: auto;
  align-items: center;
  gap: 2px;
}

.top-nav a {
  padding: 7px 13px;
  border-radius: var(--r-pill);
  color: var(--label-2);
  font-size: 14px;
  font-weight: 560;
  white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease);
}

.top-nav a:hover { background: var(--fill-1); color: var(--label); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--blue) !important;
  font-weight: 560;
}

/* 外观切换：分段控件的迷你版 */
.theme-switch {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  border-radius: var(--r-pill);
  background: var(--fill-1);
}

.theme-btn {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--label-2);
  font-size: 13px;
  cursor: pointer;
  transition: background .22s var(--ease), color .22s var(--ease), transform .22s var(--ease);
}

.theme-btn:hover { color: var(--label); }

.theme-btn[aria-pressed="true"] {
  background: var(--elevated);
  box-shadow: var(--shadow-knob);
  color: var(--label);
}

.theme-btn:active { transform: scale(.9); }

/* ============================================================ 页头 */

.breadcrumbs {
  display: flex;
  padding-top: 26px;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--label-3);
  font-size: 13px;
}

.breadcrumbs a { color: var(--label-2); }
.breadcrumbs a:hover { color: var(--blue); }

.page-heading {
  display: flex;
  padding: 18px 0 26px;
  align-items: center;
  gap: 20px;
}

.page-heading-copy { min-width: 0; flex: 1; }

/* Large Title */
.page-heading h1 {
  margin: 6px 0 0;
  font-size: clamp(30px, 6.4vw, 40px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.page-heading h1 br { display: none; }

.page-heading p {
  max-width: 56ch;
  margin: 10px 0 0;
  color: var(--label-2);
  font-size: 15px;
  line-height: 1.5;
}

.gradient-text { color: var(--blue); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--label-2);
  font-size: 12px;
  font-weight: 620;
  letter-spacing: .02em;
}

.eyebrow::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  content: "";
}

/* 应用图标：圆角方块 + 高光 */
.tool-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border-radius: 11px;
  background: var(--icon, linear-gradient(160deg, #5ac8fa, var(--blue)));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), var(--shadow-sm);
  color: #fff;
  font-size: 17px;
  font-weight: 640;
  letter-spacing: -.03em;
}

.page-heading > .tool-icon {
  width: 68px;
  height: 68px;
  border-radius: 19px;
  font-size: 27px;
}

/* ============================================================ 分组列表 */

.list-header {
  padding: 26px 16px 8px;
  color: var(--label-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.005em;
}

/* 一行两个的磁贴（首页工具入口） */
.app-list {
  display: grid;
  overflow: hidden;
  padding: 5px;
  gap: 3px;
  border-radius: var(--r-lg);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.app-row {
  position: relative;
  display: flex;
  min-height: 60px;
  padding: 11px 12px;
  align-items: center;
  gap: 13px;
  border-radius: var(--r-md);
  color: var(--label);
  transition: background .18s var(--ease), transform .18s var(--ease);
}

.app-row:hover { background: var(--fill-3); }
.app-row:active { background: var(--fill-1); transform: scale(.988); }

/* 两列并排时留给文字的宽度有限，副标题单行截断 */
.app-list .app-body { flex: 1; }

.app-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border-radius: 11px;
  background: var(--tint, linear-gradient(160deg, #5ac8fa, var(--blue)));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42), 0 1px 3px rgba(0, 0, 0, .14);
  color: #fff;
  font-size: 17px;
  font-weight: 640;
  letter-spacing: -.03em;
}

/* 图标调色板：后台只能从这几个里选，不能塞任意 CSS */
.app-icon[data-tint="blue"],   .more-icon[data-tint="blue"]   { background: linear-gradient(160deg, #5ac8fa, #007aff); }
.app-icon[data-tint="cyan"],   .more-icon[data-tint="cyan"]   { background: linear-gradient(160deg, #32ade6, #5856d6); }
.app-icon[data-tint="teal"],   .more-icon[data-tint="teal"]   { background: linear-gradient(160deg, #30b0c7, #007aff); }
.app-icon[data-tint="green"],  .more-icon[data-tint="green"]  { background: linear-gradient(160deg, #34c759, #30b0c7); }
.app-icon[data-tint="yellow"], .more-icon[data-tint="yellow"] { background: linear-gradient(160deg, #ffcc00, #ff9500); }
.app-icon[data-tint="orange"], .more-icon[data-tint="orange"] { background: linear-gradient(160deg, #ff375f, #ff9500); }
.app-icon[data-tint="sunset"], .more-icon[data-tint="sunset"] { background: linear-gradient(160deg, #ff9500, #ff375f); }
.app-icon[data-tint="pink"],   .more-icon[data-tint="pink"]   { background: linear-gradient(160deg, #ff2d55, #af52de); }
.app-icon[data-tint="purple"], .more-icon[data-tint="purple"] { background: linear-gradient(160deg, #bf5af2, #5856d6); }
.app-icon[data-tint="indigo"], .more-icon[data-tint="indigo"] { background: linear-gradient(160deg, #5e5ce6, #0a84ff); }
.app-icon[data-tint="gray"],   .more-icon[data-tint="gray"]   { background: linear-gradient(160deg, #98989d, #636366); }

.app-body { display: grid; min-width: 0; gap: 1px; }
.app-body strong { font-size: 16px; font-weight: 570; letter-spacing: -.015em; }

.app-body small {
  overflow: hidden;
  color: var(--label-2);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-trail {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 7px;
  color: var(--label-3);
  font-size: 13px;
  white-space: nowrap;
}

.app-chevron { color: var(--label-3); font-size: 19px; font-weight: 600; line-height: 1; }

.app-badge {
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--fill-1);
  color: var(--label-2);
  font-size: 11.5px;
  font-weight: 600;
}

.app-badge.tinted { background: color-mix(in srgb, var(--blue) 15%, transparent); color: var(--blue); }
.app-badge.new { background: color-mix(in srgb, var(--orange) 18%, transparent); color: var(--orange); }

.list-note { padding: 8px 16px 0; color: var(--label-3); font-size: 12.5px; line-height: 1.5; }

/* ============================================================ 分组容器 */

.tool-shell {
  margin-bottom: 16px;
  padding: 20px;
  border-radius: var(--r-lg);
}

.tool-title {
  display: flex;
  margin-bottom: 18px;
  align-items: center;
  gap: 13px;
}

.tool-title h2 {
  display: flex;
  margin: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 640;
  letter-spacing: -.022em;
}

.tool-title p { margin: 2px 0 0; color: var(--label-2); font-size: 13.5px; line-height: 1.4; }

/* ============================================================ 表单 */

.split { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }

.control-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.field { display: block; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

.field-label {
  display: flex;
  margin-bottom: 7px;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  color: var(--label);
  font-size: 13.5px;
  font-weight: 580;
}

.field-label span,
.field-label a { color: var(--label-2); font-size: 12.5px; font-weight: 480; }

.input,
.select,
.textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--fill-1);
  box-shadow: inset 0 0 0 1px transparent;
  color: var(--label);
  font-family: inherit;
  font-size: 16px;
  letter-spacing: -.01em;
  transition: background .2s var(--ease), box-shadow .2s var(--ease);
}

.textarea { min-height: 120px; line-height: 1.5; resize: vertical; }

.input::placeholder,
.textarea::placeholder { color: var(--label-3); }

.input:focus,
.select:focus,
.textarea:focus {
  outline: 0;
  background: var(--fill-3);
  box-shadow: inset 0 0 0 2px var(--blue);
}

.select {
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--label-2) 50%),
    linear-gradient(135deg, var(--label-2) 50%, transparent 50%);
  background-position: calc(100% - 19px) 20px, calc(100% - 14px) 20px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

input[type="color"].input { min-height: 44px; padding: 5px; cursor: pointer; }

/* --- 滑块 --- */

.range {
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.range::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue) var(--range-pct, 0%), var(--fill-2) var(--range-pct, 0%));
}

.range::-webkit-slider-thumb {
  width: 26px;
  height: 26px;
  margin-top: -10.5px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-knob);
  -webkit-appearance: none;
  appearance: none;
}

.range::-moz-range-track {
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue) var(--range-pct, 0%), var(--fill-2) var(--range-pct, 0%));
}
.range::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fff; box-shadow: var(--shadow-knob); }
.range:active::-webkit-slider-thumb { transform: scale(1.08); }

/* --- 复选胶囊 --- */

.option-pills { display: flex; flex-wrap: wrap; gap: 8px; }

.check-pill {
  display: inline-flex;
  min-height: 36px;
  padding: 0 14px;
  align-items: center;
  gap: 7px;
  border-radius: var(--r-pill);
  background: var(--fill-1);
  color: var(--label);
  font-size: 14px;
  font-weight: 520;
  cursor: pointer;
  transition: background .18s var(--ease);
}

.check-pill:has(input:checked) {
  background: color-mix(in srgb, var(--blue) 16%, transparent);
  color: var(--blue);
  font-weight: 600;
}

.check-pill input { accent-color: var(--blue); margin: 0; }

.color-field { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.color-field .input { width: 58px; flex: none; }

/* ============================================================ 分段控件 */

.segmented {
  display: flex;
  padding: 2px;
  overflow-x: auto;
  border-radius: 12px;
  background: var(--fill-1);
  gap: 2px;
  scrollbar-width: none;
}

.segmented::-webkit-scrollbar { display: none; }

.segment {
  min-width: max-content;
  padding: 8px 15px;
  flex: 1;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--label);
  font-family: inherit;
  font-size: 14px;
  font-weight: 520;
  letter-spacing: -.012em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .24s var(--ease), box-shadow .24s var(--ease), transform .18s var(--ease);
}

.segment:hover:not(.active) { color: var(--label-2); }
.segment.active { background: var(--elevated); box-shadow: var(--shadow-knob); font-weight: 600; }
.segment:active { transform: scale(.96); }

/* ============================================================ 按钮 */

.action-row { display: flex; margin-top: 16px; flex-wrap: wrap; gap: 9px; }

.tool-btn,
.primary-btn,
.secondary-btn {
  display: inline-flex;
  min-height: 44px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--fill-1);
  color: var(--blue);
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 590;
  letter-spacing: -.015em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease), opacity .18s var(--ease);
}

.tool-btn:hover,
.primary-btn:hover,
.secondary-btn:hover { background: var(--fill-2); }

.tool-btn.accent,
.primary-btn {
  background: var(--blue);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 4px 14px -4px color-mix(in srgb, var(--blue) 70%, transparent);
  color: #fff;
}

.tool-btn.accent:hover,
.primary-btn:hover { background: color-mix(in srgb, var(--blue) 88%, #000); }

.tool-btn:active,
.primary-btn:active,
.secondary-btn:active { transform: scale(.965); }

.tool-btn:disabled,
.primary-btn:disabled { opacity: .38; cursor: not-allowed; transform: none; }

.icon-btn {
  display: grid;
  width: 30px;
  height: 30px;
  flex: none;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--fill-2);
  color: var(--label-2);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background .18s var(--ease), transform .18s var(--ease);
}

.icon-btn:hover { background: var(--fill-1); color: var(--label); }
.icon-btn:active { transform: scale(.9); }

.copy-btn {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: var(--fill-1);
  color: var(--blue);
  font-size: 15px;
  cursor: pointer;
  transition: background .18s var(--ease), transform .18s var(--ease);
}

.copy-btn:hover { background: var(--fill-2); }
.copy-btn:active { transform: scale(.9); }

/* ============================================================ 结果列表 */

.result-list {
  display: grid;
  margin-top: 7px;
  padding: 5px;
  gap: 2px;
  border-radius: var(--r-md);
  background: var(--fill-3);
}

.result-item {
  display: flex;
  padding: 11px 12px;
  align-items: center;
  gap: 10px;
  border-radius: var(--r-sm);
  transition: background .18s var(--ease);
}

.result-item:hover { background: var(--fill-1); }

.result-text { min-width: 0; flex: 1; }

.result-text small {
  display: block;
  margin-bottom: 3px;
  color: var(--label-2);
  font-size: 11.5px;
  font-weight: 560;
}

.result-text div { font-size: 16px; line-height: 1.4; word-break: break-all; }

.copy-output {
  min-height: 200px;
  padding: 16px;
  border-radius: var(--r-md);
  background: var(--fill-3);
  font-size: 15.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============================================================ 提示条 */

.info-note {
  display: flex;
  margin-top: 14px;
  padding: 12px 14px;
  align-items: flex-start;
  gap: 9px;
  border-radius: var(--r-md);
  background: var(--fill-3);
  color: var(--label-2);
  font-size: 13px;
  line-height: 1.5;
}

.info-note > span:first-child { flex: none; color: var(--blue); font-size: 14px; }

.info-note code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--fill-1);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 12.5px;
}

/* ============================================================ 符号库 */

.symbol-cloud { display: flex; flex-wrap: wrap; gap: 7px; }

.symbol-chip {
  display: grid;
  min-width: 42px;
  height: 42px;
  padding: 0 8px;
  place-items: center;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--fill-1);
  color: var(--label);
  font-size: 17px;
  cursor: pointer;
  transition: background .16s var(--ease), transform .16s var(--ease);
}

.symbol-chip:hover { background: var(--fill-2); }
.symbol-chip:active { transform: scale(.92); }

/* ============================================================ 相关工具 */

.more-tools { margin-top: 34px; }

.more-tools h2 {
  margin: 0 0 10px;
  padding-left: 16px;
  color: var(--label-2);
  font-size: 13px;
  font-weight: 600;
}

.more-grid {
  display: grid;
  padding: 5px;
  gap: 2px;
  border-radius: var(--r-lg);
  background: var(--fill-3);
  grid-template-columns: repeat(2, 1fr);
}

.more-link {
  display: flex;
  min-height: 58px;
  padding: 10px 12px;
  align-items: center;
  gap: 11px;
  border-radius: var(--r-md);
  color: var(--label);
  transition: background .18s var(--ease), transform .18s var(--ease);
}

.more-link:hover { background: var(--fill-1); }
.more-link:active { transform: scale(.985); }

.more-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border-radius: 9px;
  background: var(--tint, linear-gradient(160deg, #5ac8fa, var(--blue)));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
  color: #fff;
  font-size: 14px;
  font-weight: 640;
}

.more-link > span:last-child { display: grid; min-width: 0; gap: 0; }
.more-link strong { font-size: 15px; font-weight: 560; }

.more-link small {
  overflow: hidden;
  color: var(--label-2);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================ 页脚 */

.footer {
  margin-top: 44px;
  padding: 26px 0 34px;
  border-top: 1px solid var(--separator);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  color: var(--label-3);
  font-size: 12.5px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--label-2);
  font-weight: 580;
}

.footer-dot { width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(160deg, #5ac8fa, var(--blue)); }
.footer a { margin-left: auto; color: var(--blue); }

/* ============================================================ 王者战力 */

.platform-grid { display: grid; gap: 8px; grid-template-columns: repeat(4, 1fr); }

.platform-option {
  display: grid;
  min-height: 62px;
  padding: 10px;
  place-content: center;
  gap: 2px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--fill-1);
  color: var(--label);
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  transition: background .2s var(--ease), transform .18s var(--ease), box-shadow .2s var(--ease);
}

.platform-option strong { font-size: 14.5px; font-weight: 570; }
.platform-option small { color: var(--label-3); font-size: 11px; }
.platform-option:active { transform: scale(.96); }

.platform-option[aria-pressed="true"] {
  background: var(--blue);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 4px 14px -6px color-mix(in srgb, var(--blue) 80%, transparent);
  color: #fff;
}

.platform-option[aria-pressed="true"] small { color: rgba(255, 255, 255, .72); }

.search-status {
  display: flex;
  margin-top: 14px;
  padding: 11px 14px;
  align-items: center;
  gap: 9px;
  border-radius: var(--r-md);
  background: var(--fill-3);
  color: var(--label-2);
  font-size: 13px;
}

.search-spinner {
  width: 15px;
  height: 15px;
  flex: none;
  border: 2px solid var(--label-3);
  border-top-color: var(--blue);
  border-radius: 50%;
  opacity: 0;
}

.search-status.loading .search-spinner { opacity: 1; animation: spin .8s linear infinite; }

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

.king-result { margin-top: 16px; padding: 18px; border-radius: var(--r-lg); background: var(--fill-3); }

.hero-summary { display: flex; align-items: center; gap: 15px; }

.hero-photo {
  width: 74px;
  height: 74px;
  flex: none;
  border-radius: 19px;
  background: var(--fill-1);
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}

.hero-summary h2 { margin: 0; font-size: 22px; font-weight: 680; letter-spacing: -.028em; }
.hero-alias { margin: 2px 0 7px; color: var(--label-2); font-size: 13.5px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 7px; }

.hero-meta span {
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--fill-1);
  color: var(--label-2);
  font-size: 11.5px;
  font-weight: 560;
}

.power-grid { display: grid; margin-top: 16px; gap: 8px; grid-template-columns: repeat(4, 1fr); }

.power-card {
  display: grid;
  padding: 14px;
  gap: 3px;
  border-radius: var(--r-md);
  background: var(--elevated);
  box-shadow: var(--shadow-sm);
}

.power-card small { color: var(--label-2); font-size: 11.5px; font-weight: 560; }
.power-card strong { font-size: 21px; font-weight: 680; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.power-card span { overflow: hidden; color: var(--label-3); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }

.power-card.national { background: linear-gradient(160deg, var(--orange), var(--pink)); color: #fff; }
.power-card.national small,
.power-card.national span { color: rgba(255, 255, 255, .8); }

.result-foot {
  display: flex;
  margin-top: 16px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--label-2);
  font-size: 12.5px;
}

/* ============================================================ 字符画 */

.ascii-output {
  min-height: 240px;
  margin: 14px 0 0;
  padding: 18px;
  overflow: auto;
  border-radius: var(--r-md);
  background: #0b0d10;
  color: #7ff0c8;
  font-family: "Noto Sans Mono CJK SC", "Sarasa Mono SC", "SF Mono", "SimSun", Consolas, monospace;
  font-size: 15px;
  line-height: 1.15;
  letter-spacing: 0;
  white-space: pre;
}

/* ============================================================ 昵称测试 */

.fortune-result {
  display: grid;
  min-height: 320px;
  padding: 26px;
  place-items: center;
  border-radius: var(--r-lg);
  background: var(--fill-3);
  text-align: center;
}

.fortune-result h3 { margin: 18px 0 6px; font-size: 22px; font-weight: 680; letter-spacing: -.028em; }
.fortune-result p { max-width: 34ch; margin: 0; color: var(--label-2); font-size: 14px; line-height: 1.5; }
.fortune-result.testing { opacity: .72; }

.fortune-score {
  position: relative;
  display: grid;
  width: 148px;
  height: 148px;
  margin: 0 auto;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--blue) var(--score, 0%), var(--fill-1) 0);
}

.fortune-score::before {
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  content: "";
}

.fortune-score strong {
  position: relative;
  font-size: 44px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
}

/* ============================================================ 文本统计 */

.text-stats {
  display: grid;
  margin-top: 12px;
  padding: 5px;
  gap: 2px;
  border-radius: var(--r-md);
  background: var(--fill-3);
  grid-template-columns: repeat(4, 1fr);
}

.text-stat {
  display: grid;
  padding: 12px 8px;
  place-items: center;
  gap: 2px;
  border-radius: var(--r-sm);
  text-align: center;
}

.text-stat strong { font-size: 20px; font-weight: 680; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.text-stat span { color: var(--label-2); font-size: 11.5px; }

/* ============================================================ Toast */

.toast {
  position: fixed;
  z-index: 200;
  bottom: 26px;
  left: 50%;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: var(--r-pill);
  background-color: var(--glass-fill-thick);
  color: var(--label);
  font-size: 14.5px;
  font-weight: 560;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 14px) scale(.94);
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}

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

/* ============================================================ 推广位 */

.ad-dock {
  position: fixed;
  z-index: 90;
  right: var(--gutter);
  bottom: 18px;
  left: var(--gutter);
  display: flex;
  width: min(720px, calc(100% - var(--gutter) * 2));
  margin-inline: auto;
  padding: 10px 10px 10px 16px;
  align-items: center;
  gap: 12px;
  border-radius: var(--r-lg);
  background-color: var(--glass-fill-thick);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}

.ad-dock.hidden { opacity: 0; pointer-events: none; transform: translateY(14px); }

.ad-label {
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--fill-1);
  color: var(--label-3);
  font-size: 10.5px;
  font-weight: 600;
}

.ad-copy { display: grid; min-width: 0; gap: 1px; }
.ad-copy strong { font-size: 14.5px; font-weight: 590; }

.ad-copy span {
  overflow: hidden;
  color: var(--label-2);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-action { min-height: 36px; margin-left: auto; padding: 0 15px; font-size: 14px; }

.modal-backdrop {
  position: fixed;
  z-index: 190;
  display: grid;
  inset: 0;
  padding: var(--gutter);
  place-items: center;
  background: rgba(0, 0, 0, .34);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal-backdrop.show { opacity: 1; pointer-events: auto; }

.ad-modal {
  position: relative;
  width: min(380px, 100%);
  padding: 26px;
  border-radius: var(--r-xl);
  background-color: var(--glass-fill-thick);
  text-align: center;
  transform: scale(.92);
  transition: transform .38s var(--ease-out);
}

.modal-backdrop.show .ad-modal { transform: scale(1); }

.ad-modal-close { position: absolute; top: 14px; right: 14px; }

.ad-modal-icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 4px auto 0;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(160deg, var(--pink), var(--orange));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), var(--shadow-sm);
  color: #fff;
  font-size: 26px;
}

.ad-modal h3 { margin: 12px 0 8px; font-size: 22px; font-weight: 680; letter-spacing: -.028em; }
.ad-modal h3 br { display: none; }
.ad-modal p { margin: 0 0 18px; color: var(--label-2); font-size: 14px; line-height: 1.5; }
.ad-modal .primary-btn { width: 100%; }
.ad-disclaimer { display: block; margin-top: 12px; color: var(--label-3); font-size: 11.5px; }

/* ============================================================ 响应式 */

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
  .power-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .topbar { top: 8px; min-height: 50px; margin-top: 8px; padding-left: 11px; gap: 8px; }
  .brand > span:last-child { display: none; }
  .top-nav a:not(.back-link) { display: none; }
  .top-nav { margin-inline: 0 auto; }
  .page-heading { padding: 12px 0 20px; }
  .page-heading > .tool-icon { display: none; }
  .tool-shell { padding: 16px; }
  .app-row { min-height: 56px; padding: 10px; gap: 11px; }
  .app-body small { font-size: 12.5px; }

  /* 手机上两列放不下横排，改成图标在上、文字在下的磁贴 */
  .app-list { gap: 2px; }

  .app-list .app-row {
    display: grid;
    min-height: 108px;
    padding: 12px;
    align-content: start;
    gap: 9px;
  }

  .app-list .app-icon { width: 34px; height: 34px; border-radius: 9px; font-size: 15px; }
  .app-list .app-body strong { font-size: 14.5px; }
  .app-list .app-body small { font-size: 11.5px; line-height: 1.4; white-space: normal; }
  .app-list .app-chevron { display: none; }
  .app-list .app-trail { position: absolute; top: 11px; right: 11px; margin: 0; }
  .more-grid { grid-template-columns: 1fr; }
  .text-stats { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer a { margin-left: 0; }
  .ad-dock { bottom: 12px; padding-left: 12px; }
  .ad-label { display: none; }
}

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