/* ==========================================================
   LINKPARK lite
   一张纸的底色，一条一条的清单，点开就走。
   全站一种字体：Noto Sans SC（Google Fonts 在线引入）。
   ========================================================== */

:root {
  /* 纸感底色，但比原来的暖黄更亮、更中性，长时间读不累 */
  --bg: #fbf9f4;
  --text: #26231e;
  --text-soft: #4d483f;
  --text-dim: #7d766a;
  --primary: #a08360;
  --primary-deep: #7d6244;
  --field: #fffefb;
  --field-line: #ddd7c9;
  --hover: #f1ede3;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 全站统一字体：包括搜索框、按钮、代码样式 */
input, button, textarea, select, code {
  font-family: inherit;
}

.wrap {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- 顶栏：整块吸顶，滚动时贴在顶部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  padding-top: 18px;
  padding-bottom: 6px;
}

/* 吸顶时下沿用一层透明渐变收边，不画线、不留硬边 */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--bg), rgba(251, 249, 244, 0));
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 40px;
}

.brand {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text);
  text-decoration: none;
  flex: 0 0 auto;
}

.tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

.search {
  width: 100%;
  max-width: 280px;
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  background: var(--field);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s;
}

.search::placeholder { color: var(--text-dim); }

.search:focus { border-color: var(--primary); }

/* ---------- 平台切换：文字页签，不加框 ---------- */
.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  /* 水平方向保持 auto，跟着 wrap 一起居中 */
  margin: 20px auto 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  min-width: 0;
}

.tab {
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--text-dim);
  font-size: 13.5px;
  cursor: pointer;
  transition: color 0.15s;
}

.tab:hover { color: var(--text-soft); }

.tab.is-on {
  color: var(--primary-deep);
  font-weight: 700;
}

.count {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

/* ---------- 列表：条目之间只用留白 ---------- */
.list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* 与吸顶菜单拉开距离 */
  margin-top: 20px;
}

.row {
  display: block;
  /* 上下 12px、左右 24px：左右翻倍，文字位置靠负 margin 抵回来 */
  padding: 12px 24px;
  margin: 0 -24px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s;
}

.row:hover { background: var(--hover); }

.row-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row:hover .row-title { color: var(--primary-deep); }

/* URL 独立一行：图标、域名、箭头三者按同一中线对齐 */
.row-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-top: 4px;
  font-size: 13.5px;
  line-height: 1.2;
  color: var(--text-dim);
  white-space: nowrap;
}

.row-host {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 箭头用 SVG，和三段文字同一中线，不依赖字体 */
.row-arrow {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  opacity: 0.65;
}

.row-icon {
  flex: 0 0 auto;
  display: block;
  width: 14px;
  height: 14px;
  margin: 1px 0 0;
  object-fit: contain;
  opacity: 0.85;
}

.row-icon svg { display: block; width: 14px; height: 14px; }

.row-desc {
  margin: 6px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-soft);
  /* 不截断：写多长就占多少行，长英文/URL 一律按字符断开 */
  word-break: break-all;
}

/* 每条下面的一行小字标签，不加框 */
.row-tags {
  margin: 5px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-dim);
}

.row-tags span + span::before {
  content: "·";
  margin: 0 6px;
  opacity: 0.6;
}

/* ---------- 底部标签云 ---------- */
.cloud {
  margin-top: 42px;
  padding-bottom: 8px;
}

.cloud-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.cloud-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary-deep);
  font-size: 12.5px;
  cursor: pointer;
}

.link-btn:hover { text-decoration: underline; }

.cloud-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 20px;
  margin-top: 16px;
}

.cloud-tag {
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--text-soft);
  line-height: 1.4;
  cursor: pointer;
  transition: color 0.15s;
}

.cloud-tag:hover { color: var(--text); }

.cloud-tag.is-on {
  color: var(--primary-deep);
  font-weight: 700;
}

/* ---------- 空态 / 页脚 ---------- */
.empty {
  padding: 32px 6px;
  font-size: 14px;
  color: var(--text-dim);
}

.site-footer {
  margin-top: 48px;
  padding: 0 0 32px;
  font-size: 12px;
  color: var(--text-dim);
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* ---------- 窄屏 ---------- */
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }

  /* 手机上顶栏压薄：吸顶会一直占着屏幕 */
  .site-header { padding-top: 12px; padding-bottom: 4px; }

  .brand { font-size: 13px; letter-spacing: 0.14em; }

  .search { max-width: none; }

  .bar { margin-top: 14px; }

  .tabs { gap: 12px; }

  /* 站点数在页脚也有，窄屏先让位给页签 */
  .count { display: none; }

  /* 窄屏左右只留 18px，正好铺到屏幕边，不横向溢出 */
  .row { padding: 12px 18px; margin: 0 -18px; }

  /* 窄屏标题允许折行，行高收紧；最多两行，再长才省略 */
  .row-title {
    font-size: 21px;
    line-height: 1.3;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .cloud { margin-top: 34px; }

  .cloud-body { gap: 6px 14px; }
}


