/* ===== 书法测评 APP 框架 ===== */
:root {
    --bg: #eef5f3;
    --card: #ffffff;
    --text: #1a1a1a;
    --text2: #888;
    --text3: #bbb;
    --brand: #2aab93;
    --brand-dark: #229e87;
    --brand-light: #e8f6f3;
    --accent: #e8913a;
    --line: #ececec;
    --radius: 14px;
    --radius-sm: 10px;
    --tab-h: 56px;
    --safe-b: env(safe-area-inset-bottom, 0px);
    --shadow: 0 2px 12px rgba(0,0,0,.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ===== APP Shell ===== */
.app-body { overflow-x: hidden; }

.app-shell {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100dvh;
    background: var(--bg);
    position: relative;
    padding-bottom: calc(var(--tab-h) + var(--safe-b) + 28px);
}

.app-top {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 10px 16px 8px;
    background: var(--bg);
}

.app-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    border-radius: 22px;
    padding: 0 14px;
    height: 40px;
    box-shadow: var(--shadow);
}

.app-search-icon { color: var(--text3); flex-shrink: 0; }

.app-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--text);
}

.app-search input::placeholder { color: var(--text3); }

.app-top-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text);
    text-decoration: none;
    border-radius: 50%;
    background: var(--card);
    box-shadow: var(--shadow);
}

.app-top-title {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-top-title-only { text-align: left; padding: 4px 0; }

.app-top:has(.app-top-back) {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-top-placeholder { width: 36px; }

.app-main { min-height: 0; }

.app-disclaimer {
    position: fixed;
    bottom: calc(var(--tab-h) + var(--safe-b));
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    text-align: center;
    font-size: 10px;
    color: var(--text3);
    padding: 2px 16px;
    background: var(--bg);
    z-index: 40;
}

/* ===== Bottom Tabbar ===== */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: calc(var(--tab-h) + var(--safe-b));
    padding-bottom: var(--safe-b);
    background: var(--card);
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
}

.tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text3);
    font-size: 10px;
    padding-top: 6px;
}

.tabbar-item svg { width: 22px; height: 22px; }

.tabbar-item.is-active { color: var(--brand); font-weight: 500; }

.tabbar-fab {
    position: relative;
    top: -14px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(42,171,147,.45);
    flex-shrink: 0;
}

.tabbar-fab svg { width: 26px; height: 26px; }

.tabbar-fab.is-active { background: var(--brand-dark); }

/* ===== Homepage ===== */
.home-wrap { padding: 0 14px 16px; }

.home-banner {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 150px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #2c1810 0%, #4a3020 50%, #1a0f0a 100%);
}

.home-banner-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
}

.home-banner-tag {
    display: inline-block;
    font-size: 11px;
    background: var(--brand);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    width: auto;
    align-self: flex-start;
}

.home-banner-inner h2 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
}

.home-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.home-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
}

.home-dots i.is-on { background: #fff; width: 14px; border-radius: 3px; }

.home-dots-sm { position: static; transform: none; justify-content: center; margin-top: 10px; }
.home-dots-sm i { background: #ddd; }
.home-dots-sm i.is-on { background: var(--brand); }

.home-grid-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px 12px 10px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.func-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px 4px;
}

.func-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text);
    font-size: 11px;
}

.func-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    flex-shrink: 0;
    overflow: hidden;
}

.func-icon-a { background: #e8f6f3; color: #2aab93; }
.func-icon-b { background: #fff3e6; color: #e8913a; }
.func-icon-c { background: #eef3ff; color: #5b7fd6; }
.func-icon-d { background: #fce8ef; color: #d65a8a; }
.func-icon-e { background: #f0ecfa; color: #8b6fd4; }
.func-icon-f { background: #e8f4e8; color: #5aab5a; }
.func-icon-g { background: #fff8e6; color: #c9a032; }
.func-icon-h { background: #e6f7ff; color: #3a9fd6; }

/* 防止微信内置浏览器 SVG 撑爆页面 */
.app-main svg {
    max-width: 100%;
    flex-shrink: 0;
}

.tabbar-item svg,
.tabbar-fab svg {
    width: 22px;
    height: 22px;
    max-width: 22px;
    max-height: 22px;
}

.tabbar-fab svg {
    width: 26px;
    height: 26px;
    max-width: 26px;
    max-height: 26px;
}

.home-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 12px;
    text-decoration: none;
    color: var(--text);
    font-size: 13px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.home-notice svg { color: var(--brand); flex-shrink: 0; }
.home-notice marquee { flex: 1; }

.home-entry-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.home-entry {
    border-radius: var(--radius);
    padding: 14px;
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 2px;
    box-shadow: var(--shadow);
}

.home-entry small { font-size: 11px; opacity: .85; }
.home-entry strong { font-size: 15px; font-weight: 700; }
.home-entry span { font-size: 11px; opacity: .75; margin-top: 4px; }

.home-entry-a { background: linear-gradient(135deg, #2aab93, #3cc4ab); }
.home-entry-b { background: linear-gradient(135deg, #e8913a, #f0a855); }

.home-feed-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.home-feed-head i {
    width: 3px;
    height: 16px;
    background: var(--brand);
    border-radius: 2px;
}

.home-feed-head h3 { font-size: 16px; font-weight: 700; }

.feed-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.feed-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
}

.feed-cover {
    height: 90px;
    position: relative;
}

.feed-cover-0 { background: linear-gradient(135deg, #667eea, #764ba2); }
.feed-cover-1 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.feed-cover-2 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.feed-cover-3 { background: linear-gradient(135deg, #43e97b, #38f9d7); }

.feed-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 10px;
    background: rgba(0,0,0,.35);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
}

.feed-body { padding: 10px; }

.feed-body h4 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.feed-meta {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text3);
}

.feed-author::before { content: "✎ "; }

/* ===== Inner Pages ===== */
.page-wrap { padding: 4px 14px 20px; }

.page-lead {
    font-size: 13px;
    color: var(--text2);
    margin-bottom: 14px;
    line-height: 1.6;
}

.page-header { margin-bottom: 16px; }
.page-header h1 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.page-header p { font-size: 13px; color: var(--text2); }

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

/* Evaluate page */
.eval-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px 16px;
    margin-bottom: 12px;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
}

.eval-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.eval-card-icon svg { width: 26px; height: 26px; }

.eval-card-a .eval-card-icon { background: var(--brand-light); color: var(--brand); }
.eval-card-b .eval-card-icon { background: #fff3e6; color: var(--accent); }

.eval-card-text { flex: 1; }
.eval-card-text h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.eval-card-text p { font-size: 12px; color: var(--text2); line-height: 1.5; }

.eval-card-arrow { font-size: 22px; color: var(--text3); }

.eval-tips { margin-top: 8px; }
.eval-tips h4 { font-size: 14px; margin-bottom: 8px; color: var(--brand); }
.eval-tips ul { padding-left: 18px; font-size: 13px; color: var(--text2); line-height: 1.8; }

/* Profile menu list */
.profile-user {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.profile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
}

.profile-user-info h2 { font-size: 17px; font-weight: 700; }
.profile-user-info p { font-size: 12px; color: var(--text2); margin-top: 2px; }

.menu-list {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.menu-list a, .menu-list button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    border-bottom: 1px solid var(--line);
}

.menu-list a:last-child, .menu-list button:last-child { border-bottom: none; }

.menu-list a::after { content: "›"; color: var(--text3); font-size: 18px; }

.tab-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: none;
}

.tab-pills::-webkit-scrollbar { display: none; }

.tab-pills a {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    text-decoration: none;
    color: var(--text2);
    background: var(--card);
    border: 1px solid var(--line);
}

.tab-pills a.is-on {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.level-pills a {
    min-width: 40px;
    text-align: center;
    padding: 6px 10px;
}

/* ===== Shared Components ===== */
.container { max-width: 480px; margin: 0 auto; padding: 0 14px; }
.page-section { padding: 4px 0 20px; }

.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
    border: none;
}

.card h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; color: var(--text); }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--card);
    outline: none;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--brand);
}

.form-group textarea { min-height: 90px; resize: vertical; }

.btn {
    display: inline-block;
    padding: 11px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    transition: opacity .15s;
}

.btn:active { opacity: .75; }

.btn-primary { background: var(--brand); color: #fff; }
.btn-success { background: #5aab5a; color: #fff; }
.btn-danger { background: #e05555; color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--brand); color: var(--brand); }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-block { display: block; width: 100%; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.badge-pending { background: #fef3cd; color: #856404; }
.badge-pending_payment { background: #fef3cd; color: #856404; }
.badge-paid { background: #d4edff; color: #0056a0; }
.badge-reviewing { background: #d4edda; color: #155724; }
.badge-completed { background: var(--brand-light); color: var(--brand-dark); }
.badge-cancelled { background: #eee; color: #666; }

.alert {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 13px;
}

.alert-success { background: #e8f6f0; color: #1a6b4a; }
.alert-error { background: #fdeaea; color: #a02020; }
.alert-info { background: var(--brand-light); color: var(--brand-dark); }

.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th, .data-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.data-table th { color: var(--text2); font-weight: 500; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.stat-card {
    background: var(--card);
    padding: 14px;
    border-radius: var(--radius-sm);
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-card .num { font-size: 24px; font-weight: 700; color: var(--brand); }
.stat-card .label { font-size: 11px; color: var(--text2); margin-top: 2px; }

/* Question bank */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.filter-bar select {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--card);
}

.question-grid { display: flex; flex-direction: column; gap: 10px; }

.question-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.question-card .sample {
    height: 100px;
    background: #faf6ef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #8b6914;
    font-family: "KaiTi", "STKaiti", serif;
    text-decoration: none;
    overflow: hidden;
}

.question-card .sample-img { height: 140px; padding: 0; }
.question-card .sample-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

.question-card .sample-link { font-size: 18px; position: relative; }

.sample-scan {
    background: linear-gradient(145deg, #3d3428, #2a241c) !important;
    color: #e8d5a3 !important;
    font-family: "KaiTi", "STKaiti", serif !important;
    font-size: 22px !important;
    height: 110px !important;
}

.sample-scan-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 10px;
    font-family: -apple-system, "PingFang SC", sans-serif;
    background: rgba(42,171,147,.9);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
}

.question-card .info { padding: 12px 14px; }
.question-card .info h4 { font-size: 14px; margin-bottom: 4px; }
.question-card .meta { font-size: 11px; color: var(--text2); margin-bottom: 6px; }
.question-card .actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* ===== 试卷在线预览 ===== */
.preview-wrap { padding-bottom: 24px; }

.preview-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.preview-meta { display: flex; align-items: center; gap: 8px; }
.preview-time { font-size: 12px; color: var(--text2); }
.preview-actions { display: flex; gap: 6px; }

.preview-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text2);
}

.btn.is-disabled {
    opacity: .4;
    pointer-events: none;
}

.exam-paper {
    background: #fff;
    color: #111;
    border-radius: 8px;
    padding: 18px 14px 12px;
    box-shadow: var(--shadow);
    font-family: "SimSun", "Songti SC", "STSong", serif;
    line-height: 1.7;
}

.exam-header { text-align: center; margin-bottom: 8px; }
.exam-header h1 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.exam-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 14px;
}

.exam-fields {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    text-align: left;
    margin: 0 4px 8px;
}

.exam-fields .blank {
    display: inline-block;
    border-bottom: 1px solid #333;
    width: 80px;
    vertical-align: bottom;
}
.exam-fields .blank.wide { width: 140px; }

.exam-dbline {
    border-top: 2px solid #222;
    border-bottom: 1px solid #222;
    height: 4px;
    margin: 8px 0 14px;
}

.exam-section { margin-bottom: 16px; }
.exam-section h3 {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.exam-section ol {
    padding-left: 1.4em;
    font-size: 13px;
}

.exam-section ol li { margin-bottom: 8px; }

.exam-desc { font-size: 13px; margin-bottom: 10px; }

.exam-req-table {
    display: grid;
    grid-template-columns: 90px 1fr;
    border: 1px solid #333;
}

.exam-req-col { display: flex; flex-direction: column; }
.exam-req-col + .exam-req-col { border-left: 1px solid #333; }

.exam-req-th {
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    padding: 6px;
    border-bottom: 1px solid #333;
    background: #fafafa;
}

.exam-req-td {
    padding: 10px 8px;
    font-size: 13px;
    min-height: 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.exam-req-td em { font-style: normal; color: #444; }

.exam-legal {
    text-align: center;
    font-size: 11px;
    color: #444;
    margin: 18px 0 12px;
}

.exam-issuer, .exam-date {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.exam-footer {
    text-align: center;
    font-size: 11px;
    color: #666;
    margin-top: 16px;
    padding-top: 8px;
}

.exam-fig {
    text-align: center;
    font-size: 12px;
    margin: 8px 0 16px;
}

.char-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

.char-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #fff;
}

.char-cell.has-grid {
    border: 1px solid #333;
}

.char-guide {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, transparent 49.5%, #ccc 49.5%, #ccc 50.5%, transparent 50.5%),
        linear-gradient(to bottom, transparent 49.5%, #ccc 49.5%, #ccc 50.5%, transparent 50.5%);
    pointer-events: none;
}

.char-text {
    position: relative;
    z-index: 1;
    font-size: clamp(16px, 5.2vw, 28px);
    line-height: 1;
}

.char-text.kai {
    font-family: "KaiTi", "STKaiti", "楷体", serif;
    font-weight: 500;
}

.char-text.hei {
    font-family: "SimHei", "Microsoft YaHei", "黑体", sans-serif;
    font-weight: 700;
}

.char-grid-write .char-cell { border: none; }

.scan-viewer {
    background: #222;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 8px;
}

.scan-viewer.pdf-viewer { background: #2a2a2a; }

.scan-stage {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    /* 预留顶部栏 + 翻页条 + 缩放条 + 底部 Tab，避免内容被挡住 */
    max-height: calc(100dvh - 210px);
    min-height: 280px;
    touch-action: pan-x pan-y;
    background: #3a3a3a;
    padding: 10px;
}

.scan-canvas-wrap {
    position: relative;
    width: 100%;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.35);
    overflow: hidden;
}

.pdf-canvas {
    display: block;
    width: 100% !important;
    height: auto !important;
    background: #fff;
    vertical-align: top;
}

/* 遮住卷面底部版权/公众号残留（实心，避免贴纸露边） */
.scan-footer-mask {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 14%;
    background: #fff;
    pointer-events: none;
    z-index: 2;
}

/* 轻量裁切底部公众号细条 */
.scan-crop {
    --crop: 5%;
    overflow: hidden;
    width: 100%;
    line-height: 0;
}

.scan-crop .scan-img {
    display: block;
    width: 100%;
    height: auto;
    clip-path: inset(0 0 var(--crop) 0);
    margin-bottom: calc(-1 * var(--crop));
}

.scan-img {
    display: block;
    width: 100%;
    height: auto;
}

.scan-zoom-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: #111;
}

.scan-zoom-bar .btn { color: #fff; border-color: #555; }

.pdf-viewer .preview-pager {
    margin: 0;
    padding: 10px 12px;
    background: #1a1a1a;
    color: #ddd;
}

.preview-wrap {
    padding-bottom: calc(var(--tab-h) + var(--safe-b) + 16px);
}

body:has(.preview-wrap) .app-shell {
    padding-bottom: calc(var(--tab-h) + var(--safe-b) + 8px);
}

.preview-bottom-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-bottom: 8px;
}

/* 试卷 1:1 复刻 */
.exam-replica-wrap { margin-bottom: 8px; }
.exam-replica-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 14px;
}
.exam-replica-page {
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    margin-bottom: 12px;
}
.exam-replica-page .exam-section h3 {
    text-align: left;
    font-size: 15px;
}
.exam-replica-page .exam-desc {
    text-indent: 0;
}
.char-grid-linmo { gap: 3px; margin: 8px 0; }
.char-grid-linmo .char-cell.has-grid { border: 1px solid #333; }
.char-scan {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.exam-linmo-block,
.exam-write-block,
.exam-scan-block {
    margin: 8px 0;
    min-height: 80px;
    text-align: center;
}
.exam-linmo-block-img,
.exam-write-block-img,
.exam-scan-block-img {
    width: 100%;
    height: auto;
    display: block;
    border: none;
}
.exam-scan-block-img + .exam-scan-block-img {
    margin-top: 6px;
}
.exam-dynamic-pages { display: contents; }
.exam-replica-loading { min-height: 120px; }
.exam-section-scan { margin-top: 0; }
.exam-section-scan .exam-scan-block { margin: 0; }
.exam-replica-page .char-grid { display: none; }
.char-load { color: #ccc; font-size: 12px; }
.char-grid-write { gap: 6px 4px; margin-top: 8px; }
.char-grid-write .char-text.hei { font-size: clamp(15px, 4.5vw, 22px); }

/* 题目预览：文字说明 + 临摹扫描图 */
.paper-readable { margin-bottom: 4px; }
.paper-readable-head {
    text-align: center;
    padding: 0 4px 16px;
}
.paper-readable-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--brand-dark);
    background: var(--brand-light);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.paper-readable-head h1 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}
.paper-readable-meta {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--text2);
}
.paper-readable-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px 16px 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
    border: 1px solid var(--line);
}
.paper-readable-session {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid #222;
}
.paper-readable-section h2 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
}
.paper-readable-desc {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    margin: 0 0 14px;
}
.paper-linmo-frame {
    background: #fafafa;
    border-radius: 10px;
    overflow: hidden;
    min-height: 100px;
    border: 1px solid #e8e8e8;
}
.paper-linmo-loading {
    text-align: center;
    padding: 40px 16px;
    font-size: 14px;
    color: var(--text3);
}
.paper-linmo-img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: top;
}
.paper-readable-fig {
    text-align: center;
    font-size: 13px;
    color: var(--text3);
    margin: 10px 0 0;
}
.paper-readable-tip {
    text-align: center;
    font-size: 12px;
    color: var(--text3);
    margin: 14px 8px 0;
    line-height: 1.5;
}

.preview-mode-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.preview-mode-tabs-modern .preview-mode-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 8px;
}
.preview-mode-tab .tab-label {
    font-size: 15px;
    font-weight: 700;
}
.preview-mode-tab .tab-hint {
    font-size: 11px;
    font-weight: 400;
    opacity: .75;
}
.preview-mode-tab {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text2);
    text-decoration: none;
    background: #fff;
}
.preview-mode-tab.is-on {
    background: var(--brand);
    color: #fff;
}
.preview-mode-tab.is-on .tab-hint { opacity: .9; }

/* 清晰版试卷文档 */
.preview-page {
    background: linear-gradient(180deg, #eef5f2 0%, var(--bg) 120px);
}
.exam-doc {
    margin-bottom: 8px;
}
.exam-doc-top {
    text-align: center;
    padding: 4px 8px 14px;
}
.exam-doc-tag {
    display: inline-block;
    font-size: 11px;
    color: var(--brand-dark);
    background: var(--brand-light);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}
.exam-doc-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
    margin: 0;
}
.exam-doc-meta {
    font-size: 12px;
    color: var(--text2);
    margin-top: 6px;
}
.exam-paper-doc {
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.06);
    border: 1px solid #e8e0d0;
}
.exam-paper-inner {
    padding: 20px 16px 16px;
    background: #fff;
}
.exam-doc-session {
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .5px;
    margin-bottom: 6px;
}
.exam-linmo-section h3 {
    font-size: 15px;
    text-align: left;
    margin-bottom: 6px;
}
.exam-linmo-section .exam-desc {
    font-size: 13px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 14px;
}
.linmo-grid-wrap {
    background: #faf8f4;
    border: 1px solid #e6dfd3;
    border-radius: 10px;
    padding: 12px 10px 10px;
}
.char-grid-linmo {
    gap: 6px;
}
.char-grid-linmo .char-cell {
    border: 1px solid #555;
    background: #fff;
    overflow: hidden;
    border-radius: 2px;
}
.char-grid-linmo .char-guide {
    background:
        linear-gradient(to right, transparent 49.5%, rgba(180,160,120,.35) 49.5%, rgba(180,160,120,.35) 50.5%, transparent 50.5%),
        linear-gradient(to bottom, transparent 49.5%, rgba(180,160,120,.35) 49.5%, rgba(180,160,120,.35) 50.5%, transparent 50.5%),
        linear-gradient(135deg, transparent 49.5%, rgba(180,160,120,.2) 49.5%, rgba(180,160,120,.2) 50.5%, transparent 50.5%),
        linear-gradient(45deg, transparent 49.5%, rgba(180,160,120,.2) 49.5%, rgba(180,160,120,.2) 50.5%, transparent 50.5%);
}
.char-scan {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #fff;
}
.char-skeleton {
    display: block;
    width: 60%;
    height: 60%;
    margin: 20% auto;
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
    background-size: 200% 100%;
    animation: char-shimmer 1.2s infinite;
    border-radius: 4px;
}
@keyframes char-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.exam-doc-note {
    font-size: 12px;
    color: var(--text3);
    text-align: center;
    margin: 12px 8px 0;
    line-height: 1.5;
}

/* 6–9 级整段临摹块 */
.linmo-block-wrap {
    background: #faf8f4;
    border: 1px solid #e6dfd3;
    border-radius: 10px;
    padding: 12px 10px;
    min-height: 120px;
}
.linmo-block-loading {
    text-align: center;
    padding: 24px 12px;
    color: var(--text3);
    font-size: 13px;
}
.linmo-block-skeleton {
    width: 80%;
    height: 80px;
    margin: 0 auto 12px;
    display: block;
}
.linmo-block-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.linmo-block-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* 原卷扫描：完整高度可滚动，不再只露半张 */
.scan-viewer-full { margin-bottom: 0; }
.scan-stage-full {
    max-height: none;
    min-height: 320px;
    background: #2a2a2a;
}
.scan-stage-full .scan-canvas-wrap {
    max-width: 100%;
}

.linmo-banner {
    background: #f7f2e8;
    border: 1px solid #e6d7b8;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.linmo-banner strong {
    font-size: 14px;
    color: #6b5420;
}
.linmo-banner span {
    font-size: 12px;
    color: #8a7340;
    line-height: 1.45;
}
.scan-stage.is-linmo {
    background: #ebe4d6;
    max-height: calc(100dvh - 250px);
}
.scan-viewer.is-linmo {
    background: #ebe4d6;
    padding: 8px;
    border-radius: 12px;
}
.linmo-clip-frame {
    overflow: hidden;
    background: #f7f2e8;
    border-radius: 8px;
    line-height: 0;
}
.linmo-clip-img {
    width: 100%;
    height: auto;
    display: block;
}

@media (min-width: 600px) {
    body:has(.preview-wrap) .app-shell {
        max-width: 720px;
    }
    body:has(.preview-wrap) .tabbar,
    body:has(.preview-wrap) .app-disclaimer {
        max-width: 720px;
    }
    .exam-paper { padding: 28px 32px 18px; }
    .exam-header h1 { font-size: 22px; }
    .exam-header h2 { font-size: 24px; }
    .exam-fields .blank { width: 120px; }
    .exam-fields .blank.wide { width: 200px; }
    .char-text { font-size: 30px; }
    .exam-req-table { grid-template-columns: 120px 1fr; }
}

@media (max-width: 380px) {
    .char-grid { grid-template-columns: repeat(5, 1fr); }
    .exam-fields { flex-direction: column; gap: 8px; }
    .exam-req-table { grid-template-columns: 1fr; }
    .exam-req-col + .exam-req-col { border-left: none; border-top: 1px solid #333; }
}

/* News */
.news-list { list-style: none; }

.news-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.news-list li a {
    flex: 1;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
}

.news-date { font-size: 11px; color: var(--text3); margin-left: 10px; white-space: nowrap; }

/* Report */
.score-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 12px 0;
}

.score-item {
    text-align: center;
    padding: 12px 6px;
    background: var(--card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

.score-item .score { font-size: 22px; font-weight: 700; color: var(--brand); }
.score-item .label { font-size: 10px; color: var(--text2); }

.result-highlight {
    background: linear-gradient(135deg, var(--brand), #3cc4ab);
    color: #fff;
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 12px;
}

.result-highlight .level { font-size: 40px; font-weight: 700; }

.report-section { margin-bottom: 12px; }
.report-section h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--brand-light);
}

/* Pricing */
.pricing-grid { display: flex; flex-direction: column; gap: 10px; }

.price-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
}

.price-card.featured { border-color: var(--brand); }
.price-card h3 { font-size: 15px; margin-bottom: 4px; }
.price-card .price { font-size: 26px; font-weight: 700; color: var(--accent); margin: 8px 0; }
.price-card .price small { font-size: 13px; }
.price-card ul { list-style: none; margin: 10px 0; }
.price-card ul li { font-size: 13px; padding: 3px 0; color: var(--text2); }
.price-card ul li::before { content: "· "; color: var(--brand); }

/* ===== 摸底测评表单 ===== */
.assess-tip { font-size: 12px; line-height: 1.6; }

.form-section { margin-bottom: 18px; }
.form-section h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }

.req { color: #e05555; }
.req-hint { font-size: 12px; color: var(--text3); font-weight: 400; }
.field-hint { font-size: 12px; color: var(--text2); margin-bottom: 10px; line-height: 1.5; }

.radio-grid, .check-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.radio-chip, .check-chip {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.radio-chip input, .check-chip input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-chip span, .check-chip span {
    display: block;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    font-size: 13px;
    background: var(--card);
    transition: all .15s;
}

.radio-chip input:checked + span,
.check-chip input:checked + span {
    background: var(--brand-light);
    border-color: var(--brand);
    color: var(--brand-dark);
    font-weight: 500;
}

.radio-chip-wide span { padding: 8px 18px; }

.check-chip-alone span { border-style: dashed; }

.radio-list { display: flex; flex-direction: column; gap: 8px; }

.radio-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
}

.radio-row input { margin-top: 3px; flex-shrink: 0; }

.assess-assigned-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.assess-question { margin-top: 12px; }

.assess-review-note { margin: 12px 0; }

.upload-preview {
    display: none;
    max-width: 100%;
    margin-top: 12px;
    border-radius: var(--radius-sm);
}

#assess-submit-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.plain-body { background: #f5f5f5; }

.plain-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px 16px;
}

.plain-header-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.plain-back { color: var(--brand); text-decoration: none; font-size: 14px; font-weight: 400; }

.plain-main { max-width: 960px; margin: 0 auto; padding: 16px; }

.plain-footer {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: var(--text3);
}

/* Admin */
.admin-layout { display: flex; min-height: calc(100vh - 56px); background: #f3f5f7; }
.admin-sidebar {
    width: 210px;
    background: #1f2a37;
    padding: 12px 0 24px;
    flex-shrink: 0;
}
.admin-brand {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 18px 14px;
    letter-spacing: .02em;
}
.admin-nav-group {
    margin: 12px 18px 4px;
    font-size: 11px;
    color: rgba(255,255,255,.4);
    text-transform: none;
}
.admin-sidebar a {
    display: block;
    padding: 10px 18px;
    color: rgba(255,255,255,.78);
    text-decoration: none;
    font-size: 13px;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
    background: rgba(255,255,255,.08);
    color: #fff;
}
.admin-sidebar a.active { border-left: 3px solid #5fbfa8; padding-left: 15px; }
.admin-main { flex: 1; padding: 20px; min-width: 0; }
.admin-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.admin-head h2 { font-size: 20px; color: #1f2a37; margin: 0; }
.admin-sub { margin: 4px 0 0; font-size: 13px; color: var(--text2); }
.admin-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    align-items: center;
}
.admin-toolbar input[type="search"],
.admin-toolbar input[type="text"],
.admin-toolbar input[type="password"],
.admin-toolbar input[type="number"],
.admin-toolbar select {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
}
.admin-toolbar input[type="search"] { min-width: 180px; flex: 1; }
.admin-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.admin-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.admin-card-head a { font-size: 13px; color: var(--brand); }
.data-table.compact th, .data-table.compact td { padding: 8px 6px; font-size: 12px; }
.empty-cell { text-align: center; color: var(--text3); padding: 20px !important; }
.muted { color: var(--text3); }
.table-scroll { overflow-x: auto; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.table-scroll .data-table { margin: 0; }
.admin-pager { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.admin-pager .is-on { background: var(--brand); color: #fff; border-color: var(--brand); }
.admin-edit-row td { background: #f8fafb; }
.admin-edit-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    padding: 4px 0;
}
.mini-card { padding: 12px; margin: 0; }
.mini-card h4 { font-size: 13px; margin-bottom: 8px; }
.form-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.form-row input, .form-row select { min-height: 32px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; }
.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.admin-collapse { margin-bottom: 14px; }
.admin-collapse summary { cursor: pointer; font-weight: 600; }
.admin-detail { margin-bottom: 14px; }
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}
.detail-grid span { display: block; font-size: 12px; color: var(--text3); }
.detail-grid b { font-size: 14px; font-weight: 600; }
.admin-work-img { max-width: min(420px, 100%); border-radius: 8px; border: 1px solid var(--line); }
.stat-card.warn .num { color: #c45c26; }
.ok-text { color: #1a7f4b; }
.err-text { color: #b42318; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}
.stat-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 12px;
}
.stat-card .num { font-size: 22px; font-weight: 700; color: #1f2a37; }
.stat-card .label { font-size: 12px; color: var(--text2); margin-top: 4px; }

@media (max-width: 900px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; display: flex; flex-wrap: wrap; padding: 8px; gap: 2px; }
    .admin-brand, .admin-nav-group { width: 100%; }
    .admin-sidebar a { padding: 8px 10px; border-radius: 8px; }
    .admin-sidebar a.active { border-left: 0; padding-left: 10px; background: rgba(255,255,255,.12); }
    .admin-grid-2 { grid-template-columns: 1fr; }
    .admin-form-grid { grid-template-columns: 1fr; }
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    padding-left: 10px;
    border-left: 3px solid var(--brand);
}

/* Desktop: center phone frame wider */
@media (min-width: 481px) {
    .app-shell {
        box-shadow: 0 0 40px rgba(0,0,0,.08);
        border-left: 1px solid var(--line);
        border-right: 1px solid var(--line);
    }
    .tabbar, .app-disclaimer { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

@media (max-width: 360px) {
    .func-grid { grid-template-columns: repeat(4, 1fr); }
    .feed-list { grid-template-columns: 1fr; }
}

@media (min-width: 768px) {
    .admin-layout { flex-direction: row; }
    .question-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
    .feed-list { grid-template-columns: repeat(3, 1fr); }
    .pricing-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
}

.home-banner.has-image { background-size: cover; background-position: center; }
.home-banner.has-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.15));
}
.func-icon-img { background: transparent !important; padding: 0; overflow: hidden; }
.func-icon-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.tabbar-icon-img { width: 22px; height: 22px; object-fit: contain; display: block; }
.tabbar-fab .tabbar-icon-img { width: 26px; height: 26px; }
.feed-cover.has-image { background-size: cover; background-position: center; }
.question-comments { margin-top: 16px; }
.question-comments h3 { font-size: 16px; margin-bottom: 12px; }
.comment-form textarea {
    width: 100%; border: 1px solid var(--line); border-radius: 10px;
    padding: 10px; font-size: 14px; resize: vertical; margin-bottom: 8px;
}
.comment-list { list-style: none; padding: 0; margin: 12px 0 0; }
.comment-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment-item:last-child { border-bottom: none; }
.comment-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text2); margin-bottom: 4px; }
.comment-item p { font-size: 14px; line-height: 1.6; margin: 0; }
.comment-empty, .comment-login-hint { font-size: 13px; color: var(--text2); }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.admin-icon-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.admin-icon-item label { display: block; font-size: 13px; margin-bottom: 4px; }
.admin-icon-item input[type=file] { font-size: 12px; width: 100%; }
.admin-thumb-sm { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; display: block; margin: 4px 0; }
@media (min-width: 768px) { .admin-icon-grid { grid-template-columns: repeat(4, 1fr); } }
.admin-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; }
.admin-filter input[type=text] { flex: 1; min-width: 140px; }
.admin-actions { white-space: nowrap; }
.admin-actions form { margin-right: 4px; }
