.diff-main { padding-bottom: 90px; }
.diff-intro { display: flex; justify-content: space-between; align-items: end; gap: 40px; padding: 55px 0 38px; }
.diff-intro h1 { margin: 0; font: 800 clamp(46px, 6vw, 76px)/1.03 "STKaiti","KaiTi",serif; letter-spacing: -.05em; }
.diff-intro h1 em { color: var(--green); font-style: normal; }
.diff-intro p:last-child { max-width: 680px; margin: 18px 0 0; color: var(--muted); line-height: 1.8; }
.diff-legend { display: flex; gap: 15px; padding-bottom: 8px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.diff-legend i { display: inline-block; width: 11px; height: 11px; margin-right: 5px; border: 1px solid var(--ink); vertical-align: -2px; }
.diff-legend .removed { background: #ffd9d3; }.diff-legend .added { background: #d9f3df; }.diff-legend .changed { background: #fff0b6; }
.diff-workbench { border: 1px solid var(--ink); background: rgba(255,253,247,.82); box-shadow: 7px 8px 0 rgba(24,32,28,.13); }
.diff-toolbar { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 12px 15px; border-bottom: 1px solid var(--ink); background: var(--paper-deep); }
.toolbar-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.check-option { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--line); background: var(--card); font-size: 10px; cursor: pointer; }
.check-option input { accent-color: var(--green); }
.toolbar-actions button { min-height: 36px; padding: 0 12px; }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; }
.editor-pane:first-child { border-right: 1px solid var(--ink); }
.editor-pane > header { min-height: 55px; display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.editor-pane > header > div { display: flex; align-items: center; gap: 8px; }
.editor-pane header strong { font: 750 16px "STKaiti","KaiTi",serif; }
.editor-pane header small { color: var(--muted); font: 9px monospace; }
.pane-dot { width: 9px; height: 9px; border: 1px solid var(--ink); border-radius: 50%; }.pane-dot.left { background: #ef7b68; }.pane-dot.right { background: #62bd87; }
.file-button { position: relative; padding: 7px 10px; border: 1px solid var(--ink); background: var(--card); font-size: 10px; cursor: pointer; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.editor-pane textarea { display: block; width: 100%; height: 330px; resize: vertical; padding: 18px; border: 0; border-bottom: 1px solid var(--line); outline: 0; background: rgba(255,255,255,.52); color: var(--ink); font: 12px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace; tab-size: 2; }
.editor-pane textarea:focus { box-shadow: inset 0 0 0 3px rgba(29,98,69,.12); }
.edit-actions { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 10px; background: #f8f5ed; }
.edit-actions button { padding: 5px 8px; border: 0; background: transparent; color: var(--muted); font-size: 9px; }
.edit-actions button:hover { color: var(--ink); background: var(--paper-deep); }
.diff-results { border-top: 1px solid var(--ink); }
.results-head { min-height: 65px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 15px; background: var(--ink); color: var(--card); }
.result-summary { display: flex; align-items: baseline; gap: 10px; }.result-summary strong { font: 750 17px "STKaiti","KaiTi",serif; }.result-summary span { color: #bdc4be; font-size: 10px; }
.change-nav { display: flex; align-items: center; gap: 5px; }.change-nav button { min-height: 32px; padding: 0 9px; color: var(--card); border-color: #637069; background: transparent; font-size: 9px; }.change-nav button:hover:not(:disabled) { background: #34423b; }.change-nav button:disabled { opacity: .4; }.change-nav span { min-width: 48px; color: #bdc4be; text-align: center; font: 9px monospace; }
.diff-table.empty { min-height: 190px; display: grid; place-items: center; color: var(--muted); }
.diff-row { display: grid; grid-template-columns: 50% 50%; scroll-margin-top: 18px; }
.diff-row + .diff-row { border-top: 1px solid #e4e0d6; }
.diff-cell { min-width: 0; display: grid; grid-template-columns: 46px minmax(0,1fr); background: rgba(255,255,255,.45); }
.diff-cell:first-child { border-right: 1px solid var(--line); }
.line-number { padding: 5px 8px; color: #9a9991; background: rgba(24,32,28,.035); border-right: 1px solid var(--line); text-align: right; user-select: none; font: 9px/1.6 monospace; }
.line-content { min-height: 26px; margin: 0; padding: 5px 10px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 10px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace; }
.diff-table.no-wrap .line-content { white-space: pre; overflow-wrap: normal; }
.diff-cell.deleted { background: #fff0ed; }.diff-cell.inserted { background: #eaf7ed; }.diff-cell.modified { background: #fff9dc; }
.diff-cell.placeholder { background: repeating-linear-gradient(-45deg,#faf8f2,#faf8f2 5px,#f4f1e9 5px,#f4f1e9 10px); }
.char-del { background: #f5aaa0; text-decoration: line-through; }.char-add { background: #91d5a3; }
.diff-row.active-change { outline: 2px solid var(--orange); outline-offset: -2px; }
@media (max-width: 820px) {
  .diff-intro { align-items: start; flex-direction: column; }.diff-toolbar,.results-head { align-items: stretch; flex-direction: column; }.editor-grid { grid-template-columns: 1fr; }.editor-pane:first-child { border-right: 0; border-bottom: 1px solid var(--ink); }.editor-pane textarea { height: 240px; }.diff-row { grid-template-columns: 1fr; }.diff-cell:first-child { border-right: 0; border-bottom: 1px dashed var(--line); }.change-nav { flex-wrap: wrap; }
}
