.study-flow {
  --study-paper: var(--paper); --study-ink: var(--ink); --study-muted: var(--muted);
  --study-line: var(--line); --study-red: #b42e46; --study-green: #19734e;
  max-width: 700px; margin: 0 auto; color: var(--study-ink);
}
:root[data-theme=dark] .study-flow {
  --study-paper: #1c2129; --study-ink: #e1e3e8; --study-muted: #a0a7b2;
  --study-line: #2e343d; --study-red: #ff4563; --study-green: #41be82;
}
.study-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.study-heading h1 { font-size: 24px; margin: 0; }
.study-heading a { font-size: 12px; color: var(--study-muted); }
.study-flow .study-stages { display: flex; width: 100%; gap: 4px; padding: 4px; margin-bottom: 12px; background: var(--study-paper); border: 1px solid var(--study-line); border-radius: 9px; }
.study-stages > .tab { flex: 1; display: flex; justify-content: center; align-items: center; gap: 9px; min-height: 44px; font-size: 14px; text-align: center; white-space: normal; }
.study-stages .tab > span { color: var(--study-muted); font-size: 12px; }
.study-flow .study-decks { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 18px; padding: 0; background: transparent; }
.study-flow .study-decks .tab { padding: 7px 10px; font-size: 12px; }
.study-flow .study-wrap { max-width: 700px; margin: 0 auto; }
.study-session-line, .study-card-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--study-muted); font: 12px/1.6 ui-monospace, Consolas, monospace; letter-spacing: .3px; }
.study-session-line { margin: 0 0 10px; }
.study-flow .study-session-progress { appearance: none; display: block; width: 100%; height: 5px; border: 0; border-radius: 0; background: var(--study-line); margin: 0 0 16px; color: var(--study-ink); }
.study-session-progress::-webkit-progress-bar { background: var(--study-line); }
.study-session-progress::-webkit-progress-value { background: var(--study-ink); }
.study-session-progress::-moz-progress-bar { background: var(--study-ink); }
.study-flow .study-card { display: flex; flex-direction: column; text-align: left; min-height: 474px; padding: 24px 22px 12px; border: 1px solid var(--study-line); border-radius: 10px; background: var(--study-paper); color: var(--study-ink); }
.study-card-meta { margin-bottom: 17px; }
.study-word-header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.study-flow .study-card .study-word { margin: 0; font: 700 40px/1.2 Georgia, "Times New Roman", serif; letter-spacing: -.7px; overflow-wrap: anywhere; }
:root[data-theme=dark] .study-flow .study-card .study-word { font-family: Georgia, "Times New Roman", serif; }
.study-pos { color: var(--study-muted); font-size: 13px; font-weight: 650; }
.study-word-audio { display: grid; place-items: center; width: 32px; height: 32px; border: 0; background: none; color: var(--study-muted); margin-left: auto; cursor: pointer; }
.study-flow .pronunciation { margin: 6px 0 0; color: var(--study-muted); font-size: 20px; line-height: 1.4; }
.study-flow .study-example { border-top: 1px solid var(--study-line); border-bottom: 1px solid var(--study-line); margin-top: 18px; padding: 15px 0; }
.study-example-source { display: flex; align-items: center; gap: 15px; }
.study-flow .study-example-source p { flex: 1; min-width: 0; margin: 0; font: 500 23px/1.5 Georgia, "Times New Roman", serif; overflow-wrap: anywhere; }
.study-example-source strong { font-weight: 700; }
.study-pronounce { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; padding: 7px; border: 1px solid var(--study-muted); border-radius: 6px; color: var(--study-ink); background: transparent; cursor: pointer; }
.study-flow .study-example-translation { color: var(--study-muted); margin: 5px 45px 0 0; font-size: 16px; line-height: 1.55; }
.study-flow .study-answer { margin: 18px 0 0; padding: 0; border: 0; text-align: left; }
.study-flow .study-answer > .study-meaning { display: block; font: 700 24px/1.4 "Segoe UI", sans-serif; overflow-wrap: anywhere; }
.study-details { margin: 14px 0 10px; padding-top: 12px; border-top: 1px solid var(--study-line); }
.study-details > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 14px; margin: 0 0 7px; }
.study-details dt { color: var(--study-muted); font: 11px/1.8 ui-monospace, Consolas, monospace; }
.study-details dd { margin: 0; white-space: pre-line; font: 17px/1.5 Georgia, "Times New Roman", serif; overflow-wrap: anywhere; }
.study-context-link { margin-top: 10px; color: var(--study-muted); font-size: 12px; }
.study-flow .study-card-actions { justify-content: flex-start; gap: 6px 16px; margin: auto 0 0; padding-top: 30px; }
.study-flow .study-card-actions > button { flex: 0 1 auto; min-height: 40px; padding: 8px 0; border: 0; background: transparent; color: var(--study-muted); font: 12px/1.4 ui-monospace, Consolas, monospace; cursor: pointer; }
.study-flow .study-card-actions > button:hover:not(:disabled) { color: var(--study-ink); text-decoration: underline; }
.study-flow .study-card-actions > button:disabled { opacity: .4; cursor: default; }
.study-main-action { margin-top: 16px; }
.study-flow .study-main-action > .button { width: 100%; min-height: 70px; justify-content: center; border: 1px solid var(--study-ink); border-radius: 7px; color: var(--study-ink); background: transparent; font-size: 17px; font-weight: 650; }
.study-main-action > .button:hover:not(:disabled) { background: var(--study-paper); }
.study-flow .ratings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.study-flow .rating { min-height: 72px; border-radius: 7px; border: 1px solid currentColor; background: transparent; }
.study-flow .rating[data-rating=again] { color: var(--study-red); }
.study-flow .rating[data-rating=good] { color: var(--study-green); }
:root[data-theme=dark] .study-flow .rating[data-rating=again] { color: var(--study-red); }
:root[data-theme=dark] .study-flow .rating[data-rating=good] { color: var(--study-green); }
.study-flow .rating strong { font-size: 17px; }
.study-flow .rating small { color: var(--study-muted); font: 12px/1.5 ui-monospace, Consolas, monospace; }
.study-flow .rating:hover:not(:disabled) { background: var(--study-paper); }
.study-flow .study-hint { color: var(--study-muted); font: 11px/1.7 ui-monospace, Consolas, monospace; text-align: center; margin: 14px auto 0; max-width: 620px; }
.study-sync-note { text-align: center; color: var(--study-muted); font-size: 11px; margin: 9px 0; }
.study-sync-note a { text-decoration: underline; }
.study-browse { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 14px; font-size: 12px; color: var(--study-muted); }
.study-browse .button { min-width: 40px; min-height: 40px; padding: 8px 12px; }
.study-browse .disabled { opacity: .35; cursor: default; }
.study-flow :is(a, button):focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.study-flow .study-storage-links { font-size: 12px; margin: 17px 0; }
.study-flow .study-action-notice { margin: 0 0 12px; }
@media (max-width: 600px) {
  .study-heading { margin-bottom: 14px; }
  .study-heading h1 { font-size: 22px; }
  .study-heading a { font-size: 11px; }
  .study-stages > .tab { padding: 9px 5px; font-size: 13px; gap: 6px; }
  .study-flow .study-decks { margin-bottom: 14px; }
  .study-session-line { font-size: 10px; }
  .study-flow .study-card { padding: 20px 18px 9px; min-height: 390px; }
  .study-card-meta { font-size: 11px; margin-bottom: 14px; }
  .study-flow .study-card .study-word { font-size: 36px; }
  .study-pos { font-size: 12px; }
  .study-flow .study-example-source p { font-size: 21px; }
  .study-flow .study-example-translation { font-size: 15px; margin-right: 0; }
  .study-example-source { gap: 10px; }
  .study-flow .study-answer > .study-meaning { font-size: 22px; }
  .study-details > div { grid-template-columns: 74px minmax(0, 1fr); gap: 9px; }
  .study-details dd { font-size: 16px; }
  .study-flow .study-card-actions { gap: 8px 14px; padding-top: 22px; }
  .study-flow .study-card-actions > button { min-height: 44px; font-size: 11px; }
  .study-flow .study-main-action > .button { min-height: 62px; font-size: 16px; }
  .study-flow .ratings { gap: 10px; }
  .study-flow .rating { min-height: 66px; }
}
