/* ============ App 通用组件 ============ */
.muted { color: var(--text-2); }
.small { font-size: 12px; }
.card { background: var(--card); border-radius: 16px; box-shadow: inset 0 0 0 .5px var(--line); }

/* 内容滚动区：顶部留出标题栏，并做出“滚动边缘淡出” */
.pane {
  flex: 1; min-width: 0; overflow: auto; position: relative;
  padding: calc(var(--bar-h) + 4px) 28px 28px;
  -webkit-mask-image: linear-gradient(to bottom, transparent calc(var(--bar-h) - 14px), #000 calc(var(--bar-h) + 10px));
  mask-image: linear-gradient(to bottom, transparent calc(var(--bar-h) - 14px), #000 calc(var(--bar-h) + 10px));
}
.pane-head { margin-bottom: 18px; }
.pane-head h2, .pane h2 { margin: 0 0 4px; font-size: 22px; font-weight: 700; letter-spacing: .01em; }
.pane-head p { margin: 0; }
.sub-title { font-size: 13px; font-weight: 700; color: var(--text-2); margin: 24px 0 10px; letter-spacing: .04em; }

.avatar {
  display: inline-grid; place-items: center; flex: none; overflow: hidden;
  border-radius: 50%; color: #fff; font-weight: 700;
  background: radial-gradient(circle at 30% 25%, #9fb8ff, transparent 55%), linear-gradient(140deg, #4c7dff, #9a6bff 60%, #ff6fae);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45), 0 6px 18px rgba(60, 70, 200, .3);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 40px; height: 40px; font-size: 18px; }
.avatar-md { width: 46px; height: 46px; font-size: 20px; }
.avatar-lg { width: 64px; height: 64px; font-size: 28px; }
.avatar-xl { width: 96px; height: 96px; font-size: 42px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  background: var(--card); box-shadow: inset 0 0 0 .5px var(--line-2);
  cursor: pointer; text-decoration: none !important; color: var(--text);
  transition: background .15s, transform .25s var(--ease-spring);
}
.btn:hover { background: var(--card-hover); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .45; cursor: default; }
.btn .glyph { width: 15px; height: 15px; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn.ghost { background: none; box-shadow: none; padding: 0 8px 0 4px; color: var(--accent); }
.btn.small { height: 26px; padding: 0 12px; font-size: 12px; }
.icon-btn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); flex: none; cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--hover); color: var(--accent); }
.icon-btn .glyph { width: 16px; height: 16px; }

/* 标题栏工具 */
.tool-text { font-size: 12px; color: var(--text-3); padding-right: 4px; }
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--hover); box-shadow: inset 0 0 0 .5px var(--line); }
.seg button { height: 24px; min-width: 30px; padding: 0 9px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.seg button .glyph { width: 15px; height: 15px; }
.seg button.on { background: var(--surface-solid); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .14); }
.seg.wide button { padding: 0 14px; }
.search { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 9px; background: var(--hover); box-shadow: inset 0 0 0 .5px var(--line); color: var(--text-3); }
.search .glyph { width: 14px; height: 14px; }
.search input { border: 0; background: none; width: 130px; font-size: 13px; color: var(--text); }
.search input::-webkit-search-cancel-button { display: none; }

/* 侧栏布局 */
.split { flex: 1; display: flex; min-width: 0; position: relative; }
/* 侧边栏：贴边（macOS 27） */
.side {
  width: 200px; flex: none;
  background: var(--side-bg); box-shadow: inset -.5px 0 0 var(--line-2);
  -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6);
  padding: calc(var(--bar-h) + 2px) 10px 10px;
  overflow: auto; display: flex; flex-direction: column; gap: 2px;
}
.side-title { font-size: 11px; font-weight: 700; color: var(--text-3); padding: 4px 10px; }
.side-item { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; border-radius: 7px; font-size: 13px; text-align: left; cursor: pointer; flex: none; }
.side-item small { margin-left: auto; color: var(--text-3); font-size: 12px; }
.side-item:hover { background: var(--hover); }
.side-item.active { background: rgba(0, 0, 0, .08); }
[data-theme="dark"] .side-item.active { background: rgba(255, 255, 255, .1); }
.side-item.active .side-ico { box-shadow: 0 0 0 2px var(--accent-soft); }
.side-ico { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: var(--accent); color: #fff; flex: none; }
.side-ico .glyph { width: 14px; height: 14px; }

.toast {
  position: absolute; left: 50%; bottom: 28px; z-index: 10; transform: translateX(-50%);
  padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--text); color: var(--surface-solid);
  animation: toast-in .25s var(--ease-spring);
  transition: opacity .3s, transform .3s;
}
.toast.out { opacity: 0; transform: translate(-50%, 6px); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px) scale(.95); } }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; }
.empty-state.small { padding: 40px 0; }
.empty-state h3 { margin: 10px 0 2px; font-size: 17px; }
.empty-state p { margin: 0; line-height: 1.7; }
.empty-ico { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 22px; background: var(--card); color: var(--text-3); box-shadow: inset 0 0 0 .5px var(--line); }
.empty-ico .glyph { width: 36px; height: 36px; stroke-width: 1.4; }

.prose { line-height: 1.8; font-size: 14.5px; }
.prose h3 { font-size: 16px; margin: 22px 0 6px; }
.prose p { margin: 0 0 12px; }
.prose ol, .prose ul { padding-left: 1.4em; }
.prose li { margin: 4px 0; }
.prose code { font-family: var(--mono); font-size: .88em; padding: 1px 6px; border-radius: 5px; background: var(--hover); }

/* ============ 关于我 ============ */
.about { display: grid; grid-template-columns: 230px 1fr; gap: 28px; align-items: start; }
.about-card { padding: 24px 18px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; position: sticky; top: 0; }
.about-card h2 { margin: 12px 0 0; }
.about-card .muted { margin: 0; font-size: 13px; }
.about-loc { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); margin: 6px 0 12px; }
.about-loc .glyph { width: 13px; height: 13px; }
.about-card .tags { justify-content: center; }
.about-actions { display: flex; gap: 8px; margin-top: 18px; }
.about-main p { margin: 0 0 12px; line-height: 1.85; font-size: 14.5px; }
.about-motto { font-size: 22px !important; font-weight: 700; line-height: 1.4 !important; margin-bottom: 16px !important;
  background: linear-gradient(110deg, var(--text) 30%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.stat { padding: 14px; display: flex; flex-direction: column; }
.stat b { font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--text-2); }
.now-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.now-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.now-list i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); flex: none; }

/* ============ 技能 ============ */
.skill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.skill-card {
  padding: 22px 20px; display: flex; flex-direction: column; gap: 4px;
  animation: pop-in .5s var(--ease-spring) both; animation-delay: calc(var(--i) * 70ms + .05s);
}
.skill-card b { font-size: 18px; margin-top: 12px; }
.skill-card .muted { font-size: 13px; }
.skill-ico {
  width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .35), transparent 55%), linear-gradient(140deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent);
}
.skill-ico .glyph { width: 24px; height: 24px; }

/* ============ 作品集 ============ */
.proj-results.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.proj-card { display: flex; flex-direction: column; text-align: left; overflow: hidden; cursor: pointer; transition: transform .3s var(--ease-spring), box-shadow .2s; }
.proj-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 .5px var(--line), 0 12px 30px rgba(0, 0, 0, .14); }
.proj-cover {
  position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; color: rgba(255, 255, 255, .92);
  background: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, .35), transparent 50%), linear-gradient(140deg, var(--c1), var(--c2));
  overflow: hidden;
}
.proj-cover::after { content: ""; position: absolute; width: 140%; height: 60%; left: -20%; bottom: -30%; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.proj-cover .glyph { width: 38%; height: 38%; stroke-width: 1.3; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .2)); }
.proj-year { position: absolute; right: 10px; top: 8px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .2); }
.proj-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.proj-body b { font-size: 14px; }
.proj-body span { font-size: 12.5px; line-height: 1.5; }
.proj-results.list { display: flex; flex-direction: column; }
.proj-row { display: grid; grid-template-columns: 44px 150px 1fr 50px 44px; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; text-align: left; font-size: 13px; cursor: pointer; }
.proj-row:nth-child(odd) { background: var(--hover); }
.proj-row:hover { background: var(--accent-soft); }
.proj-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-row small { color: var(--text-3); }
.proj-cover.mini { width: 44px; aspect-ratio: 1; border-radius: 10px; }
.proj-cover.mini .proj-year, .proj-cover.mini::after { display: none; }
.proj-cover.big { border-radius: 18px; margin: 10px 0 18px; max-height: 260px; width: 100%; }
.proj-detail { position: absolute; inset: 0; z-index: 2; display: flex; background: var(--surface-solid); animation: slide-in .3s var(--ease-out); }
.proj-detail.out { animation: slide-out .22s ease-in forwards; }
.proj-detail .pane > .selectable p { line-height: 1.8; }
.proj-detail .tags { margin: 12px 0 20px; }
@keyframes slide-in { from { transform: translateX(30px); opacity: 0; } }
@keyframes slide-out { to { transform: translateX(30px); opacity: 0; } }

/* ============ 经历（已停用） ============ */
.tl { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.tl::before { content: ""; position: absolute; left: 63px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: linear-gradient(var(--accent), var(--line-2)); }
.tl-item { display: grid; grid-template-columns: 52px 1fr; gap: 26px; position: relative; margin-bottom: 16px; animation: tl-in .5s var(--ease-out) both; animation-delay: calc(var(--i) * 70ms + .1s); }
.tl-dot { position: absolute; left: 54px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface-solid); border: 3px solid var(--accent); }
.tl-date { font-size: 13px; font-weight: 700; color: var(--text-2); padding-top: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.tl-card { padding: 12px 16px; }
.tl-card b { display: block; font-size: 15px; }
.tl-card p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.7; }
@keyframes tl-in { from { opacity: 0; transform: translateY(10px); } }

/* ============ 笔记 ============ */
.notes .side { width: 250px; gap: 4px; }
.note-item { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 11px; text-align: left; cursor: pointer; flex: none; }
.note-item b { font-size: 13.5px; }
.note-text > span { font-size: 12px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-item small { color: var(--text-3); font-weight: 600; margin-right: 4px; }
.note-item:hover { background: var(--hover); }
.note-item.active { background: color-mix(in srgb, #f5a524 22%, transparent); }
.note-view { padding-left: 36px; padding-right: 36px; }
.note-view h1 { font-size: 26px; margin: 4px 0 16px; }
.note-meta { font-size: 12px; }
.m-only { display: none !important; }

/* ============ 联系我 ============ */
.contact-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.contact-head h2 { margin: 0; }
.contact-head p { margin: 2px 0 0; }
.contact-list { display: grid; gap: 8px; }
.contact-card { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; }
.contact-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.contact-ico .glyph { width: 18px; height: 18px; }
.contact-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.contact-text small { font-size: 11px; }
.contact-text b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose { margin-top: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.compose h3 { margin: 0; font-size: 15px; }
.compose input, .compose textarea {
  width: 100%; border: 0; border-radius: 10px; padding: 9px 12px; font-size: 14px;
  background: var(--surface-solid); box-shadow: inset 0 0 0 .5px var(--line-2); resize: vertical;
}
.compose input:focus, .compose textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.compose-foot { display: flex; align-items: center; justify-content: space-between; }

/* ============ 终端 ============ */
.app-terminal .win-frame { background: rgba(16, 17, 22, .86); }
.app-terminal .win-title { color: rgba(255, 255, 255, .55); }
.app-terminal .win-ctrl { background: rgba(255, 255, 255, .06); }
.term {
  flex: 1; overflow: auto; padding: calc(var(--bar-h) + 2px) 18px 18px;
  font: 13px/1.6 var(--mono); color: #d7dae3;
  -webkit-mask-image: linear-gradient(to bottom, transparent calc(var(--bar-h) - 10px), #000 calc(var(--bar-h) + 6px));
  mask-image: linear-gradient(to bottom, transparent calc(var(--bar-h) - 10px), #000 calc(var(--bar-h) + 6px));
}
.term-line { white-space: pre-wrap; word-break: break-word; }
.term-input-row { display: flex; gap: 8px; align-items: baseline; }
.term-input { flex: 1; border: 0; background: none; padding: 0; font: inherit; color: #fff; caret-color: #7cf0b4; }
.t-user { color: #7cf0b4; } .t-path { color: #79a8ff; } .t-sign { color: #9aa1b2; }
.t-cmd { color: #ffd479; } .t-file { color: #d7dae3; } .t-dir { color: #79a8ff; font-weight: 700; }
.t-err { color: #ff8080; } .t-dim { color: #7d8496; } .t-logo { color: #9a8bff; }
.term b { color: #fff; }

/* ============ 设置 ============ */
.set-pane h2 { margin-bottom: 14px; }
.set-group { padding: 4px 16px; margin-bottom: 14px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; min-height: 50px; }
.set-row + .set-row { border-top: .5px solid var(--line); }
.set-row > span { font-size: 13.5px; font-weight: 500; display: flex; flex-direction: column; }
.set-row small { font-size: 12px; color: var(--text-2); font-weight: 400; }
.set-row input[type="range"] { max-width: 220px; }
.switch { width: 44px; height: 26px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; cursor: pointer; transition: background .2s; }
.switch i { position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .25); transition: transform .3s var(--ease-spring); }
.switch.on { background: #34c759; }
.switch.on i { transform: translateX(18px); }
.switch:disabled { opacity: .4; cursor: default; }
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; margin-top: 12px; }
.wall-item { display: flex; flex-direction: column; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.wall-thumb { width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .25), 0 4px 12px rgba(0, 0, 0, .15); transition: transform .25s var(--ease-spring); }
.wall-item:hover .wall-thumb { transform: scale(1.03); }
.wall-item.on .wall-thumb { outline: 3px solid var(--accent); outline-offset: 2px; }
.set-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ============ 应用程序 ============ */
.prog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.prog-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 18px 12px 16px; border-radius: 18px; cursor: pointer; transition: background .15s, transform .3s var(--ease-spring); }
.prog-card:hover { background: var(--hover); }
.prog-card:active { transform: scale(.97); }
.prog-card b { font-size: 13.5px; margin-top: 4px; }
.prog-card small { font-size: 12px; }
.prog-card.ghost { cursor: default; box-shadow: inset 0 0 0 1.5px var(--line); background: none; }
.prog-card.ghost b { color: var(--text-3); }
.prog-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.prog-head h2 { margin: 0; }
.prog-head p { margin: 2px 0 0; }
.prog-intro .tags { margin: 14px 0 20px; }
.prog-demo { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; margin-top: var(--bar-h); }
.prog-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.prog-note {
  flex: none; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 14px; font-size: 12px; font-weight: 500; color: var(--text-2);
  background: var(--hover); border-top: .5px solid var(--line); border-bottom: .5px solid var(--line);
}
.prog-note .glyph { width: 14px; height: 14px; flex: none; }
.prog-disclaimer { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 12px; color: var(--text-3); }
.prog-disclaimer .glyph { width: 14px; height: 14px; }

/* ============ 关于这台电脑 ============ */
.sys-hero { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 20px; }
.sys-logo {
  width: 88px; height: 88px; border-radius: 26px; display: grid; place-items: center; color: #fff; margin-bottom: 12px;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .4), transparent 55%), linear-gradient(140deg, #4c7dff, #9a6bff);
  box-shadow: 0 12px 30px rgba(76, 125, 255, .4), inset 0 1px 1px rgba(255, 255, 255, .6);
}
.sys-logo .logo { width: 56%; height: 56%; }
.sys-hero p { margin: 0; }
.sys-table { margin: 0; padding: 4px 16px; }
.sys-table div { display: flex; justify-content: space-between; padding: 9px 0; font-size: 13px; }
.sys-table div + div { border-top: .5px solid var(--line); }
.sys-table dt { color: var(--text-2); }
.sys-table dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.tips { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.tips li { display: flex; gap: 8px; align-items: flex-start; }
.tips .glyph { width: 15px; height: 15px; color: #34c759; margin-top: 3px; stroke-width: 2.4; }

/* ============ 手机适配 ============ */
html.mobile .pane { padding: calc(var(--bar-h) + 4px) 18px 48px; }
html.mobile .pane-head h2 { display: none; }
html.mobile .split { flex-direction: column; }
html.mobile .side {
  width: auto; margin: var(--bar-h) 12px 0; padding: 5px;
  flex-direction: row; overflow-x: auto; overflow-y: hidden; border-radius: 13px;
  scrollbar-width: none;
}
html.mobile .side::-webkit-scrollbar { display: none; }
html.mobile .side-title { display: none; }
html.mobile .side-item { white-space: nowrap; }
html.mobile .side-item small { margin-left: 4px; }
html.mobile .side + .pane { padding-top: 16px; -webkit-mask-image: none; mask-image: none; }
html.mobile .about { grid-template-columns: 1fr; gap: 20px; }
html.mobile .about-card { position: static; }
html.mobile .stat-row { gap: 8px; }
html.mobile .stat { padding: 12px; }
html.mobile .search input { width: 90px; }
html.mobile .proj-results.grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
html.mobile .proj-row { grid-template-columns: 44px 1fr 40px; }
html.mobile .proj-row > span, html.mobile .proj-row > small:last-child { display: none; }
html.mobile .proj-detail .pane { padding-top: calc(var(--bar-h) + 4px); -webkit-mask-image: none; mask-image: none; }
html.mobile .tl::before { left: 51px; }
html.mobile .tl-item { grid-template-columns: 40px 1fr; }
html.mobile .tl-dot { left: 42px; }
/* 笔记：列表 → 阅读 两级 */
html.mobile .notes .side { flex-direction: column; flex: 1; overflow-y: auto; margin-bottom: 30px; padding: 6px; }
html.mobile .notes .note-view { display: none; }
html.mobile .notes.reading .side { display: none; }
html.mobile .notes.reading .note-view { display: block; padding-top: calc(var(--bar-h) + 4px); }
html.mobile .m-only { display: inline-flex !important; }
html.mobile .note-view { padding-left: 20px; padding-right: 20px; }
html.mobile .set-row input[type="range"] { max-width: 150px; }
html.mobile .seg.wide button { padding: 0 10px; }
html.mobile .app-terminal .win-frame { background: #111217; }
html.mobile .app-terminal .win-bar { background: linear-gradient(#111217 70%, transparent); }
html.mobile .app-terminal .win-title, html.mobile .app-terminal .win-home i { color: #fff; background-color: #fff; }
html.mobile .app-terminal .win-title { background: none; }
html.mobile .term { padding: calc(var(--bar-h) + 2px) 14px 40px; font-size: 12px; }

/* ============ 关于我 · 封面照片 ============ */
.about-card { overflow: hidden; }
.about-photo { margin: -24px -18px -48px; width: calc(100% + 36px); height: 120px; position: relative; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 45%; }
.about-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, var(--card) 100%); }
.about-photo + .avatar { position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--surface-solid), 0 8px 22px rgba(0, 0, 0, .25); }


/* ============ 作品封面图 ============ */
.proj-cover.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.proj-cover.has-img::after { display: none; }

/* ============ 图文 ============ */
.note-item.has-thumb { flex-direction: row; align-items: center; gap: 10px; }
.note-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.note-thumb { width: 48px; height: 48px; border-radius: 9px; object-fit: cover; flex: none; }
.post-cover { width: 100%; max-height: 300px; object-fit: cover; border-radius: 16px; margin-bottom: 18px; cursor: zoom-in; }
.post-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 18px; }
.post-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; cursor: zoom-in; }
.prose img { max-width: 100%; border-radius: 12px; margin: 6px 0; cursor: zoom-in; }
.prose blockquote { margin: 0 0 12px; padding: 6px 14px; border-left: 3px solid var(--accent); color: var(--text-2); background: var(--hover); border-radius: 0 10px 10px 0; }
.lightbox {
  position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px;
  background: rgba(0, 0, 0, .78); cursor: zoom-out; animation: fade-in .2s ease;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox.out { opacity: 0; transition: opacity .2s; }
@keyframes fade-in { from { opacity: 0; } }

/* ============ 视频 ============ */
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.vid-card { display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer; }
.vid-card b { font-size: 14px; margin-top: 4px; }
.vid-card small { font-size: 12px; }
.vid-cover {
  position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden;
  background: linear-gradient(140deg, #ff4d6d, #6a1b9a); box-shadow: inset 0 0 0 .5px var(--line);
}
.vid-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease-out); }
.vid-card:hover .vid-cover img { transform: scale(1.04); }
.vid-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .6), 0 6px 18px rgba(0, 0, 0, .25);
  transition: transform .3s var(--ease-spring);
}
.vid-card:hover .vid-play { transform: translate(-50%, -50%) scale(1.1); }
.vid-play .glyph { width: 24px; height: 24px; }
.vid-dur { position: absolute; right: 8px; bottom: 8px; font-size: 11px; font-weight: 700; color: #fff; padding: 1px 7px; border-radius: 6px; background: rgba(0, 0, 0, .55); }
.vid-detail { position: absolute; inset: 0; z-index: 2; display: flex; background: var(--surface-solid); animation: slide-in .3s var(--ease-out); }
.vid-detail.out { animation: slide-out .22s ease-in forwards; }
.vid-player { display: block; width: 100%; max-height: 62vh; border-radius: 16px; background: #000; margin: 10px 0 16px; }
.vid-external .vid-cover { border-radius: 16px; }
html.mobile .vid-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
html.mobile .vid-detail .pane { padding-top: calc(var(--bar-h) + 4px); -webkit-mask-image: none; mask-image: none; }

/* iOS 分组列表：手机上联系方式、系统信息、设置项连成一组 */
html.mobile .contact-list { gap: 0; border-radius: 12px; overflow: hidden; background: var(--card); box-shadow: inset 0 0 0 .5px var(--line); }
html.mobile .contact-card { border-radius: 0; background: none; box-shadow: none; min-height: 52px; }
html.mobile .contact-card + .contact-card { box-shadow: inset 60px 0.5px 0 0 var(--card), inset 0 .5px 0 0 var(--line-2); }
html.mobile .set-group, html.mobile .sys-table { border-radius: 12px; }
html.mobile .set-row { min-height: 46px; padding: 8px 0; }
html.mobile .btn.ghost.back { padding-left: 0; font-size: 16px; font-weight: 500; }
html.mobile .btn.ghost.back .glyph { width: 20px; height: 20px; stroke-width: 2.4; }
