/* web/src/components/NotebookDirectory.css */
body.notebook-directory-open {
  overflow: hidden;
}
.notebook-vocab-page > .vb-hero,
.notebook-vocab-page > .vb-mode-switch {
  display: none;
}
.notebook-directory-page {
  --nb-accent:var(--gold-deep,#96632a);
  --nb-line:var(--line,#e8d7c1);
  --nb-ink:var(--fg,#3b2a1d);
  --nb-paper:var(--bg,#fbf5ec);
  --nb-card:var(--card,#fffdf9);
  --nb-muted:var(--muted,#8a6f57);
  --nb-context:var(--card2,var(--bg2,#f7eddf));
  --nb-highlight:var(--gold-soft,#f5ead9);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 8px;
  color: var(--nb-ink);
  background: var(--nb-paper);
  border: 1px solid var(--nb-line);
  border-radius: 12px;
  overflow: hidden;
}
.notebook-vocab-page .notebook-directory-page {
  --nb-accent:var(--pink-deep,#d6336c);
  --nb-highlight:var(--pink-verysoft,#ffe4ec);
}
.notebook-directory-page * {
  box-sizing: border-box;
}
.notebook-directory-page button {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--nb-line);
  border-radius: 10px;
  color: var(--nb-accent);
  background: var(--nb-card);
  min-height: 44px;
  padding: 8px 12px;
}
.notebook-directory-page button:disabled {
  opacity: .4;
  cursor: default;
}
.notebook-directory-page button:focus-visible,
.notebook-directory-page input:focus-visible,
.notebook-word-scroll:focus-visible {
  outline: 2px solid var(--nb-accent);
  outline-offset: -2px;
}
.notebook-directory-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--nb-line);
}
.notebook-directory-title h1 {
  margin: 0;
  font-size: 24px;
}
.notebook-directory-title > span {
  font-size: 14px;
}
.notebook-directory-tools {
  padding: 12px 20px;
  border-bottom: 1px solid var(--nb-line);
}
.notebook-directory-tools input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--nb-line);
  border-radius: 10px;
  font: inherit;
  background: var(--nb-card);
  color: var(--nb-ink);
}
.notebook-directory-page button[aria-pressed=true] {
  color: white;
  background: var(--nb-accent);
  border-color: var(--nb-accent);
}
.notebook-directory-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.notebook-chapters {
  width: 160px;
  flex: none;
  overflow-y: auto;
  border-right: 1px solid var(--nb-line);
  padding: 10px 8px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.notebook-chapters button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  margin-bottom: 8px;
  min-height: 65px;
  gap: 4px;
  font-size: 17px;
  border-color: transparent;
  background: transparent;
}
.notebook-chapters span {
  font-size: 13px;
  font-weight: 400;
}
.notebook-chapters[hidden] {
  display: none;
}
.notebook-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.notebook-section-title .notebook-chapter-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: none;
  min-height: 36px;
  padding: 5px 7px;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}
.notebook-chapter-toggle svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.notebook-results {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.notebook-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 18px;
  flex: none;
}
.notebook-section-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.notebook-section-head small {
  font-size: inherit;
  font-weight: 400;
  white-space: nowrap;
}
.notebook-repeat-actions {
  display: flex;
  gap: 5px;
  flex: none;
}
.notebook-repeat-actions button {
  padding: 6px 12px;
  white-space: nowrap;
  border-color: var(--nb-accent);
}
.notebook-repeat-status {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  padding: 0 18px 8px;
  overflow-wrap: anywhere;
}
.notebook-repeat-status button {
  min-height: 32px;
  padding: 3px 8px;
}
.notebook-word-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  padding: 0 18px 18px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.notebook-word-scroll,
.notebook-chapters {
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-y pinch-zoom;
}
.notebook-word-scroll::-webkit-scrollbar,
.notebook-chapters::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.notebook-entry {
  padding: 18px;
  margin-bottom: 12px;
  border: 1px solid var(--nb-line);
  border-radius: 10px;
  background: var(--nb-card);
  overflow-wrap: anywhere;
}
.notebook-entry > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.notebook-entry-word {
  min-width: 0;
}
.notebook-entry h3 {
  font-size: 29px;
  line-height: 1.2;
  margin: 0 0 4px;
  font-family: Arial, sans-serif;
}
.notebook-entry-word > span {
  color: var(--nb-muted);
  font-size: 17px;
}
.notebook-pronunciation {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.notebook-pronunciation button {
  font-size: 14px;
  padding: 6px 10px;
}
.notebook-pronunciation .notebook-saved {
  font-size: 23px;
  line-height: 1;
  padding: 6px 10px;
}
.notebook-pronunciation button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.notebook-pronunciation .word-audio-icon {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.notebook-entry-meaning {
  margin: 14px 0;
  font-size: 16px;
  line-height: 1.8;
  font-weight: 400;
}
.notebook-entry-context {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--nb-line);
  border-radius: 8px;
  background: var(--nb-context);
  font-size: 16px;
  line-height: 1.8;
  color: var(--nb-ink);
}
.notebook-entry-context > b {
  display: block;
  font-size: 14px;
  color: var(--nb-accent);
}
.notebook-entry-context > p {
  margin: 4px 0 0;
  white-space: pre-wrap;
}
.notebook-entry-context mark {
  color: var(--nb-accent);
  background: var(--nb-highlight);
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.notebook-entry-state {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  margin-top: 10px;
}
.notebook-entry-state button {
  font-size: 12px;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
  max-width: 92px;
  min-height: 34px;
  padding: 5px 8px;
  white-space: nowrap;
}
.notebook-entry-state .notebook-remove {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.notebook-remove svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.notebook-entry-errors {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--nb-muted);
}
.notebook-entry-source {
  display: block;
  margin-bottom: 9px;
  color: var(--nb-accent);
}
.notebook-directory-empty {
  padding: 30px 10px;
  font-size: 14px;
  line-height: 1.8;
}
.notebook-directory-empty h3 {
  font-size: 18px;
}
@media (max-width:600px) {
  .notebook-directory-title {
    padding: 10px 12px;
  }
  .notebook-directory-title h1 {
    font-size: 21px;
  }
  .notebook-directory-tools {
    padding: 10px;
  }
  .notebook-chapters {
    width: 76px;
    padding: 8px 4px;
  }
  .notebook-chapters button {
    padding: 8px 6px;
    font-size: 14px;
    min-height: 64px;
  }
  .notebook-chapters span {
    font-size: 12px;
  }
  .notebook-section-head {
    padding: 8px 8px;
    gap: 4px;
  }
  .notebook-section-head h2 {
    font-size: 16px;
  }
  .notebook-section-head small {
    font-size: 13px;
  }
  .notebook-repeat-actions button {
    font-size: 13px;
    padding: 5px 7px;
  }
  .notebook-word-scroll {
    padding: 0 8px 10px;
  }
  .notebook-entry {
    padding: 12px 10px;
  }
  .notebook-entry h3 {
    font-size: 25px;
  }
  .notebook-entry-word > span {
    font-size: 16px;
  }
  .notebook-entry > header {
    gap: 9px;
  }
  .notebook-pronunciation {
    gap: 5px;
  }
  .notebook-pronunciation button {
    font-size: 13px;
    padding: 5px 8px;
  }
  .notebook-entry-meaning {
    font-size: 15px;
    line-height: 1.75;
    margin: 12px 0;
  }
  .notebook-entry-context {
    font-size: 15px;
    padding: 10px;
    line-height: 1.75;
  }
  .notebook-entry-state {
    gap: 4px;
  }
  .notebook-entry-state button {
    font-size: 12px;
    padding: 5px 4px;
  }
  .notebook-repeat-status {
    padding: 0 8px 8px;
    font-size: 12px;
  }
}
body.notebook-directory-open .app {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
body.notebook-directory-open .course-topbar {
  top: 0 !important;
  min-height: 52px !important;
  height: 52px !important;
  margin: 0 !important;
  padding: 4px 0 !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
}
body.notebook-directory-open .course-topbar .topbar-tools {
  display: none !important;
}
body.notebook-directory-open .course-topbar .course-back-button {
  position: relative;
  z-index: 42;
  max-width: 135px;
  min-height: 44px;
  font-size: 14px !important;
  gap: 6px;
}
body.notebook-directory-open .course-topbar .course-back-title-full {
  display: none !important;
}
body.notebook-directory-open .course-topbar .course-back-title-short {
  display: inline !important;
  white-space: nowrap;
}
.notebook-directory-title {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  padding: 0 14px;
  z-index: 41;
  pointer-events: none;
  border: 0;
  background: transparent;
}
.notebook-directory-title h1 {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  white-space: nowrap;
}
.notebook-directory-title > span {
  margin-left: auto;
  font-size: 13px;
  white-space: nowrap;
}
.notebook-directory-page {
  margin-top: 0;
}
.notebook-directory-tools {
  padding: 8px 10px;
}
@media (max-width:767px) {
  .notebook-entry > header {
    flex-direction: column;
    align-items: flex-start;
  }
}
