:root{color-scheme:light;--ink:#22352d;--muted:#667268;--accent:#28634b;--paper:#f6f5ef;--line:#dce2d8}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:system-ui,-apple-system,Segoe UI,sans-serif}header{max-width:1240px;margin:auto;padding:25px 40px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}a{color:inherit;text-decoration:none}.brand{font:700 37px Georgia,serif;display:flex;gap:10px;align-items:center}.brand>span{font:750 25px system-ui}.dot{color:#d7844c}nav{display:flex;align-items:center;gap:28px;font-size:14px;font-weight:600}nav a:hover,nav a.active{color:var(--accent)}nav a.active{border-bottom:2px solid var(--accent);padding-bottom:5px}.add,.primary{background:var(--accent);color:white!important;border-radius:9px;padding:12px 20px;border:0;font:600 14px system-ui;cursor:pointer}main{max-width:1160px;margin:0 auto;padding:50px 0 70px;min-height:75vh}.eyebrow{font-size:12px;letter-spacing:2px;color:var(--accent);font-weight:700;text-transform:uppercase}h1{font:normal 52px/1.1 Georgia,serif;margin:13px 0 18px;letter-spacing:-1px}h2{font:normal 27px Georgia,serif}p.sub{color:var(--muted);line-height:1.6;margin-bottom:30px}.toolbar{display:flex;gap:12px;margin:30px 0 25px}input,textarea,select{font:15px system-ui;background:#fff;border:1px solid #cdd6cc;border-radius:10px;padding:14px;color:var(--ink)}input:focus,textarea:focus,select:focus,button:focus-visible,a:focus-visible{outline:3px solid #a4c4b4;outline-offset:3px}.toolbar input{flex:1}.toolbar select{max-width:320px}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.quote{background:#fff;border:1px solid var(--line);border-radius:14px;padding:27px;position:relative}.quote:before{content:'“';font:48px Georgia,serif;color:#b0c6b6;line-height:1}.quote blockquote{margin:6px 0 24px;font:21px/1.6 Georgia,serif;white-space:pre-wrap;overflow-wrap:anywhere}.authors{display:flex;flex-wrap:wrap;gap:8px}.authors a{font-size:12px;font-weight:600;background:#edf2eb;border-radius:6px;padding:7px 10px}.authors a:hover{background:#d8e6dc}.meta{color:var(--muted);font-size:13px;margin:15px 0}.empty{padding:30px;border:1px dashed #bbcbbd;border-radius:12px}.authorgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.authorcard{background:white;border:1px solid var(--line);padding:22px;border-radius:12px;display:flex;gap:12px;align-items:center}.avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#e4eddf;color:var(--accent);font:17px Georgia}.authorcard:hover{border-color:var(--accent)}.randomwrap{max-width:850px;margin:auto;text-align:center}.randomwrap .quote{text-align:left;margin:30px 0}.randomwrap blockquote{font-size:29px}.formwrap{max-width:680px;margin:auto}.form{background:white;padding:30px;border:1px solid var(--line);border-radius:16px}.field{margin-bottom:24px;position:relative}label{display:block;font-weight:600;font-size:14px;margin-bottom:10px}textarea{width:100%;min-height:170px;resize:vertical}.field input{width:100%}.help{font-size:13px;color:var(--muted);margin-top:8px}.suggestions{position:absolute;z-index:2;top:84px;width:100%;background:white;border:1px solid var(--line);box-shadow:0 8px 18px #22352d15;border-radius:8px;max-height:220px;overflow:auto}.suggestions button{display:block;background:transparent;border:0;text-align:left;width:100%;padding:12px 15px;font:14px system-ui;cursor:pointer}.suggestions button:hover,.suggestions button:focus{background:#edf2eb}.notice{padding:14px;background:#e0eee2;border-radius:8px;line-height:1.5}.error{color:#9d3434}.loadmore{display:block;margin:30px auto}.secondary{border:1px solid #9eb7a7;color:var(--accent);border-radius:9px;padding:12px 20px;background:transparent;cursor:pointer;font:600 14px system-ui}footer{max-width:1160px;margin:0 auto;padding:25px 0;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}@media(max-width:1230px){main,footer{margin:0 30px}}@media(max-width:700px){header{padding:20px;align-items:flex-start;gap:20px;flex-direction:column}nav{gap:16px;flex-wrap:wrap;font-size:13px}main{padding:32px 0;margin:0 20px}h1{font-size:39px}.grid,.authorgrid{grid-template-columns:1fr}.toolbar{flex-direction:column}.toolbar select{max-width:none}.quote{padding:22px}.randomwrap blockquote{font-size:24px}.form{padding:22px}footer{margin:0 20px}.suggestions{top:84px}}



[hidden]{display:none!important}







fieldset{border:1px solid var(--line);border-radius:10px;margin:25px 0;padding:18px}.tagchoice{display:flex;gap:10px;align-items:center;margin:12px 0}.form>input{width:100%}.formwrap>.secondary{display:inline-block;margin-top:20px}



main>.secondary{display:inline-block;margin-bottom:24px}







.deletequote{border:0;border-radius:6px;background:#f5e8e4;color:#923d2b;padding:7px 10px;font:600 12px system-ui;cursor:pointer}.authors>.notice{width:100%}.notice button{margin-right:8px}.formwrap>.deletequote{margin:20px}







.author-menu{position:fixed;z-index:1000;min-width:160px;padding:8px;background:#fff;border:1px solid #cbd8ce;border-radius:12px;box-shadow:0 8px 30px #20372b33}.author-menu a,.author-menu button{display:block;width:100%;text-align:left;padding:12px;background:transparent;border:0;border-radius:8px;color:#234438;font:inherit;text-decoration:none;box-sizing:border-box}.author-menu a:hover,.author-menu button:hover,.author-menu :focus{background:#edf3ed}.author-dialog{max-width:520px;border:1px solid #cbd8ce;border-radius:16px;padding:28px;color:#243a30;background:#f7f6ef}.author-dialog::backdrop{background:#172a2366}.author-dialog button{margin:8px 8px 0 0}







.tag-menu{border-top:1px solid #cbd8ce;margin-top:6px;padding-top:6px}.tag-menu[hidden]{display:none}.tag-menu [aria-checked=true]::before{content:"✓ ";color:#286545}.tag-status{font-size:13px;padding:0 12px;color:#286545}.author-menu{max-height:calc(100vh - 16px);overflow:auto}







.randomwrap h1{margin-bottom:30px}.randomwrap .quote{margin:30px 0 22px}.randomwrap .quote blockquote{margin-bottom:0}.random-actions{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;text-align:left}.random-actions .authors{flex:1}.random-actions>.primary{flex-shrink:0}.random-result>.primary{margin-top:15px}@media(max-width:550px){.random-actions{flex-wrap:wrap}.random-actions .authors{flex-basis:100%}.random-actions>.primary{margin-left:auto}}







.best-star{position:absolute;top:16px;right:18px;border:0;background:transparent;color:#a4aaa5;font:32px/1 system-ui;cursor:pointer}.best-star[aria-pressed=true]{color:#b08019}.quote blockquote{padding-right:15px}.best-filter{margin:0;position:relative;flex-shrink:0;display:grid;place-items:center;min-width:54px;border:1px solid #cdd6cc;border-radius:10px;background:white;cursor:pointer}.best-filter input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}.best-filter span{font:30px system-ui;color:#7a827c;padding:7px 12px}.best-filter:has(input:checked){background:#fff2c9;border-color:#b08019}.best-filter input:checked+span{color:#b08019;font-size:0}.best-filter input:checked+span:after{content:"★";font-size:30px}.best-filter:focus-within{outline:3px solid #a4c4b4;outline-offset:3px}.random-filters{display:flex;justify-content:center;gap:10px}.randomwrap .quote blockquote{padding-right:26px}@media(max-width:700px){.toolbar .best-filter{align-self:flex-start}}







.theme-toggle{white-space:nowrap;padding:9px 12px;font-size:12px}.formwrap>.theme-toggle{margin-top:20px}



:root[data-theme=dark]{color-scheme:dark;--ink:#e3ece6;--muted:#a7b6ac;--accent:#83c4a3;--paper:#141c18;--line:#36473c}



[data-theme=dark] .quote,[data-theme=dark] .authorcard,[data-theme=dark] .form,[data-theme=dark] .suggestions,[data-theme=dark] .author-menu{background:#202c25;border-color:var(--line)}



[data-theme=dark] input,[data-theme=dark] textarea,[data-theme=dark] select,[data-theme=dark] .best-filter{background:#202c25;border-color:#4c6253;color:var(--ink)}



[data-theme=dark] .authors a,[data-theme=dark] .avatar,[data-theme=dark] .notice{background:#304638;color:var(--ink)}



[data-theme=dark] .authors a:hover,[data-theme=dark] .suggestions button:hover,[data-theme=dark] .suggestions button:focus,[data-theme=dark] .author-menu a:hover,[data-theme=dark] .author-menu button:hover,[data-theme=dark] .author-menu :focus{background:#3b5143}



[data-theme=dark] .suggestions button,[data-theme=dark] .author-menu a,[data-theme=dark] .author-menu button{color:var(--ink)}



[data-theme=dark] .primary,[data-theme=dark] .add{background:#316e50;color:#fff!important}



[data-theme=dark] .author-dialog{background:#202c25;color:var(--ink);border-color:var(--line)}



[data-theme=dark] .deletequote{background:#50332e;color:#ffc2ad}[data-theme=dark] .error{color:#ffabab}



[data-theme=dark] .best-star{color:#a1b3a7}[data-theme=dark] .best-star[aria-pressed=true],[data-theme=dark] .best-filter input:checked+span{color:#f2c65e}



[data-theme=dark] .best-filter:has(input:checked){background:#493f24;border-color:#d1aa4c}[data-theme=dark] .tag-status{color:var(--accent)}







form[action="/login"]>.primary{display:block;margin-top:18px}





.quote:before{content:none}.quote-top{display:flex;align-items:center;gap:12px;padding-right:42px;margin-bottom:14px}.quote-mark{font:48px/1 Georgia,serif;color:#b0c6b6}.quote-top .push-quote{padding:7px 11px;font-size:12px}.quote-top .push-quote:disabled{cursor:default;opacity:.65}



.dialogue-candidates{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}



.quote-input-wrap{position:relative}.quote-input-wrap textarea{display:block;position:relative;width:100%;background:transparent!important;z-index:1}.quote-ghost{position:absolute;inset:0;pointer-events:none;overflow:hidden;white-space:pre-wrap;overflow-wrap:break-word;font:15px system-ui;padding:14px;border:1px solid transparent;border-radius:10px;line-height:normal}.ghost-prefix{color:transparent}.ghost-suffix{color:#a5aaa7}[data-theme=dark] .ghost-suffix{color:#7d8a81}


/* Neutral dark palette */
[data-theme=dark]{--paper:#1c1c1e;--ink:#d9d8d4;--muted:#a3a19b;--accent:#b6b9b0;--line:#39393b;color-scheme:dark}
[data-theme=dark] .quote,[data-theme=dark] .authorcard,[data-theme=dark] .form,[data-theme=dark] .suggestions,[data-theme=dark] .author-menu{background:#252527;border-color:#39393b}
[data-theme=dark] input,[data-theme=dark] textarea,[data-theme=dark] select,[data-theme=dark] .best-filter{background:#202022;color:var(--ink);border-color:#49494b}
[data-theme=dark] .primary,[data-theme=dark] .add{background:#585d55;color:#f0efeb!important}
[data-theme=dark] .secondary{color:#c4c6bd;border-color:#575852}
[data-theme=dark] .authors a,[data-theme=dark] .avatar{background:#343536;color:#d2d3cc}
[data-theme=dark] .authors a:hover,[data-theme=dark] .suggestions button:hover,[data-theme=dark] .author-menu button:hover,[data-theme=dark] .author-menu a:hover{background:#414143}
[data-theme=dark] .quote-mark{color:#777974}
[data-theme=dark] .notice{background:#333932;color:#d9ddd5}
[data-theme=dark] .error{color:#d7a39b}
[data-theme=dark] button.delete,[data-theme=dark] .delete-button,[data-theme=dark] .authors .delete{background:#453332;color:#d5aaa3}
[data-theme=dark] input:focus,[data-theme=dark] textarea:focus,[data-theme=dark] select:focus,[data-theme=dark] button:focus-visible,[data-theme=dark] a:focus-visible{outline:2px solid #8c9385;outline-offset:2px}
[data-theme=dark] .best-star[aria-pressed=true]{color:#bda167}
[data-theme=dark] .best-filter:has(input:checked){background:#3c3629;border-color:#8d7955}
[data-theme=dark] .best-filter input:checked+span{color:#c3aa78}

:root[data-theme=dark]{--paper:#1c1c1e;--ink:#d9d8d4;--muted:#a3a19b;--accent:#b6b9b0;--line:#39393b}

@media(max-width:700px){.formwrap{width:100%;max-width:100%}.form{padding:18px}.field{min-width:0}.form input,.form textarea,.form select{font-size:16px;max-width:100%;min-width:0}.form select{width:100%}.quote-input-wrap .quote-ghost{font-size:16px}.quote-input-wrap textarea{min-height:190px}.dialogue-candidates button,.suggestions button{min-height:44px;white-space:normal;text-align:left}.form .primary{min-height:46px;width:100%}.suggestions{position:static;max-height:220px;overflow-y:auto}.form input[type=datetime-local]{margin-top:12px;width:100%}.form .help{line-height:1.5}.formwrap h1{font-size:34px;overflow-wrap:anywhere}}

.quote-top{flex-wrap:wrap}.quote-top .naughty-toggle{padding:7px 10px;font-size:12px}.naughty-toggle[aria-pressed=true]{border-color:#b47a6c;color:#a05a47}.naughty-choice{display:flex;align-items:center;gap:10px;margin:18px 0}.naughty-choice input{width:20px;height:20px;flex-shrink:0}[data-theme=dark] .naughty-toggle[aria-pressed=true]{color:#d0a89b;border-color:#8b685d}

.quote>.naughty-toggle{position:absolute;top:19px;right:57px;padding:3px 7px;border-radius:7px;font:600 18px/1.2 system-ui;background:transparent;color:var(--muted);border:1px solid var(--line)}.quote>.naughty-toggle[aria-pressed=true]{color:#b786b7;border-color:#966498;background:#96649818}.quote-top{padding-right:90px}

.quote>.naughty-toggle{right:73px}.quote-top{padding-right:108px}:root:not([data-theme=dark]) .quote>.naughty-toggle[aria-pressed=true]{color:#28634b;border-color:#5e9477;background:#e7f1e9}
:root[data-theme=dark]{--accent:#96b7a2}
[data-theme=dark] .quote>.naughty-toggle[aria-pressed=true]{color:#a7cfb5;border-color:#628b70;background:#628b7026}
[data-theme=dark] .primary,[data-theme=dark] .add{background:#355e47;color:#f0f5ef;border-color:#54775e}
[data-theme=dark] :is(input,textarea,select,button,a):focus-visible{outline-color:#8ab99a}
