.study-launch {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  width: 100%; gap: 10px; text-align: left; margin-top: 13px; padding: 9px 11px;
  border: 1px solid #dbc7de; border-radius: 12px; background: #f4eaf5; color: #54305f;
}
.study-launch:hover { background: #efdfef; }
.study-launch:disabled { cursor: default; }
.study-launch-icon {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 9px; background: #e9d5ec; color: #653e72;
}
.study-launch b { display: block; font-size: .85rem; }
.study-launch small { display: block; font-size: .72rem; line-height: 1.4; margin-top: 2px; color: #69576d; }
.study-launch-arrow { width: 16px; height: 16px; }

.study-panel { margin-top: 18px; scroll-margin-top: 10px; padding: clamp(15px, 3vw, 27px); }
.study-header {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border-bottom: 1px solid var(--line); padding: 0 0 16px;
}
.study-header .eyebrow { margin-bottom: 7px; }
.study-header h2 {
  font: 500 clamp(1.78rem, 4vw, 2.85rem)/1.05 Georgia, "Times New Roman", serif;
  letter-spacing: -.05em; margin: 0; color: #412b49;
}
.study-header h2:focus { outline: none; }
.study-header p:last-child { color: var(--muted); font-size: .88rem; line-height: 1.5; margin: 7px 0 0; }
.study-tools {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 15px; padding: 14px 0;
}
.study-format { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); font-weight: 700; }
.study-format select {
  font: inherit; font-size: .83rem; color: var(--ink); min-height: 44px;
  border: 1px solid #e0d5df; border-radius: 10px; background: #fcf8f7; padding: 6px 9px;
}
.study-format select:focus-visible { outline: 3px solid #9469a1; outline-offset: 3px; }
.study-nav { display: flex; align-items: center; gap: 5px; }
.study-nav button { padding: 0 8px; min-width: 44px; }
.study-nav button:disabled, .study-option:disabled { cursor: default; }
#study-location {
  min-width: 7.2em; text-align: center; font-size: .78rem; color: var(--muted);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
#study-seek { margin-left: auto; }
.study-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(235px, .85fr); gap: 13px; align-items: start; }
.study-visual, .study-practice { min-width: 0; display: grid; gap: 12px; }
.study-source, .study-source-hidden {
  min-width: 0; border: 1px solid #e6d9e8; border-left: 4px solid #9d6ea8;
  border-radius: 12px; background: #f8eff7; padding: 13px 15px;
}
.study-kicker {
  margin: 0 0 5px; color: #704b7b; font-size: .66rem; font-weight: 800; letter-spacing: .12em;
}
#study-quote {
  margin: 0; font: 500 clamp(1.07rem, 2.1vw, 1.4rem)/1.45 Georgia, "Times New Roman", serif;
  color: #38293e; max-height: 10em; overflow: auto; overflow-wrap: anywhere;
}
.study-source-hidden { display: flex; align-items: center; gap: 8px; color: #61436b; }
.study-source-hidden p { margin: 0; font-size: .84rem; }
.study-visual-card, .practice-card {
  min-width: 0; background: #fffbf8; border: 1px solid var(--line);
  border-radius: 12px; padding: 13px;
}
.study-visual-card h3, .practice-card h3 { margin: 0; font-size: 1rem; letter-spacing: -.025em; }
.study-explanation, .study-disclosure, .practice-card p {
  color: var(--muted); margin: 4px 0 10px; font-size: .8rem; line-height: 1.5; overflow-wrap: anywhere;
}
.study-disclosure { margin: 9px 0 0; font-size: .72rem; }
.story-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 125px), 1fr));
  gap: 8px; list-style: none; margin: 0; padding: 0;
}
.story-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  width: 100%; height: 100%; min-width: 0; padding: 0 0 9px; text-align: left;
  background: #fdf8f6; color: var(--ink); border: 1px solid #e7dce4; border-radius: 10px;
}
.story-card:hover, .story-card[aria-current="true"] { border-color: #a474b0; background: #f8eef7; }
.story-card[aria-current="true"] { box-shadow: 0 0 0 1px #a474b0; }
.story-art { display: block; width: 100%; overflow: hidden; border-radius: 9px 9px 0 0; background: #eddfef; }
.story-art svg { display: block; width: 100%; height: auto; }
.story-tag, .story-caption, .story-clue { margin-inline: 8px; min-width: 0; overflow-wrap: anywhere; }
.story-tag { color: #65436d; font-size: .68rem; font-weight: 820; }
.story-caption { font-size: .78rem; line-height: 1.45; }
.story-clue { padding: 2px 5px; border-radius: 4px; background: #eddfef; color: #65436d; font-size: .69rem; font-weight: 700; }
.meaning-table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; font-size: .8rem; }
.meaning-table th, .meaning-table td {
  border-bottom: 1px solid #eee4eb; padding: 7px 6px; line-height: 1.4;
  vertical-align: top; overflow-wrap: anywhere;
}
.meaning-table th:first-child { width: 28%; }
.meaning-table thead { color: #65436d; background: #f4eaf3; font-size: .75rem; }
.meaning-current { background: #fbf2fa; }
.meaning-select, .study-bookmark-jump {
  width: 100%; padding: 6px 5px; min-height: 38px; text-align: left; white-space: normal;
  border: 1px solid transparent; border-radius: 7px; background: transparent;
  color: #63406f; font: 760 .76rem/1.4 system-ui, sans-serif; overflow-wrap: anywhere;
}
.meaning-select:hover, .meaning-select[aria-current="true"], .study-bookmark-jump:hover {
  background: #efe2f0; border-color: #d9c1dd;
}
.meaning-label { display: block; margin-bottom: 3px; color: #6c4d75; font-size: .67rem; font-weight: 790; }
.study-practice { gap: 8px; }
.study-details summary { color: #523559; font-size: .83rem; font-weight: 770; cursor: pointer; }
.study-details[open] summary { margin-bottom: 7px; }
.study-details textarea { height: auto; min-height: 90px; }
.study-count {
  display: inline-block; margin-left: 2px; padding: 2px 5px; background: #efe4ef; border-radius: 6px;
  color: #684475; font-size: .7rem; font-weight: 780;
}
.study-bookmarks { margin: 0; padding: 0; list-style: none; max-height: 15rem; overflow: auto; }
.study-bookmarks li + li { border-top: 1px solid var(--line); }
.study-save { white-space: normal; }
.study-save[aria-pressed="true"] { color: #5b3a68; background: #efe4f0; }
.study-quiz { margin-top: 12px; padding-top: 9px; border-top: 1px solid var(--line); }
.study-quiz h4 { margin: 0; font-size: .83rem; }
.practice-card .study-question { margin-top: 6px; color: #45334b; font-weight: 680; }
.study-choices { display: grid; gap: 5px; }
.study-option {
  text-align: left; border: 1px solid #e2d5e4; border-radius: 8px; min-height: 44px;
  padding: 7px 8px; color: #45334b; background: #fbf6f9; font-size: .8rem; overflow-wrap: anywhere;
}
.study-option:not(:disabled):hover { background: #f1e5f1; }
.study-option[data-answer="correct"] { color: #305d45; background: #e4eee5; border-color: #a5c5a9; opacity: 1; }
.study-option[data-answer="incorrect"] { color: #823548; background: #f8e8ec; border-color: #dfb7c0; opacity: 1; }
.practice-card .study-feedback {
  display: grid; gap: 3px; padding: 8px; margin-bottom: 0; border-radius: 8px;
  color: #523659; background: #f3eaf3;
}

@media (max-width: 720px) {
  .study-grid { grid-template-columns: minmax(0, 1fr); }
  .study-header { align-items: flex-start; flex-wrap: wrap; }
  .study-tools { column-gap: 8px; }
  #study-seek { margin-left: 0; }
}
@media (max-width: 465px) {
  .story-strip { grid-template-columns: minmax(0, 1fr); }
  .story-card { display: grid; grid-template-columns: 33% minmax(0, 1fr); gap: 2px 6px; align-content: start; padding: 6px; }
  .story-art { grid-row: span 3; align-self: stretch; display: grid; place-items: center; border-radius: 6px; }
  .story-tag, .story-caption, .story-clue { margin-inline: 0; }
  .story-clue { justify-self: start; }
  .meaning-table { font-size: .75rem; }
  .meaning-table th, .meaning-table td { padding: 6px 4px; }
  .meaning-table th:first-child { width: 26%; }
  .meaning-select { font-size: .7rem; padding-inline: 3px; }
}
