/* STT 화면 — 오른쪽 하늘색 패널 위의 흰 카드(로그인 폼과 같은 톤) */
#stt-app, .stt-guest { --stt-blue: #1597e5; --stt-text: #222; --stt-sub: #6b7280; --stt-line: #e5e7eb; }
#stt-app { display: flex; flex-direction: column; gap: 24px; width: 100%; }
/* display를 지정한 요소(flex·grid)도 hidden 속성이면 반드시 숨김 */
#stt-app [hidden], .stt-stage[hidden] { display: none !important; }

.stt-card {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(20, 40, 70, .08);
	padding: 28px;
	color: var(--stt-text);
}
.stt-card h2 { font-size: 20px; margin: 0 0 16px; }

.stt-drop {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
	min-height: 120px; padding: 20px; text-align: center; cursor: pointer;
	border: 2px dashed #b9d6ee; border-radius: 12px; background: #f6fbff;
	transition: border-color .2s, background .2s;
}
.stt-drop:hover, .stt-drop.is-over { border-color: var(--stt-blue); background: #eaf5fe; }
.stt-drop.has-file { border-style: solid; border-color: var(--stt-blue); }
.stt-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.stt-drop-text { color: var(--stt-sub); }
.stt-drop-name { font-weight: 600; word-break: break-all; }

.stt-hint { font-size: 13px; color: var(--stt-sub); margin: 8px 0 0; }
/* 화자 수 · 제목: 이름표 높이와 입력 칸 높이·모양을 맞춰 한 줄로 가지런히 */
.stt-row { display: grid; grid-template-columns: 180px 1fr; gap: 8px 14px; margin-top: 20px; align-items: end; }
.stt-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.stt-label { display: flex; align-items: center; gap: 6px; height: 20px; font-size: 14px; font-weight: 700; color: var(--stt-text); }
.stt-label small {
	font-size: 11px; font-weight: 700; color: var(--stt-sub);
	background: #eef2f6; border-radius: 99px; padding: 2px 8px; line-height: 1.4;
}
.stt-field select, .stt-field input {
	box-sizing: border-box; width: 100%; height: 48px; margin: 0; padding: 0 14px;
	font: inherit; font-size: 15px; font-weight: 400; color: var(--stt-text);
	border: 1px solid #dde3ea; border-radius: 12px; background-color: #fafbfc;
	transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.stt-field select {
	-webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b7280' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 14px center;
}
.stt-field select:hover, .stt-field input:hover { border-color: #b9d6ee; }
.stt-field select:focus, .stt-field input:focus { outline: none; border-color: var(--stt-blue); background-color: #fff; box-shadow: 0 0 0 3px rgba(21, 151, 229, .15); }
.stt-field input::placeholder { color: #a0a8b3; }
.stt-row-hint { grid-column: 1 / -1; margin-top: 0; }
@media (max-width: 560px) { .stt-row { grid-template-columns: 1fr; } }

.stt-btn {
	display: inline-flex; align-items: center; justify-content: center;
	height: 48px; padding: 0 22px; border: 0; border-radius: 10px;
	background: var(--stt-blue); color: #fff !important; font: inherit; font-weight: 700;
	text-decoration: none; cursor: pointer; box-shadow: 0 6px 14px rgba(21, 151, 229, .25);
}
.stt-btn:hover { filter: brightness(1.06); }
.stt-btn:disabled { opacity: .6; cursor: wait; }
.stt-submit { width: 100%; margin-top: 18px; }
.stt-btn-sm { height: 36px; padding: 0 14px; font-size: 14px; box-shadow: none; }
.stt-btn-ghost { background: #fff; color: var(--stt-blue) !important; border: 1px solid var(--stt-blue); box-shadow: none; }
.stt-link { background: none; border: 0; color: var(--stt-sub); text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; padding: 0 4px; }
.stt-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.stt-guest .stt-actions { margin-top: 16px; }

.stt-progress { margin-top: 16px; }
.stt-bar { height: 8px; background: #e6eef5; border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.stt-bar span { display: block; height: 100%; width: 0; background: var(--stt-blue); border-radius: 99px; transition: width .4s; }
.stt-progress-text { font-size: 13px; color: var(--stt-sub); }
.stt-error, .stt-job-error { color: #c62828; font-size: 14px; margin: 12px 0 0; }

.stt-jobs { list-style: none; margin: 0; padding: 0; }
.stt-job { padding: 16px 0; border-top: 1px solid var(--stt-line); }
.stt-job:first-child { border-top: 0; padding-top: 0; }
.stt-job-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.stt-job-head strong { word-break: break-all; }
.stt-job-head small { color: var(--stt-sub); white-space: nowrap; }
.stt-job-meta { font-size: 13px; color: var(--stt-sub); margin: 4px 0 8px; word-break: break-all; }
.stt-empty { color: var(--stt-sub); }

.stt-badge { display: inline-block; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 99px; }
.stt-badge.is-wait { background: #fff4e0; color: #9a6700; }
.stt-badge.is-run { background: #e3f2fd; color: #0b69a3; }
.stt-badge.is-done { background: #e6f4ea; color: #1a7f37; }
.stt-badge.is-err { background: #fdecea; color: #c62828; }

/* ---------- 실시간 보기 ---------- */
.stt-live-panel { display: none; }
#stt-app.is-live .stt-new, #stt-app.is-live .stt-list { display: none; }
#stt-app.is-live .stt-live-panel { display: block; }
body.stt-live-on [class*="gb-element-"][class*="form"] > p { display: none; } /* 안내 문단은 잠시 숨김 */

.stt-live-text {
	max-height: calc(100vh - 320px); min-height: 200px; overflow-y: auto;
	padding: 4px 4px 4px 0; line-height: 1.75; font-size: 15px;
}
.stt-live-text:empty::before { content: "받아쓰기가 시작되면 여기에 내용이 나타납니다…"; color: var(--stt-sub); }
.stt-live-line { margin: 0 0 12px; transition: background 1.2s; border-radius: 6px; }
.stt-live-line.is-new { background: #fff7d6; }
.stt-live-ts { color: var(--stt-sub); font-size: 13px; }
.stt-live-sp { color: var(--stt-blue); }
.stt-live-sp.sp-B { color: #d9480f; }
.stt-live-sp.sp-C { color: #2b8a3e; }
.stt-live-sp.sp-D { color: #862e9c; }

/* 진행 카드: 모바일에서는 목록 자리 위에, PC에서는 사진 가운데 틈으로 떠서 이동 */
.stt-stage {
	background: rgba(255, 255, 255, .96); color: #222; border-radius: 18px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .35); padding: 24px 26px; text-align: center;
}
#stt-app > .stt-stage { box-shadow: 0 10px 30px rgba(20, 40, 70, .08); }
.stt-stage.is-floating {
	position: fixed; z-index: 90;
	transition: left .9s cubic-bezier(.7, 0, .2, 1), top .9s cubic-bezier(.7, 0, .2, 1), width .9s cubic-bezier(.7, 0, .2, 1), opacity .4s;
}
.stt-stage-title { font-weight: 700; font-size: 17px; word-break: break-all; }
.stt-stage-pct { font-size: 44px; font-weight: 800; color: var(--stt-blue, #1597e5); line-height: 1.2; margin-top: 6px; }
.stt-stage .stt-bar { margin: 10px 0 8px; }
.stt-stage .stt-bar span { background: #1597e5; }
.stt-stage-msg { font-size: 14px; color: #555; min-height: 1.4em; }
.stt-stage-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.stt-stage-actions:empty { display: none; }
.stt-stage { --stt-blue: #1597e5; --stt-sub: #6b7280; --stt-line: #e5e7eb; }

/* 왼쪽 사진이 위아래로 갈라지는 문 */
.stt-has-doors { background: radial-gradient(ellipse at center, #1b2a3a 0%, #070c12 70%) !important; overflow: hidden; }
.stt-door {
	position: absolute; inset: 0; pointer-events: none;
	transition: transform .9s cubic-bezier(.7, 0, .2, 1);
}
.stt-door-top { clip-path: inset(0 0 50% 0); }
.stt-door-bottom { clip-path: inset(50% 0 0 0); }
.stt-doors-open .stt-door-top { transform: translateY(-30%); }
.stt-doors-open .stt-door-bottom { transform: translateY(30%); }

@media (prefers-reduced-motion: reduce) {
	.stt-door, .stt-stage.is-floating, .stt-live-line { transition: none; }
}

/* 고른 파일 정보(종류·크기·재생 시간) */
.stt-file-info { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.stt-file-info > div { flex: 1 1 120px; background: #f6fbff; border: 1px solid #d9eaf7; border-radius: 10px; padding: 8px 12px; }
.stt-file-info dt { font-size: 12px; color: var(--stt-sub); margin: 0; }
.stt-file-info dd { font-weight: 700; margin: 2px 0 0; }
.stt-error.is-info { color: #0b69a3; }
.stt-stage-info { font-size: 13px; color: #6b7280; margin-top: 4px; word-break: break-all; }

/* 녹취록 받기 */
.stt-btn-kakao { background: #fee500; color: #191919 !important; box-shadow: none; }
.stt-more-fmt { flex-basis: 100%; font-size: 13px; color: var(--stt-sub); }
.stt-more-fmt a { color: var(--stt-blue, #1597e5); }
.stt-stage .stt-more-fmt { text-align: center; }
.stt-toast { flex-basis: 100%; font-size: 13px; color: #1a7f37; background: #e6f4ea; border-radius: 8px; padding: 6px 10px; }
.stt-toast.is-err { color: #c62828; background: #fdecea; }
.stt-hwp-hint { margin-top: 14px; }

/* 목록: 보관 상태, 도구(다시 만들기·삭제 메뉴), 다시 만들기 입력 */
.stt-keep { display: inline-block; margin-left: 8px; font-size: 12px; color: var(--stt-sub); }
.stt-tools { display: flex; align-items: center; gap: 14px; margin-top: 10px; font-size: 14px; }
.stt-del-menu { position: relative; }
.stt-del-menu summary { cursor: pointer; color: var(--stt-sub); text-decoration: underline; list-style: none; }
.stt-del-menu summary::-webkit-details-marker { display: none; }
.stt-del-menu > div {
	position: absolute; left: 0; top: 24px; z-index: 5; display: flex; flex-direction: column; min-width: 150px;
	background: #fff; border: 1px solid var(--stt-line); border-radius: 10px; box-shadow: 0 10px 24px rgba(0, 0, 0, .12); overflow: hidden;
}
.stt-del-menu > div button { background: none; border: 0; text-align: left; padding: 10px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.stt-del-menu > div button:hover { background: #fdecea; color: #c62828; }
.stt-regen-form { margin-top: 12px; padding: 14px; background: #f6fbff; border: 1px solid #d9eaf7; border-radius: 12px; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.stt-regen-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.stt-regen-form select, .stt-regen-form input { height: 40px; padding: 0 10px; font: inherit; font-weight: 400; border: 1px solid var(--stt-line); border-radius: 8px; background: #fff; }
.stt-regen-form .stt-actions, .stt-regen-form .stt-hint { grid-column: 1 / -1; margin-top: 0; }
@media (max-width: 560px) { .stt-regen-form { grid-template-columns: 1fr; } }

/* 지원 형식 안내 */
.stt-formats { margin-top: 8px; font-size: 13px; color: var(--stt-sub); }
.stt-formats summary { cursor: pointer; text-decoration: underline; }
.stt-formats p { margin: 6px 0 0; word-break: keep-all; }
.stt-formats strong { color: var(--stt-text); margin-right: 4px; }

/* 등급 안내·정회원 전용 표시 */
.stt-grade { background: #fff8e1; border: 1px solid #f3d27a; color: #6b4e00; border-radius: 14px; padding: 14px 18px; font-size: 14px; line-height: 1.6; }
.stt-grade strong { color: #3d2c00; }
.stt-locked { font-size: 13px; color: #8a6d1f; background: #fff8e1; border-radius: 8px; padding: 6px 10px; }
