:root{color-scheme:light;--app-bg: #f7f7f8;--sidebar-bg: #f0f1f3;--surface: #ffffff;--input-bg: #fafafa;--text: #22252b;--secondary-text: #60656f;--muted-text: #767c86;--border: #d5d7dc;--strong-border: #b9bdc5;--hover: #e7e9ed;--selected: #e4e9ef;--selected-border: #8796a8;--primary: #334964;--primary-hover: #293d56;--primary-text: #ffffff;--focus: #7ca7d5;--diff-added-panel: #e0f8f3;--diff-added-inline: #a2e5d7;--diff-removed-panel: #feebe7;--diff-removed-inline: #febeb0;--error-bg: #fbebeb;--error-border: #cf9494;--error-text: #723b3b;--success-bg: #e5f3e8;--success-border: #80a989;--success-text: #315b3a;--overlay: rgb(20 24 30 / 55%);color:var(--text);background:var(--app-bg);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-synthesis:none}:root[data-theme=dark]{color-scheme:dark;--app-bg: #15181d;--sidebar-bg: #1c2026;--surface: #232830;--input-bg: #1b2027;--text: #edf0f4;--secondary-text: #b2bac5;--muted-text: #969faa;--border: #3a414c;--strong-border: #596270;--hover: #2c333d;--selected: #303b48;--selected-border: #7e96b0;--primary: #4d739a;--primary-hover: #5c84ad;--primary-text: #ffffff;--focus: #81b2e5;--diff-added-panel: #193934;--diff-added-inline: #2f6a60;--diff-removed-panel: #412927;--diff-removed-inline: #75453d;--error-bg: #3d2326;--error-border: #a95e67;--error-text: #f2b4b9;--success-bg: #203b28;--success-border: #5f966d;--success-text: #b6dfc0;--overlay: rgb(0 0 0 / 68%)}*{box-sizing:border-box}html,body,#root{min-width:320px;min-height:100%}body{margin:0;min-height:100vh;overflow-x:hidden;background:var(--app-bg);color:var(--text)}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible,textarea:focus-visible{outline:3px solid var(--focus);outline-offset:2px}.auth-shell{display:grid;min-height:100vh;place-items:center;padding:1.5rem;background:var(--app-bg)}.auth-panel{display:grid;gap:1rem;width:min(100%,24rem)}.auth-panel h1,.auth-panel p{margin:0}.auth-panel>p:not(.error-message){color:var(--secondary-text);line-height:1.5}.auth-mode{display:flex}.auth-mode button,.auth-form button{border:1px solid var(--strong-border);background:var(--surface);color:var(--text);padding:.6rem .9rem}.auth-mode button{flex:1}.auth-mode button:first-child{border-radius:.35rem 0 0 .35rem}.auth-mode button:last-child{margin-left:-1px;border-radius:0 .35rem .35rem 0}.auth-mode button[aria-pressed=true]{border-color:var(--primary);background:var(--selected);color:var(--text)}.auth-form{display:grid;gap:.9rem}.auth-form label{display:grid;gap:.35rem;color:var(--secondary-text);font-size:.84rem;font-weight:650}.auth-form input{width:100%;border:1px solid var(--strong-border);border-radius:.35rem;background:var(--surface);color:var(--text);padding:.65rem}.auth-form .primary-action{border-color:var(--primary);border-radius:.35rem;background:var(--primary);color:var(--primary-text);font-weight:650}.modal-backdrop{position:fixed;z-index:50;inset:0;display:grid;place-items:center;padding:1rem;background:var(--overlay)}.confirmation-dialog{display:grid;gap:.8rem;width:min(100%,26rem);border:1px solid var(--strong-border);border-radius:.5rem;background:var(--surface);box-shadow:0 1rem 3rem #00000047;padding:1.25rem}.confirmation-dialog h2,.confirmation-dialog p{margin:0}.confirmation-dialog h2{font-size:1.05rem}.confirmation-dialog p{color:var(--secondary-text);line-height:1.5}.confirmation-actions{display:flex;justify-content:flex-end;gap:.55rem;margin-top:.35rem}.confirmation-actions button{border:1px solid var(--strong-border);border-radius:.35rem;background:var(--surface);color:var(--text);padding:.55rem .8rem}.confirmation-actions .primary-action{border-color:var(--primary);background:var(--primary);color:var(--primary-text);font-weight:650}.confirmation-actions .destructive-action{border-color:var(--error-border);background:var(--error-bg);color:var(--error-text);font-weight:650}.confirmation-actions button:hover:not(:disabled){filter:brightness(.96)}.app-shell{display:grid;grid-template-columns:15rem minmax(0,1fr);min-height:100vh;background:var(--app-bg)}.history-sidebar{display:flex;flex-direction:column;min-height:0;padding:1.5rem;border-right:1px solid var(--border);background:var(--sidebar-bg)}.history-sidebar h2,.diff-result h2{margin:0;font-size:1rem}.history-sidebar p,.action-bar p,.panel-heading span,.diff-result p{color:var(--secondary-text);font-size:.9rem;line-height:1.5}.history-heading,.history-heading>div{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.history-heading{margin-bottom:1rem}.history-heading span{min-width:1.6rem;border-radius:1rem;background:var(--border);color:var(--secondary-text);padding:.15rem .45rem;font-size:.75rem;text-align:center}.history-search-label{margin-bottom:.35rem;color:var(--secondary-text);font-size:.78rem;font-weight:650}.history-sidebar input,.title-editor input{width:100%;border:1px solid var(--strong-border);border-radius:.35rem;background:var(--surface);color:var(--text);padding:.55rem .65rem}.history-list{flex:1;min-height:5rem;margin-block:1rem;overflow-y:auto}.history-list ul{display:grid;gap:.45rem;margin:0;padding:0;list-style:none}.history-item{display:grid;gap:.22rem;width:100%;border:0;border-left:2px solid transparent;background:transparent;color:var(--text);padding:.65rem;text-align:left}.history-item:hover{background:var(--hover)}.history-item[aria-current=true]{border-left-color:var(--primary);background:var(--selected)}.history-item strong{overflow:hidden;font-size:.86rem;text-overflow:ellipsis;white-space:nowrap}.history-item time{color:var(--muted-text);font-size:.7rem}.history-item>span{display:-webkit-box;overflow:hidden;color:var(--secondary-text);font-size:.76rem;line-height:1.3;-webkit-box-orient:vertical;-webkit-line-clamp:2}.history-actions{display:grid;grid-template-columns:1fr 1fr;gap:.45rem}.history-actions button,.copy-button{border:1px solid var(--strong-border);border-radius:.35rem;background:var(--surface);color:var(--text);padding:.5rem .35rem;font-size:.75rem}.sidebar-close,.sidebar-toggle,.sidebar-backdrop{display:none}.workspace{display:grid;align-content:start;gap:.85rem;min-width:0;overflow:hidden;padding:1.5rem}.action-bar{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}.app-heading{display:grid;grid-template-columns:auto 1fr;align-items:center;column-gap:.5rem}.app-heading h1{grid-column:2;margin:0;font-size:1.4rem}.app-heading p{grid-column:2;margin:.25rem 0 0}.action-controls{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.action-controls button,.theme-control select{border:1px solid var(--strong-border);border-radius:.35rem;background:var(--surface);color:var(--text);padding:.55rem .8rem}.action-controls button:hover:not(:disabled),.history-actions button:hover:not(:disabled),.copy-button:hover:not(:disabled){background:var(--hover)}.action-controls .primary-action{border-color:var(--primary);background:var(--primary);color:var(--primary-text);font-weight:650}.action-controls .primary-action:hover:not(:disabled){background:var(--primary-hover)}.signed-in-user{max-width:10rem;overflow:hidden;color:var(--secondary-text);font-size:.78rem;text-overflow:ellipsis;white-space:nowrap}.theme-control{display:flex;align-items:center;gap:.4rem;color:var(--secondary-text);font-size:.78rem}.theme-control select{padding:.5rem .55rem}.error-message,.success-message,.operation-status{margin:0;border-left:3px solid;padding:.55rem .75rem}.error-message{border-color:var(--error-border);background:var(--error-bg);color:var(--error-text)}.success-message{border-color:var(--success-border);background:var(--success-bg);color:var(--success-text)}.operation-status{border-color:var(--border);background:var(--sidebar-bg);color:var(--secondary-text)}.title-editor{display:grid;grid-template-columns:auto minmax(12rem,28rem) auto;align-items:center;justify-content:start;gap:.65rem}.title-editor label{font-size:.84rem;font-weight:650}.unsaved-indicator{color:var(--secondary-text);font-size:.76rem;white-space:nowrap}.editor-area{display:grid;gap:1rem}.editor-area-primary{padding-block:.4rem}.editor-disclosure{border-top:1px solid var(--border);padding-top:.75rem}.editor-disclosure summary{width:fit-content;cursor:pointer;color:var(--secondary-text);font-size:.9rem;font-weight:650}.editor-disclosure[open] summary{margin-bottom:1rem}.editor-disclosure textarea{min-height:8rem;max-height:16rem}.text-panels{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:1rem}.swap-button{align-self:center;justify-self:center;min-width:2.25rem;min-height:2.25rem;padding:.25rem;border:1px solid var(--strong-border);border-radius:50%;background:var(--surface);color:var(--text);font-size:1.1rem;line-height:1}.swap-button:hover:not(:disabled){background:var(--hover)}.swap-vertical{display:none}.text-panel{min-width:0}.panel-heading{display:grid;gap:.2rem;margin-bottom:.75rem}.panel-heading>div{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.panel-heading label{font-weight:650}.panel-heading span{font-size:.8rem}.copy-button{padding:.35rem .6rem}textarea{display:block;resize:vertical;width:100%;min-height:12rem;padding:.75rem;border:1px solid var(--strong-border);border-radius:.3rem;background:var(--input-bg);color:var(--text);line-height:1.5}.diff-result{min-width:0;min-height:5rem;padding-top:1rem;border-top:1px solid var(--border)}.diff-result[data-has-result=true]{max-height:calc(100vh - 11rem);overflow-y:auto;scrollbar-gutter:stable}.result-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:.75rem}.diff-result .identical-message{display:flex;align-items:center;gap:.65rem;margin:0 0 1rem;border-left:4px solid var(--success-border);border-radius:.35rem;background:var(--success-bg);color:var(--success-text);padding:.8rem 1rem;font-size:1rem}.identical-message>span{display:inline-grid;flex:0 0 auto;width:1.6rem;height:1.6rem;place-items:center;border:2px solid var(--success-border);border-radius:50%;color:var(--success-text);font-weight:800}.identical-message strong{font-weight:700}.diff-legend{display:flex;gap:.4rem;color:var(--secondary-text);font-size:.8rem}.diff-legend span:nth-child(2){margin-left:.5rem}.diff-lines{min-width:0}.diff-line{display:grid;grid-template-columns:2.75rem minmax(0,1fr);min-height:1.75rem;font-size:.86rem;line-height:1.45}.diff-line+.diff-line{border-top:1px solid var(--border)}.line-number{padding:.25rem .5rem;border-right:1px solid var(--border);color:var(--muted-text);text-align:right;-webkit-user-select:none;user-select:none}.diff-content{min-width:0;padding:.25rem .6rem;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;tab-size:4;font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,monospace}.diff-segment{border-radius:.2rem;padding-block:.06rem;text-decoration:none;box-decoration-break:clone;-webkit-box-decoration-break:clone}.diff-segment-added{background:var(--diff-added-inline)}.diff-segment-removed{background:var(--diff-removed-inline)}.side-by-side-diff{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.diff-side{min-width:0;padding:.8rem;border-radius:.4rem}.diff-side-old{background:var(--diff-removed-panel)}.diff-side-new{background:var(--diff-added-panel)}.diff-side h3{margin:0 0 .5rem;color:var(--secondary-text);font-size:.85rem}@media(max-width:760px){.app-shell{display:block}.history-sidebar{display:flex;position:fixed;z-index:20;inset:0 auto 0 0;width:min(19rem,86vw);max-height:none;border-right:1px solid var(--border);box-shadow:0 0 1.5rem #00000047;padding:1rem 1.25rem;transform:translate(-102%);visibility:hidden}.history-sidebar[data-open=true]{transform:translate(0);visibility:visible}.sidebar-close,.sidebar-toggle{display:inline-grid;place-items:center}.icon-button{min-width:2.25rem;min-height:2.25rem;padding:.25rem;font-size:1.1rem;line-height:1}.sidebar-backdrop{position:fixed;z-index:15;inset:0;display:block;width:100%;border:0;background:var(--overlay)}.workspace{padding:1rem}.text-panels,.side-by-side-diff,.title-editor{grid-template-columns:1fr}.swap-horizontal{display:none}.swap-vertical{display:inline}.title-editor input{max-width:none}}
