:root {
  --paper: #f4efe6; --surface: #fffcf7; --ink: #1c1c1a; --muted: #66635d;
  --line: #d9d3ca; --teal: #9cc3c4; --teal-deep: #355c58; --coral: #e56b50; --focus: #184f61;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--paper); color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; }
button, input, select, textarea { font: inherit; color: inherit; max-width: 100%; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 10px; padding: 10px 18px; min-height: 44px; font-weight: 600; line-height: 1.35; }
button:hover { background: #eae4da; }
button:disabled { color: var(--muted); border-color: var(--line); background: transparent; cursor: not-allowed; }
a { color: inherit; text-underline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 4px;
}
input:not([type="checkbox"]):not([type="file"]), select, textarea {
  width: 100%; min-height: 48px; border: 1px solid var(--muted); border-radius: 8px; background: var(--surface); padding: 10px 12px;
}
textarea { resize: vertical; min-height: 96px; }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--ink); vertical-align: middle; margin: 8px; }
label { display: block; }
label:has(input[type="checkbox"]) { min-height: 44px; display: flex; align-items: center; gap: 4px; }
p { margin: 0 0 16px; overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 24px; overflow-wrap: anywhere; }
h1 { font: 400 clamp(2rem, 4vw, 3.5rem)/1.1 Georgia, "Times New Roman", serif; letter-spacing: -.035em; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 20px; min-width: 0; }
legend { padding: 0 8px; }
summary { cursor: pointer; min-height: 44px; padding: 10px 0; font-size: .875rem; font-weight: 600; }
details > :not(summary) { margin-top: 12px; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 20; padding: 12px; background: var(--ink); color: var(--surface); }
.skip-link:focus { top: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.student-header { max-width: 1200px; padding: 24px 32px; margin: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; border-bottom: 1px solid var(--ink); }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; text-decoration: none; min-height: 44px; }
.brand-logo { display: block; width: 208px; height: auto; }
.header-meta { display: flex; align-items: center; gap: 16px; font-size: .875rem; }
.header-meta a { min-height: 44px; display: flex; align-items: center; font-weight: 600; text-decoration: none; }
.test-badge { border: 1px solid var(--muted); padding: 3px 8px; border-radius: 4px; font-size: .875rem; white-space: nowrap; }
main { max-width: 1200px; margin: auto; padding: 48px 32px 32px; min-height: calc(100svh - 180px); }
.learning-section { max-width: 760px; margin: auto; }
#daily-learning-status { font-size: .875rem; color: var(--teal-deep); margin: 20px 0 0; min-height: 0; }
#daily-learning-status:empty { display: none; }
.learning-today { padding: 36px 0 16px; }
.learning-eyebrow, .eyebrow { text-transform: uppercase; font-size: .875rem; font-weight: 600; letter-spacing: .12em; color: var(--muted); margin-bottom: 18px; }
.learning-title { font: 400 clamp(2.5rem, 5.5vw, 4.5rem)/1.06 Georgia, "Times New Roman", serif; letter-spacing: -.045em; max-width: 660px; margin-bottom: 28px; }
.learning-summary { color: var(--muted); max-width: 560px; font-size: 1.125rem; line-height: 1.6; margin-bottom: 32px; }
.learning-primary { background: var(--teal); color: var(--ink); border: 2px solid var(--ink); min-height: 52px; box-shadow: 0 3px 0 var(--ink); padding: 14px 24px; }
.learning-primary:hover { background: #acd0d0; }
.learning-practice-start, .learning-practice-start:hover { background: var(--coral); }
.learning-practice-start > span { display: block; }
.learning-recall-start, .learning-recall-start:hover { background: #e6cb72; }
.learning-secondary { background: var(--surface); min-height: 48px; }
.learning-tertiary { border-color: transparent; background: transparent; box-shadow: none; font-weight: 500; color: var(--muted); padding: 10px 8px; min-height: 44px; }
.learning-tertiary:hover { background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.learning-today-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 24px 0; }
.learning-mode-switch { display: flex; gap: 12px; margin: 24px 0; }
.learning-mode-button { flex: 1; max-width: 180px; background: var(--surface); border: 2px solid var(--ink); min-height: 48px; }
.learning-mode-button[aria-pressed="true"] { background: var(--teal); font-weight: 750; box-shadow: 0 3px 0 var(--ink); }
.learning-today-note { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 24px; color: var(--muted); }
.learning-stats { display: flex; gap: 32px; margin: 40px 0; padding: 24px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.learning-stats > * { flex: 1; margin: 0; }
.learning-muted { color: var(--muted); font-size: .875rem; }
.learning-recall-success, .learning-recall-failure { display: flex; align-items: center; gap: 10px; margin: 20px 0; color: var(--ink); font-weight: 600; }
.learning-recall-success-icon, .learning-recall-failure-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; color: #247145; background: #e5f2e7; border: 2px solid currentColor; border-radius: 50%; }
.learning-recall-failure-icon { color: #a3342c; background: #fbe9e6; }
.learning-recall-success-icon .ui-icon, .learning-recall-failure-icon .ui-icon { width: 20px; height: 20px; stroke-width: 2.2; }
.learning-card-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.learning-card-toolbar p { margin: 0; font-size: .875rem; color: var(--muted); }
.card-filter-capsule { display: inline-flex; align-items: center; gap: clamp(12px, 2vw, 20px); min-height: 60px; max-width: 100%; padding: 6px 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font-weight: 400; line-height: 1.35; box-shadow: none; text-align: left; }
.card-filter-capsule:hover, .card-filter-capsule:active { background: transparent; box-shadow: none; transform: none; }
.card-filter-capsule-view { min-width: 0; color: var(--muted); font-size: .90625rem; font-weight: 500; }
.card-filter-capsule-level { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 56px; height: 44px; padding: 0 12px; border-radius: 9px; background: var(--level-fill, #e4eeea); font-size: 1.25rem; font-weight: 700; white-space: nowrap; }
.card-filter-capsule[data-level="all"] .card-filter-capsule-level { min-width: 0; padding-inline: 8px; font-size: .875rem; font-weight: 500; }
.card-filter-capsule-change-label { display: inline-flex; align-items: center; gap: 8px; flex: none; color: var(--muted); font-size: .90625rem; font-weight: 500; }
.card-filter-capsule-chevron { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.card-filter-capsule-chevron .ui-icon { width: 18px; height: 18px; stroke-width: 1.65; }
.card-filter-guide { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: hidden; }
.card-filter-guide::backdrop { background: rgb(28 28 26 / .35); }
.card-filter-guide-spotlight { position: absolute; pointer-events: none; }
.card-filter-guide-spotlight > .card-filter-capsule { width: 100%; height: 100%; background: var(--paper); }
.card-filter-guide-box { position: absolute; box-sizing: border-box; width: 420px; max-width: calc(100% - 32px); padding: 24px; border: 1px solid #e1d5c5; border-radius: 18px; background: var(--surface); color: var(--ink); max-height: calc(100dvh - 32px); overflow-y: auto; }
.card-filter-guide-heading { display: flex; align-items: flex-start; gap: 12px; padding-right: 20px; }
.card-filter-guide-heading h2 { margin: 0; font: 400 1.375rem/1.3 Georgia, "Times New Roman", serif; letter-spacing: -.015em; }
.card-filter-guide-bulb { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: #f8e7d7; color: var(--coral); }
.card-filter-guide-bulb svg { width: 26px; height: 26px; }
.card-filter-guide-copy { margin: 16px 0; font-size: .9375rem; line-height: 1.6; }
.card-filter-guide-close { position: absolute; top: 6px; right: 6px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 12px; border: 0; background: transparent; box-shadow: none; }
.card-filter-guide-close:hover { background: transparent; }
.card-filter-guide-dismiss { display: block; margin-left: auto; min-height: 44px; padding: 10px 22px; border: 1px solid #ead8c2; border-radius: 12px; background: #f3e3ce; font-weight: 600; box-shadow: none; }
.card-filter-guide-dismiss:hover { background: #eddbc1; }
.card-filter-guide-arrow { position: absolute; inset: 0; overflow: visible; pointer-events: none; color: var(--coral); }
.card-filter-guide-arrow-brush { fill: currentColor; }
.card-filter-guide-arrow-reveal { stroke-dasharray: 1; stroke-dashoffset: 1; animation: card-filter-guide-draw .7s ease-out forwards; }
.app-first-use-guide::backdrop { background: rgb(28 28 26 / .22); }
.app-first-use-guide { touch-action: none; }
.app-first-use-guide .card-filter-guide-box { border-color: #a59f94; touch-action: pan-y; overscroll-behavior: contain; }
.app-first-use-guide .card-filter-guide-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.app-first-use-guide .card-filter-guide-actions button { min-height: 44px; margin: 0; padding: 10px 16px; font-size: .875rem; box-shadow: none; border-radius: 12px; }
.app-first-use-guide .card-filter-guide-back { margin-right: auto !important; border: 1px solid #d9d3c8; background: transparent; }
.app-first-use-guide .card-filter-guide-next { border: 1px solid #ead8c2; background: #f3e3ce; }
.app-first-use-guide .card-filter-guide-spotlight { border-radius: 12px; background: var(--paper); outline: 5px solid var(--paper); }
.app-first-use-guide .card-filter-guide-spotlight > * { margin: 0; }
@keyframes card-filter-guide-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .card-filter-guide-arrow-reveal { animation: none; stroke-dashoffset: 0; } }
@media (max-width: 420px) {
  .card-filter-guide-box { padding: 20px; }
}
.learning-example { max-width: 34em; margin: 20px auto; text-align: center; }
.learning-pronunciation { color: var(--muted); text-align: center; }
.learning-recall-typed { margin-top: 24px; }
.learning-card { background: var(--surface); border: 1.5px solid var(--ink); border-radius: 16px; padding: 32px 40px 24px; min-width: 0; touch-action: pan-y; }
.learning-card:focus { outline-offset: 6px; }
.learning-word { font: 400 clamp(2.5rem, 5vw, 4rem)/1.12 Georgia, "Times New Roman", serif; letter-spacing: -.035em; text-align: center; margin: 36px 0 22px; overflow-wrap: anywhere; }
.learning-meaning { font-size: 1.25rem; line-height: 1.6; text-align: center; max-width: 600px; margin: 0 auto 20px; }
.learning-scope { color: var(--muted); font-size: .875rem; text-align: center; margin-bottom: 16px; }
.learning-preview { display: inline-block; font-size: .875rem; border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; color: var(--muted); }
.learning-source { margin: 16px 0; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.learning-source p { margin-bottom: 10px; }
.learning-source summary { color: var(--ink); }
.learning-decisions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); gap: 16px; margin-top: 32px; }
.learning-decisions button { width: 100%; min-height: 52px; }
.learning-card-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.learning-card-nav button { font-size: .875rem; }
.learning-favorite { min-width: 44px; min-height: 44px; background: transparent; border-color: transparent; border-radius: 50%; font-weight: 500; }
.learning-favorite[aria-pressed="true"] { color: var(--ink); background: var(--teal); }
.learning-filter-dialog { width: min(480px, calc(100% - 32px)); border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); border-radius: 16px; padding: 28px; max-height: calc(100dvh - 40px); overflow-y: auto; }
.learning-filter-dialog::backdrop { background: rgb(28 28 26 / .35); }
.learning-filter-dialog h2 { font: 400 1.8rem/1.2 Georgia, "Times New Roman", serif; }
.learning-filter-fields { display: grid; gap: 20px; }
.learning-filter-fields label { font-size: .875rem; font-weight: 600; }
.learning-filter-fields input, .learning-filter-fields select { margin-top: 8px; font-weight: 400; }
.learning-profile { max-width: 680px; }
.learning-profile > *, .learning-onboarding > * { margin-bottom: 20px; }
.learning-profile progress { width: 100%; height: 10px; accent-color: var(--teal-deep); }
.learning-onboarding { padding: 32px; border: 1.5px solid var(--ink); border-radius: 16px; background: var(--surface); max-width: 560px; }
.learning-onboarding select { margin: 12px 0 20px; }
.learning-recall-answer { display: block; margin: 24px 0 16px; }
.learning-recall-answer textarea { margin-top: 8px; }
.learning-empty { padding: 32px 0; }
.learning-empty h2 { font: 400 2.5rem/1.1 Georgia, "Times New Roman", serif; }
.learning-loading { color: var(--muted); padding: 32px 0; }
.existing-screen { max-width: 760px; margin: 0 auto 32px; border-top: 1px solid var(--line); padding: 24px 0; }
.existing-screen h1 { font-size: 2.5rem; }
.existing-screen button { margin: 6px 6px 6px 0; font-size: .9375rem; }
.existing-screen input, .existing-screen select, .existing-screen textarea { margin-bottom: 12px; }
.existing-screen label { margin-top: 8px; }
.existing-screen p { color: var(--muted); }
.note { border-left: 3px solid var(--teal-deep); padding: 8px 0 8px 16px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
#personal-items article { border-bottom: 1px solid var(--line); padding: 20px 0; }
@media (max-width: 767px) {
  /* Hide mobile scroll indicators without disabling page, dialog or field scrolling. */
  html, body, body * { scrollbar-width: none; }
  html::-webkit-scrollbar, body::-webkit-scrollbar, body *::-webkit-scrollbar { display: none; width: 0; height: 0; }
  .student-header { margin: 0 20px; padding: 16px 0; gap: 12px; }
  .brand-logo { width: 156px; }
  .header-meta { gap: 12px; }
  main { padding: 24px 20px 20px; min-height: calc(100svh - 220px); }
  .learning-today { padding: 24px 0 8px; }
  .learning-title { font-size: clamp(2.5rem, 10vw, 3.75rem); }
  .learning-card { padding: 24px 20px 20px; border-radius: 12px; }
  .learning-word { font-size: clamp(2.5rem, 10vw, 3.5rem); margin: 28px 0 20px; }
  .learning-meaning { font-size: 1.125rem; }
  .learning-decisions { gap: 12px; margin-top: 28px; }
  .learning-decisions button { padding: 12px 10px; }
  .learning-onboarding { padding: 24px 20px; }
  .learning-today-actions { align-items: stretch; }
  .learning-stats { gap: 20px; margin: 28px 0; }
  .learning-filter-dialog { margin: auto auto 16px; }
}
@media (max-width: 359px) {
  .student-header { margin: 0 16px; }
  main { padding-left: 16px; padding-right: 16px; }
  .header-meta { gap: 8px; }
  .test-badge { padding: 2px 5px; }
  .learning-card { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* Headword cards and the four practice states share the existing student shell. */
.ui-icon { display: block; flex: none; pointer-events: none; }
.icon-button, .learning-icon-button { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 10px; border-radius: 50%; }
.learning-card.learning-headword { border: 0; background: transparent; border-radius: 0; padding: 16px 12px 24px; min-height: 460px; }
.learning-headword .learning-word { margin-top: 40px; margin-bottom: 12px; }
.learning-part-of-speech { text-align: center; color: var(--muted); font-size: .9375rem; margin: 0 0 24px; }
.learning-meanings { max-width: 560px; margin: 0 auto 28px; padding-left: 1.7em; font-size: 1.125rem; }
.learning-meanings li { padding: 6px 0 6px 10px; overflow-wrap: anywhere; }
.learning-meanings li::marker { color: var(--muted); font-size: .875rem; }
.learning-card-actions { display: flex; justify-content: center; align-items: center; gap: 36px; margin: 30px auto 16px; }
.learning-card-actions .learning-icon-button { width: 60px; height: 60px; border: 1.5px solid var(--ink); background: var(--surface); box-shadow: none; padding: 14px; }
.learning-card-actions .learning-icon-button:last-child { background: var(--teal); }
.learning-swipe-hint { color: var(--muted); font-size: .8125rem; text-align: center; margin: 12px 0 0; }
.learning-swipe-hint:empty { display: none; }
.learning-headword[data-swipe="known"] .learning-decision-known,
.learning-headword[data-swipe="unknown"] .learning-decision-unknown { outline: 3px solid var(--ink); outline-offset: 4px; }
.learning-card-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.learning-headword > .learning-card-toolbar { justify-content: space-between; }
.learning-back { background: transparent; border-color: transparent; }
.learning-card-tools .learning-preference-icon[aria-pressed="true"] { background: var(--teal); border-color: var(--ink); }
.learning-sense-type { color: var(--muted); font-size: .9375rem; white-space: nowrap; }
body[data-student-view="words"] #profile-status { display: none; }
.learning-card-tools .learning-icon-button { background: transparent; border-color: transparent; }
.learning-menu-navigation { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.learning-menu-navigation button { border-color: transparent; background: transparent; }
.practice-screen { max-width: 680px; margin: 0 auto; }
.practice-screen h1 { font-size: clamp(2.3rem, 4vw, 3.3rem); margin-bottom: 24px; }
.practice-screen h1:focus { outline: none; }
.practice-screen fieldset { border: 0; padding: 0; margin: 0; }
.practice-lead { font-size: 1.125rem; color: var(--muted); max-width: 36em; margin-bottom: 32px; }
.practice-preparation { background: var(--surface); border: 1.5px solid var(--ink); border-radius: 16px; padding: 30px; }
.practice-preparation h2 { font-size: 1.4rem; margin-bottom: 16px; }
.practice-scope { color: var(--muted); margin: 0; }
.practice-disclosure { border-top: 1px solid var(--line); margin-top: 22px; padding: 6px 0; }
.practice-disclosure summary { font-size: .9375rem; font-weight: 500; }
.practice-disclosure details summary { color: var(--muted); }
.practice-disclosure button { margin: 8px 0; }
.practice-disclosure label { margin: 12px 0 6px; }
#practice-targets { max-height: 280px; overflow-y: auto; padding: 4px; overscroll-behavior: contain; }
#practice-targets label { font-size: .9375rem; margin: 0; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
#practice-targets input { flex: none; }
.practice-credit-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; border-top: 1px solid var(--line); padding-top: 20px; margin: 20px 0 0; }
.practice-credit-overview dt { color: var(--muted); font-size: .875rem; }
.practice-credit-overview dd { margin: 8px 0 0; font-weight: 600; overflow-wrap: anywhere; }
#practice-offer { margin: 24px 0 0; }
#practice-status { font-size: .9375rem; color: var(--teal-deep); margin: 20px 0 0; }
#practice-status:empty { display: none; }
#practice-approval-status:empty { display: none; }
.practice-approval { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); padding: 26px 0; margin: 20px 0; }
.practice-approval h2 { font-size: 1rem; font-weight: 500; color: var(--muted); margin-bottom: 18px; }
.practice-price { font: 400 2.15rem/1.2 Georgia, serif; letter-spacing: -.025em; color: var(--ink); }
#practice-quote p:not(.practice-price) { color: var(--muted); font-size: .9375rem; }
.practice-approval button { margin: 8px 8px 0 0; }
.practice-approval-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; overflow-y: auto; overscroll-behavior: contain; padding: 30px; border: 1.5px solid var(--ink); border-radius: 16px; background: var(--surface); color: var(--ink); }
.practice-approval-dialog::backdrop { background: rgb(28 28 26 / .35); }
.practice-approval-dialog h2 { font: 400 1.9rem/1.15 Georgia, "Times New Roman", serif; letter-spacing: -.025em; color: var(--ink); margin-bottom: 24px; }
.practice-approval-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.practice-approval-actions button { margin: 0; }
.practice-approval-dialog:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.practice-test-label { font-size: .8125rem; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.practice-context { color: var(--muted); font-size: .9375rem; margin: 24px 0; }
.practice-context p:first-child { font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.practice-message { position: relative; border-bottom: 1px solid var(--line); padding: 18px 44px 16px 0; margin: 0; }
.practice-message > p { margin-bottom: 0; }
.practice-message.own { margin: 16px 0 16px 24px; background: #e1e9e2; border: 0; border-radius: 12px 12px 2px 12px; padding: 16px 20px; }
.practice-message.prepared { font-size: .9375rem; color: var(--muted); }
.practice-message-menu { position: static; }
.practice-message-menu > summary { position: absolute; right: 0; top: 10px; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; padding: 8px; list-style: none; }
.practice-message-menu > summary::-webkit-details-marker { display: none; }
.practice-message-menu[open] > summary { background: var(--surface); }
.practice-message-options { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.practice-message-options button { background: transparent; border: 0; font-size: .9375rem; padding: 10px 0; text-align: left; }
.practice-message-options input { margin-top: 10px; }
.practice-message-options label { font-size: .875rem; }
.practice-message .practice-translation { margin-top: 12px; color: var(--teal-deep); font-size: .9375rem; }
.practice-message .practice-recast { font-size: .875rem; color: #46605b; margin-top: 14px; padding-top: 10px; border-top: 1px solid #a5b5a8; }
.practice-compose-row { display: flex; align-items: flex-end; gap: 12px; margin-top: 8px; }
.practice-compose-row textarea { flex: 1; min-width: 0; min-height: 84px; margin: 0; background: var(--surface); }
.practice-composer { padding-top: 22px; background: var(--paper); }
.practice-composer label { font-size: .875rem; font-weight: 600; }
.practice-composer > p { margin-top: 8px; font-size: .8125rem; }
.practice-send { flex: none; background: var(--teal); border: 1.5px solid var(--ink); width: 48px; height: 48px; }
.practice-conversation-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.practice-conversation-actions button { font-size: .875rem; }
.practice-feedback { border-left: 2px solid var(--teal-deep); padding-left: 20px; margin: 24px 0; }
.practice-feedback p { font-size: .9375rem; }
.practice-feedback p:first-child { color: var(--ink); font-size: 1.1rem; }
.practice-discussion > summary { border-bottom: 1px solid var(--line); }
#practice-section .practice-discussion > summary { display: inline-flex; align-items: center; min-height: 44px; padding: 9px 16px; border: 1px solid var(--ink); border-radius: 12px; box-shadow: 0 2px 0 var(--ink); background: #bfd8e8; color: var(--ink); font-size: .875rem; font-weight: 500; list-style: none; cursor: pointer; }
#practice-section .practice-discussion > summary::-webkit-details-marker { display: none; }
#practice-section .practice-discussion > summary:hover { filter: brightness(.97); }
#practice-section .practice-discussion > summary:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 4px; }
.practice-next { color: var(--muted); margin: 28px 0 16px; }
.practice-return { display: inline-flex; align-items: center; min-height: 44px; margin-right: 20px; }
.practice-draft-choice { border: 1px solid var(--ink); padding: 16px; margin: 20px 0; border-radius: 8px; }
.practice-draft-choice button { margin: 8px 6px 0 0; }
/* Conversation-only messaging layout. Preparation, Writing, cards and navigation keep their styles. */
#practice-section:is([data-stage="conversation"], [data-stage="result"]) #practice-title { font-size: clamp(1.75rem, 3vw, 2.4rem); margin-bottom: 22px; }
#practice-section .practice-chat-test-notice { font-size: .8125rem; color: var(--muted); margin: 0 0 16px; }
#practice-section .practice-chat-brief { margin: 0 0 22px; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: clamp(14px, 3vw, 22px); }
#practice-section .practice-chat-brief h2 { font-size: 1rem; font-weight: 650; margin: 0 0 7px; }
#practice-section .practice-chat-situation p { margin: 0 0 4px; font-size: .946rem; line-height: 1.48; }
#practice-section .practice-chat-brief .practice-chat-goal { border-top: 1px solid var(--line); margin: 12px 0 0; padding-top: 12px; }
#practice-section .practice-chat-brief h3 { color: var(--teal-deep); font-size: .8125rem; margin: 0 0 4px; }
#practice-section .practice-chat-brief .practice-chat-goal-english { border: 0; margin: 0; padding: 0; }
#practice-section .practice-chat-goal-english .practice-message-body,
#practice-section .practice-translation p { white-space: pre-line; }
#practice-section .practice-bottom-panel { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 28px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
#practice-section .practice-bottom-secondary { display: flex; align-items: center; gap: 6px; }
#practice-section .practice-bottom-panel button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 8px 10px; margin: 0; background: transparent; border: 0; box-shadow: none; border-radius: 12px; font-size: .8125rem; font-weight: 500; color: var(--muted); }
#practice-section .practice-bottom-panel button:hover { background: #eef1ec; color: var(--ink); }
#practice-section .practice-bottom-panel #practice-cancel { color: #945c4c; }
#practice-section .practice-bottom-panel button:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 2px; }
#practice-section #practice-result-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
#practice-section .practice-result-button { min-height: 44px; padding: 9px 16px; margin: 0; border: 1px solid var(--ink); border-radius: 12px; box-shadow: 0 2px 0 var(--ink); color: var(--ink); font-size: .875rem; font-weight: 500; }
#practice-section .practice-result-review { background: #ecd681; }
#practice-section .practice-result-new { background: #b5d4b5; }
#practice-section .practice-result-button:hover { filter: brightness(.97); }
#practice-section .practice-result-button:focus-visible { outline: 2px solid var(--teal-deep); outline-offset: 4px; }
#practice-section[data-stage="result"] .practice-bottom-panel { border: 0; border-radius: 0; background: transparent; padding: 0; margin-top: 16px; }
#practice-section[data-stage="result"] #practice-report-open { padding: 4px 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; color: #a33c35; text-decoration: underline; text-underline-offset: 3px; }
#practice-section[data-stage="result"] #practice-report-open svg { display: none; }
#practice-section .practice-tools-dialog { width: min(550px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--ink); }
#practice-section .practice-tools-dialog::backdrop { background: rgb(24 27 24 / .3); }
#practice-section .practice-tools-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
#practice-section .practice-tools-heading h2 { margin: 0; font-size: 1.25rem; font-weight: 600; }
#practice-section .practice-tools-heading button { width: 44px; height: 44px; flex: 0 0 44px; padding: 0; margin: -10px -10px 0 0; border: 0; box-shadow: none; background: transparent; font-size: 1.6rem; }
#practice-section .practice-tools-dialog textarea { min-height: 130px; }
#practice-section .practice-tools-dialog p { font-size: .875rem; }
#practice-section .practice-chat-context { border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin-bottom: 26px; font-size: .9375rem; color: var(--muted); }
#practice-section .practice-chat-context > summary { color: var(--ink); font-weight: 500; padding: 12px 0; }
#practice-section .practice-chat-context .practice-chat-role { font-weight: 600; color: var(--ink); }
#practice-section .practice-chat-people { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; font-size: .875rem; margin: 12px 0 16px; }
#practice-section .practice-chat-people dt { color: var(--muted); }
#practice-section .practice-chat-people dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
#practice-section .practice-chat-goal { margin: 0 0 24px; }
#practice-section .practice-chat-goal h2 { font-size: .875rem; font-weight: 600; margin: 0 0 8px; }
#practice-section .practice-chat-goal > p { font-size: 1rem; margin: 0; }
#practice-section .practice-chat-instruction { position: relative; font-size: .9375rem; }
#practice-section .practice-chat-instruction > p { margin-bottom: 0; }
#practice-section .practice-chat-instruction .practice-message-menu > summary { top: -10px; }
#practice-section .practice-chat-instruction-details { color: var(--muted); font-size: .875rem; }
#practice-section .practice-chat-instruction-details > summary { font-size: .8125rem; font-weight: 400; }
#practice-section .practice-chat-context .practice-message { max-width: none; background: transparent; border: 0; padding-left: 0; margin: 12px 0; }
#practice-section .practice-chat-thread { display: flex; flex-direction: column; gap: 16px; padding: 3px 0 6px; }
#practice-section .practice-message { align-self: flex-start; width: fit-content; max-width: min(83%, calc(100% - 38px)); min-width: 0; padding: 11px 15px 12px; margin: 0 0 0 38px; border: 1.5px solid #403c32; border-radius: 4px 16px 16px; background: #f6d77d; font-size: 1rem; color: var(--ink); }
#practice-section .practice-message.own { align-self: flex-end; padding: 11px 15px 12px; margin: 0; border: 1.5px solid #38534c; border-radius: 16px 4px 16px 16px; background: #a5dacb; }
#practice-section .practice-chat-initial { position: absolute; top: 0; left: -39px; display: grid; place-items: center; width: 31px; height: 31px; border: 1.5px solid #403c32; border-radius: 50%; background: #fcf0c9; font-size: .875rem; font-weight: 650; }
#practice-section .practice-message-author { display: block; font-size: .78rem; font-weight: 650; color: var(--ink); margin: 0 0 3px; overflow-wrap: anywhere; }
#practice-section .practice-test-receipt { margin-left: 0; border: 1px dashed var(--line); background: transparent; color: var(--muted); border-radius: 10px; font-size: .875rem; }
#practice-section .practice-chat-brief .practice-fictional { margin: 10px 0 0; background: transparent; border: 1px dashed var(--line); }
#practice-section .practice-message-body { white-space: pre-wrap; line-height: 1.6; }
#practice-section .practice-chat-word { display: inline; padding: 0; margin: 0; min-width: 0; min-height: 0; max-width: none; border: 0; border-radius: 0; background: transparent; color: inherit; font: inherit; line-height: inherit; text-align: inherit; white-space: inherit; vertical-align: baseline; user-select: text; -webkit-user-select: text; }
#practice-section .practice-chat-word:hover { text-decoration: underline; text-decoration-color: #6b8c81; text-underline-offset: 3px; }
.practice-word-save-popup { position: fixed; z-index: 80; min-height: 44px; padding: 8px 16px; border: 1px solid var(--ink); border-radius: 10px; background: #a5dacb; color: var(--ink); font-size: .875rem; box-shadow: 0 2px 0 var(--ink); }
#practice-section .practice-segment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 5px; margin: 2px 0 -5px; }
#practice-section .practice-translate { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: transparent; font: inherit; }
#practice-section .practice-translate span { color: #5d8ea7; font-size: .75rem; line-height: 1.35; font-weight: 500; }
#practice-section .practice-translate:hover span { color: #386d88; }
#practice-section .practice-segment-actions > small { font-size: .75rem; color: var(--muted); }
#practice-section .practice-segment-save { margin-inline-start: auto; }
#practice-section .practice-segment-save[open] { flex-basis: 100%; }
#practice-section .practice-segment-save summary { margin-inline-start: auto; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: #5e5646; list-style: none; border-radius: 50%; }
#practice-section .practice-segment-save summary::-webkit-details-marker { display: none; }
#practice-section .practice-segment-save label { font-size: .875rem; }
#practice-section .practice-translation { margin-top: 4px; padding: 0; border: 0; color: var(--ink); }
#practice-section .practice-translation small { color: var(--muted); font-size: .75rem; }
#practice-section .practice-translation p { margin: 0; font-size: .9375rem; font-style: italic; }
#practice-section .practice-message-menu > summary { right: 2px; top: 4px; }
#practice-section .practice-chat-raw { color: var(--muted); font-size: .8125rem; }
#practice-section .practice-chat-raw summary { font-size: .75rem; font-weight: 400; }
#practice-section .practice-composer { padding-top: 14px; }
#practice-section .practice-compose-row { display: flex; align-items: flex-end; gap: 6px; padding: 4px; margin: 0; border: 1.5px solid var(--ink); border-radius: 26px; background: var(--surface); }
#practice-section .practice-compose-row:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
#practice-section .practice-compose-row textarea { field-sizing: content; min-height: 44px; max-height: 9rem; line-height: 1.45; resize: none; border: 0; border-radius: 20px; padding: 10px 6px 10px 12px; background: transparent; outline: none; }
#practice-section .practice-compose-row .practice-send { width: 44px; height: 44px; padding: 9px; border: 0; border-radius: 50%; background: #a5dacb; color: var(--ink); }
#practice-section .practice-compose-row .practice-send:disabled { background: var(--line); }
#practice-section .practice-feedback { border: 0; padding: 0; }
#practice-section .practice-chat-test-result { font-size: .9375rem; margin: 8px 0 24px; }
#practice-section .practice-chat-test-result p:first-child { font-size: 1rem; }
#practice-section .practice-chat-feedback { margin: 0 0 28px; }
.chat-performance-heading { display: flex; align-items: center; gap: 1.25rem; margin: 1rem 0 1.5rem; }
.chat-performance-grade { font-family: sans-serif; font-size: clamp(3.75rem, 14vw, 6rem); font-weight: 800; line-height: 1; }
.chat-performance-grade--red { color: #b4372d; }
.chat-performance-grade--yellow { color: #8a6500; }
.chat-performance-grade--blue { color: #2672a3; }
.chat-performance-grade[data-grade="A−"] { color: #de922c; }
.chat-performance-grade[data-grade="B"], .chat-performance-grade[data-grade="B−"] { color: #f2c200; }
.chat-performance-caption p { margin: .25rem 0; }
.chat-performance-level, .chat-performance-label { color: #64615c; font-size: .875rem; }
.practice-chat-feedback .chat-performance-correction { padding: 1.15rem 0; border-bottom: 1px solid #d8d4cb; }
.practice-chat-feedback .chat-performance-correction blockquote, .practice-chat-feedback .chat-performance-strength blockquote { margin: .5rem 0; padding-left: .9rem; border-left: 3px solid #b7d6cd; overflow-wrap: anywhere; }
.chat-performance-revision { font-weight: 600; overflow-wrap: anywhere; }
#practice-section .practice-chat-feedback .chat-performance-next { margin-top: 1.75rem; }
#practice-section .practice-chat-outcome { font-size: 1.0625rem; line-height: 1.6; margin-bottom: 24px; }
#practice-section .practice-chat-feedback section { margin: 24px 0; }
#practice-section .practice-chat-feedback h2 { font-size: 1rem; font-weight: 600; margin: 0 0 8px; }
#practice-section .practice-chat-word-result { border-bottom: 1px solid var(--line); padding: 16px 0; }
#practice-section .practice-chat-word-result h3 { font: italic 400 1.35rem/1.2 Georgia, serif; margin: 0 0 10px; }
#practice-section .practice-chat-word-result p { font-size: .9375rem; margin-bottom: 8px; }
#practice-section .practice-chat-word-result blockquote { margin: 12px 0; padding: 10px 14px; border: 0; border-radius: 8px; background: #e1e9e2; font-size: .9375rem; }
@media (max-width: 767px) {
  #practice-section .practice-message { max-width: min(84%, calc(100% - 58px)); padding: 10px 12px; }
  #practice-section .practice-message.own { max-width: min(84%, calc(100% - 58px)); padding: 12px 14px; }
  #practice-section .practice-chat-context { padding: 0 12px; margin-bottom: 20px; }
  #practice-section .practice-chat-context .practice-message { max-width: none; padding-left: 0; }
  #practice-section .practice-compose-row { gap: 8px; }
}
@media (max-width: 767px) {
  .learning-card.learning-headword { padding: 8px 0 20px; min-height: 430px; }
  .learning-headword .learning-word { margin-top: 36px; }
  .learning-card-actions { margin-top: 28px; }
  .learning-meanings { font-size: 1.125rem; }
  .practice-screen h1 { font-size: 2.5rem; }
  .practice-screen .eyebrow { font-size: .8125rem; }
  .practice-screen { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
  .practice-lead { margin-bottom: 24px; }
  .practice-preparation { padding: 24px 20px; border-radius: 12px; }
  .practice-credit-overview { gap: 16px; }
  .practice-message.own { margin-left: 12px; padding: 16px; }
  .practice-approval .learning-primary { width: 100%; }
  .practice-approval-dialog { padding: 24px 20px; border-radius: 12px; }
  .practice-approval-actions { align-items: stretch; }
  .practice-approval-actions button { width: 100%; }
  .practice-price { font-size: 2rem; }
}
@media (max-height: 560px) {
  .learning-card.learning-headword { min-height: 0; }
  .learning-headword .learning-word { margin-top: 12px; }
  .practice-composer { position: static; }
}

/* Profile navigation and lists keep the existing reading-first student shell. */
.profile-screen { max-width: 680px; min-width: 0; margin: 0 auto; }
.profile-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.profile-title { font: 400 clamp(2rem, 4vw, 2.8rem)/1.12 Georgia, "Times New Roman", serif; letter-spacing: -.035em; margin: 0; min-width: 0; }
.profile-heading > button, .profile-heading > a { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 44px; min-height: 44px; padding: 10px; border: 0; background: transparent; border-radius: 50%; }
.profile-heading > button:hover, .profile-heading > a:hover { background: var(--surface); }
.profile-lead { color: var(--muted); max-width: 42em; margin-bottom: 28px; font-style: italic; }
.profile-level-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 24px 0; }
.profile-level-summary p { margin: 0; }
.profile-level-trigger { display: inline-flex; align-items: center; gap: clamp(12px, 2vw, 20px); max-width: 100%; min-height: 60px; padding: 6px 0; border: 0; border-radius: 10px; background: transparent; color: var(--ink); box-shadow: none; font-size: 1rem; font-weight: 400; text-align: left; }
.profile-level-trigger:hover, .profile-level-trigger:active { background: transparent; box-shadow: none; transform: none; }
.profile-level-caption { flex: none; font-size: .90625rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.profile-level-trigger strong { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 56px; height: 44px; padding: 0 12px; border-radius: 9px; background: var(--level-fill); font-size: 1.25rem; font-weight: 700; }
.profile-level-change-label { display: inline-flex; align-items: center; gap: 8px; flex: none; color: var(--muted); font-size: .90625rem; font-weight: 500; }
.profile-level-trigger:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.profile-level-dialog { width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 24px; overflow-y: auto; border: 1px solid #d9d5ca; border-radius: 16px; background: var(--surface); color: var(--ink); }
.profile-level-dialog::backdrop { background: rgb(0 0 0 / .25); }
.profile-level-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.profile-level-dialog-heading h2 { margin: 0; font: 400 1.65rem/1.2 Georgia, "Times New Roman", serif; }
.profile-level-dialog-heading button { flex: none; width: 44px; min-height: 44px; padding: 10px; border: 0; background: transparent; }
.profile-level-dialog .profile-dialog-actions button { max-width: 100%; white-space: normal; }
.profile-level-error { margin: 12px 0; font-size: .9375rem; }
.profile-progress { --profile-size-a1: 24px; --profile-size-a2: 32px; --profile-size-b1: 42px; --profile-size-b2: 54px; --profile-size-c1: clamp(67px, calc(25vw - 13px), 72px); --profile-size-c2: clamp(79px, calc(35vw - 33px), 88px); --profile-size-scale: 1; margin: 28px 0 36px; }
.profile-progress[data-level="A1"], .profile-progress-level[data-level="A1"], .profile-level-trigger[data-level="A1"], .card-filter-capsule[data-level="A1"] { --level-fill: #f6a3b0; --level-accent: #b84e68; --level-size: var(--profile-size-a1, 24px); }
.profile-progress[data-level="A2"], .profile-progress-level[data-level="A2"], .profile-level-trigger[data-level="A2"], .card-filter-capsule[data-level="A2"] { --level-fill: #ffb577; --level-accent: #bb743e; --level-size: var(--profile-size-a2, 32px); }
.profile-progress[data-level="B1"], .profile-progress-level[data-level="B1"], .profile-level-trigger[data-level="B1"], .card-filter-capsule[data-level="B1"] { --level-fill: #76c7c5; --level-accent: #398d8b; --level-size: var(--profile-size-b1, 42px); }
.profile-progress[data-level="B2"], .profile-progress-level[data-level="B2"], .profile-level-trigger[data-level="B2"], .card-filter-capsule[data-level="B2"] { --level-fill: #75c487; --level-accent: #309653; --level-size: var(--profile-size-b2, 54px); }
.profile-progress[data-level="C1"], .profile-progress-level[data-level="C1"], .profile-level-trigger[data-level="C1"], .card-filter-capsule[data-level="C1"] { --level-fill: #97d6fa; --level-accent: #438db6; --level-size: var(--profile-size-c1, 72px); }
.profile-progress[data-level="C2"], .profile-progress-level[data-level="C2"], .profile-level-trigger[data-level="C2"], .card-filter-capsule[data-level="C2"] { --level-fill: #bea0ed; --level-accent: #8960c3; --level-size: var(--profile-size-c2, 88px); }
.profile-progress-levels { --profile-gap: calc((100% - (var(--profile-size-a1) + var(--profile-size-a2) + var(--profile-size-b1) + var(--profile-size-b2) + var(--profile-size-c1) + var(--profile-size-c2)) * var(--profile-size-scale)) / 6); position: relative; display: grid; grid-template-columns: calc(var(--profile-size-a1) * var(--profile-size-scale) + var(--profile-gap)) calc(var(--profile-size-a2) * var(--profile-size-scale) + var(--profile-gap)) calc(var(--profile-size-b1) * var(--profile-size-scale) + var(--profile-gap)) calc(var(--profile-size-b2) * var(--profile-size-scale) + var(--profile-gap)) calc(var(--profile-size-c1) * var(--profile-size-scale) + var(--profile-gap)) calc(var(--profile-size-c2) * var(--profile-size-scale) + var(--profile-gap)); gap: 0; isolation: isolate; margin: 36px 0 40px; }
.profile-progress-levels::before { content: ""; position: absolute; z-index: -1; left: calc((var(--profile-size-a1) * var(--profile-size-scale) + var(--profile-gap)) / 2); right: calc((var(--profile-size-c2) * var(--profile-size-scale) + var(--profile-gap)) / 2); top: 69px; height: 2px; background: #dededc; }
.profile-progress-level { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 24px 92px 24px; justify-items: center; align-items: center; min-width: 0; width: 100%; padding: 0; border: 0; border-radius: 6px; background: transparent; box-shadow: none; color: var(--muted); font-weight: 400; line-height: 1.4; }
.profile-progress-level:hover, .profile-progress-level:active { background: transparent; box-shadow: none; transform: none; }
.profile-progress-level-label { font-size: 1rem; }
.profile-progress-level-count { font-size: .875rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.profile-progress-level-orbit { position: relative; display: block; width: calc(var(--level-size) * var(--profile-size-scale)); height: calc(var(--level-size) * var(--profile-size-scale)); border-radius: 50%; background: var(--level-fill); }
.profile-progress-level-orbit::after { content: ""; position: absolute; inset: -7px; border: 1.5px solid transparent; border-radius: 50%; }
.profile-progress-level[aria-pressed="true"] { color: var(--ink); font-weight: 650; }
.profile-progress-level[aria-pressed="true"] .profile-progress-level-orbit::after { border-color: var(--level-accent); }
.profile-progress-level:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.profile-progress h2 { font-size: 1.125rem; font-weight: 600; margin-bottom: 8px; }
.profile-progress-heading { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.profile-progress-heading h2 { margin: 0; font-size: 1.375rem; }
.profile-info-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; min-height: 44px; padding: 0; background: #e6cb72; background-clip: padding-box; border: 8px solid transparent; border-radius: 50%; color: #000; font-size: .9375rem; font-weight: 700; }
.profile-info-button:hover { background-color: #efd781; }
.profile-info-dialog { width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 24px; overflow-y: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--ink); border-radius: 12px; }
.profile-info-dialog::backdrop { background: rgb(0 0 0 / .25); }
.profile-info-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.profile-info-heading h2 { margin: 0; font: 400 1.55rem/1.2 Georgia, "Times New Roman", serif; }
.profile-info-heading button { flex: none; width: 44px; min-height: 44px; padding: 10px; border: 0; background: transparent; }
.profile-info-dialog p { margin: 0 0 14px; font-size: .9375rem; line-height: 1.6; }
.profile-info-dialog p:last-child { margin-bottom: 0; }
.profile-progress-count { color: var(--muted); font-size: 1.125rem; margin-bottom: 16px; }
.profile-progress > p:last-child { margin-top: 16px; }
.profile-progress progress { display: block; width: 100%; height: 6px; border: 0; border-radius: 3px; overflow: hidden; background: var(--line); accent-color: var(--level-accent, var(--teal-deep)); }
.profile-progress progress::-webkit-progress-bar { background: var(--line); border-radius: 3px; }
.profile-progress progress::-webkit-progress-value { background: var(--level-accent, var(--teal-deep)); border-radius: 3px; }
.profile-progress progress::-moz-progress-bar { background: var(--level-accent, var(--teal-deep)); border-radius: 3px; }
@media (max-width: 480px) {
  .profile-progress { --profile-size-scale: .55; }
  .profile-progress-levels { margin: 28px 0 32px; }
  .profile-progress-levels::before { top: 50px; }
  .profile-progress-level { grid-template-rows: 24px 54px 24px; }
  .profile-progress-level-orbit::after { inset: -5px; }
  .profile-progress-level-label { font-size: .875rem; }
  .profile-progress-level-count { font-size: .6875rem; }
}
@media (max-width: 420px) {
  .profile-progress-level-count { width: 28px; font-size: .6875rem; line-height: 1.1; text-align: center; white-space: normal; }
}
.profile-section { margin-top: 32px; }
.profile-section > h2 { font-size: 1.125rem; font-weight: 600; margin-bottom: 12px; }
.profile-introduction { max-width: 680px; }
.profile-introduction-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.profile-introduction-heading h2 { margin: 0; font-size: 1.25rem; }
.profile-introduction-optional, .profile-introduction-description, .profile-introduction-warning { color: var(--muted); font-size: .9375rem; }
.profile-introduction-description { margin-bottom: 16px; }
.profile-introduction textarea { display: block; width: 100%; min-height: 140px; resize: vertical; }
.profile-introduction-warning { margin: 10px 0 16px; }
.profile-screen .profile-introduction-consent { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; margin: 0 0 20px; font-size: .9375rem; font-weight: 400; line-height: 1.5; }
.profile-screen .profile-introduction-consent input { flex: 0 0 20px; width: 20px; height: 20px; margin: 2px 0 0; }
.profile-introduction-save { min-height: 44px; padding: 10px 18px; }
.profile-nav-list, .profile-activity-list, .profile-list { list-style: none; margin: 0; padding: 0; }
.profile-nav-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; min-height: 62px; padding: 16px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); text-align: left; text-decoration: none; font-weight: 500; }
.profile-nav-row::after { content: "›"; flex: none; font-size: 1.5rem; line-height: 1; color: var(--muted); }
.profile-nav-row:hover { background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.profile-nav-row > span { min-width: 0; overflow-wrap: anywhere; }
.profile-activity-row { padding: 16px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.profile-activity-row h3, .profile-list-row h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 8px; }
.profile-activity-row p { margin-bottom: 6px; }
.profile-activity-row p:last-child { margin-bottom: 0; }
.profile-subview-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.profile-subview-heading > button, .profile-subview-heading > a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; flex: none; padding: 10px; border-color: transparent; background: transparent; border-radius: 50%; }
.profile-subview-heading > button:hover, .profile-subview-heading > a:hover { background: var(--surface); }
.profile-subview-heading h1 { margin: 0; }
.profile-list-row { border-bottom: 1px solid var(--line); padding: 20px 0; overflow-wrap: anywhere; }
.profile-list-row p { color: var(--muted); margin-bottom: 8px; }
.profile-list-row button { margin: 6px 8px 0 0; font-size: .875rem; min-height: 44px; }
.profile-screen label { margin: 16px 0 8px; }
.profile-screen input, .profile-screen select { margin-bottom: 16px; }
.profile-dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.profile-dialog-actions button { min-height: 44px; }
.profile-saved-screen, .profile-settings-backup { max-width: 680px; }
.profile-saved-screen { border-top: 0; padding-top: 0; }
.profile-saved-screen > h2 { font: 400 clamp(2rem, 4vw, 2.8rem)/1.12 Georgia, "Times New Roman", serif; letter-spacing: -.035em; margin: 16px 0; }
.profile-back-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .9375rem; text-decoration-thickness: 1px; }
/* All three personal libraries share the same scoped reading layout. */
body:is([data-student-view="profile-known"], [data-student-view="profile-study"], [data-student-view="profile-favorites"]) #daily-learning-section,
body:is([data-student-view="profile-known"], [data-student-view="profile-study"], [data-student-view="profile-favorites"]) .profile-screen { max-width: none; }
.profile-known-heading { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.profile-known-heading .profile-subview-heading { margin: 0; }
.profile-known-lead { color: var(--muted); font-size: .9375rem; margin: 0; }
.profile-known-toolbar { display: grid; grid-template-columns: auto auto minmax(140px, 1fr) auto; align-items: center; gap: 16px 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.profile-known-levels, .profile-known-kinds { display: flex; align-items: center; gap: 6px; min-width: 0; }
.profile-known-filter { position: relative; flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 44px; padding: 8px 7px; border: 0; border-radius: 0; background: transparent; color: var(--muted); box-shadow: none; font-size: .875rem; font-weight: 400; white-space: nowrap; }
.profile-known-filter:hover, .profile-known-filter:active { background: transparent; color: var(--ink); box-shadow: none; transform: none; }
.profile-known-filter[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.profile-known-filter[aria-pressed="true"]::after { content: ""; position: absolute; bottom: 2px; left: 7px; right: 7px; height: 2px; background: var(--coral); }
.profile-known-filter:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 3px; }
.profile-screen .profile-known-search { position: relative; display: flex; align-items: center; margin: 0; min-width: 0; }
.profile-known-search > svg { position: absolute; left: 12px; width: 18px; height: 18px; pointer-events: none; color: var(--muted); }
.profile-screen .profile-known-search input { width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 9px 10px 9px 38px; border: 1px solid #c8c3ba; border-radius: 6px; background: transparent; font-size: .875rem; }
.profile-screen .profile-known-sort { width: auto; min-width: 76px; min-height: 44px; margin: 0; padding: 8px 10px; border: 1px solid transparent; border-radius: 6px; background-color: transparent; font-size: .875rem; }
.profile-known-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 36px; row-gap: 0; list-style: none; margin: 14px 0 0; padding: 0; }
.profile-known-card { min-width: 0; padding: 24px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.profile-known-card-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.profile-known-card-heading h3 { margin: 0; font-family: inherit; font-size: 1.0625rem; font-weight: 650; line-height: 1.4; }
.profile-known-level { flex: none; max-width: 48%; color: var(--muted); font-size: .8125rem; font-weight: 400; line-height: 1.5; text-align: right; }
.profile-known-meaning, .profile-known-meanings { margin: 0; color: var(--muted); font-size: .9375rem; line-height: 1.6; }
.profile-known-meanings { padding-left: 1.2em; }
.profile-known-meanings li + li { margin-top: 3px; }
.profile-known-pagination { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 30px 0 16px; }
.profile-known-pagination button { position: relative; min-width: 36px; min-height: 44px; padding: 8px; color: var(--muted); font-size: .875rem; font-weight: 400; }
.profile-known-pagination button[aria-current="page"] { color: var(--ink); font-weight: 600; }
.profile-known-pagination button[aria-current="page"]::after { content: ""; position: absolute; bottom: 2px; left: 11px; right: 11px; height: 2px; background: var(--coral); }
.profile-known-empty { margin: 32px 0; color: var(--muted); }
@media (max-width: 1100px) {
  .profile-known-toolbar { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; }
  .profile-known-levels { grid-column: 1; grid-row: 1; justify-content: flex-start; }
  .profile-known-levels .profile-known-filter { flex: 0 0 auto; }
  .profile-known-kinds { grid-column: 2; grid-row: 1; }
  .profile-known-search { grid-column: 1; grid-row: 2; }
  .profile-known-sort { grid-column: 2; grid-row: 2; justify-self: end; }
}
@media (max-width: 767px) {
  .profile-known-heading { display: block; margin-bottom: 22px; }
  .profile-known-lead { margin-top: 12px; }
  .profile-known-toolbar { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; border-bottom: 0; padding-bottom: 0; }
  .profile-known-levels { grid-column: 1 / -1; grid-row: 1; justify-content: space-between; gap: 0; }
  .profile-known-levels .profile-known-filter { flex: 1 1 0; min-width: 0; padding-inline: 4px; }
  .profile-known-kinds { grid-column: 1 / -1; grid-row: 3; justify-content: flex-start; gap: 14px; }
  .profile-known-kinds .profile-known-filter { flex: 0 0 auto; }
  .profile-screen .profile-known-sort { border-color: #c8c3ba; }
  .profile-known-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; margin-top: 6px; }
  .profile-known-card { padding: 20px 0; }
  .profile-known-card-heading { flex-wrap: wrap; justify-content: flex-start; gap: 2px 8px; }
  .profile-known-card-heading h3 { font-size: 1rem; }
  .profile-known-level { max-width: 100%; font-size: .75rem; text-align: left; }
  .profile-known-meaning, .profile-known-meanings { font-size: .875rem; }
  .profile-known-pagination { gap: 0; }
  .profile-known-pagination button { min-width: 28px; padding-inline: 6px; font-size: .8125rem; }
}
.profile-settings-backup .section-heading h2 { font-size: 1.25rem; margin-bottom: 0; }
.profile-settings-backup .section-heading { margin-bottom: 20px; }
.profile-settings-backup #restore-file { overflow-wrap: anywhere; max-width: 100%; }
.profile-settings-backup > h2 { font-size: 1.25rem; margin-bottom: 16px; }
.profile-settings-backup .backup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.profile-settings-backup .backup-actions button { min-height: 44px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 8px; background: transparent; font-size: .9375rem; font-weight: 500; }
.profile-settings-backup .backup-actions button:hover { background: var(--surface); }
.profile-settings-backup .backup-hint { margin: 16px 0 0; color: var(--muted); font-size: .9375rem; }
.backup-confirm-dialog { width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 24px; overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); }
.backup-confirm-dialog::backdrop { background: rgb(0 0 0 / .25); }
.backup-confirm-dialog h2 { font: 400 1.65rem/1.2 Georgia, "Times New Roman", serif; margin: 0 0 16px; }
.backup-confirm-dialog p { font-size: .9375rem; }
.backup-confirm-dialog #backup-confirm-apply { background: var(--teal); border-color: var(--ink); }
.backup-confirm-dialog #backup-confirm-status:empty { display: none; }
@media (max-width: 767px) {
  .profile-screen { padding-bottom: 24px; }
  .profile-heading { gap: 12px; }
  .profile-title { font-size: clamp(2rem, 8vw, 2.8rem); }
  .profile-subview-heading { align-items: flex-start; gap: 12px; }
  .profile-subview-heading h1 { padding-top: 5px; }
  .profile-nav-row { min-height: 60px; gap: 16px; }
  .profile-dialog-actions { align-items: stretch; }
  .profile-dialog-actions button { flex: 1 1 160px; }
  body[data-student-view^="profile"] main { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
}
/* Shared waiting card for Yaz and Sohbet (owner, 10 Nov 2026): the same look as Sinava Hazirlan's .exam-wait card. */
.wait-overlay { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(28, 28, 26, .45); }
.wait-card { position: relative; width: min(340px, 100%); text-align: center; background: #fdfcf8; border: 2px solid #1d1c1a; border-radius: 12px; box-shadow: 0 3px 0 #1d1c1a; padding: 22px 18px; }
.wait-hourglass { display: block; margin: 0 auto; }
.wait-title { margin: 12px 0 4px; font-size: 1.0625rem; font-weight: 600; }
.wait-note { margin: 0; font-size: .875rem; line-height: 1.5; color: #55524b; }

/* Owner's decision (12 Nov 2026): earlier work in Sohbet, Yaz and Sınav opens in one chat-list style panel
   (Konuşmalarım, Yazılarım, Sınavlarım). The panel never covers the whole page; logo colours, ink borders. */
:root { --hist-coral: #d0643e; --hist-blue: #254b9e; --hist-teal: #37a295; --hist-purple: #6a4280; --hist-mustard: #e0a526; }
.history-trigger, #practice-section .practice-bottom-panel .history-trigger { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 16px 8px 12px;
  border: 2px solid var(--ink); border-radius: 14px; background: var(--surface); box-shadow: 3px 3px 0 var(--ink); color: var(--ink); font-weight: 700; }
.history-trigger:hover, #practice-section .practice-bottom-panel .history-trigger:hover { background: #f1ebe0; }
.history-trigger-count { min-width: 26px; height: 26px; padding: 0 7px; border: 1.5px solid var(--ink); border-radius: 13px; background: var(--hist-coral); color: #fff;
  font-size: .8125rem; font-weight: 800; line-height: 1; display: inline-grid; place-items: center; }
dialog.history-panel { position: fixed; inset: 24px 24px 24px auto; margin: 0; width: min(460px, calc(100vw - 48px)); max-width: none; height: auto; max-height: none;
  display: flex; flex-direction: column; padding: 24px 20px 12px; border: 2.5px solid var(--ink); border-radius: 24px; background: var(--surface); color: var(--ink);
  box-shadow: 7px 7px 0 var(--ink); overflow: hidden; }
dialog.history-panel:not([open]) { display: none; }
dialog.history-panel::backdrop { background: rgb(28 28 26 / .35); }
.history-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 0 6px; }
.history-head h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 2.25rem; line-height: 1.1; letter-spacing: -.01em; }
.history-close { flex: none; width: 46px; height: 46px; min-height: 0; padding: 0; border: 2px solid var(--ink); border-radius: 50%; background: var(--surface); display: grid; place-items: center; }
.history-search { position: relative; margin: 18px 4px 12px; }
.history-search input { min-height: 52px; padding: 10px 50px 10px 16px; border: 2px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 3px 3px 0 var(--ink); }
.history-search-icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.history-list { list-style: none; margin: 0; padding: 4px 2px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.history-item + .history-item { margin-top: 4px; }
.history-row { width: 100%; min-height: 0; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 11px 10px;
  border: 0; border-radius: 16px; background: transparent; text-align: left; font-weight: inherit; }
.history-row:hover { background: #f1ebe0; }
.history-row.is-current { background: #efe7d8; box-shadow: inset 0 0 0 2px var(--ink); }
.history-avatar { width: 52px; height: 52px; border: 2px solid var(--ink); border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 1.3rem; font-weight: 800; }
.history-color-coral { background: var(--hist-coral); } .history-color-blue { background: var(--hist-blue); } .history-color-teal { background: var(--hist-teal); }
.history-color-purple { background: var(--hist-purple); } .history-color-mustard { background: var(--hist-mustard); }
.history-text { min-width: 0; display: grid; gap: 2px; }
.history-title { font-size: 1.03rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-preview { color: var(--muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-preview b { margin-right: 4px; color: #3d3a35; font-weight: 650; }
.history-preview.is-muted { font-style: italic; }
.history-meta { align-self: start; padding-top: 3px; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.history-time { color: #8a867f; font-size: .78rem; white-space: nowrap; }
.history-pill { padding: 0 8px; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; font-size: .75rem; font-weight: 750; line-height: 1.6; white-space: nowrap; }
.history-pill.is-half { color: var(--hist-coral); border-color: var(--hist-coral); }
.history-tick { width: 24px; height: 24px; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--hist-teal); color: #fff; font-size: .8rem; font-weight: 900; display: grid; place-items: center; }
.history-grade { min-width: 30px; height: 30px; padding: 0 6px; border: 1.5px solid var(--ink); border-radius: 15px; background: var(--hist-coral); color: #fff; font-size: .8rem; font-weight: 800; display: grid; place-items: center; }
.history-grade.is-empty { border-color: var(--line); background: #fff; color: var(--muted); }
.history-empty { padding: 18px 10px; color: var(--muted); text-align: center; }
.history-refresh { align-self: center; min-height: 40px; margin-top: 6px; border: 0; background: transparent; color: var(--muted); font-size: .875rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.history-refresh:hover { background: transparent; color: var(--ink); }
.writing-screen .writing-past, .exam-history-box { margin-top: 26px; }
@media (max-width: 767px) {
  dialog.history-panel { inset: 56px 10px 10px 10px; width: auto; padding: 18px 12px 8px; border-radius: 22px; box-shadow: 5px 5px 0 var(--ink); }
  .history-head h2 { font-size: 2rem; }
  .history-row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; padding: 10px 8px; }
  .history-avatar { width: 48px; height: 48px; font-size: 1.2rem; }
}
