
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
            background: #f5f6fa;
            min-height: 100vh;
            font-size: 15px;
            color: #333;
        }
        html.app-android-client,
        html.app-android-client body {
            overflow-x: hidden;
            max-width: 100%;
        }

        .header {
            background: #fff;
            min-height: 48px;
            height: auto;
            padding-top: max(var(--app-shell-statusbar-top, 0px), env(safe-area-inset-top, 0px));
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            border-bottom: 1px solid #e8e8e8;
            box-sizing: border-box;
        }
        html.app-ios-client .header {
            padding-top: max(var(--app-shell-statusbar-top, 59px), env(safe-area-inset-top, 0px));
        }

        .back-btn {
            position: absolute;
            left: 14px;
            top: auto;
            bottom: 0;
            height: 48px;
            color: #1677ff;
            font-size: 15px;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 3px;
            -webkit-tap-highlight-color: transparent;
            outline: none;
        }

        .back-icon {
            width: 18px;
            height: 18px;
            display: block;
            object-fit: contain;
        }

        .header-title {
            font-size: 17px;
            font-weight: 500;
            color: #333;
            letter-spacing: 0.5px;
            height: 48px;
            display: flex;
            align-items: center;
        }

        .page-content {
            padding: 0 0 40px;
            padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
        }

        .tips-box {
            background: #e8f1ff;
            border-radius: 0;
            padding: 12px 8px;
        }

        .tips-title {
            font-size: 15px;
            color: #333;
            font-weight: 600;
            margin-bottom: 2px;
        }

        .tips-item {
            font-size: 15px;
            color: #333;
            line-height: 1.55;
            font-weight: 600;
        }

        .tips-item a {
            color: #1677ff;
            text-decoration: none;
        }

        .info-card {
            background: #fff;
            border-radius: 0;
            overflow: hidden;
            margin-top: 8px;
        }

        .info-row {
            display: flex;
            align-items: center;
            min-height: 60px;
            padding: 0 18px;
            border-bottom: 1px solid #f2f2f2;
            position: relative;
        }

        .info-row:last-child {
            border-bottom: none;
        }

        .info-label {
            font-size: 19px;
            color: #333;
            width: 148px;
            flex-shrink: 0;
        }

        .info-value {
            font-size: 20px;
            color: #333;
            flex: 1;
            text-align: left;
        }

        .info-value.placeholder {
            color: #bbb;
        }

        .info-arrow {
            color: #c8c8c8;
            font-size: 24px;
            margin-left: auto;
            flex-shrink: 0;
        }

        .info-label-with-icon {
            display: flex;
            align-items: center;
            gap: 4px;
            width: 110px;
            flex-shrink: 0;
        }

        .help-icon {
            width: 18px;
            height: 18px;
            border: 1.5px solid #8fb9d9;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            color: #8fb9d9;
            font-weight: bold;
            flex-shrink: 0;
            line-height: 1;
        }

        .slider-section {
            margin-top: 8px;
            background: #fff;
        }

        .slider-box {
            background: #fff;
            border-radius: 0;
            padding: 20px 22px;
        }

        .slider-lane {
            position: relative;
            height: 58px;
            background: #f0f0f0;
            border-radius: 3px;
            overflow: hidden;
        }

        .slider-hint {
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            line-height: 58px;
            text-align: center;
            font-size: 17px;
            color: #c0c0c0;
            pointer-events: none;
            user-select: none;
        }

        .slider-arrows {
            position: absolute;
            left: 0;
            top: 0;
            will-change: left;
            width: 60px;
            height: 58px;
            background: #fff;
            border-radius: 3px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.12);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            z-index: 2;
            cursor: grab;
            touch-action: none;
            -webkit-tap-highlight-color: transparent;
        }

        .slider-arrows:active {
            cursor: grabbing;
        }

        .slider-arrows svg {
            width: 30px;
            height: 30px;
            fill: #999;
        }

        .slider-arrows.verified {
            background: #e8f5e9;
        }

        .slider-arrows.verified svg {
            fill: #52c41a;
        }

        .btn-section {
            margin: 28px 12px 0;
        }

        .btn-primary {
            width: 100%;
            height: 58px;
            background: #1677ff;
            color: #fff;
            border: none;
            border-radius: 4px;
            font-size: 20px;
            font-weight: 400;
            letter-spacing: 1px;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        .btn-primary:disabled {
            background: #a3c7ff;
            cursor: not-allowed;
        }

        .btn-link {
            display: block;
            text-align: center;
            margin-top: 22px;
            font-size: 18px;
            color: #1677ff;
            text-decoration: none;
            -webkit-tap-highlight-color: transparent;
        }

        .info-row-month-picker {
            position: relative;
            -webkit-tap-highlight-color: transparent;
            cursor: pointer;
        }

        .month-picker-hit {
            flex: 1;
            min-width: 0;
            display: flex;
            align-items: center;
            pointer-events: none;
            -webkit-tap-highlight-color: transparent;
        }

        .mp-title-wrap {
            width: 148px;
            flex-shrink: 0;
        }

        .mp-title {
            font-size: 19px;
            color: #333;
        }

        button.help-icon.mp-help-btn {
            position: absolute;
            left: 116px;
            top: 50%;
            transform: translateY(-50%);
            z-index: 5;
            padding: 0;
            margin: 0;
            background: transparent;
            font: inherit;
            line-height: 1;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        /* 透明 input 铺满整行；opacity 不可为 0，部分 Android WebView 不响应点击 */
        .month-picker-native {
            position: absolute;
            left: 0;
            top: 0;
            right: 0;
            bottom: 0;
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            border: 0;
            opacity: 0.01;
            z-index: 6;
            cursor: pointer;
            touch-action: manipulation;
            -webkit-appearance: none;
            appearance: none;
            background: transparent;
            color: transparent;
            font-size: 16px;
        }

        /* 安卓原生 type=month 年份列表固定从 1900 起，改走自定义面板后禁用原生点击 */
        html.mp-use-custom .month-picker-native {
            pointer-events: none;
        }
        html.mp-use-custom .month-picker-hit {
            pointer-events: auto;
        }

        .mp-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 10000;
            background: rgba(0, 0, 0, 0.45);
            align-items: flex-end;
            justify-content: center;
        }

        .mp-overlay.is-open {
            display: flex;
        }

        .mp-sheet {
            width: 100%;
            max-width: 480px;
            background: #fff;
            border-radius: 12px 12px 0 0;
            padding-bottom: env(safe-area-inset-bottom, 0px);
        }

        .mp-sheet-hd {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            border-bottom: 1px solid #eee;
            font-size: 16px;
        }

        .mp-sheet-hd button {
            border: none;
            background: transparent;
            font-size: 16px;
            padding: 4px 8px;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        .mp-sheet-hd .mp-cancel {
            color: #666;
        }

        .mp-sheet-hd .mp-ok {
            color: #1677ff;
            font-weight: 500;
        }

        .mp-sheet-hd .mp-title-center {
            color: #333;
            font-weight: 500;
        }

        .mp-sheet-bd {
            display: flex;
            gap: 12px;
            padding: 16px;
        }

        .mp-sheet-bd select {
            flex: 1;
            height: 44px;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 17px;
            padding: 0 10px;
            background: #fff;
            color: #333;
        }

        .record-page {
            min-height: 100vh;
            background: #f5f6fa;
        }

        .record-tips {
            background: #e8f1ff;
            padding: 10px 16px;
            color: #555;
            font-size: 13px;
            line-height: 1.65;
        }

        .application-list {
            background: #fff;
        }

        .application-card {
            padding: 16px 16px 10px;
            border-bottom: 8px solid #f5f6fa;
            -webkit-user-select: none;
            user-select: none;
            -webkit-touch-callout: none;
        }

        .application-card.is-longpress {
            background: #f0f6ff;
        }

        .application-line {
            display: flex;
            align-items: center;
            gap: 8px;
            line-height: 1.9;
            font-size: 15px;
            color: #333;
        }

        .application-label {
            color: #333;
            flex-shrink: 0;
        }

        .application-value {
            color: #999;
            min-width: 0;
        }

        .application-time {
            font-size: 17px;
            color: #333;
        }

        .application-status {
            margin-left: auto;
            color: #52c41a;
            font-size: 14px;
            white-space: nowrap;
        }

        .application-actions {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 28px;
            padding-top: 10px;
            font-size: 15px;
        }

        .application-action {
            border: none;
            background: transparent;
            color: #428bf7;
            font-size: 15px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 0;
            font-family: inherit;
            line-height: 1;
            -webkit-tap-highlight-color: transparent;
        }

        .application-action:active {
            opacity: 0.75;
        }

        .application-action-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            flex-shrink: 0;
        }

        .application-action-icon svg {
            display: block;
            width: 18px;
            height: 18px;
        }

        .application-action-text {
            font-size: 15px;
            color: inherit;
        }

        .header .application-action {
            position: absolute;
            right: 14px;
            top: auto;
            bottom: 0;
            height: 48px;
            transform: none;
            display: flex;
            align-items: center;
        }

        .header--detail .back-btn {
            display: none;
        }

        button.back-btn,
        button.header-close-btn,
        button.preview-close-btn,
        button.preview-album-btn {
            -webkit-appearance: none;
            appearance: none;
        }

        button.back-btn {
            border: none;
            background: transparent;
            padding: 0;
        }

        .header-close-btn {
            position: absolute;
            right: 14px;
            top: auto;
            bottom: 0;
            height: 48px;
            transform: none;
            display: flex;
            align-items: center;
            border: none;
            background: transparent;
            color: #428bf7;
            font-size: 15px;
            text-decoration: none;
            cursor: pointer;
            padding: 0;
            font-family: inherit;
            line-height: 1;
            -webkit-tap-highlight-color: transparent;
        }

        .header-close-btn:active {
            opacity: 0.75;
        }

        .header-qr-replace {
            position: absolute;
            right: 14px;
            top: auto;
            bottom: 0;
            height: 48px;
            display: flex;
            align-items: center;
            color: #1677ff;
            font-size: 14px;
            text-decoration: none;
            -webkit-tap-highlight-color: transparent;
        }

        .header-qr-replace:active {
            opacity: 0.75;
        }

        .empty-records {
            padding: 48px 16px;
            text-align: center;
            color: #999;
            font-size: 14px;
        }

        .preview-page {
            min-height: 100vh;
            background: #f5f6fa;
            display: flex;
            flex-direction: column;
        }

        .preview-body {
            flex: 1;
            min-height: 0;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            -webkit-overflow-scrolling: touch;
        }

        .preview-wrap {
            padding: 16px 4px 8px;
        }

        .preview-wrap--swipe {
            flex: 1;
            min-height: 0;
            padding: 12px 0 4px;
            overflow: hidden;
        }

        .preview-track {
            display: flex;
            height: 100%;
            overflow-x: auto;
            overflow-y: hidden;
            scroll-snap-type: x mandatory;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior-x: contain;
            scrollbar-width: none;
            -ms-overflow-style: none;
            touch-action: pan-x pan-y;
        }

        .preview-track::-webkit-scrollbar {
            display: none;
        }

        .preview-slide {
            flex: 0 0 100%;
            width: 100%;
            height: 100%;
            box-sizing: border-box;
            padding: 0 4px;
            overflow-x: hidden;
            overflow-y: auto;
            scroll-snap-align: start;
            scroll-snap-stop: always;
            -webkit-overflow-scrolling: touch;
        }

        .preview-img {
            display: block;
            width: 100%;
            background: #fff;
            box-shadow: 0 2px 12px rgba(0,0,0,0.08);
            vertical-align: top;
            /* 勿用 crisp-edges：2x 完税图缩到手机宽时最近邻会把右上角二维码撕成横条 */
            image-rendering: auto;
            pointer-events: none;
            -webkit-user-drag: none;
            user-select: none;
        }

        .preview-pager {
            flex-shrink: 0;
            text-align: center;
            font-size: 14px;
            color: #999;
            line-height: 1;
            padding: 8px 0 12px;
        }

        .preview-pager-current {
            color: #1677ff;
            font-size: 18px;
            font-weight: 600;
        }

        .preview-pager-total {
            color: #999;
            font-size: 14px;
            font-weight: 400;
        }

        .preview-footer {
            flex-shrink: 0;
            padding: 12px 16px;
            padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
            background: #fff;
            border-top: 1px solid #e8e8e8;
        }

        .preview-footer--split {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .preview-footer--split .preview-album-btn {
            flex: 1;
            width: auto;
        }

        .preview-close-btn {
            flex: 0 0 auto;
            min-width: 88px;
            box-sizing: border-box;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #d0d5dd;
            border-radius: 8px;
            background: #fff;
            color: #333;
            font-size: 16px;
            font-family: inherit;
            font-weight: 500;
            padding: 14px 16px;
            text-decoration: none;
            -webkit-tap-highlight-color: transparent;
        }

        .preview-close-btn:active {
            background: #f5f6fa;
        }

        .preview-album-btn {
            display: block;
            width: 100%;
            box-sizing: border-box;
            border: none;
            border-radius: 8px;
            background: #1677ff;
            color: #fff;
            font-size: 16px;
            font-family: inherit;
            font-weight: 500;
            padding: 14px 16px;
            text-align: center;
            text-decoration: none;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        .preview-album-btn:active {
            opacity: 0.88;
        }

        .preview-album-btn:disabled {
            opacity: 0.55;
            cursor: default;
        }

        .save-result-page {
            min-height: 100vh;
            background: #f5f6fa;
            padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
        }

        .save-result-actions {
            padding: 8px 16px 0;
        }

        .save-result-tip {
            font-size: 13px;
            color: #666;
            line-height: 1.5;
            margin-bottom: 12px;
        }

        .save-result-btn {
            display: block;
            width: 100%;
            border: none;
            border-radius: 10px;
            background: #1677ff;
            color: #fff;
            font-size: 16px;
            font-family: inherit;
            padding: 14px 16px;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        .save-result-btn + .save-result-btn {
            margin-top: 10px;
        }

        .save-result-btn--ghost {
            background: #fff;
            color: #1677ff;
            border: 1px solid #1677ff;
        }

        .save-result-btn:active {
            opacity: 0.88;
        }

        .verify-page {
            min-height: 100vh;
            background: #f5f6fa;
        }

        .verify-body {
            padding: 16px;
        }

        .verify-card {
            background: #fff;
            border-radius: 12px;
            padding: 20px 18px;
            line-height: 1.65;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
        }

        .verify-title-ok {
            color: #389e0d;
            font-weight: 600;
            margin-bottom: 12px;
            font-size: 17px;
        }

        .verify-title-bad {
            color: #cf1322;
            font-weight: 600;
            margin-bottom: 12px;
            font-size: 17px;
        }

        .verify-desc {
            color: #555;
            margin-bottom: 16px;
            font-size: 15px;
        }

        .verify-hint {
            color: #999;
            margin-top: 14px;
            font-size: 14px;
            line-height: 1.55;
        }

        .verify-row {
            margin: 10px 0;
            font-size: 15px;
            color: #333;
        }

        .verify-label {
            color: #888;
            display: inline-block;
            min-width: 112px;
            vertical-align: top;
        }

        .verify-footnote {
            color: #999;
            font-size: 13px;
            margin-top: 18px;
            line-height: 1.55;
        }

        @font-face {
            font-family: 'NajiluStampSong';
            src: url('/img/najilu-stamp-song-light.woff2?v=20261112-stamp-exlight') format('woff2');
            font-weight: 300;
            font-style: normal;
            font-display: block;
        }
        @font-face {
            font-family: 'NajiluStampZhongSong';
            src: url('/img/najilu-stamp-song-exlight.woff2?v=20261112-stamp-exlight') format('woff2');
            font-weight: 200;
            font-style: normal;
            font-display: block;
        }
    
/* Local certificate preview using the reference page's visual language. */
.najilu-certificate {
  margin: 16px 12px;
  padding: 24px 18px;
  background: #fff;
  color: #222;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.najilu-cert-title { margin: 0 0 8px; text-align: center; font-size: 23px; font-weight: 600; }
.najilu-cert-subtitle { margin-bottom: 20px; text-align: center; color: #777; font-size: 13px; }
.najilu-cert-meta { margin-bottom: 16px; color: #555; font-size: 14px; line-height: 1.8; }
.najilu-cert-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.najilu-cert-table th,
.najilu-cert-table td { padding: 8px 6px; border: 1px solid #ddd; text-align: center; }
.najilu-cert-table th { background: #f7f8fa; font-weight: 600; }
.najilu-cert-foot { margin-top: 22px; color: #555; font-size: 13px; line-height: 1.8; }
.najilu-cert-status { margin-top: 18px; text-align: right; color: #2e9b4f; font-size: 14px; }

/* Align the local certificate preview with the reference preview layout. */
body.page-najilu .preview-page {
  min-height: calc(100dvh - 48px - var(--app-safe-top, env(safe-area-inset-top, 0px)));
}
body.page-najilu .preview-wrap--swipe {
  background: #f5f6fa;
}
body.page-najilu .preview-slide .najilu-certificate {
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
body.page-najilu .preview-footer--split .preview-album-btn {
  border-radius: 8px;
}

.najilu-cert-header {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 12px;
  background: #fff;
}
