/* Teacher skip panel — matches judge mock (navy + cyan), docks on #game-root. */

:root {
  /* Bottom-right dock (1920×1080) — bottom aligns with #dialogue-panel */
  --teacher-skip-panel-left: 1648px;
  --teacher-skip-panel-width: 262px;
  /* Above shared round-clear overlay (9200) and stage final-clear layers so
     심사위원 「이전/다음」 stay clickable during ROUND CLEAR / game-clear modals.
     Keep below 로복 질문 panel (11000). */
  --teacher-skip-z-index: 10050;
  /* Same bottom as 로복 대사창 (ui.css --dialogue-hud-bottom) */
  --teacher-skip-panel-bottom: var(--dialogue-hud-bottom, calc(var(--eq-inventory-height, 44px) + 28px));

  /* Calm dark-navy palette (no neon) */
  --teacher-skip-panel-bg: rgba(8, 24, 40, 0.92);   /* #081828 계열 */
  --teacher-skip-badge-bg: #0d2338;                 /* 패널보다 약간 밝게 */
  --teacher-skip-btn-bg: #0a2a4d;                   /* 버튼: 한 단계 밝은 남색 */
  --teacher-skip-btn-bg-hover: #0d345f;             /* hover: 아주 조금만 밝게 */
  --teacher-skip-border: #1f5271;                   /* 탁한 청록 테두리 */
  --teacher-skip-border-soft: #163b53;              /* 라벨/버튼 얇은 테두리 */
  --teacher-skip-accent: #54b5d5;                   /* 낮은 채도 하늘색 (라벨/아이콘) */
  --teacher-skip-text: #f3f7fa;                     /* 버튼 글자 */
  --teacher-skip-disabled-opacity: 0.5;
}

/* ---- Panel shell ---- */
.teacher-skip-panel {
  position: absolute;
  left: var(--teacher-skip-panel-left);
  top: auto;
  bottom: var(--teacher-skip-panel-bottom);
  z-index: var(--teacher-skip-z-index);
  box-sizing: border-box;
  width: var(--teacher-skip-panel-width);
  padding: 20px 16px 15px;
  border: 1px solid var(--teacher-skip-border);
  border-radius: 12px;
  background: var(--teacher-skip-panel-bg);
  box-shadow: 0 3px 10px rgba(0, 8, 18, 0.28);
  pointer-events: auto;
}

.teacher-skip-panel.teacher-skip-panel--panel-open {
  /* Keep same bottom as dialogue even when 로복 질문 drawer is open */
  bottom: var(--teacher-skip-panel-bottom);
}

/* ---- Top badge (half over top border) ---- */
.teacher-skip-panel__badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 14px;
  border: 1px solid var(--teacher-skip-border-soft);
  border-radius: 999px;
  background: var(--teacher-skip-badge-bg);
  color: var(--teacher-skip-accent);
  white-space: nowrap;
  pointer-events: none;
}

.teacher-skip-panel__badge-icon {
  flex: 0 0 auto;
  display: block;
  width: 21px;
  height: 21px;
  color: var(--teacher-skip-accent);
}

.teacher-skip-panel__badge-text {
  font-size: 17.25px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--teacher-skip-accent);
}

/* ---- Button row ---- */
.teacher-skip-panel__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.teacher-skip-button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--teacher-skip-border);
  border-radius: 8px;
  background: var(--teacher-skip-btn-bg);
  color: var(--teacher-skip-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    transform 100ms ease,
    opacity 140ms ease;
}

.teacher-skip-button__label {
  display: inline-block;
}

.teacher-skip-button__chevron {
  flex: 0 0 auto;
  display: block;
  width: 13px;
  height: 13px;
  color: var(--teacher-skip-accent);
}

.teacher-skip-button:hover:not(:disabled),
.teacher-skip-button:focus-visible:not(:disabled) {
  background: var(--teacher-skip-btn-bg-hover);
  border-color: var(--teacher-skip-border);
  outline: none;
}

.teacher-skip-button:active:not(:disabled) {
  transform: translateY(1px);
}

.teacher-skip-button--loading {
  color: rgba(243, 247, 250, 0.68);
}

.teacher-skip-button--disabled,
.teacher-skip-button:disabled {
  opacity: var(--teacher-skip-disabled-opacity);
  cursor: default;
  box-shadow: none;
  transform: none;
}

/* Dock modifiers kept for compatibility; position is on the panel. */
.teacher-skip-button.teacher-skip-button--dock {
  position: static !important;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
}

.teacher-skip-container {
  display: contents;
}

/*
 * Teacher "다음" — pinned inside the white worksheet (580px box),
 * so it cannot be clipped by overflow:hidden on the learning panel.
 */
.stage1-white-worksheet.s12-multiply-panel,
.s12-multiply-panel.stage1-white-worksheet {
  position: relative;
}

.s12-teacher-advance-wrap {
  position: absolute;
  right: 40px;
  bottom: 28px;
  z-index: 6;
  margin: 0;
  padding: 0;
  width: auto;
  height: auto;
  min-height: 0;
  pointer-events: auto;
}

.s12-teacher-advance-wrap .s12-teacher-advance-btn {
  position: static !important;
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 96px !important;
  width: auto !important;
  max-width: none !important;
  height: 40px !important;
  padding: 0 22px !important;
  margin: 0 !important;
  text-align: center !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.teacher-skip-panel__demo-student {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 20px;
  color: rgba(231, 250, 255, 0.82);
  font-size: 12px;
  letter-spacing: -0.01em;
}

.teacher-skip-panel__demo-student:empty {
  display: none;
}

.teacher-skip-panel__demo-student button {
  border: 1px solid rgba(126, 224, 255, 0.28);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(7, 22, 36, 0.78);
  color: rgba(231, 250, 255, 0.9);
  font: inherit;
  cursor: pointer;
}

.teacher-skip-panel__demo-student button:hover,
.teacher-skip-panel__demo-student button:focus-visible {
  border-color: rgba(94, 232, 216, 0.72);
  color: #ffffff;
}
