/* ========== 星河导航 · 样式表 ========== */
:root {
  --bg: #f4f7fd;
  --bg-soft: #eaf0fb;
  --card: #ffffff;
  --text: #0f172a;
  --text-2: #5a6b8c;
  --text-3: #8b9ab5;
  --border: #e5ecf8;
  --border-strong: #d5e1f5;
  --brand: #2563eb;
  --brand-2: #7c3aed;
  --brand-3: #06b6d4;
  --brand-soft: rgba(37, 99, 235, .08);
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 14px rgba(15, 23, 42, .05);
  --shadow-2: 0 10px 30px rgba(37, 99, 235, .14), 0 2px 8px rgba(15, 23, 42, .06);
  --header-bg: rgba(255, 255, 255, .82);
  --radius: 16px;
  --maxw: 1440px;
}

[data-theme="dark"] {
  --bg: #080d1b;
  --bg-soft: #0e1526;
  --card: #111a2e;
  --text: #e9eefb;
  --text-2: #94a4c4;
  --text-3: #6b7c9e;
  --border: #1d2a45;
  --border-strong: #28395c;
  --brand: #5b8cff;
  --brand-2: #a678ff;
  --brand-soft: rgba(91, 140, 255, .12);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  --shadow-2: 0 14px 34px rgba(0, 0, 0, .45), 0 0 0 1px rgba(91, 140, 255, .25);
  --header-bg: rgba(8, 13, 27, .78);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 132px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "HarmonyOS Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  transition: background .3s ease, color .3s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 460px at 12% -8%, rgba(37, 99, 235, .16), transparent 60%),
    radial-gradient(760px 420px at 88% 2%, rgba(124, 58, 237, .14), transparent 62%),
    radial-gradient(700px 400px at 50% 105%, rgba(6, 182, 212, .10), transparent 60%);
}

[data-theme="dark"] body::before {
  background:
    radial-gradient(900px 460px at 12% -8%, rgba(91, 140, 255, .18), transparent 60%),
    radial-gradient(760px 420px at 88% 2%, rgba(166, 120, 255, .16), transparent 62%),
    radial-gradient(700px 400px at 50% 105%, rgba(6, 182, 212, .10), transparent 60%);
}

a { color: inherit; text-decoration: none; }

/* ---------- 顶部导航 ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s, background .25s;
}

.header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 6px 24px rgba(15, 23, 42, .06);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 11px; flex: none; }

.brand-mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 19px;
  box-shadow: 0 6px 18px rgba(37, 99, 235, .35);
}

.brand-text b {
  display: block;
  font-size: 17px;
  letter-spacing: .5px;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text span { display: block; font-size: 11px; color: var(--text-3); letter-spacing: 2px; }

.search-box {
  flex: 1;
  max-width: 620px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg { position: absolute; left: 15px; width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }

.search-box input {
  width: 100%;
  height: 46px;
  padding: 0 92px 0 43px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.search-box input::placeholder { color: var(--text-3); }

.search-box input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.kbd {
  position: absolute; right: 14px;
  font-size: 11px; color: var(--text-3);
  border: 1px solid var(--border-strong);
  border-radius: 6px; padding: 2px 7px;
  background: var(--bg-soft);
}

.search-clear {
  position: absolute; right: 12px;
  width: 24px; height: 24px; border-radius: 50%;
  border: none; cursor: pointer;
  display: none; place-items: center;
  background: var(--bg-soft); color: var(--text-2);
  font-size: 15px; line-height: 1;
}
.search-clear.show { display: grid; }

.icon-btn {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--text-2);
  display: grid; place-items: center;
  cursor: pointer;
  transition: all .2s;
}
.icon-btn:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-1px); }

.icon-btn.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 16px rgba(37, 99, 235, .32);
}
.icon-btn.active:hover { color: #fff; transform: translateY(-1px); }

/* 我的常用 分区高亮 */
.section.mine .section-head .bar { background: linear-gradient(180deg, #f59e0b, #ef4444); }
.section.mine .card { border-color: rgba(245, 158, 11, .32); background: linear-gradient(180deg, rgba(245, 158, 11, .05), transparent 60%), var(--card); }
.section.mine .card::before { background: linear-gradient(180deg, #f59e0b, #ef4444); }

/* 页脚文字按钮 */
.link-btn {
  border: none; background: none; padding: 0;
  color: var(--brand); font-size: inherit; font-family: inherit;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}

/* 轻提示 */
.toast {
  position: fixed;
  left: 50%; bottom: 40px;
  transform: translate(-50%, 20px);
  z-index: 200;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(120deg, rgba(15, 23, 42, .94), rgba(37, 99, 235, .92));
  box-shadow: 0 10px 26px rgba(15, 23, 42, .28);
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 布局 ---------- */
.layout {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 64px;
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

/* ---------- 侧栏分类 ---------- */
.sidebar { position: sticky; top: 88px; }

.side-title { font-size: 12px; color: var(--text-3); letter-spacing: 1.5px; padding: 0 12px 8px; }

.cat-nav { display: flex; flex-direction: column; gap: 2px; }

.cat-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-2);
  transition: all .18s;
  position: relative;
}

.cat-nav a:hover { background: var(--brand-soft); color: var(--brand); }

.cat-nav a.active {
  background: linear-gradient(120deg, rgba(37, 99, 235, .12), rgba(124, 58, 237, .12));
  color: var(--brand);
  font-weight: 600;
}

.cat-nav a.active::before {
  content: ""; position: absolute; left: -24px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 3px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}

.cat-nav a.hidden, .cat-scroll a.hidden { display: none; }
.cat-nav .ico { width: 20px; text-align: center; font-size: 15px; }
.cat-nav .cnt { margin-left: auto; font-size: 11px; color: var(--text-3); }

/* 移动端分类条 */
.cat-scroll {
  display: none;
  position: sticky; top: 64px; z-index: 50;
  margin: 0 -24px;
  padding: 10px 24px;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-scroll .chips { display: flex; gap: 8px; }
.cat-scroll a {
  flex: none;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-2);
  border: 1px solid var(--border-strong);
  background: var(--card);
  white-space: nowrap;
}
.cat-scroll a.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  border-radius: 24px;
  padding: 40px 40px 34px;
  margin: 22px 0 30px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(125deg, #1e40af 0%, #2563eb 38%, #7c3aed 78%, #a855f7 100%);
  box-shadow: 0 22px 48px rgba(37, 99, 235, .28);
}

.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(520px 260px at 92% 12%, rgba(255, 255, 255, .22), transparent 62%),
    radial-gradient(420px 220px at 8% 96%, rgba(6, 182, 212, .35), transparent 60%);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 2; }

.hero h1 { margin: 0 0 10px; font-size: 32px; letter-spacing: 1px; font-weight: 800; }

.hero p { margin: 0 0 22px; font-size: 15px; color: rgba(255, 255, 255, .88); }

.hero-stats { display: flex; flex-wrap: wrap; gap: 26px; }

.stat b { display: block; font-size: 24px; font-weight: 800; letter-spacing: .5px; }
.stat span { font-size: 12px; color: rgba(255, 255, 255, .8); }

/* ---------- 分区 ---------- */
.section { margin-bottom: 34px; scroll-margin-top: 130px; }

.section-head {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 16px;
}

.section-head .bar {
  width: 4px; height: 20px; border-radius: 4px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}

.section-head h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: .5px; }
.section-head .emoji { font-size: 18px; }
.section-head .count { font-size: 12px; color: var(--text-3); }
.section-head .line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-strong), transparent); }

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

/* ---------- 卡片 ---------- */
.card {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  transition: transform .22s cubic-bezier(.2, .8, .3, 1), box-shadow .22s, border-color .22s;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  opacity: 0;
  transition: opacity .22s;
}

.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.card:hover::before { opacity: 1; }

.logo {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 11px;
  display: grid; place-items: center;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 17px; font-weight: 700; color: #fff;
}

.logo img { width: 26px; height: 26px; object-fit: contain; display: block; }

.card-body { min-width: 0; flex: 1; }

.card-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 14.5px; font-weight: 600;
  margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.card-title .hot {
  flex: none;
  font-size: 10px; font-weight: 600;
  padding: 1px 5px; border-radius: 5px;
  color: #d9480f;
  background: #fff0e6;
}

.card-desc {
  margin: 0;
  font-size: 12.2px;
  line-height: 1.55;
  color: var(--text-2);
  height: 2.9em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 5px;
}

.card-domain {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.visits {
  flex: none;
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 6px;
  padding: 1px 6px;
  white-space: nowrap;
}
.visits:empty { display: none; }

.card-go {
  position: absolute; right: 10px; top: 10px;
  opacity: 0; transform: translate(-3px, 3px);
  transition: all .22s;
  color: var(--brand);
  font-size: 13px;
}
.card:hover .card-go { opacity: 1; transform: none; }

.card.hidden { display: none; }
.section.hidden { display: none; }

/* 空状态 */
.empty {
  display: none;
  text-align: center;
  padding: 70px 20px;
  color: var(--text-3);
}
.empty.show { display: block; }
.empty b { display: block; font-size: 17px; color: var(--text-2); margin-bottom: 6px; }

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 80;
  width: 44px; height: 44px; border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--brand);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  opacity: 0; pointer-events: none;
  transform: translateY(12px);
  transition: all .25s;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { box-shadow: var(--shadow-2); }

/* ---------- 页脚 ---------- */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 26px 24px 34px;
  text-align: center;
  color: var(--text-3);
  font-size: 12.5px;
}
.footer a { color: var(--brand); }

/* ---------- 自定义站点：删除按钮 ---------- */
.card-del {
  position: absolute;
  right: 6px; bottom: 6px;
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  color: var(--text-3);
  display: grid; place-items: center;
  font-size: 14px; line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: all .18s;
}
.card:hover .card-del { opacity: 1; }
.card-del:hover { color: #fff; background: #ef4444; border-color: #ef4444; }

.card.custom { border-style: dashed; }
.card.custom .card-title .tag {
  flex: none; font-size: 10px; font-weight: 600;
  padding: 1px 5px; border-radius: 5px;
  color: var(--brand-2);
  background: rgba(124, 58, 237, .12);
}

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 300;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.modal.show { display: flex; }

.modal-mask { position: absolute; inset: 0; background: rgba(9, 15, 32, .48); backdrop-filter: blur(3px); }

.modal-card {
  position: relative;
  width: 100%; max-width: 520px;
  max-height: 88vh;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(9, 15, 32, .34);
  animation: pop .22s cubic-bezier(.2, .8, .3, 1);
}

@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-head b { font-size: 16px; }
.modal-x {
  border: none; background: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--text-3);
  padding: 0 4px;
}
.modal-x:hover { color: var(--text); }

.modal-body { padding: 16px 18px; overflow: auto; }

.fld { display: block; margin-bottom: 12px; }
.fld > span { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 5px; }
.fld > span i { color: #ef4444; font-style: normal; }

.fld input, .fld textarea, .fld select {
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.fld textarea { resize: vertical; line-height: 1.5; }
.fld input:focus, .fld textarea:focus, .fld select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
  background: var(--card);
}

.fld-tip { margin: -2px 0 14px; font-size: 11.5px; color: var(--text-3); }

.mine-box { border-top: 1px dashed var(--border-strong); padding-top: 12px; }
.mine-box-head { font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.mine-box-head b { color: var(--brand); }
.mine-list { display: flex; flex-direction: column; gap: 6px; max-height: 190px; overflow: auto; }
.mine-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--bg-soft);
  font-size: 13px;
}
.mine-item .mi-name { font-weight: 600; }
.mine-item .mi-cat { font-size: 11px; color: var(--text-3); }
.mine-item .mi-del {
  margin-left: auto;
  border: none; background: none;
  font-family: inherit; font-size: 12px;
  color: var(--text-3); cursor: pointer;
  padding: 2px 4px;
}
.mine-item .mi-del:hover { color: #ef4444; }
.mine-empty { font-size: 12.5px; color: var(--text-3); padding: 4px 2px; }

.modal-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}
.modal-foot .spacer { flex: 1; }

.btn {
  padding: 8px 16px;
  font-size: 13.5px;
  font-family: inherit;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--text-2);
  cursor: pointer;
  transition: all .18s;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.primary {
  border-color: transparent; color: #fff;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 20px rgba(37, 99, 235, .28);
}
.btn.primary:hover { color: #fff; transform: translateY(-1px); }

/* ---------- 网站索引（SEO 静态正文） ---------- */
.seo-index {
  margin: 26px 0 4px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}
.seo-index summary {
  cursor: pointer;
  font-size: 13.5px; font-weight: 600;
  color: var(--text-2);
  list-style: none;
}
.seo-index summary::-webkit-details-marker { display: none; }
.seo-index summary::before { content: '▸ '; color: var(--brand); }
.seo-index[open] summary::before { content: '▾ '; }
.seo-index-body {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
/* 分类导航条：始终可见，搜索引擎与用户都能直达 19 个分类页 */
.idx-catnav {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; gap: 8px;
  padding-bottom: 12px; margin-bottom: 2px;
  border-bottom: 1px dashed var(--border);
}
.idx-catnav a {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 999px;
  background: var(--bg-2, #f3f5fb); border: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-2); white-space: nowrap;
}
.idx-catnav a i { font-style: normal; font-size: 11px; color: var(--text-3); }
.idx-catnav a:hover { color: var(--brand); border-color: var(--brand); text-decoration: none; }

.idx-group { margin: 0; }
.idx-group h2 {
  display: flex; align-items: baseline; gap: 8px;
  margin: 0 0 7px; padding: 0;
  font-size: 13px; font-weight: 700; line-height: 1.4;
  border: none; background: none;
}
.idx-group h2::before { content: none; }
.idx-group h2 a { color: var(--text); }
.idx-group h2 a:hover { color: var(--brand); text-decoration: underline; }
.idx-group h2 .idx-n { font-size: 11px; font-weight: 400; color: var(--text-3); }

.idx-list { list-style: none; margin: 0; padding: 0; }
.idx-list li {
  padding: 6px 0; border-top: 1px solid var(--border);
  display: grid; grid-template-columns: auto 1fr; gap: 2px 8px;
}
.idx-list li:first-child { border-top: none; }
.idx-name { font-size: 12.5px; font-weight: 600; color: var(--text); }
.idx-name:hover { color: var(--brand); text-decoration: underline; }
.idx-go { font-size: 11px; color: var(--text-3); justify-self: start; }
.idx-go:hover { color: var(--brand); text-decoration: underline; }
.idx-desc {
  grid-column: 2; font-size: 11.5px; line-height: 1.55; color: var(--text-3);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .sidebar { display: none; }
  .cat-scroll { display: block; }
  html { scroll-padding-top: 120px; }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 112px; }
  .header-inner { padding: 10px 16px; gap: 10px; }
  .brand-text span { display: none; }
  .search-box input { height: 42px; font-size: 14px; padding-right: 44px; }
  .kbd { display: none; }
  .layout { padding: 0 14px 48px; }
  .cat-scroll { margin: 0 -14px; padding: 9px 14px; }
  .hero { padding: 26px 20px 22px; border-radius: 18px; margin: 14px 0 22px; }
  .hero h1 { font-size: 23px; }
  .hero p { font-size: 13px; margin-bottom: 16px; }
  .hero-stats { gap: 18px; }
  .stat b { font-size: 20px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; }
  .card { padding: 11px; gap: 9px; border-radius: 13px; }
  .logo { width: 34px; height: 34px; border-radius: 9px; font-size: 14px; }
  .logo img { width: 21px; height: 21px; }
  .card-title { font-size: 13.5px; }
  .card-desc { font-size: 11.4px; height: 3.1em; }
  .card-domain { display: none; }
  .section-head h2 { font-size: 17px; }
  .to-top { right: 14px; bottom: 16px; width: 40px; height: 40px; }
}

@media (max-width: 720px) {
  .modal { padding: 0; align-items: flex-end; }
  .modal-card {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    animation: slideUp .24s cubic-bezier(.2, .8, .3, 1);
  }
  @keyframes slideUp { from { transform: translateY(100%); } }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .spacer { display: none; }
  .btn { flex: 1; text-align: center; }
  .card-del { opacity: 1; }
  .card.custom { border-style: solid; }
}

@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr 1fr; }
}
