/*
 * 체험 길잡이 화면 둘(CM-6 과제 3). templates/trial_guide/{start,step}.html 이 공개 셸의 page.css 뒤에 싣는다.
 * 부품은 page.css·components.css 의 것(.mc-pg-head·.mc-pg-block·.mc-btn*·.mc-note·.mc-field)을 먼저 쓰고, 여기에는 배치만 둔다.
 * 색·글꼴·글 크기는 var(--mc-…) 만(hex·그림자·그라데이션 0). display 를 주는 규칙은 :where(:not([hidden],[popover])) 로 숨긴 요소를 뺀다.
 * 상태(됨·막힘)는 색만이 아니라 글로도 보인다(.tg-state 의 글, 점의 aria-label).
 *
 * | 이름 | 뜻 |
 * |---|---|
 * | .tg-accounts·.tg-account·.tg-kv | 체험 계정 줄과 "이름 값 복사" 한 줄 |
 * | .tg-list·.tg-item·.tg-state | 시작 화면의 단계 목록, data-state=none|done|stuck |
 * | .tg-dots·.tg-dot-group·.tg-dot | 단계 점 띠(역할별 묶음, 줄이 꺾이지 않고 좁으면 띠 안에서만 가로로 밀림) |
 * | .tg-split·.tg-guide·.tg-stage·.tg-stage-bar·.tg-frame | 단계 화면(2026-11-25 소유자): 왼쪽 길잡이(따로 스크롤), 오른쪽 실제 화면 iframe. 960 아래는 위아래로 |
 * | .tg-shot-box·.tg-shot | 길잡이 안의 기대 화면 사진 |
 * | .tg-mark·.tg-actions·.tg-status | 됐어요·막혔어요 폼(길잡이 칸 아래에 붙음) |
 * | .tg-frame-box·.tg-loading·.tg-spin | 오른쪽 iframe 을 여는 동안의 돌아가는 표시(2026-11-26 소유자). 누르기를 막지 않음, data-loading 이면 iframe 을 흐리게 |
 */
.mc .tg-accounts:where(:not([hidden],[popover])){display:flex;flex-direction:column;gap:8px;margin:0;padding:0;list-style:none;min-width:0}
.mc .tg-account:where(:not([hidden],[popover])){display:flex;flex-wrap:wrap;align-items:center;gap:4px 16px;min-width:0}
.mc .tg-account-role{min-width:11em;font-weight:600;color:var(--mc-ink)}
.mc .tg-kv:where(:not([hidden],[popover])){display:inline-flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0;margin:0}
.mc .tg-intro p,.mc .tg-why{max-width:var(--mc-read-max);color:var(--mc-ink-2)}
.mc .tg-how,.mc .tg-do{list-style:decimal outside}
.mc .tg-how{margin:0;padding-left:1.4em;color:var(--mc-ink-2)}
.mc .tg-how li + li{margin-top:6px}

/* 단계 목록 */
.mc .tg-list{margin:0;padding:0;list-style:none}
.mc .tg-item:where(:not([hidden],[popover])){display:flex;align-items:center;gap:12px;min-width:0;border-top:1px solid var(--mc-line)}
.mc .tg-item:first-child{border-top:0}
.mc .tg-item-link:where(:not([hidden],[popover])){display:flex;flex:1 1 auto;align-items:baseline;gap:12px;min-width:0;min-height:var(--mc-hit);padding:10px 0;color:var(--mc-ink);text-decoration:none}
.mc .tg-item-link:hover .tg-item-title{text-decoration:underline}
.mc .tg-item-no{flex:0 0 2em;font-variant-numeric:tabular-nums;color:var(--mc-muted)}
.mc .tg-item-text:where(:not([hidden],[popover])){display:flex;flex-direction:column;gap:2px;min-width:0}
.mc .tg-item-title{font-weight:600}
.mc .tg-item-why{font-size:var(--mc-fs-md);color:var(--mc-ink-2)}
.mc .tg-state{flex:0 0 auto;min-width:3em;padding:2px 10px;border-radius:999px;font-size:var(--mc-fs-sm);font-weight:600;text-align:center;white-space:nowrap;background:var(--mc-canvas);color:var(--mc-muted)}
.mc [data-state="done"] > .tg-state{background:var(--mc-pass-soft);color:var(--mc-pass)}
.mc [data-state="stuck"] > .tg-state{background:var(--mc-stamp-soft);color:var(--mc-stamp)}
.mc .tg-start{display:flex;justify-content:flex-start}

/* 단계 점 띠 */
.mc .tg-dots:where(:not([hidden],[popover])){display:flex;align-items:center;gap:16px;min-width:0;overflow-x:auto;padding-bottom:4px}
.mc .tg-dot-group:where(:not([hidden],[popover])){display:flex;flex:0 0 auto;gap:4px;margin:0;padding:0;list-style:none}
.mc .tg-dot:where(:not([hidden],[popover])){display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border:1px solid var(--mc-line-strong);border-radius:999px;background:var(--mc-surface);color:var(--mc-ink-2);font-size:var(--mc-fs-xs);font-weight:600;line-height:1;text-decoration:none;white-space:nowrap}
.mc .tg-dot:hover{border-color:var(--mc-field-line);color:var(--mc-ink)}
.mc .tg-dot[data-state="done"]{border-color:var(--mc-pass);background:var(--mc-pass-soft);color:var(--mc-pass)}
.mc .tg-dot[data-state="stuck"]{border-color:var(--mc-stamp);background:var(--mc-stamp-soft);color:var(--mc-stamp)}
.mc .tg-dot[aria-current="step"]{border-width:2px;border-color:var(--mc-accent);color:var(--mc-ink)}

/* 단계 화면: 왼쪽 길잡이 + 오른쪽 실제 화면(iframe). 공개 본문의 1120 폭·여백을 이 화면에서만 푼다.
   높이는 위 막대를 뺀 창 높이(--tg-top 은 trial-guide.js 가 위 막대 높이로 채움, 없으면 57px). */
.mc.mc-pub:has(> .tg-split){max-width:none;margin:0;padding:0;gap:0}
.mc .tg-split:where(:not([hidden],[popover])){display:grid;grid-template-columns:minmax(340px, 420px) minmax(0, 1fr);height:calc(100vh - var(--tg-top, 57px));min-height:480px;min-width:0}
.mc .tg-guide:where(:not([hidden],[popover])){display:flex;flex-direction:column;gap:14px;min-width:0;min-height:0;overflow-x:hidden;overflow-y:auto;padding:18px 20px 0;border-right:1px solid var(--mc-line);background:var(--mc-surface)}
.mc .tg-guide-top:where(:not([hidden],[popover])){display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.mc .tg-guide-meta{margin:0;font-size:var(--mc-fs-sm);font-variant-numeric:tabular-nums;color:var(--mc-muted)}
.mc .tg-guide-title{margin:4px 0 0;font-size:var(--mc-fs-xl);line-height:1.3;color:var(--mc-ink)}
.mc .tg-guide .tg-dots:where(:not([hidden],[popover])){flex-wrap:wrap;gap:6px 12px;overflow:visible;padding-bottom:0}
.mc .tg-guide .tg-dot-group:where(:not([hidden],[popover])){flex:0 1 auto;flex-wrap:wrap;min-width:0}
.mc .tg-guide .tg-why{margin:0}
.mc .tg-h{margin:4px 0 0;font-size:var(--mc-fs-md);font-weight:600;color:var(--mc-ink)}
.mc .tg-do{margin:0;padding-left:1.4em}
.mc .tg-do li + li{margin-top:6px}
.mc .tg-ok{margin:0}
.mc .tg-shot-box{margin:0}
.mc .tg-shot-box figcaption{margin-top:6px;font-size:var(--mc-fs-sm)}
.mc .tg-shot{display:block;width:100%;height:auto;border:1px solid var(--mc-line);border-radius:var(--mc-r-lg)}
.mc .tg-mark{margin:0}
.mc .tg-foot{position:sticky;bottom:0;margin-top:auto;padding:10px 0 14px;border-top:1px solid var(--mc-line);background:var(--mc-surface)}
.mc .tg-foot > * + *{margin-top:6px}
.mc .tg-actions:where(:not([hidden],[popover])){display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.mc .tg-status{min-height:1.5em;margin:0;color:var(--mc-ink-2)}
.mc .tg-stage:where(:not([hidden],[popover])){display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--mc-canvas)}
.mc .tg-stage-bar:where(:not([hidden],[popover])){display:flex;align-items:center;gap:8px 10px;min-width:0;padding:8px 12px;border-bottom:1px solid var(--mc-line);background:var(--mc-surface)}
.mc .tg-stage-label{flex:0 0 auto;font-size:var(--mc-fs-sm);font-weight:600;color:var(--mc-ink-2)}
.mc .tg-url{min-width:0;overflow-wrap:anywhere}
.mc .tg-stage-bar .tg-url{flex:1 1 auto;overflow:hidden;font-size:var(--mc-fs-sm);white-space:nowrap;text-overflow:ellipsis;color:var(--mc-muted)}
.mc .tg-frame-box:where(:not([hidden],[popover])){position:relative;display:flex;flex:1 1 auto;flex-direction:column;min-width:0;min-height:0}
.mc .tg-frame:where(:not([hidden],[popover])){display:block;flex:1 1 auto;width:100%;min-height:0;border:0;background:var(--mc-surface)}
.mc .tg-frame-box[data-loading] > .tg-frame{opacity:.45;transition:opacity .2s}
.mc .tg-loading:where(:not([hidden],[popover])){position:absolute;top:24px;left:50%;z-index:2;display:flex;flex-direction:column;align-items:center;gap:6px;width:min(360px, calc(100% - 32px));padding:16px 18px;border:1px solid var(--mc-line-strong);border-radius:var(--mc-r-lg);background:var(--mc-surface);color:var(--mc-ink);text-align:center;transform:translateX(-50%);pointer-events:none}
.mc .tg-spin:where(:not([hidden],[popover])){display:block;width:28px;height:28px;border:3px solid var(--mc-line);border-top-color:var(--mc-accent);border-radius:999px;animation:tg-spin .8s linear infinite}
@keyframes tg-spin{to{transform:rotate(360deg)}}
.mc .tg-loading-text{margin:0;font-weight:600}
.mc .tg-loading-sec{font-variant-numeric:tabular-nums;font-weight:400;color:var(--mc-muted)}
.mc .tg-loading-hint{margin:0;font-size:var(--mc-fs-sm);color:var(--mc-ink-2)}
.mc .tg-stage-empty{padding:24px}
@media (max-width:959.98px){
  .mc .tg-split:where(:not([hidden],[popover])){grid-template-columns:minmax(0, 1fr);height:auto}
  .mc .tg-guide:where(:not([hidden],[popover])){overflow:visible;padding:16px 16px 0;border-right:0;border-bottom:1px solid var(--mc-line)}
  .mc .tg-foot{position:static}
  .mc .tg-stage-bar:where(:not([hidden],[popover])){flex-wrap:wrap}
  .mc .tg-frame-box:where(:not([hidden],[popover])){flex:none}
.mc .tg-frame:where(:not([hidden],[popover])){flex:none;height:80vh}
}
@media (max-width:759.98px){
  .mc .tg-item:where(:not([hidden],[popover])){align-items:flex-start}
  .mc .tg-item-link:where(:not([hidden],[popover])){flex:1 1 0}
  .mc .tg-account-role{min-width:0;flex-basis:100%}
  .mc .tg-dot:where(:not([hidden],[popover])){width:28px;height:28px}
  .mc .tg-actions .mc-btn,.mc .tg-actions .mc-btn-2{flex:1 1 auto}
}
