:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--text);background:var(--page-bg);font-synthesis:none}
*{box-sizing:border-box}
body{margin:0}
html.is-editing-source{overscroll-behavior-y:contain}
.draft-recovery{max-width:1268px;margin:10px auto;padding:10px;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--text);font-size:13px}
.draft-setting{display:flex;align-items:center;gap:8px;min-height:44px}
.draft-tools{margin-top:10px}
.editor-actions{margin-top:8px}
h2.selection-heading{margin-top:18px}
.layer-edit-fields{margin-top:7px}
button,input,textarea,select{font:inherit}
button{cursor:pointer;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--text);padding:9px 12px}
button:disabled{opacity:.45;cursor:not-allowed}
button.primary{background:var(--primary);color:white;border-color:var(--primary)}
button.active{background:var(--active-bg);border-color:var(--focus)}
button.tiny{padding:5px 8px;font-size:12px}
header{position:sticky;top:0;z-index:5;background:var(--surface);border-bottom:1px solid var(--border);padding:10px 16px;display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.save-safety{margin:5px 0;padding:5px 8px;border:1px solid var(--border);border-radius:6px;font-size:12px;overflow-wrap:anywhere;max-height:26vh;overflow:auto;overscroll-behavior:contain}
.save-safety p{margin:2px 0}.save-safety button{font-size:12px;padding:4px 7px}
.save-safety[data-state="error"],.save-safety[data-state="dirty"]{border-color:#b77820;border-width:2px}
.save-limit{font-size:11px;color:var(--muted)}
.save-safety[data-state="saved"] .row,.save-safety[data-state="saved"] .save-limit{display:none}
.save-safety[data-state="saved"]{margin:1px 0;padding:0 8px;border:0}
h1{font-size:17px;margin:0}
h2{font-size:15px;margin:0 0 12px}
.muted{color:var(--muted);font-size:12px}
.layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:16px;max-width:1300px;margin:auto;padding:16px}
.panel{border:1px solid var(--border);border-radius:14px;background:var(--surface);min-width:0}
.reader{padding:22px;min-height:65vh}
.controls{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-bottom:14px}
.controls .grow{flex:1}
.document{line-height:2.05;font-size:17px;overflow-wrap:anywhere;min-height:240px;border-top:1px solid var(--border);padding:12px 2px;user-select:none;-webkit-user-select:none;touch-action:pan-y}
.document.is-selecting{touch-action:none;cursor:crosshair}
.document p{margin:0 0 1em}
.document h1{font-size:1.6em;margin:1.1em 0 .5em}
.document h2{font-size:1.3em;margin:1em 0 .5em}
.document h3{font-size:1.13em;margin:.8em 0 .45em}
.document li{margin:.2em 0}
.document blockquote{border-left:4px solid var(--border);margin:1em 0;padding:.15em 12px;background:var(--quote-bg)}
.document code{background:var(--code-bg);padding:1px 4px;border-radius:4px}
.document pre{background:var(--pre-bg);padding:12px;overflow:auto}
.document pre code{padding:0}
.document a{color:var(--link)}
.document .line{border-radius:2px}
.selection{background:#9ebdfb80;border-bottom:2px solid var(--selection-stroke)}
.mark{background:var(--layer-color);border-bottom:2px solid var(--layer-stroke);border-radius:2px}
.side{padding:16px;align-self:start;position:sticky;top:72px;max-height:calc(100vh - 90px);overflow:auto}
.group{margin-bottom:20px}
.field{display:flex;flex-direction:column;gap:6px;margin:10px 0}
.field label{font-size:12px;color:var(--muted);font-weight:600}
.field input,.field textarea,.field select{width:100%;border:1px solid var(--border);border-radius:8px;padding:9px;background:var(--input-bg);color:var(--text)}
.field textarea{resize:vertical}
.row{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.layer{border:1px solid var(--border);border-radius:10px;padding:9px;margin:8px 0}
.layer-top{display:flex;align-items:center;gap:6px}
.layer-name{flex:1;min-width:0;overflow-wrap:anywhere;font-size:14px}
.swatch{width:15px;height:15px;border-radius:4px;border:1px solid #0002;display:inline-block;flex-shrink:0}
.note{border:1px solid var(--border);border-radius:8px;padding:8px;margin-top:7px;font-size:12px}
.excerpt{font-size:13px;margin:5px 0}
.inlinehelp{background:var(--help-bg);border-radius:9px;padding:10px;font-size:13px;line-height:1.65}
.notice{min-height:20px;color:var(--notice-text);font-size:12px;margin-top:6px}
.mobile-toggle{display:none}
#editorArea{display:none;border-top:1px solid var(--border);margin-top:15px;padding-top:14px}
#editorArea.visible{display:block}
#source{width:100%;height:210px;font:14px/1.5 ui-monospace,monospace;border:1px solid var(--border);border-radius:8px;padding:10px}
#selectionDetail{font-size:13px;line-height:1.65;max-height:120px;overflow:auto;background:var(--soft-bg);border-radius:8px;padding:9px}
.foot{font-size:12px;color:var(--muted);line-height:1.5}
.shortcut{font-size:11px;color:var(--muted)}
 @media(max-width:830px){.layout{display:block;padding:9px}
.reader{padding:15px;min-height:45vh}
.side{position:static;max-height:none;margin-top:12px}
.document{font-size:17px}
.mobile-toggle{display:inline-flex}
}


/* v0.2: 本文の選択方式を維持し、操作だけを画面下部に配置する。 */
:root { --toolbar-height: 0px; }
[hidden] { display: none !important; }
html { scroll-padding-top: 100px; scroll-padding-bottom: calc(var(--toolbar-height) + 16px); }
button, select, input[type=color] { touch-action: manipulation; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.controls { display: block; background: var(--surface); }
.mode-actions, .save-options { display: flex; align-items: center; gap: 8px; }
.save-options { margin-top: 8px; flex-wrap: wrap; }
.save-options label { display: flex; align-items: center; gap: 5px; font-size: 13px; white-space: nowrap; }
.layer-picker { flex: 1; min-width: 0; }
.layer-picker select { min-width: 0; width: 100%; max-width: 320px; }
select { border: 1px solid var(--border); border-radius: 8px; padding: 8px; background: var(--surface); color: var(--text); }
input[type=color] { width: 42px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
.layer-name-input { width: 125px; max-width: 100%; padding: 6px; border: 1px solid var(--border); border-radius: 6px; }
.mark, [data-mark-ids] { cursor: pointer; }
.document { -webkit-touch-callout: none; }
.note .foot, .excerpt { white-space: pre-wrap; overflow-wrap: anywhere; }
.mark-details { position: fixed; z-index: 20; right: 18px; bottom: 18px; width: 365px; max-width: calc(100vw - 24px); max-height: min(70dvh, 580px); overflow: auto; overscroll-behavior: contain; padding: 14px; box-shadow: 0 5px 28px #18212e30; }
.detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.detail-heading h2 { margin: 0; }
.mark-details .excerpt { max-height: 5em; overflow: auto; padding: 6px; background: var(--page-bg); }
.mark-details select { max-width: 200px; }
.mark-details textarea { min-height: 70px; }
#overlapChoices:not(:empty) { margin-top: 10px; }
#readingToolbar .notice { overflow-wrap: anywhere; }
@media (max-width: 830px) {
  html { scroll-padding-top: 12px; }
  body { padding-bottom: calc(var(--toolbar-height) + 16px); }
  header { position: static; padding: 12px; }
  header .row { gap: 6px; }
  header button { font-size: 13px; }
  .controls {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    margin: 0; padding: 8px max(10px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    border-top: 1px solid var(--border); box-shadow: 0 -3px 14px #18212e15;
  }
  .mode-actions { display: grid; grid-template-columns: 1fr 1fr 1.5fr 1.1fr; gap: 6px; }
  .mode-actions button { min-height: 44px; padding: 8px 4px; font-size: 14px; white-space: nowrap; }
  .save-options { flex-wrap: nowrap; gap: 7px; margin-top: 6px; }
  .save-options select { min-height: 44px; max-width: none; }
  .color-picker input { width: 38px; height: 44px; }
  #selectionSummary { max-width: 90px; white-space: nowrap; font-size: 11px; }
  #readingToolbar .notice { margin-top: 4px; line-height: 1.4; min-height: 17px; font-size: 11px; }
  .mark-details { left: 9px; right: 9px; bottom: calc(var(--toolbar-height) + 8px); width: auto; max-width: none; max-height: min(45dvh, 390px); padding: 12px; }
  .mark-details button, .side button { min-height: 44px; }
  .mark-details select { max-width: 170px; }
  .side { overflow: visible; }
}
@media (max-width: 360px) {
  .save-options label { font-size: 11px; }
  #selectionSummary { max-width: 72px; }
  .mode-actions button { font-size: 12px; }
}

/* 選択の表示面は本文と分離し、文字の折返しや入力対象を変えない。 */
.reader { position: relative; }
.selection-overlay { position: absolute; inset: 0; z-index: 1; pointer-events: none; user-select: none; overflow: hidden; }
.selection-rect { position: absolute; background: var(--selection-bg); border-bottom: 2px solid var(--selection-stroke); pointer-events: none; }
.selection-adjust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 6px; }
.selection-adjust > div { display: flex; align-items: center; gap: 6px; }
.selection-adjust span { font-size: 13px; }
.selection-adjust button { min-width: 44px; min-height: 44px; padding: 6px 10px; }
@media (max-width: 830px) {
  .selection-adjust { justify-content: space-between; gap: 8px; }
}

/* 表示設定はCSSの変数で反映し、本文の文字やマークの位置は変更しない。 */
:root {
  color-scheme: light;
  --reader-font-size: 17px;
  --reader-line-height: 2.05;
  --paragraph-gap: 1em;
  --document-width: 100%;
  --page-bg: #f4f6fa;
  --surface: #ffffff;
  --input-bg: #ffffff;
  --text: #18212e;
  --muted: #5b6473;
  --border: #cbd3e0;
  --primary: #244fd6;
  --active-bg: #dbe6ff;
  --focus: #456ddd;
  --notice-text: #3e536f;
  --link: #2456cb;
  --quote-bg: #f5f7fc;
  --code-bg: #eef1f5;
  --pre-bg: #f3f5f9;
  --help-bg: #eef4ff;
  --soft-bg: #f2f5fb;
  --selection-bg: #9ebdfb80;
  --selection-stroke: #2458bf;
}
:root[data-theme="cream"] {
  --page-bg: #f0eadd;
  --surface: #fbf5e8;
  --input-bg: #fffcf4;
  --text: #30291e;
  --muted: #675e4f;
  --border: #c8bda9;
  --active-bg: #e2e7ee;
  --notice-text: #514b41;
  --quote-bg: #eee6d5;
  --code-bg: #eee6d5;
  --pre-bg: #eee6d5;
  --help-bg: #eee9de;
  --soft-bg: #eee9de;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #121923;
  --surface: #1d2735;
  --input-bg: #18222f;
  --text: #edf1f7;
  --muted: #b7c2d2;
  --border: #506078;
  --primary: #405ed8;
  --active-bg: #314e7a;
  --focus: #97baff;
  --notice-text: #c2d4ef;
  --link: #a5c4ff;
  --quote-bg: #273449;
  --code-bg: #29384a;
  --pre-bg: #273449;
  --help-bg: #273449;
  --soft-bg: #273449;
  --selection-bg: #5b94ed55;
  --selection-stroke: #a5c4ff;
}
.document { font-size: var(--reader-font-size); line-height: var(--reader-line-height); }
.document p { margin-bottom: var(--paragraph-gap); }
@media (min-width: 831px) {
  .document { max-width: var(--document-width); margin-inline: auto; }
}
:root[data-theme="dark"] .mark { color: #101724; }
.display-settings {
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  margin: auto; padding: 0; overflow: auto; overscroll-behavior: contain;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); color: var(--text); box-shadow: 0 8px 40px #0004;
}
.display-settings::backdrop { background: #0006; }
.settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; position: sticky; top: 0; z-index: 1; background: var(--surface); border-bottom: 1px solid var(--border); }
.settings-heading h2 { margin: 0; }
.settings-body { padding: 0 16px 10px; }
.display-settings .field { margin: 14px 0; }
.display-settings .field label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.display-settings output { font-variant-numeric: tabular-nums; color: var(--text); }
.display-settings input[type="range"] { padding: 0; min-height: 44px; accent-color: var(--primary); background: transparent; border: 0; cursor: pointer; }
.display-settings select, .display-settings button { min-height: 44px; }
.range-limits { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }

/* 簡易レイヤー一覧は本文を動かさず、下部バーの上に重ねる。 */
.quick-layers {
  position: fixed; z-index: 22; right: 18px; bottom: 18px;
  width: min(360px, calc(100vw - 24px)); max-height: min(45dvh, 420px);
  display: flex; flex-direction: column; gap: 6px; padding: 10px;
  box-shadow: 0 5px 28px #0003; color: var(--text);
}
.quick-layers-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-shrink: 0; }
.quick-layers-heading h2 { margin: 0; font-size: 15px; line-height: 1.4; }
.quick-layers-heading .muted { font-size: 11px; font-weight: normal; white-space: nowrap; }
.quick-layers-actions { display: flex; gap: 6px; flex-shrink: 0; }
.quick-layers-actions button { flex: 1; }
.quick-layers button { min-height: 44px; font-size: 14px; }
.quick-layers-list { list-style: none; padding: 0; margin: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; scrollbar-gutter: stable; }
.quick-layers-list li + li { margin-top: 6px; }
.quick-layer-toggle { display: flex; width: 100%; align-items: center; gap: 7px; text-align: left; padding: 8px; }
.quick-layer-toggle[aria-pressed="true"] { background: var(--soft-bg); border-color: var(--focus); }
.quick-layer-name { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.4; }
.quick-layer-visibility { font-size: 12px; color: var(--muted); white-space: nowrap; }
#quickLayersStatus, #quickLayersEmpty { margin: 0; overflow-wrap: anywhere; }
#quickLayersStatus:empty { display: none; }
#clearSelection { white-space: nowrap; }
@media (max-width: 830px) {
  .quick-layers {
    left: max(9px, env(safe-area-inset-left)); right: max(9px, env(safe-area-inset-right));
    bottom: calc(var(--toolbar-height) + 8px); width: auto;
    max-height: min(40dvh, 360px, calc(100dvh - var(--toolbar-height) - 20px));
  }
  #clearSelection { min-height: 44px; padding-inline: 8px; }
}
@media (max-width: 830px) and (max-height: 500px) {
  .quick-layers { max-height: min(55dvh, calc(100dvh - var(--toolbar-height) - 20px)); }
}
@media (max-width: 360px) { #selectionSummary { display: none; } }

.layer-management-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.layer-management-heading h2 { margin: 0; }
@media (max-width: 830px) { #quickLayersSideBtn { display: none; } }

/* 関係は本文を書き換えず、IDを参照する一覧で操作する。 */
.relations-dialog { width:min(600px,calc(100vw - 20px)); max-height:calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding:0; border:1px solid var(--border); border-radius:14px; background:var(--surface); color:var(--text); overflow:auto; overscroll-behavior:contain; }
.relations-dialog::backdrop { background:#0006; }
.relations-body { padding:0 14px 14px; }
.relations-dialog h3 { font-size:14px; margin:12px 0 6px; }
.relations-dialog button { min-height:44px; }
.relation-list { list-style:none; padding:0; margin:0; }
.relation-list li { padding:10px; border:1px solid var(--border); border-radius:9px; margin:8px 0; overflow-wrap:anywhere; }
.relation-list strong { white-space:pre-wrap; }
.relation-quote { font-size:13px; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; background:var(--soft-bg); padding:8px; border-radius:6px; margin:6px 0; }
.relation-candidates { max-height:24dvh; overflow:auto; overscroll-behavior:contain; }
.relation-candidate { display:flex; align-items:flex-start; gap:8px; padding:9px 5px; min-height:44px; border-bottom:1px solid var(--border); cursor:pointer; font-size:13px; overflow-wrap:anywhere; }
.relation-candidate input { flex-shrink:0; margin-top:5px; }
.relation-candidate span { min-width:0; white-space:pre-wrap; }
.relation-check { display:flex; align-items:center; gap:6px; min-height:44px; font-size:13px; }
.relations-dialog fieldset { border:1px solid var(--border); border-radius:8px; padding:6px; min-width:0; }
.relations-dialog legend { font-size:13px; }
.detail-relations { border-top:1px solid var(--border); padding-top:10px; margin-top:10px; display:flex; flex-wrap:wrap; gap:6px; }
.detail-relations button { min-height:44px; }
.detail-relations p { margin:0; width:100%; }

/* 本文に文字・幅を追加しない関連アイコンと、独立した引用カード。 */
.relation-icons { position:absolute; inset:0; pointer-events:none; z-index:2; }
.relation-icon { position:absolute; width:24px; height:44px; min-width:24px; padding:2px 0; border-radius:7px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; pointer-events:auto; font-size:14px; line-height:1; box-shadow:0 1px 4px #0002; }
.relation-icon small { font-size:10px; line-height:1.1; }
.relation-card { position:fixed; z-index:21; right:18px; bottom:max(18px,env(safe-area-inset-bottom)); width:min(370px,calc(100vw - 24px)); max-height:min(65dvh,560px); display:flex; flex-direction:column; box-shadow:0 5px 28px #0003; }
.relation-card-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px 12px; border-bottom:1px solid var(--border); }
.relation-card-heading h2 { margin:0; }
.relation-card-body { min-height:0; overflow:auto; overscroll-behavior:contain; padding:0 12px 12px; }
.relation-card button { min-height:44px; }
.relation-card select { width:100%; min-width:0; min-height:44px; }
.relation-card h3 { font-size:13px; margin:10px 0 5px; overflow-wrap:anywhere; white-space:pre-wrap; }
.relation-card blockquote { margin:0; padding:7px; background:var(--soft-bg); border-left:3px solid var(--focus); font-size:13px; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; max-height:7em; overflow:auto; overscroll-behavior:contain; }
.relation-card .foot { margin:5px 0; overflow-wrap:anywhere; }
.relation-jump-target { outline:2px solid var(--focus); outline-offset:2px; }
@media(max-width:830px) {
 .relation-card { left:max(9px,env(safe-area-inset-left)); right:max(9px,env(safe-area-inset-right)); bottom:calc(var(--toolbar-height) + 8px); width:auto; max-height:min(38dvh,350px,calc(100dvh - var(--toolbar-height) - 24px)); }
}
@media(max-width:830px) and (max-height:500px) {
 .relation-card { max-height:min(52dvh,calc(100dvh - var(--toolbar-height) - 24px)); }
}

/* PCの既存の余白だけを使う。本文の幅・文字要素は変更しない。 */
.relation-line-options { display:flex; align-items:center; gap:10px; margin-top:8px; min-width:0; }
.relation-line-options button { width:132px; min-height:44px; flex-shrink:0; }
#relationLinesStatus { min-width:0; height:1.5em; line-height:1.5; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.relation-lines { position:absolute; inset:0; width:100%; height:100%; overflow:hidden; pointer-events:none; z-index:2; }
.relation-line-stroke { fill:none; stroke:var(--focus); stroke-width:2; stroke-linecap:round; stroke-linejoin:round; pointer-events:none; }
.relation-line-hit { fill:none; stroke:transparent; stroke-width:12; cursor:pointer; pointer-events:stroke; outline:none; }
.relation-line-label { fill:var(--text); font-size:10px; pointer-events:none; }
.relation-line-group:focus-within .relation-line-stroke, .relation-line-group[data-active="true"] .relation-line-stroke { stroke:var(--focus); stroke-width:4; }
.relation-line-group:hover .relation-line-stroke { stroke-width:4; }
@media(max-width:830px) { .relation-line-options, .relation-lines { display:none!important; } }


/* PC: 同じ操作要素をページ全体のstickyバーへ。スマホの下部バーは従来どおり。 */
:root { --desktop-toolbar-height: 0px; }
@media not all and (max-width:830px) {
  header { position:static; }
  html { scroll-padding-top:calc(var(--desktop-toolbar-height) + 12px); }
  #readingToolbar {
    position:sticky; top:0; z-index:10; width:calc(100% - 32px); max-width:1268px;
    margin:0 auto; padding:7px 12px; border:1px solid var(--border); border-radius:10px;
    box-shadow:0 3px 12px #18212e15;
  }
  #readingToolbar .mode-actions { flex-wrap:wrap; gap:6px; }
  #readingToolbar .mode-actions button { min-height:34px; padding:5px 10px; font-size:14px; white-space:nowrap; }
  #readingToolbar .relation-line-options { margin:0; }
  #readingToolbar .relation-line-options button { width:auto; }
  #readingToolbar .save-options { margin-top:5px; gap:8px; min-width:0; }
  #readingToolbar .save-options select { min-height:28px; padding:3px 8px; }
  #readingToolbar .save-options input[type=color] { height:28px; }
  #readingToolbar #relationLinesStatus { flex:1; min-width:0; max-width:440px; }
  #readingToolbar .notice { margin-top:3px; min-height:17px; line-height:1.4; }
  #readingToolbar .notice:empty { display:none; }
  #readingToolbar .selection-adjust { gap:6px 16px; margin-top:5px; }
  #readingToolbar .selection-adjust button { min-height:32px; min-width:36px; }
  .side { top:calc(var(--desktop-toolbar-height) + 12px); max-height:calc(100dvh - var(--desktop-toolbar-height) - 24px); }
  .quick-layers, .mark-details, .relation-card { max-height:min(60dvh,560px,calc(100dvh - var(--desktop-toolbar-height) - 36px)); }
}
@media (max-width:830px) { #relationLinesStatus { display:none; } }

/* PCのみ折りたたむ。同じ操作要素を残し、スマホでは従来の内容を表示する。 */
.toolbar-collapse-strip { display:none; }
@media not all and (max-width:830px) {
  .toolbar-collapse-strip { position:absolute; right:12px; top:7px; display:flex; align-items:center; gap:8px; min-height:34px; }
  #toolbarMode { font-size:12px; white-space:nowrap; }
  #toggleToolbar { min-height:34px; padding:5px 10px; font-size:14px; white-space:nowrap; }
  #toolbarContents .mode-actions { padding-right:220px; }
  #readingToolbar.is-collapsed { padding:4px 12px; }
  #readingToolbar.is-collapsed .toolbar-collapse-strip { position:static; justify-content:flex-end; }
  #readingToolbar.is-collapsed #toolbarContents { display:none; }
  #readingToolbar.is-collapsed .save-safety[data-state="saved"] { position:absolute;left:12px;right:240px;top:4px;margin:0;padding:0;max-height:34px;overflow:hidden; }
  #readingToolbar.is-collapsed .save-safety[data-state="saved"] p { margin:7px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
}
