.reading-tools {
  position: sticky;
  top: 0;
  z-index: 12;
  max-width: 1120px;
  min-height: 58px;
  margin: 0 auto 20px;
  padding: 4px 14px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  background: #faf4e8;
  border: 1px solid #d7c7b4;
  border-top: 0;
  border-radius: 0 0 5px 5px;
  box-shadow: 0 4px 12px #493c3509;
  font-family: var(--ui);
}
.reader-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  width: fit-content;
  padding: 8px 14px;
  font-size: 14px;
  line-height: 1.3;
  color: var(--rose);
  border: 1px solid transparent;
  border-radius: 3px;
}
.reader-tool:hover { background: #ecdccb6b; }
.reader-chapters { border-color: #d4bba9; }
#reader-context { justify-self: end; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #bda49b; }
.reader-location { min-width: 0; font-size: 12px; color: var(--muted); text-align: center; }
:is(#chapter-title, #poem-heading, #question-search, .question-toggle, .question-group h2) { scroll-margin-top: 76px; }
.left-content { top: 83px; }
.welcome-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.primary-button { background: var(--rose); color: #fff9ef; border: 1px solid var(--rose); border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 20px; text-decoration: none; font-family: var(--ui); font-size: 15px; line-height: 1.4; }
.primary-button:hover { background: #754652; }
.welcome-actions .outline-button { font-family: var(--ui); font-size: 14px; min-height: 50px; }
.contents-list a { grid-template-columns: 26px 1fr 38px; gap: 12px; padding: 13px 0; }
.contents-copy { display: flex; flex-direction: column; gap: 6px; }
.contents-copy small { font-family: var(--ui); font-size: 12px; font-weight: 400; line-height: 1.5; color: var(--muted); }
.contents-list .chapter-current { font-family: var(--ui); font-size: 11px; text-align: right; }
.contents-list a[aria-current=page] .chapter-current { background: #ead7d461; padding: 4px; border-radius: 3px; }
.navigation-hint { font-family: var(--ui); font-size: 13px; line-height: 1.7; color: var(--muted); margin: 22px 0 0; }
.poem-picker,.topic-picker { width: 580px; }
.poem-picker h2,.topic-picker h2 { font-size: 39px; margin: 0 20px 18px 0; }
.poem-picker .navigation-hint { margin: 0 0 24px; }
.poem-picker .poem-index a { font-size: 26px; }
.topic-picker-list { display: grid; margin-top: 25px; }
.topic-choice { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 5px; padding: 17px 0; border-bottom: 1px solid var(--line); font-family: var(--heading); font-size: 25px; line-height: 1.25; min-height: 56px; }
.topic-choice:first-child { font-family: var(--ui); font-size: 14px; color: var(--rose); }
.topic-choice small { font-family: var(--ui); font-size: 12px; color: var(--muted); }
.topic-choice:hover { color: var(--rose); }
.choose-another-poem { font-family: var(--ui); font-size: 13px; margin-top: 12px; }
.poem-navigation { gap: 15px; }
.poem-navigation .text-link { font-size: 14px; min-height: 48px; }
.search-label { font-size: 14px; }
.search-input { background: #eee3d340; border: 1px solid #cbb5a2; border-radius: 3px; }
.search-input input { padding-left: 12px; font-size: 16px; }
.clear-search { font-size: 13px; }
.search-count { font-size: 12px; margin-bottom: 0; }
.collapse-all { font-family: var(--ui); font-size: 12px; margin: 4px 0 20px; }
.collapse-all:disabled { opacity: .7; text-decoration: none; }
.answer-actions { column-gap: 18px; }
.answer-actions .text-button,.answer-actions .text-link { font-size: 12px; min-height: 44px; text-decoration: underline; text-decoration-color: #bda49b; }
.close-answer { flex-basis: 100%; justify-content: flex-start; }
.questions-invitation { margin: 28px 0; padding: 20px 0; border-block: 1px solid var(--line); font-size: 15px; line-height: 1.75; }
.questions-invitation > p:first-child { margin: 0; }
.questions-invitation .question-price { margin: 16px 0 0; font-size: 26px; line-height: 1.4; }
.questions-invitation .outline-button { margin-top: 18px; font-family: var(--ui); font-size: 14px; }
.answer-discussion { margin-top: 30px; padding: 22px; border: 1px solid var(--line); border-radius: 3px; background: #f5eddf; }
.answer-discussion h4 { margin: 0 0 12px; font-family: var(--heading); font-size: 28px; font-weight: 500; line-height: 1.2; text-wrap: balance; }
.answer-invitation { margin: 0 0 18px; font-size: 15px; line-height: 1.75; }
.answer-discussion-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.answer-discussion-actions > :is(button,a) { min-height: 48px; font-family: var(--ui); font-size: 13px; }
.answer-discussion .copy-feedback:not(:empty) { display: block; margin-top: 14px; font-size: 12px; line-height: 1.6; }
.photo-hint { font-size: 12px; letter-spacing: .025em; }
.page-nav { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.page-nav a { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; font-family: var(--ui); font-size: 16px; line-height: 1.35; min-height: 56px; max-width: 100%; white-space: normal; text-align: left; }
.page-nav a small { font-size: 11px; color: var(--muted); }
.page-nav .page-next { align-items: flex-end; text-align: right; }
.page-count { font-family: var(--ui); font-size: 12px; letter-spacing: .06em; }
.outside-note { padding-bottom: max(28px,env(safe-area-inset-bottom)); }
@media(min-width:980px) and (max-width:1180px) { .reading-tools { margin-left: 28px; margin-right: 28px; } }
@media(max-width:979px) {
  .reading-tools { max-width: 640px; margin-bottom: 20px; }
  .left-content { top: auto; }
  .reader-tool { padding-left: 10px; padding-right: 10px; }
}
@media(max-width:680px) {
  .reading-tools { margin: 0 12px 20px; padding: 3px 6px; min-height: 54px; grid-template-columns: auto minmax(0,1fr) auto; gap: 7px; }
  .reader-tool { font-size: 12px; min-height: 46px; padding: 8px; gap: 6px; }
  .reader-location { font-size: 11px; line-height: 1.3; }
  .welcome-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .welcome-actions a,.welcome-actions button { width: 100%; }
  .chapter-hello .margin-note { margin-top: 20px; }
  .contents-modal { padding: 48px 22px 20px; }
  .contents-modal .eyebrow { display: none; }
  .contents-list a { font-size: 22px; grid-template-columns: 22px 1fr 35px; gap: 9px; padding: 10px 0; }
  .contents-copy small { font-size: 12px; }
  .contents-modal h2 { font-size: 36px; margin: 0 0 12px; }
  .contents-list { margin-bottom: 12px; }
  .contents-modal .handwritten { font-size: 20px; }
  .poem-picker h2,.topic-picker h2 { font-size: 34px; }
  .poem-picker .poem-index a { font-size: 24px; }
  .page-nav { gap: 12px; padding: 14px 22px; grid-template-columns: minmax(0,1fr) 35px minmax(0,1fr); }
  .page-nav a { font-size: 14px; }
  .page-count { font-size: 11px; letter-spacing: 0; }
  .page-nav>.text-button { font-family: var(--ui); font-size: 13px; }
}
@media(max-width:360px) {
  .reading-tools { margin-left: 8px; margin-right: 8px; gap: 5px; padding-left: 4px; padding-right: 4px; }
  .reader-tool { font-size: 11px; padding-left: 6px; padding-right: 6px; }
  .reader-location { font-size: 10px; }
  .page-nav { padding-left: 14px; padding-right: 14px; gap: 9px; }
  .page-nav a { font-size: 13px; }
}
