body {
    margin: 0;
    background:
        radial-gradient(circle at 10% 0%, rgba(59, 130, 246, 0.10) 0, rgba(59, 130, 246, 0) 45%),
        radial-gradient(circle at 95% 10%, rgba(16, 185, 129, 0.09) 0, rgba(16, 185, 129, 0) 35%),
        #f4f6fb;
    color: #1f2937;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.index-header {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 60;
}

.index-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.index-header-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
    text-decoration: none;
    font-weight: 700;
}

.index-header-logo {
    border-radius: 6px;
}

.tmr-nav-link {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 600;
}

.tmr-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 12px 10px 26px;
}

.tmr-intro {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%), #fff;
    border: 1px solid #dde7f3;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.045);
}

.tmr-intro-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.tmr-title {
    margin: 0;
    font-size: 22px;
    color: #0b1220;
    letter-spacing: 0.1px;
    font-weight: 800;
}

.tmr-subtitle {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 12px;
    max-width: 640px;
}

.tmr-card {
    background: #fff;
    border: 1px solid #dce6f2;
    border-radius: 12px;
    padding: 10px;
    margin-top: 8px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.035);
}

.tmr-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.tmr-card-head h2 {
    margin: 0;
    font-size: 15px;
    color: #0f172a;
}

.tmr-meta {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
}

.tmr-editor-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.tmr-pane {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.tmr-pane-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 6px 8px;
}

.tmr-textarea {
    width: 100%;
    min-height: 250px;
    height: clamp(260px, 45vh, 520px);
    border: 0;
    border-radius: 0;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.55;
    resize: vertical;
    box-sizing: border-box;
    background: #ffffff;
    transition: box-shadow .2s ease, background-color .2s ease;
}

.tmr-textarea:focus {
    outline: none;
    background: #fbfdff;
    box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.tmr-textarea-sm {
    min-height: 74px;
    height: 98px;
}

.tmr-preview {
    min-height: 250px;
    height: clamp(260px, 45vh, 520px);
    border: 0;
    border-radius: 0;
    background: #fff;
    padding: 8px 10px 10px;
    overflow: auto;
    box-sizing: border-box;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    margin-top: 12px;
    margin-bottom: 6px;
    color: #0f172a;
    letter-spacing: 0.1px;
}

.markdown-body h1 {
    font-size: 1.05rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 6px;
}

.markdown-body h2 {
    font-size: 0.95rem;
    border-left: 3px solid #3b82f6;
    padding-left: 8px;
}

.markdown-body h3 {
    font-size: 0.88rem;
}

.markdown-body p,
.markdown-body li {
    line-height: 1.55;
    color: #334155;
    margin: 3px 0;
    font-size: 12px;
}

.markdown-body ul,
.markdown-body ol {
    padding-left: 1.05rem;
    margin-bottom: 6px;
}

.markdown-body code {
    background: #eef2ff;
    padding: 1px 5px;
    border-radius: 6px;
    font-size: 11px;
    color: #312e81;
    border: 1px solid #e0e7ff;
}

.markdown-body pre {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 8px 9px;
    overflow: auto;
    border: 1px solid #1e293b;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2);
}

.markdown-body pre code {
    background: transparent;
    border: 0;
    color: inherit;
    padding: 0;
}

.markdown-body blockquote {
    margin: 6px 0;
    padding: 6px 9px;
    border-left: 3px solid #60a5fa;
    background: #f8fafc;
    color: #475569;
    border-radius: 0 8px 8px 0;
}

.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0;
    font-size: 11px;
}

.markdown-body th,
.markdown-body td {
    border: 1px solid #e2e8f0;
    padding: 4px 6px;
    text-align: left;
}

.markdown-body th {
    background: #f8fafc;
    color: #334155;
}

.tmr-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.tmr-toast {
    position: fixed;
    right: 16px;
    bottom: 18px;
    min-width: 180px;
    max-width: 420px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #fff;
    background: #0f172a;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 9999;
    font-size: 12px;
}

.tmr-actions .btn {
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    font-size: 12px;
    padding: 4px 10px;
}

.tmr-diff-card {
    border-color: #d5e0ef;
}

.tmr-diff-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.tmr-diff-opt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #475569;
}

.tmr-diff-opt select {
    min-width: 148px;
    font-size: 11px;
    padding: 2px 8px;
}

.tmr-diff-check input {
    width: 13px;
    height: 13px;
}

.tmr-diff-head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 6px;
}

.tmr-diff-col-title {
    font-size: 11px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 5px 8px;
    font-weight: 700;
}

.tmr-diff-list {
    border: 1px solid #dce6f2;
    border-radius: 10px;
    overflow: auto;
    max-height: 52vh;
    background: #fff;
}

.tmr-diff-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid #eef2f7;
}

.tmr-diff-row:last-child {
    border-bottom: 0;
}

.tmr-diff-cell {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 6px;
    align-items: start;
    padding: 4px 8px;
    min-height: 24px;
}

.tmr-diff-ln {
    color: #94a3b8;
    font-size: 10px;
    text-align: right;
    user-select: none;
}

.tmr-diff-text {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 11px;
    line-height: 1.45;
    color: #1e293b;
}

.tmr-diff-row.is-add .tmr-diff-cell-new {
    background: #f0fdf4;
}

.tmr-diff-row.is-del .tmr-diff-cell-old {
    background: #fef2f2;
}

.tmr-diff-row.is-mod .tmr-diff-cell-old {
    background: #fff7ed;
}

.tmr-diff-row.is-mod .tmr-diff-cell-new {
    background: #eff6ff;
}

.tmr-diff-list.is-unified .tmr-diff-row {
    grid-template-columns: 1fr;
}

.tmr-diff-list.is-unified .tmr-diff-cell {
    grid-template-columns: 20px 40px 1fr;
}

.tmr-diff-sign {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    user-select: none;
}

.tmr-diff-sign.plus {
    color: #166534;
}

.tmr-diff-sign.minus {
    color: #b91c1c;
}

.tmr-diff-sign.space {
    color: #94a3b8;
}

.tmr-diff-hunk-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 8px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.tmr-diff-hunk-meta {
    font-size: 10px;
    color: #475569;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.tmr-apply-hunk-btn {
    border: 1px solid #c9d6ea;
    background: #fff;
    color: #1d4ed8;
    border-radius: 6px;
    font-size: 10px;
    padding: 2px 8px;
    line-height: 1.3;
}

.tmr-apply-hunk-btn:hover {
    background: #eff6ff;
}

.tmr-toast.show { opacity: 0.96; }
.tmr-toast.ok { background: #166534; }
.tmr-toast.err { background: #b91c1c; }

@media (max-width: 900px) {
    .index-header-inner {
        padding: 7px 8px;
    }
    .index-header-brand-text {
        font-size: 13px;
    }
    .tmr-nav-link {
        font-size: 12px;
    }
    .tmr-page {
        padding: 8px 6px 16px;
    }
    .tmr-title {
        font-size: 18px;
    }
    .tmr-subtitle {
        font-size: 11px;
    }
    .tmr-card {
        padding: 8px;
        margin-top: 6px;
    }
    .tmr-editor-preview {
        grid-template-columns: 1fr;
    }
    .tmr-preview,
    .tmr-textarea {
        min-height: 180px;
        height: 42vh;
    }
    .tmr-textarea-sm {
        min-height: 72px;
        height: 88px;
    }
    .tmr-actions {
        justify-content: stretch;
    }
    .tmr-actions .btn {
        flex: 1 1 auto;
        font-size: 12px;
        padding: 6px 8px;
    }
    .tmr-diff-head,
    .tmr-diff-row {
        grid-template-columns: 1fr;
    }
    .tmr-diff-list.is-unified .tmr-diff-cell {
        grid-template-columns: 18px 34px 1fr;
    }
    .tmr-diff-list {
        max-height: 62vh;
    }
}

