/* Writing only. Palette and shared controls come from practice-page.css. */
body.wr-practice .session-bar { background: transparent; border-color: var(--border); flex-wrap: wrap; }
body.wr-practice .sec-label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
body.wr-practice .prompt-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 24px; }
body.wr-practice .prompt-pill { min-width: 0; padding: 16px; border-radius: 12px; background: var(--practice-card); border-color: var(--border2); text-align: start; white-space: normal; font-family: inherit; }
body.wr-practice .prompt-pill:hover { background: var(--surface2); border-color: var(--sky); }
body.wr-practice .prompt-pill.active { background: var(--practice-accent-wash); border-color: var(--sky); }
body.wr-practice .prompt-pill-label { max-width: 100%; color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
body.wr-practice .prompt-pill.active .prompt-pill-label { color: var(--sky); }
body.wr-practice .prompt-pill-desc { display: block; font-size: 13px; line-height: 1.5; margin-top: 8px; overflow-wrap: anywhere; }
body.wr-practice .length-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 0; }
body.wr-practice .length-btn { min-width: 0; min-height: 48px; padding: 12px; color: var(--muted); background: transparent; border-color: var(--border2); font-size: 13px; }
body.wr-practice .length-btn:hover { background: var(--surface2); border-color: var(--sky); }
body.wr-practice .length-btn.active { color: var(--sky); background: var(--practice-accent-wash); border-color: var(--sky); }
body.wr-practice .writing-card,
body.wr-practice .result-card { background: var(--practice-card); border: 1px solid var(--border); border-radius: 20px; padding: 32px; margin-bottom: 24px; animation: none; text-align: start; }
body.wr-practice .writing-meta { gap: 16px; margin-bottom: 24px; }
body.wr-practice .writing-prompt-hint { min-width: 0; flex-basis: 100%; font-size: 18px; line-height: 1.6; color: var(--text); overflow-wrap: anywhere; }
body.wr-practice .writing-prompt-hint strong { font-weight: 600; }
body.wr-practice .writing-meta-right { width: 100%; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
body.wr-practice .btn-new-topic { min-height: 44px; padding: 10px 14px; color: var(--muted); background: transparent; border-color: var(--border2); border-radius: 999px; white-space: normal; }
body.wr-practice .btn-new-topic:hover { color: var(--text); background: var(--surface2); border-color: var(--border2); }
body.wr-practice .word-counter { color: var(--muted); font-size: 13px; }
body.wr-practice .word-counter.on-target { color: var(--emerald); }
body.wr-practice .writing-textarea { background: var(--bg); border: 1px solid var(--border2); border-radius: 12px; padding: 16px; min-height: 300px; font-size: 18px; line-height: 1.7; resize: vertical; }
body.wr-practice .writing-textarea:focus { border-color: var(--sky); }
body.wr-practice .writing-textarea::placeholder { color: var(--muted); opacity: 1; }
body.wr-practice .writing-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; padding-top: 20px; margin-top: 20px; }
body.wr-practice .btn-clear { justify-content: center; min-height: 48px; background: transparent; color: var(--muted); border-color: var(--border2); border-radius: 999px; }
body.wr-practice .btn-clear:hover { background: var(--surface2); color: var(--text); border-color: var(--border2); }
body.wr-practice .btn-submit,
body.wr-practice .btn-write-again,
body.wr-practice .btn-r-submit,
body.wr-practice .wr-tour-action.primary {
  background: var(--sky); color: var(--practice-on-accent); border: 1px solid transparent;
  min-height: 48px; border-radius: 999px; font-weight: 600; box-shadow: none; justify-content: center;
}
body.wr-practice .btn-submit:hover:not(:disabled),
body.wr-practice .btn-write-again:hover,
body.wr-practice .btn-r-submit:hover,
body.wr-practice .wr-tour-action.primary:hover { background: var(--sky2); color: var(--practice-on-accent); transform: none; }
body.wr-practice :is(.btn-submit,.btn-clear,.btn-new-topic,.prompt-pill,.length-btn):disabled { background: var(--bg3); color: var(--muted); border-color: var(--border); opacity: 1; cursor: not-allowed; }
body.wr-practice .spinner-sm { border-top-color: currentColor; }
body.wr-practice .btn-write-again { width: 100%; }
body.wr-practice .score-ring-wrap { justify-content: flex-start; }
body.wr-practice .score-num { font-size: 28px; font-weight: 600; }
body.wr-practice .score-grade { font-size: 12px; font-weight: 500; }
body.wr-practice .feedback-text { color: var(--text); font-size: 16px; line-height: 1.7; text-align: start; overflow-wrap: anywhere; }
body.wr-practice .corrections-box,
body.wr-practice .improved-box { background: var(--bg); border-color: var(--border); border-radius: 12px; padding: 16px; text-align: start; }
body.wr-practice .corrections-title,
body.wr-practice .improved-title { font-size: 14px; font-weight: 500; }
body.wr-practice .correction-item { color: var(--text); font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
body.wr-practice .improved-text { font-size: 16px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
body.wr-practice .writing-draft { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 18px; }
body.wr-practice .writing-draft summary { cursor: pointer; padding: 14px 16px; min-height: 48px; color: var(--muted); font-size: 14px; }
body.wr-practice .writing-draft-text { border-top: 1px solid var(--border); padding: 16px; white-space: pre-wrap; font-size: 16px; line-height: 1.7; overflow-wrap: anywhere; }
body.wr-practice .writing-report-btn { color: var(--muted) !important; margin-inline: 0 !important; min-height: 44px; text-align: start; }
body.wr-practice .writing-report-btn:hover { color: var(--red) !important; }
body.wr-practice .ai-banner { background: transparent; border: 0; padding: 0; align-items: flex-start; }
body.wr-practice .ai-banner-badge { background: var(--bg2); color: var(--muted); font-weight: 500; }
body.wr-practice .report-card,
body.wr-practice .wr-tour-card { background: var(--practice-card); border-color: var(--border); box-shadow: none; }
body.wr-practice .btn-cancel { min-height: 48px; color: var(--muted); background: transparent; }
body.wr-practice .wr-tour-body { color: var(--muted); }
body.wr-practice .wr-tour-action { color: var(--muted); background: transparent; }
body.wr-practice .wr-tour-action.primary { color: var(--practice-on-accent); background: var(--sky); }
body.wr-practice .wr-tour-spotlight { border-color: var(--sky); box-shadow: 0 0 0 9999px rgba(0,0,0,.68); }
body.wr-practice .pp-tour-btn { min-height: 44px !important; color: var(--muted); background: transparent; border-color: var(--border); }
body.wr-practice .pp-tour-btn:hover { color: var(--sky); background: var(--practice-accent-wash); border-color: var(--sky); }
body.wr-practice .ai-badge-nav { color: var(--muted); background: transparent; border-color: var(--border); }
body.wr-practice .ai-dot { animation: none; }
body.wr-practice .pp-session-notice { background: var(--practice-card); border-color: var(--border); box-shadow: none; }
html[data-theme] body.wr-practice .pp-session-notice strong,
html[data-theme] body.wr-practice .pp-session-notice button { color: var(--text) !important; }
html[data-theme] body.wr-practice .pp-session-notice span { color: var(--muted) !important; }
body.wr-practice .pp-session-notice button { background: transparent; border-color: var(--border2); min-height: 44px; }
body.wr-practice .pq-guard-card { background: var(--practice-card); border-color: var(--border); box-shadow: none; }
body.wr-practice .pq-guard-actions .primary { background: var(--sky); color: var(--practice-on-accent); min-height: 48px; font-weight: 600; }
body.wr-practice .pq-guard-actions .secondary { min-height: 48px; font-weight: 500; }

@media (max-width: 860px) {
  body.wr-practice .writing-card,
  body.wr-practice .result-card { padding: 20px; border-radius: 16px; }
  body.wr-practice .prompt-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body.wr-practice .length-row,
  body.wr-practice .writing-actions { grid-template-columns: minmax(0,1fr); }
  body.wr-practice .writing-textarea { min-height: 260px; }
}
@media (max-width: 500px) {
  body.wr-practice .prompt-row { grid-template-columns: minmax(0,1fr); }
}
html.pp-embedded-exercise body.wr-practice .main-content { padding-top: 28px !important; }
