﻿/* 娓哥帺 路 鎵嬫満绔牱寮忥細鍗曞垪鍗＄墖 + 鍏ㄥ睆璇︽儏锛岃窡闅忕郴缁熸繁娴呰壊銆?*/
/* 閰嶈壊鍙栬嚜鍘熺珯鐨勩€屾繁澶溿€嶄富棰橈細鏆楃传搴?+ 绮夌传寮鸿皟 + 琛嚎涓枃姝ｆ枃 */
:root {
  --bg: #292433;
  --bg-soft: #393140;
  --bg-hi: #4a4051;
  --fg: #f0e8ef;
  --dim: #c1acc3;
  --line: rgba(182, 154, 195, 0.22);
  --accent: #e8aecb;
  --accent-2: #b7a2d8;
  --accent-soft: rgba(232, 174, 203, 0.14);
  --radius: 14px;
  --bar: rgba(51, 43, 59, 0.92);
  --serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", SimSun, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* .sheet/.toast 鑷甫 display锛屼細鐩栨帀 hidden 鐨勯粯璁?display:none锛岃繖閲屾樉寮忓厹浣?*/
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.7 var(--serif);
  -webkit-text-size-adjust: 100%;
}

/* 鍘熺珯閭ｇ椤堕儴鍋忓彸鐨勭传绮夊厜鏅?*/
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 70% 0%, rgba(107, 55, 85, 0.30), transparent 62%);
}

/* 鈹€鈹€ 椤堕儴鏉?鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€ */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: calc(env(safe-area-inset-top) + 10px) 14px 8px;
  background: var(--bar);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 0.5px solid var(--line);
}

.bar-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 0.2px;
}

.dim { color: var(--dim); font-size: 12px; }
.dim b { color: var(--dim); font-weight: 500; }

.search { position: relative; }

.search input {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--fg);
  font-size: 15px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.search input:focus { border-color: var(--accent); }

.clear {
  position: absolute;
  top: 0;
  right: 0;
  width: 34px;
  height: 38px;
  border: 0;
  background: transparent;
  color: var(--dim);
  font-size: 20px;
  line-height: 1;
}

.chips {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.chip {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--dim);
  font-size: 13px;
  font-family: inherit;
}

.chip b { font-weight: 500; opacity: 0.75; }
.chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* 鈹€鈹€ 鍒楄〃 鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€ */
.list {
  padding: 12px 14px calc(env(safe-area-inset-bottom) + 24px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  display: block;
  width: 100%;
  min-width: 0;
  text-align: left;
  overflow: hidden;
  font-family: inherit;
  color: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  transition: background 0.12s;
}

.card:active { background: var(--bg-soft); }
.card[data-ready="0"] { opacity: 0.55; }

.card-name {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  margin-top: 4px;
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--dim);
  font-size: 11.5px;
}

.card-meta .ok { color: var(--accent); }

.empty {
  margin: 40px 0;
  text-align: center;
  color: var(--dim);
  font-size: 14px;
}

/* 鈹€鈹€ 璇︽儏 鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€ */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  animation: rise 0.18s ease-out;
}

@keyframes rise {
  from { transform: translateY(14px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: calc(env(safe-area-inset-top) + 6px) 12px 6px;
  border-bottom: 0.5px solid var(--line);
}

.back {
  width: 34px;
  height: 34px;
  margin-left: -6px;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-size: 30px;
  line-height: 1;
  padding: 0 0 6px;
}

.sheet-title {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 14px 16px 24px;
  font-size: 14px;
  line-height: 1.7;
}

.sheet-body .h-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.sheet-body .tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--dim);
  font-size: 11.5px;
}

.sheet-body .tag.ok { background: var(--accent-soft); color: var(--accent); }

.sheet-body h2 {
  margin: 18px 0 6px;
  font-size: 15px;
  font-weight: 650;
}

.sheet-body h3 {
  margin: 14px 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.sheet-body p { margin: 6px 0; }
.sheet-body ul, .sheet-body ol { margin: 6px 0; padding-left: 20px; }
.sheet-body li { margin: 2px 0; }
.sheet-body hr { border: 0; border-top: 0.5px solid var(--line); margin: 14px 0; }

.sheet-body blockquote {
  margin: 8px 0;
  padding: 6px 12px;
  border-left: 3px solid var(--accent);
  color: var(--dim);
  background: var(--bg-soft);
  border-radius: 0 8px 8px 0;
}

.sheet-body pre {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-soft);
  font-size: 12.5px;
  overflow-x: auto;
}

.sheet-body code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--bg-soft);
  font-size: 12.5px;
}

.sheet-foot {
  padding: 10px 14px calc(env(safe-area-inset-bottom) + 10px);
  border-top: 0.5px solid var(--line);
  background: var(--bg);
}

.primary {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
}

.primary:active { filter: brightness(0.92); }

/* 璇︽儏椤靛簳閮ㄧ殑娆¤鍔ㄤ綔锛堝鍒舵寚浠わ級 */
.secondary {
  width: 100%;
  height: 40px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--dim);
  font-size: 13.5px;
  font-family: inherit;
}

/* 澶嶅埗澶辫触鏃讹紙闈?https锛夐€€鍖栨垚鍙暱鎸夐€夋嫨鐨勮緭鍏ユ */
.manual { margin-top: 8px; }

.manual input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--fg);
  font-size: 15px;
  font-family: inherit;
  text-align: center;
  -webkit-user-select: text;
  user-select: text;
}

.manual-hint {
  margin-top: 4px;
  text-align: center;
  color: var(--dim);
  font-size: 11.5px;
}

/* 鈹€鈹€ toast 鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€ */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 84px);
  transform: translateX(-50%);
  z-index: 30;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(20, 20, 24, 0.9);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  animation: rise 0.16s ease-out;
}
