
.node-body {
  padding-bottom: env(safe-area-inset-bottom);
}

.node-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 600px;
  margin: 0 auto;
}


.node-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
}

.node-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--muted);
  text-decoration: none;
}
.node-close svg { width: 22px; height: 22px; }

.node-bar {
  flex: 1;
  height: 16px;
  border-radius: 8px;          
  background: var(--border);
  overflow: hidden;
}
.node-bar-fill {
  width: 0;
  height: 100%;
  border-radius: 8px;
  background: var(--acc);
  transition: width .4s var(--ease-out);   
}


.node-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 16px 24px;
}
.node-main.is-top { justify-content: flex-start; }

.node-msg {
  margin: 48px 0;
  color: var(--muted);
  font-size: 16px;
  text-align: center;
}

/* SSR本文の末尾に置く内部リンク。JSで学習画面へ切り替わる前は本文と一緒に読める。 */
.node-ssr-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 28px 0 14px;
  color: var(--muted);
  font-size: 14px;
}
.node-ssr-crumbs a,
.node-ssr-links a {
  color: var(--acc-lip);
  text-underline-offset: 3px;
}
.node-ssr-links {
  margin: 0 0 28px;
  padding-top: 18px;
  border-top: 2px solid var(--border);
}
.node-ssr-links h2 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.45;
}
.node-ssr-links h2 + ul { margin-top: 0; }
.node-ssr-links ul {
  margin: 0 0 20px;
  padding-left: 20px;
}
.node-ssr-links li {
  margin: 8px 0;
  line-height: 1.55;
}

.node-q {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--muted);
}

.say {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.say-face {
  flex: none;
  width: 64px;                 
  height: 64px;
}
.say-face img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, .9));
}
.say-emoji {
  flex: none;
  width: 64px;
  height: 64px;
  font-size: 40px;
  line-height: 64px;
  text-align: center;
}

.say-text {
  position: relative;
  flex: 1;
  min-width: 0;                
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.5;
}
/*
 * 吹き出しのしっぽ。
 * 外側と内側の三角の中心線・底辺をそろえる。高さと斜辺を2pxずつ縮めた
 * 相似形にすることで、枠が細い「‹」の線に崩れず、2px幅の枠として見える。
 * ::before＝枠の三角／::after＝中を塗る三角。中は吹き出しと同じ色にする。
 */
.say-text::before,
.say-text::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  border-color: transparent;
  border-left-width: 0;
}
.say-text::before {
  top: 14px;
  left: -12px;
  border-top-width: 10px;
  border-bottom-width: 10px;
  border-right-width: 12px;
  border-right-color: var(--border);
}
.say-text::after {
  top: 16px;
  left: -10px;
  border-top-width: 8px;
  border-bottom-width: 8px;
  border-right-width: 10px;
  border-right-color: var(--bg);
}

.wrong {
  margin: 0 0 16px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.wrong mark {
  padding: 2px 0;
  border-radius: 2px;
  background: linear-gradient(transparent 62%, var(--acc) 62%);
  color: inherit;
  font-weight: 700;
}


.compose { margin-top: 16px; }

.compose textarea {
  display: block;
  width: 100%;
  min-height: 132px;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  resize: vertical;
}
.compose textarea:focus {
  border-color: var(--acc);
  outline: none;
}

.count {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
  text-align: right;
}
.count.is-short {
  color: var(--acc);
  font-weight: 700;
}


.node-foot {
  position: sticky;
  bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 2px solid var(--border);
  background: var(--bg);
}
.node-foot .btn { display: block; width: 100%; }
.node-foot .btn + .btn { margin-top: 12px; }

.node-foot:not([hidden]) {
  animation: duo-rise var(--dur) var(--ease-out) both;
}

.choices { display: grid; gap: 12px; }

.btn.ghost {
  --btn-face: var(--bg);
  --btn-lip: var(--border);
  --btn-ink: var(--text);
  border: 0;
}
.btn.ghost::before { border: 2px solid var(--border); }


.result-head {
  margin: 24px 0 16px;
  text-align: center;
}
.stars {
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: 32px;
  line-height: 1;
  color: var(--acc);
}
.stars .star {
  display: block;
  transform-origin: 50% 60%;
}
.stars .star--off { color: var(--border); }
.score {
  margin-top: 8px;
  font-size: 32px;
  font-weight: 700;
}
.xp {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--acc-lip);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .xp { color: var(--acc); }
}
[data-theme="dark"] .xp { color: var(--acc); }

.feedback {
  margin: 0 0 16px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--surface);
  font-size: 16px;
  line-height: 1.6;
}

.reveal {
  margin-bottom: 16px;
  border: 2px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.reveal > summary {
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.reveal > summary::-webkit-details-marker { display: none; }
.reveal > summary::after { content: " ▾"; color: var(--muted); }
.reveal[open] > summary::after { content: " ▴"; }
.reveal-body {
  padding: 0 16px 16px;
  font-size: 16px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}


.mine {
  margin: 0 0 16px auto;
  max-width: 88%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 16px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.cycles {
  margin: 0 0 12px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
}

.note {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.nextstep {
  margin: 0 0 16px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  font-size: 16px;
  line-height: 1.6;
}

.rubric {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
}
.rubric-row {
  display: grid;
  grid-template-columns: 5.5em 1fr 2.5em;
  align-items: center;
  gap: 12px;
}
.rubric-name {
  font-size: 16px;
  color: var(--muted);
}
.rubric-meter {
  height: 12px;
  border-radius: 6px;          
  background: var(--border);
  overflow: hidden;
}
.rubric-fill {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--acc);
  transition: width .4s var(--ease-out);
}
.rubric-num {
  text-align: right;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}


.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: end center;
  background: rgba(0, 0, 0, .45);
}
.sheet[hidden] { display: none; }

@keyframes sheet-veil { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-slide {
  from { transform: translateY(100%); }
  to   { transform: none; }
}
.sheet:not([hidden]) { animation: sheet-veil var(--dur) var(--ease-out) both; }
.sheet:not([hidden]) .sheet-panel {
  animation: sheet-slide var(--dur) var(--ease-out) both;
}

.sheet-panel {
  width: 100%;
  max-width: 600px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--bg);
}
.sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 2px solid var(--border);
}
.sheet-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}
.sheet-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.sheet-close svg { width: 22px; height: 22px; }

.sheet-body {
  flex: 1;
  padding: 16px calc(16px + env(safe-area-inset-right))
           calc(24px + env(safe-area-inset-bottom)) 16px;
  overflow-y: auto;
  font-size: 16px;
  line-height: 1.7;
}
.sheet-body img,
.sheet-body svg { max-width: 100%; height: auto; }
.sheet-body table { display: block; width: 100%; overflow-x: auto; }
.sheet-body pre { overflow-x: auto; }


.read-title {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}

.read-body {
  font-size: 17px;
  line-height: 1.8;
}
.read-body > :first-child { margin-top: 0; }
.read-body > :last-child { margin-bottom: 0; }

.read-body img,
.read-body svg { max-width: 100%; height: auto; }
.read-body table { display: block; width: 100%; overflow-x: auto; }
.read-body pre { overflow-x: auto; }

.read-note {
  margin: 20px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}



.quiz-q {
  margin: 0 0 24px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}

.quiz-choices { display: grid; gap: 12px; }

.quiz-choice {
  height: auto;
  min-height: 50px;
  padding: 12px 16px;
  font: 700 16px/1.5 var(--font);
  text-align: left;
  white-space: normal;
}

.quiz-choice[aria-pressed="true"] {
  --btn-lip: var(--acc);
  --btn-face: var(--surface);
}
.quiz-choice[aria-pressed="true"]::before { border-color: var(--acc); }

.quiz-choice.is-answer {
  --btn-lip: var(--acc);
  --btn-face: var(--surface);
}
.quiz-choice.is-answer::before { border-color: var(--acc); }
.quiz-choice:disabled { cursor: default; }


.quiz-body { display: block; }

.quiz-pattern {
  margin: 0 0 24px;
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.quiz-pattern-row { display: grid; grid-template-columns: 1fr 1fr; }
.quiz-pattern-row + .quiz-pattern-row { border-top: 2px solid var(--border); }
.quiz-pattern-cell {
  padding: 14px 16px;
  font: 700 18px/1.4 var(--font);
  text-align: center;
  word-break: break-word;
}
.quiz-pattern-cell.is-expr {
  background: var(--bg);
  border-right: 2px solid var(--border);
}
.quiz-pattern-cell.is-blank { color: var(--acc); }

.quiz-line {
  display: flex;
  gap: 0;
  margin: 8px 0 24px;
  overflow-x: auto;
}
.quiz-line-slot {
  position: relative;
  display: grid;
  grid-template-rows: 22px 20px 24px;
  justify-items: center;
  align-items: center;
  flex: 1 1 0;
  min-width: 46px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.quiz-line-slot::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 32px;
  height: 3px;
  background: var(--border);
}
.quiz-line-slot:first-child::before { left: 50%; }
.quiz-line-slot:last-child::before { right: 50%; }

.quiz-line-label { font: 700 16px/1 var(--font); color: var(--muted); }
.quiz-line-bar {
  position: relative;
  z-index: 1;
  width: 3px;
  height: 20px;
  background: var(--border);
}
.quiz-line-pin {
  width: 20px;
  height: 20px;
  border-radius: var(--r);
  background: var(--acc);
  opacity: 0;
}
.quiz-line-slot.is-picked .quiz-line-label { color: var(--acc); }
.quiz-line-slot.is-picked .quiz-line-bar { background: var(--acc); }
.quiz-line-slot.is-picked .quiz-line-pin { opacity: 1; }
.quiz-line-slot.is-answer .quiz-line-label { color: var(--acc); }
.quiz-line-slot.is-answer .quiz-line-bar { background: var(--acc); }
.quiz-line-slot.is-answer .quiz-line-pin { opacity: 1; }
.quiz-line-slot:disabled { cursor: default; }

.quiz-match { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quiz-match-cell {
  height: auto;
  min-height: 58px;
  padding: 12px 14px;
  font: 700 18px/1.4 var(--font);
  text-align: center;
  white-space: normal;
}
.quiz-match-cell.is-active {
  --btn-lip: var(--acc);
  --btn-face: var(--surface);
}
.quiz-match-cell.is-active::before { border-color: var(--acc); }
.quiz-match-cell.is-paired { opacity: 0.45; }
.quiz-match-cell:disabled { cursor: default; }

.quiz-blanks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 0 24px;
}
.quiz-blank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 58px;
  padding: 0 12px;
  border: 2px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  font: 700 20px/1 var(--font);
  color: var(--text);
  cursor: pointer;
}
.quiz-blank.is-given {
  border-color: transparent;
  background: none;
  color: var(--muted);
  cursor: default;
}
.quiz-blank.is-active { border-color: var(--acc); }
.quiz-blank:disabled { cursor: default; }

.quiz-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 300px;
  margin: 0 auto 16px;
}
.quiz-pad-key {
  height: 54px;
  border: 2px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  font: 700 20px/1 var(--font);
  color: var(--text);
  cursor: pointer;
}
.quiz-pad-key.is-zero { grid-column: span 2; }
.quiz-pad-key:disabled { cursor: default; opacity: 0.5; }

.quiz-blank-send { width: 100%; }


.node-note-open { display: none; }
.note-dock { display: none; }

@media (min-width: 1100px) {
  .node-note-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: 8px;
    border: 2px solid var(--border);
    border-radius: var(--r);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
  }
  .node-note-open svg { width: 20px; height: 20px; }
  .node-note-open[aria-expanded="true"] { color: var(--acc); border-color: var(--acc); }

  .node-body.has-note { padding-right: calc(min(340px, 28vw) + 48px); }

  .note-dock {
    position: fixed;
    top: 96px;
    right: 24px;
    bottom: 24px;
    z-index: 30;          
    display: flex;
    flex-direction: column;
    width: min(340px, 28vw);
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--surface);
  }
  .note-dock[hidden] { display: none; }

  .note-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }
  .note-title { font: 700 15px/1 var(--font); color: var(--text); }
  .note-state { flex: 1; font-size: 12px; color: var(--muted); text-align: right; }
  .note-close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: var(--r);
    background: none;
    color: var(--muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
  }

  .note-area {
    flex: 1;
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: var(--r);
    background: var(--bg);
    font: 400 15px/1.8 var(--font);
    color: var(--text);
    resize: none;
  }
  .note-area:focus { outline: 2px solid var(--acc); outline-offset: 1px; }

  .note-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
  .note-panel[hidden] { display: none; }

  .note-tabs { display: flex; gap: 8px; margin-bottom: 8px; }
  .note-tab {
    padding: 6px 10px;
    border: 2px solid var(--border);
    border-radius: var(--r);
    background: var(--surface);
    color: var(--muted);
    font: 700 13px/1 var(--font);
    cursor: pointer;
  }
  .note-tab.is-active { border-color: var(--acc); color: var(--acc); }

  .note-mini-btn {
    padding: 6px 10px;
    border: 2px solid var(--border);
    border-radius: var(--r);
    background: var(--surface);
    color: var(--text);
    font: 700 12px/1 var(--font);
    cursor: pointer;
  }
  .note-mini-btn.is-active { border-color: var(--acc); color: var(--acc); }

  .note-draw { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 8px; }
  .note-draw-tools { display: flex; flex-wrap: wrap; gap: 6px; }
  .note-draw-group { display: flex; gap: 4px; }
  .note-draw-canvas-wrap {
    flex: 1;
    min-height: 120px;
    border: 2px solid var(--border);
    border-radius: var(--r);
    background: var(--bg);
    overflow: hidden;
  }
  .note-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }

  .note-table { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 8px; }
  .note-table-scroll {
    flex: 1;
    min-height: 100px;
    overflow: auto;
    border: 2px solid var(--border);
    border-radius: var(--r);
    background: var(--bg);
  }
  .note-table-grid { border-collapse: collapse; width: 100%; }
  .note-table-grid td {
    border: 1px solid var(--border);
    padding: 6px 8px;
    min-width: 56px;
    font-size: 16px;          
    color: var(--text);
  }
  .note-table-grid td:focus {
    outline: 2px solid var(--acc);
    outline-offset: -2px;
    background: var(--surface);
  }
  .note-table-tools { display: flex; flex-wrap: wrap; gap: 6px; }
}


.quiz-send { width: 100%; margin-top: 16px; }

.quiz-order-slot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 56px;
  margin: 0 0 16px;
  padding: 10px;
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
}
.quiz-order-chip {
  padding: 8px 12px;
  border: 2px solid var(--acc);
  border-radius: var(--r);
  background: var(--surface);
  font: 700 15px/1.3 var(--font);
  color: var(--text);
  cursor: pointer;
}
.quiz-order-tray { display: grid; gap: 10px; }
.quiz-order-card {
  height: auto;
  min-height: 50px;
  padding: 12px 14px;
  font: 700 16px/1.4 var(--font);
  text-align: left;
  white-space: normal;
}
.quiz-order-card.is-used { opacity: 0.35; }

.quiz-cat-items { display: grid; gap: 10px; margin: 0 0 18px; }
.quiz-cat-item {
  height: auto;
  min-height: 48px;
  padding: 11px 14px;
  font: 700 16px/1.4 var(--font);
  text-align: left;
  white-space: normal;
}
.quiz-cat-item.is-active {
  --btn-lip: var(--acc);
  --btn-face: var(--surface);
}
.quiz-cat-item.is-active::before { border-color: var(--acc); }
.quiz-cat-item.is-placed { opacity: 0.55; }
.quiz-cat-bins { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quiz-cat-bin {
  height: auto;
  min-height: 56px;
  padding: 12px;
  font: 700 16px/1.3 var(--font);
  white-space: normal;
}

.quiz-connect { position: relative; }
.quiz-connect-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;   
  z-index: 1;
}
.quiz-connect-lines line {
  stroke: var(--acc);
  stroke-width: 3;
  stroke-linecap: round;
}
.quiz-connect-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 48px;   
}
.quiz-connect-cell {
  height: auto;
  min-height: 52px;
  padding: 11px 12px;
  font: 700 16px/1.35 var(--font);
  text-align: center;
  white-space: normal;
}
.quiz-connect-cell.is-active {
  --btn-lip: var(--acc);
  --btn-face: var(--surface);
}
.quiz-connect-cell.is-active::before { border-color: var(--acc); }
.quiz-connect-cell.is-paired { opacity: 0.6; }

.quiz-textblank {
  margin: 0 0 8px;
  font: 400 18px/2.1 var(--font);
  color: var(--text);
}
.quiz-textblank-input {
  width: 6em;
  margin: 0 4px;
  padding: 4px 8px;
  border: 0;
  border-bottom: 2px solid var(--acc);
  background: none;
  font: 700 18px/1.4 var(--font);
  color: var(--text);
  text-align: center;
}
.quiz-textblank-input:focus { outline: 2px solid var(--acc); outline-offset: 2px; }

.quiz-hint { margin: 8px 0 0; }
.quiz-hint-warn {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}
.quiz-hint-reveal-list { margin: 0; }
.quiz-hint-reveal {
  margin: 0 0 8px;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  word-break: break-word;
}
.quiz-hint-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.quiz-hint-btn {
  height: auto;
  min-height: 44px;
  padding: 10px 14px;
  font: 700 14px/1.35 var(--font);
  white-space: normal;
}

.quiz-slider { text-align: center; }
.quiz-slider-value {
  margin: 0 0 12px;
  font: 800 30px/1 var(--font);
  color: var(--acc);
}
.quiz-slider-input { width: 100%; accent-color: var(--acc); }
.quiz-slider-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.quiz-code {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg);
  overflow-x: auto;
  font: 400 14px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text);
  white-space: pre;
}

.quiz-inline-feedback { margin: 16px 0 0; }
.quiz-inline-result {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.quiz-inline-result .quiz-inline-ok { flex: 1 1 auto; }
.quiz-inline-feedback > .say-face { margin: 0 auto 8px; }
.quiz-inline-ok {
  margin: 0;
  padding: 12px 16px;
  border: 2px solid var(--acc);
  border-radius: var(--r-lg);
  color: var(--acc);
  font-weight: 700;
  text-align: center;
}

.quiz-count {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
  text-align: center;
}

.quiz-review {
  margin-bottom: 12px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.quiz-review.is-ok { border-color: var(--acc); }

.quiz-review-q {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  word-break: break-word;
}

.quiz-review-line {
  display: flex;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.5;
}
.quiz-review-tag {
  flex: none;
  width: 96px;
  color: var(--muted);
}
.quiz-review-miss {
  color: var(--muted);
  text-decoration: line-through;
  word-break: break-word;
}
.quiz-review-ans {
  font-weight: 700;
  word-break: break-word;
}

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



.reading-cat {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
}

.reading-title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

.reading-passage {
  position: sticky;
  top: 0;
  z-index: 1;
  flex: none;
  margin: 0 -16px 16px;
  padding: 12px 16px;
  max-height: 36vh;
  max-height: 36dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
}

.reading-para {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.8;
  word-break: break-word;
}
.reading-para:last-child { margin-bottom: 0; }

.reading-q {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}



.write-label {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
}

.write-answer {
  margin: 0 0 24px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  font-size: 16px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (prefers-reduced-motion: reduce) {
  .node-bar-fill,
  .rubric-fill { transition: none; }

  .node-foot:not([hidden]),
  .sheet:not([hidden]),
  .sheet:not([hidden]) .sheet-panel,
  .quiz-hint-reveal {
    animation-duration: 1ms;
  }
}
