﻿:root { --blue:#1772F6; --bg:#f3f5f8; --text:#111; --muted:#8a9099; --line:#edf0f5; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--text); background: var(--bg); }
button, input { font: inherit; }
.h5-shell { min-height: 100vh; background: var(--bg); padding-bottom: env(safe-area-inset-bottom); }
.topbar { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; gap: 10px; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 10px 10px; background: #fff; box-shadow: 0 1px 10px rgba(20,34,66,.08); }
.home-topbar { grid-template-columns: 38px minmax(0, 1fr) 38px; }
.home-topbar .search,
.search-topbar .search { width: 85%; justify-self: center; transform: translateX(8px); }
.home-topbar .avatar-btn { justify-self: end; }
.search-topbar { grid-template-columns: 40px minmax(0, 1fr) 40px; }
.icon-btn, .avatar-btn { width: 36px; height: 36px; border: 0; border-radius: 999px; background: #eef5ff; color: var(--blue); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.avatar-btn { padding: 0; overflow: hidden; background: #f2f3f5; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#fff; background:var(--blue); font-size:16px; }
.search { min-width: 0; width: 100%; height: 38px; border-radius: 999px; background: #f5f7fb; border: 1px solid #edf0f5; display: flex; align-items: center; gap: 8px; padding: 0 4px 0 4px; }
.search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; }
.search-submit { flex-shrink:0; border:0; background:var(--blue); color:#fff; border-radius:999px; padding:4px 8px; font-size:12px; line-height:1.4; }
.tabs { position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 19; display: flex; gap: 22px; overflow-x: auto; white-space: nowrap; padding: 12px 14px 10px; background: #fff; border-bottom: 1px solid #f0f2f6; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: transparent; padding: 0 0 8px; font-size: 17px; color: #111; position: relative; }
.tab.active { color: var(--blue); font-weight: 800; }
.tab.active::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: 0; height: 3px; background: var(--blue); border-radius: 99px; }
.feed { padding: 10px 10px 24px; }
.card { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 10px; box-shadow: 0 2px 10px rgba(20,34,66,.05); }
.card:active { transform: scale(.995); }
.card-title { margin: 0; font-size: 20px; line-height: 1.35; font-weight: 800; word-break: break-word; }
.card-desc { margin: 8px 0 0; color: #606875; line-height: 1.55; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top: 12px; color: var(--muted); font-size: 13px; }
.search-shell .category-tag { display:inline-flex; align-items:center; justify-content:center; max-width: 45%; min-height:24px; padding:3px 9px; border-radius:999px; background:#eef5ff; color:var(--blue); border:1px solid #d8e9ff; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.card-cover { width: 100%; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #eef1f6; margin-bottom: 10px; position: relative; }
.card-cover img { width:100%; height:100%; object-fit:cover; display:block; }
.play-badge { position:absolute; right:8px; bottom:8px; background:rgba(0,0,0,.68); color:#fff; border-radius:4px; padding:2px 8px; font-size:12px; }
.tool-card { display:grid; grid-template-columns:54px 1fr; gap:12px; align-items:center; }
.logo { width:54px; height:54px; border-radius:12px; background:#eef5ff; object-fit:cover; }
.actions { display:flex; gap:8px; align-items:center; }
.action-btn { border: 1px solid #e2e6ee; background:#fff; color:#5d6673; border-radius: 999px; padding: 5px 9px; font-size: 12px; }
.action-btn.active { color: var(--blue); border-color: #bfdbff; background:#eef5ff; }
.empty, .loading, .load-more { text-align:center; color:#9aa0aa; padding: 34px 12px; font-size:14px; }
.drawer-mask { position:fixed; inset:0; z-index:40; background:rgba(0,0,0,.35); display:none; }
.drawer-mask.show { display:block; }
.drawer { width:82vw; max-width:340px; height:100%; background:#fff; padding: calc(14px + env(safe-area-inset-top)) 0 20px; overflow-y:auto; transform:translateX(-100%); transition: transform .22s; }
.drawer-mask.show .drawer { transform:translateX(0); }
.drawer-head { display:flex; align-items:center; justify-content:space-between; padding:0 16px 12px; border-bottom:1px solid var(--line); font-size:18px; font-weight:800; }
.drawer-close-btn { font-weight:400; font-size:24px; }
.drawer-section-title { padding:16px 16px 8px; color:var(--blue); font-weight:800; }
.sub-item { width:100%; border:0; background:#fff; text-align:left; padding:12px 18px; color:#222; }
.sub-item.active { color:var(--blue); background:#eef5ff; font-weight:700; }
.profile-page { padding: 12px; }
.profile-shell { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
.profile-head { background:#fff; border-radius:14px; padding:16px; display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.profile-head img, .profile-head .avatar-fallback { width:58px; height:58px; border-radius:50%; }
.profile-name { font-size:18px; font-weight:800; }
.profile-tabs { display:flex; gap:10px; background:#fff; border-radius:12px; padding:10px; margin-bottom:10px; overflow-x:auto; }
.profile-tabs button { border:0; background:transparent; padding:8px 10px; border-radius:999px; white-space:nowrap; }
.profile-tabs button.active { background:#eef5ff; color:var(--blue); font-weight:800; }
.login-card { min-height:100vh; display:grid; place-items:center; padding:24px; background:#f6f8fc; }
.login-box { width:100%; max-width:360px; background:#fff; border-radius:18px; padding:28px 20px; text-align:center; box-shadow:0 14px 42px rgba(20,34,66,.08); }
.primary { width:100%; height:44px; border:0; border-radius:999px; background:var(--blue); color:#fff; font-weight:800; margin-top:16px; }
.detail { background:#fff; min-height:100vh; padding: 0 16px calc(64px + env(safe-area-inset-bottom)); }
.detail-topbar { position: sticky; top: 0; margin: 0 -16px; grid-template-columns: 38px minmax(0, 1fr) 38px; gap: 14px; }
.detail-back-btn { font-size: 26px; line-height: 1; padding: 0 0 2px; font-weight: 500; }
.detail-title-row { margin-top:18px; }
.detail h1 { flex:1; min-width:0; font-size:24px; line-height:1.35; margin:0; }
.h5-detail-meta-row { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:30px; margin:10px 0 18px; }
.h5-detail-meta { display:flex; align-items:center; min-width:0; gap:10px; overflow:hidden; color:#8a9099; font-size:13px; white-space:nowrap; }
.h5-detail-author-avatar { width:28px; height:28px; flex:0 0 28px; border-radius:50%; object-fit:cover; }
.h5-detail-author-fallback { display:grid; place-items:center; background:var(--blue); color:#fff; font-size:12px; font-weight:800; }
.h5-detail-author-name { overflow:hidden; color:#8a9099; font-weight:500; text-overflow:ellipsis; }
.h5-detail-meta > time, .h5-detail-meta > span:not(.h5-detail-author-name) { flex:0 0 auto; }
.h5-resource-action { display:flex; flex:0 0 auto; margin-left:auto; }
.h5-resource-action button { min-width:76px; height:28px; padding:0 10px; border:0; border-radius:5px; background:var(--blue); color:#fff; font-size:13px; font-weight:700; line-height:1; white-space:nowrap; box-shadow:0 2px 5px rgba(23,114,246,.18); }
.h5-resource-action button:active { transform:scale(.98); background:#0f63dc; }
.h5-resource-install-mask { position:fixed; inset:0; z-index:1001; display:flex; align-items:center; justify-content:center; padding:24px; background:rgba(0,0,0,.46); }
.h5-resource-install-dialog { position:relative; width:100%; max-width:320px; padding:24px 20px; border-radius:14px; background:#fff; text-align:center; box-shadow:0 18px 50px rgba(0,0,0,.2); }
.h5-resource-install-dialog h2 { margin:0 0 12px; color:#111; font-size:20px; line-height:1.35; }
.h5-resource-install-dialog p { margin:0 0 16px; color:#606875; font-size:14px; line-height:1.6; text-align:left; }
.h5-resource-install-dialog img { display:block; width:min(240px, 72vw); height:min(240px, 72vw); margin:0 auto; object-fit:contain; border:1px solid #edf0f5; border-radius:8px; background:#fff; }
.h5-resource-install-close { position:absolute; top:7px; right:8px; width:32px; height:32px; padding:0; border:0; border-radius:50%; background:transparent; color:#909399; font-size:25px; line-height:30px; font-weight:400; }
.font-size-controls { display:flex; align-items:center; gap:.41em; flex:0 0 auto; font-size:calc(var(--article-font-size, 16px) + 2px); -webkit-text-size-adjust:auto; text-size-adjust:auto; }
.font-size-btn { width:2em; height:1.53em; padding:0; border:1px solid #b9d6ff; border-radius:.29em; background:#f8fbff; color:#303133; font-weight:700; cursor:pointer; transition:all .2s; line-height:1.4em; text-align:center; }
.font-size-btn:hover { border-color:#1772F6; color:#1772F6; }
.font-size-btn-large { font-size:1em; }
.font-size-btn-small { font-size:.76em; }
.detail-content { line-height:1.85; color:#222; white-space:normal; font-size: var(--article-font-size, 16px); overflow-wrap: break-word; }
.detail-content p { margin: 0 0 14px; }
.detail-content h1, .detail-content h2, .detail-content h3, .detail-content h4, .detail-content h5, .detail-content h6 { margin: 24px 0 12px; line-height: 1.45; color:#111; font-weight:800; }
.detail-content h1 { font-size: calc(var(--article-font-size, 16px) + 13px); }
.detail-content h2 { font-size: calc(var(--article-font-size, 16px) + 7px); padding-bottom: 8px; border-bottom: 1px solid #edf0f5; }
.detail-content h3 { font-size: calc(var(--article-font-size, 16px) + 3px); }
.detail-content h4, .detail-content h5, .detail-content h6 { font-size: calc(var(--article-font-size, 16px) + 1px); }
.detail-content blockquote { margin: 14px 0; padding: 10px 12px; border-left: 4px solid var(--blue); background:#f6f9ff; color:#4d5663; border-radius: 6px; }
.detail-content ul, .detail-content ol { padding-left: 22px; margin: 10px 0 16px; }
.detail-content li { margin: 6px 0; }
.detail-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; margin: 16px 0; border: 1px solid #e5e7eb; border-radius: 8px; }
.detail-content th, .detail-content td { border: 1px solid #e5e7eb; padding: 9px 10px; text-align: left; white-space: nowrap; }
.detail-content th { background:#f6f8fb; color:#111; font-weight:700; }
.detail-content tr:nth-child(even) td { background:#fafbfc; }
.detail-content code { background: #f1f3f5; border-radius: 4px; padding: 2px 5px; font-family: Consolas, Monaco, "Courier New", monospace; font-size: .92em; }
.detail-content pre code { background: transparent; padding: 0; }
.detail-content .code-block-wrapper { margin: 16px 0; border-radius: 8px; overflow: hidden; border: 1px solid #333; background:#272822; }
.detail-content .code-block-header { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 12px; background:#1e1f1c; border-bottom:1px solid #333; }
.detail-content .code-lang { color:#a6e22e; font-size:12px; font-weight:700; text-transform:uppercase; }
.detail-content .code-btn { border:1px solid #555; background:transparent; color:#ccc; border-radius:4px; padding:4px 9px; font-size:12px; }
.detail-content .code-content { margin:0; padding:14px; background:#272822; overflow-x:auto; -webkit-overflow-scrolling: touch; }
.detail-content .code-content code { color:#f8f8f2; line-height:1.6; font-size:13px; white-space:pre; }
.detail-content img { max-width:100%; border-radius:8px; }
.detail-actions { display:flex; justify-content:center; margin: 28px 0 6px; }
.detail-actions .card-meta { justify-content:center; margin-top:0; }
.detail-actions .actions { justify-content:center; gap:12px; }
.detail-actions .action-btn { min-width:78px; padding:8px 14px; font-size:14px; }
.h5-detail-recommend { margin: 26px 0 18px; padding: 16px; background:#fff; border:1px solid #e8edf4; border-radius:10px; box-shadow:0 2px 8px rgba(15, 23, 42, .04); }
.h5-detail-recommend h2 { margin:0 0 10px; padding-bottom:10px; color:#1f2937; font-size:17px; line-height:1.3; border-bottom:1px solid #edf0f5; }
.h5-detail-recommend-list { display:flex; flex-direction:column; }
.h5-detail-recommend-item { width:100%; display:flex; flex-direction:column; gap:4px; padding:11px 0; overflow:hidden; color:#1f2937; text-align:left; background:transparent; border:0; border-bottom:1px solid #f0f2f5; cursor:pointer; }
.h5-detail-recommend-item:last-child { border-bottom:0; }
.h5-detail-recommend-item span { overflow:hidden; font-size:15px; font-weight:700; line-height:1.4; text-overflow:ellipsis; white-space:nowrap; }
.h5-detail-recommend-item small { overflow:hidden; color:#7b8491; font-size:13px; line-height:1.45; text-overflow:ellipsis; white-space:nowrap; }
.h5-detail-recommend-item:active span { color:var(--blue); }
.h5-detail-recommend-state { padding:8px 0 2px; color:#9aa3af; font-size:14px; text-align:center; }
.h5-comments { margin: 18px 0 0; }
.h5-comment-form, .h5-reply-form { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.h5-comment-form input, .h5-reply-form input { min-width:0; flex:1; height:40px; border:1px solid #e4e7ed; border-radius:8px; background:#f5f7fa; padding:0 12px; outline:0; font-size:14px; }
.h5-comment-form button[type="submit"], .h5-reply-form button[type="submit"] { flex:0 0 auto; height:40px; border:0; border-radius:8px; background:var(--blue); color:#fff; padding:0 14px; font-weight:800; }
.h5-chat-trigger { display:grid; place-items:center; flex:0 0 40px; width:40px; height:40px; padding:0; border:1px solid #dcdfe6; border-radius:8px; background:#fff; font-family:"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size:22px; line-height:1; -webkit-text-size-adjust:100%; text-size-adjust:100%; }
.h5-chat-wrap,
.h5-chat-wrap[hidden] { display:none !important; margin: 0 0 10px; padding:6px; border-radius:10px; background:#fff; border:1px solid #edf0f5; box-shadow:0 4px 14px rgba(20,34,66,.06); }
.h5-chat-wrap.show:not([hidden]) { display:block !important; }
.h5-chat-icons { display:grid; grid-template-columns:repeat(8, minmax(0, 1fr)); gap:3px; }
.h5-chat-icons button { display:grid; place-items:center; width:100%; aspect-ratio:1; padding:0; border:0; border-radius:5px; background:transparent; font-size:40px; line-height:1; font-family:"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; -webkit-text-size-adjust:100%; text-size-adjust:100%; }
.h5-chat-icons button:active { background:#eef5ff; }
.h5-comment-form { position:fixed; z-index:80; left:0; right:0; bottom:0; height:calc(48px + env(safe-area-inset-bottom)); gap:0; margin:0; padding:0 0 env(safe-area-inset-bottom); background:#fff; border-top:1px solid #e5e7eb; box-shadow:0 -4px 16px rgba(20,34,66,.06); }
.h5-comment-form input { height:48px; min-width:0; border-width:0 1px 0 0; border-radius:0; background:#fff; font-size:16px; line-height:1.25; -webkit-text-size-adjust:100%; text-size-adjust:100%; }
.h5-comment-form .h5-chat-trigger { width:48px; height:48px; flex-basis:48px; border-width:0 1px 0 0; border-radius:0; }
.h5-comment-form button[type="submit"] { width:72px; height:48px; flex:0 0 72px; padding:0; border-radius:0; font-size:16px; line-height:1; white-space:nowrap; -webkit-text-size-adjust:100%; text-size-adjust:100%; }
.h5-comments > .h5-chat-wrap { position:fixed; z-index:79; left:0; right:0; bottom:calc(48px + env(safe-area-inset-bottom)); margin:0; border-radius:0; border-left:0; border-right:0; }
.h5-comments-state { padding:14px 12px; border-radius:8px; background:#f2f3f5; color:#909399; font-size:14px; text-align:center; }
.h5-comment-list { padding:12px; border-radius:8px; background:#f2f3f5; }
.h5-comment-item { display:flex; align-items:flex-start; gap:9px; margin-bottom:12px; }
.h5-comment-item:last-child { margin-bottom:0; }
.h5-comment-item.is-reply { margin-top:10px; margin-bottom:8px; }
.h5-comment-avatar { width:24px; height:24px; flex:0 0 24px; border-radius:50%; object-fit:cover; background:#eef5ff; }
.h5-comment-main { flex:1; min-width:0; }
.h5-comment-main p { margin:0; color:#303133; font-size:14px; line-height:1.6; word-break:break-word; }
.h5-comment-main p span { color:var(--blue); font-weight:800; margin-right:4px; }
.h5-comment-meta { display:flex; align-items:center; gap:12px; margin-top:4px; color:#909399; font-size:13px; }
.h5-comment-meta button, .h5-comments-more { border:0; padding:0; background:transparent; color:var(--blue); font-size:13px; }
.h5-comment-meta button.danger { color:#f56c6c; }
.h5-comment-replies { margin-top:8px; }
.h5-comments-more { display:block; margin-top:6px; }
.h5-subscribe-mask { position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center; padding:24px; background:rgba(0,0,0,.46); }
.h5-subscribe-dialog { position:relative; width:100%; max-width:320px; box-sizing:border-box; padding:22px 18px 24px; border-radius:16px; background:#fff; text-align:center; box-shadow:0 18px 50px rgba(0,0,0,.18); }
.h5-subscribe-dialog h2 { margin:0 0 14px; font-size:19px; line-height:1.3; color:#111; }
.h5-subscribe-dialog img { width:220px; height:220px; max-width:78vw; max-height:78vw; object-fit:contain; border:1px solid #ebeef5; border-radius:8px; background:#fff; }
.h5-subscribe-dialog p { margin:14px 0 0; font-size:16px; line-height:1.5; font-weight:800; color:#303133; }
.h5-subscribe-close { position:absolute; top:8px; right:9px; width:32px; height:32px; border:0; border-radius:50%; background:transparent; color:#909399; font-size:24px; line-height:30px; font-weight:400; }
.h5-profile-backbar { position:fixed; left:0; right:0; bottom:0; z-index:900; height:calc(48px + env(safe-area-inset-bottom)); padding-bottom:env(safe-area-inset-bottom); display:flex; align-items:center; justify-content:flex-start; box-sizing:border-box; background:#fff; border-top:1px solid #e5e7eb; box-shadow:0 -4px 16px rgba(20,34,66,.06); }
.h5-profile-backbar button { width:56px; height:48px; border:0; background:transparent; color:#303133; font-size:32px; line-height:1; font-weight:400; }
