/* Cards section (renders docs/design/inner/06-*): the list screen (wordbeat.css .list-row*), the way to check, the
   writing check and its result. "По памяти" and the shared wk-* parts are in knowledge.css; colours from the palette. */
#screenFlashcards{min-height:calc(100vh - 84px);min-height:calc(100dvh - 84px)}
#screenFlashcards .wk-button svg{width:18px;height:18px;flex:none}
.fc-intro{max-width:640px;margin:12px 0 0;color:var(--wk-muted)}
/* "Назад" of the way to check, "Написание", "По памяти" and the repetition of "Мой словарь": the one button of the site (wordbeat.css .back-btn). */
.fc-back-bar{margin:0 0 8px}
.cards-memory-return{max-width:1344px;margin:0 auto;padding:16px 32px 0}

/* The way to check (06-cards-choice-*): back, list and direction, the question, what is left, two tiles. */
.fc-work{max-width:840px;margin:28px auto 0}
.fc-subtitle{margin:12px 0 0;color:var(--wk-muted);font-size:13px;overflow-wrap:anywhere}
.knowledge-screen .fc-choose h2{margin-top:8px;font-size:clamp(27px,2.4vw,34px);letter-spacing:-.02em}
.fc-count{min-height:20px;margin:8px 0 0;color:var(--wk-muted);font-size:13px}
.fc-all-known{margin:14px 0 0}
.fc-tiles{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-top:24px}
.fc-tile{position:relative;display:flex;flex-direction:column;align-items:flex-start;min-width:0;min-height:188px;padding:28px 26px;border:1px solid var(--wk-line);border-radius:16px;background:var(--wk-surface);color:var(--wk-text);font:inherit;text-align:left;cursor:pointer;transition:border-color .15s}
.fc-tile:hover{border-color:var(--wk-muted)}
.fc-tile:focus-visible{outline:2px solid var(--wk-text);outline-offset:3px}
#screenFlashcards .fc-tile svg{width:30px;height:30px;color:var(--wk-red)}
.fc-tile strong{margin-top:20px;font:700 20px/1.25 var(--wk-display)}
.fc-tile span{margin-top:12px;color:var(--wk-muted);font-size:13px;overflow-wrap:anywhere}
.fc-tile:disabled{opacity:.45;cursor:default}
.fc-tile:disabled:hover{border-color:var(--wk-line)}
.fc-tile[aria-busy=true]{opacity:1;border-color:var(--wk-red);cursor:progress}
.fc-tile[aria-busy=true]::after{content:"";position:absolute;top:24px;right:22px;width:18px;height:18px;border:2px solid var(--wk-line);border-top-color:var(--wk-red);border-radius:50%;animation:fc-spin .8s linear infinite}
@keyframes fc-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.fc-tile[aria-busy=true]::after{animation:none}}

/* Writing (06-writing-*): "Написание" as the page heading, then position, progress and the card with the word to
   translate, the answer, the special letters, "Учитывать акценты" and, after the answer, the right word with its sound. */
#screenFlashcards .wk-check-top .wk-eyebrow{margin:0;color:var(--wk-text);font:700 clamp(27px,2.4vw,34px)/1.2 var(--wk-display);letter-spacing:-.02em;text-transform:none}
#screenFlashcards .wk-check-top h2{margin-top:10px;font:600 15px/1.35 'Segoe UI',Arial,sans-serif;overflow-wrap:anywhere}
#screenFlashcards .wk-check-top .wk-context{margin-top:4px}
#screenFlashcards .wk-session-meta,#screenFlashcards .wk-progress,#screenFlashcards .wk-reviewed-summary,#screenFlashcards .wk-notice,#screenFlashcards .fc-save-error{max-width:840px;margin-left:auto;margin-right:auto}
#screenFlashcards .wk-session-meta{margin-top:32px;font-size:13px}
.knowledge-screen .fc-writing-review{max-width:840px;margin:24px auto 0;padding:32px 34px;border:1px solid var(--wk-line);border-radius:16px;background:var(--wk-surface);text-align:left}
.fc-prompt-panel{text-align:left}
.fc-prompt{margin:10px 0 0;color:var(--wk-text);font:700 clamp(30px,4vw,44px)/1.2 var(--wk-display);letter-spacing:-.02em;overflow-wrap:anywhere}
.fc-answer-form{display:grid;gap:16px;max-width:none;margin:24px 0 0;text-align:left}
.fc-field{display:grid;gap:8px;color:var(--wk-muted);font-size:13px}
.fc-input{width:100%;min-width:0;min-height:58px;padding:12px 16px;border:1px solid var(--wk-line);border-radius:9px;background:var(--wk-field);color:var(--wk-text);font:22px/1.3 Arial,sans-serif}
.fc-input:focus{outline:none;border-color:var(--wk-muted)}
.fc-input:disabled{opacity:1;color:var(--wk-text)}
.fc-writing-review.fc-wrong .fc-input{border-color:var(--wk-red)}
.fc-writing-review:has(.fc-verdict[data-correct="false"]) .fc-input{border-color:var(--wk-red)}
.fc-letters{display:flex;flex-wrap:wrap;gap:8px}
.fc-letter{min-width:44px;height:44px;padding:0 10px;border:1px solid var(--wk-line);border-radius:8px;background:var(--wk-field);color:var(--wk-text);font:18px/1 Arial,sans-serif;cursor:pointer;transition:border-color .15s}
.fc-letter:hover{border-color:var(--wk-muted)}
.fc-letter:disabled{opacity:.4;cursor:default}
.fc-letter:disabled:hover{border-color:var(--wk-line)}
.fc-letter:focus-visible{outline:2px solid var(--wk-text);outline-offset:2px}
.fc-strict{display:grid;gap:4px}
.fc-switch{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px;color:var(--wk-text);font-size:14px;cursor:pointer}
.fc-switch input{appearance:none;-webkit-appearance:none;position:relative;flex:none;width:44px;height:24px;margin:0;border:0;border-radius:12px;background:var(--wk-line);cursor:pointer;transition:background-color .15s}
.fc-switch input::before{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:var(--wk-muted);transition:left .15s,background-color .15s}
.fc-switch input:checked{background:var(--wk-red)}
.fc-switch input:checked::before{left:23px;background:var(--wk-text)}
.fc-switch input:focus-visible{outline:2px solid var(--wk-text);outline-offset:3px}
.fc-switch input:disabled{opacity:.5;cursor:default}
.fc-help{margin:0;color:var(--wk-muted);font-size:12px;line-height:1.6}
.fc-submit{display:block;margin-top:4px}
.fc-submit .wk-button{width:100%;min-height:50px}
.fc-feedback{margin-top:24px;padding-top:24px;border-top:1px solid var(--wk-line)}
.fc-verdict{display:flex;align-items:center;gap:10px;font:600 16px/1.3 'Segoe UI',Arial,sans-serif}
.fc-verdict svg{display:block;flex:none;width:20px;height:20px}
.fc-verdict[data-correct=true]{color:var(--wk-text)}
.fc-verdict[data-correct=false]{color:var(--wk-red)}
.fc-feedback .wk-word-panel{margin-top:14px;text-align:left}
#screenFlashcards .fc-feedback .wk-word-line,#screenFlashcards .fc-feedback .wk-phonetics-line{justify-content:flex-start}
#screenFlashcards .fc-feedback .wk-phonetics-line{margin-left:0}
#screenFlashcards .wk-pronunciation .wk-word{font-size:clamp(36px,5vw,56px);color:var(--wk-text);letter-spacing:-.04em;line-height:1.15}
#screenFlashcards .wk-word-line{margin-top:0}
.knowledge-screen .fc-writing-review .wk-review-buttons{display:flex;flex-wrap:nowrap;gap:12px;max-width:none;margin:24px 0 0}
.fc-writing-review .wk-review-buttons .wk-button{flex:1 1 0;min-width:0;max-width:none;min-height:50px;white-space:normal}
.fc-writing-review .wk-error{text-align:center}
.fc-save-error{display:block;min-height:44px;padding:12px 0;border:0;background:transparent;color:var(--wk-red);font:inherit;text-align:left;text-decoration:underline;cursor:pointer}

/* Result of the writing check (06-writing-results-*): the big numbers of knowledge.css .wk-done-stats. */
.knowledge-screen .fc-done .wk-pick-actions{justify-content:center}
.knowledge-screen .fc-done .wk-eyebrow{margin-bottom:10px}

@media(max-width:760px){
 .fc-work{margin-top:16px}
 .cards-memory-return{padding:12px 20px 0}
 /* "По памяти" (owner, 26.10.2026): "Завершить" stands in the row of "Назад", at its right edge and on its centre line, so the
    title block and the card move up by the row the button took. "Назад" lives outside #screenKnowledge (12 px of padding and a
    44 px button right above it), so the button keeps its place in the markup and is pulled up into that row: 22 px above the
    screen is the middle of the row, 20 px from the right is the padding of the row (16 px on a very narrow phone, below).
    Its width ends before "Назад" (the longest of 24 languages is under 120 px with its frame), a long word wraps inside the button. */
 #cardsMemoryReturn:not([hidden])~#screenKnowledge{position:relative}
 #cardsMemoryReturn:not([hidden])~#screenKnowledge .wk-check-top>[data-action="finish"]{position:absolute;top:-22px;right:20px;max-width:calc(100% - 172px);transform:translateY(-50%)}
 .fc-tiles{grid-template-columns:1fr;gap:16px;margin-top:20px}
 .fc-tile{min-height:0;padding:22px}
 .fc-tile strong{margin-top:16px;font-size:19px}
 .fc-tile span{margin-top:10px}
 .fc-tile[aria-busy=true]::after{top:18px;right:18px}
 #screenFlashcards .wk-session-meta{margin-top:24px}
 .knowledge-screen .fc-writing-review{padding:22px 16px;border-radius:13px}
 .fc-answer-form{margin-top:20px}
 #screenFlashcards .wk-pronunciation .wk-word{font-size:clamp(32px,10vw,48px);max-width:calc(100% - 66px)}
 .fc-writing-review .wk-review-buttons .wk-button{padding:10px 8px;font-size:13px}
}
@media(max-width:1000px) and (max-height:600px) and (orientation:landscape){
 .fc-work{margin-top:12px}
 .fc-tiles{grid-template-columns:1fr 1fr;margin-top:14px}
 .fc-tile{min-height:96px;padding:16px 18px}
 .fc-tile strong{margin-top:10px}
 .knowledge-screen .fc-writing-review{margin-top:16px;padding:18px 20px}
 .fc-prompt{font-size:clamp(26px,4vw,36px)}
 .fc-answer-form{margin-top:14px;gap:10px}
 .fc-input{min-height:48px;font-size:20px}
 .fc-feedback{margin-top:14px;padding-top:14px}
}
/* A very narrow phone: the card keeps its frame but gives the word the whole width, so long words keep one line. */
@media(max-width:360px){
 .cards-memory-return{padding-inline:16px}
 #cardsMemoryReturn:not([hidden])~#screenKnowledge .wk-check-top>[data-action="finish"]{right:16px;max-width:calc(100% - 160px)}
 .fc-tile{padding:18px 16px}
 .knowledge-screen .fc-writing-review{padding:16px 0;border-width:1px 0 0;border-radius:0;background:none}
 .fc-letters{gap:6px}
}
/* "+ Добавить слова" beside "К проверке: N" on the way-to-check screen, and the line why the list is short. */
.fc-count-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin:8px 0 0}
.fc-count-row .fc-count{min-height:0;margin:0}
.fc-add-note{margin:0;color:var(--wk-muted);font-size:13px}
.fc-add{min-height:36px;padding:6px 14px;border:1px solid var(--wk-line,var(--line));border-radius:var(--radius-button);background:transparent;color:var(--text);font:600 13px/1.3 var(--font-text);text-align:left;overflow-wrap:normal;cursor:pointer}
.fc-add:hover{border-color:var(--muted)}
.fc-add:disabled{opacity:.55;cursor:default}
