/* Page « Mon journal » : la liste des pages à gauche, la page ouverte à droite (l'une sous l'autre sur téléphone) */
.jr { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 760px) { .jr { grid-template-columns: minmax(0, 1fr); } }
.jr-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 12px; }
@media (max-width: 760px) { .jr-side { position: static; } }
.jr-side h2 { font-family: var(--f-display); font-size: 24px; margin: 0; }
.jr-quota { margin: 0; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.jr-quota span:first-child { font-family: var(--f-mono); font-size: 12px; }
.jr-guest { background: var(--accent-soft); color: var(--ink); border-radius: 10px; padding: 8px 10px; line-height: 1.45; }
.jr-guest .linkbtn { color: var(--accent); font-weight: 600; }
.jr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow-y: auto; }
@media (max-width: 760px) { .jr-list { max-height: 220px; } }
.jr-list button { width: 100%; text-align: left; font: inherit; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px 40px 8px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; position: relative; }
.jr-list button:hover { border-color: var(--accent); }
.jr-list button[aria-current="true"] { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.jr-list b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-d { font-size: 12px; color: var(--muted); }
.jr-n { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); min-width: 22px; height: 22px; border-radius: 99px; display: grid; place-items: center; font-size: 11px; font-weight: 700; font-family: var(--f-mono); background: var(--again); color: #fff; padding: 0 6px; }
.jr-n.ok { background: var(--easy); }

.jr-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.jr-intro { align-items: flex-start; }
.jr-edit .jr-row { display: flex; gap: 12px; flex-wrap: wrap; }
.jr-f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.jr-f.grow { flex: 1; min-width: 200px; }
.jr-f input, .jr-f textarea { font: inherit; font-size: 15px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; }
.jr-f textarea { min-height: 260px; resize: vertical; line-height: 1.6; font-size: 16px; }
.jr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.jr-count { margin-left: auto; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }

.jr-page { display: flex; flex-direction: column; gap: 14px; }
.jr-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px; }
.jr-head h2 { font-family: var(--f-display); font-size: 26px; margin: 2px 0 0; }
.jr-date { display: inline-block; font-size: 13px; color: var(--muted); }
.jr-date::first-letter { text-transform: uppercase; }
.jr-tools { display: flex; gap: 8px; }
.jr-tools .btn { padding: 7px 12px; font-size: 14px; }
.btn.danger { background: var(--again); border-color: var(--again); color: #fff; }
.jr-sec h3 { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jr-sec h3 .lvl, .jr-sec h3 .tag { text-transform: none; letter-spacing: 0; }
.jr-sec h3 .lvl { color: var(--accent); }
.jr-sec h4 { margin: 4px 0 0; font-size: 14px; }
.jr-text { white-space: pre-wrap; font-family: var(--f-display); font-size: 17px; line-height: 1.75; color: var(--ink); overflow-wrap: anywhere; }
.jr-text .say { vertical-align: middle; margin-left: 6px; }
.jr-summary { color: var(--ink) !important; }
.jr-perfect { color: var(--easy) !important; font-weight: 600; }
.jr-note { color: var(--muted); font-size: 12px; }
.jr-wait { display: flex; align-items: center; gap: 10px; color: var(--muted) !important; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: jr-spin .8s linear infinite; flex: none; }
@keyframes jr-spin { to { transform: rotate(360deg); } }
.jr-limit { color: var(--ink) !important; }

/* one colour per type of mistake */
.jx-orth { --jc: #c62828; } .jx-gram { --jc: #c25e00; } .jx-vocab { --jc: #1565c0; } .jx-style { --jc: #7b3fa3; } .jx-punct { --jc: #2e7d32; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .jx-orth { --jc: #f08a8f; } :root:not([data-theme="light"]) .jx-gram { --jc: #f0a060; } :root:not([data-theme="light"]) .jx-vocab { --jc: #7aa5f0; } :root:not([data-theme="light"]) .jx-style { --jc: #c79af0; } :root:not([data-theme="light"]) .jx-punct { --jc: #7cc98f; } }
:root[data-theme="dark"] .jx-orth { --jc: #f08a8f; } :root[data-theme="dark"] .jx-gram { --jc: #f0a060; } :root[data-theme="dark"] .jx-vocab { --jc: #7aa5f0; } :root[data-theme="dark"] .jx-style { --jc: #c79af0; } :root[data-theme="dark"] .jx-punct { --jc: #7cc98f; }
.jr-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.jr-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.jr-legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--jc); }
.jr-legend b { font-family: var(--f-mono); font-weight: 500; color: var(--muted); }
.jx { cursor: pointer; border-radius: 4px; background: color-mix(in srgb, var(--jc) 10%, transparent); box-shadow: inset 0 -2px 0 var(--jc); padding: 0 2px; }
.jx del { color: var(--muted); text-decoration-color: var(--jc); text-decoration-thickness: 2px; }
.jx ins { text-decoration: none; color: var(--jc); font-weight: 600; margin-left: 3px; }
.jx sup { color: var(--jc); font-family: var(--f-mono); font-size: 10px; font-weight: 700; margin-left: 1px; }
.jr-errs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.jr-errs li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--bg); border-left: 4px solid var(--jc); }
.jr-errs li.flash { animation: jr-flash 1.2s ease; }
@keyframes jr-flash { 0%, 40% { background: color-mix(in srgb, var(--jc) 22%, var(--bg)); } 100% { background: var(--bg); } }
.jr-errs .n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--jc); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; font-family: var(--f-mono); }
.jr-errs li > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.jr-fix { margin: 0; color: var(--ink) !important; font-size: 15px; }
.jr-fix del { color: var(--muted); }
.jr-fix ins { text-decoration: none; color: var(--jc); font-weight: 700; }
.jr-type { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--jc); margin-left: 6px; }
.jr-why { margin: 0; font-size: 14px; color: var(--muted); }
.jr-clean { background: var(--bg); border-radius: 10px; padding: 12px 14px; }

/* Goethe versions */
.jr-levels { display: flex; flex-wrap: wrap; gap: 6px; }
.jr-levels button, .jr-levels span { font: inherit; font-family: var(--f-mono); font-weight: 600; font-size: 14px; min-width: 52px; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; text-align: center; }
.jr-levels button.has { border-color: var(--accent); }
.jr-levels button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.jr-lock { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.jr-lock .jr-levels span { opacity: .45; cursor: default; }
.jr-lock p { color: var(--ink) !important; }
.jr-model { background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.jr-notes { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.jr-trial { color: var(--accent) !important; font-size: 13px; font-weight: 600; }
