.container { max-width: 1400px; }
.panel.extra-panel { width: 100%; max-width: 1360px; margin: 0 auto 24px; }
.main {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
}
.main > .panel {
    height: 640px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.main > .panel .form-body,
.main > .panel .result-body {
    flex: 1 1 auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.main > .panel .status-bar { flex: 0 0 auto; }

/* 左：正则设置 */
.regex-input { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; }

.flags-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.flags-row .flag-label { font-size: 12px; color: #9ca3af; margin-right: 2px; }
.flag-chip {
    min-width: 30px; height: 28px; padding: 0 8px;
    border: 1px solid #d1d5db; border-radius: 6px; background: #fff;
    color: #6b7280; font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px;
    cursor: pointer; transition: all .15s ease;
}
.flag-chip:hover { border-color: #667eea; color: #4338ca; background: #eef2ff; }
.flag-chip.active {
    border-color: #667eea; background: #eef2ff; color: #4338ca; font-weight: 600;
    box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}

.mode-bar .tab { border-radius: 6px; }
.mode-bar .tab.active { background: #eef2ff; color: #4338ca; }

.test-text-group { flex: 1 1 auto; min-height: 0; }
.test-text-group .form-control {
    flex: 1 1 auto; min-height: 140px; resize: vertical;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13px; line-height: 1.6;
}

/* 右：结果 */
.result-body .hero-result { flex: 0 0 auto; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.hero-result .label { margin: 0; }
.mode-badge {
    font-size: 11px; font-weight: 600; color: #4338ca; background: #e6e8ff;
    padding: 2px 9px; border-radius: 999px; white-space: nowrap;
}
#resultHero {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 26px; font-weight: 600; color: #4338ca;
}
.summary-list, .schedule-block, .preview-block { margin-top: 14px; flex: 0 0 auto; }
.summary-row .item-value { color: #4b5563; font-weight: 500; }
.summary-row .item-value.total { color: #4338ca; }

.schedule thead th {
    background: #f4f5fb; color: #4b5563; font-weight: 600; font-size: 12px;
    padding: 8px 10px; border-bottom: 1px solid #e2e5ec; text-align: left; white-space: nowrap;
}
.schedule tbody td { padding: 7px 10px; font-size: 13px; text-align: left; vertical-align: top; }
.schedule tbody tr:hover { background: #f6f7ff; }
.match-cell {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    color: #4338ca; word-break: break-all;
}

.preview-area { min-height: 180px; resize: vertical; font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; }

#resultTable th:first-child { width: 52px; }

/* 知识文章 */
.seo-article { line-height: 1.85; color: #3f4857; }
.seo-article h2 { font-size: 18px; color: #1f2937; margin: 22px 0 10px; padding-left: 10px; border-left: 4px solid #667eea; line-height: 1.4; }
.seo-article table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; table-layout: fixed; }
.seo-article table th, .seo-article table td { text-align: left; vertical-align: middle; padding: 7px 10px; border: 1px solid #eef0f4; }
.seo-article table thead th { background: #eef2ff; color: #4338ca; font-weight: 600; }
.seo-article table thead th:first-child { width: 12%; }
.seo-article code {
    background: #eef2ff; color: #4338ca; padding: 1px 6px; border-radius: 5px;
    font-size: .92em; font-family: "SFMono-Regular", Consolas, monospace;
}

@media (max-width: 600px) {
    .main { grid-template-columns: 1fr; }
    .main > .panel { height: auto; }
    .test-text-group .form-control { min-height: 180px; }
    .preview-area { min-height: 180px; }
}
