/* サンゼロ教室 */
.szc {
	--szc-ink: #1a1d23;
	--szc-mute: #6b7280;
	--szc-brand: #10b981;
	--szc-brand-dark: #059669;
	--szc-line: #e5e7eb;
	margin: 0 0 2em;
	font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
	color: var(--szc-ink);
}

.szc-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: 18px;
}

.szc-room {
	position: relative;
	container-type: inline-size;
	width: 100%;
	min-width: 860px;
	background-size: cover;
	background-position: center;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(26, 29, 35, 0.12);
	user-select: none;
}

.szc-layer {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.szc [hidden] {
	display: none !important;
}

/* ゾーン名 */
.szc-zone {
	position: absolute;
	transform: translate(-50%, -50%);
	padding: 0.35em 0.9em;
	border-radius: 999px;
	background: rgba(26, 29, 35, 0.85);
	color: #fff;
	font-size: clamp(9px, 0.8cqw, 12px);
	font-weight: 600;
	letter-spacing: 0.04em;
	white-space: nowrap;
	backdrop-filter: blur(4px);
	z-index: 2;
}

/* アバター */
.szc-chip {
	position: absolute;
	transform: translate(-50%, -50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25em;
	transition: left 0.8s ease, top 0.8s ease;
	pointer-events: auto;
	z-index: 3;
}

.szc-chip-wrap {
	position: relative;
	width: clamp(30px, 2.7cqw, 48px);
	height: clamp(30px, 2.7cqw, 48px);
}

.szc-chip-img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #fff;
	box-shadow: 0 3px 10px rgba(26, 29, 35, 0.25);
	background: #fff;
	display: block;
}

.szc-chip--me .szc-chip-img {
	border-color: var(--szc-brand);
}

.szc-dot {
	position: absolute;
	right: -2px;
	bottom: -2px;
	width: 34%;
	height: 34%;
	border-radius: 50%;
	border: 2px solid #fff;
	background: #22c55e;
}

.szc-dot--online { background: #f59e0b; }
.szc-dot--classroom { background: #3b82f6; }
.szc-dot--studying { background: #22c55e; }
.szc-dot--workshop { background: #8b5cf6; }
.szc-dot--host { background: #ef4444; }

.szc-chip-name {
	max-width: 7em;
	padding: 0.15em 0.6em;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.95);
	color: var(--szc-ink);
	font-size: clamp(9px, 0.75cqw, 12px);
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	box-shadow: 0 1px 4px rgba(26, 29, 35, 0.15);
}

/* 吹き出し */
.szc-bubble {
	position: absolute;
	transform: translate(-50%, calc(-100% - 2.2cqw));
	width: max-content;
	max-width: clamp(160px, 15cqw, 240px);
	padding: 0.7em 0.9em;
	border-radius: 14px;
	background: #fff;
	color: var(--szc-ink);
	font-size: clamp(10px, 0.85cqw, 13px);
	line-height: 1.5;
	box-shadow: 0 8px 24px rgba(26, 29, 35, 0.18);
	opacity: 0;
	animation: szc-pop 0.35s ease forwards;
	z-index: 4;
}

/* 看板から出る吹き出し（スタッフ不在時のお知らせ） */
.szc-bubble--board {
	background: var(--szc-ink);
	color: #fff;
}

.szc-bubble--board::after {
	background: var(--szc-ink);
}

.szc-bubble--board .szc-bubble-meta {
	color: rgba(255, 255, 255, 0.7);
}

.szc-bubble::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -6px;
	width: 12px;
	height: 12px;
	background: #fff;
	transform: translateX(-50%) rotate(45deg);
	border-radius: 2px;
}

.szc-bubble--out {
	animation: szc-fade 0.3s ease forwards;
}

.szc-bubble-meta {
	display: block;
	margin-top: 0.3em;
	font-size: 0.85em;
	color: var(--szc-mute);
}

@keyframes szc-pop {
	from { opacity: 0; transform: translate(-50%, calc(-100% - 1.6cqw)) scale(0.96); }
	to   { opacity: 1; transform: translate(-50%, calc(-100% - 2.2cqw)) scale(1); }
}

@keyframes szc-fade {
	to { opacity: 0; }
}

/* 下部の作業会バー */
.szc-bar {
	position: absolute;
	left: 3%;
	right: 3%;
	bottom: 3.5%;
	display: flex;
	justify-content: center;
	z-index: 5;
}

.szc-ws {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.6em 1em;
	padding: 0.7em 1.4em;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 6px 20px rgba(26, 29, 35, 0.15);
	font-size: clamp(12px, 1.05cqw, 16px);
	font-weight: 600;
	backdrop-filter: blur(6px);
}

.szc-ws-badge {
	padding: 0.2em 0.7em;
	border-radius: 999px;
	background: #ef4444;
	color: #fff;
	font-size: 0.8em;
	animation: szc-blink 1.6s ease-in-out infinite;
}

@keyframes szc-blink {
	50% { opacity: 0.55; }
}

.szc-ws-note {
	font-weight: 400;
	color: var(--szc-mute);
	font-size: 0.9em;
}

.szc-ws-note:empty { display: none; }

/* ボタン */
.szc-btn {
	display: inline-block;
	padding: 0.5em 1.2em;
	border-radius: 999px;
	border: 1px solid var(--szc-brand);
	background: var(--szc-brand);
	color: #fff !important;
	font-size: 0.9em;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none !important;
	cursor: pointer;
	transition: opacity 0.2s;
}

.szc-btn:hover { opacity: 0.85; }

.szc-btn--ghost {
	background: #fff;
	color: var(--szc-brand-dark) !important;
}

/* 在席リスト */
.szc-list {
	margin-top: 1.2em;
}

.szc-list-title {
	margin: 0 0 0.6em;
	font-size: 0.95em;
	font-weight: 600;
}

.szc-list-items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

.szc-list-items li {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.35em 0.9em 0.35em 0.4em;
	border: 1px solid var(--szc-line);
	border-radius: 999px;
	background: #fff;
	font-size: 0.85em;
}

.szc-list-items img {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
}

.szc-list-items .szc-list-label {
	color: var(--szc-mute);
}

.szc-list-empty {
	color: var(--szc-mute);
	font-size: 0.9em;
}

/* ゲート・エラー */
.szc-gate {
	max-width: 420px;
	margin: 2em auto;
	padding: 2em;
	border-radius: 18px;
	background: #fff;
	border: 1px solid var(--szc-line);
	text-align: center;
}

.szc-gate-title {
	font-weight: 700;
	font-size: 1.2em;
	margin-bottom: 0.5em;
}

.szc-error {
	margin-top: 1em;
	color: #b91c1c;
	font-size: 0.9em;
}

/* アイコン変更フォーム */
.szc-avatar-form {
	max-width: 420px;
}

.szc-avatar-current img {
	border-radius: 50%;
	width: 120px;
	height: 120px;
	object-fit: cover;
	border: 3px solid #fff;
	box-shadow: 0 4px 14px rgba(26, 29, 35, 0.15);
}

.szc-avatar-msg {
	padding: 0.6em 1em;
	border-radius: 10px;
	background: #ecfdf5;
	color: #065f46;
}

.szc-avatar-msg--error {
	background: #fef2f2;
	color: #991b1b;
}

/* 全幅表示（[sanzero_classroom full="1"]）：記事幅の枠から抜け出して画面幅いっぱいに */
.szc--full {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	background: #e4e6e9;
}

.szc--full .szc-scroll,
.szc--full .szc-room {
	border-radius: 0;
}

.szc--full .szc-stage {
	margin-top: 0;
}

.szc--full .szc-room {
	max-width: 1800px;
	margin: 0 auto;
	box-shadow: none;
}

/* 部屋の下は白い帯にして、中身は記事幅に収める */
.szc--full .szc-inner {
	padding: 1.5em 16px 0;
	background: #fff;
}

.szc--full .szc-list,
.szc--full .szc-error {
	max-width: var(--article_size, 900px);
	margin-left: auto;
	margin-right: auto;
}

.szc--full .szc-list {
	margin-top: 0;
}

/* SWELL は body のクラスを #body_wrap に付けるので body を付けずに指定する。
   テーマ側の指定より後に読まれるとは限らないので !important で勝たせる */
.szc-page .l-content,
.szc-page .l-content.l-container,
#body_wrap.szc-page .l-content {
	padding-top: 0 !important;
}

.szc-page .szc--full {
	margin-bottom: 0;
}

/* スマホ用の要約ピル（横スクロールしても見える位置に固定） */
.szc-stage {
	position: relative;
}

.szc-summary {
	display: none;
	position: absolute;
	top: 10px;
	left: 12px;
	z-index: 6;
	align-items: center;
	gap: 0.4em;
	padding: 0.4em 0.9em;
	border-radius: 999px;
	background: rgba(26, 29, 35, 0.88);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	box-shadow: 0 4px 12px rgba(26, 29, 35, 0.2);
	pointer-events: none;
}

.szc-summary::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
	animation: szc-pulse 1.8s ease-out infinite;
}

@keyframes szc-pulse {
	to { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

/* アバター下の状態タグ（学習中など） */
.szc-chip-tag {
	padding: 0.1em 0.55em;
	border-radius: 999px;
	background: #22c55e;
	color: #fff;
	font-size: clamp(8px, 0.65cqw, 10px);
	font-weight: 700;
	line-height: 1.5;
	white-space: nowrap;
}

.szc-chip-tag:empty { display: none; }
.szc-chip-tag--workshop { background: #8b5cf6; }
.szc-chip-tag--host { background: #ef4444; }

@media (max-width: 767px) {
	.szc-summary { display: inline-flex; }
}

.szc:not(.szc--full) {
	margin-top: 2em;
}

.szc-bar--static {
	position: static;
	margin: 0.8em auto 0;
	max-width: var(--article_size, 900px);
	padding: 0 16px;
}

.szc-bar--static .szc-ws {
	width: 100%;
	justify-content: center;
	border-radius: 16px;
	font-size: 13px;
}

@media (max-width: 767px) {
	.szc-ws { font-size: 12px; }
}
