/* lanrentool 全站样式 · 原创设计 */

:root {
  --brand: #2b6cb0;
  --brand-dark: #1f5289;
  --bg: #f4f5f7;
  --panel: #ffffff;
  --line: #e2e4e8;
  --line-2: #eef0f2;
  --ink: #22262b;
  --ink-2: #3d444d;
  --muted: #7a828c;
  --head: #f7f8fa;
  --wrap: 1200px;
  --radius: 3px;
}

html[data-theme="dark"] {
  --brand: #63a4e8;
  --brand-dark: #8cbdf0;
  --bg: #1b1e22;
  --panel: #23272c;
  --line: #34393f;
  --line-2: #2c3136;
  --ink: #dfe3e8;
  --ink-2: #b9c0c8;
  --muted: #878f99;
  --head: #2a2f34;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.65 "Microsoft YaHei", "Hiragino Sans GB", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--brand); text-decoration: none; }
a:visited { color: var(--brand); }
a:hover { color: var(--brand-dark); text-decoration: underline; }

h1, h2, h3, h4 { font-weight: 700; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
b, strong { font-weight: 700; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 14px; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 58px;
}
.logo {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .5px;
  white-space: nowrap;
}
.logo:hover { color: var(--brand); text-decoration: none; }
.logo span {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  vertical-align: 1px;
}

.topsearch { position: relative; flex: 1; max-width: 420px; }
.topsearch input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}
.topsearch input:focus { border-color: var(--brand); }
.topsearch-out {
  position: absolute;
  top: 36px;
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  max-height: 380px;
  overflow: auto;
}
.topsearch-out a {
  display: block;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line-2);
  font-size: 13px;
  color: var(--ink);
}
.topsearch-out a:last-child { border-bottom: 0; }
.topsearch-out a:hover { background: var(--head); text-decoration: none; }
.topsearch-out a i {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}
.topsearch-out .none { display: block; padding: 10px; font-size: 13px; color: var(--muted); }

.toplinks { display: flex; align-items: center; gap: 16px; font-size: 13px; white-space: nowrap; }
.toplinks a { color: var(--ink-2); }
.toplinks a:hover { color: var(--brand); text-decoration: none; }

/* ---------------- 布局：主体 + 右侧菜单 ---------------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 232px;
  gap: 20px;
  align-items: start;
  padding-top: 18px;
  padding-bottom: 34px;
}
.main { min-width: 0; }

.side { position: sticky; top: 14px; }
.side-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.side-box h3 {
  font-size: 13px;
  padding: 9px 12px;
  background: var(--head);
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  color: var(--ink);
}
.side-list { padding: 6px 0; }
.side-list li a {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--ink-2);
}
.side-list li a:hover { background: var(--head); color: var(--brand); text-decoration: none; }
.side-list li a.on { color: var(--brand); font-weight: 700; background: var(--head); }
.side-list li a i { font-style: normal; color: var(--muted); font-size: 12px; }
.side-list.plain li a { display: block; }
.side-note { padding: 10px 12px 12px; font-size: 12px; line-height: 1.7; color: var(--muted); }

/* ---------------- 首页简介 ---------------- */
.intro {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  margin-bottom: 12px;
}
.intro h1 { font-size: 21px; letter-spacing: .5px; }
.intro p { margin-top: 6px; color: var(--muted); font-size: 13px; }

.hero-search { position: relative; margin-top: 14px; }
.hero-search input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}
.hero-search input:focus { border-color: var(--brand); }
.hero-out {
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  max-height: 420px;
  overflow: auto;
}
.hero-out a {
  display: block;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-2);
  font-size: 13.5px;
  color: var(--ink);
}
.hero-out a:last-child { border-bottom: 0; }
.hero-out a:hover { background: var(--head); text-decoration: none; }
.hero-out a i {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  margin-top: 1px;
}

.hotbar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 14px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 2;
}
.hotbar b { color: var(--ink); font-size: 13px; }
.hotbar a {
  display: inline-block;
  margin-right: 12px;
  color: var(--ink-2);
}
.hotbar a:hover { color: var(--brand); }

/* ---------------- 分类区块 ---------------- */
.block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.block-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  background: var(--head);
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--brand);
}
.block-hd h2 { font-size: 14px; letter-spacing: .5px; }
.block-hd span { font-size: 12px; color: var(--muted); }
.block-bd { padding: 14px; }

.tlist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
}
.tlist li {
  border-bottom: 1px solid var(--line-2);
  border-right: 1px solid var(--line-2);
  padding: 9px 14px;
}
.tlist li a {
  display: block;
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 700;
}
.tlist li a:hover { color: var(--brand); text-decoration: none; }
.tlist li em {
  display: block;
  font-style: normal;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rel-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }
.rel-list li {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line-2);
  border-right: 1px solid var(--line-2);
}
.rel-list li a { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.rel-list li a:hover { color: var(--brand); text-decoration: none; }
.rel-list li em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty { padding: 26px 14px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------------- 工具页 ---------------- */
.crumb {
  font-size: 12.5px;
  color: var(--muted);
  padding: 4px 0 10px;
}
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--brand); }
.crumb span { color: var(--ink-2); }

.page-hd { margin-bottom: 4px; }
.page-hd h1 { font-size: 20px; letter-spacing: .5px; }
.page-sub { color: var(--muted); font-size: 13px; margin-bottom: 12px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

/* ---------------- 表单控件 ---------------- */
.field { margin-bottom: 4px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  margin: 10px 0 5px;
}
.field:first-child label, .panel > .field:first-child label { margin-top: 0; }

input[type="text"], input[type="number"], input[type="search"], input[type="date"],
input[type="time"], input[type="datetime-local"], input[type="url"], input[type="email"],
input[type="password"], select, textarea {
  width: 100%;
  padding: 7px 9px;
  font: 13.5px/1.6 "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { min-height: 130px; resize: vertical; }
textarea[readonly] { background: var(--head); color: var(--ink-2); }
input[type="file"] { padding: 5px; font-size: 13px; }
input[type="checkbox"], input[type="radio"] { width: auto; margin-right: 5px; vertical-align: -1px; }
input[type="range"] { width: 100%; padding: 0; }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }

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

.btn {
  display: inline-block;
  padding: 7px 16px;
  font: 13.5px/1.5 "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  cursor: pointer;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.sm { padding: 5px 12px; font-size: 13px; }
.btn.ghost {
  color: var(--brand);
  background: var(--panel);
  border-color: var(--line);
}
.btn.ghost:hover { color: var(--brand-dark); border-color: var(--brand); background: var(--head); }
.btn:disabled { opacity: .55; cursor: default; }

.hint { font-size: 12.5px; color: var(--muted); line-height: 1.75; margin-top: 10px; }
.note { font-size: 12.5px; color: var(--muted); line-height: 1.8; margin-top: 10px; }

/* ---------------- 结果区 ---------------- */
.out {
  display: grid;
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.out > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: var(--panel);
  font-size: 13px;
}
.out > div > span { color: var(--muted); }
.out > div > b { color: var(--ink); font-weight: 700; word-break: break-all; text-align: right; }

table { font-size: 13px; }

/* ---------------- 拖放区 ---------------- */
.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 32px 14px;
  border: 1px dashed #c6cbd2;
  border-radius: var(--radius);
  background: var(--head);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}
.drop b { font-size: 14px; color: var(--ink-2); }
.drop span { font-size: 12.5px; }
.drop.over { border-color: var(--brand); background: rgba(43, 108, 176, .06); }

/* ---------------- 符号表 ---------------- */
.sym-wrap { display: flex; flex-wrap: wrap; gap: 3px; }
.sym-wrap .sym {
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 15px;
  line-height: 1;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
}
.sym-wrap .sym:hover { border-color: var(--brand); color: var(--brand); background: var(--head); }

/* ---------------- 说明 / FAQ ---------------- */
.steps { padding-left: 20px; list-style: decimal; color: var(--ink-2); font-size: 13.5px; line-height: 2; }
.faq { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.faq:last-child { border-bottom: 0; padding-bottom: 0; }
.faq b { font-size: 13.5px; color: var(--ink); }
.faq p { margin-top: 3px; font-size: 13px; color: var(--muted); line-height: 1.8; }

.prose { font-size: 13.5px; line-height: 1.95; color: var(--ink-2); }
.prose p { margin-bottom: 12px; }
.prose p:last-child { margin-bottom: 0; }

/* ---------------- 页脚 ---------------- */
.footer {
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 22px 0 16px;
  font-size: 13px;
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 20px;
}
.footer-about b { font-size: 15px; color: var(--ink); }
.footer-about p { margin-top: 6px; font-size: 12.5px; line-height: 1.8; color: var(--muted); }
.footer-cols h4 { font-size: 13px; margin-bottom: 6px; color: var(--ink); }
.footer-cols li { font-size: 12.5px; line-height: 2; }
.footer-cols li a { color: var(--muted); }
.footer-cols li a:hover { color: var(--brand); }
.footer-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
  font-size: 12px;
  color: var(--muted);
}

/* ---------------- 提示 ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(12px);
  padding: 8px 18px;
  font-size: 13px;
  color: #fff;
  background: #33383e;
  border-radius: var(--radius);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 999;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1020px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; order: 2; }
  .side-box { margin-bottom: 12px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .topbar-in { height: auto; flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .topsearch { order: 3; flex: 1 1 100%; max-width: none; }
  .toplinks { margin-left: auto; gap: 12px; }
  .logo span { display: none; }
  .intro h1 { font-size: 18px; }
  .tlist { grid-template-columns: 1fr; }
  .rel-list { grid-template-columns: 1fr; }
  .tlist li, .rel-list li { border-right: 0; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .panel { padding: 12px; }
  .out > div { flex-direction: column; align-items: flex-start; gap: 2px; }
  .out > div > b { text-align: left; }
  .footer-cols { grid-template-columns: 1fr; }
  .toast { bottom: 20px; }
}
