/* Explanation tab: annotated story and note card; settings dialog sections. */
/* explanation: annotated story */
.seg-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); margin-bottom: 12px; }
.seg-switch button { border: 0; background: none; padding: 5px 14px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.seg-switch button.on { background: var(--accent); color: #fff; }
.notes-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.notes-legend { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.notes-story .ns { border-radius: 4px; }
.ns.has-notes { text-decoration: underline dotted var(--muted); text-underline-offset: 5px; cursor: pointer; }
.ns.has-notes:hover { background: var(--bg); }
.ns.sel { background: var(--active); }
.gm { background: none; color: inherit; border-bottom: 2px solid var(--accent); cursor: pointer; padding: 0 1px; }
.gm:hover, .gm.sel { background: var(--accent-soft); }
.gm sup { color: var(--accent); font-size: 10px; font-weight: 700; margin-left: 1px; }
.note-card { position: sticky; top: 130px; max-height: calc(100vh - 150px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; font-size: 14.5px; }
.note-card .empty { color: var(--muted); }
.note-card h3 { margin: 0 0 4px; font-size: 19px; }
.note-card h4 { margin: 16px 0 6px; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .3px; }
.note-card .def { margin: 4px 0; }
.note-card .ex { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.note-card .quote { border-left: 3px solid var(--line); padding: 2px 0 2px 10px; margin: 6px 0; }
.note-card .host p { margin: 0 0 8px; line-height: 1.6; }
.note-card .host mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 2px; }
.note-card .close { float: right; }
.note-card .chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.note-card .chip { border: 1px solid var(--accent); color: var(--accent); background: none; border-radius: 999px; padding: 2px 10px; font-size: 13px; cursor: pointer; }
.note-card .gr p { margin: 0 0 8px; }
.note-card .gr .pt { margin: 0 0 10px; }
.note-card .gr .pt b { display: block; }
.note-card .meta { font-size: 12px; color: var(--muted); }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 6px 0; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.settings-block { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.settings-block h3 { margin: 0 0 4px; font-size: 15px; }
.settings-block .dialog-actions { align-items: center; justify-content: space-between; }
dialog select { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
dialog { max-height: 90vh; overflow-y: auto; }

@media (max-width: 1000px) {
  .notes-layout { grid-template-columns: minmax(0, 1fr); }
  .note-card { position: fixed; left: 8px; right: 8px; bottom: 8px; top: auto; max-height: 62vh; z-index: 20;
    box-shadow: 0 -6px 24px rgba(0,0,0,.18); }
  .note-card:has(.empty) { display: none; }
}

.refline { font-size: 13px; color: var(--muted); margin-top: 4px; display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: baseline; }
.refline b { color: var(--ink); }
.refline .refparts { display: inline-flex; gap: 10px; }
.refline .vs { font-style: normal; color: var(--muted); }

/* account section of the settings dialog */
.pw-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.pw-form input { flex: 1 1 130px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); width: auto; display: inline-block; margin: 0; }
.user-list { display: grid; gap: 6px; margin: 8px 0; }
.user-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.user-row .who { flex: 1; } .user-row .tag { font-size: 12px; color: var(--accent); margin-left: 6px; }
