:root {
  --bg: #f3f0e8;
  --paper: #fffdf8;
  --ink: #201f1c;
  --muted: #6d675f;
  --line: #ded6c8;
  --accent: #255d66;
  --accent-soft: #e7f0f1;
  --shadow: 0 18px 55px rgba(46, 38, 28, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.8;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 240, 232, 0.95);
  backdrop-filter: blur(14px);
}

.eyebrow,
.panel-kicker,
.paper-meta,
.entry-type {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 2px;
}

h1 {
  margin-bottom: 0;
  font-size: 23px;
  line-height: 1.2;
}

.view-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.menu-btn,
.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}

.menu-btn {
  gap: 4px;
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
}

.menu-backdrop,
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(29, 25, 20, 0.12);
}

.drawer {
  position: fixed;
  top: 74px;
  left: 18px;
  z-index: 30;
  display: grid;
  gap: 8px;
  width: min(280px, calc(100vw - 36px));
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.drawer-item {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 8px 12px;
  text-align: left;
  font-weight: 800;
}

.drawer-item.active,
.drawer-item:hover {
  border-color: var(--line);
  background: var(--accent-soft);
  color: var(--accent);
}

.reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 22px 120px;
}

.paper-view,
.content-view {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.paper-view {
  padding: clamp(24px, 5vw, 48px);
}

.side-panel {
  position: sticky;
  top: 86px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.side-panel-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(12px);
}

.side-panel-tabs button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
}

.side-panel-tabs button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.side-panel-body {
  padding: 16px;
}

.panel-section h2 {
  margin-bottom: 12px;
  font-size: 21px;
  line-height: 1.25;
}

.side-toc-list,
.side-glossary-list {
  display: grid;
  gap: 8px;
}

.side-toc-list .toc-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  font-size: 13px;
}

.toc-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 4px;
}

.toc-badges span {
  border: 1px solid rgba(37, 93, 102, 0.18);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
}

.reading-controls-panel {
  padding-bottom: 13px;
  margin-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.reading-progress-mini {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.reading-progress-mini span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.reading-progress-mini strong {
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
}

.reading-controls-panel p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.reading-action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.reading-action-row button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 800;
}

.reading-action-row button:hover:not(:disabled) {
  border-color: #b8c8ca;
  background: var(--accent-soft);
}

.reading-action-row button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.reading-controls-panel .bookmark-label {
  margin-top: 8px;
}

.entry-detail {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.entry-detail h2 {
  margin-bottom: 0;
  color: var(--accent);
  font-size: 26px;
  line-height: 1.2;
}

.entry-detail h4 {
  margin: 18px 0 6px;
  font-size: 15px;
}

.entry-detail p {
  margin-bottom: 0;
  color: #443f38;
  font-size: 14px;
  line-height: 1.75;
}

.entry-short {
  color: var(--muted) !important;
  font-weight: 700;
}

.entry-original {
  margin: 1px 0 8px !important;
  color: var(--muted) !important;
  font-size: 13px !important;
  font-weight: 800;
  line-height: 1.35 !important;
}

.side-glossary-row {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  text-align: left;
}

.side-glossary-row strong {
  color: var(--ink);
  font-size: 14px;
}

.side-glossary-row span {
  color: var(--muted);
  font-size: 12px;
}

.side-glossary-row.active,
.side-glossary-row:hover {
  border-color: #b8c8ca;
  background: var(--accent-soft);
}

.content-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 22px;
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.content-head h2 {
  margin-bottom: 8px;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.18;
}

.content-head p {
  color: var(--muted);
  margin-bottom: 0;
}

.reader-controls {
  display: grid;
  justify-items: end;
  flex-shrink: 0;
}

.paper-info {
  max-width: 74ch;
  padding-bottom: 24px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.paper-info h2 {
  margin-bottom: 8px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.15;
}

.paper-info > p:not(.eyebrow) {
  max-width: 58ch;
  color: var(--muted);
  margin-bottom: 16px;
}

.paper-info dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
  padding: 0;
}

.paper-info dl div {
  display: grid;
  gap: 2px;
}

.paper-info dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.paper-info dd {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.paper-toc {
  max-width: 74ch;
  padding: 18px 0 24px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.paper-toc h3 {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.toc-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}

.toc-item {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 5px 9px;
  text-align: left;
  font-size: 13px;
  line-height: 1.45;
}

.toc-item:hover {
  border-color: #b8c8ca;
  background: var(--accent-soft);
  color: var(--accent);
}

.segmented {
  display: flex;
  gap: 4px;
}

.segmented button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
}

.segmented button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.paper-text {
  display: grid;
  gap: 0.95em;
  font-size: 15.5px;
  line-height: 1.95;
}

.paper-segment {
  position: relative;
  max-width: 74ch;
  scroll-margin-top: 92px;
}

.progress-markers {
  position: absolute;
  top: 0.35em;
  right: -54px;
  display: grid;
  gap: 3px;
  min-width: 34px;
  pointer-events: none;
}

.progress-marker {
  color: rgba(109, 103, 95, 0.48);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.paper-segment h3 {
  font-size: 1.12em;
  line-height: 1.75;
  margin-bottom: 0.4em;
}

.section-heading {
  margin: 2.2em 0 0.9em;
  color: var(--muted);
  font-size: 0.92em;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.paper-segment p {
  margin-bottom: 0;
  font-weight: 430;
}

.paper-segment.parallel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  max-width: none;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.original-column,
.original-only {
  color: #4e4942;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
}

.inline-term {
  border: 0;
  border-bottom: 1px solid rgba(32, 31, 28, 0.26);
  background: transparent;
  color: inherit;
  padding: 0 0 1px;
  font-weight: inherit;
  text-decoration: none;
}

.inline-term:hover {
  border-bottom-color: rgba(37, 93, 102, 0.65);
  color: var(--accent);
  background: transparent;
}

.annotatable {
  user-select: text;
}

.reader-highlight {
  border-radius: 3px;
  padding: 0.02em 0;
  cursor: pointer;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.reader-highlight.active {
  outline: 2px solid rgba(32, 31, 28, 0.28);
  outline-offset: 2px;
}

.highlight-red {
  background: rgba(228, 92, 83, 0.25);
}

.highlight-blue {
  background: rgba(78, 142, 202, 0.25);
}

.highlight-green {
  background: rgba(95, 166, 118, 0.25);
}

.reader-selection-preview {
  border-radius: 3px;
  background: rgba(32, 31, 28, 0.14);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.reader-memo {
  position: relative;
  border-bottom: 2px solid rgba(104, 127, 132, 0.45);
  padding-bottom: 0.04em;
  cursor: pointer;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.reader-memo.active {
  outline: 2px solid rgba(32, 31, 28, 0.24);
  outline-offset: 2px;
}

.memo-marker {
  position: absolute;
  top: -0.85em;
  right: -0.65em;
  width: 13px;
  height: 13px;
  min-height: 0;
  border: 1px solid #9fb0b3;
  border-radius: 3px;
  background: #fffdf8;
  padding: 0;
  box-shadow: 0 1px 3px rgba(35, 29, 23, 0.16);
}

.memo-marker::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 5px;
  height: 5px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
}

.selection-toolbar {
  position: fixed;
  z-index: 60;
  width: max-content;
  max-width: min(280px, calc(100vw - 24px));
  transform: translate(-50%, -100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 12px 35px rgba(35, 29, 23, 0.18);
  padding: 8px;
}

.selection-toolbar p {
  max-width: 320px;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.selection-toolbar textarea,
.highlight-detail textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 9px;
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
}

.selection-actions,
.highlight-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.selection-actions button,
.highlight-detail-actions button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.selection-actions .toolbar-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}

.selection-actions .swatch-button {
  border-color: rgba(32, 31, 28, 0.14);
}

.selection-actions .swatch-button.highlight-red {
  background: #e45c53;
}

.selection-actions .swatch-button.highlight-blue {
  background: #4e8eca;
}

.selection-actions .swatch-button.highlight-green {
  background: #5fa676;
}

.selection-actions .memo-button::before {
  content: "";
  width: 14px;
  height: 16px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background:
    linear-gradient(135deg, transparent 0 50%, rgba(32, 31, 28, 0.16) 51%) top right / 8px 8px no-repeat,
    #fff;
}

.selection-actions button:hover,
.highlight-detail-actions button:hover {
  border-color: #b8c8ca;
  background: var(--accent-soft);
}

.selection-actions .swatch-button.highlight-red:hover {
  background: #d94f49;
}

.selection-actions .swatch-button.highlight-blue:hover {
  background: #427fb9;
}

.selection-actions .swatch-button.highlight-green:hover {
  background: #529765;
}

.highlight-detail-actions .danger {
  color: #9c332d;
}

.content-view {
  padding: clamp(22px, 4vw, 42px);
}

.essay-list {
  display: grid;
  gap: 18px;
}

.essay-block {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.essay-block h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.essay-block p {
  max-width: 76ch;
  margin-bottom: 1em;
  color: #443f38;
  font-size: 14px;
  line-height: 1.75;
}

.essay-block p:last-child {
  margin-bottom: 0;
}

.glossary-list {
  display: grid;
  gap: 10px;
}

.glossary-row {
  display: grid;
  grid-template-columns: 90px minmax(150px, 0.7fr) minmax(160px, 0.8fr) minmax(220px, 1.5fr);
  align-items: baseline;
  gap: 12px;
  width: 100%;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  text-align: left;
}

.glossary-row strong {
  color: var(--accent);
}

.glossary-row small {
  color: var(--muted);
  font-size: 13px;
}

.bottom-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 35;
  width: min(920px, calc(100vw - 28px));
  max-height: min(66vh, 720px);
  overflow: auto;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--paper);
  box-shadow: 0 -18px 50px rgba(35, 29, 23, 0.18);
  padding: 10px clamp(18px, 4vw, 34px) 24px;
}

.sheet-handle {
  width: 56px;
  height: 5px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: var(--line);
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.sheet-head h2 {
  margin-bottom: 4px;
  font-size: 26px;
}

.sheet-head p {
  color: var(--muted);
  margin-bottom: 0;
  font-weight: 700;
}

.sheet-body {
  max-width: 76ch;
}

.sheet-body h4 {
  margin: 20px 0 6px;
  font-size: 16px;
}

.sheet-body p {
  margin-bottom: 0;
}

.essential-works {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.essential-works span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.essential-works p {
  color: #4d4840;
  font-size: 14px;
  line-height: 1.55;
}

.work-link {
  display: inline;
  border: 0;
  border-bottom: 1px solid rgba(37, 93, 102, 0.35);
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-weight: 800;
  text-align: left;
}

.work-link:hover {
  border-bottom-color: var(--accent);
}

.note-markers {
  display: inline-flex;
  gap: 4px;
  margin-left: 0.25em;
  vertical-align: super;
  line-height: 1;
}

.note-markers button {
  min-width: 18px;
  min-height: 18px;
  border: 1px solid rgba(37, 93, 102, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent);
  padding: 0 4px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.note-markers button:hover {
  border-color: #b8c8ca;
  background: var(--accent-soft);
  color: var(--accent);
}

.source-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.source-tabs button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.source-tabs button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.source-note {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.source-detail {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.source-detail h2 {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 21px;
  line-height: 1.28;
}

.source-detail h4 {
  margin: 16px 0 5px;
  font-size: 14px;
}

.source-detail p {
  margin-bottom: 0;
  color: #443f38;
  font-size: 13.5px;
  line-height: 1.72;
}

.source-authors {
  color: var(--muted) !important;
  font-weight: 800;
}

.source-original-title {
  margin-top: -2px;
  color: var(--muted) !important;
  font-size: 13px !important;
  font-weight: 800;
  line-height: 1.45 !important;
}

.source-list {
  display: grid;
  gap: 8px;
}

.source-row {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  text-align: left;
}

.source-row strong {
  color: var(--ink);
  font-size: 13.5px;
}

.source-row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.source-row small {
  color: #7c756b;
  font-size: 11px;
  line-height: 1.35;
}

.source-row.active,
.source-row:hover {
  border-color: #b8c8ca;
  background: var(--accent-soft);
}

.empty-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.highlight-detail {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.annotation-tools {
  margin: 0 0 16px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.annotation-tool-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.annotation-tool-buttons button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

.annotation-tool-buttons button:hover:not(:disabled) {
  border-color: #b8c8ca;
  background: var(--accent-soft);
}

.annotation-tool-buttons button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.annotation-import-input {
  display: none;
}

.annotation-status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.55;
}

.highlight-detail h2 {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 21px;
  line-height: 1.25;
}

.highlight-quote {
  margin: 0 0 12px;
  border-left: 4px solid rgba(32, 31, 28, 0.22);
  border-radius: 6px;
  padding: 10px 12px;
  color: #38342f;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.65;
}

.highlight-quote.memo-quote {
  border-left-color: rgba(104, 127, 132, 0.55);
  background:
    linear-gradient(to top, rgba(104, 127, 132, 0.2) 0 24%, transparent 24% 100%),
    #fff;
}

.highlight-note-label {
  display: block;
  margin: 10px 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.highlight-detail-actions {
  margin-top: 8px;
}

.highlight-list {
  display: grid;
  gap: 8px;
}

.highlight-row {
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr);
  gap: 7px 8px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  text-align: left;
}

.highlight-row strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.highlight-row small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.highlight-row.active,
.highlight-row:hover {
  border-color: #b8c8ca;
  background: var(--accent-soft);
}

.highlight-dot {
  width: 11px;
  height: 11px;
  margin-top: 4px;
  border-radius: 999px;
  border: 1px solid rgba(32, 31, 28, 0.2);
}

.highlight-dot.highlight-red {
  background: #e45c53;
}

.highlight-dot.highlight-blue {
  background: #4e8eca;
}

.highlight-dot.highlight-green {
  background: #5fa676;
}

.highlight-dot.memo-dot {
  position: relative;
  border-radius: 3px;
  background: #fffdf8;
}

.highlight-dot.memo-dot::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 4px;
  height: 4px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
}

@media (max-width: 1120px) {
  .progress-markers {
    display: none;
  }
}

@media (max-width: 760px) {
  .app-header {
    grid-template-columns: 1fr;
    padding: 12px 14px;
  }

  .view-label {
    display: none;
  }

  .reader-layout {
    grid-template-columns: 1fr;
    padding: 14px 12px 110px;
  }

  .side-panel {
    position: static;
    max-height: none;
    order: -1;
  }

  .paper-view,
  .content-view {
    padding: 18px;
  }

  .paper-head,
  .content-head {
    display: grid;
  }

  .paper-info dl,
  .toc-list {
    grid-template-columns: 1fr;
  }

  .paper-segment.parallel,
  .glossary-row {
    grid-template-columns: 1fr;
  }

  .bottom-sheet {
    width: 100vw;
    max-height: 70vh;
  }
}
