.hn-tools,.hn-dialog,.hn-toast,.hn-selection,.hn-panel,.historia-notes-page{font:15px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif;color:#302b25;box-sizing:border-box}
.hn-tools *,.hn-dialog *,.hn-panel *,.historia-notes-page *{box-sizing:border-box}
.hn-tools{position:fixed;right:18px;bottom:18px;z-index:1200;display:flex;gap:5px;align-items:center;flex-wrap:wrap;padding:7px;background:#fffdf7;border:1px solid #d8cdbb;border-radius:14px;box-shadow:0 4px 20px #36251324;max-width:calc(100vw - 24px)}
.hn-tools a,.hn-tools button,.hn-actions button,.hn-actions a,.hn-selection button,.hn-dialog button,.hn-panel button,.hn-tabs a{font:inherit;color:#463b2c;background:#fffdf7;border:1px solid #d8cdbb;border-radius:8px;padding:8px 11px;text-decoration:none;cursor:pointer;line-height:1.3}
.hn-tools a:hover,.hn-tools button:hover,.hn-actions button:hover,.hn-tabs a:hover{background:#f0e9dc}
.hn-tools button:disabled,.hn-dialog button:disabled{opacity:.5;cursor:wait}
.hn-tools .hn-brand{font-weight:650;border:0;color:#743831}
.hn-selection{position:fixed;z-index:1500;left:50%;bottom:84px;transform:translateX(-50%);max-width:calc(100vw - 24px);padding:8px;display:flex;gap:6px;flex-wrap:wrap;border-radius:12px;background:#fffdf7;box-shadow:0 4px 22px #30282040;border:1px solid #ccbda5}
.hn-selection[hidden],.hn-panel[hidden],.hn-toast[hidden]{display:none!important}
.hn-dialog{width:min(540px,calc(100vw - 24px));max-height:85vh;overflow:auto;border:1px solid #cdbc9f;border-radius:16px;padding:24px;background:#fffdf7;z-index:2000}
.hn-dialog::backdrop{background:#221d1859}
.hn-dialog h2{font:600 23px/1.3 Georgia,serif;margin:0 0 16px}
.hn-dialog textarea{display:block;width:100%;min-height:130px;font:inherit;padding:12px;border:1px solid #bbae99;border-radius:8px;margin:8px 0 16px;resize:vertical;background:white;color:#302b25}
.hn-dialog blockquote,.hn-card blockquote{white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0;padding:10px 14px;border-left:3px solid #b79763;background:#f6f1e7;max-height:220px;overflow:auto;font:17px/1.55 Georgia,serif}
.hn-dialog label{display:block;margin-top:10px}.hn-dialog select{font:inherit;padding:8px;margin:8px 0 16px;max-width:100%}
.hn-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.hn-actions .hn-primary,.hn-dialog .hn-primary{background:#703d36;color:white;border-color:#703d36}
.hn-toast{position:fixed;left:50%;top:16px;transform:translateX(-50%);z-index:3000;max-width:calc(100vw - 24px);background:#302b25;color:white;border-radius:10px;padding:12px 18px;box-shadow:0 4px 20px #0003}
.hn-panel{position:fixed;right:12px;bottom:85px;z-index:1400;width:min(420px,calc(100vw - 24px));max-height:70vh;overflow:auto;padding:20px;background:#fffdf7;border:1px solid #d2c2a9;border-radius:14px;box-shadow:0 6px 35px #30282030}
.hn-panel h2{font:600 23px Georgia,serif;margin:0 0 15px}.hn-panel .hn-close{float:right}
.hn-card{background:#fffdf7;border:1px solid #e0d5c4;border-left:4px solid #e9c964;border-radius:10px;margin:16px 0;padding:18px;overflow-wrap:anywhere}
.hn-card[data-color="green"]{border-left-color:#81b290}.hn-card[data-color="pink"]{border-left-color:#d895b1}
.hn-card h3{font:600 20px/1.4 Georgia,serif;margin:0 0 6px}.hn-card p{white-space:pre-wrap;margin:8px 0}.hn-meta{font-size:13px;color:#756856}.hn-kicker{color:#80503a;text-transform:uppercase;letter-spacing:.1em;font-size:12px}
.historia-notes-page{margin:0;background:#f5f0e7}.historia-notes-page main{max-width:960px;margin:56px auto 120px;padding:0 24px}.historia-notes-page h1{font:500 clamp(30px,5vw,48px)/1.15 Georgia,serif}.hn-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:24px 0}.hn-tabs [aria-current]{background:#e9dfce}
.historia-notes-page label{display:block;margin-top:14px}.historia-notes-page input,.historia-notes-page select{font:inherit;max-width:100%;padding:10px 14px;border:1px solid #c8b99f;border-radius:8px;background:#fffdf7}.historia-notes-page input{width:100%}
::highlight(hn-yellow){background:#ffe58b;color:inherit}::highlight(hn-green){background:#bde3c4;color:inherit}::highlight(hn-pink){background:#f3bfd3;color:inherit}
.hn-page-target{outline:3px solid #b28b57!important;outline-offset:4px}
@media(max-width:600px){.hn-tools{right:8px;bottom:8px;gap:3px;padding:5px;font-size:13px}.hn-tools a,.hn-tools button{padding:8px}.hn-panel{bottom:76px}.hn-selection{bottom:78px}.hn-card{padding:14px}.historia-notes-page main{margin-top:28px;padding:0 16px}}
@media print{.hn-tools,.hn-panel,.hn-selection,.hn-dialog,.hn-toast{display:none!important}}
