body { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.cbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.cbar select#course { max-width: 340px; }
.cbar .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.cbar button.off { opacity: .55; text-decoration: line-through; }
.spacer { flex: 1; }
.panes { flex: 1; display: flex; min-height: 0; }
.pane { display: flex; flex-direction: column; min-width: 0; background: var(--panel); flex: 1 1 33%; }
.pane.collapsed { flex: 0 0 30px !important; overflow: hidden; }
.pane.collapsed > :not(.phead) { display: none; }
.pane.collapsed .phead { writing-mode: vertical-rl; height: 100%; padding: 8px 4px; }
.pane.collapsed .phead .pmeta { display: none; }
.pane.collapsed .collapse { transform: rotate(180deg); }
.pane[hidden] { display: none; }
.phead { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-bottom: 1px solid var(--line); background: #f3f5f8; }
.phead .pmeta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.phead .collapse { padding: 0 6px; }
.pane .tabs { margin: 0; padding: 0 6px; }
.ptool { padding: 4px 8px; margin: 0; border-bottom: 1px solid var(--line); }
.ptool input { flex: 1; min-width: 80px; }
.pbody { flex: 1; overflow: auto; padding: 6px 8px 30px; position: relative; }
.split { flex: 0 0 6px; cursor: col-resize; background: var(--line); }
.split:hover, .split.drag { background: var(--accent); }
.split[hidden] { display: none; }

.drawer { border-top: 2px solid var(--line); background: var(--panel); height: 30vh; display: flex; flex-direction: column; min-height: 34px; }
.drawer.small { height: 34px; }
.drawer.small .dbody { display: none; }
.drawer.big { height: 60vh; }
.dhead { display: flex; align-items: center; padding: 0 8px; border-bottom: 1px solid var(--line); }
.dhead .tabs { border: 0; margin: 0; }
.dbody { flex: 1; overflow: auto; padding: 8px 12px 20px; }

/* trees */
.t-dom { margin: 6px 0; }
.t-dom > .row { font-weight: 600; background: #eef2f8; }
.t-sk { margin-left: 10px; }
.t-sub { margin-left: 26px; }
.row { display: flex; gap: 6px; align-items: center; padding: 2px 4px; border-radius: 4px; flex-wrap: wrap; }
.row:hover { background: #f6f8fb; }
.row .lbl { cursor: pointer; }
.row .lbl:hover { text-decoration: underline; }
.row.sel { outline: 2px solid var(--accent); outline-offset: -1px; }
.row .nm { flex: 1; min-width: 90px; }
.row input.nm { min-width: 0; flex-basis: 120px; }
.t-sk > .row .nm { font-weight: 500; }
.row input.nm { padding: 1px 4px; }
.row input.outs { width: 90px; font-size: 12px; }
.row select.lvl { font-size: 12px; padding: 1px; }
.row .ops { display: flex; gap: 2px; opacity: .35; }
.row:hover .ops, .row:focus-within .ops { opacity: 1; }
.row .ops button { padding: 0 5px; font-size: 12px; line-height: 18px; }
.det { margin: 2px 0 6px 22px; padding: 6px 8px; border-left: 2px solid var(--accent-soft); display: grid; grid-template-columns: 110px 1fr; gap: 4px 8px; font-size: 12px; align-items: start; }
.det textarea { min-height: 40px; resize: vertical; width: 100%; }
.det input, .det select { width: 100%; }
.diffmark { font-size: 10px; border-radius: 3px; padding: 0 4px; }
.dm-add { background: var(--ok-soft); color: var(--ok); }
.dm-chg { background: var(--warn-soft); color: var(--warn); }
.dm-del { background: var(--bad-soft); color: var(--bad); }
.outrow { padding: 5px 4px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.outrow:hover { background: #f6f8fb; }
.outrow.sel { background: var(--hl); }
.outrow .marks { float: right; }
.a-act { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 6px; margin-bottom: 6px; }
.a-act .row input.nm { font-weight: 500; }
iframe.cur { width: 100%; height: calc(100% - 34px); border: 1px solid var(--line); min-height: 300px; }
.matlist tr { cursor: pointer; }
.matlist tr.on td { background: var(--accent-soft); }
textarea.json { width: 100%; height: calc(100% - 40px); min-height: 300px; font-family: ui-monospace, monospace; font-size: 12px; }
.ro .row { cursor: default; }
.hidden-f { display: none !important; }
