/* Shared notebook layout contract. Keep the approved paper, gold and navy artwork. */
html body .exercise-lexicon > header {
  flex: 0 0 auto;
  height: auto;
  min-height: 32px;
  padding-block: 3px;
  gap: 8px;
  align-items: center;
}
html body .exercise-lexicon > header > div {
  min-width: 0;
  gap: 3px;
}
html body .exercise-lexicon > header small,
html body .exercise-lexicon > header strong {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.15;
}
html body .exercise-lexicon > header button {
  height: auto;
  min-height: 26px;
  padding: 4px 9px;
  white-space: nowrap;
}
html body .exercise-lexicon {
  display: flex;
  flex-direction: column;
  min-height: 106px;
}
html body .exercise-lexicon:not(.is-expanded) .lexicon-preview {
  flex: 0 0 auto;
  grid-auto-rows: minmax(40px, auto);
  grid-template-rows: none;
  margin-top: 7px;
  gap: 5px;
}
html body .exercise-lexicon:not(.is-expanded) .lexicon-card--preview {
  height: auto;
  min-height: 40px;
  padding-block: 4px;
}
html body .exercise-lexicon.is-narrow-summary:not(.is-expanded) {
  height: auto;
  min-height: 140px;
}
html body .lexicon-card :is(.lexicon-card__pt,.lexicon-card__en,.lexicon-card__example) {
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 0;
  max-width: 100%;
}
html body .exercise-lexicon.is-expanded .lexicon-expanded-content {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}
html body .exercise-lexicon.is-expanded {
  max-height: calc(100% - 32px);
  min-height: 0;
}
/* The vocabulary never leaves the paper. The page is the containing block;
   only the entries scroll, not the panel, its header or the book itself. */
html body .eac-book01 .book01-lexicon.is-expanded {
  position: absolute;
  inset: 4% 4% 5%;
  width: auto;
  height: auto;
  max-height: none;
  min-height: 0;
  margin: 0;
}
html body .book01-question-page > .page-content:has(> .exercise-lexicon.is-expanded) {
  overflow: hidden;
}
html body .exercise-lexicon.is-expanded .lexicon-entry-grid {
  grid-auto-rows: minmax(min-content, auto);
  overflow-y: auto;
}
html body .exercise-lexicon.is-expanded .lexicon-card--expanded {
  min-height: 84px;
  height: auto;
  padding-block: 8px;
}
/* Narrative pages already have an approved single-line, collapsed trigger. */
html body .exercise-page--capacity-managed .exercise-lexicon:not(.is-expanded) > header {
  height: 100%;
  min-height: 0;
  padding: 0;
}
html body .exercise-page--capacity-managed .exercise-lexicon:not(.is-expanded) > header button {
  min-height: 20px;
  padding-block: 2px;
}
/* Reserve the pocket inside the paper. Dense questions scroll in their own
   list, keeping all four vocabulary cards visible and every prompt reachable. */
html body .eac-book01 .book01-question-page > .page-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  scrollbar-width: thin;
  scrollbar-color: #b69a5e transparent;
}
html body .eac-book01 .book01-question-page .page-heading-row,
html body .eac-book01 .book01-question-page .book01-verb-line,
html body .eac-book01 .book01-question-page .instruction { flex: 0 0 auto; }
html body .eac-book01 .book01-question-page .statement-photo { flex: 0 1 auto; min-height: 54px; }
html body .eac-book01 .book01-question-page .book01-prompts {
  flex: 1 1 auto;
  min-height: 36px;
  overflow-y: auto;
  overflow-x: hidden;
  margin-block: 4px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(153,106,42,.42) transparent;
}
html body .eac-book01 .book01-lexicon:not(.is-expanded) {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  width: 100%;
  height: auto;
  margin-top: 6px;
  padding: 7px;
}
/* One launcher geometry on every notebook, including 1280px screens.
   Visibility, unread badges and full-screen behavior remain owned by the shell. */
@media (min-width: 601px) {
  html[data-eac-notebook-active].eac-has-system-chrome body #eac-system-chrome > .eac-concierge {
    box-sizing: border-box !important;
    position: fixed !important;
    inset: auto max(12px,env(safe-area-inset-right,0px)) max(10px,env(safe-area-inset-bottom,0px)) auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    transform: none !important;
    border: 1px solid #c78e2f !important;
    color: #ddb25c !important;
    background: radial-gradient(ellipse 82% 105% at 32% -18%,rgba(54,88,111,.43),transparent 58%),linear-gradient(180deg,#0a2134 0%,#031522 52%,#020d18 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255,235,176,.34),inset 0 -12px 20px rgba(0,4,9,.25),inset 0 0 0 1px rgba(18,45,65,.68),0 12px 22px rgba(60,42,15,.16),0 3px 7px rgba(2,12,21,.23) !important;
    cursor: pointer;
  }
  html[data-eac-notebook-active].eac-has-system-chrome body #eac-system-chrome > .eac-concierge > span:not(.ef-launcher-badge) {
    color: #ddb25c !important;
    flex: none !important;
    margin: 0 !important;
    font-weight: 600 !important;
  }
  html[data-eac-notebook-active] body :is(.eac-concierge,.eac-global-concierge,.eac-bookwheel__concierge,.eac-pronunciation__concierge,.assessment-support,.ef-launcher) {
    box-sizing: border-box !important;
    width: min(196px, 10.208333333vw, 18.148148148vh) !important;
    height: max(44px, min(56px, 2.916666667vw, 5.185185185vh)) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    padding: 1px 8px !important;
    gap: 7px !important;
    border-radius: 28px !important;
  }
  html[data-eac-notebook-active] body :is(.eac-concierge,.eac-global-concierge,.eac-bookwheel__concierge,.eac-pronunciation__concierge,.assessment-support,.ef-launcher) > span:not(.ef-launcher-badge) {
    font-size: min(18px,.9375vw,1.666666667vh) !important;
    line-height: 1 !important;
    font-family: 'Cormorant Garamond', Cormorant, 'EAC Concierge', Georgia, serif !important;
    white-space: nowrap !important;
  }
  html[data-eac-notebook-active] body .eac-concierge > svg:not(.concierge-arrow) { width: min(24px,1.25vw,2.222222222vh) !important; height: min(24px,1.25vw,2.222222222vh) !important; flex-shrink: 0 !important; }
  html.eac-workbook-active body #eac-system-chrome > .eac-concierge {
    inset: auto max(12px, env(safe-area-inset-right,0px)) max(10px, env(safe-area-inset-bottom,0px)) auto !important;
    transform: none !important;
    margin: 0 !important;
  }
  html body .eac-portal:has(.open-book) > .eac-concierge {
    inset: auto 12px 10px auto !important;
  }
  html[data-eac-notebook-footer] #eac-placement .ep-canvas {
    width: min(100vw, calc((100dvh - 76px) * 1.776833156));
    height: min(calc(100dvh - 76px), 56.2799043vw);
  }
}
