#accountRoot{position:relative}
#accountRoot button,#authDialog button{min-height:44px;padding:8px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);color:var(--gold-soft);font:inherit;cursor:pointer}
#accountRoot button{white-space:nowrap}
#accountMenu{position:absolute;right:0;top:50px;z-index:100;width:180px;padding:8px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}
#accountMenu button{display:block;width:100%;text-align:left}
#authDialog{width:min(440px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:24px;border:1px solid var(--line);border-radius:20px;background:var(--surface);color:var(--ink);box-shadow:var(--shadow);overflow:auto}
#authDialog::backdrop{background:rgba(0,0,0,.72)}
#authDialog header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
#authDialog h2{margin:0;font-size:22px;color:var(--gold-soft)}
#authDialog label{display:block;margin:16px 0;color:var(--ink)}
#authDialog input{display:block;width:100%;margin-top:8px;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink);font:inherit;font-size:16px}
#authDialog fieldset{margin:0;padding:0;border:0;min-width:0}
#authDialog button:disabled{opacity:.55;cursor:wait}
#authDialog [hidden],#accountRoot [hidden]{display:none!important}
#authDialog .auth-submit{width:100%;background:var(--gold);color:var(--paper);font-weight:700}
#authDialog #authCredentials:not([hidden]) ~ .auth-submit{margin-top:12px}
#authDialog .auth-switch{width:100%;margin-top:12px;background:transparent}
#authDialog .auth-forgot{display:block;padding:8px 0;border:0;background:transparent;font-size:13px;text-decoration:underline;text-underline-offset:3px}
#recoveryForm .auth-submit{margin-top:12px}
#authStatus{min-height:1.5em;line-height:1.5;overflow-wrap:anywhere;color:var(--gold-soft)}
#authStatus[data-error="true"]{color:#FFB4BC}
#authEmailLabel{overflow-wrap:anywhere;color:var(--muted)}
#authDialog :focus-visible,#accountRoot :focus-visible{outline:2px solid var(--gold);outline-offset:3px}
@media(max-width:540px){#authDialog{margin:auto 0 0;width:100%;max-width:none;max-height:90dvh;border-radius:20px 20px 0 0;padding-bottom:calc(24px + var(--safe-bottom))}#accountRoot button{padding:8px 10px}}

verse-note{display:block;clear:both}
.personal-note{border-top:1px solid var(--line);margin-top:24px;padding-top:18px;min-width:0}
.personal-note h4{margin:0 0 10px;color:var(--gold-soft);font-size:12px;letter-spacing:.08em}
.personal-note label{display:block;margin-top:12px;font-size:13px;color:var(--ink)}
.personal-note textarea{display:block;box-sizing:border-box;width:100%;min-height:120px;resize:vertical;margin:8px 0;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink);font:inherit;font-size:16px;line-height:1.5}
.personal-note .note-text{margin-top:12px;color:var(--ink);font-size:16px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}
.personal-note .note-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.personal-note button{min-height:44px;padding:8px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);color:var(--gold-soft);font:inherit;cursor:pointer}
.personal-note button:disabled{opacity:.55;cursor:wait}
.personal-note :focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.personal-note .note-status,.personal-note .note-reference,.personal-note .note-count{font-size:12px;color:var(--muted);overflow-wrap:anywhere;line-height:1.5}
.personal-note .note-status{margin-top:10px;min-height:1.5em}
.personal-note .note-status[data-error="true"]{color:#FFB4BC}
.personal-note [hidden]{display:none!important}

#authDialog .auth-password{position:relative}
#authDialog .auth-password input{padding-right:54px;margin-top:0}
#authDialog .auth-password button{position:absolute;right:2px;top:2px;bottom:2px;width:44px;min-height:0;padding:8px;border:0;background:transparent;color:#8B6728;display:grid;place-items:center}
#notesDialog{width:min(620px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:24px;border:1px solid var(--line);border-radius:20px;background:var(--surface);color:var(--ink);box-shadow:var(--shadow);overflow:auto}
#notesDialog::backdrop{background:rgba(0,0,0,.72)}
#notesDialog header{display:flex;align-items:center;justify-content:space-between;gap:16px}
#notesDialog h2{margin:0;color:var(--gold-soft);font-size:22px}
#notesDialog button{min-height:44px;padding:8px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);color:var(--gold-soft);font:inherit;cursor:pointer}
#notesDialog [hidden]{display:none!important}
#notesDialog :focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.library-item{padding:20px 0;border-top:1px solid var(--line);overflow-wrap:anywhere}
.library-item>a{display:inline-block;min-height:44px;padding:10px 0;color:var(--gold-soft)}
.library-item .personal-note{border:0;margin:0;padding:0}
.library-item .personal-note h4,.library-item .note-reference{display:none}
.library-item .note-text{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.library-status{color:var(--muted);overflow-wrap:anywhere}
@media(max-width:540px){#notesDialog{margin:auto 0 0;width:100%;max-width:none;max-height:90dvh;border-radius:20px 20px 0 0;padding-bottom:calc(24px + var(--safe-bottom))}}
