/* ==========================================================================
   3. 태블릿 메뉴 둘러보기 — 실서비스 학생 화면 1:1 재현 (2026-09-30 dev 빌드 기준)
   원본: www/build/assets/StudentLayout-*.js, StudentDashboard-*.js
   - iPad 가로(1180×820 CSS px) 논리 캔버스를 그대로 그린 뒤 transform: scale 로 맞춤
   - 1399px 이하 → 실서비스와 같은 '아이콘 전용' 사이드바(8.5rem) + CI 타일
   - 루트 폰트: 18 × min(1180/1280, 820/800) ≈ 16.6px → 1rem = 16.6px 로 환산한 px 값 사용
   ========================================================================== */

/* 3번 가이드일 때 뷰어 프레임을 넓힌다 (기존 규칙은 ID 선택자에 밀려 적용되지 않았음) */
@media (min-width: 768px) {
  body.is-tablet-menu-mode #ViewerContainer.art-device-frame { max-width: 960px; }
}

.tm-stage { position: relative; width: 100%; background: #efe4d3; padding: 18px; box-sizing: border-box; }
@media (max-width: 599px) { .tm-stage { padding: 10px 8px; } }
.tm-fit { position: relative; width: 100%; overflow: hidden; border-radius: 20px; transition: height .6s cubic-bezier(.22,1,.36,1); }
/* 폰 카메라(잘라서 확대·좌우 이동) 부드럽게 */
.tm-device { transition: transform .6s cubic-bezier(.22,1,.36,1); }

/* 기기 베젤 */
.tm-device {
  position: absolute; left: 0; top: 0;
  width: 1216px; height: 856px; padding: 18px; box-sizing: border-box;
  border-radius: 46px; background: #1c1917;
  box-shadow: 0 0 0 2px #44403c inset, 0 24px 50px -12px rgba(68, 40, 10, .35);
  transform-origin: 0 0;
}

/* 학생 셸 (data-student-shell="desktop") */
.tm-screen {
  position: relative; width: 1180px; height: 820px; overflow: hidden; border-radius: 28px;
  padding: 21px; box-sizing: border-box;
  background: #ecd5b3 url('images/bg.jpg') center / cover no-repeat;
  color: #451a03;
  font-family: 'Fredoka', 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  user-select: none; -webkit-user-select: none;
}
.tm-screen button { font-family: inherit; border: 0; cursor: pointer; padding: 0; background: none; color: inherit; }
.tm-screen img { display: block; -webkit-user-drag: none; }
.tm-screen svg { display: block; }

/* 좌상단 음악 버튼 / 우상단 나가기 버튼 (fixed left-1 / right-1) */
.tm-float-btn {
  position: absolute; top: 4px; z-index: 45;
  width: 50px; height: 50px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .95) !important; color: #92400e !important;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1), 0 0 0 1px rgba(69, 26, 3, .1);
}
.tm-music { left: 4px; }
.tm-exit { right: 4px; opacity: 0; pointer-events: none; transition: opacity .25s; }
.tm-screen.is-fullscreen .tm-exit { opacity: 1; pointer-events: auto; }

/* 크림 패널 */
.tm-panel {
  position: relative; z-index: 20; width: 100%; height: 100%;
  display: flex; flex-direction: column;
  border-radius: 36px; background: rgba(246, 234, 210, .85);
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: 0 25px 50px -12px rgba(120, 53, 15, .1);
}

/* 헤더 */
.tm-header { flex-shrink: 0; display: flex; align-items: stretch; padding: 25px 0 12px; }
.tm-screen.is-fullscreen .tm-header { display: none; }
.tm-logo-slot { width: 141px; flex-shrink: 0; display: flex; align-items: center; justify-content: flex-start; padding: 0 25px; box-sizing: border-box; }
.tm-ci {
  position: relative; display: block; height: 58px; width: 95px; flex-shrink: 0; overflow: hidden;
  border-radius: 16px; border: 2px solid rgba(255,255,255,.7);
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.tm-ci img { position: absolute; bottom: 0; left: 50%; height: 130%; width: auto; max-width: none; transform: translate(-50%, 16%); }
.tm-head-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 17px; padding: 0 33px 0 12px; }
.tm-greet { flex: 1; min-width: 0; }
.tm-greet > div { animation: tmFade .28s ease both; }
.tm-greet-row { display: flex; align-items: center; gap: 12px; }
.tm-greet-chip {
  width: 50px; height: 50px; flex-shrink: 0; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ffedd5, #fde68a); color: #b45309;
  border: 1px solid rgba(255,255,255,.4); box-shadow: 0 4px 6px -1px rgba(249,115,22,.15);
}
.tm-greet-hi { margin: 0; font-size: 25px; font-weight: 700; color: #92400e; white-space: nowrap; }
.tm-greet-hi b { font-weight: 900; color: #f97316; }
.tm-greet-title { margin: 0; font-size: 25px; font-weight: 900; color: #92400e; line-height: 1.2; }
.tm-greet-sub { margin: 0; font-size: 14.5px; font-weight: 700; color: rgba(217, 119, 6, .8); }
.tm-head-right { flex-shrink: 0; display: flex; align-items: center; gap: 12px; transform: translateX(-17px); }
.tm-parents {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 25px 12px 21px; border-radius: 999px;
  background: linear-gradient(180deg, #fb923c, #f59e0b) !important; color: #fff !important;
  border: 1px solid rgba(255,255,255,.4) !important; font-size: 18.7px; font-weight: 900;
  box-shadow: 0 4px 6px -1px rgba(249,115,22,.25);
}
.tm-avatar { width: 50px; height: 50px; border-radius: 999px; overflow: hidden; background: #fff !important; box-shadow: 0 0 0 3px #fff, 0 4px 8px rgba(120,53,15,.18); }
.tm-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* 본문: 사이드바 + 메인 */
.tm-body { flex: 1; min-height: 0; display: flex; flex-direction: row; border-radius: 0 0 36px 36px; }
.tm-aside { width: 141px; flex-shrink: 0; box-sizing: border-box; display: flex; flex-direction: column; padding: 12px 25px 29px; }
.tm-screen.is-fullscreen .tm-aside { display: none; }
.tm-nav { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 17px; }
.tm-nav-item {
  position: relative; flex: 1; display: flex; align-items: center; padding: 0 12px !important;
  border-radius: 16px; font-weight: 900;
  background: rgba(255,255,255,.55) !important; border: 2px solid rgba(255,255,255,.7) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
  transition: background .2s, transform .15s, box-shadow .2s;
}
.tm-nav-item.is-active {
  background: linear-gradient(180deg, #fb923c, #f59e0b) !important; border-color: rgba(255,255,255,.5) !important;
  box-shadow: 0 10px 15px -3px rgba(249,115,22,.3), 0 4px 6px -4px rgba(249,115,22,.3);
}
.tm-nav-item.is-pressed { transform: scale(.94); }
.tm-nav-icon { position: relative; display: flex; width: 66px; height: 66px; flex-shrink: 0; align-items: center; justify-content: center; }
.tm-nav-icon img { position: absolute; left: 50%; top: 50%; width: 83px; height: 83px; max-width: none; transform: translate(-50%, -50%); object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.22)); }

/* 가이드 표식: 현재 스텝 메뉴 둘레 펄스 링 */
.tm-nav-item.is-guide::after, .tm-exit.is-guide::after {
  content: ''; position: absolute; inset: -7px; border-radius: 22px; pointer-events: none;
  border: 3px solid #fff; box-shadow: 0 0 0 3px rgba(249,115,22,.55);
  animation: tmHalo 1.6s ease-out 3 both; /* 세 번만 — 무한 반복하면 깜빡이는 것처럼 보임 */
}
.tm-exit.is-guide::after { border-radius: 999px; }
@keyframes tmHalo { 0% { opacity: .95; transform: scale(1); } 70% { opacity: 0; transform: scale(1.14); } 100% { opacity: 0; } }

.tm-main { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; padding: 12px 33px 29px 12px; }
.tm-screen.is-fullscreen .tm-main { padding: 29px; }
.tm-view { display: none; width: 100%; height: 100%; }
.tm-view.is-shown { display: block; }

/* 페이지 전환 '쓱' 지우개 와이프 (실서비스 sl-wipe 그대로) */
.tm-wipe { position: absolute; inset: 0; z-index: 30; pointer-events: none; background: #f6ead2; clip-path: inset(0 0 0 100%); }
.tm-wipe.is-run { animation: tmWipe .5s cubic-bezier(.65,0,.35,1) both; }
@keyframes tmWipe { 0% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 0 0 100%); } }
@keyframes tmFade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 대시보드 (StudentDashboard) ---------- */
.tm-dash { height: 100%; display: flex; flex-direction: column; gap: 21px; min-height: 0; }
.tm-hero {
  position: relative; flex: 1.15; min-height: 0; width: 100%; overflow: hidden; border-radius: 28px;
  background: linear-gradient(180deg, #f7d98a, #f0c878) !important;
  box-shadow: 0 8px 0 rgba(180,120,30,.25); border: 1px solid rgba(255,255,255,.6) !important;
  text-align: left;
}
.tm-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.tm-hero-art { position: absolute; bottom: 0; right: 58px; height: 95%; width: auto; object-fit: contain; z-index: 10; animation: tmSway 4s ease-in-out infinite; animation-delay: .5s; transform-origin: bottom center; }
.tm-hero-copy { position: relative; z-index: 20; height: 100%; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 0 58px; }
.tm-hero-col { display: flex; flex-direction: column; align-items: center; }
.tm-bubble-hero {
  margin: 0; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 62px; line-height: 1; letter-spacing: -.025em; white-space: nowrap;
  color: transparent; background-image: linear-gradient(180deg, #FBB03B 0%, #F59E0B 55%, #E67A17 100%);
  -webkit-background-clip: text; background-clip: text; filter: url(#tmTodayOutline);
}
.tm-hero-sub { margin: 12px 0 0; text-align: center; font-size: 20.75px; font-weight: 900; line-height: 1.375; color: #5b4a35; }
.tm-pill {
  display: flex; align-items: center; gap: 8px; margin-top: 17px; padding: 6px 6px 6px 21px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.5); background: linear-gradient(180deg, #fb923c, #f97316); color: #fff;
  box-shadow: 0 4px 6px -1px rgba(194,65,12,.3);
}
.tm-pill > span:first-child { font-size: 18.7px; font-weight: 900; }
.tm-pill-arrow { display: flex; width: 37px; height: 37px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 999px; background: #fff; color: #ea580c; box-shadow: 0 1px 2px rgba(0,0,0,.05); }

.tm-cards { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 21px; }
.tm-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 26px;
  container-type: inline-size; border-bottom: 6px solid transparent !important;
  box-shadow: 0 10px 15px -3px rgba(120,53,15,.1), 0 4px 6px -4px rgba(120,53,15,.1);
  transition: transform .2s;
}
.tm-card:hover { transform: translateY(-6px); }
.tm-card-snapbook { background: linear-gradient(135deg, #fcd34d, #fb923c) !important; border-bottom-color: rgba(234,88,12,.4) !important; }
.tm-card-snaptube { background: linear-gradient(135deg, #f9a8d4, #fb7185) !important; border-bottom-color: rgba(244,63,94,.4) !important; }
.tm-card-snapdic { background: linear-gradient(135deg, #7dd3fc, #60a5fa) !important; border-bottom-color: rgba(59,130,246,.4) !important; }
.tm-card-snaptrace { background: linear-gradient(135deg, #5eead4, #34d399) !important; border-bottom-color: rgba(5,150,105,.4) !important; }
.tm-bubble-card {
  position: relative; z-index: 20; margin-top: 17px; padding: 0 8px; text-align: center; white-space: pre-line;
  font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: min(37px, 15cqw); line-height: 1.05;
  color: transparent; background-image: linear-gradient(180deg, #FCEBA0 0%, #F6CE5E 100%);
  -webkit-background-clip: text; background-clip: text;
}
.tm-card-art { position: relative; z-index: 0; min-height: 0; width: 100%; flex: 1; transform-origin: bottom; transform: scale(1.3) translateY(-10px); }
.tm-card-snapdic .tm-card-art { transform: scale(1.3) translateY(2px); }
.tm-card-snaptrace .tm-card-art { transform: scale(1.3) translateY(2px); }
.tm-card-art img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; animation: tmBob 2.6s ease-in-out infinite; }
.tm-card-pill-wrap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; padding: 0 12px 8px; }
.tm-card-pill {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 4px 17px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4); color: #fff; box-shadow: 0 4px 6px -1px rgba(0,0,0,.15);
}
.tm-card-pill > span:first-child { font-size: 14.5px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-card-pill > span:last-child { display: flex; width: 33px; height: 33px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 999px; background: #fff; }
.tm-card-snapbook .tm-card-pill { background: linear-gradient(180deg, #fb923c, #f97316); }
.tm-card-snaptube .tm-card-pill { background: linear-gradient(180deg, #fb7185, #ec4899); }
.tm-card-snapdic .tm-card-pill { background: linear-gradient(180deg, #38bdf8, #3b82f6); }
.tm-card-snaptrace .tm-card-pill { background: linear-gradient(180deg, #2dd4bf, #10b981); }

.tm-pop { animation: tmPop .5s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes tmPop { 0% { transform: translateY(20px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes tmBob { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-7px) rotate(-5deg); } }
@keyframes tmSway { 0% { transform: translateY(0) rotate(-2deg); } 30% { transform: translateY(-8px) rotate(1.5deg); } 60% { transform: translateY(-3px) rotate(2.5deg); } 100% { transform: translateY(0) rotate(-2deg); } }

/* ---------- Today's Class (Today/Index) ---------- */
.tm-today { height: 100%; display: flex; gap: 21px; overflow: hidden; }
.tm-session { width: 440px; flex-shrink: 0; height: 100%; box-sizing: border-box; display: flex; flex-direction: column; border-radius: 28px; border: 2px solid; padding: 21px; }
.tm-session.is-progress { background: #fff7ed; border-color: #fed7aa; }
.tm-session.is-new { background: rgba(255,255,255,.85); border-color: #fde68a; }
.tm-session-head { display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.tm-session-head h3 { margin: 0; min-width: 0; font-size: 25px; font-weight: 900; color: #7c2d12; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-state { margin-left: auto; flex-shrink: 0; border-radius: 999px; padding: 4px 12px; font-size: 14.5px; font-weight: 900; }
.is-progress .tm-state { background: #fb923c; color: #fff; }
.is-new .tm-state { background: #fef3c7; color: #b45309; }
.tm-steps { position: relative; margin-top: 12px; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; border-radius: 22px; padding: 6px 12px; }
.is-progress .tm-steps { background: #ffedd5; }
.is-new .tm-steps { background: #fffbeb; }
.tm-step { width: 175px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 8px; box-sizing: border-box; }
.tm-step-thumb { position: relative; display: block; width: 133px; height: 133px; }
.tm-step-thumb > span:first-child { position: relative; display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; overflow: hidden; border-radius: 999px; background: #fff; box-shadow: 0 0 0 6px #fde68a; }
.tm-step-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tm-step.is-done .tm-step-thumb > span:first-child { box-shadow: 0 0 0 6px #d1fae5; }
.tm-step-done { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 999px; background: rgba(16,185,129,.75); color: #fff; }
.tm-step-dot { position: absolute; right: -2px; bottom: -2px; display: flex; width: 37px; height: 37px; align-items: center; justify-content: center; border-radius: 999px; border: 3px solid #fff; color: #fff; background: #fb923c; }
.tm-step.is-done .tm-step-dot { background: #10b981; }
.tm-step-label { margin-top: 8px; text-align: center; font-size: 18.7px; font-weight: 900; line-height: 1.25; color: #78350f; }
.tm-step.is-done .tm-step-label { color: #047857; }
.tm-step-title { width: 100%; text-align: center; font-size: 12.5px; font-weight: 700; color: #d97706; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-step.is-done .tm-step-title { color: #059669; }
.tm-session-foot { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.tm-progress-row { display: flex; align-items: center; gap: 8px; }
.tm-progress-row p { margin: 0; font-size: 16.6px; font-weight: 900; color: #92400e; }
.tm-progress-row p b { font-size: 18.7px; color: #f97316; }
.tm-letter { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 900; background: #ffe4e6; color: #e11d48; }
.tm-bar { height: 14.5px; width: 100%; overflow: hidden; border-radius: 999px; background: #fde68a; box-shadow: inset 0 2px 4px rgba(120,70,20,.15); }
.tm-bar > div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #fb923c, #f59e0b); }
.tm-cta { margin-top: 4px; display: inline-flex; width: 100%; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 12px 25px; font-size: 18.7px; font-weight: 900; color: #fff !important; box-sizing: border-box; }
.is-progress .tm-cta { background: linear-gradient(180deg, #fb923c, #f97316) !important; box-shadow: 0 4px 0 rgba(194,65,12,.35); }
.is-new .tm-cta { background: linear-gradient(180deg, #fbbf24, #f59e0b) !important; box-shadow: 0 4px 0 rgba(180,83,9,.3); }

/* ---------- SnapBook / SnapTube 목록 ---------- */
.tm-shelf { height: 100%; overflow: hidden; display: flex; flex-direction: column; gap: 25px; }
.tm-shelf-sec h4 { margin: 0 0 12px; padding-left: 4px; font-size: 25px; font-weight: 900; color: #78350f; }
.tm-shelf-row { display: flex; gap: 17px; }
.tm-book { width: 180px; flex-shrink: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; background: #fff; box-shadow: 0 4px 10px rgba(120,53,15,.12); }
.tm-cover { position: relative; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; font-size: 58px; }
.tm-badge { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 900; color: #fff; box-shadow: 0 4px 6px rgba(0,0,0,.12); }
.tm-quiz { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 900; color: #fff; background: #0ea5e9; box-shadow: 0 4px 6px rgba(0,0,0,.12); }
.tm-book-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; }
.tm-book-meta h5 { margin: 0; font-size: 16.6px; font-weight: 900; line-height: 1.2; color: #451a03; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tm-rating { margin-top: 4px; display: flex; align-items: center; gap: 4px; font-size: 14.5px; font-weight: 900; color: #d97706; }
.tm-go { display: flex; width: 37px; height: 37px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 999px; border: 2px solid #fde68a; color: #fbbf24; }
.tm-video { width: 250px; }
.tm-video .tm-cover { aspect-ratio: 16 / 9; }
.tm-play { position: absolute; display: flex; width: 50px; height: 50px; align-items: center; justify-content: center; border-radius: 999px; background: rgba(255,255,255,.92); color: #f43f5e; box-shadow: 0 6px 14px rgba(0,0,0,.18); }
.tm-dur { position: absolute; right: 10px; bottom: 10px; border-radius: 8px; padding: 2px 8px; font-size: 12.5px; font-weight: 800; color: #fff; background: rgba(0,0,0,.6); }

/* ---------- SnapTrace 시작 화면 (전체 화면) ---------- */
.tm-trace { position: relative; height: 100%; }
.tm-trace-pick { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 25px; border-radius: 32px; background: #fff7ea; padding: 25px 35px; }
.tm-trace-pick p { margin: 0; text-align: center; font-size: 41px; font-weight: 900; color: #78350f; }
.tm-trace-grid { width: 100%; max-width: 900px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tm-trace-tile { display: flex; aspect-ratio: 4 / 5; flex-direction: column; align-items: center; justify-content: center; gap: 12px; border-radius: 28px; color: #fff !important; box-shadow: 0 8px 0 rgba(150,70,20,.3); }
.tm-trace-tile.t-alpha { background: linear-gradient(180deg, #fb923c, #f59e0b) !important; }
.tm-trace-tile.t-word { background: linear-gradient(180deg, #38bdf8, #3b82f6) !important; }
.tm-trace-tile.t-sentence { background: linear-gradient(180deg, #f472b6, #f43f5e) !important; }
.tm-trace-tile .ico { display: flex; width: 90px; height: 90px; align-items: center; justify-content: center; border-radius: 24px; background: rgba(255,255,255,.25); }
.tm-trace-tile .sample { font-size: 56px; font-weight: 900; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.08)); }
.tm-trace-tile .label { font-size: 26px; font-weight: 900; }

/* ---------- SnapDic 팝업 ---------- */
.tm-dic-layer { position: absolute; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 50px; }
.tm-dic-layer.is-open { display: flex; }
.tm-dic-dim { position: absolute; inset: 0; background: rgba(69, 26, 3, .45); animation: tmFade .25s ease both; }
.tm-dic {
  position: relative; z-index: 10; width: 100%; max-width: 768px; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 36px; border: 4px solid #fff; background: #fffdf5; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
  animation: tmEmerge .42s cubic-bezier(.34,1.4,.64,1) both;
}
@keyframes tmEmerge { 0% { opacity: 0; transform: translate(var(--dx, -300px), var(--dy, 0)) scale(.15); } 100% { opacity: 1; transform: translate(0,0) scale(1); } }
.tm-dic-head { display: flex; align-items: center; gap: 12px; padding: 21px; background: linear-gradient(180deg, rgba(254,243,199,.8), transparent); }
.tm-dic-ico { display: flex; width: 58px; height: 58px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 16px; background: linear-gradient(135deg, #fdba74, #fbbf24); color: #fff; box-shadow: 0 4px 6px -1px rgba(249,115,22,.25); }
.tm-dic-input { position: relative; flex: 1; min-width: 0; }
.tm-dic-input svg { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: #fbbf24; }
.tm-dic-input div { height: 58px; display: flex; align-items: center; border-radius: 999px; border: 2px solid #fde68a; background: #fff; padding-left: 46px; font-size: 20.75px; font-weight: 700; color: #fcd34d; box-sizing: border-box; }
.tm-dic-input div.is-typed { color: #78350f; font-weight: 900; border-color: #fbbf24; }
.tm-dic-search { display: flex; height: 58px; flex-shrink: 0; align-items: center; gap: 6px; border-radius: 999px; padding: 0 25px; font-size: 18.7px; font-weight: 900; color: #fff !important; background: linear-gradient(180deg, #fb923c, #f59e0b) !important; box-shadow: 0 4px 6px -1px rgba(249,115,22,.3); }
.tm-dic-close { display: flex; width: 46px; height: 46px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 999px; color: #f59e0b !important; }
.tm-dic-body { height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4px 25px 25px; }
.tm-dic-body .big { position: relative; color: #fcd34d; animation: tmBob 2.6s ease-in-out infinite; }
.tm-dic-body .spark { position: absolute; right: -8px; top: -8px; color: #fb923c; }
.tm-dic-body p { margin: 0; }
.tm-dic-body .t1 { margin-top: 17px; font-size: 25px; font-weight: 900; color: #92400e; }
.tm-dic-body .t2 { margin-top: 6px; font-size: 18.7px; font-weight: 700; color: #fbbf24; }

/* ---------- 가이드 손가락 ---------- */
.tm-finger { position: absolute; z-index: 200; left: 0; top: 0; width: 64px; height: 64px; pointer-events: none; opacity: 0;
  transition: left .6s cubic-bezier(.22,1,.36,1), top .6s cubic-bezier(.22,1,.36,1), opacity .3s; }
.tm-finger.is-on { opacity: 1; }
.tm-finger svg { position: absolute; left: 14px; top: 10px; width: 64px; height: 64px; filter: drop-shadow(0 6px 10px rgba(15,23,42,.35)); transition: transform .12s; }
.tm-finger.is-tap svg { transform: scale(.84); }
.tm-finger .ripple { position: absolute; left: 0; top: 0; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 999px; border: 4px solid #fff; box-shadow: 0 0 0 3px rgba(249,115,22,.6); opacity: 0; }
.tm-finger.is-tap .ripple { animation: tmRipple .55s ease-out; }
@keyframes tmRipple { 0% { opacity: 1; transform: scale(.4); } 100% { opacity: 0; transform: scale(2.2); } }

@media (prefers-reduced-motion: reduce) {
  .tm-screen *, .tm-screen *::after { animation: none !important; transition: none !important; }
}

/* 이 가이드는 스테이지가 자체 손가락을 쓰므로 공용 스포트라이트 손가락·다음 버튼 펄스는 숨김 */
body.is-tablet-menu-mode #FingerCursor,
body.is-tablet-menu-mode #NextBtnFinger { display: none !important; }
