
/* Shared study workspace: separate navigation, readable guides and training matrix. */
.area-switch{display:grid;grid-template-columns:1fr 1.4fr;gap:5px;padding:5px;margin:20px 0 12px;border-radius:12px;background:#dceaf5}
.area-switch button{padding:10px 6px;border:0;background:transparent;font-size:12px;font-weight:700;color:var(--muted)}
.area-switch button.active{background:var(--purple);color:white;border-radius:8px}
.study-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.study-map-strip{display:flex;gap:8px;overflow-x:auto;padding:0 0 16px;margin-bottom:10px}
.study-map-strip button{white-space:nowrap;min-width:82px}
.study-map-strip button.active{background:var(--purple);color:white}
.study-toolbar{display:flex;align-items:end;gap:16px;flex-wrap:wrap;margin:0 0 22px}
.study-toolbar label{min-width:120px}
.study-check{display:flex;align-items:center;gap:8px;padding:8px 0}
.study-check input{width:auto}
.study-reference{padding:20px 24px;background:#e7e1f1;border:1px solid #cbb9e0;border-radius:14px;margin-bottom:24px;display:flex;gap:24px;align-items:center;justify-content:space-between}
.study-reference p{margin:8px 0}
.study-reference small{color:var(--muted)}
.study-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:20px;margin-bottom:24px}
.study-guide-card{display:flex;align-items:start;flex-direction:column;gap:12px;border-top:4px solid #9563ba}
.study-guide-card h2,.study-guide-card p{margin:0}
.study-guide-card p{white-space:pre-line;overflow-wrap:anywhere}
.study-card-meta{margin-top:auto;color:var(--muted);font-size:12px}
.study-detail{display:grid;grid-template-columns:minmax(0,2fr) minmax(240px,1fr);gap:24px;align-items:start}
.study-section{margin:24px 0}
.study-section h3{font-size:17px}
.preserve{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}
.study-steps{padding-left:26px}
.study-steps li{padding:8px 0 14px 10px}
.study-steps li::marker{font-weight:800;color:var(--purple)}
.study-person{display:block;color:var(--muted);font-size:13px;margin-top:6px}
.study-reading{margin:18px 0}
.study-image{margin:14px 0}
.study-image img{display:block;max-width:100%;height:auto;border:1px solid var(--border);border-radius:8px}
.study-image figcaption{margin-top:8px;overflow-wrap:anywhere;color:var(--muted);font-size:13px}
.study-image-edit{padding:12px;border:1px solid var(--border);border-radius:8px;margin:12px 0}
.study-image-edit img{max-height:240px;object-fit:contain}
.study-editor-details>summary,.study-step-images>summary{cursor:pointer;font-weight:700;padding:12px 0;color:var(--purple)}
.study-editor-details>label,.study-step-images>label{margin:16px 0}
.study-reading button:focus-visible,.study-editor-details summary:focus-visible,.study-step-images summary:focus-visible{outline:3px solid var(--purple);outline-offset:3px}
.study-comments{margin-top:24px}
.study-comments article,.study-assignee{border-top:1px solid var(--border);padding:16px 0}
.study-comments small{color:var(--muted)}
.study-summary{display:flex;gap:20px;align-items:center;flex-wrap:wrap}
.study-summary>b{font-size:36px;color:var(--purple)}
.study-map-progress{display:flex;flex-wrap:wrap;gap:12px;margin:20px 0 28px}
.study-map-progress span{padding:12px;background:white;border:1px solid var(--border);border-radius:8px}
.study-task h3{font-size:19px}
.study-matrix td{text-align:center;min-width:120px}
.study-matrix th:first-child{min-width:140px}
.study-matrix small{display:block;margin:8px 0;color:var(--muted);font-size:11px}
.study-rating{display:inline-block;border:0;border-radius:8px;padding:10px 18px;background:#eef1f5;font-size:20px;font-weight:700}
.rating-3{background:#e6daf1;color:#48206d}.rating-2{background:#d8eee9;color:#205b4d}.rating-1{background:#ffebc9;color:#805500}.rating-0{background:#fae1e4;color:#802e3b}
.study-choice-grid{display:grid;grid-template-columns:1fr 1fr 1.5fr;gap:24px}
.study-lineup{margin-top:24px}
.study-profile-link{display:flex;gap:16px;align-items:center;margin:16px 0;color:var(--muted)}
form[data-study-form]{display:grid;gap:18px}
form[data-study-form] label{display:grid;gap:8px}
form[data-study-form] input,form[data-study-form] textarea,form[data-study-form] select{width:100%;box-sizing:border-box}
.study-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:16px}
form[data-study-form] fieldset{border:1px solid var(--border);border-radius:10px;padding:16px;margin:6px 0 16px}
form[data-study-form] legend{font-weight:700;color:var(--purple)}
form[data-study-form] fieldset>label{margin-bottom:10px}
.study-history{padding:16px 0;border-bottom:1px solid var(--border)}
[data-study-conflict] details{max-height:340px;overflow:auto;margin-bottom:12px}
@media(max-width:900px){.study-detail{grid-template-columns:1fr}.study-choice-grid{grid-template-columns:1fr 1fr}.study-choice-grid>div:last-child{grid-column:1/-1}.study-reference{align-items:start;flex-direction:column}}
@media(max-width:560px){.study-grid{grid-template-columns:1fr}.study-choice-grid{grid-template-columns:1fr}.study-profile-link{align-items:start;flex-direction:column}.study-form-grid{grid-template-columns:1fr}}
.draft-panel{border:1px solid #a6c5e6;background:#edf5ff;border-radius:12px;padding:14px;margin:0 0 20px;color:#182c4b}
.draft-panel>[role=status]{margin:0 0 10px;font-weight:650}
.draft-panel .draft-error{color:#8c242e}
.draft-offers:empty{display:none}
.draft-offers{margin-top:12px;border-top:1px solid #a6c5e6}
.draft-item{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid #d5deea}
.draft-item>span{flex:1;min-width:180px}
.draft-panel button:focus-visible,.draft-item button:focus-visible{outline:3px solid #532b8f;outline-offset:3px}
@media(max-width:480px){.draft-panel{padding:10px}.draft-item>span{flex-basis:100%}.draft-item button{min-height:42px}}
.sidebar-bottom>button.quiet {margin:4px 8px 4px 0;min-height:32px}
.study-task>button.quiet {margin:6px 10px 0 0;min-height:36px}
.filter-context {margin-bottom:16px;padding:16px;overflow-wrap:anywhere}
.absence-help {margin-top:20px;padding:16px}
.absence-help dt {font-weight:700;margin-top:14px}
.absence-help dd {margin:6px 0 12px;line-height:1.6}
.live-status {padding:10px 28px;display:flex;gap:12px;align-items:center;flex-wrap:wrap;background:#edf5ff;color:#243b55;font-size:12px}
.live-status button {min-height:36px}
.study-comments .badge {margin-left:8px}
.study-task-with-focus{grid-column:1/-1;min-width:0}
.study-task-with-focus>.card{box-shadow:none;background:#f7f9fc}
.focus-round-highlight>td{background:#eee6f8;border-top:2px solid var(--purple);border-bottom:2px solid var(--purple)}
form[data-focus-form]{display:grid;gap:18px}
form[data-focus-form] label{display:grid;gap:8px}
form[data-focus-form] input,form[data-focus-form] textarea,form[data-focus-form] select{width:100%;box-sizing:border-box}
form[data-focus-form] details>summary{cursor:pointer;font-weight:700;padding:10px 0}
form[data-focus-form] [data-focus-reference-row]{padding:16px;border:1px solid var(--border);border-radius:10px;margin:12px 0}
[data-focus-conflict] details{max-height:340px;overflow:auto}
.focus-proposal{border-left:4px solid var(--purple)}
.study-grid>* ,.study-detail>* ,.study-choice-grid>*{min-width:0}
.study-summary>* ,.study-actions>*{max-width:100%;overflow-wrap:anywhere}
.study-assignee h3,.study-task h3,.study-comments b{overflow-wrap:anywhere}
.study-map-strip,.study-steps{max-width:100%}
#lineup-form fieldset{border:1px solid var(--border);border-radius:10px;padding:16px;margin:8px 0 16px}
#lineup-form legend{font-weight:700;color:var(--purple)}
.revision-comparison{table-layout:fixed;white-space:normal;text-align:left}
.revision-comparison th,.revision-comparison td{white-space:pre-wrap;overflow-wrap:anywhere;vertical-align:top;text-align:left}
.revision-comparison thead th:first-child{width:24%}
.revision-comparison thead th:not(:first-child){width:38%}
@media(max-width:768px){
  .study-detail,.study-choice-grid{grid-template-columns:minmax(0,1fr)}
  .study-form-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr))}
}
@media(max-width:700px){
  .sidebar-bottom>button.quiet{min-height:44px;margin:0;padding:10px 6px}
}
@media(max-width:480px){
  .study-grid,.study-form-grid{grid-template-columns:minmax(0,1fr)}
  .study-summary{gap:12px}
  #lineup-form fieldset{padding:12px}
  .revision-comparison th,.revision-comparison td{padding:10px 6px}
}

.area-switch .admin-area{grid-column:1/-1}
