/* macOS / iOS HIG 设计令牌（与 uni-app ios-theme 对齐） */
:root {
    --ios-bg: #f2f2f7;
    --ios-bg-secondary: #ffffff;
    --ios-label: #000000;
    --ios-label-secondary: rgba(60, 60, 67, 0.6);
    --ios-label-tertiary: rgba(60, 60, 67, 0.3);
    --ios-separator: rgba(60, 60, 67, 0.12);
    --ios-blue: #007aff;
    --ios-blue-hover: #0066d6;
    --ios-red: #ff3b30;
    --ios-green: #34c759;
    --ios-orange: #ff9500;
    --ios-purple: #5856d6;
    --ios-fill: rgba(120, 120, 128, 0.16);
    --ios-fill-secondary: rgba(120, 120, 128, 0.08);
    --pi-radius-sm: 8px;
    --pi-radius-md: 10px;
    --pi-radius-lg: 12px;
    --pi-radius-xl: 16px;
    --pi-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    --pi-font-body: 13px;
    --pi-font-subhead: 15px;
    --pi-font-title: 17px;
    --pi-font-large: 22px;
    --pi-font-caption: 11px;
    --pi-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --pi-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --pi-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --pi-transition: 0.2s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    font-family: var(--pi-font);
    font-size: var(--pi-font-body);
    line-height: 1.47059;
    letter-spacing: -0.022em;
    background: var(--ios-bg);
    color: var(--ios-label);
    -webkit-tap-highlight-color: transparent;
}

.pi-label-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pi-required {
    color: #ef4444;
    font-weight: 800;
    line-height: 1;
}

/* -------- 语言切换（登录页 / 主应用顶栏） -------- */
.login-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
}

.login-top-bar .home-logo {
    color: inherit;
}

.login-top-bar .home-logo:hover {
    opacity: 0.85;
}

.pi-lang-switch {
    display: inline-flex;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(17, 24, 39, 0.12);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.pi-lang-btn {
    border: none;
    background: transparent;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #4b5563;
    line-height: 1.2;
}

.pi-lang-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
}

.pi-lang-btn-active {
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    color: #fff !important;
}

.app-header-lang {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 8px;
}

/* -------- 独立登录页 -------- */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 96px 24px 32px;
    position: relative;
    overflow: hidden;
}

.login-page-footer {
    width: 100%;
    max-width: 1120px;
    margin-top: 28px;
    padding-top: 8px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.login-copyright {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(17, 24, 39, 0.55);
}

.login-apk-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
}

.login-apk-link:hover {
    text-decoration: underline;
}

.login-page-title {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: left;
    color: #111827;
    width: min(980px, calc(100% - 48px));
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    /* Allow hovering subtitle to show full title tooltip */
    pointer-events: auto;
}

.login-page-title::before {
    content: none;
}

.login-page-title-row {
    display: flex;
    align-items: baseline;
    gap: 14px;
    min-width: 0;
}

.login-page-title h1 {
    margin: 0;
    flex-shrink: 0;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: #111827;
    text-shadow: none;
}

.login-page-title h3 {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #6b7280;
    text-shadow: none;
}

.login-brand-subtitle {
    cursor: default;
}

.login-brand-subtitle.pi-tooltip {
    display: block;
    margin-left: 0;
    overflow: visible;
}

.login-brand-subtitle-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.login-brand-subtitle.pi-tooltip::after {
    left: 0;
    transform: translateX(0);
    top: calc(100% + 10px);
}

.login-brand-subtitle.pi-tooltip::before {
    left: 24px;
    transform: translateX(0);
    top: calc(100% + 4px);
}

.login-brand-subtitle.pi-tooltip:hover::after {
    animation: loginBrandTooltipIn 120ms ease-out;
}

@keyframes loginBrandTooltipIn {
    from { opacity: 0; transform: translateX(0) translateY(-4px); }
    to { opacity: 1; transform: translateX(0) translateY(0); }
}

.login-page::before,
.login-page::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 999px;
    filter: blur(42px);
    opacity: 0.18;
    pointer-events: none;
}

.login-page::before {
    left: -180px;
    top: -160px;
    background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.35), rgba(99, 102, 241, 0) 60%);
}

.login-page::after {
    right: -220px;
    bottom: -220px;
    background: radial-gradient(circle at 40% 40%, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0) 62%);
}

/* -------- 登录页 Toast（友好提示，不跳转错误页） -------- */
.pi-toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    z-index: 999;
    max-width: min(560px, calc(100% - 28px));
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(17, 24, 39, 0.92);
    color: #fff;
    font-size: 14px;
    line-height: 1.45;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(8px);
    display: none;
}

.pi-toast.pi-toast-show {
    display: block;
    animation: pi-toast-in 180ms ease-out;
}

@keyframes pi-toast-in {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 登录页：把 toast 放到「欢迎回来」标题后面 */
.login-card-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pi-toast.pi-toast--title {
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    z-index: 2;
    max-width: 100%;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.25;
    background: rgba(17, 24, 39, 0.86);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
    display: none;
}

.pi-toast.pi-toast--title.pi-toast-show {
    display: inline-flex;
    align-items: center;
    animation: none;
}

.login-shell {
    width: min(1080px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) 400px;
    gap: 28px;
    align-items: stretch;
    position: relative;
    z-index: 1;
}

.login-hero {
    border-radius: 28px;
    padding: 32px 32px 24px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.72);
    color: #111827;
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    position: relative;
    overflow: visible;
    /* 整块高于右侧登录卡片，避免药丸 tooltip 向右延伸时被卡片盖住 */
    z-index: 2;
}

.login-hero::before {
    content: "";
    position: absolute;
    inset: -60px -40px auto -40px;
    height: 220px;
    background: radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.22), rgba(99, 102, 241, 0) 62%);
    pointer-events: none;
}

.login-hero > * {
    position: relative;
    z-index: 1;
}

.login-hero-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.06);
    border: 1px solid rgba(17, 24, 39, 0.08);
    color: #374151;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin: 2px auto 0;
}

.login-hero-title {
    margin: 0 0 8px;
    text-align: center;
    font-size: clamp(26px, 3.2vw, 34px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.login-hero-lead {
    margin: -0.9em auto 0;
    text-align: center;
    color: #4b5563;
    font-size: 15px;
    line-height: 1.8;
    max-width: 42em;
}

.login-subtitle-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 10px 0 14px;
    /* 为「向上弹出」的 tooltip 留出顶部空间，避免贴顶裁切 */
    padding-top: 8px;
}

.login-sub-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(17, 24, 39, 0.08);
    color: #111827;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: default;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
    user-select: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

/* 让 pi-tooltip 在深色背景也好看 */
.login-sub-pill.pi-tooltip {
    margin-left: 0;
    outline: none;
    position: relative;
}
.login-sub-pill.pi-tooltip:hover,
.login-sub-pill.pi-tooltip:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
    border-color: rgba(17, 24, 39, 0.12);
    background: rgba(255, 255, 255, 0.88);
}

.login-sub-pill-icon {
    font-size: 13px;
    color: rgba(17, 24, 39, 0.7);
}

.login-sub-pill.pi-tooltip:hover .login-sub-pill-icon,
.login-sub-pill.pi-tooltip:focus-visible .login-sub-pill-icon {
    color: rgba(17, 24, 39, 0.88);
}

/* 登录页药丸：tooltip 向上展开，避免盖住下方 .login-hero-sub 段落 */
.login-sub-pill.pi-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    top: auto !important;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    display: block;
    width: max-content;
    max-width: min(520px, calc(100vw - 48px));
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.55;
    color: #111827;
    background: #ffffff !important;
    background-color: #ffffff !important;
    opacity: 0;
    border: 1px solid rgba(17, 24, 39, 0.12);
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.16);
    visibility: hidden;
    pointer-events: none;
    z-index: 9999;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

/* 小三角：指向下方药丸，贴在 tooltip 下沿 */
.login-sub-pill.pi-tooltip::before {
    content: "";
    position: absolute;
    left: 50%;
    top: auto !important;
    bottom: calc(100% + 2px);
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border: none;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 10px solid #ffffff;
    filter: drop-shadow(0 1px 0 rgba(17, 24, 39, 0.12));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 10000;
}

.login-sub-pill.pi-tooltip:hover::after,
.login-sub-pill.pi-tooltip:hover::before,
.login-sub-pill.pi-tooltip:focus-visible::after,
.login-sub-pill.pi-tooltip:focus-visible::before {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 覆盖通用 .pi-tooltip 的位移动画，避免与 bottom 定位冲突导致「改了不生效」 */
.login-sub-pill.pi-tooltip:hover::after,
.login-sub-pill.pi-tooltip:focus-visible::after {
    animation: none !important;
}

.login-sub-pill.pi-tooltip:first-child::after {
    left: 0;
    transform: none;
    text-align: left;
}

.login-sub-pill.pi-tooltip:first-child::before {
    left: 24px;
    transform: none;
}

.login-sub-pill.pi-tooltip:nth-child(2)::after {
    left: 0;
    right: auto;
    transform: none;
    text-align: left;
}

.login-sub-pill.pi-tooltip:nth-child(2)::before {
    left: 24px;
    right: auto;
    transform: none;
}

.login-hero-sub {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: #6b7280;
    max-width: 38em;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.login-hero-points {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    color: #374151;
    font-size: 13px;
}

.login-hero-points li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(17, 24, 39, 0.06);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
    line-height: 1.45;
}

.login-hero-points i {
    margin-top: 2px;
    color: rgba(17, 24, 39, 0.75);
}

.login-hero-badges {
    display: none;
}

.login-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(17, 24, 39, 0.06);
    color: #374151;
    font-size: 12px;
}

.login-card {
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(18px);
    position: relative;
    z-index: 1;
}

.login-card-head {
    padding: 26px 28px 14px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
}

.login-card-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.login-tabs {
    display: flex;
    gap: 8px;
    padding: 18px 28px 0;
    flex-wrap: wrap;
}

.login-tabs .tab-btn {
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.8);
    color: #6b7280;
    padding: 9px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.login-tabs .tab-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(17, 24, 39, 0.14);
    color: #111827;
}

.login-tabs .tab-btn.active {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.login-card-body {
    padding: 18px 28px 28px;
}

.login-card .form-row label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 700;
}

.login-forgot-row {
    margin-top: 10px;
    text-align: center;
}

.login-forgot-row a {
    color: #2563eb;
    text-decoration: none;
    font-size: 13px;
}

.login-forgot-row a:hover {
    text-decoration: underline;
}

.login-apk-row {
    margin-top: 8px;
    text-align: center;
}

.login-apk-row .login-apk-link {
    font-size: 13px;
}

.login-card input[type="text"],
.login-card input[type="password"],
.login-card input[type="email"],
.login-card input[type="tel"],
.login-card input[type="number"] {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    background: rgba(255, 255, 255, 0.94);
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.login-card input[type="text"]:focus,
.login-card input[type="password"]:focus,
.login-card input[type="email"]:focus,
.login-card input[type="tel"]:focus,
.login-card input[type="number"]:focus {
    border-color: rgba(17, 24, 39, 0.18);
    box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.06);
}

.login-card input[type="file"] {
    width: 100%;
    border-radius: 14px;
    border: 1px dashed rgba(17, 24, 39, 0.14);
    background: rgba(249, 250, 251, 0.9);
    padding: 10px 12px;
    font-size: 13px;
}

.login-card input[type="file"]::file-selector-button {
    border: none;
    background: #111827;
    color: #fff;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    margin-right: 10px;
    font-size: 12px;
}

.login-card input[type="file"]::file-selector-button:hover {
    background: #0b1220;
}

.login-card .captcha-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    width: 100%;
    justify-content: flex-start;
    margin-bottom: 6px;
}

.login-card .captcha-row {
    gap: 12px;
}

.login-card .captcha-row > label {
    text-align: left;
    margin: 0;
}

.captcha-inline-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    width: 100%;
    justify-content: flex-start;
}

.captcha-input-wrap {
    flex: 1;
    min-width: 0;
}

.login-card .captcha-box {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-direction: row;
    flex: 0 0 auto;
    white-space: nowrap;
}

.login-card #captcha-image {
    width: 120px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(17, 24, 39, 0.08);
}

.login-card #captcha-refresh-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.login-card #captcha-refresh-btn:hover {
    background: rgba(17, 24, 39, 0.05);
    color: #111827;
    transform: translateY(-1px);
}

.login-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.login-actions .primary {
    flex: 1;
}

.login-actions .primary {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
}

.login-actions .primary:hover {
    transform: translateY(-1px);
}

.login-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 10px;
}

.login-split {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.login-split > *:first-child {
    flex: 1;
}

@media (max-width: 900px) {
    .login-shell {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .login-page {
        padding-top: 88px;
    }
    .login-page-title {
        top: 16px;
        width: calc(100% - 32px);
    }
    .login-page-title-row {
        gap: 10px;
    }
    .login-page-title h1 {
        font-size: 28px;
        letter-spacing: 0.12em;
    }
    .login-page-title h3 {
        font-size: 14px;
    }
    .login-hero {
        padding: 24px 20px 20px;
    }
    .login-hero-points {
        grid-template-columns: 1fr;
    }
    .login-card-head,
    .login-tabs,
    .login-card-body {
        padding-left: 20px;
        padding-right: 20px;
    }
    .captcha-inline-row {
        flex-wrap: nowrap;
    }
}

.app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

.app-header {
    position: relative;
    text-align: center;
    color: #111827;
    padding-top: 44px;
}

.app-header-brand {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    max-width: calc(100% - 140px);
    min-width: 0;
}

.app-header-brand__logo {
    display: block;
    flex-shrink: 0;
    border-radius: 10px;
}

.app-header-brand__text {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.app-header-brand__name {
    flex-shrink: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.2;
    white-space: nowrap;
}

.app-header-brand__tagline {
    flex: 1;
    min-width: 0;
    font-size: var(--pi-font-subhead);
    font-weight: 400;
    color: var(--ios-label-secondary);
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 720px) {
    .app-header-brand__name {
        font-size: 18px;
    }
    .app-header-brand__tagline {
        font-size: 12px;
    }
}

.header-user-corner {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-user-corner .app-header-lang {
    margin-left: 0;
}

.user-message-bell-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 50%;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}

.user-message-bell-btn:hover {
    background: #f9fafb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.user-message-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

.review-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.review-status-badge.is-pending {
    background: #fef3c7;
    color: #b45309;
}

.review-status-badge.is-approved {
    background: #d1fae5;
    color: #047857;
}

.review-status-badge.is-rejected {
    background: #fee2e2;
    color: #b91c1c;
    cursor: help;
}

/* 审核驳回：提示框向上展开，避免被表格裁剪或右侧操作列遮挡 */
.review-status-badge.pi-tooltip {
    margin-left: 0;
    position: relative;
    vertical-align: middle;
}

.review-status-badge.pi-tooltip::after {
    left: 50%;
    right: auto;
    top: auto;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    max-width: min(320px, 70vw);
    white-space: normal;
    text-align: left;
    word-break: break-word;
}

.review-status-badge.pi-tooltip::before {
    left: 50%;
    top: auto;
    bottom: calc(100% + 2px);
    transform: translateX(-50%);
    border-bottom-color: transparent;
    border-top-color: #ffffff;
    filter: drop-shadow(0 1px 0 #e5e7eb);
}

.review-status-badge.pi-tooltip:hover::after,
.review-status-badge.pi-tooltip:focus-visible::after {
    animation: reviewTooltipFadeIn 120ms ease-out;
}

@keyframes reviewTooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.books-data-table td.learning-cell-review,
.books-data-table td.books-cell-review {
    overflow: visible;
    position: relative;
}

.books-data-table tr:hover td.learning-cell-review,
.books-data-table tr:hover td.books-cell-review {
    z-index: 5;
}

.books-data-table .review-status-badge.pi-tooltip:hover,
.books-data-table .review-status-badge.pi-tooltip:focus-within {
    z-index: 10000;
}

.user-messages-table .user-message-row--unread td {
    font-weight: 600;
}

.user-messages-table .user-message-preview {
    max-width: 320px;
    color: #6b7280;
}

.user-followers-table {
    table-layout: fixed;
    width: 100%;
}

.user-followers-table th:nth-child(1) {
    width: 18%;
}

.user-followers-table th:nth-child(3) {
    width: 11rem;
}

.user-followers-table td:nth-child(1) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-followers-table .user-followers-work {
    white-space: normal;
    word-break: break-word;
}

.user-followers-table .user-followers-work a {
    color: var(--ios-blue, #007aff);
    text-decoration: none;
}

.user-followers-table .user-followers-work a:hover {
    text-decoration: underline;
}

.user-library-table {
    table-layout: fixed;
    width: 100%;
}

.user-library-table th:nth-child(1) {
    width: 18%;
}

.user-library-table th:nth-child(3) {
    width: 11rem;
}

.user-library-table td:nth-child(1) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-library-table .user-library-work {
    white-space: normal;
    word-break: break-word;
}

.user-library-table .user-library-work a {
    color: var(--ios-blue, #007aff);
    text-decoration: none;
}

.user-library-table .user-library-work a:hover {
    text-decoration: underline;
}

.learning-interaction-panel .learning-interaction-tabs {
    margin: 0 0 16px;
}

.learning-interaction-panel .learning-interaction-tabs .tab-btn {
    min-width: 140px;
}

.pi-message-body {
    margin-top: 8px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.appeal-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.appeal-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.appeal-field-head label {
    display: block;
    margin: 0;
    font-weight: 500;
    flex-shrink: 0;
}

.appeal-once-hint {
    font-size: 12px;
    color: #b45309;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
}

.admin-message-form {
    max-width: 520px;
    margin-top: 12px;
}

.admin-message-form .form-row {
    margin-bottom: 12px;
}

.admin-message-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

.admin-message-form input,
.admin-message-form textarea {
    width: 100%;
    box-sizing: border-box;
}

.admin-message-recipient-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.admin-message-recipients-summary {
    font-size: 13px;
    color: #4b5563;
}

.msg-recipient-modal {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.msg-recipient-tier-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.msg-recipient-tier-btns button {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
}

.msg-recipient-tier-btns button:hover,
.msg-recipient-tier-btns button.is-active {
    border-color: #6366f1;
    color: #4338ca;
    background: #eef2ff;
}

.msg-recipient-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.msg-recipient-search {
    flex: 1;
    min-width: 180px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.msg-recipient-selected-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #374151;
}

.msg-recipient-list-wrap {
    max-height: 280px;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.msg-recipient-list {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.msg-recipient-list th,
.msg-recipient-list td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.msg-recipient-list th {
    background: #f9fafb;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.msg-recipient-list tr:hover td {
    background: #f9fafb;
}

.msg-recipient-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

.msg-recipient-pagination {
    margin-top: 4px;
}

.review-reject-reason {
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-wrap {
    position: relative;
}

.user-avatar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.2s;
}

.user-avatar-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.user-avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: #fff;
    color: #111827;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    padding: 8px 0;
    text-align: left;
    z-index: 100;
}

.user-menu-dropdown.hidden {
    display: none;
}

.user-menu-head {
    padding: 10px 14px 8px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 4px;
}

.user-menu-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

.user-menu-tier {
    display: block;
    font-size: 11px;
    color: #4f46e5;
    margin-top: 2px;
    font-weight: 500;
}

.user-menu-phone {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.user-menu-upgrade {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
}

.user-menu-upgrade:hover {
    text-decoration: underline;
}

.user-menu-upgrade.hidden {
    display: none;
}

.user-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    border: none;
    background: transparent;
    font-size: 14px;
    cursor: pointer;
    color: #374151;
    text-decoration: none;
    box-sizing: border-box;
}

a.user-menu-item {
    color: #374151;
}

.user-menu-item:hover {
    background: #f3f4f6;
}

.user-menu-item-danger {
    color: #b91c1c;
}

.user-menu-item-danger:hover {
    background: #fef2f2;
}

.admin-user-avatar-thumb {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    border: 1px solid #e5e7eb;
}

.admin-membership-tier {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    color: #4338ca;
    background: #eef2ff;
    white-space: nowrap;
}

.profile-membership-tier {
    margin-top: 6px;
}

.profile-invite-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.profile-invite-code {
    flex: 1 1 200px;
    margin: 0;
    padding: 8px 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.4;
    word-break: break-all;
    color: #1e293b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.profile-invite-copy {
    flex: 0 0 auto;
}

.nav-btn.small {
    padding: 6px 10px;
    font-size: 12px;
}

/* 登录页内验证码刷新等（不在 .app-nav 内） */
.login-card .nav-btn.small {
    flex: 0 0 auto;
    min-width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    font-weight: 600;
    box-shadow: none;
}

.login-card .nav-btn.small:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    color: #111827;
    transform: none;
}

.modal.modal-auth {
    max-width: 520px;
    width: 92%;
    min-width: 360px;
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.auth-tabs .tab-btn {
    padding: 8px 10px;
}

.auth-panel { display: none; }
.auth-panel.active { display: block; }

.form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.captcha-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.captcha-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

#captcha-image {
    width: 170px;
    height: 52px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.subtle {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
}

.app-header h1 {
    margin: 0;
    font-size: 28px;
}

.app-header p {
    margin: 4px 0 0;
    opacity: 0.9;
}

.app-nav {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    margin-bottom: 12px;
    overflow-x: auto;
    justify-content: center;
    flex-wrap: wrap;
    padding: 10px 12px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.app-nav .nav-btn {
    flex: 1;
    min-width: 120px;
    border: 1px solid #d1d5db;
    padding: 10px 12px;
    border-radius: 999px;
    background: #f9fafb;
    color: #1f2937;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s, box-shadow 0.2s;
}

.app-nav .nav-btn.active {
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35);
}

.app-nav .nav-btn:hover:not(.active) {
    transform: translateY(-1px);
    background: #fff;
    border-color: #9ca3af;
    color: #111827;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.app-main {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-height: 65vh;
}

.app-main:has(#today-view.active),
.app-main:has(#discover-view.active),
.app-main:has(#stats-view.active) {
    background: #f5f5f7;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.view {
    display: none;
}

.view.active {
    display: block;
}

/* -------- 习惯管理 -------- */
.habit-board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.habit-column {
    background: #f5f5f7;
    border-radius: 12px;
    padding: 10px;
    min-height: 420px;
}

.habit-column-header {
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(76, 111, 255, 0.10);
}

.habit-column-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.habit-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 10px;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.habit-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.10);
}

.habit-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.habit-streak {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 122, 24, 0.10);
    color: #b45309;
}

.habit-streak-num {
    font-weight: 800;
    font-size: 18px;
    line-height: 1;
}

.habit-streak-label {
    font-size: 12px;
    opacity: 0.9;
}

.habit-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.habit-card-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
}

.habit-texts {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.habit-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(17, 24, 39, 0.04);
    color: #111827;
    flex: 0 0 auto;
}

.habit-icon-text {
    font-size: 16px;
    line-height: 1;
}

.habit-icon-fa {
    font-size: 14px;
}

.habit-title {
    font-weight: 700;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.habit-req {
    font-size: 12px;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.habit-progress {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin-top: -2px;
}

.habit-progress-bar {
    height: 8px;
    background: linear-gradient(90deg, #2563eb, #22c55e);
    border-radius: 999px;
    width: 0;
}

@media (max-width: 900px) {
    .habit-board {
        grid-template-columns: 1fr;
    }
    .habit-column-body {
        grid-template-columns: 1fr;
    }
}

.goals-layout {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 12px;
}

.goal-sub-nav {
    background: #f5f5f7;
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: fit-content;
}

.goal-sub-nav-btn {
    border: none;
    text-align: left;
    border-radius: 8px;
    padding: 10px 12px;
    background: transparent;
    color: #374151;
    cursor: pointer;
}

.goal-sub-nav-btn.active {
    background: #4c6fff;
    color: #fff;
}

.goal-sub-content {
    min-width: 0;
}

.pi-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    vertical-align: middle;
    isolation: isolate;
}

.pi-tooltip:hover,
.pi-tooltip:focus-within {
    z-index: 9999;
}

.pi-tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ios-fill, rgba(120, 120, 128, 0.16));
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, transform 0.12s ease;
    vertical-align: middle;
    line-height: 1;
}

.pi-tooltip-icon__i {
    font-size: 11px;
    font-weight: 700;
    font-style: italic;
    font-family: var(--pi-font);
    color: var(--ios-label-secondary, rgba(60, 60, 67, 0.55));
    line-height: 1;
    user-select: none;
    pointer-events: none;
}

.pi-tooltip-icon__q {
    font-size: 11px;
    font-weight: 700;
    font-style: normal;
    font-family: var(--pi-font);
    color: var(--ios-label-secondary, rgba(60, 60, 67, 0.55));
    line-height: 1;
    user-select: none;
    pointer-events: none;
}

.pi-tooltip:hover .pi-tooltip-icon,
.pi-tooltip:focus-within .pi-tooltip-icon {
    background: rgba(120, 120, 128, 0.22);
}

.pi-tooltip-icon:hover {
    background: rgba(120, 120, 128, 0.22);
}

.pi-tooltip-icon:active {
    transform: scale(0.94);
}

.pi-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    top: calc(100% + 10px);
    transform: translateX(-50%);
    width: max-content;
    max-width: 320px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.45;
    color: #111827;
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 2000;
    backdrop-filter: blur(8px);
    mix-blend-mode: normal;
}

.pi-tooltip::before {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(100% + 4px);
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: #ffffff;
    filter: drop-shadow(0 -1px 0 #e5e7eb);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 2001;
}

.pi-tooltip:hover::after,
.pi-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

.pi-tooltip:hover::after {
    animation: tooltipFadeIn 120ms ease-out;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.goal-sub-panel {
    display: none;
}

.goal-sub-panel.active {
    display: block;
}

.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.view-header h2 {
    margin: 0;
}

.view-header-title-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.stats-total-revenue-hint {
    font-size: 13px;
    font-weight: 400;
    color: #64748b;
    line-height: 1.4;
}

.view-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.view-actions--stack {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.view-actions--stack .primary {
    white-space: nowrap;
}

#habits-view .view-header {
    align-items: flex-start;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tabs {
    display: flex;
    gap: 4px;
}

.tab-btn {
    border: none;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eee;
    cursor: pointer;
    font-size: 13px;
}

.tab-btn.active {
    background: #4c6fff;
    color: #fff;
}

.tab-extra-btn {
    border: none;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eee;
    cursor: pointer;
    font-size: 13px;
}

.tab-extra-btn:hover {
    background: #e5e7eb;
}

/* -------- 番茄钟模式按钮 -------- */
.pomodoro-mode-btn {
    border: none;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: #111827;
    cursor: pointer;
    font-size: 13px;
    backdrop-filter: blur(10px);
}

.pomodoro-mode-btn:hover {
    background: #e5e7eb;
}

.pomodoro-mode-btn.active {
    background: #ff7a18;
    color: #fff;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

input[type="text"],
input[type="number"],
input[type="datetime-local"],
select {
    border-radius: 999px;
    border: 1px solid #ddd;
    padding: 6px 10px;
    font-size: 13px;
}

button {
    font-size: 13px;
}

button.primary {
    background: #4c6fff;
    color: #fff;
    border-radius: 999px;
    border: none;
    padding: 6px 14px;
    cursor: pointer;
}

button.primary:hover {
    background: #3c56d8;
}

button.danger {
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    border: none;
    padding: 6px 14px;
    cursor: pointer;
}

button.danger:hover {
    background: #dc2626;
}

/* -------- 分页组件 -------- */
.pi-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.pi-page-info {
    font-size: 12px;
    color: #6b7280;
}

.pi-page-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pi-page-btn {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
}

.pi-page-btn:hover {
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.pi-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pi-page-btn.active {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.pi-page-jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
}

.pi-page-jump-label {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

.pi-page-jump-input {
    width: 56px;
    box-sizing: border-box;
    padding: 5px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
    color: #374151;
    background: #fff;
    -moz-appearance: textfield;
}

.pi-page-jump-input::-webkit-outer-spin-button,
.pi-page-jump-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pi-page-jump-input:focus {
    outline: none;
    border-color: #9ca3af;
}

.pi-page-jump-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead {
    background: #f5f5f7;
}

.data-table th,
.data-table td {
    padding: 8px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: top;
}

.data-table tbody tr:hover {
    background: #fafafa;
}

/* 读书 / 知识点列表：列宽适配容器，不出现横向滚动条 */
.books-table-wrap {
    width: 100%;
    overflow-x: hidden;
}

.books-data-table {
    table-layout: fixed;
    width: 100%;
}

.books-data-table .books-col-title,
.books-data-table .learning-col-title {
    width: auto;
}

.books-data-table .books-col-type,
.books-data-table .learning-col-type {
    width: 8%;
}

.books-data-table .learning-col-mastery {
    width: 5rem;
}

.books-data-table .books-col-public,
.books-data-table .learning-col-public {
    width: 4.25rem;
}

.books-data-table .books-col-stat,
.books-data-table .learning-col-stat {
    width: 2.5rem;
}

.books-data-table .books-col-review,
.books-data-table .learning-col-review {
    width: 4.5rem;
}

.books-data-table .books-col-actions,
.books-data-table .learning-col-actions {
    width: 12.5rem;
}

.books-data-table tbody tr.book-row--pinned td {
    background: linear-gradient(to right, #fffbeb, transparent);
}

.books-data-table .book-pin-btn.is-pinned-active {
    border-color: #f59e0b;
    color: #b45309;
}

.books-data-table th,
.books-data-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.books-data-table th:last-child,
.books-data-table td:last-child,
.books-data-table td.learning-cell-actions,
.books-data-table td.books-cell-actions {
    overflow: visible;
    text-overflow: clip;
}

.books-data-table td .pill-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 3px 4px;
}

.books-data-table .pill-actions button {
    padding: 3px 7px;
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 共享列表：隐藏可见性筛选与「是否公开」列 */
#books-list-panel.is-scope-shared .book-public-filter-wrap {
    display: none !important;
}

.books-data-table.is-hide-public-col .books-col-public,
.books-data-table.is-hide-public-col:not(.learning-list-table) thead th:nth-child(3),
.books-data-table.is-hide-public-col:not(.learning-list-table) .books-cell-public {
    display: none;
}

.books-data-table.learning-list-table.is-hide-public-col .learning-col-public,
.books-data-table.learning-list-table.is-hide-public-col thead th:nth-child(4),
.books-data-table.learning-list-table.is-hide-public-col .learning-cell-public {
    display: none;
}

/* 我的 / 全部：操作列按钮较多，略增列宽 */
#books-list-panel.is-scope-mine .books-col-actions,
#books-list-panel.is-scope-all .books-col-actions,
#knowledge-list-panel.is-scope-mine .learning-col-actions,
#knowledge-list-panel.is-scope-all .learning-col-actions {
    width: 14rem;
}

/* 类型管理列表：固定列宽，备注列自动换行 */
#book-categories-panel .data-table,
#knowledge-types-panel .data-table {
    table-layout: fixed;
}

#book-categories-panel .data-table th:nth-child(1),
#knowledge-types-panel .data-table th:nth-child(1) {
    width: 16%;
}

#book-categories-panel .data-table th:nth-child(2),
#knowledge-types-panel .data-table th:nth-child(2) {
    width: 16%;
}

#book-categories-panel .data-table th:nth-child(4),
#knowledge-types-panel .data-table th:nth-child(4) {
    width: 9rem;
}

#book-categories-panel .data-table td:nth-child(1),
#book-categories-panel .data-table td:nth-child(2),
#knowledge-types-panel .data-table td:nth-child(1),
#knowledge-types-panel .data-table td:nth-child(2) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#book-categories-panel .data-table td:nth-child(3),
#knowledge-types-panel .data-table td:nth-child(3) {
    white-space: normal;
    word-break: break-word;
}

#book-categories-panel .data-table td:last-child .pill-actions,
#knowledge-types-panel .data-table td:last-child .pill-actions {
    flex-wrap: wrap;
    gap: 3px 4px;
}

.books-data-table .books-cell-type,
.books-data-table .books-cell-title,
.books-data-table .learning-cell-title,
.books-data-table .learning-cell-type {
    max-width: 0;
}

.books-data-table .books-cell-public,
.books-data-table .learning-cell-public,
.books-data-table:not(.learning-list-table) thead th:nth-child(3),
.books-data-table.learning-list-table thead th:nth-child(4) {
    text-align: center;
}

.books-data-table .books-cell-stat,
.books-data-table .learning-cell-stat,
.books-data-table:not(.learning-list-table) thead th:nth-child(4),
.books-data-table:not(.learning-list-table) thead th:nth-child(5),
.books-data-table:not(.learning-list-table) thead th:nth-child(6),
.books-data-table.learning-list-table thead th:nth-child(5),
.books-data-table.learning-list-table thead th:nth-child(6),
.books-data-table.learning-list-table thead th:nth-child(7) {
    text-align: center;
}

.books-data-table .books-cell-review,
.books-data-table .learning-cell-review,
.books-data-table:not(.learning-list-table) thead th:nth-child(7),
.books-data-table.learning-list-table thead th:nth-child(8) {
    text-align: center;
}

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    color: #fff;
}

.tag-priority-URGENT_IMPORTANT {
    background: #e02424;
}

.tag-priority-IMPORTANT_NOT_URGENT {
    background: #fbbf24;
}

.tag-priority-URGENT_NOT_IMPORTANT {
    background: #0ea5e9;
}

.tag-priority-NOT_URGENT_NOT_IMPORTANT {
    background: #9ca3af;
}

.tag-status-TODO {
    background: #6b7280;
}

.tag-status-IN_PROGRESS {
    background: #2563eb;
}

.tag-status-DONE {
    background: #16a34a;
}

.kanban {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.kanban-column {
    background: #f5f5f7;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    max-height: 480px;
}

.kanban-column-header {
    padding: 8px;
    border-radius: 12px 12px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.urgent-important {
    background: #e02424;
}

.important-not-urgent {
    background: #f59e0b;
}

.urgent-not-important {
    background: #0ea5e9;
}

.not-urgent-not-important {
    background: #6b7280;
}

.kanban-column-body {
    padding: 8px;
    overflow-y: auto;
    flex: 1;
}

.kanban-card {
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    margin-bottom: 8px;
    cursor: grab;
}

.kanban-card.dragging {
    opacity: 0.4;
}

.kanban-card-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}

.kanban-card-meta {
    font-size: 11px;
    color: #6b7280;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 4px;
    gap: 6px;
}
.kanban-card-meta .todo-remind-time {
    color: #d97706;
    white-space: nowrap;
}
.kanban-card-meta .todo-remind-time i {
    margin-right: 2px;
}

.todo-calendar {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 14px;
}

.todo-calendar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.todo-calendar-title {
    flex: 1;
    min-width: 120px;
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1f;
}

.todo-calendar-nav-btn,
.todo-calendar-today-btn {
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.9);
    color: #1d1d1f;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
    line-height: 1.2;
}

.todo-calendar-nav-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.todo-calendar-nav-btn:hover,
.todo-calendar-today-btn:hover {
    background: #f3f4f6;
}

.todo-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 1px;
}

.todo-calendar-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: rgba(60, 60, 67, 0.6);
    padding: 6px 4px;
}

.todo-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 10px;
    overflow: hidden;
}

.todo-calendar-cell {
    background: #fff;
    min-height: 108px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.todo-calendar-cell--pad {
    background: rgba(255, 255, 255, 0.45);
    min-height: 108px;
}

.todo-calendar-cell--today {
    background: rgba(0, 122, 255, 0.06);
}

.todo-calendar-day {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    line-height: 1.2;
}

.todo-calendar-cell--today .todo-calendar-day {
    color: #007aff;
}

.todo-calendar-items {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 0;
    overflow: hidden;
}

.todo-calendar-item {
    display: flex;
    align-items: baseline;
    gap: 4px;
    width: 100%;
    border: none;
    border-radius: 6px;
    padding: 3px 5px;
    font-size: 11px;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
    background: rgba(17, 24, 39, 0.06);
    color: #111827;
}

.todo-calendar-item:hover {
    background: rgba(17, 24, 39, 0.1);
}

.todo-calendar-item__time {
    flex-shrink: 0;
    font-weight: 600;
    color: #d97706;
}

.todo-calendar-item__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.todo-calendar-item--URGENT_IMPORTANT {
    background: rgba(220, 38, 38, 0.12);
}

.todo-calendar-item--IMPORTANT_NOT_URGENT {
    background: rgba(37, 99, 235, 0.12);
}

.todo-calendar-item--URGENT_NOT_IMPORTANT {
    background: rgba(234, 88, 12, 0.12);
}

.todo-calendar-item--NOT_URGENT_NOT_IMPORTANT {
    background: rgba(107, 114, 128, 0.12);
}

.todo-calendar-more {
    font-size: 11px;
    color: #6b7280;
    padding: 2px 4px;
}

.todo-calendar-cell--day {
    cursor: context-menu;
}

.pi-context-menu {
    position: fixed;
    z-index: 12000;
    min-width: 148px;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.pi-context-menu-item {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 8px 12px;
    font-size: 13px;
    color: #1d1d1f;
    border-radius: 6px;
    cursor: pointer;
}

.pi-context-menu-item:hover {
    background: rgba(0, 122, 255, 0.1);
    color: #007aff;
}

@media (max-width: 900px) {
    .todo-calendar-cell,
    .todo-calendar-cell--pad {
        min-height: 84px;
    }

    .todo-calendar-item__title {
        display: none;
    }
}
.kanban-card-meta .goal-item-actions-inline {
    flex-shrink: 0;
}

.todo-quad-badge {
    margin-top: 6px;
    display: inline-block;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    color: #111827;
    background: rgba(17, 24, 39, 0.05);
}

.todo-quad-URGENT_IMPORTANT {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
}
.todo-quad-IMPORTANT_NOT_URGENT {
    background: rgba(59, 130, 246, 0.12);
    color: #1e40af;
}
.todo-quad-URGENT_NOT_IMPORTANT {
    background: rgba(245, 158, 11, 0.16);
    color: #92400e;
}
.todo-quad-NOT_URGENT_NOT_IMPORTANT {
    background: rgba(107, 114, 128, 0.14);
    color: #374151;
}

.card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    margin-bottom: 12px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.settings-grid label {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    gap: 4px;
}

.pomodoro-settings-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
}

.pomodoro-settings-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ios-label, #1c1c1e);
    white-space: nowrap;
    margin-right: 4px;
}

.pomodoro-settings-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    white-space: nowrap;
}

.pomodoro-settings-field input[type="number"] {
    width: 4.5em;
    padding: 4px 8px;
}

.pomodoro-task-mode-row {
    align-items: center;
}

.pomodoro-task-mode {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pomodoro-task-mode-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 18px;
    border-radius: 12px;
    border: 1.5px solid rgba(120, 120, 128, 0.2);
    background: var(--ios-card-bg, #fff);
    color: var(--ios-label, #1c1c1e);
    cursor: pointer;
    transition: all 0.18s ease;
    line-height: 1.25;
}

.pomodoro-task-mode-btn:hover {
    border-color: rgba(0, 122, 255, 0.4);
    color: #007aff;
}

.pomodoro-task-mode-btn.active {
    border-color: #007aff;
    background: rgba(0, 122, 255, 0.08);
    box-shadow: 0 2px 12px rgba(0, 122, 255, 0.18);
}

.pomodoro-task-mode__label {
    font-size: 14px;
    font-weight: 600;
}

.pomodoro-task-mode__sub {
    font-size: 12px;
    color: var(--ios-secondary, rgba(60, 60, 67, 0.6));
    font-variant-numeric: tabular-nums;
}

.pomodoro-task-mode-btn.active .pomodoro-task-mode__sub {
    color: rgba(0, 122, 255, 0.75);
}

.pomodoro-timer {
    text-align: center;
}

.timer-mode {
    font-size: 14px;
    margin-bottom: 4px;
}

.timer-display {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 8px;
}

.pomo-fx-stage {
    position: relative;
    width: 220px;
    height: 130px;
    margin: 6px auto 4px;
}

.pomo-fx {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
}

.pomo-fx.active {
    display: flex;
}

.pomo-fx-switch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 auto 12px;
    max-width: 420px;
}

.pomo-fx-switch-label {
    font-size: 12px;
    color: #6b7280;
    margin-right: 2px;
}

.pomo-fx-switch-btn {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.pomo-fx-switch-btn:hover {
    border-color: #c7d2fe;
    background: #f5f3ff;
}

.pomo-fx-switch-btn.active {
    border-color: #6366f1;
    background: #eef2ff;
    color: #4338ca;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

/* —— 动效 1：轨道星环 —— */
.time-flow-inner {
    position: relative;
    width: 220px;
    height: 120px;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.10));
}

.time-flow-ring {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    border: 2px solid rgba(76, 111, 255, 0.25);
    background: radial-gradient(closest-side, rgba(255,255,255,0.9), rgba(255,255,255,0.0));
    animation: timeFlowPulse 2.2s ease-in-out infinite;
    animation-play-state: paused;
}

.time-flow-ring-2 {
    inset: 10px;
    border-color: rgba(255, 122, 24, 0.22);
    animation-delay: 0.4s;
}

.time-flow-sand {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 52px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 122, 24, 0.0), rgba(255, 122, 24, 0.55), rgba(255, 122, 24, 0.0));
    animation: timeFlowFall 1.4s linear infinite;
    animation-play-state: paused;
    opacity: 0.85;
}

.time-flow-spark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: rgba(76, 111, 255, 0.6);
    animation: timeFlowOrbit 2.6s linear infinite;
    animation-play-state: paused;
}

.time-flow-spark-1 { animation-duration: 2.6s; background: rgba(76, 111, 255, 0.55); }
.time-flow-spark-2 { animation-duration: 3.2s; animation-delay: -0.6s; background: rgba(255, 122, 24, 0.55); }
.time-flow-spark-3 { animation-duration: 3.8s; animation-delay: -1.2s; background: rgba(16, 185, 129, 0.55); }

@keyframes timeFlowPulse {
    0%, 100% { transform: scale(0.98); opacity: 0.85; }
    50% { transform: scale(1.03); opacity: 1; }
}

@keyframes timeFlowFall {
    0% { transform: translate(-50%, -50%) scaleY(0.25); opacity: 0.35; }
    35% { transform: translate(-50%, -50%) scaleY(1.0); opacity: 0.9; }
    70% { transform: translate(-50%, -50%) scaleY(0.55); opacity: 0.65; }
    100% { transform: translate(-50%, -50%) scaleY(0.25); opacity: 0.35; }
}

@keyframes timeFlowOrbit {
    0% { transform: translate(-50%, -50%) rotate(0deg) translateX(62px) rotate(0deg); opacity: 0.2; }
    10% { opacity: 0.9; }
    90% { opacity: 0.9; }
    100% { transform: translate(-50%, -50%) rotate(360deg) translateX(62px) rotate(-360deg); opacity: 0.2; }
}

.pomo-fx-stage.running .pomo-fx--orbit .time-flow-ring,
.pomo-fx-stage.running .pomo-fx--orbit .time-flow-sand,
.pomo-fx-stage.running .pomo-fx--orbit .time-flow-spark {
    animation-play-state: running;
}

/* —— 动效 2：进度圆环 —— */
.pomo-ring {
    position: relative;
    width: 108px;
    height: 108px;
}

.pomo-ring-orbit {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid rgba(99, 102, 241, 0.12);
    border-top-color: #6366f1;
    border-right-color: #f97316;
    animation: pomoRingSpin 1.4s linear infinite;
    animation-play-state: paused;
}

.pomo-ring-orbit--2 {
    inset: 12px;
    border-top-color: #10b981;
    border-right-color: #6366f1;
    animation-duration: 2.2s;
    animation-direction: reverse;
}

.pomo-ring-core {
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff, #eef2ff 55%, #e0e7ff);
    box-shadow: inset 0 2px 8px rgba(99, 102, 241, 0.12);
    animation: pomoRingPulse 2s ease-in-out infinite;
    animation-play-state: paused;
}

@keyframes pomoRingSpin {
    to { transform: rotate(360deg); }
}

@keyframes pomoRingPulse {
    0%, 100% { transform: scale(0.96); opacity: 0.85; }
    50% { transform: scale(1); opacity: 1; }
}

.pomo-fx-stage.running .pomo-fx--ring .pomo-ring-orbit,
.pomo-fx-stage.running .pomo-fx--ring .pomo-ring-core {
    animation-play-state: running;
}

/* —— 动效 3：呼吸光晕 —— */
.pomo-bloom {
    position: relative;
    width: 120px;
    height: 120px;
}

.pomo-bloom-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(16, 185, 129, 0.35);
    animation: pomoBloomExpand 2.8s ease-out infinite;
    animation-play-state: paused;
}

.pomo-bloom-pulse-2 { animation-delay: 0.9s; border-color: rgba(99, 102, 241, 0.3); }
.pomo-bloom-pulse-3 { animation-delay: 1.8s; border-color: rgba(249, 115, 22, 0.28); }

.pomo-bloom-core {
    position: absolute;
    inset: 38px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #ecfdf5, #6ee7b7 45%, #10b981);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.45);
    animation: pomoBloomCore 2.4s ease-in-out infinite;
    animation-play-state: paused;
}

@keyframes pomoBloomExpand {
    0% { transform: scale(0.35); opacity: 0.85; }
    100% { transform: scale(1.15); opacity: 0; }
}

@keyframes pomoBloomCore {
    0%, 100% { transform: scale(0.92); box-shadow: 0 0 16px rgba(16, 185, 129, 0.35); }
    50% { transform: scale(1.08); box-shadow: 0 0 32px rgba(16, 185, 129, 0.55); }
}

.pomo-fx-stage.running .pomo-fx--bloom .pomo-bloom-pulse,
.pomo-fx-stage.running .pomo-fx--bloom .pomo-bloom-core {
    animation-play-state: running;
}

/* —— 动效 4：液面波纹 —— */
.pomo-wave-cup {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(14, 165, 233, 0.25);
    background: linear-gradient(180deg, #f0f9ff, #e0f2fe);
    box-shadow: inset 0 -8px 16px rgba(14, 165, 233, 0.08);
}

.pomo-wave-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 62%;
    background: linear-gradient(180deg, #38bdf8, #0ea5e9);
    animation: pomoWaveLevel 3s ease-in-out infinite;
    animation-play-state: paused;
}

.pomo-wave-surface {
    position: absolute;
    top: -6px;
    left: -50%;
    width: 200%;
    height: 14px;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 42%;
    animation: pomoWaveDrift 2.2s linear infinite;
    animation-play-state: paused;
}

.pomo-wave-surface-2 {
    top: -2px;
    opacity: 0.55;
    animation-duration: 3.1s;
    animation-direction: reverse;
}

@keyframes pomoWaveLevel {
    0%, 100% { height: 58%; }
    50% { height: 68%; }
}

@keyframes pomoWaveDrift {
    0% { transform: translateX(0) rotate(0deg); }
    100% { transform: translateX(25%) rotate(360deg); }
}

.pomo-fx-stage.running .pomo-fx--wave .pomo-wave-fill,
.pomo-fx-stage.running .pomo-fx--wave .pomo-wave-surface {
    animation-play-state: running;
}

/* —— 动效 5：专注火焰 —— */
.pomo-flame-wrap {
    position: relative;
    width: 80px;
    height: 100px;
}

.pomo-flame-base {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 10px;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.25);
    filter: blur(2px);
}

.pomo-flame {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: pomoFlameFlicker 0.55s ease-in-out infinite alternate;
    animation-play-state: paused;
}

.pomo-flame-main {
    width: 36px;
    height: 56px;
    background: linear-gradient(180deg, #fde68a 0%, #f97316 45%, #ef4444 100%);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.5);
    z-index: 3;
}

.pomo-flame-left {
    width: 22px;
    height: 38px;
    margin-left: -22px;
    background: linear-gradient(180deg, #fef3c7, #fb923c);
    opacity: 0.85;
    animation-delay: 0.15s;
    z-index: 2;
}

.pomo-flame-right {
    width: 20px;
    height: 34px;
    margin-left: 18px;
    background: linear-gradient(180deg, #fef9c3, #fbbf24);
    opacity: 0.8;
    animation-delay: 0.28s;
    z-index: 2;
}

@keyframes pomoFlameFlicker {
    0% { transform: translateX(-50%) scale(1) skewX(0deg); opacity: 0.92; }
    100% { transform: translateX(-50%) scale(1.06, 0.94) skewX(3deg); opacity: 1; }
}

.pomo-fx-stage.running .pomo-fx--flame .pomo-flame {
    animation-play-state: running;
}

/* —— 动效 6：粒子雨滴 —— */
.pomo-rain-scene {
    position: relative;
    width: 140px;
    height: 110px;
}

.pomo-rain-cloud {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    height: 28px;
    background: #cbd5e1;
    border-radius: 999px;
    box-shadow: -18px 4px 0 -4px #94a3b8, 18px 4px 0 -4px #94a3b8;
    animation: pomoCloudFloat 3s ease-in-out infinite;
    animation-play-state: paused;
}

.pomo-rain-drop {
    position: absolute;
    top: 38px;
    width: 3px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.2), #6366f1);
    opacity: 0;
    animation: pomoRainFall 1.1s linear infinite;
    animation-play-state: paused;
}

.pomo-rain-drop-1 { left: 28%; animation-delay: 0s; }
.pomo-rain-drop-2 { left: 38%; animation-delay: 0.18s; }
.pomo-rain-drop-3 { left: 48%; animation-delay: 0.36s; }
.pomo-rain-drop-4 { left: 58%; animation-delay: 0.12s; }
.pomo-rain-drop-5 { left: 68%; animation-delay: 0.28s; }
.pomo-rain-drop-6 { left: 78%; animation-delay: 0.44s; }

.pomo-rain-puddle {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 8px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.2);
    animation: pomoPuddleRipple 2s ease-in-out infinite;
    animation-play-state: paused;
}

@keyframes pomoCloudFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-48%) translateY(-3px); }
}

@keyframes pomoRainFall {
    0% { transform: translateY(0); opacity: 0; }
    15% { opacity: 0.9; }
    85% { opacity: 0.7; }
    100% { transform: translateY(52px); opacity: 0; }
}

@keyframes pomoPuddleRipple {
    0%, 100% { transform: translateX(-50%) scaleX(1); opacity: 0.5; }
    50% { transform: translateX(-50%) scaleX(1.15); opacity: 0.85; }
}

.pomo-fx-stage.running .pomo-fx--rain .pomo-rain-cloud,
.pomo-fx-stage.running .pomo-fx--rain .pomo-rain-drop,
.pomo-fx-stage.running .pomo-fx--rain .pomo-rain-puddle {
    animation-play-state: running;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 4px;
}

.timer-info {
    font-size: 13px;
    color: #4b5563;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.stats-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
}

.stats-list li {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.stats-sub {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    margin: 10px 0 4px;
}

.goal-status-period-cell {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.goal-status-period-cell .goal-status-select {
    min-width: 0;
    flex: 0 1 auto;
}

.goal-status-period-date {
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
}

.modal-body .reflection-date-template-row .book-type-inline-label input[type="date"],
.modal-body .reflection-date-template-row .book-type-inline-label select {
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
}

.modal-body .goal-status-period-row .book-type-inline-label input[type="date"],
.modal-body .goal-reward-status-row .book-type-inline-label input[type="date"],
.modal-body .goal-reward-status-row .book-type-inline-label input[type="text"],
.modal-body .goal-group-title-row .book-type-inline-label input[type="text"] {
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
}

.goal-status-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 6px;
    background: #e0e7ff;
    color: #3730a3;
    margin-left: 6px;
    vertical-align: middle;
}

.big-number {
    font-size: 34px;
    font-weight: 700;
    text-align: center;
    color: #2563eb;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: #fff;
    border-radius: 12px;
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    resize: both;
    /* 整窗不滚动：仅 modal-body 滚动，避免富文本遮盖取消/保存 */
    overflow: hidden;
    position: relative;
}

.modal.modal-book-wide {
    max-width: 1200px;
    width: 98%;
    min-width: 760px;
    min-height: 520px;
}

.modal.modal-knowledge-tall {
    max-height: 96vh;
}

.modal.modal-knowledge-tall .modal-body {
    min-height: 520px;
}

/* 反思编辑：弹窗本体滚动；富文本随内容增高，编辑区内不出现纵向滚动条 */
.modal.modal-reflection-tall {
    max-height: 96vh;
    overflow: hidden;
}

.modal.modal-reflection-tall .modal-body {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow: auto;
    display: block;
}

.modal.modal-reflection-tall #reflection-form {
    display: block;
    overflow: visible;
}

.modal.modal-reflection-tall .reflection-content-field {
    display: block;
    overflow: visible;
    margin-bottom: 0;
}

.modal.modal-reflection-tall .reflection-content-field textarea {
    width: 100%;
    min-height: 280px;
}

.modal-reflection-tall .tox-tinymce {
    min-height: 0;
}

.reflection-preview-cell {
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.reflection-preview-cell:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8 !important;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 12px;
    border-bottom: 1px solid #eee;
    min-height: 0;
    flex-shrink: 0;
    position: relative;
    z-index: 6;
    background: #fff;
}

.modal-header h3 {
    margin: 0;
    font-size: 13px;
    line-height: 1.15;
    font-weight: 600;
}

.modal-header .icon-btn {
    width: 22px;
    height: 22px;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.pi-modal-subtip {
    margin-left: 8px;
    font-size: 12px;
    font-weight: 400;
    color: #6b7280;
    white-space: nowrap;
}

.pi-methodology-guide-link {
    margin-left: 0;
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    white-space: nowrap;
}

.modal.modal-methodology {
    max-height: 85vh;
    overflow: hidden;
    resize: none;
}

.modal.modal-methodology .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    max-height: none;
}

.modal.modal-methodology .modal-footer {
    display: none;
}

.pi-methodology-guide-link:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .pi-modal-subtip {
        display: none;
    }
}

.modal-body {
    padding: 12px;
    overflow-y: auto;
    font-size: 13px;
    flex: 1 1 auto;
    min-height: 0;
}

.modal-footer {
    padding: 8px 12px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    position: relative;
    z-index: 6;
    background: #fff;
}

.modal-resizer {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 14px;
    height: 14px;
    cursor: se-resize;
    background:
        linear-gradient(135deg, transparent 55%, rgba(107, 114, 128, 0.6) 55%, rgba(107, 114, 128, 0.6) 63%, transparent 63%),
        linear-gradient(135deg, transparent 35%, rgba(107, 114, 128, 0.4) 35%, rgba(107, 114, 128, 0.4) 43%, transparent 43%);
    border-radius: 3px;
    opacity: 0.7;
}

.modal-resizer:hover {
    opacity: 1;
}

.modal-body label {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
    gap: 4px;
}

.reflection-toolbar {
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.reflection-rich-body {
    font-size: 14px;
    line-height: 1.7;
    color: #111827;
    overflow: auto;
    max-height: min(70vh, 560px);
}

.reflection-rich-body img {
    max-width: 100%;
    height: auto;
}

.icon-btn {
    border: none;
    background: transparent;
    cursor: pointer;
}

.pill-actions {
    display: flex;
    gap: 4px;
}

.pill-actions button {
    border-radius: 999px;
    border: none;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    background: #e5e7eb;
}

.pill-actions button.danger {
    background: #fee2e2;
    color: #b91c1c;
}

/* 读书管理：是否公开 */
.book-public-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.book-public-badge.is-public {
    background: #ecfdf5;
    color: #047857;
}

.book-public-badge.is-private {
    background: #f3f4f6;
    color: #4b5563;
}

/* 书籍详情：评论 */
.book-comments .book-comment-submit {
    background: #111827;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}
.book-comments .book-comment-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 书籍弹窗：书籍类型 + 公开开关同一行，两列各占约一半宽度、单行不换行 */
.book-type-public-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 10px 0 14px;
    min-width: 0;
}

.book-type-public-row .book-clone-monetize-row,
.book-type-public-row .book-review-hint {
    flex: 1 1 100%;
    width: 100%;
}

.modal-body .book-type-public-row .book-type-inline-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
}

.modal-body .book-type-public-row .book-type-inline-label select {
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
}

.book-type-public-row .book-public-field--inline {
    margin: 0;
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
}

.book-type-public-row .book-public-field--inline .book-public-row {
    width: 100%;
    min-width: 0;
}

.book-public-field {
    margin: 10px 0 14px;
}

.book-public-field--readonly .book-public-row {
    cursor: default;
}

.book-public-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: nowrap;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    line-height: 1.35;
    margin: 0;
}

/* 覆盖 .modal-body label 的纵向 flex，使开关与说明同一行 */
.modal-body label.book-public-row {
    flex-direction: row;
    align-items: center;
    margin-bottom: 0;
    gap: 10px;
}

.book-public-text {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-clone-monetize-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 2px;
}

.book-clone-monetize-row .clone-monetize-toggle {
    flex: 0 0 auto;
    margin: 0;
}

.book-clone-monetize-row .clone-monetize-toggle .book-public-text {
    flex: 0 1 auto;
}

.book-clone-monetize-row .clone-monetize-price-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
}

.book-clone-monetize-row .clone-monetize-price-label input[type="number"] {
    width: 96px;
    min-width: 96px;
    flex: 0 0 auto;
}

.clone-monetize-price-tooltip {
    margin-left: 0;
}

.clone-monetize-price-tooltip .pi-tooltip-icon {
    width: 16px;
    height: 16px;
}

.book-public-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.book-public-input {
    position: absolute;
    opacity: 0;
    width: 44px;
    height: 24px;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.book-public-switch-track {
    position: absolute;
    inset: 0;
    display: block;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background 0.2s ease;
    pointer-events: none;
}

.book-public-switch-track::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
}

.book-public-input:checked + .book-public-switch-track {
    background: #10b981;
}

.book-public-input:checked + .book-public-switch-track::after {
    transform: translateX(20px);
}

.book-public-input:focus-visible + .book-public-switch-track {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(16, 185, 129, 0.45);
}

/* 详情弹窗：只读开关（与表单视觉一致） */
.book-public-switch--display {
    pointer-events: none;
    cursor: default;
    z-index: 0;
}

.book-public-switch--display.is-on .book-public-switch-track {
    background: #10b981;
}

.book-public-switch--display.is-on .book-public-switch-track::after {
    transform: translateX(20px);
}

.book-public-switch--display.is-off .book-public-switch-track {
    background: #cbd5e1;
}

.book-public-switch--display.is-off .book-public-switch-track::after {
    transform: translateX(0);
}

/* TinyMCE 6：隐藏右上角 Upgrade 推广按钮 */
.tox .tox-promotion,
.tox .tox-promotion-link {
    display: none !important;
}

/* 弹窗内富文本：下拉菜单/对话框需高于 modal-overlay */
.tox-tinymce-aux {
    z-index: 10050 !important;
}

/* 富文本：交给 TinyMCE autoresize 控制高度，避免强制 flex 撑满造成内容下大块空白 */
.tox.tox-tinymce {
    box-sizing: border-box;
}

.tox.tox-tinymce .tox-editor-header {
    background: #fff;
}

.tox.tox-tinymce .tox-edit-area iframe {
    display: block;
}

/* 滚动时工具栏吸顶：保证层级与阴影，不被内容盖住 */
.tox.tox-tinymce--toolbar-sticky-on .tox-editor-header,
.tox.tox-tinymce--toolbar-sticky-off .tox-editor-header {
    background: #fff;
}

.tox.tox-tinymce--toolbar-sticky-on .tox-editor-header {
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
    z-index: 1200 !important;
}

.pi-comment-editor-wrap {
    display: block;
}

.pi-comment-editor-wrap .tox-tinymce {
    min-height: 0;
}

.ai-thinking {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 10px;
    padding: 8px 10px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    background: rgba(59, 130, 246, 0.06);
    border-radius: 10px;
    color: #1f2937;
    font-size: 14px;
}

.ai-thinking.compact {
    margin: 4px 0 0;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
}

.ai-thinking-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(59, 130, 246, 0.25);
    border-top-color: rgba(59, 130, 246, 0.95);
    animation: aiSpin 0.8s linear infinite;
    flex: 0 0 auto;
}

.ai-thinking.compact .ai-thinking-spinner {
    width: 12px;
    height: 12px;
    border-width: 2px;
}

.ai-thinking-text {
    color: #4b5563;
    font-weight: 600;
}

@keyframes aiSpin {
    to { transform: rotate(360deg); }
}

.book-title-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 6px;
    row-gap: 4px;
    align-items: center;
}

.book-interpret-btns {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}

.book-interpret-btns button:disabled,
.book-interpret-btns button.is-busy {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.book-title-grid #book-ai-thinking {
    grid-column: 2 / 3; /* 正下方对齐三个按钮 */
    width: 100%;
}

.book-title-grid #knowledge-ai-thinking {
    grid-column: 2 / 3;
    width: 100%;
}

.knowledge-title-row,
.knowledge-meta-row {
    margin-top: 0;
}

.knowledge-meta-row {
    flex-wrap: nowrap;
    overflow: visible;
}

.knowledge-meta-row .knowledge-meta-field--narrow {
    flex: 0.5 1 0;
    min-width: 0;
    overflow: visible;
}

.knowledge-meta-row .knowledge-meta-field--narrow select {
    min-width: 0;
    max-width: 100%;
}

.knowledge-meta-row .book-public-field--inline {
    flex: 0 0 auto;
    overflow: visible;
}

.knowledge-meta-row .clone-monetize-toggle,
.knowledge-meta-row .clone-monetize-price-label {
    flex: 0 0 auto;
    width: auto;
    overflow: visible;
}

.knowledge-meta-row .clone-monetize-toggle {
    margin: 0;
}

.knowledge-meta-row .clone-monetize-toggle .book-public-text {
    flex: 0 1 auto;
}

.knowledge-meta-row .clone-monetize-price-label {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    margin: 0;
    white-space: nowrap;
}

.knowledge-meta-row .clone-monetize-price-label input[type="number"] {
    width: 88px;
    min-width: 88px;
    flex: 0 0 auto;
}

.knowledge-meta-row .clone-monetize-price-tooltip {
    margin-left: 0;
    flex-shrink: 0;
}

.knowledge-meta-row .clone-monetize-price-tooltip .pi-tooltip-icon {
    width: 16px;
    height: 16px;
}

.knowledge-meta-row .book-review-hint {
    flex: 1 1 100%;
    width: 100%;
}

.pi-clone-price-tooltip-float {
    position: fixed;
    z-index: 10050;
    transform: translateX(-50%);
    max-width: 320px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.45;
    color: #111827;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 120ms ease-out, visibility 120ms ease-out;
}

.pi-clone-price-tooltip-float.is-visible {
    opacity: 1;
    visibility: visible;
}

.knowledge-notes-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.knowledge-notes-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    column-gap: 8px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.knowledge-notes-label {
    font-size: var(--pi-font-body);
    color: var(--ios-label, #1c1c1e);
    min-width: 0;
}

.knowledge-notes-audience-select {
    box-sizing: border-box;
    width: 110px;
    justify-self: end;
}

.knowledge-notes-template-select {
    box-sizing: border-box;
    width: 96px;
    justify-self: end;
}

/* 附加说明：初始约为原 rows=5 的 1/3，随输入自动增高 */
textarea.pi-autogrow-textarea {
    width: 100%;
    min-height: calc(1.5em * 2 + 12px);
    resize: none;
    overflow-y: hidden;
    line-height: 1.5;
    box-sizing: border-box;
}

.knowledge-notes-field textarea.pi-autogrow-textarea {
    margin: 0;
}

.knowledge-hierarchy-btn-wrap {
    display: inline-flex;
    vertical-align: middle;
}

.knowledge-hierarchy-btn {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: none;
    padding: 6px 28px 6px 12px;
    border-radius: 999px;
    background-color: #4c6fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23ffffff' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    font-family: inherit;
}

.knowledge-hierarchy-btn:hover:not(:disabled) {
    background-color: #3c56d8;
}

.knowledge-hierarchy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.knowledge-content-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.knowledge-editor-shell {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.knowledge-editor-toolbar {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    max-width: calc(100% - 16px);
    pointer-events: none;
}

.knowledge-editor-toolbar .book-interpret-btns,
.knowledge-editor-toolbar #knowledge-ai-thinking,
.knowledge-editor-toolbar #book-ai-thinking {
    pointer-events: auto;
}

.knowledge-editor-toolbar .book-interpret-btns {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    padding: 4px 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(60, 60, 67, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.knowledge-editor-toolbar #knowledge-ai-thinking,
.knowledge-editor-toolbar #book-ai-thinking {
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(60, 60, 67, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.knowledge-editor-shell .tox-tinymce {
    border-radius: 10px;
    overflow: hidden;
}

.book-type-public-row .book-type-inline-label input[type="text"] {
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
}

.goal-analysis-field {
    margin-bottom: 8px;
}

.goal-summary-field {
    display: block;
    margin-bottom: 12px;
}

.goal-summary-hint {
    display: block;
    margin: 4px 0 8px;
    font-size: 12px;
    line-height: 1.5;
    color: #6b7280;
    font-weight: normal;
}

.goal-analysis-head {
    margin-bottom: 4px;
}

.goal-analysis-label {
    font-weight: 600;
    color: #374151;
}

.goal-analysis-head #goal-ai-thinking {
    grid-column: 2 / 3;
    width: 100%;
}

.book-interpret-btns .book-interpret-btn,
.book-interpret-btns .knowledge-generate-btn,
.book-interpret-btns .knowledge-hierarchy-btn,
.book-interpret-btns .goal-analyze-btn {
    border: none;
    padding: 6px 12px;
    border-radius: 999px;
    background: #4c6fff;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.book-interpret-btns .knowledge-hierarchy-btn {
    padding: 6px 28px 6px 12px;
}

.book-interpret-btns .book-interpret-btn:hover,
.book-interpret-btns .knowledge-generate-btn:hover,
.book-interpret-btns .knowledge-hierarchy-btn:hover:not(:disabled),
.book-interpret-btns .goal-analyze-btn:hover {
    background: #3c56d8;
}

.book-interpret-btns .book-translate-btn,
.book-interpret-btns .knowledge-translate-btn {
    border: none;
    padding: 6px 12px;
    border-radius: 999px;
    background: #eee;
    color: #111827;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
}

.book-interpret-btns .book-translate-btn:hover,
.book-interpret-btns .knowledge-translate-btn:hover {
    background: #e5e7eb;
}

/* 目标项操作：... 触发，下拉展示编辑/拆分待办/删除 */
.goal-item-actions {
    position: relative;
    display: inline-block;
}
.goal-actions-trigger {
    border: none;
    background: transparent;
    padding: 2px 6px;
    font-size: 16px;
    line-height: 1.2;
    color: #6b7280;
    cursor: pointer;
    border-radius: 4px;
}
.goal-actions-trigger:hover {
    background: #e5e7eb;
    color: #374151;
}
.goal-actions-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 2px;
    min-width: 168px;
    width: max-content;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #e5e7eb;
    z-index: 100;
    padding: 4px 0;
}
.goal-item-actions.open .goal-actions-dropdown {
    display: block;
}
.goal-actions-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 6px 14px;
    font-size: 12px;
    border: none;
    background: none;
    cursor: pointer;
    color: #374151;
    white-space: nowrap;
}
.goal-actions-dropdown button:hover {
    background: #f3f4f6;
}
.goal-actions-dropdown button.danger {
    color: #b91c1c;
}
.goal-item-actions-inline {
    margin-left: auto;
}

/* 目标分组下拉列表（带复选框） */
.goal-period-dropdown {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
.goal-period-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 140px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
}
.goal-period-dropdown-trigger:hover {
    border-color: #4c6fff;
}
.goal-period-dropdown-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    min-width: 160px;
    padding: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
}
/* 面板显隐由 JS 的 .toggle() / .hide() 控制 */
.goal-period-dropdown-panel label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
    cursor: pointer;
}
.goal-period-dropdown-panel input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}


@media (max-width: 768px) {
    .goals-layout {
        grid-template-columns: 1fr;
    }

    .goal-sub-nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .kanban {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app {
        padding: 8px;
    }

    .app-main {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .kanban {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* AI 提示词配置弹窗 */
.modal.modal-ai-prompt {
    max-width: 960px;
    width: 96%;
    min-width: 640px;
    max-height: 96vh;
}

.modal.modal-ai-prompt .modal-body {
    min-height: 480px;
    max-height: calc(96vh - 110px);
    overflow-y: auto;
}

.ai-prompt-form,
.ai-prompt-test-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-prompt-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.ai-prompt-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e5e7eb;
    font-size: 12px;
    color: #374151;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ai-prompt-meta-chip i {
    color: #6b7280;
    font-size: 11px;
}

.ai-prompt-settings-row {
    margin: 0 0 14px;
}

.ai-prompt-settings-row .book-type-inline-label input[type="number"] {
    width: 88px;
    min-width: 88px;
    flex: 0 0 auto;
}

.ai-prompt-tier-settings-row {
    margin: 10px 0 4px;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.ai-prompt-tier-settings-row .ai-prompt-hint {
    margin: 0 0 8px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
}

.ai-prompt-tier-cell .ai-prompt-tier-line {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #374151;
    line-height: 1.6;
}

.ai-prompt-tier-cell .ai-prompt-tier-tag {
    display: inline-block;
    min-width: 48px;
    padding: 1px 6px;
    border-radius: 6px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 11px;
    text-align: center;
}

/* 提示词配置列表：固定列宽，内容不换行 */
.ai-prompts-data-table {
    table-layout: fixed;
    width: 100%;
}

.ai-model-option-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    padding: 8px 0;
}

.ai-model-option-check,
.ai-model-option-radio {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    line-height: 1.4;
}

.ai-model-use-default {
    margin-bottom: 12px;
    font-weight: 600;
}

/* macOS 风格 — 大模型配置 / 通用模型配置 */
.mac-settings-page {
    max-width: 720px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}

.mac-settings-page-header h2 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
}

.mac-settings-page-desc,
.mac-settings-form-desc {
    color: rgba(0, 0, 0, 0.55);
    font-size: 13px;
    line-height: 1.45;
    margin: 0 0 16px;
}

.mac-settings-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.mac-settings-group {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    margin-bottom: 12px;
}

.mac-settings-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    min-height: 44px;
}

.mac-settings-row:last-child {
    border-bottom: none;
}

.mac-settings-row-selectable {
    cursor: pointer;
    transition: background 0.15s ease;
}

.mac-settings-row-selectable:hover {
    background: rgba(0, 0, 0, 0.03);
}

.mac-settings-row-card {
    align-items: flex-start;
    padding-top: 14px;
    padding-bottom: 14px;
}

.mac-settings-row-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mac-settings-row-main-grow {
    flex: 1;
}

.mac-settings-row-title {
    font-size: 14px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.88);
}

.mac-settings-row-sub {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.45);
    word-break: break-all;
}

.mac-settings-row-sub code {
    font-size: 11px;
    background: rgba(0, 0, 0, 0.05);
    padding: 1px 6px;
    border-radius: 4px;
}

.mac-settings-row-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.mac-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(52, 199, 89, 0.14);
    color: #248a3d;
}

.mac-tag-blue {
    background: rgba(0, 122, 255, 0.12);
    color: #0071e3;
}

.mac-tag-muted {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.45);
}

.mac-settings-row-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.mac-settings-section-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 16px 4px 8px;
}

.mac-settings-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 122, 255, 0.1);
    color: #0071e3;
    margin-bottom: 10px;
}

.mac-settings-empty {
    text-align: center;
    color: rgba(0, 0, 0, 0.45);
    font-size: 13px;
    padding: 24px;
}

.mac-settings-hidden-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.mac-settings-field {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.mac-settings-field-label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.55);
}

.mac-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.mac-input:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

.mac-input-narrow {
    max-width: 120px;
}

.mac-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.mac-btn-primary {
    background: #007aff;
    color: #fff;
}

.mac-btn-primary:hover {
    background: #0066d6;
}

.mac-btn-secondary {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.75);
}

.mac-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
}

.mac-btn-ghost {
    background: transparent;
    color: #007aff;
    padding: 4px 10px;
}

.mac-btn-ghost:hover {
    background: rgba(0, 122, 255, 0.08);
}

.mac-btn-danger {
    color: #ff3b30;
}

.mac-btn-danger:hover {
    background: rgba(255, 59, 48, 0.08);
}

/* macOS 开关 */
.mac-toggle {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    cursor: pointer;
}

.mac-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.mac-toggle-track {
    display: block;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.16);
    transition: background 0.2s ease;
    position: relative;
}

.mac-toggle.is-on .mac-toggle-track {
    background: #34c759;
}

.mac-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.mac-toggle.is-on .mac-toggle-thumb {
    transform: translateX(18px);
}

.mac-toggle.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* macOS 单选圆点 */
.mac-radio-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.15s;
}

.mac-radio-dot.is-on {
    border-color: #007aff;
}

.mac-radio-dot.is-on::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #007aff;
}

.modal.modal-mac-settings {
    max-width: 480px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.modal.modal-mac-settings .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
}

.modal.modal-mac-settings .modal-header h3 {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.modal.modal-mac-settings .modal-body {
    background: #f5f5f7;
    padding: 16px 20px 20px;
    max-height: min(70vh, 560px);
    overflow-y: auto;
}

.modal.modal-mac-settings .modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding: 12px 20px;
    justify-content: flex-end;
    gap: 10px;
}

.modal.modal-mac-settings .modal-footer button.primary {
    background: #007aff;
    border-radius: 8px;
    border: none;
    padding: 8px 18px;
    font-weight: 500;
}

.modal.modal-mac-settings .modal-footer button:not(.primary) {
    background: rgba(0, 0, 0, 0.06);
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
}

#admin-ai-model-options-panel .mac-settings-page {
    padding: 4px 0 24px;
}

#admin-ai-model-options-panel .mac-settings-group {
    background: #fff;
}

.ai-prompts-data-table th,
.ai-prompts-data-table td {
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-prompts-data-table .ai-col-name { width: 20%; }
.ai-prompts-data-table .ai-col-locale { width: 6%; }
.ai-prompts-data-table .ai-col-category { width: 10%; }
.ai-prompts-data-table .ai-col-tier { width: 28%; }
.ai-prompts-data-table .ai-col-enabled { width: 6%; }
.ai-prompts-data-table .ai-col-updated { width: 17%; }
.ai-prompts-data-table .ai-col-actions { width: 13%; }

.ai-prompts-data-table .ai-cell-ellipsis {
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-prompts-data-table .ai-prompt-tier-cell {
    font-size: 12px;
    line-height: 1.5;
}

.ai-prompts-data-table .ai-prompt-tier-cell .ai-prompt-tier-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-prompts-data-table .ai-prompt-tier-cell .ai-prompt-tier-tag {
    min-width: 42px;
    margin-right: 4px;
}

.ai-prompts-data-table .ai-col-actions .pill-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
}

.ai-prompts-data-table .ai-col-actions .pill-actions button {
    white-space: nowrap;
    padding: 3px 8px;
    font-size: 12px;
}

.ai-prompt-section {
    margin-bottom: 14px;
}

.ai-prompt-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

.ai-prompt-field {
    margin-bottom: 0 !important;
}

.ai-prompt-code-input {
    width: 100%;
    min-height: 96px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.55;
    color: #111827;
    background: #fff;
    resize: vertical;
}

.ai-prompt-code-input:focus {
    outline: none;
    border-color: #4c6fff;
    box-shadow: 0 0 0 2px rgba(76, 111, 255, 0.15);
}

.ai-prompt-code-input--lg {
    min-height: 220px;
}

.ai-prompt-vars-panel {
    max-height: 180px;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 10px;
    background: #fafafa;
}

.ai-prompt-vars-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ai-prompt-var-item {
    display: grid;
    grid-template-columns: minmax(120px, auto) 1fr;
    gap: 4px 10px;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px dashed #e5e7eb;
    font-size: 12px;
}

.ai-prompt-var-item:last-child {
    border-bottom: none;
}

.ai-prompt-var-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: #eef2ff;
    color: #3730a3;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
}

.ai-prompt-var-label {
    color: #374151;
    font-weight: 500;
}

.ai-prompt-var-example {
    grid-column: 1 / -1;
    color: #9ca3af;
    font-size: 11px;
    word-break: break-all;
}

.ai-prompt-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: #6b7280;
}

.ai-prompt-empty {
    margin: 0;
    font-size: 12px;
    color: #9ca3af;
}

.ai-prompt-test-vars .ai-prompt-var-input-label {
    margin-bottom: 10px;
}

.ai-prompt-test-vars .ai-prompt-var-input-label code {
    margin-left: 6px;
    font-size: 11px;
    color: #6366f1;
}

.ai-prompt-test-toolbar {
    display: flex;
    justify-content: flex-end;
    margin: 8px 0 14px;
}

.ai-prompt-result-panel {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    min-height: 120px;
    max-height: 280px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 12px;
    line-height: 1.55;
    color: #111827;
    background: #fafafa;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ai-prompt-result-panel.is-empty {
    color: #9ca3af;
    font-style: italic;
    font-family: inherit;
}

/* ========== macOS / iOS 统一组件与工具类 ========== */

/* 图标：与 SF Symbols 相近的字重与尺寸 */
.fa-solid,
.fa-regular,
.fa-brands,
[class^="fa-"] {
    font-size: 0.92em;
    vertical-align: -0.08em;
}

button .fa-solid,
button .fa-regular,
button [class^="fa-"] {
    font-size: 13px;
    opacity: 0.88;
}

/* tooltip 图标使用 CSS 圆点 i，不走 Font Awesome 通用规则 */

/* 品牌标题 */
.app-brand-wrap {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 4px;
    text-align: left;
    max-width: calc(100% - 120px);
    min-width: 0;
}

.app-brand-title {
    flex-shrink: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--ios-label);
    line-height: 1.15;
}

.app-brand-tagline {
    flex: 1;
    min-width: 0;
    font-size: var(--pi-font-subhead);
    font-weight: 400;
    color: var(--ios-label-secondary);
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pi-hint {
    color: var(--ios-label-secondary);
    font-size: var(--pi-font-body);
    margin-bottom: 12px;
    line-height: 1.45;
}

.knowledge-review-help-trigger {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    line-height: inherit;
}

.knowledge-review-help-trigger::after,
.knowledge-review-help-trigger::before {
    display: none;
}

.knowledge-review-help-modal__body {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ios-label-secondary);
}

.knowledge-review-help-modal__subtitle {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ios-label);
}

.knowledge-review-schedule summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #007aff;
    user-select: none;
}

.knowledge-review-schedule__list {
    margin: 8px 0 0;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--ios-label-secondary);
}

.knowledge-mastery-help {
    margin-top: 4px;
}

.knowledge-review-panel {
    margin: 0 0 20px;
    padding: 16px;
    border-radius: 12px;
    background: var(--ios-bg-secondary, #f2f2f7);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.knowledge-review-panel__title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--ios-label);
}

.knowledge-review-panel__intro {
    margin-bottom: 12px;
}

.knowledge-mastery-progress {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    margin-bottom: 10px;
    font-size: 12px;
}

.knowledge-mastery-step {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(142, 142, 147, 0.15);
    color: var(--ios-label-secondary);
}

.knowledge-mastery-step.is-done {
    background: rgba(52, 199, 89, 0.15);
    color: #248a3d;
}

.knowledge-mastery-step.is-current {
    background: rgba(0, 122, 255, 0.15);
    color: #007aff;
    font-weight: 600;
}

.knowledge-mastery-step-sep {
    color: var(--ios-label-tertiary);
    font-size: 11px;
}

.knowledge-review-panel__desc {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--ios-label-secondary);
}

.knowledge-review-panel__status {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #007aff;
}

.knowledge-review-panel__status--pending {
    font-weight: 500;
    color: var(--ios-label-secondary);
}

.knowledge-review-schedule--inline {
    margin-bottom: 12px;
}

.knowledge-review-panel__actions {
    margin-top: 4px;
}

.knowledge-review-panel__hint {
    margin: 8px 0 0;
    font-size: 12px;
}

.knowledge-review-btn[disabled],
.knowledge-review-btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.pi-hidden {
    display: none !important;
}

.filters-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.filters-inline label {
    margin: 0;
}

.filters--center {
    align-items: center;
}

.filters--center label {
    display: flex;
    align-items: center;
    gap: 6px;
}

#admin-access-days {
    width: 64px;
    padding: 6px 8px;
}

.filters-inline input[type="text"] {
    min-width: 160px;
}

.toolbar-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.toolbar-row--end {
    margin-bottom: 12px;
}

/* 详情页 / 弹窗内容块 */
.pi-detail-title {
    font-size: var(--pi-font-title);
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--ios-label);
    letter-spacing: -0.02em;
}

.pi-detail-meta {
    font-size: var(--pi-font-body);
    color: var(--ios-label-secondary);
    margin-bottom: 8px;
    line-height: 1.45;
}

.knowledge-detail-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-bottom: 14px;
}

.pi-detail-header-row .pi-detail-title--inline {
    margin: 0;
    flex: 0 1 auto;
    min-width: 0;
}

.knowledge-detail-meta-row .knowledge-detail-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
    min-width: 0;
}

.knowledge-detail-meta-row .knowledge-detail-meta-label {
    color: var(--ios-label-secondary);
}

.knowledge-detail-meta-row .knowledge-detail-meta-sep {
    color: var(--ios-label-tertiary);
    user-select: none;
    line-height: 1;
}

.knowledge-detail-meta-row .knowledge-detail-meta-public {
    gap: 6px;
    flex: 1 1 auto;
    flex-wrap: wrap;
    min-width: 0;
}

.knowledge-detail-meta-row .book-public-text {
    font-size: var(--pi-font-body);
    color: var(--ios-label-secondary);
}

.pi-detail-meta-muted {
    color: var(--ios-label-tertiary);
}

.pi-section-title {
    font-weight: 600;
    font-size: var(--pi-font-subhead);
    margin: 10px 0 6px;
    color: var(--ios-label);
}

.pi-rich-content-box {
    border: 1px solid var(--ios-separator);
    border-radius: var(--pi-radius-md);
    padding: 12px;
    min-height: 160px;
    background: var(--ios-bg-secondary);
    font-size: var(--pi-font-subhead);
    line-height: 1.55;
}

.pi-rich-content-box--muted {
    background: var(--ios-bg);
}

.knowledge-parent-link a {
    color: var(--ios-tint, #007aff);
    text-decoration: none;
}

.knowledge-parent-link a:hover {
    text-decoration: underline;
}

.knowledge-selection-hint {
    margin: 8px 0 12px;
    font-size: var(--pi-font-footnote);
    color: var(--ios-label-secondary);
}

.knowledge-detail-meta-row .knowledge-selection-hint-inline {
    font-size: var(--pi-font-footnote);
    color: var(--ios-label-secondary);
    flex: 0 1 auto;
    min-width: 0;
}

.pi-detail-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
}

.knowledge-detail-meta-row .pi-detail-actions--inline {
    margin: 0;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.pi-detail-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
}

.pi-detail-actions-row .pi-detail-actions--inline {
    margin: 0;
}

.knowledge-detail-meta-stat {
    gap: 4px;
    color: var(--ios-label-secondary);
}

.knowledge-detail-meta-stat i {
    color: var(--ios-label-tertiary);
    font-size: 0.92em;
}

.knowledge-selection-tip {
    position: absolute;
    z-index: 1200;
    display: none;
    padding: 4px 6px;
    border-radius: 10px;
    background: rgba(28, 28, 30, 0.92);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(8px);
}

.knowledge-selection-tip-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.knowledge-selection-tip-divider {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

.knowledge-selection-tip-btn {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
    white-space: nowrap;
    padding: 4px 6px;
}

.knowledge-selection-tip-btn:hover {
    opacity: 0.9;
}

.pi-rich-content-box .pi-multi-link,
.pi-rich-content-box a.pi-multi-link-anchor {
    color: var(--ios-tint, #007aff);
    text-decoration: underline;
    cursor: pointer;
}

.pi-multi-link-popover {
    position: fixed;
    z-index: 1250;
    display: none;
    min-width: 180px;
    max-width: 320px;
    padding: 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--ios-separator, rgba(60, 60, 67, 0.18));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.pi-multi-link-popover.is-visible {
    display: block;
}

.pi-multi-link-popover-item {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--ios-label, #1c1c1e);
    font-size: 13px;
    line-height: 1.35;
}

.pi-multi-link-popover-item:hover {
    background: var(--ios-fill, rgba(120, 120, 128, 0.12));
}

.pi-multi-link-popover-item-title {
    display: block;
    word-break: break-word;
}

.pi-multi-link-popover-item-meta {
    margin-top: 2px;
    font-size: 11px;
    color: var(--ios-label-secondary, #6b7280);
}

.knowledge-link-modal {
    max-width: 520px;
}

.knowledge-link-modal .modal-header {
    padding: 2px 14px;
    min-height: 0;
}

.knowledge-link-modal .modal-header h3 {
    margin: 0;
    font-size: 13px;
    line-height: 1.15;
    font-weight: 600;
}

.knowledge-link-modal .modal-header .icon-btn {
    width: 22px;
    height: 22px;
    padding: 0;
}

.knowledge-link-modal .modal-footer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.knowledge-link-modal-count {
    margin-right: auto;
    font-size: 12px;
    color: var(--ios-label-secondary, #6b7280);
}

.knowledge-link-picker-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.knowledge-link-picker-tabs .tab-btn {
    flex: 1;
    text-align: center;
    padding: 6px 10px;
    font-size: 13px;
}

.knowledge-link-picker-search-wrap {
    position: relative;
    margin-bottom: 10px;
}

.knowledge-link-picker-search-wrap .knowledge-link-picker-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(60, 60, 67, 0.55);
    font-size: 13px;
    line-height: 1;
    pointer-events: none;
}

.knowledge-link-picker-search {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 7px 12px 7px 32px;
    border: none;
    border-radius: 8px;
    background: rgba(118, 118, 128, 0.12);
    font-size: 13px;
    line-height: 1.35;
    color: var(--ios-label, #1c1c1e);
    -webkit-appearance: none;
    appearance: none;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.knowledge-link-picker-search::placeholder {
    color: rgba(60, 60, 67, 0.55);
}

.knowledge-link-picker-search:focus {
    outline: none;
    background: rgba(118, 118, 128, 0.16);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.18);
}

.knowledge-link-picker-search::-webkit-search-cancel-button {
    -webkit-appearance: none;
    height: 14px;
    width: 14px;
    margin-left: 4px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='6' r='5.5' fill='%23787880'/%3E%3Cpath stroke='%23fff' stroke-width='1.2' d='M4 4l4 4M8 4l-4 4'/%3E%3C/svg%3E") center/contain no-repeat;
    cursor: pointer;
}

.knowledge-link-picker-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--ios-separator, rgba(60, 60, 67, 0.18));
    border-radius: 10px;
}

/* 覆盖 .modal-body label 的纵向布局，复选框与标题同一行，整行可点选 */
.knowledge-link-modal .modal-body label.knowledge-link-picker-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
}

.knowledge-link-picker-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--ios-separator, rgba(60, 60, 67, 0.12));
    cursor: pointer;
    user-select: none;
}

.knowledge-link-picker-item:last-child {
    border-bottom: none;
}

.knowledge-link-picker-item:hover {
    background: var(--ios-fill, rgba(120, 120, 128, 0.12));
}

.knowledge-link-picker-item.is-selected {
    background: rgba(76, 111, 255, 0.1);
}

.knowledge-link-picker-item input {
    margin: 0;
    flex-shrink: 0;
}

.knowledge-link-picker-item-title {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    line-height: 1.35;
    color: var(--ios-label, #1c1c1e);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.knowledge-link-picker-empty,
.knowledge-link-picker-loading {
    padding: 24px 12px;
    text-align: center;
    color: var(--ios-label-secondary, #6b7280);
    font-size: 13px;
}

.knowledge-children-section {
    margin: 16px 0 8px;
}

.knowledge-children-list {
    margin: 8px 0 0;
    padding-left: 20px;
}

.knowledge-children-list a {
    color: var(--ios-tint, #007aff);
    text-decoration: none;
}

.knowledge-children-list a:hover {
    text-decoration: underline;
}

.pi-knowledge-graph-page {
    background: var(--ios-bg);
    color: var(--ios-label);
    height: 100vh;
    overflow: hidden;
}

.pi-knowledge-graph-page .pi-standalone-topbar {
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid var(--ios-separator);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    flex-shrink: 0;
}

.pi-knowledge-graph-page .pi-standalone-topbar a,
.pi-knowledge-graph-page .pi-standalone-topbar__title {
    color: var(--ios-label);
}

.pi-knowledge-graph-page .kg-main {
    max-width: none;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pi-knowledge-graph-page .pi-standalone-error {
    margin: 16px 20px;
    color: var(--ios-red);
}

.kg-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kg-wrap--split {
    flex-direction: row;
    gap: 0;
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
    background: var(--ios-bg);
}

.kg-wrap--split.is-resizing,
.kg-wrap--split.is-resizing * {
    cursor: col-resize !important;
    user-select: none !important;
}

body.kg-split-resizing {
    cursor: col-resize !important;
    user-select: none !important;
}

.kg-stage {
    position: relative;
    flex: 0 0 50%;
    width: 50%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--ios-bg);
}

.kg-splitter {
    flex: 0 0 8px;
    width: 8px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: col-resize;
    position: relative;
    z-index: 4;
    touch-action: none;
}

.kg-splitter::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    margin-left: -0.5px;
    background: var(--ios-separator);
}

.kg-splitter::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 28px;
    margin: -14px 0 0 -2px;
    border-radius: 999px;
    background: rgba(60, 60, 67, 0.18);
    box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.65);
    transition: background 0.15s ease, height 0.15s ease, box-shadow 0.15s ease;
}

.kg-splitter:hover::before,
.kg-wrap--split.is-resizing .kg-splitter::before,
.kg-splitter:focus-visible::before {
    background: var(--ios-blue);
    height: 40px;
    margin-top: -20px;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.16);
}

.kg-splitter:focus-visible {
    outline: none;
}

.kg-toolbar {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    padding: 3px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.78);
    border: 0.5px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 6px 18px rgba(0, 0, 0, 0.08);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
}

.kg-tool-btn {
    width: 34px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #3a3a3c;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    transition: background var(--pi-transition), color var(--pi-transition);
}

.kg-tool-btn i {
    color: inherit;
    opacity: 1;
}

.kg-tool-btn + .kg-tool-btn {
    margin-left: 1px;
}

.kg-tool-btn--fit {
    position: relative;
    margin-left: 5px;
    color: var(--ios-blue, #007aff);
}

.kg-tool-btn--fit::before {
    content: "";
    position: absolute;
    left: -4px;
    top: 7px;
    bottom: 7px;
    width: 1px;
    background: rgba(60, 60, 67, 0.22);
    pointer-events: none;
}

.kg-tool-btn:hover {
    background: rgba(0, 122, 255, 0.1);
    color: var(--ios-blue, #007aff);
}

.kg-tool-btn--fit:hover {
    background: rgba(0, 122, 255, 0.14);
    color: var(--ios-blue-hover, #0066d6);
}

.kg-tool-btn:active {
    background: rgba(0, 122, 255, 0.18);
}

.kg-tool-btn:focus-visible {
    outline: 2px solid rgba(0, 122, 255, 0.45);
    outline-offset: 1px;
}

.kg-canvas {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(0, 122, 255, 0.05), transparent 45%),
        radial-gradient(ellipse at 85% 90%, rgba(88, 86, 214, 0.04), transparent 42%),
        var(--ios-bg);
    border: none;
    border-radius: 0;
    padding: 0;
    cursor: grab;
}

.kg-canvas.is-panning {
    cursor: grabbing;
}

.kg-svg {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
}

.kg-svg-bg {
    fill: transparent;
}

.kg-edge {
    fill: none;
    stroke: rgba(60, 60, 67, 0.28);
    stroke-width: 1.5;
    opacity: 1;
}

.kg-edge--active {
    stroke: var(--ios-blue);
    stroke-width: 2;
    opacity: 0.9;
}

.kg-node {
    cursor: pointer;
}

.kg-node-dot {
    stroke: #fff;
    stroke-width: 2.5;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

.kg-node-ring {
    fill: none;
    stroke: var(--ios-blue);
    stroke-width: 2;
    opacity: 0.85;
}

.kg-node--selected .kg-node-ring {
    stroke: var(--ios-blue);
    stroke-width: 2.5;
    opacity: 1;
}

.kg-node:hover .kg-node-dot {
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.16)) brightness(1.04);
}

.kg-node-label,
.kg-node-label-pill {
    font-size: 12px;
    font-weight: 600;
    fill: var(--ios-label);
    pointer-events: none;
    user-select: none;
    paint-order: stroke;
    stroke: rgba(242, 242, 247, 0.92);
    stroke-width: 3px;
    stroke-linejoin: round;
}

.kg-node-caption {
    font-size: 10px;
    fill: var(--ios-label-secondary);
    pointer-events: none;
    user-select: none;
}

.kg-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.72);
    border: none;
    border-top: 1px solid var(--ios-separator);
    border-radius: 0;
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
}

.kg-legend-title {
    font-size: var(--pi-font-footnote, 13px);
    color: var(--ios-label-secondary);
    font-weight: 600;
}

.kg-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.kg-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--pi-font-footnote, 13px);
    color: var(--ios-label);
}

.kg-legend-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.08);
}

.kg-hint {
    margin: 0;
    padding: 8px 14px 12px;
    font-size: 12px;
    color: var(--ios-label-secondary);
    background: rgba(255, 255, 255, 0.72);
    border-top: none;
}

.kg-detail {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--ios-bg-secondary);
    color: var(--ios-label);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.04);
}

.kg-detail-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--ios-separator);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
}

.kg-detail-bar-title {
    font-size: var(--pi-font-title);
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--ios-label);
}

.kg-detail-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: var(--ios-fill);
    color: var(--ios-label-secondary);
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--pi-transition), color var(--pi-transition);
}

.kg-detail-close:hover {
    background: rgba(120, 120, 128, 0.24);
    color: var(--ios-label);
}

.kg-detail-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--ios-label-secondary);
    text-align: center;
    font-size: var(--pi-font-subhead);
}

.kg-detail-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 16px 18px 24px;
    background: var(--ios-bg);
}

.kg-detail-loading,
.kg-detail-error {
    padding: 24px 8px;
    color: var(--ios-label-secondary);
    text-align: center;
}

.kg-detail-error {
    color: var(--ios-red);
}

.kg-detail-head {
    margin-bottom: 16px;
    padding: 14px;
    border-radius: var(--pi-radius-lg);
    background: var(--ios-bg-secondary);
    border: 1px solid var(--ios-separator);
    box-shadow: var(--pi-shadow-sm);
}

.kg-detail-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.kg-label-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: var(--ios-fill-secondary);
    color: var(--ios-label-secondary);
    border: 0.5px solid var(--ios-separator);
}

.kg-label-chip--book {
    background: rgba(0, 122, 255, 0.12);
    border-color: rgba(0, 122, 255, 0.2);
    color: var(--ios-blue);
}

.kg-label-chip--knowledge {
    background: rgba(52, 199, 89, 0.12);
    border-color: rgba(52, 199, 89, 0.22);
    color: #248a3d;
}

.kg-detail-title {
    margin: 0 0 12px;
    font-size: var(--pi-font-large);
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ios-label);
    word-break: break-word;
}

.kg-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.kg-detail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 980px;
    border: 0.5px solid var(--ios-separator);
    background: var(--ios-bg-secondary);
    color: var(--ios-label);
    font-size: 13px;
    font-weight: 560;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--pi-shadow-sm);
    transition: background var(--pi-transition), color var(--pi-transition);
}

.kg-detail-btn:hover {
    background: var(--ios-fill-secondary);
    color: var(--ios-label);
}

.kg-detail-btn--primary {
    background: var(--ios-blue);
    border-color: var(--ios-blue);
    color: #fff;
}

.kg-detail-btn--primary:hover {
    background: var(--ios-blue-hover);
    color: #fff;
}

.kg-detail-section {
    margin-top: 14px;
}

.kg-detail-section-title {
    font-size: 12px;
    font-weight: 650;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--ios-label-secondary);
    margin-bottom: 8px;
    padding-left: 2px;
}

/* 属性区：三行四列（标签 | 值 | 标签 | 值） */
.kg-prop-table {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
    border: 1px solid var(--ios-separator);
    border-radius: var(--pi-radius-lg);
    overflow: hidden;
    background: var(--ios-bg-secondary);
    box-shadow: var(--pi-shadow-sm);
    font-size: 13px;
}

.kg-prop-table > .kg-prop-key,
.kg-prop-table > .kg-prop-val {
    padding: 10px 12px;
    border-top: 1px solid var(--ios-separator);
    min-width: 0;
    align-self: stretch;
}

.kg-prop-table > .kg-prop-key:nth-child(-n+4),
.kg-prop-table > .kg-prop-val:nth-child(-n+4) {
    border-top: none;
}

.kg-prop-table > .kg-prop-key {
    color: var(--ios-label-secondary);
    word-break: break-all;
    background: rgba(60, 60, 67, 0.03);
}

.kg-prop-table > .kg-prop-val {
    color: var(--ios-label);
    word-break: break-word;
}

.kg-prop-table > .kg-prop-val:nth-child(4n+2) {
    border-right: 1px solid var(--ios-separator);
}

.kg-prop-empty {
    color: var(--ios-label-tertiary);
}

.kg-detail-content {
    border: 1px solid var(--ios-separator);
    border-radius: var(--pi-radius-lg);
    padding: 14px;
    background: var(--ios-bg-secondary);
    color: var(--ios-label);
    max-height: none;
    box-shadow: var(--pi-shadow-sm);
}

.kg-detail-content img {
    max-width: 100%;
    height: auto;
}

.kg-tooltip {
    position: fixed;
    z-index: 10050;
    max-width: 320px;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(30, 30, 30, 0.92);
    color: #fff;
    font-size: 11px;
    line-height: 1.4;
    font-family: var(--pi-font);
    letter-spacing: 0.01em;
    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.24),
        0 0 0 0.5px rgba(255, 255, 255, 0.08) inset;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    pointer-events: none;
    opacity: 0;
    transform: translateY(3px) scale(0.98);
    transition: opacity 0.14s ease, transform 0.14s ease;
    word-break: break-word;
    white-space: normal;
}

.kg-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.kg-tooltip.is-interactive {
    pointer-events: auto;
}

.kg-tooltip-link {
    color: #7ec8ff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.kg-tooltip-link:hover {
    color: #b8e0ff;
}

@media (max-width: 900px) {
    .pi-knowledge-graph-page {
        height: auto;
        overflow: auto;
    }

    .pi-knowledge-graph-page .kg-main {
        height: auto;
        overflow: auto;
    }

    .kg-wrap--split {
        flex-direction: column;
        height: auto;
    }

    .kg-stage,
    .kg-detail {
        width: 100% !important;
        flex: none !important;
    }

    .kg-splitter {
        display: none;
    }

    .kg-stage {
        border-right: none;
        border-bottom: 1px solid var(--ios-separator);
        min-height: 52vh;
    }

    .kg-canvas {
        min-height: 420px;
    }

    .kg-detail {
        min-height: 40vh;
        box-shadow: none;
    }
}

.pi-methodology-body {
    line-height: 1.8;
    font-size: var(--pi-font-subhead);
}

.pi-methodology-cite {
    color: var(--ios-label-secondary);
    text-align: right;
    font-size: var(--pi-font-body);
}

.pi-comment-section {
    margin-top: 12px;
}

.pi-comment-editor-wrap textarea {
    width: 100%;
    min-height: 315px;
    overflow: auto;
}

.pi-comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.pi-comment-list {
    margin-top: 10px;
}

.pi-comment-item {
    border: 1px solid var(--ios-separator);
    border-radius: var(--pi-radius-sm);
    padding: 10px;
    margin-top: 8px;
    background: var(--ios-bg-secondary);
}

.pi-comment-item-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 6px;
}

.pi-comment-author {
    font-size: var(--pi-font-body);
    color: var(--ios-label);
}

.pi-comment-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pi-comment-time {
    font-size: 12px;
    color: var(--ios-label-tertiary);
}

.pi-comment-content {
    font-size: var(--pi-font-subhead);
    color: var(--ios-label);
    overflow: auto;
    line-height: 1.55;
}

.pi-comment-actions-inline {
    display: flex;
    gap: 8px;
}

.pi-empty-hint {
    color: var(--ios-label-tertiary);
    font-size: var(--pi-font-body);
}

.pi-error-hint {
    color: var(--ios-red);
    font-size: var(--pi-font-body);
}

/* 独立二级页（书籍/目标/知识点编辑与详情） */
.pi-standalone-page {
    min-height: 100vh;
    background: var(--ios-bg);
    display: flex;
    flex-direction: column;
}

.pi-standalone-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 20px;
    border-bottom: 1px solid var(--ios-separator);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.pi-standalone-topbar--with-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
}

.pi-standalone-topbar__inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 12px 16px 14px;
    box-sizing: border-box;
}

.pi-standalone-topbar__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.pi-standalone-topbar--with-nav .app-nav {
    margin: 0;
    width: 100%;
    flex-wrap: nowrap;
    justify-content: stretch;
    overflow-x: auto;
}

.pi-standalone-topbar--with-nav .app-nav .nav-btn {
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
    padding-left: 6px;
    padding-right: 6px;
}

.pi-standalone-topbar--with-nav + .pi-standalone-main {
    max-width: 1200px;
    padding-left: 16px;
    padding-right: 16px;
}

.pi-standalone-topbar a:not(.home-logo) {
    color: var(--ios-blue);
    text-decoration: none;
    font-weight: 500;
    font-size: var(--pi-font-subhead);
}

.pi-standalone-topbar a:hover {
    opacity: 0.75;
}

.pi-standalone-topbar .home-logo {
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
}

.pi-standalone-topbar .home-logo:hover {
    opacity: 0.85;
}

.pi-standalone-topbar__title {
    flex: 1;
    text-align: center;
    font-size: var(--pi-font-title);
    font-weight: 600;
    color: var(--ios-label);
    margin: 0;
    letter-spacing: -0.02em;
}

.pi-standalone-main {
    flex: 1;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 20px 96px;
    box-sizing: border-box;
}

.pi-standalone-main--wide {
    max-width: 1200px;
    padding-bottom: 104px;
}

.pi-standalone-card {
    background: var(--ios-bg-secondary);
    border-radius: var(--pi-radius-lg);
    border: 1px solid var(--ios-separator);
    padding: 20px 24px 12px;
    box-shadow: var(--pi-shadow-sm);
}

.pi-standalone-footer {
    /* fixed 避免 TinyMCE iframe/工具栏在滚动时盖住取消/保存 */
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.94);
    border-top: 1px solid var(--ios-separator);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.pi-standalone-footer button {
    min-width: 96px;
    padding: 9px 18px;
    border-radius: var(--pi-radius-sm);
    font-size: var(--pi-font-subhead);
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
    transition: opacity var(--pi-transition), background var(--pi-transition);
}

.pi-standalone-footer .btn-cancel {
    background: var(--ios-fill);
    color: var(--ios-label);
}

.pi-standalone-footer .btn-draft {
    background: #fff;
    color: var(--ios-blue);
    border-color: var(--ios-blue);
}

.pi-standalone-footer .btn-draft:hover:not(:disabled) {
    background: rgba(0, 122, 255, 0.08);
}

.pi-standalone-footer .btn-save {
    background: var(--ios-blue);
    color: #fff;
}

.pi-standalone-footer .btn-save:hover:not(:disabled) {
    background: var(--ios-blue-hover);
}

.pi-standalone-footer .btn-save:disabled,
.pi-standalone-footer .btn-draft:disabled,
.pi-standalone-footer .btn-cancel:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pi-standalone-error {
    color: var(--ios-red);
    font-size: var(--pi-font-subhead);
    padding: 16px;
    background: rgba(255, 59, 48, 0.08);
    border-radius: var(--pi-radius-md);
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.pi-standalone-card .tox-tinymce {
    min-height: 0;
}

/* 表单控件统一（含 JS 动态生成） */
textarea,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select {
    font-family: inherit;
    font-size: var(--pi-font-body);
    color: var(--ios-label);
    background: var(--ios-bg-secondary);
    border: 1px solid var(--ios-separator);
    border-radius: var(--pi-radius-md);
    padding: 7px 12px;
    transition: border-color var(--pi-transition), box-shadow var(--pi-transition);
}

textarea:focus,
input:focus,
select:focus {
    outline: none;
    border-color: rgba(0, 122, 255, 0.45);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.modal-body textarea,
.modal-body select,
.modal-body input[type="text"],
.modal-body input[type="password"],
.modal-body input[type="email"],
.modal-body input[type="tel"],
.modal-body input[type="number"],
.modal-body input[type="date"],
.modal-body input[type="datetime-local"] {
    width: 100%;
    max-width: 100%;
}

.modal-body .form-row-split {
    margin-top: 4px;
}

.modal-body .form-row-split-label {
    margin-bottom: 4px;
    font-size: var(--pi-font-body);
    color: var(--ios-label-secondary);
}

/* 按钮体系统一 */
button {
    font-family: inherit;
    font-size: var(--pi-font-body);
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: background var(--pi-transition), opacity var(--pi-transition), transform 0.12s ease, box-shadow var(--pi-transition);
}

button:active:not(:disabled) {
    opacity: 0.72;
    transform: scale(0.98);
}

button.primary {
    background: var(--ios-blue);
    color: #fff;
    border-radius: var(--pi-radius-sm);
    border: none;
    padding: 7px 14px;
    font-weight: 500;
    box-shadow: none;
}

button.primary:hover:not(:disabled) {
    background: var(--ios-blue-hover);
}

button.secondary {
    background: var(--ios-fill);
    color: var(--ios-blue);
    border: none;
    border-radius: var(--pi-radius-sm);
    padding: 7px 14px;
    cursor: pointer;
}

button.secondary:hover:not(:disabled) {
    background: rgba(120, 120, 128, 0.22);
}

button.danger {
    background: var(--ios-red);
    border-radius: var(--pi-radius-sm);
}

button.danger:hover:not(:disabled) {
    background: #e0352b;
}

.timer-controls button:not(.primary) {
    background: var(--ios-fill);
    color: var(--ios-label);
    border: none;
    border-radius: var(--pi-radius-sm);
    padding: 7px 14px;
    cursor: pointer;
}

.timer-controls button:not(.primary):hover:not(:disabled) {
    background: rgba(120, 120, 128, 0.22);
}

/* 分段控件：主导航 */
.app-nav {
    background: var(--ios-fill);
    padding: 3px;
    border: none;
    border-radius: var(--pi-radius-md);
    box-shadow: none;
    gap: 2px;
}

.app-nav .nav-btn {
    flex: 1;
    min-width: 88px;
    border: none;
    padding: 8px 10px;
    border-radius: 7px;
    background: transparent;
    color: var(--ios-label);
    font-weight: 500;
    font-size: var(--pi-font-body);
    box-shadow: none;
}

.app-nav .nav-btn.active {
    background: var(--ios-bg-secondary);
    color: var(--ios-label);
    border-color: transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    font-weight: 600;
}

.app-nav .nav-btn:hover:not(.active) {
    transform: none;
    background: rgba(255, 255, 255, 0.45);
    border-color: transparent;
    color: var(--ios-label);
    box-shadow: none;
}

/* 分段控件：页内 Tab */
.tabs {
    background: var(--ios-fill);
    padding: 3px;
    border-radius: var(--pi-radius-md);
    gap: 2px;
}

.tab-btn,
.tab-extra-btn {
    border: none;
    padding: 7px 12px;
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
    font-size: var(--pi-font-body);
    font-weight: 500;
    color: var(--ios-label);
}

.tab-btn.active {
    background: var(--ios-bg-secondary);
    color: var(--ios-label);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

.tab-extra-btn:hover {
    background: rgba(255, 255, 255, 0.45);
}

.tab-btn:hover:not(.active),
.tab-extra-btn:hover {
    background: rgba(255, 255, 255, 0.45);
}

/* 语言切换：分段控件 */
.pi-lang-switch {
    border: none;
    background: var(--ios-fill);
    border-radius: var(--pi-radius-md);
    padding: 2px;
    box-shadow: none;
}

.pi-lang-btn {
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    color: var(--ios-label);
}

.pi-lang-btn:hover {
    background: rgba(255, 255, 255, 0.45);
    color: var(--ios-label);
}

.pi-lang-btn-active {
    background: var(--ios-bg-secondary) !important;
    color: var(--ios-label) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

/* 主内容区 */
.app-main {
    background: var(--ios-bg-secondary);
    border-radius: var(--pi-radius-xl);
    padding: 16px;
    box-shadow: var(--pi-shadow-sm);
    border: 1px solid var(--ios-separator);
    min-height: 65vh;
}

.view-header h2 {
    font-size: var(--pi-font-large);
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* 卡片与面板 */
.card,
.habit-column,
.kanban-column,
.goal-sub-nav {
    background: var(--ios-bg);
    border-radius: var(--pi-radius-lg);
}

.habit-column-header {
    background: var(--ios-fill);
    color: var(--ios-label);
    font-weight: 600;
    font-size: var(--pi-font-body);
}

.habit-card {
    border-radius: var(--pi-radius-lg);
    border-color: var(--ios-separator);
    box-shadow: var(--pi-shadow-sm);
}

.habit-streak {
    background: rgba(255, 149, 0, 0.12);
    color: #c93400;
}

.habit-progress-bar {
    background: linear-gradient(90deg, var(--ios-blue), var(--ios-green));
}

.goal-sub-nav-btn.active {
    background: var(--ios-blue);
}

.kanban-card {
    border-radius: var(--pi-radius-sm);
    border: 1px solid var(--ios-separator);
    box-shadow: var(--pi-shadow-sm);
}

.kanban-card-title {
    font-size: var(--pi-font-body);
    font-weight: 600;
}

.data-table {
    font-size: var(--pi-font-body);
}

.data-table thead {
    background: var(--ios-bg);
}

.data-table th {
    font-weight: 600;
    color: var(--ios-label-secondary);
    font-size: 12px;
}

.data-table tbody tr:hover {
    background: var(--ios-fill-secondary);
}

/* 弹窗 */
.modal-overlay {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.modal {
    border-radius: var(--pi-radius-lg);
    box-shadow: var(--pi-shadow-lg);
}

.modal-header {
    padding: 4px 16px;
    border-bottom: 1px solid var(--ios-separator);
    font-size: 13px;
    font-weight: 600;
    min-height: 0;
    background: var(--ios-bg-secondary, #fff);
}

.modal-body {
    font-size: var(--pi-font-body);
    padding: 14px 16px;
}

.modal-footer {
    border-top: 1px solid var(--ios-separator);
    padding: 10px 16px;
    background: var(--ios-bg-secondary, #fff);
}

.pi-page-btn.active {
    background: var(--ios-blue);
    border-color: var(--ios-blue);
}

.big-number {
    color: var(--ios-blue);
}

.pomodoro-mode-btn.active {
    background: var(--ios-orange);
}

.pill-actions button {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: var(--pi-radius-sm);
    background: var(--ios-fill);
    color: var(--ios-blue);
}

.pill-actions button.danger {
    background: rgba(255, 59, 48, 0.12);
    color: var(--ios-red);
}

.book-interpret-btns .book-interpret-btn,
.book-interpret-btns .knowledge-generate-btn,
.book-interpret-btns .knowledge-hierarchy-btn,
.book-interpret-btns .goal-analyze-btn {
    background: var(--ios-blue);
    border-radius: var(--pi-radius-sm);
    font-size: 12px;
}

.book-interpret-btns .book-interpret-btn:hover,
.book-interpret-btns .knowledge-generate-btn:hover,
.book-interpret-btns .knowledge-hierarchy-btn:hover:not(:disabled),
.book-interpret-btns .goal-analyze-btn:hover {
    background: var(--ios-blue-hover);
}

.book-interpret-btns .book-translate-btn,
.book-interpret-btns .knowledge-translate-btn {
    background: var(--ios-fill);
    border-radius: var(--pi-radius-sm);
}

.pi-methodology-guide-link {
    color: var(--ios-blue);
}

.login-apk-link,
.login-forgot-row a,
.pi-standalone-topbar a:not(.home-logo) {
    color: var(--ios-blue);
}

.user-menu-dropdown {
    border-radius: var(--pi-radius-lg);
    border: 1px solid var(--ios-separator);
    box-shadow: var(--pi-shadow-lg);
    padding: 6px 0;
}

.user-menu-item {
    font-size: var(--pi-font-subhead);
    padding: 9px 14px;
}

.user-menu-item:hover {
    background: var(--ios-fill-secondary);
}

.user-menu-item-danger {
    color: var(--ios-red);
}

.user-menu-item-danger:hover {
    background: rgba(255, 59, 48, 0.08);
}

.book-public-input:checked + .book-public-switch-track {
    background: var(--ios-green);
}

.book-public-switch--display.is-on .book-public-switch-track {
    background: var(--ios-green);
}

.book-comments .book-comment-submit,
.knowledge-comments .knowledge-comment-submit {
    background: var(--ios-blue);
    border-radius: var(--pi-radius-sm);
    font-weight: 500;
    color: #fff;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: var(--pi-font-body);
}

.ai-thinking {
    border-color: rgba(0, 122, 255, 0.2);
    background: rgba(0, 122, 255, 0.06);
    border-radius: var(--pi-radius-md);
}

.ai-thinking-spinner {
    border-top-color: var(--ios-blue);
}

.goal-period-dropdown-trigger {
    border-radius: var(--pi-radius-sm);
    border-color: var(--ios-separator);
    font-size: var(--pi-font-body);
}

.goal-period-dropdown-trigger:hover {
    border-color: var(--ios-blue);
}

.goal-period-dropdown-panel {
    border-radius: var(--pi-radius-md);
    border-color: var(--ios-separator);
    box-shadow: var(--pi-shadow-md);
}

.goal-actions-dropdown {
    border-radius: var(--pi-radius-md);
    border-color: var(--ios-separator);
    box-shadow: var(--pi-shadow-md);
    min-width: 168px;
    width: max-content;
}

.goal-actions-dropdown button {
    font-size: var(--pi-font-body);
    padding: 8px 14px;
    white-space: nowrap;
}

.cursor-pointer {
    cursor: pointer;
}

.pill-actions-spaced {
    margin-top: 6px;
}

.auto-split-item {
    display: block;
    margin-bottom: 8px;
    border: 1px solid var(--ios-separator);
    border-radius: var(--pi-radius-sm);
    padding: 8px;
}

.auto-split-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.auto-split-item-main {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
}

.auto-split-item-main input[type="checkbox"] {
    margin-right: 6px;
}

.auto-split-item-desc {
    margin-top: 4px;
    color: var(--ios-label-secondary);
}

.auto-split-continue-btn {
    padding: 4px 8px;
    font-size: 12px;
    white-space: nowrap;
}

.reflection-preview-cell {
    max-width: 280px;
    word-break: break-word;
    color: var(--ios-label-secondary);
    font-size: var(--pi-font-body);
}

.reflection-updated-at {
    white-space: nowrap;
    font-size: 12px;
    color: var(--ios-label-secondary);
}

.reflection-date-cell {
    white-space: nowrap;
}

/* 登录页 macOS 风格 */
.login-page {
    background: var(--ios-bg);
    padding-top: 96px;
}

.login-page::before,
.login-page::after {
    opacity: 0.08;
}

.login-page-title h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--ios-label);
}

.login-page-title h3 {
    color: var(--ios-label-secondary);
    font-size: var(--pi-font-subhead);
}

.login-hero {
    border-radius: var(--pi-radius-xl);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--ios-separator);
    backdrop-filter: saturate(180%) blur(20px);
    box-shadow: var(--pi-shadow-sm);
}

.login-card {
    border-radius: var(--pi-radius-xl);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--ios-separator);
    box-shadow: var(--pi-shadow-md);
}

.login-tabs {
    background: var(--ios-fill);
    padding: 3px;
    border-radius: var(--pi-radius-md);
    gap: 2px;
}

.login-tabs .tab-btn {
    border: none;
    background: transparent;
    border-radius: 7px;
    font-weight: 500;
    font-size: var(--pi-font-body);
    color: var(--ios-label);
}

.login-tabs .tab-btn.active {
    background: var(--ios-bg-secondary);
    color: var(--ios-label);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

.login-tabs .tab-btn:hover:not(.active) {
    transform: none;
    background: rgba(255, 255, 255, 0.45);
}

.login-actions .primary {
    background: var(--ios-blue);
    border-radius: var(--pi-radius-sm);
    box-shadow: none;
}

.login-actions .primary:hover {
    background: var(--ios-blue-hover);
}

.login-card input[type="file"]::file-selector-button {
    background: var(--ios-blue);
    border-radius: var(--pi-radius-sm);
}

.login-card input[type="file"]::file-selector-button:hover {
    background: var(--ios-blue-hover);
}

.login-forgot-row a,
.login-apk-link {
    color: var(--ios-blue);
}

.login-sub-pill {
    font-size: var(--pi-font-body);
    font-weight: 600;
}

.login-hero-points li {
    font-size: var(--pi-font-body);
    border-radius: var(--pi-radius-md);
}

.login-card-title {
    font-size: var(--pi-font-large);
    font-weight: 600;
}

.login-card .form-row label {
    font-size: 12px;
    color: var(--ios-label-secondary);
    font-weight: 500;
}

/* -------- 推广介绍首页 -------- */
.home-page {
    margin: 0;
    background: #f5f7fb;
    color: var(--ios-label);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.home-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid transparent;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    transition: border-color var(--pi-transition), box-shadow var(--pi-transition);
}

.home-header--scrolled {
    border-bottom-color: var(--ios-separator);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.home-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    min-width: 0;
}

.home-logo__mark {
    display: block;
    flex-shrink: 0;
}

.home-logo__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.home-logo__name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.2;
}

.home-logo__tagline {
    font-size: 11px;
    color: var(--ios-label-secondary);
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.home-nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--ios-label-secondary);
    text-decoration: none;
    transition: color var(--pi-transition);
}

.home-nav a:hover {
    color: var(--ios-blue);
}

.home-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--pi-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background var(--pi-transition), color var(--pi-transition), border-color var(--pi-transition);
    font-family: inherit;
    white-space: nowrap;
}

.home-btn--primary {
    background: var(--ios-blue);
    color: #fff;
}

.home-btn--primary:hover {
    background: var(--ios-blue-hover);
}

.home-btn--ghost {
    background: transparent;
    color: var(--ios-label);
    border-color: var(--ios-separator);
}

.home-btn--ghost:hover {
    background: var(--ios-fill);
}

.home-btn--outline {
    background: #fff;
    color: var(--ios-blue);
    border-color: rgba(0, 122, 255, 0.35);
}

.home-btn--outline:hover {
    background: rgba(0, 122, 255, 0.06);
}

.home-btn--lg {
    padding: 12px 22px;
    font-size: 15px;
    border-radius: var(--pi-radius-md);
}

.home-btn--on-dark {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}

.home-btn--on-dark:hover {
    background: rgba(255, 255, 255, 0.12);
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 40px;
    align-items: center;
    max-width: 1180px;
    margin: 0 auto;
    padding: 120px 28px 72px;
    position: relative;
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(0, 122, 255, 0.12), transparent 55%),
        radial-gradient(ellipse 60% 50% at 90% 10%, rgba(52, 199, 89, 0.1), transparent 50%),
        radial-gradient(ellipse 50% 40% at 70% 80%, rgba(88, 86, 214, 0.08), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.home-hero__inner {
    position: relative;
    z-index: 2;
    overflow: visible;
}

.home-hero__visual {
    position: relative;
    z-index: 1;
    overflow: visible;
}

.home-hero__kicker {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ios-blue);
}

.home-hero__title {
    margin: 0 0 16px;
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #111827;
}

.home-hero__lead {
    margin: 0 0 18px;
    font-size: 16px;
    line-height: 1.75;
    color: var(--ios-label-secondary);
    max-width: 640px;
}

.home-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    padding-top: 8px;
}

.home-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 122, 255, 0.15);
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    cursor: default;
    user-select: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.home-pill i {
    color: var(--ios-blue);
}

.home-pill.pi-tooltip {
    margin-left: 0;
    outline: none;
    position: relative;
}

.home-pill.pi-tooltip:hover,
.home-pill.pi-tooltip:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
    border-color: rgba(0, 122, 255, 0.28);
    background: rgba(255, 255, 255, 0.98);
}

.home-pill.pi-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    top: auto !important;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    display: block;
    width: max-content;
    max-width: min(520px, calc(100vw - 48px));
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.55;
    font-weight: 400;
    color: #111827;
    background: #ffffff !important;
    background-color: #ffffff !important;
    opacity: 0;
    border: 1px solid rgba(17, 24, 39, 0.12);
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.16);
    visibility: hidden;
    pointer-events: none;
    z-index: 9999;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

.home-pill.pi-tooltip::before {
    content: "";
    position: absolute;
    left: 50%;
    top: auto !important;
    bottom: calc(100% + 2px);
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border: none;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 10px solid #ffffff;
    filter: drop-shadow(0 1px 0 rgba(17, 24, 39, 0.12));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 10000;
}

.home-pill.pi-tooltip:hover::after,
.home-pill.pi-tooltip:hover::before,
.home-pill.pi-tooltip:focus-visible::after,
.home-pill.pi-tooltip:focus-visible::before {
    opacity: 1 !important;
    visibility: visible !important;
}

.home-pill.pi-tooltip:hover::after,
.home-pill.pi-tooltip:focus-visible::after {
    animation: none !important;
}

/* 首个药丸左对齐，避免长文案向右伸出被右侧功能环遮挡 */
.home-pill.pi-tooltip:first-child::after {
    left: 0;
    transform: none;
    text-align: left;
}

.home-pill.pi-tooltip:first-child::before {
    left: 24px;
    transform: none;
}

.home-pill.pi-tooltip:nth-child(2)::after {
    left: 0;
    right: auto;
    transform: none;
    text-align: left;
}

.home-pill.pi-tooltip:nth-child(2)::before {
    left: 24px;
    right: auto;
    transform: none;
}

.home-hero__sub {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--ios-label-secondary);
    max-width: 600px;
    opacity: 0.92;
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
    margin-bottom: 0;
}

.home-hero-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-width: 640px;
}

.home-hero-points li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: var(--pi-radius-md);
    border: 1px solid rgba(15, 23, 42, 0.06);
    font-size: 13px;
    line-height: 1.45;
}

.home-hero-points i {
    color: var(--ios-green, #34c759);
    margin-top: 3px;
    flex-shrink: 0;
}

.home-hero-points--compact {
    grid-template-columns: 1fr;
    max-width: 560px;
}

.home-hero-points--compact li {
    padding: 11px 14px;
}

.home-orbit {
    position: relative;
    width: min(460px, 100%);
    aspect-ratio: 1;
    margin: 0 auto;
    padding: 10px;
    box-sizing: content-box;
    overflow: visible;
    --orbit-count: 7;
}

.home-orbit__ring {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(0, 122, 255, 0.2);
    pointer-events: none;
}

.home-orbit__ring--1 {
    inset: 6%;
}

.home-orbit__ring--2 {
    inset: 20%;
    border-color: rgba(52, 199, 89, 0.22);
}

.home-orbit__ring--3 {
    inset: 34%;
    border-color: rgba(88, 86, 214, 0.18);
}

.home-orbit__core {
    position: absolute;
    inset: 38%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 40px rgba(0, 122, 255, 0.18);
    z-index: 2;
}

.home-orbit__node {
    position: absolute;
    z-index: 3;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    width: max-content;
    max-width: none;
    text-align: left;
    --angle: calc((var(--i) - 1) * 360deg / var(--orbit-count) - 90deg);
    --radius: 44%;
    left: calc(50% + var(--radius) * cos(var(--angle)));
    top: calc(50% + var(--radius) * sin(var(--angle)));
    transform: translate(-50%, -50%);
}

.home-orbit__node-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.home-orbit__node-label {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--ios-label-secondary);
    white-space: nowrap;
}

.home-orbit__node--goals .home-orbit__node-icon { color: #5856d6; background: rgba(88, 86, 214, 0.1); }
.home-orbit__node--todos .home-orbit__node-icon { color: var(--ios-blue); background: rgba(0, 122, 255, 0.1); }
.home-orbit__node--habits .home-orbit__node-icon { color: #34c759; background: rgba(52, 199, 89, 0.1); }
.home-orbit__node--books .home-orbit__node-icon { color: #ff9500; background: rgba(255, 149, 0, 0.1); }
.home-orbit__node--knowledge .home-orbit__node-icon { color: #30b0c7; background: rgba(48, 176, 199, 0.1); }
.home-orbit__node--rest .home-orbit__node-icon { color: #ff3b30; background: rgba(255, 59, 48, 0.1); }
.home-orbit__node--english .home-orbit__node-icon { color: #5e5ce6; background: rgba(94, 92, 230, 0.1); }
.home-orbit__node--reflection .home-orbit__node-icon { color: #ff9500; background: rgba(255, 149, 0, 0.1); }
.home-orbit__node--monetize .home-orbit__node-icon { color: #af52de; background: rgba(175, 82, 222, 0.1); }
.home-orbit__node--aiLearning .home-orbit__node-icon { color: #30b0c7; background: rgba(48, 176, 199, 0.1); }

.home-orbit--hub .home-orbit__ring--1 {
    animation: home-orbit-spin 48s linear infinite;
}

.home-orbit--hub .home-orbit__ring--2 {
    animation: home-orbit-spin 36s linear infinite reverse;
}

@keyframes home-orbit-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.home-section {
    max-width: 1180px;
    margin: 0 auto;
    padding: 56px 28px;
}

.home-section__head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 36px;
}

.home-section__head h2 {
    margin: 0 0 12px;
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.home-section__head p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ios-label-secondary);
}

.home-section__lead--nowrap {
    white-space: nowrap;
}

#problem .home-section__head,
#methodology .home-section__head {
    max-width: none;
}

.home-grid {
    display: grid;
    gap: 18px;
}

.home-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-pillars {
    padding-top: 48px;
    padding-bottom: 48px;
}

/* -------- 痛点 / 六道关 / 方法论 / 飞轮 / MVP -------- */
.home-problem {
    background: #fff;
    border-radius: 28px;
    max-width: calc(1180px + 56px);
}

.home-problem__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.home-problem__item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    padding: 22px 20px;
    border-radius: var(--pi-radius-lg);
    background: #fef2f2;
    border: 1px solid rgba(239, 68, 68, 0.12);
}

.home-problem__item:nth-child(2) {
    background: #fff7ed;
    border-color: rgba(249, 115, 22, 0.12);
}

.home-problem__item:nth-child(3) {
    background: #f5f3ff;
    border-color: rgba(139, 92, 246, 0.12);
}

.home-problem__icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 0;
    font-size: 18px;
    flex-shrink: 0;
}

.home-problem__icon--red { color: #dc2626; background: rgba(220, 38, 38, 0.1); }
.home-problem__icon--orange { color: #ea580c; background: rgba(234, 88, 12, 0.1); }
.home-problem__icon--purple { color: #7c3aed; background: rgba(124, 58, 237, 0.1); }

.home-problem__item p {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: #374151;
}

.home-problem__insight {
    padding: 22px 24px;
    border-radius: var(--pi-radius-lg);
    background: linear-gradient(135deg, rgba(49, 46, 129, 0.06) 0%, rgba(79, 70, 229, 0.08) 100%);
    border: 1px solid rgba(79, 70, 229, 0.15);
    text-align: center;
}

.home-problem__insight p {
    margin: 0 0 14px;
    font-size: 16px;
    line-height: 1.7;
    color: #1e293b;
}

.home-problem__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #4f46e5;
    text-decoration: none;
}

.home-problem__link:hover {
    text-decoration: underline;
}

.home-gates__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.home-gate {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 12px;
    align-items: center;
    padding: 22px 20px;
    background: #fff;
    border-radius: var(--pi-radius-lg);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    transition: transform var(--pi-transition), box-shadow var(--pi-transition);
}

.home-gate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.home-gate__num {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, var(--ios-blue) 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 0;
    flex-shrink: 0;
    grid-row: 1;
    grid-column: 1;
}

.home-gate h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 650;
    grid-row: 1;
    grid-column: 2;
    align-self: center;
}

.home-gate p {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ios-label-secondary);
    grid-row: 2;
    grid-column: 1 / -1;
}

.home-methodology {
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    border-radius: 28px;
    max-width: calc(1180px + 56px);
}

.home-method-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 12px;
    align-items: center;
    padding: 22px 20px;
    background: #fff;
    border-radius: var(--pi-radius-lg);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    transition: transform var(--pi-transition), box-shadow var(--pi-transition);
    height: 100%;
}

.home-method-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.home-method-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 0;
    flex-shrink: 0;
    grid-row: 1;
    grid-column: 1;
    align-self: center;
}

.home-method-card__icon--blue { background: rgba(0, 122, 255, 0.12); color: var(--ios-blue); }
.home-method-card__icon--green { background: rgba(52, 199, 89, 0.12); color: #34c759; }
.home-method-card__icon--orange { background: rgba(255, 149, 0, 0.12); color: #ff9500; }
.home-method-card__icon--teal { background: rgba(48, 176, 199, 0.12); color: #30b0c7; }
.home-method-card__icon--purple { background: rgba(88, 86, 214, 0.12); color: #5856d6; }
.home-method-card__icon--red { background: rgba(255, 59, 48, 0.12); color: #ff3b30; }

.home-method-card h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.35;
    grid-row: 1;
    grid-column: 2;
    align-self: center;
}

.home-method-card p {
    margin: 12px 0 16px;
    flex: 1;
    font-size: 14px;
    line-height: 1.65;
    color: var(--ios-label-secondary);
    grid-row: 2;
    grid-column: 1 / -1;
}

.home-method-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ios-blue);
    text-decoration: none;
    margin-top: auto;
    grid-row: 3;
    grid-column: 1 / -1;
}

.home-method-card__link:hover {
    text-decoration: underline;
}

.home-flywheel {
    max-width: none;
    padding-left: max(28px, calc((100% - 1180px) / 2 + 28px));
    padding-right: max(28px, calc((100% - 1180px) / 2 + 28px));
}

.home-flywheel__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 28px;
    align-items: stretch;
    padding: 36px;
    border-radius: 28px;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #4338ca 100%);
    color: #fff;
    box-shadow: 0 20px 60px rgba(49, 46, 129, 0.35);
}

.home-flywheel__text h2 {
    margin: 0 0 14px;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.home-flywheel__text > p {
    margin: 0 0 22px;
    font-size: 15px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
}

.home-flywheel__layers {
    display: grid;
    gap: 10px;
}

.home-flywheel__layer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: baseline;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 14px;
    line-height: 1.5;
}

.home-flywheel__layer strong {
    flex: 0 0 auto;
    min-width: 56px;
    color: #c7d2fe;
    font-weight: 650;
}

.home-flywheel__layer span {
    color: rgba(255, 255, 255, 0.88);
}

.home-flywheel__cta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 24px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.home-flywheel__cta-kicker {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a5b4fc;
}

.home-flywheel__cta h3 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
}

.home-flywheel__cta p {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.8);
    flex: 1;
}

.home-flywheel__cta .home-btn--primary {
    align-self: flex-start;
    background: #fff;
    color: #312e81;
}

.home-flywheel__cta .home-btn--primary:hover {
    background: #eef2ff;
}

.home-mvp__steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.home-mvp__step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 10px;
    align-items: center;
    padding: 24px 22px;
    background: #fff;
    border-radius: var(--pi-radius-lg);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    border-top: 3px solid var(--ios-blue);
}

.home-mvp__step:nth-child(2) {
    border-top-color: #34c759;
}

.home-mvp__step:nth-child(3) {
    border-top-color: #5856d6;
}

.home-mvp__step-num {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--ios-blue);
    margin-bottom: 0;
    line-height: 1;
    grid-row: 1;
    grid-column: 1;
    align-self: center;
}

.home-mvp__step:nth-child(2) .home-mvp__step-num { color: #34c759; }
.home-mvp__step:nth-child(3) .home-mvp__step-num { color: #5856d6; }

.home-mvp__step h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.4;
    grid-row: 1;
    grid-column: 2;
    align-self: center;
}

.home-mvp__step p {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--ios-label-secondary);
    grid-row: 2;
    grid-column: 1 / -1;
}

.home-mvp__actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.home-hero__quote {
    margin: 0 0 18px;
    padding: 14px 18px;
    border-left: 4px solid #4f46e5;
    border-radius: 0 12px 12px 0;
    background: rgba(79, 70, 229, 0.06);
    max-width: 640px;
}

.home-hero__quote p {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    font-weight: 500;
    color: #3730a3;
    font-style: italic;
}

.home-pillar {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 14px;
    align-items: center;
    background: #fff;
    border-radius: var(--pi-radius-lg);
    padding: 24px 20px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    transition: transform var(--pi-transition), box-shadow var(--pi-transition);
}

.home-pillar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.home-pillar h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.01em;
    grid-row: 1;
    grid-column: 2;
    align-self: center;
}

.home-pillar p {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--ios-label-secondary);
    grid-row: 2;
    grid-column: 1 / -1;
}

.home-pillar__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 0;
    flex-shrink: 0;
    grid-row: 1;
    grid-column: 1;
    align-self: center;
}

.home-pillar__icon--purple { color: #5856d6; background: rgba(88, 86, 214, 0.12); }
.home-pillar__icon--blue { color: var(--ios-blue); background: rgba(0, 122, 255, 0.12); }
.home-pillar__icon--green { color: #34c759; background: rgba(52, 199, 89, 0.12); }
.home-pillar__icon--gold { color: #ff9500; background: rgba(255, 149, 0, 0.12); }

.home-loop {
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    border-radius: 28px;
    max-width: calc(1180px + 56px);
}

.home-loop__track {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 2px;
}

.home-loop__step {
    flex: 1 1 120px;
    max-width: 158px;
    min-width: 108px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 8px;
    align-items: center;
    justify-items: start;
    text-align: left;
    padding: 18px 12px;
    background: #fff;
    border-radius: var(--pi-radius-lg);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.home-loop__num {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ios-blue) 0%, #5856d6 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 0;
    flex-shrink: 0;
    grid-row: 1;
    grid-column: 1;
}

.home-loop__step h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 650;
    grid-row: 1;
    grid-column: 2;
    align-self: center;
}

.home-loop__step p {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--ios-label-secondary);
    grid-row: 2;
    grid-column: 1 / -1;
    text-align: center;
}

.home-loop__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    color: rgba(15, 23, 42, 0.22);
    font-size: 11px;
    flex-shrink: 0;
}

.home-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 12px;
    align-items: center;
    background: #fff;
    border-radius: var(--pi-radius-lg);
    padding: 22px 20px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    transition: transform var(--pi-transition), box-shadow var(--pi-transition);
}

.home-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.home-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 0;
    flex-shrink: 0;
    grid-row: 1;
    grid-column: 1;
    align-self: center;
}

.home-card__icon--blue { background: rgba(0, 122, 255, 0.12); color: var(--ios-blue); }
.home-card__icon--purple { background: rgba(88, 86, 214, 0.12); color: #5856d6; }
.home-card__icon--green { background: rgba(52, 199, 89, 0.12); color: #34c759; }
.home-card__icon--orange { background: rgba(255, 149, 0, 0.12); color: #ff9500; }
.home-card__icon--teal { background: rgba(48, 176, 199, 0.12); color: #30b0c7; }
.home-card__icon--cyan { background: rgba(50, 173, 230, 0.12); color: #32ade6; }
.home-card__icon--red { background: rgba(255, 59, 48, 0.12); color: #ff3b30; }
.home-card__icon--indigo { background: rgba(94, 92, 230, 0.12); color: #5e5ce6; }
.home-card__icon--violet { background: rgba(175, 82, 222, 0.12); color: #af52de; }
.home-card__icon--gray { background: rgba(142, 142, 147, 0.12); color: #636366; }

.home-card h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    grid-row: 1;
    grid-column: 2;
    align-self: center;
}

.home-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ios-label-secondary);
}

.home-feature-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ios-label-secondary);
    grid-row: 2;
    grid-column: 1 / -1;
}

.home-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.home-feature-list li + li {
    margin-top: 8px;
}

.home-feature-list li i {
    flex-shrink: 0;
    margin-top: 3px;
    font-size: 12px;
    color: var(--ios-blue);
    opacity: 0.85;
}

.home-card:has(.home-card__icon--purple) .home-feature-list li i {
    color: #5856d6;
}

.home-card:has(.home-card__icon--green) .home-feature-list li i {
    color: #34c759;
}

.home-card:has(.home-card__icon--orange) .home-feature-list li i {
    color: #ff9500;
}

.home-card:has(.home-card__icon--teal) .home-feature-list li i {
    color: #30b0c7;
}

.home-card:has(.home-card__icon--cyan) .home-feature-list li i {
    color: #32ade6;
}

.home-card:has(.home-card__icon--red) .home-feature-list li i {
    color: #ff3b30;
}

.home-card:has(.home-card__icon--indigo) .home-feature-list li i {
    color: #5e5ce6;
}

.home-feature-list li span {
    flex: 1;
    min-width: 0;
}

.home-advantages {
    background: #fff;
    border-radius: 28px 28px 0 0;
    max-width: none;
    padding-left: max(28px, calc((100% - 1180px) / 2 + 28px));
    padding-right: max(28px, calc((100% - 1180px) / 2 + 28px));
}

.home-adv {
    padding: 22px 24px;
    border-radius: var(--pi-radius-lg);
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.home-adv h3 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-adv h3 i {
    color: var(--ios-blue);
    font-size: 15px;
}

.home-adv p {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--ios-label-secondary);
}

.home-adv--featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.08) 0%, rgba(88, 86, 214, 0.06) 100%);
    border-color: rgba(0, 122, 255, 0.14);
}

.home-adv--featured h3 i {
    color: #5856d6;
}

.home-membership {
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    max-width: none;
    padding-left: max(28px, calc((100% - 1180px) / 2 + 28px));
    padding-right: max(28px, calc((100% - 1180px) / 2 + 28px));
}

.home-membership-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
    align-items: stretch;
}

.home-invite-promo {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    max-width: 960px;
    margin: 0 auto 28px;
    padding: 22px 24px;
    border-radius: var(--pi-radius-lg);
    background: linear-gradient(135deg, #fff7ed 0%, #fff 45%, #eff6ff 100%);
    border: 2px solid #f59e0b;
    box-shadow: 0 10px 36px rgba(245, 158, 11, 0.2);
}

.home-invite-promo__badge {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    color: #fff;
    font-size: 22px;
    box-shadow: 0 6px 18px rgba(234, 88, 12, 0.35);
}

.home-invite-promo__content {
    flex: 1;
    min-width: 0;
}

.home-invite-promo__title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #9a3412;
    letter-spacing: 0.01em;
}

.home-invite-promo__desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.75;
    color: #334155;
}

.home-invite-promo__desc strong {
    color: #c2410c;
    font-weight: 700;
}

.home-membership-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 28px 24px 24px;
    border-radius: var(--pi-radius-lg);
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.home-membership-card.is-user {
    border-color: rgba(52, 199, 89, 0.2);
}

.home-membership-card.is-member {
    border-color: rgba(0, 122, 255, 0.2);
}

.home-membership-card.is-featured {
    border-width: 2px;
    border-color: #007aff;
    box-shadow: 0 12px 36px rgba(0, 122, 255, 0.14);
}

.home-membership-card__badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #007aff, #5856d6);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.home-membership-card__head {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.home-membership-card.is-user .home-membership-card__head h3 {
    color: #248a3d;
}

.home-membership-card.is-member .home-membership-card__head h3 {
    color: #007aff;
}

.home-membership-card__head h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
}

.home-membership-card__price {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

.home-membership-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.home-membership-card__block h4 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.home-membership-card__block p {
    margin: 0;
    font-size: 12px;
    line-height: 1.7;
    color: var(--ios-label-secondary);
}

.home-membership-card__cta {
    width: 100%;
    margin-top: 20px;
    justify-content: center;
    text-align: center;
}

.home-membership-shared {
    max-width: 960px;
    margin: 32px auto 0;
    padding: 24px;
    border-radius: var(--pi-radius-lg);
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: #fff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.home-membership-shared__title {
    margin: 0 0 20px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.home-membership-shared__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.home-membership-shared__item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 10px;
    align-items: center;
    padding: 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.home-membership-shared__item i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-bottom: 0;
    font-size: 16px;
    color: #007aff;
    flex-shrink: 0;
    grid-row: 1;
    grid-column: 1;
}

.home-membership-shared__item strong {
    display: block;
    margin-bottom: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    grid-row: 1;
    grid-column: 2;
    align-self: center;
}

.home-membership-shared__item p {
    margin: 8px 0 0;
    font-size: 11px;
    line-height: 1.65;
    color: var(--ios-label-secondary);
    grid-row: 2;
    grid-column: 1 / -1;
}

.home-membership-note {
    max-width: 960px;
    margin: 20px auto 0;
    text-align: center;
    font-size: 13px;
    color: var(--ios-label-secondary);
}

.home-download__card {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
    gap: 32px;
    align-items: center;
    padding: 36px;
    border-radius: 24px;
    background: linear-gradient(135deg, #0a84ff 0%, #5856d6 55%, #34c759 100%);
    color: #fff;
    box-shadow: 0 16px 48px rgba(0, 122, 255, 0.25);
}

.home-download__card h2 {
    margin: 0 0 12px;
    font-size: 28px;
    font-weight: 700;
}

.home-download__card p {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.92;
}

.home-download__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.home-download__apk {
    background: #fff;
    color: var(--ios-blue);
}

.home-download__apk:hover {
    background: #f0f7ff;
}

.home-download__hint {
    font-size: 13px !important;
    opacity: 0.78 !important;
    margin: 0 !important;
}

.home-wechat__card {
    display: flex;
    align-items: center;
    gap: 36px;
    max-width: 640px;
    margin: 0 auto;
    padding: 32px 36px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--ios-separator);
    box-shadow: 0 8px 32px rgba(17, 24, 39, 0.06);
}

.home-wechat__qr-wrap {
    flex-shrink: 0;
    padding: 10px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.home-wechat__qr {
    display: block;
    width: 180px;
    height: 180px;
    border-radius: 8px;
    object-fit: contain;
}

.home-wechat__body {
    flex: 1;
    min-width: 0;
}

.home-wechat__name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 700;
    color: var(--ios-label);
}

.home-wechat__name .fa-weixin {
    font-size: 24px;
    color: #07c160;
}

.home-wechat__points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-wechat__points li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ios-label-secondary);
}

.home-wechat__points i {
    flex-shrink: 0;
    margin-top: 3px;
    font-size: 13px;
    color: #34c759;
}

.home-phone {
    width: 180px;
    margin: 0 auto;
    padding: 12px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.home-phone__screen {
    aspect-ratio: 9/16;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    text-align: center;
}

.home-phone__brand {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #111827;
}

.home-phone__tag {
    font-size: 11px;
    color: var(--ios-label-secondary);
}

.home-cta {
    text-align: center;
    padding: 64px 28px 80px;
    background: linear-gradient(180deg, transparent, rgba(0, 122, 255, 0.06));
}

.home-cta h2 {
    margin: 0 0 12px;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
}

.home-cta p {
    margin: 0 0 24px;
    font-size: 16px;
    color: var(--ios-label-secondary);
}

.home-cta__actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.home-footer {
    text-align: center;
    padding: 28px 20px 36px;
    border-top: 1px solid var(--ios-separator);
    background: #fff;
}

.home-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.home-footer__copy {
    margin: 0;
    font-size: 12px;
    color: var(--ios-label-secondary);
}

.home-footer__sep {
    opacity: 0.6;
}

.home-footer__icp {
    color: var(--ios-label-secondary);
    text-decoration: none;
}

.home-footer__icp:hover {
    color: var(--ios-blue);
    text-decoration: underline;
}

@media (max-width: 1100px) {
    .home-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .home-gates__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .home-hero {
        grid-template-columns: 1fr;
        padding-top: 100px;
    }
    .home-hero-points {
        grid-template-columns: 1fr;
        max-width: none;
    }
    .home-hero__visual {
        order: -1;
        max-width: 340px;
        margin: 0 auto;
    }
    .home-orbit {
        width: min(360px, 100%);
    }
    .home-orbit__node-label {
        font-size: 10px;
    }
    .home-grid--3,
    .home-grid--2,
    .home-grid--4 {
        grid-template-columns: 1fr;
    }
    .home-problem__grid,
    .home-gates__grid,
    .home-mvp__steps {
        grid-template-columns: 1fr;
    }
    .home-flywheel__inner {
        grid-template-columns: 1fr;
    }
    .home-loop__arrow {
        display: none;
    }
    .home-loop__track {
        gap: 10px;
    }
    .home-loop__step {
        flex: 1 1 calc(50% - 10px);
        max-width: none;
    }
    .home-download__card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .home-download__actions {
        justify-content: center;
    }
    .home-wechat__card {
        flex-direction: column;
        text-align: center;
        padding: 28px 24px;
    }
    .home-wechat__name {
        justify-content: center;
    }
    .home-wechat__points {
        align-items: center;
    }
    .home-wechat__points li {
        justify-content: center;
        text-align: left;
        max-width: 280px;
    }
    .home-membership-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
    }
}

@media (max-width: 720px) {
    .home-header {
        flex-wrap: wrap;
        padding: 10px 16px;
        gap: 10px;
    }
    .home-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-left: 0;
        gap: 16px;
    }
    .home-header .home-logo__tagline {
        display: none;
    }
    .home-header-actions .home-btn--ghost:not(#home-enter-app-btn) {
        padding: 8px 12px;
    }
    .home-section,
    .home-hero {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* 会员支付页 */
.membership-pay-main {
    display: flex;
    justify-content: center;
    padding: 32px 20px 48px;
}

.membership-pay-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 12px 40px rgba(17, 24, 39, 0.06);
    padding: 28px 24px 32px;
}

.membership-pay-head h1 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    color: #111827;
}

.membership-pay-price {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
}

.membership-pay-price span:last-child {
    font-size: 1rem;
    font-weight: 500;
    color: #6b7280;
    margin-left: 4px;
}

.membership-pay-expires {
    margin: 10px 0 0;
    font-size: 0.9rem;
    color: #059669;
}

.membership-pay-benefits {
    list-style: none;
    margin: 24px 0;
    padding: 0;
}

.membership-pay-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.5;
}

.membership-pay-benefits .fa-check {
    color: #059669;
    margin-top: 3px;
}

.membership-pay-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 1rem;
    border-radius: 12px;
}

.membership-pay-qr-panel {
    margin-top: 20px;
    text-align: center;
}

.membership-pay-qr-hint {
    margin: 0 0 16px;
    color: #6b7280;
    font-size: 0.9rem;
}

.membership-pay-qr {
    display: inline-flex;
    padding: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.membership-pay-order-no {
    margin: 12px 0 0;
    font-size: 0.8rem;
    color: #9ca3af;
    word-break: break-all;
}

.membership-pay-refresh-btn {
    margin-top: 12px;
    background: none;
    border: none;
    color: var(--ios-blue, #2563eb);
    cursor: pointer;
    font-size: 0.9rem;
}

.membership-pay-refresh-btn:hover {
    opacity: 0.8;
}

.membership-pay-status {
    margin-top: 16px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    background: #f3f4f6;
    color: #374151;
}

.membership-pay-status.is-success {
    background: #ecfdf5;
    color: #047857;
}

.membership-pay-status.is-error {
    background: #fef2f2;
    color: #b91c1c;
}

.stats-withdraw-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 10px;
}

.withdraw-balance-block {
    margin: 8px 0 0;
}

.withdraw-balance-line {
    margin: 0;
    font-size: 1rem;
    color: #374151;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.withdraw-balance-line strong {
    font-size: 1.35rem;
    color: #111827;
    margin: 0 4px;
}

.withdraw-balance-tooltip {
    margin-left: 6px;
}

.withdraw-balance-tooltip:hover::after,
.withdraw-balance-tooltip:hover::before,
.withdraw-balance-tooltip:focus-within::after,
.withdraw-balance-tooltip:focus-within::before {
    opacity: 1;
    visibility: visible;
}

.withdraw-rules {
    margin: 0 0 20px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.55;
}

.withdraw-form label {
    display: block;
    margin-bottom: 14px;
    font-size: 0.92rem;
    color: #374151;
}

.withdraw-form label > span {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.withdraw-form input[type="text"],
.withdraw-form input[type="number"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.95rem;
}

.withdraw-code-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
}

.withdraw-code-inputs input {
    flex: 1;
    min-width: 0;
}

.withdraw-code-inputs button {
    flex-shrink: 0;
    white-space: nowrap;
}

.withdraw-code-tip {
    margin: -6px 0 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    font-size: 0.92rem;
    line-height: 1.5;
    word-break: break-all;
}

.withdraw-form .membership-pay-btn {
    margin-top: 8px;
}

.home-adv--extra { display: none; }
.home-adv-grid.is-expanded .home-adv--extra { display: block; }
.home-adv-toggle-wrap { text-align: center; margin-top: 8px; }
.home-featured-stats { color: #6b7280; margin-top: 4px; }
.home-featured-card {
    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 16px;
    padding: 18px 18px 16px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
}
.home-featured-pin {
    display: inline-block;
    font-size: 12px;
    color: #b45309;
    background: #fff7ed;
    border-radius: 999px;
    padding: 2px 8px;
    margin-bottom: 8px;
}
.home-featured-card__meta { font-size: 12px; color: #6b7280; margin: 0 0 6px; }
.home-featured-card__title { margin: 0 0 8px; font-size: 1.05rem; }
.home-featured-card__title a { color: inherit; text-decoration: none; }
.home-featured-card__summary { color: #4b5563; font-size: 0.92rem; line-height: 1.55; margin: 0 0 12px; min-height: 2.8em; }
.home-featured-card__link { font-size: 0.92rem; font-weight: 600; text-decoration: none; }
.home-featured-empty { color: #6b7280; grid-column: 1 / -1; }
.login-legal-check { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 13px; margin: 10px 0; }
.login-legal-check a { color: #2563eb; }
.legal-page { max-width: 760px; margin: 0 auto; padding: 32px 20px 48px; line-height: 1.7; }
.legal-page h1 { margin-top: 0; }
.legal-page nav { margin-bottom: 24px; }
.onboard-step { font-size: 1rem; line-height: 1.6; }

/* —— 使用说明 guide.html —— */
.guide-page {
    --guide-accent: #0b6bcb;
    --guide-ink: #1d1d1f;
    --guide-muted: rgba(60, 60, 67, 0.72);
    --guide-border: rgba(0, 0, 0, 0.08);
    --guide-surface: #fff;
    --guide-bg: #f5f7fa;
    margin: 0;
    background:
        radial-gradient(1200px 480px at 10% -10%, rgba(11, 107, 203, 0.08), transparent 60%),
        radial-gradient(900px 420px at 90% 0%, rgba(16, 185, 129, 0.06), transparent 55%),
        var(--guide-bg);
    color: var(--guide-ink);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.7;
}
.guide-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--guide-border);
}
.guide-header__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}
.guide-header__brand strong {
    display: block;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
}
.guide-header__brand small {
    display: block;
    color: var(--guide-muted);
    font-size: 12px;
}
.guide-header__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    font-size: 14px;
}
.guide-header__nav a {
    color: var(--guide-muted);
    text-decoration: none;
}
.guide-header__nav a:hover { color: var(--guide-accent); }
.guide-header__cta {
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--guide-accent);
    color: #fff !important;
}
.guide-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 20px 64px;
}
.guide-toc {
    position: sticky;
    top: 72px;
    align-self: start;
    max-height: calc(100vh - 96px);
    overflow: auto;
    padding: 16px 14px;
    border: 1px solid var(--guide-border);
    border-radius: 14px;
    background: var(--guide-surface);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
.guide-toc__title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--guide-muted);
    text-transform: uppercase;
}
.guide-toc__list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
}
.guide-toc__list li { margin: 0 0 6px; }
.guide-toc__list a {
    color: var(--guide-ink);
    text-decoration: none;
}
.guide-toc__list a:hover { color: var(--guide-accent); }
.guide-toc__meta {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--guide-border);
    font-size: 12px;
    color: var(--guide-muted);
}
.guide-main {
    min-width: 0;
    padding: 8px 4px 0;
}
.guide-hero {
    margin-bottom: 28px;
    padding: 28px 28px 24px;
    border: 1px solid var(--guide-border);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}
.guide-hero__kicker {
    margin: 0 0 8px;
    color: var(--guide-accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
}
.guide-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(1.6rem, 2.4vw, 2.1rem);
    line-height: 1.25;
}
.guide-hero__lead {
    margin: 0 0 18px;
    max-width: 48em;
    color: var(--guide-muted);
    font-size: 1.02rem;
}
.guide-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.guide-section {
    margin: 0 0 28px;
    padding: 24px 26px;
    border: 1px solid var(--guide-border);
    border-radius: 16px;
    background: var(--guide-surface);
    scroll-margin-top: 80px;
}
.guide-section h2 {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--guide-border);
    font-size: 1.35rem;
}
.guide-section h3 {
    margin: 22px 0 10px;
    font-size: 1.08rem;
}
.guide-section p,
.guide-section li { color: #2c2c2e; }
.guide-section ul,
.guide-section ol { padding-left: 1.3em; }
.guide-section li + li { margin-top: 4px; }
.guide-links { word-break: break-all; }
.guide-figure {
    margin: 18px 0 8px;
    text-align: center;
}
.guide-figure img {
    display: block;
    width: 100%;
    max-width: 920px;
    height: auto;
    margin: 0 auto;
    border: 1px solid var(--guide-border);
    border-radius: 12px;
    background: #f3f4f6;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}
.guide-figure__img--zoomable {
    cursor: zoom-in;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.guide-figure__img--zoomable:hover {
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14);
}
.guide-figure__img--zoomable:focus-visible {
    outline: 2px solid var(--guide-accent);
    outline-offset: 3px;
}
body.guide-lightbox-open { overflow: hidden; }
.guide-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 24px 28px;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(6px);
    cursor: zoom-out;
}
.guide-lightbox[hidden] { display: none !important; }
.guide-lightbox__img {
    display: block;
    max-width: min(96vw, 1400px);
    max-height: calc(100vh - 110px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    cursor: default;
}
.guide-lightbox__caption {
    margin: 0;
    max-width: min(90vw, 800px);
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    text-align: center;
}
.guide-lightbox__close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.guide-lightbox__close:hover,
.guide-lightbox__close:focus-visible {
    background: rgba(255, 255, 255, 0.28);
    outline: none;
}
.guide-figure figcaption {
    margin-top: 8px;
    font-size: 13px;
    color: var(--guide-muted);
}
.guide-figure-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.guide-figure-grid--phones {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.guide-figure-grid--phones .guide-figure img {
    max-width: 280px;
    border-radius: 18px;
}
.guide-faq dt {
    margin: 16px 0 4px;
    font-weight: 700;
}
.guide-faq dd {
    margin: 0 0 0 0;
    color: var(--guide-muted);
}
.guide-closing {
    margin-top: 18px;
    padding: 14px 16px;
    border-left: 3px solid var(--guide-accent);
    background: rgba(11, 107, 203, 0.05);
    border-radius: 0 10px 10px 0;
}
.guide-meta {
    margin-top: 16px;
    font-size: 13px;
    color: var(--guide-muted);
}
.guide-footer {
    margin-top: 8px;
    padding: 18px 4px 0;
    font-size: 14px;
    color: var(--guide-muted);
}
.guide-footer a {
    color: var(--guide-accent);
    text-decoration: none;
}
.guide-footer a:hover { text-decoration: underline; }
.guide-top {
    position: fixed;
    right: 20px;
    bottom: 24px;
    width: 42px;
    height: 42px;
    border: 1px solid var(--guide-border);
    border-radius: 50%;
    background: #fff;
    color: var(--guide-accent);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.guide-top.is-visible {
    opacity: 1;
    pointer-events: auto;
}
@media (max-width: 960px) {
    .guide-layout {
        grid-template-columns: 1fr;
        padding-top: 12px;
    }
    .guide-toc {
        position: static;
        max-height: none;
    }
    .guide-toc__list {
        columns: 2;
        column-gap: 18px;
    }
    .guide-figure-grid { grid-template-columns: 1fr; }
    .guide-figure-grid--phones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .guide-header { padding: 10px 14px; }
    .guide-header__nav { gap: 10px; font-size: 13px; }
    .guide-section { padding: 18px 16px; }
    .guide-hero { padding: 20px 16px; }
    .guide-toc__list { columns: 1; }
    .guide-figure-grid--phones { grid-template-columns: 1fr; }
}

/* Discover — macOS style */
#discover-view.discover-view--mac {
    --discover-mac-bg: #f5f5f7;
    --discover-mac-surface: rgba(255, 255, 255, 0.82);
    --discover-mac-border: rgba(0, 0, 0, 0.08);
    --discover-mac-text: #1d1d1f;
    --discover-mac-secondary: rgba(60, 60, 67, 0.6);
    --discover-mac-tertiary: rgba(60, 60, 67, 0.36);
    --discover-mac-accent: #007aff;
    --discover-mac-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    max-width: 980px;
    margin: 0 auto;
    padding: 8px 4px 32px;
}

#discover-view.discover-view--mac .discover-mac-hero {
    margin-bottom: 24px;
    padding: 4px 8px 0;
}

#discover-view.discover-view--mac .discover-mac-hero__row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 10px;
}

#discover-view.discover-view--mac .discover-mac-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--discover-mac-text);
    line-height: 1.15;
    flex-shrink: 0;
}

#discover-view.discover-view--mac .discover-mac-hero__sep {
    color: var(--discover-mac-tertiary);
    font-size: 1.125rem;
    line-height: 1;
    flex-shrink: 0;
}

#discover-view.discover-view--mac .discover-mac-lead {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.45;
    color: var(--discover-mac-secondary);
    flex: 1 1 240px;
    min-width: 0;
}

#discover-view.discover-view--mac .discover-mac-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 0 4px;
}

#discover-view.discover-view--mac .discover-mac-search {
    flex: 1 1 220px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    background: var(--discover-mac-surface);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--discover-mac-border);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

#discover-view.discover-view--mac .discover-mac-search__icon {
    color: var(--discover-mac-tertiary);
    font-size: 14px;
}

#discover-view.discover-view--mac .discover-mac-search__input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font: inherit;
    font-size: 0.9375rem;
    color: var(--discover-mac-text);
    outline: none;
}

#discover-view.discover-view--mac .discover-mac-search__input::placeholder {
    color: var(--discover-mac-tertiary);
}

#discover-view.discover-view--mac .discover-mac-bookcat {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

#discover-view.discover-view--mac .discover-mac-bookcat__btn {
    border: 1px solid var(--discover-mac-border);
    background: var(--discover-mac-surface);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--discover-mac-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, color 0.12s, border-color 0.12s, box-shadow 0.12s;
}

#discover-view.discover-view--mac .discover-mac-bookcat__btn:hover:not(.active) {
    color: var(--discover-mac-text);
    border-color: rgba(0, 122, 255, 0.25);
}

#discover-view.discover-view--mac .discover-mac-bookcat__btn.active {
    background: rgba(0, 122, 255, 0.12);
    border-color: rgba(0, 122, 255, 0.35);
    color: var(--discover-mac-accent);
    box-shadow: 0 1px 2px rgba(0, 122, 255, 0.12);
}

#discover-view.discover-view--mac .discover-mac-bookcat__more {
    position: relative;
}

#discover-view.discover-view--mac .discover-mac-bookcat__more-trigger i {
    font-size: 10px;
    margin-left: 2px;
    opacity: 0.72;
}

#discover-view.discover-view--mac .discover-mac-bookcat__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 20;
    min-width: 140px;
    max-height: 280px;
    overflow-y: auto;
    padding: 6px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--discover-mac-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

#discover-view.discover-view--mac .discover-mac-bookcat__menu-item {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 8px 12px;
    border-radius: 7px;
    font-size: 0.8125rem;
    color: var(--discover-mac-text);
    cursor: pointer;
}

#discover-view.discover-view--mac .discover-mac-bookcat__menu-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

#discover-view.discover-view--mac .discover-mac-bookcat__menu-item.active {
    background: rgba(0, 122, 255, 0.12);
    color: var(--discover-mac-accent);
    font-weight: 600;
}

#discover-view.discover-view--mac .discover-mac-segment {
    display: inline-flex;
    padding: 2px;
    background: rgba(118, 118, 128, 0.12);
    border-radius: 9px;
    gap: 2px;
}

#discover-view.discover-view--mac .discover-mac-segment__btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--discover-mac-secondary);
    cursor: pointer;
    transition: background 0.12s, color 0.12s, box-shadow 0.12s;
}

#discover-view.discover-view--mac .discover-mac-segment__btn:hover:not(.active) {
    color: var(--discover-mac-text);
}

#discover-view.discover-view--mac .discover-mac-segment__btn.active {
    background: #fff;
    color: var(--discover-mac-text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
}

#discover-view.discover-view--mac .discover-mac-sort {
    flex-shrink: 0;
    min-width: 118px;
    height: 36px;
    padding: 0 28px 0 12px;
    border: 1px solid var(--discover-mac-border);
    border-radius: 10px;
    background: var(--discover-mac-surface);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--discover-mac-text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238e8e93' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

#discover-view.discover-view--mac .discover-mac-sort:focus {
    outline: none;
    border-color: rgba(0, 122, 255, 0.45);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.16);
}

#discover-view.discover-view--mac .discover-mac-type-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

#discover-view.discover-view--mac .discover-mac-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

#discover-view.discover-view--mac .discover-mac-card {
    border-radius: var(--discover-mac-radius);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#discover-view.discover-view--mac .discover-mac-card:hover {
    transform: translateY(-2px);
}

#discover-view.discover-view--mac .discover-mac-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 168px;
    padding: 16px 16px 14px;
    text-decoration: none;
    color: inherit;
    background: var(--discover-mac-surface);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--discover-mac-border);
    border-radius: var(--discover-mac-radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

#discover-view.discover-view--mac .discover-mac-card:hover .discover-mac-card__link {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 122, 255, 0.18);
}

#discover-view.discover-view--mac .discover-mac-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

#discover-view.discover-view--mac .discover-mac-card__icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
}

#discover-view.discover-view--mac .discover-mac-card--book .discover-mac-card__icon {
    background: rgba(0, 122, 255, 0.12);
    color: #007aff;
}

#discover-view.discover-view--mac .discover-mac-card--knowledge .discover-mac-card__icon {
    background: rgba(175, 82, 222, 0.12);
    color: #af52de;
}

#discover-view.discover-view--mac .discover-mac-card__pin {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    color: #b45309;
    background: rgba(251, 191, 36, 0.2);
}

#discover-view.discover-view--mac .discover-mac-card__title {
    margin: 0 0 6px;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.35;
    color: var(--discover-mac-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#discover-view.discover-view--mac .discover-mac-card__meta {
    margin: 0 0 8px;
    font-size: 0.75rem;
    color: var(--discover-mac-tertiary);
}

#discover-view.discover-view--mac .discover-mac-card__meta--combined {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 0;
    line-height: 1.5;
}

#discover-view.discover-view--mac .discover-mac-card__meta-sep {
    margin: 0 6px;
    color: var(--discover-mac-tertiary);
    user-select: none;
}

#discover-view.discover-view--mac .discover-mac-card__category {
    font-weight: 600;
    color: var(--discover-mac-secondary);
}

#discover-view.discover-view--mac .discover-mac-card__owner {
    color: var(--discover-mac-tertiary);
}

#discover-view.discover-view--mac .discover-mac-card__stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--discover-mac-secondary);
    font-variant-numeric: tabular-nums;
}

#discover-view.discover-view--mac .discover-mac-card__stat i {
    font-size: 11px;
    color: var(--discover-mac-tertiary);
}

#discover-view.discover-view--mac .discover-mac-card__summary {
    flex: 1;
    margin: 0 0 12px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--discover-mac-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#discover-view.discover-view--mac .discover-mac-card__action {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--discover-mac-accent);
}

#discover-view.discover-view--mac .discover-mac-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    color: var(--discover-mac-secondary);
    background: var(--discover-mac-surface);
    border: 1px dashed var(--discover-mac-border);
    border-radius: var(--discover-mac-radius);
}

#discover-view.discover-view--mac .discover-mac-empty i {
    display: block;
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--discover-mac-tertiary);
}

#discover-view.discover-view--mac .discover-mac-empty p {
    margin: 0;
    font-size: 0.9375rem;
}

#discover-view.discover-view--mac .discover-mac-pagination {
    margin-top: 20px;
    justify-content: center;
}

@media (max-width: 640px) {
    #discover-view.discover-view--mac .discover-mac-title {
        font-size: 1.625rem;
    }
    #discover-view.discover-view--mac .discover-mac-lead {
        font-size: 0.875rem;
    }
    #discover-view.discover-view--mac .discover-mac-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    #discover-view.discover-view--mac .discover-mac-bookcat {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }
    #discover-view.discover-view--mac .discover-mac-segment {
        width: 100%;
        justify-content: stretch;
    }
    #discover-view.discover-view--mac .discover-mac-sort {
        width: 100%;
    }
    #discover-view.discover-view--mac .discover-mac-segment__btn {
        flex: 1;
        text-align: center;
        padding: 8px 6px;
    }
    #discover-view.discover-view--mac .discover-mac-grid {
        grid-template-columns: 1fr;
    }
}

/* Today dashboard — macOS style */
#today-view.today-view--mac {
    --today-mac-bg: #f5f5f7;
    --today-mac-surface: rgba(255, 255, 255, 0.82);
    --today-mac-border: rgba(0, 0, 0, 0.08);
    --today-mac-text: #1d1d1f;
    --today-mac-secondary: rgba(60, 60, 67, 0.6);
    --today-mac-tertiary: rgba(60, 60, 67, 0.36);
    --today-mac-accent: #007aff;
    --today-mac-radius: 12px;
    --today-mac-inset-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    max-width: 920px;
    margin: 0 auto;
    padding: 8px 4px 32px;
}

#today-view.today-view--mac .today-mac-hero {
    margin-bottom: 28px;
    padding: 4px 8px 0;
}

#today-view.today-view--mac .today-mac-headline {
    margin: 0 0 8px;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--today-mac-text);
    line-height: 1.45;
}

#today-view.today-view--mac .today-mac-title {
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    color: inherit;
}

#today-view.today-view--mac .today-mac-headline__sep {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--today-mac-tertiary);
}

#today-view.today-view--mac .today-mac-tagline {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--today-mac-secondary);
}

#today-view.today-view--mac .today-mac-subtitle {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--today-mac-tertiary);
}

#today-view.today-view--mac .today-mac-overdue {
    display: inline-block;
    margin: 10px 0 0;
    padding: 4px 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #b45309;
    background: rgba(251, 191, 36, 0.18);
    border-radius: 999px;
}

#today-view.today-view--mac .today-mac-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 28px;
}

#today-view.today-view--mac .today-mac-metric {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    padding: 10px 6px;
    background: var(--today-mac-surface);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--today-mac-border);
    border-radius: var(--today-mac-radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

#today-view.today-view--mac .today-mac-metric__body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#today-view.today-view--mac .today-mac-metric__head {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

#today-view.today-view--mac .today-mac-metric__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 11px;
}

#today-view.today-view--mac .today-mac-metric--todo .today-mac-metric__icon {
    background: rgba(0, 122, 255, 0.14);
    color: #007aff;
}

#today-view.today-view--mac .today-mac-metric--knowledge .today-mac-metric__icon {
    background: rgba(88, 86, 214, 0.14);
    color: #5856d6;
}

#today-view.today-view--mac .today-mac-metric--knowledge {
    cursor: pointer;
}

#today-view.today-view--mac .today-mac-metric--knowledge:hover .today-mac-metric__body {
    background: rgba(88, 86, 214, 0.06);
}

#today-view.today-view--mac .today-mac-metric--habit .today-mac-metric__icon {
    background: rgba(255, 149, 0, 0.16);
    color: #ff9500;
}

#today-view.today-view--mac .today-mac-metric--pomo .today-mac-metric__icon {
    background: rgba(175, 82, 222, 0.14);
    color: #af52de;
}

#today-view.today-view--mac .today-mac-metric--reflect .today-mac-metric__icon {
    background: rgba(52, 199, 89, 0.14);
    color: #34c759;
}

#today-view.today-view--mac .today-mac-metric--revenue .today-mac-metric__icon {
    background: rgba(255, 204, 0, 0.18);
    color: #ffcc00;
}

#today-view.today-view--mac .today-mac-metric__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--today-mac-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#today-view.today-view--mac .today-mac-metric__value {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--today-mac-text);
    line-height: 1.1;
    white-space: nowrap;
}

#today-view.today-view--mac .today-mac-metric__sep,
#today-view.today-view--mac .today-mac-metric__total {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--today-mac-tertiary);
}

#today-view.today-view--mac .today-mac-group {
    margin-bottom: 24px;
}

#today-view.today-view--mac .today-mac-group__title {
    margin: 0 0 8px;
    padding: 0 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--today-mac-secondary);
    letter-spacing: 0.01em;
}

#today-view.today-view--mac .today-mac-group__title--inline {
    padding: 0;
    margin: 0;
}

#today-view.today-view--mac .today-mac-group__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    padding: 0 12px;
}

#today-view.today-view--mac .today-mac-inset {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--today-mac-surface);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--today-mac-border);
    border-radius: var(--today-mac-inset-radius);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

#today-view.today-view--mac .today-mac-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    margin: 0;
    border: none;
    background: transparent;
    text-align: left;
    font: inherit;
    color: var(--today-mac-text);
    cursor: pointer;
    transition: background 0.12s ease;
}

#today-view.today-view--mac .today-mac-inset > li {
    border-bottom: 1px solid rgba(60, 60, 67, 0.08);
}

#today-view.today-view--mac .today-mac-inset > li:last-child {
    border-bottom: none;
}

#today-view.today-view--mac .today-mac-inset > .today-mac-cell {
    border-bottom: 1px solid rgba(60, 60, 67, 0.08);
}

#today-view.today-view--mac .today-mac-inset > .today-mac-cell:last-child {
    border-bottom: none;
}

#today-view.today-view--mac .today-mac-cell:hover:not(:disabled):not(.today-mac-cell--static):not(.today-mac-cell--empty) {
    background: rgba(0, 0, 0, 0.03);
}

#today-view.today-view--mac .today-mac-cell:active:not(:disabled):not(.today-mac-cell--static) {
    background: rgba(0, 0, 0, 0.06);
}

#today-view.today-view--mac .today-mac-cell--static,
#today-view.today-view--mac .today-mac-cell--empty {
    cursor: default;
}

#today-view.today-view--mac .today-mac-cell--empty {
    justify-content: center;
    color: var(--today-mac-secondary);
    font-size: 0.875rem;
}

#today-view.today-view--mac .today-mac-cell__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-size: 13px;
}

#today-view.today-view--mac .today-mac-cell__icon--todo { background: rgba(0, 122, 255, 0.12); color: #007aff; }
#today-view.today-view--mac .today-mac-cell__icon--habit { background: rgba(255, 149, 0, 0.14); color: #ff9500; }
#today-view.today-view--mac .today-mac-cell__icon--reflect { background: rgba(52, 199, 89, 0.12); color: #34c759; }
#today-view.today-view--mac .today-mac-cell__icon--discover { background: rgba(175, 82, 222, 0.12); color: #af52de; }

#today-view.today-view--mac .today-mac-cell__label {
    flex: 1;
    min-width: 0;
    font-size: 0.9375rem;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#today-view.today-view--mac .today-mac-cell__meta {
    flex-shrink: 0;
    font-size: 0.8125rem;
    color: var(--today-mac-tertiary);
}

#today-view.today-view--mac .today-mac-cell__chevron {
    flex-shrink: 0;
    font-size: 1.125rem;
    font-weight: 300;
    color: var(--today-mac-tertiary);
    line-height: 1;
}

#today-view.today-view--mac .today-mac-link {
    border: none;
    background: none;
    padding: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--today-mac-accent);
    cursor: pointer;
}

#today-view.today-view--mac .today-mac-link:hover {
    text-decoration: underline;
}

#today-view.today-view--mac .today-mac-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 4px;
}

#today-view.today-view--mac .today-suggestion-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

#today-view.today-view--mac .today-mac-checkin {
    padding: 16px 18px;
}

#today-view.today-view--mac .today-mac-checkin__hint {
    margin: 0 0 14px;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--today-mac-secondary);
}

#today-view.today-view--mac .today-mac-checkin__row {
    display: flex;
    align-items: center;
    gap: 18px;
}

#today-view.today-view--mac .today-mac-checkin__ring {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(#007aff 0deg, #007aff calc(var(--checkin-pct, 0) * 3.6deg), rgba(0, 122, 255, 0.12) calc(var(--checkin-pct, 0) * 3.6deg));
    box-shadow: inset 0 0 0 4px #fff;
}

#today-view.today-view--mac .today-mac-checkin__day {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--today-mac-accent);
}

#today-view.today-view--mac .today-mac-checkin__info {
    flex: 1;
    min-width: 0;
}

#today-view.today-view--mac .today-mac-checkin__progress {
    display: block;
    margin-bottom: 10px;
    font-size: 0.875rem;
    color: var(--today-mac-secondary);
}

#today-view.today-view--mac .today-mac-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 16px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--today-mac-text);
    cursor: pointer;
    transition: background 0.12s, box-shadow 0.12s;
}

#today-view.today-view--mac .today-mac-btn--primary {
    background: var(--today-mac-accent);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 122, 255, 0.35);
}

#today-view.today-view--mac .today-mac-btn--primary:hover:not(:disabled) {
    filter: brightness(1.05);
}

#today-view.today-view--mac .today-mac-btn--primary:disabled,
#today-view.today-view--mac .today-mac-btn--done {
    background: rgba(60, 60, 67, 0.12);
    color: var(--today-mac-secondary);
    box-shadow: none;
    cursor: default;
}

@media (max-width: 860px) {
    #today-view.today-view--mac .today-mac-metrics {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 6px;
    }
    #today-view.today-view--mac .today-mac-metric {
        padding: 8px 4px;
        gap: 6px;
    }
    #today-view.today-view--mac .today-mac-metric__icon {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }
    #today-view.today-view--mac .today-mac-metric__value {
        font-size: 1rem;
    }
    #today-view.today-view--mac .today-mac-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    #today-view.today-view--mac .today-mac-headline {
        font-size: 1.625rem;
    }
    #today-view.today-view--mac .today-mac-headline__sep,
    #today-view.today-view--mac .today-mac-tagline {
        font-size: 0.8125rem;
    }
    #today-view.today-view--mac .today-mac-metrics {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 4px;
    }
    #today-view.today-view--mac .today-mac-metric {
        padding: 6px 3px;
        gap: 4px;
    }
    #today-view.today-view--mac .today-mac-metric__icon {
        width: 20px;
        height: 20px;
        font-size: 9px;
        border-radius: 5px;
    }
    #today-view.today-view--mac .today-mac-metric__label {
        font-size: 0.625rem;
    }
    #today-view.today-view--mac .today-mac-metric__value {
        font-size: 0.9375rem;
    }
    #today-view.today-view--mac .today-mac-metric__sep,
    #today-view.today-view--mac .today-mac-metric__total {
        font-size: 0.75rem;
    }
}

/* Stats charts (legacy helpers) */
.stats-chart-card canvas { max-height: 280px; }
.stats-chart-card--wide { grid-column: 1 / -1; }

.book-cat-scope-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
}

.book-cat-scope-badge.is-shared {
    background: rgba(0, 122, 255, 0.12);
    color: #007aff;
}

.book-cat-scope-badge.is-private {
    background: rgba(142, 142, 147, 0.16);
    color: rgba(60, 60, 67, 0.72);
}

/* Stats — macOS style */
#stats-view.stats-view--mac {
    --stats-mac-bg: #f5f5f7;
    --stats-mac-surface: rgba(255, 255, 255, 0.82);
    --stats-mac-border: rgba(0, 0, 0, 0.08);
    --stats-mac-text: #1d1d1f;
    --stats-mac-secondary: rgba(60, 60, 67, 0.6);
    --stats-mac-tertiary: rgba(60, 60, 67, 0.36);
    --stats-mac-accent: #007aff;
    --stats-mac-radius: 12px;
    --stats-mac-inset-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 12px 36px;
}

#stats-view.stats-view--mac .stats-mac-hero {
    margin-bottom: 20px;
    padding: 4px 8px 0;
}

#stats-view.stats-view--mac .stats-mac-hero__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

#stats-view.stats-view--mac .stats-mac-headline {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--stats-mac-text);
    line-height: 1.45;
}

#stats-view.stats-view--mac .stats-mac-title {
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    color: inherit;
}

#stats-view.stats-view--mac .stats-mac-headline__sep {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--stats-mac-tertiary);
}

#stats-view.stats-view--mac .stats-mac-tagline {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--stats-mac-secondary);
}

#stats-view.stats-view--mac .stats-mac-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 980px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
}

#stats-view.stats-view--mac .stats-mac-btn--primary {
    background: var(--stats-mac-accent);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 122, 255, 0.28);
}

#stats-view.stats-view--mac .stats-mac-btn--primary:hover {
    background: #0066d6;
}

#stats-view.stats-view--mac .stats-mac-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#stats-view.stats-view--mac .stats-mac-quick-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

#stats-view.stats-view--mac .stats-mac-group__title {
    margin: 0 0 10px;
    padding: 0 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--stats-mac-secondary);
}

#stats-view.stats-view--mac .stats-mac-group--trend {
    min-width: 0;
}

#stats-view.stats-view--mac .stats-mac-todo-charts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

#stats-view.stats-view--mac .stats-mac-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

#stats-view.stats-view--mac .stats-mac-panel {
    background: var(--stats-mac-surface);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--stats-mac-border);
    border-radius: var(--stats-mac-radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    padding: 4px;
    overflow: hidden;
}

#stats-view.stats-view--mac .stats-mac-panel--wide,
#stats-view.stats-view--mac .stats-mac-panel--chart {
    padding: 16px 14px 12px;
}

#stats-view.stats-view--mac .stats-mac-metric {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    padding: 14px 14px 16px;
    background: var(--stats-mac-surface);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--stats-mac-border);
    border-radius: var(--stats-mac-radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

#stats-view.stats-view--mac .stats-mac-metric__body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#stats-view.stats-view--mac .stats-mac-metric__head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

#stats-view.stats-view--mac .stats-mac-metric__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
}

#stats-view.stats-view--mac .stats-mac-metric--pomo .stats-mac-metric__icon {
    background: rgba(0, 122, 255, 0.14);
    color: #007aff;
}

#stats-view.stats-view--mac .stats-mac-metric--habit .stats-mac-metric__icon {
    background: rgba(255, 149, 0, 0.16);
    color: #ff9500;
}

#stats-view.stats-view--mac .stats-mac-metric--streak .stats-mac-metric__icon {
    background: rgba(52, 199, 89, 0.16);
    color: #34c759;
}

#stats-view.stats-view--mac .stats-mac-metric--reflect .stats-mac-metric__icon {
    background: rgba(175, 82, 222, 0.14);
    color: #af52de;
}

#stats-view.stats-view--mac .stats-mac-metric__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--stats-mac-secondary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#stats-view.stats-view--mac .stats-mac-metric__value {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--stats-mac-text);
    line-height: 1.1;
    padding-left: 40px;
}

#stats-view.stats-view--mac .stats-mac-inset {
    list-style: none;
    margin: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.55);
    border-radius: var(--stats-mac-inset-radius);
    overflow: hidden;
}

#stats-view.stats-view--mac .stats-mac-inset--compact {
    margin-top: 8px;
}

#stats-view.stats-view--mac .stats-mac-inset.stats-list li,
#stats-view.stats-view--mac .stats-mac-inset > li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    font-size: 0.875rem;
    color: var(--stats-mac-text);
    border-bottom: 1px solid var(--stats-mac-border);
}

#stats-view.stats-view--mac .stats-mac-inset.stats-list li:last-child,
#stats-view.stats-view--mac .stats-mac-inset > li:last-child {
    border-bottom: none;
}

#stats-view.stats-view--mac .stats-mac-inset.stats-list li > span:first-child {
    color: var(--stats-mac-text);
    font-weight: 400;
}

#stats-view.stats-view--mac .stats-mac-inset.stats-list li > span:last-child,
#stats-view.stats-view--mac .stats-mac-inset.stats-list li > strong {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--stats-mac-text);
    flex-shrink: 0;
}

#stats-view.stats-view--mac .stats-mac-value--money {
    color: #34c759;
    font-weight: 600;
}

#stats-view.stats-view--mac .stats-mac-sub {
    margin: 12px 8px 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--stats-mac-tertiary);
}

#stats-view.stats-view--mac .stats-mac-sub--first {
    margin-top: 8px;
}

#stats-view.stats-view--mac .stats-chart-card canvas {
    width: 100% !important;
    max-height: 280px;
}

#stats-view.stats-view--mac .stats-mac-group--trend .stats-chart-card canvas {
    max-height: 320px;
}

@media (min-width: 1100px) {
    #stats-view.stats-view--mac .stats-mac-details-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    #stats-view.stats-view--mac .stats-mac-quick-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    #stats-view.stats-view--mac {
        padding: 8px 4px 36px;
    }
    #stats-view.stats-view--mac .stats-mac-quick-metrics,
    #stats-view.stats-view--mac .stats-mac-details-grid,
    #stats-view.stats-view--mac .stats-mac-todo-charts {
        grid-template-columns: 1fr;
    }
    #stats-view.stats-view--mac .stats-mac-headline {
        font-size: 1.625rem;
    }
    #stats-view.stats-view--mac .stats-mac-headline__sep,
    #stats-view.stats-view--mac .stats-mac-tagline {
        font-size: 0.875rem;
    }
    #stats-view.stats-view--mac .stats-mac-hero__row {
        flex-direction: column;
        align-items: stretch;
    }
    #stats-view.stats-view--mac .stats-mac-btn--primary {
        width: 100%;
    }
    #stats-view.stats-view--mac .stats-mac-metric__value {
        font-size: 1.5rem;
        padding-left: 0;
    }
}

/* Withdraw — macOS style */
.withdraw-page--mac {
    background: #f5f5f7;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.withdraw-page--mac .pi-standalone-topbar {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.withdraw-page--mac .membership-pay-main {
    padding: 28px 20px 48px;
}

.withdraw-page--mac .membership-pay-card {
    max-width: 480px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 28px 24px 32px;
}

.withdraw-page--mac .membership-pay-head h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #1d1d1f;
}

.withdraw-page--mac .withdraw-balance-line {
    font-size: 0.9375rem;
    color: rgba(60, 60, 67, 0.6);
}

.withdraw-page--mac .withdraw-balance-line strong {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #1d1d1f;
}

.withdraw-page--mac .withdraw-rules {
    background: rgba(0, 122, 255, 0.06);
    border: 1px solid rgba(0, 122, 255, 0.12);
    border-radius: 12px;
    color: rgba(60, 60, 67, 0.72);
    font-size: 0.875rem;
    line-height: 1.55;
    padding: 14px 16px;
}

.withdraw-page--mac .withdraw-form label > span {
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(60, 60, 67, 0.6);
    letter-spacing: 0.01em;
}

.withdraw-page--mac .withdraw-form input[type="text"],
.withdraw-page--mac .withdraw-form input[type="number"] {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 0.9375rem;
    background: rgba(255, 255, 255, 0.9);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.withdraw-page--mac .withdraw-form input:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.18);
}

.withdraw-page--mac .withdraw-code-inputs button.secondary {
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.8125rem;
}

.withdraw-page--mac .membership-pay-btn {
    border-radius: 12px;
    font-weight: 600;
    background: #007aff;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 122, 255, 0.28);
}

.withdraw-page--mac .membership-pay-btn:hover {
    background: #0066d6;
}

.withdraw-page--mac .membership-pay-status.is-success {
    background: rgba(52, 199, 89, 0.12);
    color: #248a3d;
    border-radius: 10px;
}

.withdraw-page--mac .membership-pay-status.is-error {
    background: rgba(255, 59, 48, 0.1);
    color: #d70015;
    border-radius: 10px;
}

/* Bilingual reading */
.pi-bilingual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 768px) {
    .pi-bilingual-grid { grid-template-columns: 1fr; }
}
.pi-bilingual-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
    font-size: 0.95rem;
}
.pi-bilingual-col {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
    background: #fafafa;
}
.pi-bilingual-body { line-height: 1.65; }
.book-bilingual-toggle.is-active,
.knowledge-bilingual-toggle.is-active {
    border-color: #4f46e5;
    color: #4f46e5;
}

/* Membership center modal */
.membership-center-upgrade { margin-top: 16px; }
.membership-center-upgrade-btn {
    display: inline-block;
    padding: 10px 18px;
    text-decoration: none;
    border-radius: 8px;
}

/* Goal linked todos */
.goal-linked-todos { list-style: none; margin: 0; padding: 0; }
.goal-linked-todos li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}
.goal-linked-todo-link { color: #2563eb; text-decoration: none; }
.goal-linked-todo-meta { color: #6b7280; font-size: 13px; }

/* Learning methodology guide (knowledge #8) */
.pi-rich-content-box--learning-guide {
    padding: 0;
    border: none;
    background: transparent;
    min-height: 0;
}

.pi-rich-content-box .pi-learning-guide {
    --pi-lg-accent: #4f46e5;
    --pi-lg-radius: 14px;
    font-size: 15px;
    line-height: 1.65;
    color: var(--ios-label, #1c1c1e);
}

.pi-lg-hero {
    margin: 0 0 28px;
    padding: 24px 22px;
    border-radius: var(--pi-lg-radius);
    background: linear-gradient(135deg, #312e81 0%, #4f46e5 55%, #6366f1 100%);
    color: #fff;
}

.pi-lg-kicker {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.88;
}

.pi-lg-title {
    margin: 0 0 12px;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    border: none;
}

.pi-lg-lead,
.pi-lg-meta {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
}

.pi-lg-meta a {
    color: #c7d2fe;
    text-decoration: underline;
}

.pi-lg-section {
    margin-bottom: 32px;
}

.pi-lg-section-title {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ios-label, #1c1c1e);
    border: none;
}

.pi-lg-section-desc {
    margin: 0 0 20px;
    color: var(--ios-label-secondary, #6b7280);
    font-size: 14px;
}

.pi-lg-method {
    margin-bottom: 24px;
    border: 1px solid var(--ios-separator, #e5e7eb);
    border-radius: var(--pi-lg-radius);
    background: var(--ios-bg-secondary, #fff);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.pi-lg-method-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--ios-separator, #e5e7eb);
    background: var(--ios-bg, #fafafa);
}

.pi-lg-method-num {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: var(--pi-lg-accent, #4f46e5);
}

.pi-lg-method--indigo { --pi-lg-accent: #4f46e5; }
.pi-lg-method--emerald { --pi-lg-accent: #059669; }
.pi-lg-method--amber { --pi-lg-accent: #d97706; }
.pi-lg-method--blue { --pi-lg-accent: #2563eb; }
.pi-lg-method--violet { --pi-lg-accent: #7c3aed; }
.pi-lg-method--slate { --pi-lg-accent: #475569; }

.pi-lg-method-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    border: none;
}

.pi-lg-method-body {
    padding: 16px 18px 18px;
}

.pi-lg-method-body p {
    margin: 0 0 12px;
}

.pi-lg-figure {
    margin: 0;
    padding: 12px 14px 0;
    text-align: center;
}

.pi-lg-figure img {
    display: block;
    width: 100%;
    max-width: 640px;
    height: auto;
    margin: 0 auto;
    border-radius: 10px;
    border: 1px solid var(--ios-separator, #e5e7eb);
}

.pi-lg-figure figcaption {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--ios-label-secondary, #6b7280);
    line-height: 1.4;
}

.pi-lg-figure--compact {
    padding: 0 0 16px;
}

.pi-lg-quote {
    margin: 12px 0;
    padding: 12px 14px;
    border-left: 4px solid var(--pi-lg-accent, #4f46e5);
    border-radius: 0 8px 8px 0;
    background: rgba(79, 70, 229, 0.06);
    font-weight: 600;
    color: #312e81;
}

.pi-lg-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.pi-lg-step {
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--ios-bg, #f8fafc);
    border: 1px solid var(--ios-separator, #e5e7eb);
    font-size: 13px;
}

.pi-lg-step strong {
    display: block;
    margin-bottom: 2px;
    color: var(--pi-lg-accent, #4f46e5);
}

.pi-lg-step span {
    color: var(--ios-label-secondary, #6b7280);
}

.pi-lg-compare {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

.pi-lg-compare-bad,
.pi-lg-compare-good {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.pi-lg-compare-bad {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.pi-lg-compare-good {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.pi-lg-tip {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    font-size: 13px;
    color: #1e40af;
}

.pi-lg-list {
    margin: 0 0 12px;
    padding-left: 1.25em;
}

.pi-lg-list li {
    margin-bottom: 6px;
}

.pi-lg-formula {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: linear-gradient(90deg, #f5f3ff, #ede9fe);
    border: 1px solid #ddd6fe;
    font-size: 14px;
    font-weight: 600;
    color: #5b21b6;
    text-align: center;
}

.pi-lg-section--highlight {
    padding: 20px 18px;
    border-radius: var(--pi-lg-radius);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border: 1px solid var(--ios-separator, #e5e7eb);
}

.pi-lg-callout {
    margin: 0 0 12px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
}

.pi-lg-callout p {
    margin: 0;
}

.pi-lg-phase-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.pi-lg-phase-card {
    padding: 14px 14px 12px;
    border-radius: 12px;
    border: 1px solid var(--ios-separator, #e5e7eb);
    background: var(--ios-bg-secondary, #fff);
}

.pi-lg-phase-num {
    display: inline-block;
    margin-bottom: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #4338ca;
    background: #e0e7ff;
}

.pi-lg-phase-card h5 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    border: none;
}

.pi-lg-phase-card p {
    margin: 0;
    font-size: 13px;
    color: var(--ios-label-secondary, #6b7280);
    line-height: 1.5;
}

.pi-lg-section--timeline {
    padding: 20px 18px;
    border-radius: var(--pi-lg-radius);
    background: var(--ios-bg-secondary, #fafafa);
    border: 1px solid var(--ios-separator, #e5e7eb);
}

.pi-lg-timeline-formula {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px dashed #c7d2fe;
    font-size: 13px;
    font-weight: 600;
    color: #4338ca;
    text-align: center;
}

.pi-lg-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pi-lg-timeline li {
    position: relative;
    margin: 0 0 14px;
    padding-left: 88px;
    font-size: 14px;
    line-height: 1.55;
}

.pi-lg-day {
    position: absolute;
    left: 0;
    top: 0;
    min-width: 72px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: #4f46e5;
    text-align: center;
}

.pi-lg-footer {
    margin: 16px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--ios-separator, #e5e7eb);
    font-size: 14px;
    color: var(--ios-label-secondary, #6b7280);
    text-align: center;
}

@media (max-width: 640px) {
    .pi-lg-hero {
        padding: 18px 16px;
    }

    .pi-lg-title {
        font-size: 1.3rem;
    }

    .pi-lg-steps,
    .pi-lg-phase-grid {
        grid-template-columns: 1fr;
    }

    .pi-lg-timeline li {
        padding-left: 0;
        padding-top: 36px;
    }

    .pi-lg-day {
        top: 0;
    }
}

/* —— 目标查看页（Mac 风格） —— */
.goal-view-page {
    background:
        radial-gradient(1200px 480px at 20% -10%, rgba(0, 122, 255, 0.08), transparent 60%),
        radial-gradient(900px 420px at 90% 0%, rgba(52, 199, 89, 0.06), transparent 55%),
        var(--ios-bg, #f5f5f7);
}

.goal-view-main {
    max-width: 780px;
    padding-top: 20px;
    padding-bottom: 48px;
}

.goal-view-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.goal-view-hero {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.04);
    padding: 22px 24px 20px;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.goal-view-hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.goal-view-hero__actions .mac-btn {
    white-space: nowrap;
}

.goal-view-hero__title {
    margin: 0 0 12px;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 650;
    letter-spacing: -0.03em;
    color: rgba(0, 0, 0, 0.9);
}

.goal-view-hero__badge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.goal-view-hero__date {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.45);
}

.goal-view-card {
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 14px;
}

.goal-view-card .mac-settings-section-label {
    padding: 12px 16px 4px;
    margin: 0;
}

.goal-view-section-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.goal-view-inline-btn {
    min-height: 28px;
    padding: 4px 10px;
    font-size: 12px;
}

.goal-view-meta-row {
    align-items: flex-start;
}

.goal-view-meta-label {
    width: 120px;
    flex-shrink: 0;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.45);
    padding-top: 2px;
}

.goal-view-meta-value {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.88);
    line-height: 1.45;
    word-break: break-word;
}

.goal-view-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.goal-view-status-pill--muted {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.55);
}

.goal-view-status-pill--info {
    background: rgba(0, 122, 255, 0.12);
    color: #007aff;
}

.goal-view-status-pill--success {
    background: rgba(52, 199, 89, 0.14);
    color: #248a3d;
}

.goal-view-section {
    padding: 12px 16px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.goal-view-section--last {
    border-bottom: none;
}

.goal-view-section__title {
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.02em;
    color: rgba(0, 0, 0, 0.45);
    margin-bottom: 6px;
}

.goal-view-section__body {
    font-size: 14px;
    line-height: 1.55;
    color: rgba(0, 0, 0, 0.88);
    white-space: pre-wrap;
    word-break: break-word;
}

.goal-view-analysis {
    margin: 4px 12px 14px;
    min-height: 0;
    border-radius: 10px;
}

.goal-view-empty {
    padding: 18px 16px 20px;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.4);
}

.goal-view-todo-list {
    list-style: none;
    margin: 0;
    padding: 0 0 6px;
}

.goal-view-todo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.goal-view-todo-title {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.88);
    word-break: break-word;
}

.goal-view-todo-meta {
    flex-shrink: 0;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.4);
}

@media (max-width: 640px) {
    .goal-view-hero__title {
        font-size: 22px;
    }

    .goal-view-meta-label {
        width: 96px;
    }
}

/* ========== AI 助学 ========== */

.ai-learning-form-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center;
}
.ai-learning-form-modal {
    background: var(--bg-primary, #fff); border-radius: 14px; padding: 28px 32px;
    min-width: 380px; max-width: 520px; width: 90vw; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 12px 48px rgba(0,0,0,.18);
}
.ai-learning-form-modal--wide { max-width: 720px; }
.ai-learning-form-modal h3 { margin: 0 0 18px; font-size: 18px; }
.ai-learning-form-modal label { display: block; margin-bottom: 14px; font-weight: 500; font-size: 14px; }
.ai-learning-form-hint { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: var(--ios-secondary-label, #6b7280); }
.ai-learning-form-modal input[type="text"],
.ai-learning-form-modal input[type="number"],
.ai-learning-form-modal textarea {
    display: block; width: 100%; margin-top: 4px; padding: 8px 10px;
    border: 1px solid var(--border, #d1d5db); border-radius: 8px; font-size: 14px;
    background: var(--bg-secondary, #f9fafb);
}
.ai-learning-form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.ai-learning-form-hint { margin: -4px 0 12px; font-size: 12px; color: var(--ios-secondary-label, #8e8e93); line-height: 1.45; }
.ai-learning-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
    white-space: nowrap;
}

/* 我的/共享学习画像列表 */
#ai-learning-profile-list.books-table-wrap,
#ai-learning-shared-list.books-table-wrap {
    overflow-x: auto;
}

.ai-learning-profile-table,
.ai-learning-shared-table {
    table-layout: fixed;
    width: 100%;
    min-width: 640px;
}

.ai-learning-profile-table .ai-lp-col-domain {
    width: 16%;
}
.ai-learning-shared-table .ai-lp-col-domain {
    width: 22%;
}

.ai-learning-profile-table .ai-lp-col-target {
    width: 18%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--ios-label, #1c1c1e);
}
.ai-learning-shared-table .ai-lp-col-target {
    width: 28%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--ios-label, #1c1c1e);
}
.ai-learning-profile-table .ai-lp-target-trunc,
.ai-learning-shared-table .ai-lp-target-trunc {
    cursor: default;
}

.ai-learning-profile-table .ai-lp-col-progress { width: 12%; }
.ai-learning-profile-table .ai-lp-col-public { width: 12%; }
.ai-learning-profile-table .ai-lp-col-stats { width: 12%; }
.ai-learning-shared-table .ai-lp-col-stats { width: 14%; }
.ai-learning-profile-table .ai-lp-col-tip { width: 8%; }
.ai-learning-shared-table .ai-lp-col-owner { width: 14%; }
.ai-learning-profile-table .ai-lp-col-actions {
    width: 22%;
    min-width: 168px;
}
.ai-learning-shared-table .ai-lp-col-actions {
    width: 14%;
    min-width: 96px;
}

/* 操作「更多」下拉 */
.ai-lp-more {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}
.ai-lp-more-trigger {
    white-space: nowrap;
}
.ai-lp-more-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 128px;
    padding: 4px 0;
    background: #fff;
    border: 1px solid var(--ios-separator, #e5e7eb);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 40;
}
.ai-lp-more.open .ai-lp-more-menu {
    display: block;
}
.ai-lp-more-menu button {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--ios-label, #1c1c1e);
    cursor: pointer;
    white-space: nowrap;
}
.ai-lp-more-menu button:hover {
    background: var(--ios-fill-secondary, #f3f4f6);
}
.ai-lp-more-menu button.danger {
    color: #b91c1c;
}

.ai-learn-stat { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--ios-secondary-label, #8e8e93); margin-right: 4px; }
.ai-learn-status { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 10px; }
.ai-learn-status.pending { color: #b58e00; background: #fff8d6; }
.ai-learn-status.rejected { color: #c0392b; background: #fdecea; }
.ai-learn-status.approved { color: #1a7f37; background: #e6f6ec; }
.ai-learn-tip-on { font-size: 12px; font-weight: 500; color: #1a7f37; }
.ai-learning-appeal-reason { margin: -4px 0 12px; padding: 8px 10px; font-size: 12px; color: #c0392b; background: #fdecea; border-radius: 6px; }
.ai-learning-tip-toggle { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 14px; }

/* 公开学习领域详情页 */
.alv-header { margin-bottom: 16px; }
.alv-header .pi-detail-title { margin: 0 0 8px; }
.alv-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--ios-secondary-label, #8e8e93); margin-bottom: 10px; }
.alv-meta-item { display: inline-flex; align-items: center; gap: 4px; }
.alv-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.alv-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--border, #e5e7eb); margin-bottom: 16px; }
.alv-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 8px 14px; cursor: pointer; font-size: 14px; color: var(--ios-secondary-label, #8e8e93); }
.alv-tab.active { color: var(--ios-blue, #007aff); border-bottom-color: var(--ios-blue, #007aff); font-weight: 600; }
.alv-tab-body { min-height: 120px; }
.alv-rich { line-height: 1.7; font-size: 14px; }
.alv-rich img { max-width: 100%; height: auto; }
.alv-loading, .alv-empty { color: var(--ios-secondary-label, #8e8e93); padding: 24px 0; text-align: center; }
.alv-pager { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.alv-plan-meta { font-size: 14px; font-weight: 500; }
.alv-q-item { border: 1px solid var(--ios-separator, rgba(60, 60, 67, 0.12)); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; background: var(--bg-primary, #fff); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px rgba(0, 0, 0, 0.05); }
.alv-q-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.alv-q-num { font-weight: 700; color: var(--ios-blue, #007aff); }
.alv-q-text { font-size: 16px; font-weight: 600; margin-bottom: 12px; line-height: 1.6; }
.alv-q-answer, .alv-q-analysis { margin-top: 12px; }
.alv-q-label { font-size: 13px; font-weight: 700; color: var(--ios-secondary-label, #8e8e93); margin-bottom: 6px; letter-spacing: 0.02em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 7px; }
.alv-q-label::before { content: ""; display: inline-block; width: 3px; height: 13px; border-radius: 2px; background: var(--ios-blue, #007aff); }
.alv-q-answer .alv-q-label::before { background: #34c759; }
.alv-q-analysis .alv-q-label::before { background: #af52de; }

/* 打赏页 */
.tip-pay-amount-label, .tip-pay-message-label { display: block; margin: 14px 0; font-size: 14px; }
.tip-pay-amount-label input, .tip-pay-message-label textarea { display: block; width: 100%; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--border, #e5e7eb); border-radius: 8px; font-size: 14px; box-sizing: border-box; }
.tip-pay-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.membership-pay-actions { margin-top: 16px; }

/* 问答详情页（问题/回答/解析 分节） */
.ai-qa-detail { display: flex; flex-direction: column; gap: 20px; }
.ai-qa-status-badge { display: inline-block; align-self: flex-start; font-size: 12px; font-weight: 600; padding: 4px 14px; border-radius: 999px; margin-bottom: 2px; letter-spacing: 0.01em; }
.ai-qa-status-badge.ai-ws-q-status--pending { color: #b58e00; background: #fff8d6; }
.ai-qa-status-badge.ai-ws-q-status--answered { color: #007aff; background: #e6f1ff; }
.ai-qa-status-badge.ai-ws-q-status--analyzed { color: #1a7f37; background: #e6f6ec; }
.ai-qa-status-badge.ai-ws-q-status--skipped { color: #8e8e93; background: #f0f0f2; }
.ai-qa-section {
    border: 1px solid var(--ios-separator, rgba(60, 60, 67, 0.12));
    border-radius: 14px;
    padding: 20px 22px;
    background: var(--bg-primary, #fff);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px rgba(0, 0, 0, 0.05);
}
.ai-qa-section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--ios-separator, rgba(60, 60, 67, 0.12)); }
.ai-qa-section__label { font-size: 17px; font-weight: 700; color: var(--ios-label, #1c1c1e); letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 9px; }
.ai-qa-section__label::before { content: ""; display: inline-block; width: 4px; height: 18px; border-radius: 2px; background: var(--ios-blue, #007aff); }
.ai-qa-section[data-section="question"] .ai-qa-section__label::before { background: #007aff; }
.ai-qa-section[data-section="answer"] .ai-qa-section__label::before { background: #34c759; }
.ai-qa-section[data-section="analysis"] .ai-qa-section__label::before { background: #af52de; }
.ai-qa-section__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-qa-section__body { line-height: 1.75; font-size: 15px; color: var(--ios-label, #1c1c1e); }
.ai-qa-section__body img { max-width: 100%; height: auto; border-radius: 8px; }
.ai-qa-section__body p:first-child { margin-top: 0; }
.ai-qa-section__body p:last-child { margin-bottom: 0; }
.ai-qa-section__empty { color: var(--ios-secondary-label, #8e8e93); margin: 0; font-style: italic; }
.ai-qa-section__editor-wrap { margin-top: 12px; }
.ai-qa-section__editor-hint { margin: 0 0 10px; font-size: 13px; color: var(--ios-secondary-label, #8e8e93); }
.ai-qa-section__editor-actions { display: flex; gap: 8px; margin-top: 12px; }

.ai-ws-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; margin-bottom: 28px; }
.ai-ws-card {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--ios-separator, rgba(60, 60, 67, 0.12));
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.ai-ws-card:hover { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 14px 32px rgba(0, 0, 0, 0.08); transform: translateY(-1px); }
.ai-ws-card-header { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--ios-separator, rgba(60, 60, 67, 0.12)); }
.ai-ws-card-header h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.ai-ws-card-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-start; }
.ai-ws-card-actions .btn-sm,
.ai-ws-qa-header .ai-ws-gen-question-btn,
.ai-ws-qa-header .ai-ws-q-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 28px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
    transition: background 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}
.ai-ws-card-actions .btn-sm,
.ai-ws-qa-header .ai-ws-q-add-btn {
    background: rgba(120, 120, 128, 0.16);
    color: #1c1c1e;
    box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.35);
}
.ai-ws-card-actions .btn-sm:hover:not(:disabled),
.ai-ws-qa-header .ai-ws-q-add-btn:hover:not(:disabled) {
    background: rgba(120, 120, 128, 0.28);
}
.ai-ws-card-actions .btn-sm.primary,
.ai-ws-qa-header .ai-ws-gen-question-btn.primary {
    background: #007aff;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0 12px;
    box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.12), inset 0 0.5px 0 rgba(255, 255, 255, 0.2);
}
.ai-ws-card-actions .btn-sm.primary:hover:not(:disabled),
.ai-ws-qa-header .ai-ws-gen-question-btn.primary:hover:not(:disabled) {
    background: #0066d6;
}
.ai-ws-card-actions .btn-sm:active:not(:disabled),
.ai-ws-qa-header .ai-ws-gen-question-btn:active:not(:disabled),
.ai-ws-qa-header .ai-ws-q-add-btn:active:not(:disabled) {
    opacity: 0.88;
}
.ai-ws-card-actions .btn-sm:disabled,
.ai-ws-qa-header .ai-ws-gen-question-btn:disabled,
.ai-ws-qa-header .ai-ws-gen-question-btn--locked {
    opacity: 0.45;
    cursor: not-allowed;
}
.ai-ws-card-body { padding: 16px 18px; font-size: 14px; line-height: 1.7; max-height: 400px; overflow-y: auto; }
.ai-ws-card-body h3 { font-size: 15px; margin: 14px 0 6px; }
.ai-ws-card-body p { margin: 6px 0; }
.ai-ws-card-body ul, .ai-ws-card-body ol { padding-left: 20px; margin: 6px 0; }
.ai-ws-plan-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    background: var(--bg-secondary, #f9fafb);
}
.ai-ws-plan-meta {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--ios-label, #1c1c1e);
}
.ai-ws-plan-pager .btn-sm:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.ai-ws-plan-date-complete {
    padding: 10px 18px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    background: var(--bg-primary, #fff);
}
.ai-ws-plan-date-complete-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.ai-ws-plan-complete-state {
    font-size: 13px;
    font-weight: 600;
    color: var(--ios-secondary-label, #8e8e93);
}
.ai-ws-plan-complete-state.is-done {
    color: #34c759;
}
.ai-learning-progress {
    font-size: 12px;
    font-weight: 600;
    color: var(--ios-secondary-label, #6b7280);
}
.ai-learning-progress--doing { color: #007aff; }
.ai-learning-progress--done { color: #34c759; }
.ai-learning-progress--zero { color: #c7c7cc; }
.ai-learning-progress-bar {
    margin-top: 4px;
    width: 120px;
    max-width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(120, 120, 128, 0.16);
    overflow: hidden;
}
.ai-learning-progress-bar > i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #007aff, #34c759);
    border-radius: 999px;
}
.ai-learning-shared-pager {
    margin: 12px 0 4px;
    padding: 0 4px;
}
.ai-learning-shared-pager .pi-pagination {
    justify-content: center;
}
.ai-learning-shared-pager .pi-pagination-info {
    font-size: 13px;
    color: var(--ios-secondary-label, #8e8e93);
}
.ai-ws-plan-date-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--ios-secondary-label, #6b7280);
    cursor: pointer;
}
.ai-ws-plan-date-input {
    padding: 6px 10px;
    border: 1px solid var(--border, #d1d5db);
    border-radius: 8px;
    font-size: 13px;
    color: var(--ios-label, #1c1c1e);
    background: var(--bg-secondary, #f9fafb);
}
.ai-ws-plan-add-date-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ios-secondary-label, #6b7280);
}
.ai-ws-empty { color: var(--text-tertiary, #9ca3af); text-align: center; padding: 24px 0; }
.ai-ws-loading { color: var(--text-secondary, #6b7280); text-align: center; padding: 24px 0; }
.ai-ws-error { color: #ef4444; text-align: center; padding: 24px 0; }

.ai-ws-qa-section { margin-top: 12px; }
.ai-ws-qa-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.ai-ws-qa-header h3 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 9px; }
.ai-ws-qa-header h3::before { content: ""; display: inline-block; width: 4px; height: 18px; border-radius: 2px; background: linear-gradient(180deg, #007aff, #af52de); }
.ai-ws-qa-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.ai-ws-q-item { background: var(--bg-primary, #fff); border: 1px solid var(--ios-separator, rgba(60, 60, 67, 0.12)); border-radius: 12px; padding: 16px 20px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); transition: box-shadow 0.2s ease, transform 0.2s ease; }
.ai-ws-q-item:hover { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 10px 24px rgba(0, 0, 0, 0.07); transform: translateY(-1px); }
.ai-ws-q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ai-ws-q-num { font-weight: 700; font-size: 14px; color: var(--ios-blue, #007aff); }
.ai-ws-q-status { font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 600; letter-spacing: 0.01em; }
.ai-ws-q-status--pending { background: #fef3c7; color: #92400e; }
.ai-ws-q-status--answered { background: #dbeafe; color: #1e40af; }
.ai-ws-q-status--analyzed { background: #d1fae5; color: #065f46; }
.ai-ws-q-status--skipped { background: #f3f4f6; color: #6b7280; }
.ai-ws-q-text { font-size: 14px; line-height: 1.65; margin-bottom: 10px; }
.ai-ws-q-text--clickable { cursor: pointer; border-radius: 8px; margin: 0 -6px 10px; padding: 6px; transition: background 0.15s ease; }
.ai-ws-q-text--clickable:hover { background: rgba(0, 122, 255, 0.06); }
.ai-ws-q-text img { max-width: 100%; height: auto; }
.ai-ws-q-text p:first-child { margin-top: 0; }
.ai-ws-q-text p:last-child { margin-bottom: 0; }
.ai-ws-q-text-modal { font-size: 14px; line-height: 1.65; margin-bottom: 14px; padding: 12px; background: var(--bg-secondary, #f9fafb); border-radius: 8px; white-space: pre-wrap; }
.ai-ws-q-actions { display: flex; gap: 8px; }

.ai-ws-result-body { max-height: 60vh; overflow-y: auto; font-size: 14px; line-height: 1.7; }
.ai-ws-result-body h3 { font-size: 15px; margin: 14px 0 6px; }
.ai-ws-result-body p { margin: 6px 0; }
.ai-ws-result-body ul, .ai-ws-result-body ol { padding-left: 20px; margin: 6px 0; }
.ai-ws-answer-view { white-space: pre-wrap; }
.ai-ws-workspace { padding: 0 4px; }

.btn-sm { padding: 4px 12px; font-size: 13px; border-radius: 6px; cursor: pointer; border: 1px solid var(--border, #d1d5db); background: var(--bg-primary, #fff); color: var(--ios-label, #1c1c1e); }
.btn-sm.primary { background: var(--accent, #3b82f6); color: #fff; border-color: var(--accent, #3b82f6); }
.btn-sm.danger { background: #ef4444; color: #fff; border-color: #ef4444; }
.btn-sm.danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }

.ai-learning-content-page .ai-learning-content-main {
    max-width: 860px;
}
.ai-learning-content-meta {
    margin-bottom: 14px;
    font-size: 14px;
    color: var(--ios-secondary-label, #6b7280);
}
.ai-learning-content-domain {
    font-weight: 600;
    color: var(--ios-label, #1c1c1e);
}
.ai-learning-content-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: var(--bg-secondary, #f9fafb);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
}
.ai-learning-content-page-meta {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
}
.ai-learning-content-pager .btn-sm:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.ai-learning-content-date-complete {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
}
.ai-learning-content-date-complete-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.ai-learning-content-complete-state {
    font-size: 13px;
    font-weight: 600;
    color: var(--ios-secondary-label, #8e8e93);
}
.ai-learning-content-complete-state.is-done {
    color: #34c759;
}
.ai-learning-content-body {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--ios-separator, rgba(60, 60, 67, 0.12));
    border-radius: 14px;
    padding: 24px 26px;
    font-size: 15px;
    line-height: 1.8;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px rgba(0, 0, 0, 0.05);
}
.ai-learning-content-body h3 { font-size: 17px; margin: 18px 0 8px; }
.ai-learning-content-body h3:first-child { margin-top: 0; }
.ai-learning-content-body p { margin: 8px 0; }
.ai-learning-content-body ul,
.ai-learning-content-body ol { padding-left: 22px; margin: 8px 0; }
.ai-learning-content-body blockquote {
    margin: 10px 0;
    padding: 8px 14px;
    border-left: 3px solid var(--accent, #3b82f6);
    background: var(--bg-secondary, #f9fafb);
    color: var(--ios-secondary-label, #4b5563);
}

.ai-learning-content-editor {
    background: var(--bg-primary, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    padding: 18px 20px;
}
.ai-learning-content-editor__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--ios-label, #1c1c1e);
    margin-bottom: 14px;
}
.ai-learning-content-editor .tox-tinymce {
    border-radius: 8px;
    border: 1px solid var(--border, #d1d5db);
}
.ai-learning-content-editor__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}
.ai-learning-content-editor__hint {
    margin-left: auto;
    font-size: 13px;
    color: var(--ios-secondary-label, #6b7280);
}
.ai-learning-content-editor__actions button.primary,
.ai-learning-content-editor__actions button:not(.primary) {
    min-width: 88px;
}

/* ===== 九宫格笔记 ===== */
.grid-note-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}
.grid-note-meta .form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 220px;
    min-width: 200px;
}
.grid-note-meta .form-row label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ios-secondary-label, #6b7280);
}
.grid-note-meta input,
.grid-note-meta select {
    padding: 8px 12px;
    border: 1px solid var(--ios-separator, #e5e7eb);
    border-radius: 10px;
    font-size: 14px;
    background: var(--ios-bg, #fff);
}

.grid-note-layout {
    display: grid;
    gap: 12px;
}
.grid-note-layout--mandala {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, minmax(120px, auto));
}
.grid-note-layout--quadrant {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, minmax(160px, auto));
}
.grid-note-layout--swot {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, minmax(160px, auto));
}
.grid-note-layout--cornell {
    grid-template-columns: 1fr 2fr;
    grid-template-areas:
        "cue note"
        "summary summary";
}
.grid-note-layout--cornell .grid-note-cell[data-position="1"] { grid-area: cue; }
.grid-note-layout--cornell .grid-note-cell[data-position="2"] { grid-area: note; }
.grid-note-layout--cornell .grid-note-cell[data-position="3"] { grid-area: summary; }

.grid-note-cell {
    background: var(--ios-bg-secondary, #fff);
    border: 1px solid var(--ios-separator, #e5e7eb);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
}
.grid-note-cell--center {
    background: #eef2ff;
    border-color: #c7d2fe;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.grid-note-center-label {
    font-size: 12px;
    color: var(--ios-secondary-label, #6b7280);
    font-weight: 600;
}
.grid-note-center-topic {
    font-size: 16px;
    font-weight: 700;
    color: var(--ios-blue, #4c6fff);
    word-break: break-word;
}
.grid-note-cell--full {
    grid-column: 1 / -1;
}
.grid-note-cell-label {
    width: 100%;
    border: none;
    border-bottom: 1px dashed var(--ios-separator, #e5e7eb);
    font-size: 13px;
    font-weight: 600;
    color: var(--ios-secondary-label, #6b7280);
    background: transparent;
    padding: 2px 0;
    outline: none;
}
.grid-note-cell-content,
.grid-note-cell-content textarea {
    width: 100%;
    flex: 1;
    border: none;
    outline: none;
    resize: none;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ios-label, #1f2937);
    background: transparent;
    font-family: inherit;
    overflow: hidden;
}
.grid-note-cell-content:empty::before {
    content: attr(data-placeholder);
    color: var(--ios-tertiary-label, #9ca3af);
}

/* 只读查看页 */
.grid-note-layout--readonly .grid-note-cell {
    background: var(--ios-bg-secondary, #fff);
}
.grid-note-cell--readonly .grid-note-cell-content {
    white-space: pre-wrap;
    word-break: break-word;
}
.grid-note-cell-empty {
    color: var(--ios-tertiary-label, #9ca3af);
    font-style: italic;
}
.grid-note-view-meta {
    margin-bottom: 16px;
}
.grid-note-view-template {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--ios-blue, #4c6fff);
    font-size: 13px;
    font-weight: 600;
}
.grid-note-view-subject {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--ios-label, #1f2937);
}
.grid-note-view-subject-label {
    color: var(--ios-secondary-label, #6b7280);
    font-weight: 600;
}
.empty-row {
    text-align: center;
    color: var(--ios-tertiary-label, #9ca3af);
    padding: 24px;
}
