/* Consistent product controls across supporting screens. */
body.tp-refined{--ui-font:'Segoe UI',Arial,sans-serif;--ui-gap:12px;--ui-radius:8px}
body.tp-refined dialog:not(#seatingRevealScreen){font:14px/1.5 var(--ui-font);border:1px solid var(--line);border-radius:12px;padding:24px;max-width:calc(100vw - 28px);max-height:calc(100dvh - 32px);color:var(--ink);background:var(--paper)}
body.tp-refined dialog .dialog-top{align-items:center;gap:16px;margin-bottom:20px}
body.tp-refined dialog .dialog-top h2{font-size:23px;line-height:1.25;letter-spacing:-.3px}
body.tp-refined dialog h3{font-size:16px;line-height:1.35;margin:24px 0 10px}
body.tp-refined dialog p{line-height:1.55}
body.tp-refined dialog :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea){font:14px/1.4 var(--ui-font);min-height:40px;padding:8px 10px;border:1px solid var(--line);border-radius:6px;box-sizing:border-box;color:var(--ink);background:var(--bg);max-width:100%}
body.tp-refined dialog label{line-height:1.5}
body.tp-refined dialog .dialog-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}
body.tp-refined dialog table{border-collapse:collapse;width:100%}body.tp-refined dialog :is(th,td){padding:10px 12px;vertical-align:top;text-align:left;border-bottom:1px solid var(--line)}
body.tp-refined dialog th{font-size:12px;font-weight:650;color:var(--muted)}
body.tp-refined dialog summary{cursor:pointer;padding-block:10px;line-height:1.4}
body.tp-refined .tp-chalk-button{transition:background-color 140ms ease,border-color 140ms ease}
body.tp-refined .checkin{min-height:0;padding:9px 14px;gap:12px;grid-template-columns:minmax(220px,1fr) auto}
body.tp-refined .checkin strong{font-size:19px!important}body.tp-refined .checkin p{margin:3px 0 0;font-size:11px}
body.tp-refined .checkin .names button[data-id]{font-size:21px!important}
body.tp-refined .checkin .names .daily-away-button.tp-chalk-button{font:500 11px/1.2 var(--ui-font)!important;min-height:26px!important;min-width:0!important;height:26px;padding:4px 7px!important;border-radius:5px!important}
body.tp-refined .checkin .names{gap:16px}body.tp-refined .checkin .daily-focus-person{gap:7px;min-width:0}
body.tp-refined #popover :is(.action-shortcut,.next-step-option),body.tp-refined #classObservation.standard-batch-evaluation .batch-prompt[data-prompt-family]{display:grid!important;grid-template-columns:minmax(0,1fr);justify-content:stretch!important;justify-items:center;align-content:start;width:100%;margin:0;min-width:0}
body.tp-refined #popover :is(.action-shortcut,.next-step-option)>span:not(.prompt-check){width:100%;min-width:0;align-self:start}
body.tp-refined .course-calendar-toggle.tp-chalk-button{width:40px;min-width:40px;min-height:44px;padding:8px!important;align-self:center;border-radius:6px!important}
.course-calendar-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body.tp-refined #popover{font:14px/1.5 var(--ui-font);scroll-padding-top:100px;scroll-padding-bottom:30px}
body.tp-refined #popover label.field{display:block;margin-top:18px;margin-bottom:7px;font-size:13px;font-weight:600}
body.tp-refined #popover #note{width:100%;min-height:100px;padding:12px;font:14px/1.5 var(--ui-font);border-radius:7px;background:var(--bg);border:1px solid var(--line)}
body.tp-refined #popover #source{padding:9px 11px;border:1px solid var(--line);border-radius:6px;background:var(--bg);min-height:40px}
body.tp-refined #popover details{margin-block:14px;padding:0;border:0;border-top:1px solid var(--line);border-radius:0}
body.tp-refined #popover summary{padding:12px 0;cursor:pointer;font-size:13px}
body.tp-refined #popover .pop-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px;padding-top:14px;border-top:1px solid var(--line)}
body.tp-refined #popover :is(#newObservation,#openStudentNotesPrint,#studentContactLog){border:1px solid var(--line)!important;border-radius:6px!important;padding:8px 11px!important;min-height:36px;text-decoration:none!important;font:500 13px/1.3 var(--ui-font)!important}
body.tp-refined #popover #popSaved{font-size:12px;color:var(--muted)}
body.tp-refined #popover .staging-entry-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px;padding-top:12px}
body.tp-refined #popover .staging-entry-actions button{margin:0!important}
body.tp-refined .room-footer{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding-block:12px}
@media(max-width:700px){body.tp-refined .checkin{grid-template-columns:1fr;gap:8px}body.tp-refined .checkin .names{gap:18px}body.tp-refined dialog:not(#seatingRevealScreen){padding:18px}body.tp-refined #popover{font-size:14px}}
@media(prefers-reduced-motion:reduce){body.tp-refined .tp-chalk-button{transition:none}}
body.tp-refined :is(dialog,#popover) :is(p,li,label,summary,td,th,.small,.muted){font-family:var(--ui-font)!important}
body.tp-refined :is(dialog,#popover) :is(p,li,td,label){line-height:1.5}
body.tp-refined dialog .dialog-top{position:sticky;top:-24px;background:var(--paper);z-index:5;padding-block:12px;border-bottom:1px solid var(--line)}
body.tp-refined dialog .close{min-width:36px;min-height:36px;border:1px solid var(--line)!important;border-radius:6px!important;padding:5px!important;text-decoration:none!important}
body.tp-refined :is(#overviewPrevious,#overviewNext,#feedbackPrevious,#feedbackNext,#overviewPrintStudentEvidence,#saveContact,#setupArrangeSeats){font:500 13px/1.4 var(--ui-font)!important;min-height:36px;padding:8px 12px!important;border:1px solid var(--line)!important;border-radius:6px!important;text-decoration:none!important}
body.tp-refined #feedbackPanel :is(td,label){font-size:13px!important}
body.tp-refined #contactLogDialog :is(select,textarea){width:100%}
body.tp-refined #contactLogDialog textarea{min-height:100px}
body.tp-refined #criteriaDialog :is(p,li){font-size:14px}
body.tp-refined .object-tools{align-items:center;gap:10px;padding-block:12px}
body.tp-refined .object-tools :is(select,button){min-height:36px;border-radius:6px;padding:7px 10px}
#stagingLayoutStatus{font:12px/1.4 var(--ui-font);color:var(--muted);margin:6px 0 10px}
body.tp-refined dialog .small{font-size:12px;line-height:1.5}
body.tp-refined #popover .pop-head{padding-bottom:10px;border-bottom:1px solid var(--line)}
body.tp-refined #popover .pop-context{padding-block:8px}
@media(max-width:700px){body.tp-refined dialog .dialog-top{top:-18px;flex-wrap:wrap}body.tp-refined dialog :is(th,td){padding:8px}body.tp-refined .object-tools{gap:8px}}
body.tp-refined{--ui-font:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif}
body.tp-refined #popover :is(input,textarea,select){font-family:var(--ui-font)!important}
body.tp-refined .workspace:has(#history:not([hidden])){grid-template-columns:minmax(0,1fr)}
body.tp-refined #history{border:1px solid var(--line);border-radius:8px;padding:18px;background:var(--paper);max-height:380px;overflow:auto;margin-top:16px}
body.tp-refined #history .entry{padding:12px 0;border-bottom:1px solid var(--line)}
body.tp-refined #localTrialWelcome{padding:14px 16px;border:1px solid var(--line);border-radius:8px;gap:16px;margin-bottom:16px}
body.tp-refined #localTrialWelcome h2{font-size:18px;margin:0 0 4px}body.tp-refined #localTrialWelcome p{font-size:12px;margin:0}
body.tp-refined #localTrialWelcome .actions button{font:500 13px/1.4 var(--ui-font);white-space:normal;min-height:36px}
body.tp-refined #popover,body.tp-refined #classSetup,body.tp-refined .staging-utilities-content{background:var(--paper);color:var(--ink);border-color:var(--line)}
body.tp-refined.whiteboard-theme .checkin{background:var(--paper)!important}
body.tp-refined.whiteboard-theme .staging-badge{color:var(--muted)}
.staging-review-settings{border-block:1px solid var(--line);margin:0 0 16px;padding:0}
body.tp-refined dialog .staging-review-settings>summary{font-size:13px;font-weight:600;padding:12px 0;color:var(--blue)}
body.tp-refined .staging-review-settings .compact-reflection-schedule{border:0;margin:0;padding:12px 0 16px;background:transparent}
body.tp-refined .review-navigation{align-items:end;gap:12px}
body.tp-refined .review-navigation label{display:flex;flex-direction:column;gap:6px;align-items:stretch;text-align:left;min-width:0}
body.tp-refined .review-navigation select{width:100%}
body.tp-refined .simple-rubric-scroll{scrollbar-color:var(--line) var(--paper);scroll-padding-inline:8px}
@media(max-width:600px){body.tp-refined .review-navigation{display:grid;grid-template-columns:1fr 1fr;gap:10px}body.tp-refined .review-navigation>label{min-width:0;width:auto}body.tp-refined .review-navigation>button{margin:0;min-width:0}body.tp-refined .review-navigation label select{max-width:100%;min-width:0}}
/* Reserve space for Undo feedback instead of covering the last comment controls. */
body.tp-refined:has(#toast:not([hidden])) #popover{max-height:calc(100dvh - 100px)}
body.tp-refined #toast{bottom:14px;max-width:calc(100vw - 28px);font:13px/1.4 var(--ui-font);border-radius:8px}
body.tp-refined #toast button{min-height:32px}
/* A stable recording panel leaves a dedicated bottom lane for save/undo feedback. */
body.tp-refined #popover{position:fixed;top:16px!important;left:50%!important;transform:translateX(-50%);max-height:calc(100dvh - 90px)}
body.tp-refined:has(#toast:not([hidden])) #popover{max-height:calc(100dvh - 90px)}
@media(max-width:700px){body.tp-refined #popover{top:12px!important;max-height:calc(100dvh - 86px)}body.tp-refined:has(#toast:not([hidden])) #popover{max-height:calc(100dvh - 86px)}}

/* Banner controls live in the existing navigation; retain nodes used by app logic. */
body.tp-refined #localTrialWelcome{display:none!important}
body.tp-refined #classObservation #batchRatings{margin-bottom:18px}
body.tp-refined #classObservation .batch-context-fields{margin-block:4px 18px}
/* Seating rules are reached from Arrange room after setup is saved. */
body.tp-refined #classSetup #setupArrangeSeats{display:none!important}
body.tp-refined header .staging-brand-b{display:block;width:100%;aspect-ratio:6;background:url('/brand/wordmark-b.png') center center/100% auto no-repeat}
body.tp-refined.whiteboard-theme header .staging-brand-b{filter:invert(1) grayscale(1) contrast(1.4);mix-blend-mode:multiply}
/* A touch starting on a desk belongs to the desk; room gutters remain scrollable. */
body.tp-refined #room .seat{touch-action:none;-webkit-touch-callout:none;user-select:none}
body.tp-refined #room .seat.staging-desk-moving{outline:2px solid #cfadbc;outline-offset:4px;cursor:grabbing;z-index:10}
body.tp-refined #room .seat.staging-desk-pending{outline:1px dashed #cfadbc;outline-offset:3px}
