@font-face {
  font-family: Outfit;
  src: url("./web-assets/Outfit.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --ink: #22251f;
  --paper: #ffffff;
  --coral: #e95336;
  --coral-dark: #b8351f;
  --lime: #dce9a8;
  --muted: #6f7267;
  --line: #e8e9e6;
  --white: #ffffff;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: Outfit, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
label,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button,
a {
  touch-action: manipulation;
}
button {
  border: 0;
  background: none;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
img,
svg {
  display: block;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: clamp(38px, 4.5vw, 64px);
  line-height: 1.02;
  letter-spacing: -2.5px;
  font-weight: 650;
}
h2 {
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.65px;
  font-weight: 600;
}
h3 {
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.3px;
  font-weight: 600;
}
p {
  color: var(--muted);
}
strong,
b {
  font-weight: 600;
}
small {
  font-size: 13px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 26px 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
  margin: 0;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
legend {
  font-weight: 550;
  margin-bottom: 10px;
  padding: 0;
}
input,
textarea,
select {
  border: 1px solid #d4d5c8;
  background: var(--white);
  border-radius: 14px;
  padding: 14px 16px;
  outline: none;
  min-width: 0;
  max-width: 100%;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px #e9533615;
}
textarea {
  resize: vertical;
  line-height: 1.8;
  width: 100%;
}
label {
  display: block;
  font-weight: 500;
}
label > input:not([type="checkbox"]),
label > textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
}
::placeholder {
  color: #72756a;
  font-weight: 400;
}
input[type="checkbox"] {
  accent-color: var(--coral);
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
:focus-visible {
  outline: 3px solid var(--coral-dark);
  outline-offset: 5px;
}
main:focus {
  outline: none;
}
[hidden] {
  display: none !important;
}
.icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.memo {
  width: 100px;
  height: 100px;
  overflow: visible;
  color: var(--ink);
  flex-shrink: 0;
}
.memo-body {
  fill: var(--coral);
}
.memo.small {
  width: 58px;
  height: 58px;
}
.coral {
  color: var(--coral);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 99;
  background: var(--ink);
  color: var(--paper);
  padding: 14px;
}
.skip:focus {
  top: 10px;
}
.boot {
  min-height: 100svh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 20px;
}
.boot img {
  margin: auto;
}
.boot h1 {
  font-size: 36px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.3;
  transition:
    background 0.18s,
    color 0.18s,
    transform 0.18s;
  white-space: normal;
  text-decoration: none;
}
.btn:active,
.icon-btn:active {
  transform: scale(0.96);
}
.btn.primary {
  background: #ce4128;
  color: white;
}
.btn.primary:hover {
  background: #b8351f;
}
.btn.dark {
  background: var(--ink);
  color: var(--paper);
}
.btn.dark:hover {
  background: #3d4237;
}
.btn.outline {
  border: 1px solid #cbd0bd;
  background: transparent;
}
.btn.outline:hover {
  background: #eeeede;
}
.btn.text-btn {
  padding: 10px 0;
  min-height: 44px;
}
.btn.text-btn:hover {
  color: var(--coral-dark);
}
.btn.full {
  width: 100%;
}
.icon-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  transition:
    background 0.18s,
    transform 0.18s;
}
.icon-btn:hover {
  background: #22251f09;
}
.danger {
  color: var(--coral-dark);
}
.app-shell {
  display: flex;
  min-height: 100svh;
}
.sidebar {
  width: 252px;
  flex-shrink: 0;
  padding: 40px 24px 28px;
  border-right: 1px solid var(--line);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 10;
  background: var(--paper);
}
.brand {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 0 5px;
  margin-bottom: 58px;
  width: fit-content;
}
.brand .memo {
  width: 37px;
  height: 37px;
}
.brand span {
  font-weight: 700;
  font-size: 29px;
  letter-spacing: -1.3px;
}
.sidebar nav {
  display: grid;
  gap: 8px;
}
.nav-item {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 12px 15px;
  border-radius: 13px;
  text-decoration: none;
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
  text-align: left;
}
.nav-item .icon {
  width: 21px;
}
.nav-item small {
  margin-left: auto;
  font-size: 12px;
}
.nav-item:hover {
  color: var(--ink);
  background: #eeede4;
}
.nav-item.selected {
  background: #edeedf;
  color: var(--ink);
}
.nav-item.selected > .icon {
  color: var(--coral);
}
.sidebar-create {
  margin-top: 20px;
}
.sidebar-bottom {
  margin-top: auto;
}
.local-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 18px 12px 30px;
}
.local-note > .icon {
  width: 18px;
  height: 18px;
  color: #8c937e;
  margin-top: 3px;
}
.local-note p {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.6;
}
.local-note span {
  color: var(--muted);
  font-size: 12px;
}
.workspace {
  margin-left: 252px;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1260px;
  width: 100%;
  margin: 0 auto;
  padding: 0 58px;
  color: var(--muted);
  font-size: 14px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
.top-actions > .icon-btn:last-child {
  display: none;
}
.offline {
  color: var(--coral-dark);
  font-size: 13px;
}
.page {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: 32px 58px 64px;
  flex: 1;
  animation: page-in 0.35s var(--ease);
}
.footer {
  max-width: 1260px;
  width: 100%;
  margin: auto;
  padding: 25px 58px 28px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.footer > div {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.footer a {
  padding: 8px 0;
  display: inline-block;
}
.mobile-nav {
  display: none;
}
.library-section {
  margin-top: 36px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}
.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}
.count {
  font-size: 16px;
  font-weight: 400;
  color: var(--muted);
}
.filters {
  display: flex;
  gap: 3px;
  align-items: center;
}
.filters button {
  font-size: 13px;
  padding: 9px 12px;
  min-height: 40px;
  border-radius: 10px;
  color: var(--muted);
}
.filters button.active {
  background: var(--ink);
  color: var(--paper);
}
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 6px;
  color: var(--muted);
}
.search .icon {
  width: 18px;
}
.search input {
  margin: 0 !important;
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 12px 0;
  font-size: 14px;
  box-shadow: none;
}
.search:focus-within {
  border-color: var(--coral);
}
.deck-row {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 21px 0;
  text-align: left;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  transition:
    padding 0.2s,
    background 0.2s;
}
.deck-row:hover {
  background: #f0f0e5;
  padding-left: 12px;
  padding-right: 12px;
}
.deck-symbol {
  width: 52px;
  height: 58px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.tone-0 {
  background: #f4d9ca;
}
.tone-1 {
  background: #e1e8d5;
}
.tone-2 {
  background: #ece3c7;
}
.deck-info {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.deck-info strong {
  font-size: 20px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.deck-info > span {
  color: var(--muted);
  font-size: 13px;
}
.deck-status {
  width: 130px;
  padding: 0 12px;
  display: grid;
  gap: 4px;
  text-align: right;
  color: var(--muted);
}
.deck-status small {
  font-size: 11px;
}
.mini-track {
  height: 3px;
  background: var(--line);
  display: block;
  border-radius: 3px;
  overflow: hidden;
}
.mini-track i {
  background: #8c9e50;
  display: block;
  height: 100%;
}
.deck-row > .icon {
  width: 21px;
}
.first-list {
  text-align: center;
  padding: 24px 0 30px;
}
.empty-drawing {
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  width: 64px;
  height: 64px;
  border: 1px solid #d6dbc7;
  border-radius: 50%;
  transform: rotate(-8deg);
  color: #7d895b;
}
.empty-drawing .icon {
  width: 30px;
  height: 30px;
}
.first-list h3 {
  font-size: 20px;
}
.first-list p {
  font-size: 14px;
  line-height: 1.6;
  margin: 8px 0;
}
.first-list .btn {
  font-size: 14px;
  color: var(--coral-dark);
}
.try-section {
  display: flex;
  gap: 22px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 27px;
  margin-top: 21px;
}
.try-section h3 {
  font-size: 16px;
}
.try-section p {
  font-size: 13px;
  margin-top: 4px;
}
.sample-link {
  display: flex;
  gap: 14px;
  align-items: center;
  text-align: left;
  min-width: 235px;
  padding: 10px 0;
}
.sample-link > span:nth-child(2) {
  font-size: 16px;
  font-weight: 550;
}
.sample-link small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
}
.sample-link .icon {
  margin-left: 10px;
  width: 18px;
  color: var(--muted);
}
.planet {
  width: 28px;
  height: 28px;
  background: #c9d6a6;
  border-radius: 50%;
  position: relative;
  margin: 0 10px;
}
.planet:after {
  content: "";
  position: absolute;
  inset: 7px -9px;
  border: 1.5px solid #5e6a44;
  border-radius: 50%;
  transform: rotate(-30deg);
}
.sample-link:hover .planet {
  transform: rotate(15deg);
  transition: transform 0.3s;
}
.empty-search {
  text-align: center;
  padding: 35px 10px;
}
.empty-search > .icon {
  margin: 0 auto 12px;
  color: var(--muted);
}
.empty-search p {
  font-size: 14px;
  margin-top: 7px;
}
.notice,
.error {
  font-size: 14px;
  line-height: 1.55;
  color: var(--coral-dark);
  margin: 14px 0;
}
.error:empty {
  display: none;
}
.page-back {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -15px 0 25px;
}
.page-back > .btn {
  color: var(--muted);
  font-size: 14px;
}
.page-back > div {
  display: flex;
  gap: 6px;
}
.detail-heading {
  margin-bottom: 36px;
}
.detail-heading h1 {
  font-size: clamp(33px, 3.8vw, 49px);
  line-height: 1.12;
  overflow-wrap: anywhere;
  letter-spacing: -1.65px;
}
.detail-heading > p {
  margin-top: 13px;
  font-size: 17px;
}
.subject {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}
.study-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 42px;
  align-items: start;
}
.study-sheet {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px;
}
.sheet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}
.sheet-heading h2 {
  font-size: 19px;
}
.sheet-heading > .icon {
  width: 20px;
  color: var(--muted);
}
.study-items li {
  display: flex;
  gap: 17px;
  align-items: baseline;
  padding: 17px 0;
  border-bottom: 1px solid #efeee7;
  font-size: 18px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.study-items li:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}
.item-number {
  width: 25px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}
.study-items li > span:last-child {
  min-width: 0;
}
.study-options {
  padding-top: 5px;
  position: sticky;
  top: 25px;
}
.study-options > h2 {
  font-size: 23px;
}
.study-options > p {
  font-size: 14px;
  margin-top: 7px;
}
.study-options fieldset {
  margin-top: 26px;
}
.segmented {
  display: flex;
  background: #eeeee3;
  border-radius: 12px;
  padding: 4px;
  gap: 3px;
}
.segmented button {
  flex: 1;
  padding: 10px 6px;
  border-radius: 9px;
  font-size: 14px;
  min-height: 42px;
  color: var(--muted);
}
.segmented button.selected {
  background: var(--white);
  box-shadow: 0 1px 4px #22251f0e;
  color: var(--ink);
}
.field-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  font-weight: 400;
}
.study-options .field-help {
  margin-top: 9px;
}
.start-area {
  text-align: center;
  border-top: 1px solid var(--line);
  margin-top: 29px;
  padding-top: 25px;
}
.start-area .memo {
  margin: auto;
}
.start-area p {
  color: var(--ink);
  margin: 8px 0 15px;
}
.start-area small {
  font-size: 11px;
  display: block;
  margin-top: 10px;
  color: var(--muted);
}
.review-note {
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 20px;
}
.review-note > .icon {
  width: 16px;
  height: 16px;
}
.editor-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 225px;
  gap: 45px;
}
.form-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 25px;
}
.editor-fields > label {
  margin-bottom: 8px;
}
.optional {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.editor-caption {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 20px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 400;
}
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 25px;
}
.form-actions > p {
  font-size: 12px;
}
.editor-aside {
  padding: 20px 0;
}
.editor-aside .memo {
  width: 95px;
  height: 95px;
  transform: rotate(7deg);
  margin-bottom: 25px;
}
.editor-aside h2 {
  font-size: 23px;
}
.editor-aside p {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.7;
}
.import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 42px;
}
.dropzone {
  border: 1.5px dashed #b8c59a;
  border-radius: 22px;
  padding: 37px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  background: #edf0df;
  cursor: pointer;
  transition: background 0.2s;
}
.dropzone:hover,
.dropzone.dragging {
  background: #e1e9c8;
}
.dropzone > .icon {
  width: 30px;
  height: 30px;
  margin-bottom: 9px;
  color: #626e44;
}
.dropzone > strong {
  font-size: 20px;
}
.dropzone > span {
  font-size: 14px;
  font-weight: 400;
  color: #687153;
}
.dropzone > small {
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.dropzone input {
  max-width: 100%;
  font-size: 12px;
  margin-top: 16px;
  background: transparent;
  border: 0;
  padding: 0;
  width: auto;
}
#import-form {
  margin-top: 28px;
}
#import-form > label {
  font-size: 15px;
}
#import-form .form-actions {
  align-items: flex-start;
}
#import-form .form-actions .field-help {
  max-width: 200px;
}
.import-aside h2 {
  font-size: 23px;
}
.import-aside p {
  font-size: 14px;
  line-height: 1.7;
  margin: 12px 0 20px;
}
.import-aside .field-help {
  font-size: 12px;
}
.import-aside h3 {
  font-size: 18px;
}
.import-progress {
  padding: 22px 0;
  display: flex;
  align-items: center;
  gap: 15px;
}
.import-progress > span {
  font-size: 16px;
}
.import-progress small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}
.spinner {
  display: block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--line);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin-left: auto;
}
.page-session {
  padding-top: 0;
  max-width: 1180px;
}
.in-session .topbar {
  height: 70px;
}
.session-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.session-top > .btn {
  font-size: 14px;
  color: var(--muted);
}
.session-tools {
  display: flex;
  align-items: center;
  gap: 14px;
}
.timer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 94px;
  min-height: 44px;
  justify-content: center;
  background: #eeeee2;
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
}
.timer > .icon {
  width: 15px;
  height: 15px;
}
.session-heading {
  text-align: center;
}
.session-heading > p:first-child {
  font-size: 13px;
  margin-bottom: 12px;
}
.session-heading h1 {
  font-size: clamp(30px, 3.5vw, 46px);
  letter-spacing: -1.5px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.session-heading > p:last-child {
  font-size: 15px;
  margin: 12px 0 0;
}
.session-progress {
  max-width: 630px;
  margin: 26px auto 33px;
}
.session-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 9px;
  color: var(--muted);
}
.progress-track {
  background: #e8e9db;
  height: 7px;
  border-radius: 6px;
  overflow: hidden;
}
.progress-track i {
  display: block;
  background: var(--coral);
  height: 100%;
  width: 0;
  transition: width 0.55s var(--ease);
  border-radius: 6px;
}
.recitation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 38px;
  align-items: start;
}
.recitation-sheet {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 23px;
  padding: 11px 25px 8px;
}
.recitation-items li {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 64px;
  padding: 16px 0;
  border-bottom: 1px solid #eeeee5;
  transition:
    background 0.3s,
    color 0.3s;
  line-height: 1.5;
}
.answer-content {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  overflow-wrap: anywhere;
}
.hidden-answer {
  display: flex;
  gap: 7px;
  align-items: center;
}
.hidden-answer i {
  width: 65px;
  height: 9px;
  background: #e8e9df;
  border-radius: 7px;
}
.hidden-answer i:nth-child(2) {
  width: 38px;
}
.recitation-items li:nth-child(3n) .hidden-answer i:first-child {
  width: 88px;
}
.recitation-items li:nth-child(2n) .hidden-answer i:nth-child(2) {
  width: 52px;
}
.answer-check {
  width: 44px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}
.found .answer-content {
  animation: answer-in 0.4s var(--ease);
}
.found .answer-check {
  color: #52713a;
  animation: check-in 0.4s var(--ease);
}
.found .item-number {
  color: #52713a;
}
.recitation-controls {
  position: sticky;
  top: 15px;
}
.voice-stage {
  text-align: center;
  --level: 0;
}
.voice-memo {
  width: 76px;
  height: 76px;
  margin: 4px auto 10px;
  transform: rotate(-4deg);
  transition: transform 0.2s;
}
.voice-stage.listening .voice-memo {
  transform: rotate(0) scale(calc(1 + var(--level) * 0.08));
}
.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 35px;
  margin: 4px auto 11px;
}
.waveform i {
  width: 3px;
  height: 4px;
  border-radius: 5px;
  background: #c4caae;
  transition: height 0.08s;
}
.listening .waveform i {
  background: var(--coral);
  height: calc(5px + var(--level) * 28px);
  transform: scaleY(calc(0.3 + mod(var(--bar), 5) * 0.18));
}
.voice-stage h2 {
  font-size: 23px;
}
.voice-stage > p {
  font-size: 13px;
  max-width: 245px;
  min-height: 39px;
  margin: 7px auto 12px;
}
.mic-button {
  display: grid;
  place-items: center;
  width: 69px;
  height: 69px;
  border-radius: 50%;
  background: var(--coral);
  color: white;
  margin: auto;
  box-shadow: 0 0 0 8px #e953360b;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.mic-button > .icon {
  width: 29px;
  height: 29px;
}
.mic-button:hover:not(:disabled) {
  transform: scale(1.04);
  box-shadow: 0 0 0 10px #e9533613;
}
.mic-button[aria-pressed="true"] {
  background: var(--ink);
  box-shadow: 0 0 0 8px #dce9a8;
}
.mic-button.quota-reached {
  background: var(--line);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}
.voice-stage > span {
  font-size: 12px;
  display: block;
  margin-top: 14px;
  color: var(--muted);
}
.or {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #818477;
  font-size: 11px;
  margin: 18px 0 15px;
}
.or:before,
.or:after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.answer-input {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid #d3d7c5;
  border-radius: 14px;
  padding: 4px;
}
.answer-input:focus-within {
  border-color: var(--coral);
}
.answer-input input {
  border: 0;
  background: none;
  box-shadow: none;
  padding: 10px 8px;
  width: 100%;
  min-width: 0;
  font-size: 14px;
}
.answer-input button {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.answer-input button > .icon {
  width: 18px;
}
.answer-feedback {
  font-size: 13px;
  min-height: 27px;
  padding-top: 9px;
  color: var(--coral-dark);
  line-height: 1.4;
}
.recitation-controls > .btn {
  font-size: 13px;
  margin-top: 12px;
}
.transcript-box {
  font-size: 13px;
  margin: 10px 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.transcript-box > span {
  font-size: 11px;
  color: var(--muted);
}
.transcript-box > p {
  margin-top: 3px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.pause-overlay {
  position: fixed;
  inset: 0;
  background: #fffffff8;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
}
.pause-overlay h2 {
  font-size: 35px;
}
.pause-overlay p {
  text-align: center;
  padding: 0 20px;
}
.result {
  text-align: center;
  max-width: 730px;
  margin: 0 auto;
}
.result-mascot {
  position: relative;
  display: inline-block;
  margin: 3px 0 22px;
}
.result-memo {
  width: 109px;
  height: 109px;
  animation: hello 0.7s var(--ease);
}
.result h1 {
  font-size: clamp(37px, 4.5vw, 57px);
  letter-spacing: -2px;
}
.result > p {
  margin-top: 14px;
  font-size: 16px;
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 36px auto 26px;
  max-width: 600px;
}
.result-stats > div {
  display: grid;
  gap: 6px;
  padding: 4px 10px;
  border-right: 1px solid var(--line);
}
.result-stats > div:last-child {
  border: 0;
}
.result-stats strong {
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -1.5px;
}
.result-stats strong > span {
  font-size: 23px;
  color: var(--muted);
  font-weight: 400;
}
.result-stats > div > span {
  font-size: 13px;
  color: var(--muted);
}
.result .assisted-note {
  font-size: 13px;
  color: var(--coral-dark);
  margin: 0 0 20px;
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 25px 0 48px;
}
.result-actions > .text-btn {
  flex-basis: 100%;
  font-size: 13px;
  min-height: 35px;
}
.result-review {
  max-width: 700px;
  margin: auto;
}
.result-review .section-heading > span {
  font-size: 12px;
  color: var(--muted);
}
.result-review h2 {
  font-size: 22px;
}

.celebration {
  position: absolute;
  inset: -25px;
  pointer-events: none;
}
.celebration i {
  position: absolute;
  width: 7px;
  height: 12px;
  border-radius: 2px;
  background: var(--coral);
  left: 0;
  top: 35%;
  animation: confetti 0.9s var(--ease) both;
}
.celebration i:nth-child(2) {
  left: 18%;
  top: 0;
  background: #a4b975;
  transform: rotate(40deg);
  animation-delay: 0.05s;
}
.celebration i:nth-child(3) {
  left: 83%;
  top: 8%;
  background: #baca84;
  transform: rotate(-25deg);
  animation-delay: 0.1s;
}
.celebration i:nth-child(4) {
  left: 96%;
  top: 43%;
  transform: rotate(30deg);
  animation-delay: 0.15s;
}
.celebration i:nth-child(5) {
  left: 16%;
  top: 89%;
  background: #a4b975;
  transform: rotate(60deg);
  animation-delay: 0.1s;
}
.celebration i:nth-child(6) {
  left: 90%;
  top: 85%;
  background: #c6be8d;
  transform: rotate(-40deg);
  animation-delay: 0.2s;
}
.progress-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  padding: 8px 0 35px;
  margin-bottom: 34px;
  gap: 20px;
}
.progress-stats > div {
  display: grid;
  gap: 5px;
}
.progress-stats strong {
  font-size: 43px;
  letter-spacing: -1.5px;
  line-height: 1.2;
}
.progress-stats strong > small {
  font-size: 19px;
  letter-spacing: -0.5px;
  font-weight: 400;
}
.progress-stats span {
  font-size: 13px;
  color: var(--muted);
}
.progress-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 50px;
}
.progress-layout h2 {
  font-size: 23px;
}
.progress-layout p {
  font-size: 13px;
  margin-top: 7px;
}
.week-chart {
  display: flex;
  gap: 15px;
  align-items: flex-end;
  margin-top: 20px;
}
.week-chart > div {
  flex: 1;
  display: grid;
  text-align: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.bar-space {
  height: 130px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.bar-space i {
  display: block;
  width: 100%;
  max-width: 32px;
  background: #cedaae;
  border-radius: 7px 7px 2px 2px;
  min-height: 2px;
}
.bar-space .today {
  background: var(--coral);
}
.week-chart small {
  font-size: 11px;
}
.next-reviews > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.next-reviews > button:first-of-type {
  margin-top: 10px;
}
.next-reviews > button > span {
  font-size: 16px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.next-reviews small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.next-reviews .icon {
  width: 19px;
}
.compact-empty {
  text-align: center;
  padding: 26px 0;
}
.compact-empty .memo {
  margin: auto;
}
.compact-empty .btn {
  font-size: 13px;
}
.history {
  margin-top: 42px;
}
.history h2 {
  font-size: 23px;
  margin-bottom: 12px;
}
.history li {
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.history li > div {
  flex: 1;
  min-width: 0;
}
.history strong {
  display: block;
  overflow-wrap: anywhere;
}
.history li > div > span {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 3px;
}
.history-icon {
  background: #e8ecd9;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.history-icon > .icon {
  width: 18px;
  height: 18px;
  color: #657544;
}
.history li > b {
  font-size: 23px;
  white-space: nowrap;
}
.history li > b > span {
  font-size: 16px;
  color: var(--muted);
  font-weight: 400;
}
.history-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 24px 0;
  gap: 15px;
}
.history-empty p,
.history-empty .btn {
  font-size: 14px;
}
.settings-data {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.settings-data summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.settings-data summary::-webkit-details-marker {
  display: none;
}
.settings-data summary:focus-visible {
  outline: 2px solid var(--coral-dark);
  outline-offset: 3px;
  border-radius: 16px;
}
.settings-data[open] summary .icon {
  transform: rotate(180deg);
}
.settings-data-body {
  padding: 0 20px 20px;
}
.settings-data-body h3 {
  margin-bottom: 8px;
  font-size: 16px;
}
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 275px;
  gap: 45px;
}
.settings-layout h2 {
  font-size: 22px;
  margin-bottom: 13px;
}
.setting-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 400;
  position: relative;
  cursor: pointer;
}
.setting-row > span:first-child {
  flex: 1;
  min-width: 0;
}
.setting-row strong {
  font-size: 16px;
  font-weight: 500;
  display: block;
}
.setting-row small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.6;
}
.setting-row input[type="checkbox"] {
  position: absolute;
  right: 1px;
  opacity: 0;
  width: 44px;
  height: 44px;
  margin: 0;
}
.switch {
  width: 40px;
  height: 24px;
  border-radius: 20px;
  background: #d9dcd7;
  flex-shrink: 0;
  position: relative;
  pointer-events: none;
  transition: background 0.2s;
}
.switch:after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 3px;
  left: 3px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 1px 2px #0001;
  transition: transform 0.2s;
}
.setting-row input:checked + .switch {
  background: var(--coral);
}
.setting-row input:checked + .switch:after {
  transform: translateX(16px);
}
.setting-row input:focus-visible + .switch {
  outline: 3px solid var(--coral-dark);
  outline-offset: 4px;
}
.setting-row select {
  font-size: 13px;
  padding: 10px 9px;
  max-width: 130px;
}
.setting-section-title {
  margin-top: 35px;
}
.settings-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 17px;
}
.settings-buttons > .btn {
  font-size: 13px;
  min-height: 44px;
  padding: 10px 14px;
}
.file-button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.file-button input {
  position: absolute;
  inset: 0;
  margin: 0 !important;
  opacity: 0;
  cursor: pointer;
}
.settings-aside {
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 23px;
  align-self: start;
}
.settings-aside > .memo {
  width: 73px;
  height: 73px;
  transform: rotate(8deg);
  margin-bottom: 24px;
}
.settings-aside > p {
  font-size: 14px;
}
.quotas {
  margin: 19px 0;
}
.quotas li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #dcded0;
  font-size: 12px;
}
.quotas b {
  font-size: 13px;
  text-align: right;
}
.settings-aside .field-help {
  font-size: 12px;
  margin-top: 18px;
}
.settings-aside > .btn {
  font-size: 13px;
}
.settings-aside > a {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
.settings-aside > a > .icon {
  width: 17px;
}
#notifications {
  position: fixed;
  bottom: 28px;
  left: calc(50% + 100px);
  transform: translate(-50%, 20px);
  z-index: 80;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  padding: 15px 22px;
  max-width: min(600px, calc(100vw - 32px));
  width: max-content;
  font-size: 14px;
  box-shadow: 0 4px 25px #0002;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
#notifications.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  width: min(510px, calc(100% - 32px));
  border: 1px solid #e0e0d4;
  background: var(--paper);
  color: var(--ink);
  padding: 26px;
  border-radius: 24px;
  box-shadow: 0 20px 80px #22251f20;
  max-height: calc(100svh - 40px);
  overflow: auto;
}
dialog::backdrop {
  background: #22251f66;
  backdrop-filter: blur(3px);
}
dialog[open] {
  animation: dialog-in 0.2s var(--ease);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.dialog-heading h2 {
  font-size: 25px;
}
.dialog-heading .icon-btn {
  margin: -8px -10px -8px 0;
  flex-shrink: 0;
}
dialog p {
  font-size: 15px;
  line-height: 1.7;
  margin: 12px 0;
}
.mobile-plus-steps {
  padding-left: 24px;
  list-style: decimal;
  font-size: 15px;
  line-height: 1.7;
}
.mobile-plus-steps li {
  padding-left: 4px;
  margin: 14px 0;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 23px;
}
.dialog-actions .btn {
  font-size: 14px;
}
@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes hello {
  0% {
    transform: translateY(8px) rotate(-8deg);
    opacity: 0;
  }
  60% {
    transform: translateY(-4px) rotate(12deg);
    opacity: 1;
  }
  100% {
    transform: translateY(0) rotate(6deg);
    opacity: 1;
  }
}
@keyframes answer-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes check-in {
  from {
    transform: scale(0.4);
  }
  60% {
    transform: scale(1.15);
  }
  to {
    transform: scale(1);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes confetti {
  0% {
    opacity: 0;
    translate: 0 14px;
    scale: 0.4;
  }
  35% {
    opacity: 1;
    translate: 0 -5px;
    scale: 1;
  }
  100% {
    opacity: 1;
    translate: 0 0;
  }
}
@media (min-width: 1550px) {
  .page {
    padding-top: 48px;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 222px;
    padding: 34px 18px 24px;
  }
  .workspace {
    margin-left: 222px;
  }
  .topbar {
    padding: 0 38px;
  }
  .page {
    padding-left: 38px;
    padding-right: 38px;
  }
  .footer {
    padding-left: 38px;
    padding-right: 38px;
  }
  .study-layout {
    gap: 26px;
    grid-template-columns: minmax(0, 1fr) 250px;
  }
  .study-options > .btn {
    font-size: 14px;
  }
  .recitation-layout {
    gap: 25px;
    grid-template-columns: minmax(0, 1fr) 240px;
  }
  .editor-form,
  .import-layout,
  .settings-layout {
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) 225px;
  }
  .progress-layout {
    gap: 30px;
  }
  .footer {
    flex-direction: column;
    gap: 0;
  }
  .study-sheet {
    padding: 22px;
  }
  .sheet-heading h2 {
    font-size: 17px;
  }
}
@media (max-width: 1000px) and (min-width: 761px) {
  .sidebar {
    width: 190px;
    padding: 32px 14px;
  }
  .workspace {
    margin-left: 190px;
  }
  .brand {
    gap: 6px;
  }
  .brand span {
    font-size: 26px;
  }
  .brand .memo {
    width: 32px;
    height: 32px;
  }
  .nav-item {
    padding: 12px 10px;
    font-size: 14px;
  }
  .sidebar-create {
    font-size: 13px;
    padding: 12px;
  }
  .local-note {
    padding-left: 3px;
    padding-right: 3px;
  }
  .local-note .icon {
    display: none;
  }
  .page,
  .topbar,
  .footer {
    padding-left: 28px;
    padding-right: 28px;
  }
  .study-layout,
  .recitation-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 20px;
  }
  .study-sheet {
    padding: 18px;
  }
  .sheet-heading h2 {
    font-size: 16px;
  }
  .editor-form {
    grid-template-columns: 1fr;
  }
  .editor-aside {
    display: none;
  }
  .import-layout,
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .import-aside,
  .settings-aside {
    max-width: none;
  }
  .import-aside {
    border-top: 1px solid var(--line);
    padding-top: 24px;
  }
  .settings-aside > .memo {
    float: right;
  }
  .settings-aside > .field-help {
    max-width: 480px;
  }
  .try-section {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }
  .deck-status {
    width: 105px;
  }
  .progress-layout {
    grid-template-columns: 1fr;
  }
  .recitation-sheet {
    padding: 8px 17px;
  }
  .hidden-answer i {
    max-width: 55px;
  }
  .hidden-answer i:nth-child(2) {
    display: none;
  }
}
@media (max-width: 760px) {
  h1 {
    font-size: 45px;
    letter-spacing: -1.8px;
  }
  .sidebar {
    position: relative;
    width: auto;
    height: 75px;
    padding: 22px 22px 0;
    border: 0;
    display: block;
  }
  .sidebar nav,
  .sidebar-bottom {
    display: none;
  }
  .brand {
    margin: 0;
    gap: 7px;
  }
  .brand .memo {
    width: 32px;
    height: 32px;
  }
  .brand span {
    font-size: 27px;
  }
  .workspace {
    margin: 0;
  }
  .app-shell {
    display: block;
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }
  .topbar {
    height: 0;
    padding: 0;
  }
  .topbar > span {
    display: none;
  }
  .top-actions {
    position: absolute;
    right: 16px;
    top: 20px;
    gap: 2px;
  }
  .top-actions > .icon-btn:last-child {
    display: inline-flex;
  }
  .top-actions > .icon-btn {
    width: 42px;
    height: 42px;
  }
  .offline {
    position: absolute;
    right: 0;
    top: 47px;
    white-space: nowrap;
    font-size: 11px;
  }
  .page {
    padding: 24px 22px 40px;
    animation-duration: 0.25s;
  }
  .footer {
    padding: 0 22px 23px;
    font-size: 10px;
    gap: 0;
  }
  .footer > span {
    display: none;
  }
  .footer > div {
    justify-content: space-between;
    gap: 10px;
  }
  .footer a {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
  }
  .footer > div > span {
    display: flex;
    gap: 3px;
    align-items: center;
  }
  .mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--paper);
    border-top: 1px solid var(--line);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    z-index: 20;
  }
  .mobile-nav > .nav-item {
    flex-direction: column;
    gap: 4px;
    border-radius: 13px;
    font-size: 11px;
    padding: 6px 18px;
    min-width: 100px;
    min-height: 50px;
    color: var(--muted);
    background: transparent;
  }
  .mobile-nav > .nav-item.selected {
    color: var(--ink);
  }
  .mobile-nav > .nav-item > .icon {
    width: 23px;
    height: 23px;
  }
  .mobile-nav small {
    display: none;
  }
  .mobile-add {
    width: 55px;
    height: 50px;
    background: var(--coral);
    color: white;
    border-radius: 16px;
  }
  .mobile-add:hover {
    background: var(--coral-dark);
  }
  .library-section {
    margin-top: 28px;
  }
  .section-heading {
    margin-bottom: 15px;
  }
  .section-heading h2 {
    font-size: 23px;
    gap: 9px;
  }
  .filters {
    gap: 1px;
  }
  .filters button {
    font-size: 12px;
    padding: 8px 10px;
    min-height: 38px;
  }
  .first-list {
    padding: 22px 0 24px;
  }
  .first-list h3 {
    font-size: 18px;
  }
  .first-list p {
    font-size: 13px;
  }
  .first-list .btn {
    font-size: 13px;
  }
  .empty-drawing {
    width: 53px;
    height: 53px;
  }
  .empty-drawing > .icon {
    width: 26px;
    height: 26px;
  }
  .try-section {
    margin-top: 15px;
    padding-top: 23px;
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }
  .sample-link {
    width: 100%;
    padding: 12px 0;
  }
  .sample-link > .icon {
    margin-left: auto;
  }
  .deck-row {
    gap: 13px;
    padding: 18px 0;
  }
  .deck-symbol {
    width: 45px;
    height: 51px;
    border-radius: 12px;
  }
  .deck-info strong {
    font-size: 18px;
  }
  .deck-info > span {
    font-size: 12px;
  }
  .deck-status {
    display: none;
  }
  .deck-row > .icon {
    width: 20px;
  }
  .page-back {
    margin: -3px 0 23px;
  }
  .page-back > div {
    gap: 0;
  }
  .page-back > .btn {
    font-size: 13px;
  }
  .detail-heading {
    margin-bottom: 28px;
  }
  .detail-heading h1 {
    font-size: 36px;
    letter-spacing: -1.3px;
  }
  .detail-heading > p {
    font-size: 15px;
    margin-top: 12px;
  }
  .subject {
    font-size: 13px;
  }
  .study-layout {
    display: flex;
    flex-direction: column-reverse;
    gap: 26px;
  }
  .study-sheet {
    width: 100%;
    padding: 21px;
    border-radius: 21px;
  }
  .study-options {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
    width: 100%;
    padding: 0;
  }
  .study-options > h2,
  .study-options > p {
    display: none;
  }
  .study-options fieldset {
    margin: 0;
  }
  .study-options legend {
    font-size: 13px;
  }
  .segmented {
    padding: 3px;
  }
  .segmented button {
    font-size: 12px;
    padding: 8px 3px;
    min-height: 38px;
  }
  .study-options .field-help {
    font-size: 11px;
    line-height: 1.5;
    margin: 8px 0 0;
  }
  .start-area {
    grid-column: 1/-1;
    border: 0;
    padding: 0;
    margin: 0;
  }
  .start-area > .memo,
  .start-area > p {
    display: none;
  }
  .start-area > .btn {
    min-height: 52px;
    font-size: 15px;
  }
  .start-area > small {
    font-size: 11px;
  }
  .review-note {
    grid-column: 1/-1;
    margin: 0;
    font-size: 11px;
  }
  .sheet-heading {
    padding-bottom: 16px;
  }
  .sheet-heading h2 {
    font-size: 18px;
  }
  .study-items li {
    font-size: 17px;
    padding: 15px 0;
    gap: 14px;
  }
  .editor-form {
    display: block;
  }
  .editor-aside {
    display: none;
  }
  .form-row {
    gap: 20px;
    grid-template-columns: 1fr;
    margin-bottom: 23px;
  }
  .editor-fields label {
    font-size: 14px;
  }
  input,
  textarea,
  select {
    font-size: 16px;
  }
  .editor-caption {
    font-size: 11px;
    gap: 10px;
  }
  .check-row {
    font-size: 13px !important;
  }
  .form-actions {
    align-items: stretch;
    flex-direction: column;
    margin-top: 21px;
    gap: 10px;
  }
  .form-actions > p {
    order: 2;
    text-align: center;
    font-size: 11px;
  }
  .form-actions > .btn {
    min-height: 50px;
    font-size: 15px;
  }
  .editor-caption #item-count {
    white-space: nowrap;
  }
  .import-layout {
    display: flex;
    flex-direction: column;
    gap: 34px;
  }
  .dropzone {
    padding: 30px 16px;
  }
  .dropzone > strong {
    font-size: 20px;
  }
  .dropzone > span {
    font-size: 13px;
  }
  .dropzone > small {
    font-size: 11px;
  }
  .import-aside {
    padding-top: 25px;
    border-top: 1px solid var(--line);
  }
  .import-aside p {
    font-size: 14px;
  }
  .import-aside h2 {
    font-size: 23px;
  }
  #import-form .form-actions {
    align-items: stretch;
  }
  #import-form .form-actions .field-help {
    max-width: none;
    font-size: 12px;
  }
  .in-session .topbar {
    height: 0;
  }
  .in-session .sidebar {
    display: none;
  }
  .in-session .top-actions {
    display: none;
  }
  .in-session .mobile-nav {
    display: none;
  }
  .in-session .app-shell {
    padding-bottom: 0;
  }
  .in-session .footer {
    display: none;
  }
  .page-session {
    padding-top: 13px;
    padding-bottom: 26px;
  }
  .session-top {
    margin-bottom: 22px;
  }
  .session-tools {
    gap: 7px;
  }
  .session-heading h1 {
    font-size: 31px;
    letter-spacing: -1px;
  }
  .session-heading > p:first-child {
    font-size: 11px;
    margin-bottom: 9px;
  }
  .session-heading > p:last-child {
    font-size: 13px;
    max-width: 290px;
    margin: 10px auto 0;
  }
  .session-progress {
    margin: 23px auto 22px;
  }
  .session-progress > div:first-child {
    font-size: 12px;
  }
  .recitation-layout {
    display: flex;
    flex-direction: column;
    gap: 23px;
  }
  .recitation-sheet {
    width: 100%;
    padding: 4px 18px 2px;
    border-radius: 20px;
  }
  .recitation-items {
    max-height: 36svh;
    overflow: auto;
    overscroll-behavior: contain;
  }
  .recitation-items li {
    min-height: 53px;
    padding: 13px 0;
    gap: 12px;
  }
  .answer-content {
    font-size: 16px;
  }
  .recitation-controls {
    position: static;
    width: 100%;
  }
  .voice-stage {
    position: relative;
    display: grid;
    grid-template-columns: 65px 1fr 62px;
    column-gap: 13px;
    text-align: left;
    align-items: center;
    padding: 0 0 9px;
  }
  .voice-memo {
    grid-column: 1;
    grid-row: 1/4;
    width: 57px;
    height: 57px;
    margin: 0;
  }
  .waveform {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-start;
    height: 20px;
    margin: 0 0 3px;
    gap: 3px;
  }
  .waveform i {
    width: 2.5px;
  }
  .voice-stage > h2 {
    grid-column: 2;
    grid-row: 2;
    font-size: 21px;
  }
  .voice-stage > p {
    grid-column: 2;
    grid-row: 3;
    font-size: 11px;
    line-height: 1.5;
    margin: 4px 0 0;
    min-height: 0;
    max-width: none;
  }
  .mic-button {
    grid-column: 3;
    grid-row: 1/4;
    width: 56px;
    height: 56px;
  }
  .mic-button > .icon {
    width: 25px;
    height: 25px;
  }
  .voice-stage > #mic-caption {
    display: none;
  }
  .or {
    margin: 9px 0 11px;
    font-size: 10px;
  }
  .answer-input input {
    font-size: 16px;
    padding: 10px;
  }
  .answer-feedback {
    font-size: 12px;
    min-height: 24px;
  }
  .recitation-controls > .btn {
    min-height: 44px;
    margin-top: 10px;
    font-size: 13px;
  }
  .transcript-box {
    margin: 3px 0;
    font-size: 12px;
  }
  .result {
    padding-top: 12px;
  }
  .result-mascot {
    margin-bottom: 20px;
  }
  .result-memo {
    width: 91px;
    height: 91px;
  }
  .result h1 {
    font-size: 40px;
  }
  .result > p {
    font-size: 14px;
    max-width: 310px;
    margin: 13px auto 0;
  }
  .result-stats {
    margin: 30px 0 22px;
  }
  .result-stats strong {
    font-size: 32px;
    letter-spacing: -1px;
  }
  .result-stats strong > span {
    font-size: 19px;
  }
  .result-stats > div > span {
    font-size: 11px;
  }
  .result-actions {
    gap: 10px;
    margin: 23px 0 32px;
  }
  .result-actions > .btn {
    font-size: 13px;
    padding: 12px 14px;
  }
  .result-review h2 {
    font-size: 20px;
  }

  .result-review .section-heading > span {
    font-size: 11px;
  }
  .progress-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
    padding-bottom: 27px;
    margin-bottom: 27px;
  }
  .progress-stats strong {
    font-size: 39px;
  }
  .progress-stats span {
    font-size: 12px;
  }
  .progress-layout {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .week-chart {
    gap: 15px;
  }
  .bar-space {
    height: 125px;
  }
  .history {
    margin-top: 35px;
  }
  .history li {
    gap: 12px;
  }
  .history strong {
    font-size: 15px;
  }
  .history li > div > span {
    font-size: 11px;
  }
  .history li > b {
    font-size: 22px;
  }
  .history-empty {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .settings-layout {
    display: flex;
    flex-direction: column;
    gap: 35px;
  }
  .setting-row {
    gap: 12px;
    padding: 18px 0;
  }
  .setting-row strong {
    font-size: 15px;
  }
  .setting-row small {
    font-size: 12px;
  }
  .setting-row select {
    max-width: 120px;
    font-size: 14px;
  }
  .settings-aside {
    width: 100%;
    padding: 25px;
  }
  .settings-aside > .memo {
    float: right;
    width: 70px;
    height: 70px;
  }
  .settings-buttons {
    flex-direction: column;
  }
  .settings-buttons > .btn {
    min-height: 46px;
    font-size: 14px;
  }
  .setting-section-title {
    margin-top: 31px;
  }
  #notifications {
    left: 50%;
    bottom: calc(88px + env(safe-area-inset-bottom));
    font-size: 13px;
    padding: 14px 18px;
    max-width: calc(100vw - 30px);
  }
  .in-session #notifications {
    bottom: 20px;
  }
  dialog {
    padding: 23px;
    border-radius: 23px;
  }
  .dialog-heading h2 {
    font-size: 24px;
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
  .dialog-actions .btn {
    flex: 1;
    min-width: 110px;
    font-size: 13px;
  }
  dialog p {
    font-size: 14px;
  }
}
@media (max-width: 380px) {
  .page {
    padding-left: 18px;
    padding-right: 18px;
  }
  .sidebar {
    padding-left: 18px;
  }
  .top-actions {
    right: 10px;
  }
  .brand span {
    font-size: 25px;
  }
  .brand .memo {
    width: 29px;
    height: 29px;
  }
  .section-heading h2 {
    font-size: 21px;
  }
  .filters button {
    font-size: 11px;
    padding: 8px;
  }
  .voice-stage {
    grid-template-columns: 46px 1fr 51px;
    column-gap: 10px;
  }
  .voice-memo {
    width: 45px;
    height: 45px;
  }
  .voice-stage > h2 {
    font-size: 19px;
  }
  .waveform {
    gap: 2px;
  }
  .mic-button {
    width: 49px;
    height: 49px;
  }
  .result-stats strong {
    font-size: 29px;
  }
  .result-stats > div > span {
    font-size: 10px;
  }
  .result-actions > .btn {
    padding: 12px;
    font-size: 12px;
  }
  .mobile-nav > .nav-item {
    min-width: 95px;
    padding: 6px 12px;
  }
  .footer {
    padding-left: 18px;
    padding-right: 18px;
  }
  .footer > div {
    font-size: 9px;
    gap: 4px;
  }
  .study-options {
    gap: 12px;
  }
  .segmented button {
    font-size: 11px;
  }
  .settings-aside {
    padding: 22px;
  }
  .session-heading h1 {
    font-size: 29px;
  }
  .hidden-answer i {
    max-width: 65px;
  }
  .recitation-items li:nth-child(2n) .hidden-answer i:nth-child(2) {
    width: 38px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.less-motion *,
.less-motion *:before,
.less-motion *:after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
@media print {
  .sidebar,
  .topbar,
  .mobile-nav,
  .footer,
  .page-back,
  .study-options {
    display: none;
  }
  .workspace {
    margin: 0;
  }
  .page {
    padding: 0;
    max-width: none;
  }
  .study-layout {
    display: block;
  }
  .study-sheet {
    border: 0;
  }
  .study-items li {
    break-inside: avoid;
  }
}
.answer-input input:focus-visible {
  outline: 0;
}
.answer-input:focus-within {
  box-shadow: 0 0 0 3px #e9533615;
}
@media (min-width: 761px) {
  .recitation-items {
    max-height: max(260px, calc(100svh - 410px));
    overflow: auto;
    overscroll-behavior: contain;
  }
}
@media (max-width: 760px) {
  .top-actions {
    z-index: 12;
  }
}
.segmented button {
  color: #626658;
}
.or {
  color: #6f7267;
}
.settings-aside {
  --muted: #626658;
}

/* Quiz preparation: continuous precision with a keyboard-accessible native range. */
.precision-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.precision-heading label {
  font-size: 14px;
  font-weight: 600;
}
.precision-heading output {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.precision-control input[type="range"] {
  width: 100%;
  min-height: 44px;
  margin: 4px 0;
  padding: 0;
  accent-color: var(--coral);
  cursor: pointer;
  box-shadow: none;
}
.precision-scale {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}
/* The title, controls and progress share a compact header on every viewport. */
.in-session .topbar {
  display: none;
}
.page-session {
  padding-top: 20px;
}
.page-session .session-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  margin-bottom: 14px;
}
.page-session .session-heading {
  text-align: left;
  min-width: 0;
}
.page-session .session-heading h1 {
  font-size: clamp(23px, 2.4vw, 32px);
  letter-spacing: -0.8px;
  line-height: 1.15;
  margin: 0;
}
.page-session .session-heading p {
  font-size: 12px;
  margin: 5px 0 0;
  max-width: none;
}
.page-session .session-progress {
  max-width: none;
  margin: 0 0 18px;
}
.page-session .session-tools {
  gap: 7px;
}
@media (max-width: 600px) {
  .page-session {
    padding-top: 10px;
  }
  .page-session .session-top {
    grid-template-columns: 1fr auto;
    gap: 5px 10px;
    margin-bottom: 12px;
  }
  .page-session .session-heading {
    grid-row: 2;
    grid-column: 1 / -1;
  }
  .page-session .session-heading h1 {
    font-size: 24px;
  }
  .page-session .session-tools {
    grid-row: 1;
    grid-column: 2;
    gap: 2px;
  }
}

/* Consulted answers remain visibly distinct from successful recall. */
.revealed .answer-content small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.reveal-answer {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.reveal-answer:disabled {
  opacity: 0.65;
  cursor: default;
}
.quiz-fullscreen .sidebar,
.quiz-fullscreen .topbar,
.quiz-fullscreen .mobile-nav,
.quiz-fullscreen .footer {
  display: none;
}
.quiz-fullscreen .workspace {
  margin-left: 0;
}
.quiz-fullscreen .app-shell {
  padding-bottom: 0;
}
.quiz-fullscreen .page-session {
  max-width: none;
  min-height: 100dvh;
  padding: 24px clamp(20px, 4vw, 72px);
}
@media (min-width: 901px) {
  .quiz-fullscreen .recitation-items {
    max-height: max(260px, calc(100dvh - 180px));
    overflow-y: auto;
  }
}
@media (max-width: 600px) {
  .quiz-fullscreen .page-session {
    padding: 12px 20px 24px;
  }
}

/* Keep the original welcome and creation block, with a compact header. */
.page-library {
  padding-top: 8px;
}
.page-library .intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin: 0 0 20px;
}
.page-library .intro h1 {
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: -1px;
}
.page-library .intro p {
  margin: 10px 0 0;
  font-size: 14px;
}
.intro-note {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.intro-note > .icon {
  width: 25px;
  height: 25px;
  color: #828a6e;
}
.intro-note b {
  font-size: 12px;
  font-weight: 400;
}
.create-banner {
  background: var(--lime);
  border-radius: 25px;
  padding: 24px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  overflow: hidden;
}
.create-banner h2 {
  font-size: 25px;
  max-width: 410px;
}
.create-banner p {
  margin: 7px 0 16px;
  color: #596145;
  font-size: 14px;
}
.create-banner .btn {
  min-height: 44px;
  font-size: 14px;
  border-radius: 12px;
}
.banner-mascot {
  display: flex;
  align-items: center;
  position: relative;
  padding-right: 36px;
  margin-right: 20px;
}
.banner-mascot .memo {
  width: 100px;
  height: 100px;
  transform: rotate(9deg);
}
.speech-lines {
  position: absolute;
  right: 0;
  top: 20px;
  width: 30px;
  height: 46px;
  color: #657443;
  transform: rotate(9deg);
}
.page-library .library-section {
  margin-top: 24px;
}
@media (min-width: 761px) {
  .workspace:has(.page-library) .topbar {
    height: 56px;
  }
  .workspace:has(.page-library) .topbar > span {
    visibility: hidden;
  }
}
@media (max-width: 1200px) {
  .intro-note {
    display: none;
  }
}
@media (max-width: 760px) {
  .page-library {
    padding-top: 12px;
  }
  .page-library .intro h1 {
    font-size: clamp(26px, 7.5vw, 32px);
  }
  .create-banner {
    padding: 20px;
    gap: 14px;
    border-radius: 23px;
  }
  .create-banner h2 {
    font-size: 22px;
  }
  .create-banner p {
    font-size: 13px;
  }
  .create-banner .btn {
    font-size: 13px;
    padding: 12px 16px;
  }
  .banner-mascot {
    padding: 0;
    margin: 0;
  }
  .banner-mascot .memo {
    width: 70px;
    height: 70px;
  }
  .speech-lines {
    display: none;
  }
}
@media (max-width: 380px) {
  .create-banner {
    padding: 18px;
    gap: 10px;
  }
  .create-banner h2 {
    font-size: 20px;
  }
  .banner-mascot .memo {
    width: 54px;
    height: 54px;
  }
}

.account-buttons {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}
.account-buttons .btn {
  min-height: 48px;
  white-space: normal;
}

/* Per-answer feedback shares the same colors and labels as the native app. */
#latest-comparison {
  margin: 14px 0;
  padding: 16px;
  background: #fff;
  border-radius: 14px;
  text-align: left;
}
#latest-comparison h3,
.review-answer h3 {
  font-size: 17px;
  margin: 0 0 8px;
}
.word-comparison {
  min-width: 0;
  margin: 10px 0 16px;
}
.word-comparison > strong {
  font-size: 15px;
}
.word-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 8px 0;
  font-size: 12px;
}
.word-matched {
  color: #265d35;
}
.word-missing {
  color: #805000;
}
.word-added {
  color: #a52a2a;
}
.compared-words {
  font-size: 17px;
  line-height: 1.9;
  overflow-wrap: anywhere;
  margin: 10px 0;
}
.compared-words .word-matched {
  background: #e6f2e7;
}
.compared-words .word-missing {
  background: #ffedc7;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.compared-words .word-added {
  background: #fbe6e6;
  text-decoration: line-through;
}
.comparison-note,
.comparison-context {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.comparison-context {
  margin: 8px 0;
  font-size: 12px;
}
.review-answer {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.review-attempt + .review-attempt {
  margin-top: 20px;
}

.answer-score {
  margin-top: 4px;
}
.answer-score > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.answer-score > summary::-webkit-details-marker {
  display: none;
}
.answer-score > summary:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.answer-score > summary > .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transform: rotate(0);
}
.answer-score[open] > summary > .icon {
  transform: rotate(180deg);
}
.answer-detail .word-comparison {
  margin: 6px 0 12px;
}
.recitation-items li:has(.answer-score[open]) {
  align-items: flex-start;
}
