.tusc-console{
	width:100%;
	max-width:none;
	margin:0;
	padding:0;
	display:grid;
	grid-template-columns:220px minmax(0,1fr);
	gap:0;
	align-items:start;
	font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
	color:#1f2937
}
.tusc-sidebar{
	position:sticky;
	top:84px;
	align-self:start;
	min-width:0;
	padding:0 24px 0 0;
	border-right:1px solid #e5e7eb
}
.admin-bar .tusc-sidebar{top:116px}
.tusc-school-switcher{
	margin:0 0 16px;
	padding:0 0 16px;
	border-bottom:1px solid #e5e7eb
}
.tusc-school-switcher label{
	display:grid;
	gap:6px;
	margin:0;
	color:#64748b;
	font-size:12px;
	font-weight:800
}
.tusc-school-switcher select,.tusc-form input,.tusc-form select,.tusc-form textarea{
	width:100%;
	max-width:520px;
	padding:8px;
	border:1px solid #d1d5db;
	border-radius:8px;
	background:#fff;
	color:#111827
}
.tusc-school-switcher select{
	max-width:100%;
	min-height:38px;
	font-size:14px;
	font-weight:700
}
.tusc-nav{
	display:flex;
	flex-direction:column;
	gap:4px;
	margin:0;
	padding:0
}
.tusc-nav a{
	display:flex;
	align-items:center;
	min-height:40px;
	padding:9px 12px;
	border:1px solid transparent;
	border-radius:10px;
	text-decoration:none;
	background:transparent;
	color:#334155;
	font-size:14px;
	font-weight:700
}
.tusc-nav a:hover,.tusc-nav a:focus{
	background:#f1f5f9;
	color:#0f172a;
	text-decoration:none
}
.tusc-nav a.is-active{
	background:#0f2a4a;
	color:#fff;
	border-color:#0f2a4a;
	box-shadow:none;
	width:100%;
	padding:9px 12px
}
.tusc-card{
	background:transparent;
	border:0;
	border-radius:0;
	padding:0;
	margin:0 0 32px;
	box-shadow:none
}
.tusc-card h3{margin:0 0 14px;font-size:18px;line-height:1.4}
.tusc-form{display:grid;gap:12px;margin:8px 0}
.tusc-form label{display:grid;gap:4px;font-weight:600}
.tusc-button{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	width:auto;
	max-width:max-content;
	border:0;
	border-radius:999px;
	padding:8px 14px;
	background:#2563eb;
	color:#fff;
	text-decoration:none;
	cursor:pointer;
	font-weight:700
}
.tusc-button:hover,.tusc-button:focus{color:#fff;text-decoration:none;background:#1d4ed8}
.tusc-button-danger{background:#dc2626}
.tusc-table{width:100%;border-collapse:collapse;font-size:14px}
.tusc-table th,.tusc-table td{border-bottom:1px solid #e5e7eb;text-align:left;padding:8px;vertical-align:top}
.tusc-table th{background:#f8fafc}
.tusc-notice{border-radius:10px;padding:10px 12px;margin:0 0 14px}
.tusc-success{background:#ecfdf5;color:#065f46}
.tusc-error{background:#fef2f2;color:#991b1b}
.tusc-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px}
.tusc-metrics div{border:1px solid #e5e7eb;border-radius:12px;padding:14px;background:#f8fafc}
.tusc-metrics strong{font-size:26px}
.tusc-thread{border:1px solid #e5e7eb;border-radius:12px;padding:12px;margin:10px 0}
.tusc-messages{background:#f8fafc;border-radius:12px;padding:12px;margin:10px 0}
@media (max-width: 960px){
	.tusc-console{
		grid-template-columns:1fr;
		gap:16px
	}
	.tusc-sidebar{
		position:static;
		padding:0 0 12px;
		border-bottom:1px solid #e5e7eb;
		border-right:0;
		padding:0 0 12px
	}
	.tusc-nav{
		display:grid;
		grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
		gap:8px
	}
	.tusc-nav a{justify-content:center}
}

.tusc-help{margin:0 0 18px;color:#475569;line-height:1.7}

/* 1.2.2: 左カラムは固定し、スクロールは本文側だけに限定します。 */
.tusc-console{
	height:calc(100vh - var(--turnup-console-header-height,64px) - 48px);
	min-height:0;
	overflow:hidden;
	align-items:stretch;
}
.admin-bar .tusc-console{
	height:calc(100vh - var(--turnup-console-header-height,64px) - 80px);
}
.tusc-sidebar{
	position:relative;
	top:auto;
	height:100%;
	min-height:0;
	overflow-y:auto;
	overscroll-behavior:contain;
}
.admin-bar .tusc-sidebar{
	top:auto;
}
.tusc-main{
	height:100%;
	min-height:0;
	overflow-y:auto;
	overscroll-behavior:contain;
	padding-bottom:48px;
}
.tusc-main > *:last-child{
	margin-bottom:0;
}

@media (max-width: 960px){
	.tusc-console{
		height:auto;
		min-height:0;
		overflow:visible;
		align-items:start;
	}
	.admin-bar .tusc-console{
		height:auto;
	}
	.tusc-sidebar{
		position:static;
		height:auto;
		overflow:visible;
	}
	.tusc-main{
		height:auto;
		overflow:visible;
		padding-bottom:0;
	}
	body.turnup-console-theme:not(.turnup-console-login-screen){
		height:auto;
		overflow:auto;
	}
	body.turnup-console-theme:not(.turnup-console-login-screen) .turnup-console-shell,
	body.turnup-console-theme:not(.turnup-console-login-screen) .turnup-console-content-wrap,
	body.turnup-console-theme:not(.turnup-console-login-screen) .turnup-console-main{
		height:auto;
		min-height:0;
		overflow:visible;
	}
}


/* 1.2.3: テーマ側のコンパクトヘッダーに合わせ、Console UIの実表示領域を安定させます。 */
.tusc-console {
	height: 100%;
	min-height: 0;
	padding: 16px 0;
	box-sizing: border-box;
}

.tusc-sidebar,
.tusc-main {
	height: 100%;
	box-sizing: border-box;
}

.tusc-main {
	padding-top: 0;
}

.tusc-sidebar {
	padding-top: 0;
}

@media (max-width: 960px) {
	.tusc-console {
		height: auto;
		padding: 14px 0;
	}
}


/* 1.2.4: ヘッダー下の本文が隠れないよう、左カラム/本文の上余白を明示します。 */
.tusc-console {
	height: 100%;
	min-height: 0;
	padding: 12px 0 0;
	box-sizing: border-box;
}

.tusc-sidebar,
.tusc-main {
	height: 100%;
	min-height: 0;
	box-sizing: border-box;
}

.tusc-sidebar {
	padding-top: 0;
	padding-bottom: 18px;
}

.tusc-main {
	padding-top: 0;
	padding-bottom: 48px;
	overflow-y: auto;
}

.tusc-main > .tusc-card:first-child,
.tusc-main > *:first-child {
	margin-top: 0;
}

.tusc-card h2:first-child,
.tusc-card h3:first-child {
	margin-top: 0;
}

@media (max-width: 960px) {
	.tusc-console {
		height: auto;
		padding-top: 14px;
	}

	.tusc-sidebar,
	.tusc-main {
		height: auto;
	}
}


/* 1.2.5: スクール・クラス統合、先生設定の複数クラス、番組表カレンダーUI */
.tusc-info-table th{
	width:180px;
	white-space:nowrap;
}
.tusc-class-row{
	display:grid;
	grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
	gap:12px;
	align-items:end;
	padding:14px 0;
	border-bottom:1px solid #e5e7eb;
}
.tusc-class-row:last-child{
	border-bottom:0;
}
.tusc-two-columns{
	display:grid;
	grid-template-columns:repeat(2,minmax(0,260px));
	gap:12px;
}
.tusc-form select[multiple]{
	min-height:120px;
	padding:8px;
}
.tusc-button-secondary{
	background:#f1f5f9;
	color:#0f172a;
	border:1px solid #dbe3ee;
}
.tusc-button-secondary:hover,
.tusc-button-secondary:focus{
	background:#e2e8f0;
	color:#0f172a;
}
.tusc-schedule-toolbar{
	display:flex;
	flex-wrap:wrap;
	gap:12px;
	align-items:end;
	margin:0 0 14px;
}
.tusc-schedule-toolbar label{
	display:grid;
	gap:4px;
	font-weight:700;
}
.tusc-schedule-toolbar select,
.tusc-schedule-toolbar input{
	min-height:38px;
	padding:8px;
	border:1px solid #d1d5db;
	border-radius:8px;
	background:#fff;
}
.tusc-schedule-nav{
	display:flex;
	flex-wrap:wrap;
	gap:8px;
	align-items:center;
	margin:0 0 16px;
}
.tusc-calendar-month{
	display:grid;
	grid-template-columns:repeat(7,minmax(120px,1fr));
	border-top:1px solid #e5e7eb;
	border-left:1px solid #e5e7eb;
	background:#fff;
}
.tusc-calendar-head{
	padding:8px;
	background:#f8fafc;
	border-right:1px solid #e5e7eb;
	border-bottom:1px solid #e5e7eb;
	font-size:12px;
	font-weight:800;
	color:#475569;
	text-align:center;
}
.tusc-calendar-day{
	min-height:112px;
	padding:8px;
	border-right:1px solid #e5e7eb;
	border-bottom:1px solid #e5e7eb;
	background:#fff;
}
.tusc-calendar-day.is-muted{
	background:#f8fafc;
	color:#94a3b8;
}
.tusc-calendar-date{
	display:inline-flex;
	margin:0 0 6px;
	font-size:12px;
	font-weight:800;
	color:#334155;
	text-decoration:none;
}
.tusc-calendar-pill{
	margin:4px 0;
	padding:5px 7px;
	border-radius:8px;
	background:#eef6ff;
	color:#0f2a4a;
	font-size:12px;
	line-height:1.35;
}
.tusc-calendar-pill span{
	font-weight:800;
}
.tusc-calendar-week{
	display:grid;
	grid-template-columns:repeat(7,minmax(130px,1fr));
	gap:8px;
}
.tusc-week-day{
	min-height:360px;
	border:1px solid #e5e7eb;
	border-radius:12px;
	background:#fff;
	overflow:hidden;
}
.tusc-week-day-head{
	display:flex;
	justify-content:space-between;
	align-items:center;
	padding:10px;
	background:#f8fafc;
	border-bottom:1px solid #e5e7eb;
	font-weight:800;
}
.tusc-week-day-head span{
	font-size:12px;
	color:#64748b;
}
.tusc-week-event{
	margin:8px;
	padding:9px;
	border-left:4px solid #2563eb;
	border-radius:10px;
	background:#eff6ff;
}
.tusc-week-event-time{
	font-size:12px;
	font-weight:800;
	color:#1d4ed8;
}
.tusc-week-event-title{
	margin-top:4px;
	font-weight:700;
	color:#0f172a;
}
.tusc-week-empty{
	margin:8px;
	padding:8px;
	border-radius:8px;
	background:#f8fafc;
	color:#94a3b8;
	font-size:12px;
	text-align:center;
}
@media (max-width: 1200px){
	.tusc-class-row{
		grid-template-columns:1fr;
		align-items:stretch;
	}
	.tusc-calendar-week,
	.tusc-calendar-month{
		grid-template-columns:1fr;
	}
	.tusc-calendar-head{
		display:none;
	}
	.tusc-week-day{
		min-height:0;
	}
}
@media (max-width: 640px){
	.tusc-two-columns{
		grid-template-columns:1fr;
	}
}


/* 番組表：ターンナップ側配信管理に合わせたカレンダーUI */
.tusc-schedule-page{
	min-width:0;
}
.tusc-schedule-page h3,
.tusc-video-register h3{
	margin:0 0 16px;
	font-size:20px;
	color:#0f172a;
}
.tusc-broadcast-legend{
	display:flex;
	flex-wrap:wrap;
	gap:12px;
	align-items:center;
	margin:0 0 12px;
	font-size:12px;
	color:#334155;
}
.tusc-broadcast-legend span{
	display:inline-flex;
	gap:6px;
	align-items:center;
}
.tusc-broadcast-legend i{
	width:12px;
	height:12px;
	border-radius:3px;
	display:inline-block;
}
.tusc-broadcast-legend .is-live{background:#1d7dbb}
.tusc-broadcast-legend .is-rebroadcast{background:#94a3b8}
.tusc-broadcast-legend .is-channel{background:#16856d}
.tusc-broadcast-legend .is-client{background:#b66a00}
.tusc-broadcast-legend .is-public{background:#6d45bf}
.tusc-broadcast-calendar{
	border:1px solid #d7dde5;
	background:#fff;
	overflow:visible;
	max-height:none;
}
.tusc-broadcast-header{
	display:grid;
	grid-template-columns:56px repeat(7,minmax(160px,1fr));
	position:sticky;
	top:0;
	z-index:4;
	background:#fff;
	border-bottom:1px solid #d7dde5;
}
.tusc-broadcast-time-head,
.tusc-broadcast-day-head{
	min-height:34px;
	display:flex;
	align-items:center;
	justify-content:center;
	border-right:1px solid #d7dde5;
	font-size:12px;
	font-weight:800;
	color:#1f2937;
	background:#fff;
}
.tusc-broadcast-day-head.is-today{
	background:#eef6ff;
}
.tusc-broadcast-body{
	display:grid;
	grid-template-columns:56px repeat(7,minmax(160px,1fr));
	min-width:1180px;
}
.tusc-broadcast-hours{
	background:#fff;
	border-right:1px solid #d7dde5;
}
.tusc-broadcast-hour-label{
	height:60px;
	border-bottom:1px solid #e9edf3;
	padding-top:4px;
	text-align:center;
	font-size:12px;
	color:#64748b;
	box-sizing:border-box;
}
.tusc-broadcast-day{
	position:relative;
	height:1440px;
	border-right:1px solid #d7dde5;
	background:
		repeating-linear-gradient(to bottom,#fff 0,#fff 9px,#f4f6f8 10px),
		linear-gradient(to bottom,transparent 0,transparent 59px,#dfe5ec 60px);
	background-size:100% 10px,100% 60px;
}
.tusc-broadcast-day.is-today{
	background:
		repeating-linear-gradient(to bottom,rgba(238,246,255,.78) 0,rgba(238,246,255,.78) 9px,rgba(219,234,254,.65) 10px),
		linear-gradient(to bottom,transparent 0,transparent 59px,#cbdff5 60px);
	background-size:100% 10px,100% 60px;
}
.tusc-time-slot{
	position:relative;
	display:block;
	width:100%;
	height:10px;
	border:0;
	border-bottom:1px solid transparent;
	background:transparent;
	cursor:pointer;
}
.tusc-time-slot:hover{
	background:rgba(37,99,235,.06);
}
.tusc-broadcast-event{
	position:absolute;
	left:6px;
	right:6px;
	z-index:2;
	display:block;
	padding:6px 7px;
	border:0;
	border-left:4px solid #1d7dbb;
	border-radius:7px;
	background:#eaf6ff;
	color:#0f172a;
	text-align:left;
	overflow:hidden;
	cursor:pointer;
	box-shadow:none;
}
.tusc-broadcast-event.is-rebroadcast{
	border-left-color:#64748b;
	background:#f1f5f9;
}
.tusc-broadcast-event.access-client,
.tusc-broadcast-event.access-client_subscriber{
	border-left-color:#b66a00;
}
.tusc-broadcast-event.access-public{
	border-left-color:#6d45bf;
}
.tusc-broadcast-event span{
	display:block;
	font-size:11px;
	font-weight:800;
	color:#1d4ed8;
	line-height:1.2;
}
.tusc-broadcast-event strong{
	display:block;
	margin-top:2px;
	font-size:12px;
	line-height:1.25;
}
.tusc-schedule-modal[hidden]{
	display:none;
}
.tusc-schedule-modal{
	position:fixed;
	inset:0;
	z-index:9999;
	display:flex;
	align-items:center;
	justify-content:center;
	padding:24px;
}
.tusc-schedule-modal-backdrop{
	position:absolute;
	inset:0;
	background:rgba(15,23,42,.38);
}
.tusc-schedule-modal-panel{
	position:relative;
	z-index:1;
	width:min(860px,calc(100vw - 32px));
	max-height:calc(100vh - 48px);
	overflow:auto;
	background:#fff;
	border:1px solid #d7dde5;
	border-radius:16px;
	box-shadow:0 24px 60px rgba(15,23,42,.22);
	padding:22px;
}
.tusc-schedule-modal-head{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:12px;
	margin:0 0 16px;
}
.tusc-schedule-modal-head h3{
	margin:0;
}
.tusc-icon-button{
	width:34px;
	height:34px;
	border:1px solid #d1d5db;
	border-radius:50%;
	background:#fff;
	cursor:pointer;
	font-size:22px;
	line-height:1;
}
.tusc-modal-grid{
	display:grid;
	grid-template-columns:repeat(2,minmax(0,1fr));
	gap:14px;
}
.tusc-field-full{
	grid-column:1/-1;
}
.tusc-inline-check{
	display:flex!important;
	align-items:center;
	gap:8px;
	grid-column:1/-1;
}
.tusc-inline-check input{
	width:auto!important;
}
.tusc-modal-actions{
	display:flex;
	gap:10px;
	align-items:center;
	margin-top:16px;
}
.tusc-delete-schedule-form{
	margin-top:12px;
	padding-top:12px;
	border-top:1px solid #e5e7eb;
}
.tusc-danger-button{
	border:1px solid #dc2626;
	border-radius:999px;
	background:#fff;
	color:#dc2626;
	padding:9px 14px;
	font-weight:800;
	cursor:pointer;
}
.tusc-video-register{
	margin-top:28px;
	padding-top:22px;
	border-top:1px solid #e5e7eb;
}
@media (max-width: 900px){
	.tusc-broadcast-calendar{
		max-height:none;
	}
	.tusc-modal-grid{
		grid-template-columns:1fr;
	}
	.tusc-broadcast-header,
	.tusc-broadcast-body{
		min-width:920px;
	}
}


/* 1.2.8: 本文側が左上に詰まりすぎないよう、固定レイアウト内のメイン余白を明示します。 */
.tusc-main{
	padding:18px 28px 48px 28px;
	box-sizing:border-box;
}
.tusc-main > .tusc-card:first-child,
.tusc-main > *:first-child{
	margin-top:0;
}
@media (max-width: 960px){
	.tusc-main{
		padding:14px 0 24px;
	}
}


/* 1.2.9: クラス設定に教科・科目/学年を追加し、配信OFF時はチャンネル欄を出しません。 */
.tusc-class-summary{
	display:grid;
	gap:4px;
	align-content:center;
}
.tusc-class-row input,
.tusc-class-row select{
	width:100%;
	max-width:100%;
}


.tusc-form-grid{
	display:grid;
	gap:12px;
	align-items:start;
}
.tusc-form-grid-2{
	grid-template-columns:minmax(220px, 1fr) minmax(220px, 1fr);
	max-width:1040px;
}
.tusc-class-code-align > label:nth-child(2),
.tusc-class-subject-align > label:nth-child(2){
	justify-self:stretch;
	width:100%;
}
.tusc-fieldset{
	border:0;
	padding:0;
	margin:0;
}
.tusc-fieldset legend{
	font-weight:700;
	margin:0 0 6px;
}
.tusc-radio-row{
	display:flex;
	flex-wrap:wrap;
	gap:8px;
	align-items:center;
}
.tusc-radio-pill{
	display:inline-flex!important;
	align-items:center;
	gap:6px!important;
	margin:0;
	padding:7px 10px;
	border:1px solid #d1d5db;
	border-radius:999px;
	background:#fff;
	font-weight:700!important;
	cursor:pointer;
}
.tusc-radio-pill input{
	width:auto!important;
	margin:0;
}
.tusc-radio-pill:has(input:checked){
	border-color:#2563eb;
	background:#eff6ff;
	color:#1d4ed8;
}
.tusc-button-small{
	padding:6px 10px;
	font-size:12px;
}
[data-tusc-content-option-select]{
	min-height:190px;
	max-width:720px!important;
}
[data-tusc-manual-wrap] textarea{
	width:100%;
	max-width:720px;
}
@media (max-width: 960px){
	.tusc-form-grid-2{
		grid-template-columns:1fr;
	}
}


/* 1.2.13: 番組表/動画登録・チャット内タブ */
.tusc-tabs{
	display:flex;
	flex-wrap:wrap;
	gap:8px;
	align-items:center;
	margin:0 0 18px;
	border-bottom:1px solid #e5e7eb;
}
.tusc-tabs a{
	display:inline-flex;
	align-items:center;
	min-height:38px;
	padding:8px 14px;
	border:1px solid transparent;
	border-bottom:0;
	border-radius:10px 10px 0 0;
	background:#f8fafc;
	color:#334155;
	font-weight:700;
	text-decoration:none;
}
.tusc-tabs a:hover,
.tusc-tabs a:focus{
	background:#eef2f7;
	color:#0f172a;
	text-decoration:none;
}
.tusc-tabs a.is-active{
	background:#fff;
	color:#0f2a4a;
	border-color:#e5e7eb;
	box-shadow:none;
}


.tusc-search-row{
	display:flex;
	align-items:end;
	gap:10px;
	margin:12px 0 20px;
	flex-wrap:wrap
}
.tusc-search-row label{
	display:grid;
	gap:5px;
	font-weight:700;
	min-width:260px;
	max-width:520px;
	flex:1
}
.tusc-search-row input[type="search"]{
	width:100%;
	padding:9px 10px;
	border:1px solid #d1d5db;
	border-radius:8px;
	background:#fff
}
.tusc-back-link{
	color:#2563eb;
	font-weight:700;
	text-decoration:none
}
.tusc-button-secondary{
	background:#f1f5f9;
	color:#0f172a;
	border:1px solid #cbd5e1
}
.tusc-livechat-page h4{
	margin:24px 0 10px;
	font-size:16px
}
.tusc-livechat-thread-head{
	padding:12px 0;
	border-bottom:1px solid #e5e7eb;
	margin-bottom:14px
}
.tusc-livechat-thread-head h4{
	margin:0 0 6px
}
.tusc-livechat-thread-head p{
	margin:0;
	color:#64748b
}
.tusc-livechat-messages{
	display:grid;
	gap:0;
	border-top:1px solid #e5e7eb
}
.tusc-livechat-message{
	padding:14px 0;
	border-bottom:1px solid #e5e7eb
}
.tusc-livechat-message-meta{
	display:flex;
	align-items:center;
	gap:10px;
	color:#64748b;
	font-size:12px;
	margin-bottom:6px
}
.tusc-livechat-message-meta strong{
	color:#0f172a;
	font-size:13px
}
.tusc-livechat-message-meta em{
	font-style:normal;
	color:#b45309;
	background:#fef3c7;
	border-radius:999px;
	padding:2px 8px
}
.tusc-livechat-message-body{
	white-space:normal;
	line-height:1.7
}
.tusc-muted{
	color:#64748b;
	font-size:12px
}
@media (max-width: 720px){
	.tusc-search-row{
		display:grid
	}
	.tusc-search-row label{
		min-width:0
	}
}

/* 1.2.16: 協業クライアント向け追加メニューの区切り */
.tusc-nav-spacer{height:20px;flex:0 0 auto}
