#moodle-lesson {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}
#moodle-lesson .card {
  margin: 0;
  padding: 28px;
}
#moodle-lesson progress {
  width: 100%;
  height: 8px;
  accent-color: #26846b;
}
.moodle-content {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.moodle-content p {
  white-space: pre-wrap;
  font-size: 20px;
  line-height: 1.8;
  margin: 0;
  overflow-wrap: anywhere;
}
.moodle-content img {
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  width: auto;
  margin: auto;
}
.moodle-content audio,
.moodle-content video {
  width: 100%;
  max-width: 100%;
}
.moodle-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.moodle-stats > div {
  background: #edf6f2;
  border-radius: 18px;
  padding: 20px;
  display: grid;
  gap: 6px;
}
.moodle-stats strong {
  font-size: 25px;
  color: #23785f;
}
.moodle-stats span {
  font-size: 14px;
  color: #61756b;
}
.moodle-part {
  margin-top: 28px;
  display: grid;
  gap: 12px;
}
.moodle-part h3,
.moodle-part p {
  margin: 0;
}
.moodle-part input {
  font-size: 21px;
  min-height: 56px;
}
.moodle-options {
  display: grid;
  gap: 12px;
}
.moodle-option {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 17px;
  border: 1.5px solid #dce6e1;
  background: #fff;
  border-radius: 16px;
  min-height: 62px;
  cursor: pointer;
  color: inherit;
}
.moodle-option.chosen {
  background: #e8f6ef;
  border-color: #26846b;
}
.moodle-option:focus-visible {
  outline: 3px solid #91cbb6;
  outline-offset: 3px;
}
.moodle-option .moodle-content {
  flex: 1;
}
.moodle-letter {
  font-weight: 800;
  color: #26846b;
  min-width: 26px;
}
.moodle-zone {
  position: relative;
  width: 100%;
}
.moodle-zone img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.moodle-zone span {
  position: absolute;
  padding: 4px 8px;
  color: white;
  background: #173b58;
  border-radius: 12px;
  font-weight: 700;
}
.moodle-score {
  font-size: 72px;
  font-weight: 800;
  color: #26846b;
  margin: 18px 0;
}
.moodle-score small {
  font-size: 22px;
  color: #6a7e74;
}
.moodle-review {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
#moodle-lesson [hidden] {
  display: none !important;
}
@media (max-width: 600px) {
  #moodle-lesson .card {
    padding: 18px;
  }
  .moodle-stats {
    gap: 8px;
  }
  .moodle-stats > div {
    padding: 12px;
  }
  .moodle-stats strong {
    font-size: 18px;
  }
  .moodle-content p {
    font-size: 18px;
  }
  .moodle-review {
    grid-template-columns: 1fr;
  }
  .moodle-option {
    padding: 13px;
  }
}
@media (min-width: 760px) {
  .moodle-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .moodle-option {
    height: 100%;
  }
}
.moodle-zoom {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
  display: grid;
  gap: 8px;
  max-width: 100%;
  color: #61756b;
}
.moodle-image-dialog {
  max-width: 95vw;
  max-height: 90vh;
  overflow: auto;
  border: 0;
  border-radius: 18px;
  padding: 18px;
}
.moodle-image-dialog::backdrop {
  background: #102b3bd9;
}
.moodle-image-dialog > img {
  max-width: none;
  width: auto;
  display: block;
  margin-top: 12px;
}
.moodle-image-dialog > .btn {
  position: sticky;
  top: 0;
}

.moodle-point{position:relative;width:100%;overflow:hidden;cursor:crosshair;border-radius:12px}.moodle-point img{width:100%;height:100%;object-fit:contain;pointer-events:none}.moodle-point-marker{position:absolute;width:22px;height:22px;margin:-11px 0 0 -11px;border:3px solid white;border-radius:50%;background:#07877d;box-shadow:0 0 0 1px #07877d;pointer-events:none}

.moodle-content p.moodle-rich { white-space: normal; line-height: 2.25; word-break: normal; overflow-wrap: anywhere; }
.moodle-rich ruby { ruby-position: over; ruby-align: center; }
.moodle-rich rt { font-size: .56em; font-weight: 400; line-height: 1; }
.moodle-rich u { text-underline-offset: .22em; }
.moodle-slots { display: inline-flex; gap: .3em; margin: 0 .2em; white-space: nowrap; vertical-align: baseline; }
.moodle-slot { display: inline-block; min-width: 1.8em; text-align: center; border-bottom: 1.5px solid currentColor; line-height: 1.3; }

/* Tokutei study cards: shared paper, blue, mint and amber palette with native. */
#content:has(.flashcard-study)>.page-head{margin-bottom:18px}
#content:has(.flashcard-study)>.page-head h1{font-size:clamp(22px,3vw,30px);line-height:1.35}
.flashcard-study{width:100%;max-width:680px;min-width:0;margin:16px auto 30px;color:#173B3C}
.fc-hero{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:16px 22px;background:#EAF5EF;border:1px solid #DAEBE2;border-radius:24px;overflow:hidden}
.fc-hero>div{min-width:0;flex:1}.fc-eyebrow{font-size:10px;font-weight:800;letter-spacing:.09em;color:#466F63}.fc-hero h2{font-size:22px;line-height:1.3;letter-spacing:-.03em;margin:6px 0 4px;max-width:360px}.fc-hero p{font-size:13px;line-height:1.5;margin:0;color:#536F67;max-width:330px}.fc-illustration{width:92px;height:auto;flex:none}
.fc-dashboard{display:grid;grid-template-columns:repeat(3,1fr);padding:12px 20px;margin:10px 0;background:#fff;border:1px solid #E1E9E5;border-radius:20px;gap:10px 0}.fc-stat{display:flex;flex-direction:column;gap:3px;padding:0 16px;border-right:1px solid #E6EDE9}.fc-stat:first-child{padding-left:0}.fc-stat:nth-child(3){border:0}.fc-stat>span{font-size:12px;color:#5C7169;font-weight:600}.fc-stat strong{font-size:22px;line-height:1.2;letter-spacing:-.03em}.fc-stat small{font-size:12px;font-weight:500;color:#667C72;letter-spacing:0}.fc-stat-known strong{color:#176C50}.fc-stat-review strong{color:#A26317}
.fc-progress{grid-column:1/-1;width:100%;height:7px;border:0;border-radius:8px;background:#E8EEE9;overflow:hidden;accent-color:#176C50;appearance:none;margin:0}.fc-progress::-webkit-progress-bar{background:#E8EEE9}.fc-progress::-webkit-progress-value{background:#176C50;border-radius:8px}.fc-progress::-moz-progress-bar{background:#176C50;border-radius:8px}
.fc-filters{display:flex;gap:5px;padding:5px;border-radius:16px;background:#E9EFEC;margin:12px 0}.fc-filters button{flex:1;border:0;border-radius:12px;padding:12px 10px;background:transparent;color:#536B61;font-size:14px;font-weight:700;cursor:pointer;min-height:46px}.fc-filters button[aria-pressed=true]{background:#fff;color:#173B3C;box-shadow:0 2px 6px #15372b10}.fc-filters button span{padding:3px 7px;margin-left:5px;border-radius:7px;background:#EDF3EF;font-size:11px}.fc-filters [data-review] span{background:#FFF0D3;color:#9B6018}
.fc-session{display:flex;align-items:center;justify-content:space-between;color:#5C7169;font-size:13px;padding:0 8px;gap:10px}.fc-session strong{color:#173B3C}.fc-state{background:#E7F0FF;color:#365E8C;border-radius:20px;padding:6px 10px;font-size:11px;font-weight:700}.fc-state.is-known{background:#E0F3EB;color:#176C50}.fc-state.is-review{background:#FFF0D3;color:#965C16}
.fc-stack{position:relative;margin:12px 8px 24px;isolation:isolate}.fc-stack:before,.fc-stack:after{content:"";position:absolute;inset:14px 9px -11px;border:1px solid #D7E3DD;border-radius:26px;background:#DCEDE5;z-index:-1;transform:rotate(-1.7deg)}.fc-stack:after{inset:9px 4px -6px;transform:rotate(1.1deg);background:#EFF5F2}
.learning-flashcard{background:#F8FBFF;border:1px solid #CCDDED;border-radius:26px;box-shadow:0 12px 30px #193D3510;overflow:hidden;animation:fc-reveal .18s ease-out}.learning-flashcard.fc-back{background:#F2FAF5;border-color:#C8E1D4}
.fc-top{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 22px;background:#E7F0FF;color:#56748E;font-size:11px}.fc-back .fc-top{background:#E0F3EB;color:#497565}.fc-language{font-weight:800;letter-spacing:.05em}.fc-group{display:table;max-width:calc(100% - 40px);margin:22px auto 0;padding:6px 11px;border-radius:9px;background:#fff;color:#5A7168;font-size:11px;line-height:1.5;text-align:center;border:1px solid #E1EAE6}
.fc-flip-area{width:100%;min-height:190px;padding:24px 24px 20px;border:0;background:transparent;color:inherit;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;font-family:inherit}.fc-flip-area:disabled{opacity:.7}.fc-word{width:100%;text-align:center}.fc-word .moodle-content p{font-size:clamp(25px,4.6vw,36px);font-weight:750;line-height:1.8!important;margin:0;overflow-wrap:anywhere;color:#244F78}.fc-back .fc-word .moodle-content p{color:#176C50;font-size:clamp(23px,4.2vw,32px)}.fc-word rt{font-size:.43em;color:#526D85;font-weight:500}.fc-tap{display:flex;align-items:center;justify-content:center;gap:7px;color:#637C88;font-size:12px;font-weight:500}.fc-tap>span{font-size:18px}.fc-back .fc-tap{color:#587B6B}
.fc-media{margin:0 22px 20px;border:1px solid #E0E9E4;border-radius:16px;background:#fff;overflow:hidden;padding:10px}.fc-media .moodle-zoom{border:0;background:transparent;padding:0;display:block;width:100%}.fc-media img{max-height:240px;width:100%;object-fit:contain;display:block}.fc-media small{display:block;color:#6A7E75;font-size:11px;padding:7px 0 0;text-align:center}
.fc-detail{padding:20px 22px 24px;background:#ffffffb3;border-top:1px solid #DFE9E3}.fc-detail-label{color:#6A7C73;font-weight:800;font-size:10px;letter-spacing:.08em}.fc-detail .moodle-content p{font-size:16px;line-height:1.9!important;margin:12px 0 0}.fc-detail .moodle-content p:first-child{font-size:13px;color:#647D71}
.fc-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}.fc-rating{display:flex;align-items:center;justify-content:center;gap:12px;min-height:68px;padding:12px;border:1px solid transparent;border-radius:17px;font-size:15px;font-weight:800;cursor:pointer;font-family:inherit;text-align:left}.fc-rating small{display:block;font-size:10px;font-weight:500;margin-top:4px}.fc-again{background:#FFF0D3;border-color:#EFDBAF;color:#935A11}.fc-known{background:#176C50;color:#fff;border-color:#176C50;box-shadow:0 4px 0 #0E503A}.fc-action-icon{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:#ffffff55;font-size:21px;font-weight:500}.fc-known .fc-action-icon{background:#ffffff22}.fc-rating:disabled{opacity:.52;box-shadow:none;cursor:default}.fc-guide{font-size:12px;color:#61786C;text-align:center;line-height:1.6;margin:14px 4px}
.fc-navigation{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #E1E9E3;padding-top:14px;margin-top:18px}.fc-navigation button{min-height:44px;padding:10px 12px;border:0;border-radius:12px;color:#496B5C;background:transparent;font-weight:700;font-size:13px;cursor:pointer}.fc-navigation button:hover:not(:disabled){background:#E5EFE8}.fc-navigation button:disabled{opacity:.4;cursor:default}.fc-navigation span{font-size:12px;color:#7E9087;font-variant-numeric:tabular-nums}
.flashcard-study button:focus-visible{outline:3px solid #226BA0;outline-offset:3px}.fc-flip-area:focus-visible{outline-offset:-5px;border-radius:18px}.fc-complete{display:flex;flex-direction:column;align-items:center;text-align:center;background:#fff;border:1px solid #DCE8DF;border-radius:26px;margin-top:20px;padding:30px 24px;gap:14px}.fc-complete h3{font-size:25px;margin:0}.fc-complete p{color:#61766B;line-height:1.7;margin:0 0 8px}.fc-complete .btn{min-width:220px}
@keyframes fc-reveal{from{opacity:.75;transform:perspective(1000px) rotateY(-5deg)}to{opacity:1;transform:none}}
@media(max-width:600px){.flashcard-study{margin-top:16px}.fc-hero{padding:14px 16px;gap:6px}.fc-hero h2{font-size:21px}.fc-hero p{font-size:12px}.fc-illustration{width:78px}.fc-eyebrow{font-size:9px}.fc-dashboard{padding:12px 16px}.fc-stat{padding:0 12px}.fc-stat strong{font-size:23px}.fc-top{padding:15px 18px}.fc-flip-area{min-height:180px;padding:22px 16px 18px}.fc-detail{padding:18px}.fc-media{margin:0 16px 18px}.fc-stack{margin-left:3px;margin-right:3px}.fc-rating{gap:8px;font-size:14px;padding:10px 8px}.fc-action-icon{width:26px;height:26px;font-size:19px}.fc-rating small{font-size:9px}.fc-filters button{font-size:13px}.fc-guide{font-size:11px}}
@media(max-width:360px){.fc-illustration{width:76px}.fc-hero h2{font-size:19px}.fc-rating{gap:6px}.fc-action-icon{display:none}}
@media(prefers-reduced-motion:reduce){.learning-flashcard{animation:none}}

.moodle-audio{display:grid;gap:8px;background:#eaf5f1;border:1px solid #cde5dc;border-radius:16px;padding:14px;margin:8px 0 16px}.moodle-audio>span{font-size:13px;font-weight:700;color:#25664f}.moodle-audio audio{width:100%;min-width:0}.moodle-content .moodle-content{margin:0}

/* Typeset school documents retain readable full-width text instead of shrinking to a thumbnail. */
.moodle-content img.moodle-document{width:100%;height:auto;max-height:none;display:block}
