.library-workspace .round-study { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 24px; }
.round-study[hidden] { display: none; }
.round-study h3, .round-study h4, .round-study p { margin: 0; letter-spacing: 0; }
.round-study h3 { font-size: 20px; line-height: 1.45; overflow-wrap: anywhere; }
.round-study h4 { font-size: 14px; line-height: 1.45; }
.round-study .study-heading, .round-study .study-section-heading, .study-role > header, .study-role-actions,
.round-study .study-heading > div:last-child, .study-form-actions { display: flex; align-items: center; gap: 8px; }
.round-study .study-heading, .round-study .study-section-heading, .study-role > header { justify-content: space-between; }
.round-study .study-heading { align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.study-heading > div:first-child { min-width: 0; }
.study-round-title > span { display: block; font-size: var(--font-control); color: var(--muted); margin-bottom: 4px; }
.round-study .study-heading-content { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(0, 2fr); gap: 24px; flex: 1; min-width: 0; }
.study-heading-content > * { min-width: 0; }
.round-study .study-heading-description { min-width: 0; max-height: 144px; overflow-y: auto; scrollbar-width: thin; }
.round-study .study-heading-description h4 { margin-bottom: 4px; font-size: var(--font-caption); font-weight: 400; color: var(--muted); }
.round-study button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; font-size: var(--font-control); line-height: 1.4; white-space: nowrap; }
.round-study button img { display: block; width: 16px; height: 16px; filter: invert(1); pointer-events: none; }
.round-study .study-icon { width: 30px; min-width: 30px; height: 30px; min-height: 30px; padding: 6px; background: transparent; border-color: transparent; }
.round-study .study-icon:hover { background: var(--hover); border-color: var(--line); }
.round-study .study-preview-play:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.round-study .study-preview-play:not(:disabled):hover { background: var(--text); border-color: var(--text); }
.round-study .study-preview-play:not(:disabled) img { filter: brightness(0); }
.round-study .study-body { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 2fr); gap: 32px; align-items: start; }
.round-study .study-description, .round-study .study-roles { min-width: 0; }
.round-study .study-description { position: sticky; top: calc(var(--topbar-height, 52px) + 16px); display: flex; flex-direction: column; max-height: calc(100dvh - var(--topbar-height, 52px) - 32px); }
.study-description > [data-study-preview], .study-description > h4 { flex-shrink: 0; }
.study-description > :is(form,.study-description-text,.study-invite) { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.round-study .study-description h4 { margin-bottom: 12px; }
.round-study label { display: grid; gap: 6px; margin: 0; font-size: var(--font-control); color: var(--muted); }
.round-study input:not([type="checkbox"]), .round-study textarea, .round-study select { box-sizing: border-box; width: 100%; min-width: 0; padding: 8px 10px; font-family: inherit; font-size: 13px; line-height: 1.6; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; }
.round-study textarea { resize: vertical; min-height: 86px; }
.round-study .study-description textarea { min-height: 180px; }
.round-study [data-study-form="description"] > button { margin-top: 8px; }
.round-study .study-description-text, .study-role-description { white-space: pre-wrap; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.round-study .study-section-heading { margin-bottom: 14px; }
.round-study .study-section-heading { align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.study-team-actions { display: flex; align-items: flex-end; gap: 10px; }
.round-study .study-team-actions label { width: 155px; }
.study-add-roles-wrap { position: relative; display: inline-flex; border-radius: 4px; }
.study-add-roles-wrap button:disabled { pointer-events: none; }
.study-add-roles-wrap [role="tooltip"] { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 20; width: max-content; max-width: 230px; padding: 7px 10px; font-size: var(--font-control); line-height: 1.5; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .12s ease; }
.study-add-roles-wrap:is(:hover,:focus-within) [role="tooltip"] { visibility: visible; opacity: 1; }
.study-batch-actions { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-block: 1px solid var(--line); margin-bottom: 12px; }
.study-batch-actions span { margin-right: auto; color: var(--muted); font-size: var(--font-control); }
.study-batch-actions button:last-child { background: var(--selection); border-color: var(--accent); color: var(--text); }
.study-role { margin-bottom: 10px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.study-role > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; list-style: none; cursor: pointer; }
.study-role > summary::-webkit-details-marker { display: none; }
.study-role > summary > div:first-child { min-width: 0; }
.study-role summary p { margin-top: 3px; font-size: var(--font-control); color: var(--muted); }
.study-role > summary:hover { background: var(--hover); }
.study-role > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.study-role-chevron { width: 14px; height: 14px; flex-shrink: 0; filter: invert(1); opacity: .6; transition: transform .16s ease; }
.study-role[open] .study-role-chevron { transform: rotate(180deg); }
.study-role-body { padding: 4px 16px 16px; }
.study-add-custom { padding: 14px 0; border-top: 1px solid var(--line); }
.study-role > header { gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.study-role header p { margin-top: 4px; color: var(--muted); font-size: var(--font-control); line-height: 1.6; }
.study-role h4 { overflow-wrap: anywhere; }
.study-role-actions { flex-wrap: wrap; justify-content: flex-end; }
.study-side[data-side="T"] { color: #e6c785; }
.study-side[data-side="CT"] { color: #acd7f5; }
.study-progress { color: var(--muted); font-size: var(--font-caption); font-variant-numeric: tabular-nums; }
.round-study .study-role-description { margin-bottom: 14px; color: var(--text); }
.study-check-item { display: grid; grid-template-columns: 100px minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.round-study .study-item-status { display: flex; align-items: center; gap: 7px; font-size: var(--font-caption); white-space: nowrap; }
.study-item-status input, .study-task-row > input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.study-item-status input:disabled { opacity: .8; cursor: default; }
.study-item-copy { min-width: 0; overflow-wrap: anywhere; }
.study-item-copy strong { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; line-height: 1.5; }
.study-item-copy p { color: var(--muted); font-size: var(--font-control); line-height: 1.6; margin-top: 3px; white-space: pre-wrap; }
.study-grenade-icon { flex: 0 0 15px; width: 15px; height: 23px; object-fit: contain; filter: brightness(0) invert(1); opacity: .85; }
.round-study .study-source-time { display: block; width: max-content; color: var(--text); font-size: var(--font-caption); margin-top: 3px; min-height: 24px; padding: 0; background: transparent; border: 0; }
.study-source-time:hover { text-decoration: underline; }
.study-setpos { color: var(--text); padding-inline: 10px; font-variant-numeric: tabular-nums; }
.study-verify[aria-pressed="true"] { background: #213e34; border-color: #547966; color: #b9e1ce; }
.study-assignment { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; margin-top: 6px; border-top: 1px solid var(--line); }
.study-assignment > div { display: grid; gap: 4px; }
.study-assignment > .study-assignment-actions { display: flex; align-items: center; gap: 6px; }
.study-assignment strong { font-size: 13px; }
.study-assignment span { font-size: var(--font-caption); color: var(--muted); }
.study-assignment form { display: flex; gap: 10px; align-items: flex-end; width: 100%; }
.study-assignment label { max-width: 320px; flex: 1; }
.round-study .study-muted { color: var(--muted); font-size: 13px; padding: 14px 0; line-height: 1.7; }
.round-study .study-status { color: #d5bd87; font-size: 13px; line-height: 1.6; margin-bottom: 16px; }
.study-invite { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.study-invite > button { margin-top: 8px; }
.study-bot-link { display: inline-block; margin-left: 12px; font-size: var(--font-control); color: var(--text); }
.study-invite p { margin-top: 8px; color: #c8b07d; font-size: var(--font-control); line-height: 1.6; }
.study-role-editor { margin-bottom: 20px; padding-block: 16px; border-block: 1px solid var(--line); }
.study-role-editor > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.study-role-editor > header > div { display: flex; gap: 2px; }
.study-role-editor > header strong { font-size: 13px; }
.study-editor-fields { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 12px; margin-bottom: 12px; }
.study-player-bindings { display: grid; align-content: start; gap: 12px; min-width: 0; }
.round-study .study-throw { display: block; width: fit-content; margin-top: 4px; padding: 2px 6px; border-left: 2px solid var(--line-strong); background: var(--panel-2); color: var(--text); font-size: var(--font-caption); line-height: 1.5; }
.study-role-editor > h4 { margin-top: 20px; margin-bottom: 8px; }
.study-task-row { display: grid; grid-template-columns: 16px minmax(0,1fr) 30px; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.study-task-row > input { margin-top: 11px; }
.study-task-row > div { display: grid; gap: 6px; min-width: 0; }
.study-task-row > div input:last-child { font-size: var(--font-control); color: var(--muted); }
.study-custom-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; margin-top: 4px; }
.study-custom-command { grid-column: 1 / -1; }
.round-study .study-custom-command input { font-family: Consolas, monospace; font-size: var(--font-control); }
.study-item-copy .study-custom-source { color: var(--muted); font-size: var(--font-caption); }
.study-form-actions { margin-top: 14px; }
.study-form-actions > span { flex: 1; }
.round-study :is(button,a,input,select,textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.study-mini-replay { margin-bottom: 24px; min-width: 0; }
.study-mini-replay > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; margin-bottom: 6px; }
.study-mini-replay > header strong { font-size: 13px; overflow-wrap: anywhere; }
.study-mini-replay > header span { font-size: var(--font-caption); color: #c7ad78; }
.study-mini-views { display: flex; flex: 0 0 auto; gap: 2px; }
.round-study .study-mini-views button { width: 32px; min-height: 28px; padding: 3px; font-size: var(--font-caption); }
.round-study .study-mini-views button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.study-mini-replay.is-3d .study-mini-map { display: none; }
.study-mini-pov { width: 100%; aspect-ratio: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.study-mini-pov[hidden] { display: none; }
.study-mini-pov iframe { display: block; width: 100%; height: 100%; border: 0; }
.round-study .study-mini-pov p { padding: 12px; font-size: var(--font-control); color: var(--muted); overflow-wrap: anywhere; }
.study-mini-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; margin-bottom: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; }
.round-study .study-mini-modes button { min-width: 0; min-height: 29px; padding: 4px 6px; border-color: transparent; background: transparent; border-radius: 3px; color: var(--muted); }
.round-study .study-mini-modes button[aria-pressed="true"] { background: var(--panel-2); border-color: var(--line-strong); color: var(--text); }
.study-mini-map { position: relative; width: 100%; aspect-ratio: 1; background: transparent; border: 0; border-radius: 0; overflow: hidden; }
.study-mini-map canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.round-study .study-mini-opponents { display: flex; align-items: center; gap: 8px; margin: 0; cursor: pointer; }
.study-mini-opponents[hidden] { display: none; }
.study-mini-opponents input { width: 14px; height: 14px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.round-study .study-mini-map p { position: absolute; inset: 0; padding: 16px; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: var(--font-control); background: var(--bg); }
.study-mini-map p[hidden] { display: none; }
.study-mini-controls { display: grid; grid-template-columns: 32px minmax(0,1fr) 42px; grid-template-rows: 32px 24px; column-gap: 8px; align-items: center; }
.study-mini-controls > [data-mini-play] { grid-column: 1; grid-row: 1; }
.study-mini-controls > [data-mini-clock] { grid-column: 3; grid-row: 1; }
.study-mini-timeline { display: grid; grid-column: 2; grid-row: 1 / span 2; grid-template-rows: 32px 24px; min-width: 0; align-items: center; }
.study-mini-timeline > [data-mini-seek] { grid-row: 1; }
.study-mini-timeline > [data-mini-events] { grid-row: 2; }
.round-study .study-mini-controls button { padding: 6px; width: 32px; height: 32px; min-height: 32px; }
.study-mini-controls output { font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.round-study .study-mini-replay input[type="range"] { width: 100%; margin: 0; padding: 0; min-width: 0; min-height: 18px; height: 18px; accent-color: var(--accent); border: 0; background: transparent; cursor: default; }
.round-study .study-mini-replay input[type="range"] { appearance: none; }
.study-mini-replay input[type="range"]::-webkit-slider-runnable-track { height: 3px; background: var(--panel-2); border-radius: 2px; }
.study-mini-replay input[type="range"]::-webkit-slider-thumb { appearance: none; width: 9px; height: 9px; margin-top: -3px; border: 1px solid var(--line); border-radius: 50%; background: var(--accent); }
.round-study .study-mini-replay input[data-mini-seek]::-webkit-slider-thumb { width: 2px; height: 15px; margin-top: -6px; border: 0; border-radius: 0; background: var(--accent); }
.study-mini-replay input[type="range"]::-moz-range-track { height: 3px; background: var(--panel-2); border-radius: 2px; }
.study-mini-replay input[type="range"]::-moz-range-thumb { width: 9px; height: 9px; border: 1px solid var(--line); border-radius: 50%; background: var(--accent); }
.round-study .study-mini-replay input[data-mini-seek]::-moz-range-thumb { width: 2px; height: 15px; border: 0; border-radius: 0; background: var(--accent); }
.study-mini-options { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; margin-top: 8px; }
.round-study .study-mini-speed { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 8px; align-items: center; flex: 0 0 144px; width: 144px; margin: 0 0 0 auto; }
.study-mini-speed output { width: 40px; font-size: var(--font-control); color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.study-mini-events { position: relative; width: 100%; height: 24px; margin: 0; }
.study-mini-events[hidden] { display: none; }
.round-study .study-mini-events .timeline-event-button { width: 26px; height: 24px; min-height: 24px; padding: 3px; }
.round-study .study-mini-events .timeline-event-button.grouped { width: 28px; padding-right: 10px; }
@media (max-width: 1200px) {
  .round-study .study-body { grid-template-columns: 260px minmax(0,1fr); gap: 20px; }
  .study-check-item { grid-template-columns: 90px minmax(0,1fr) auto; gap: 8px; }
  .study-check-item .study-verify { grid-column: 2 / -1; justify-self: end; }
  .study-role > header { flex-wrap: wrap; }
}
