.sb-wrap * { margin: 0; padding: 0; box-sizing: border-box; }
.sb-wrap img { max-width: none; height: auto; }
.sb-wrap {
  width: 320px;
  max-width: 320px;
  height: 640px;
  max-height: 640px;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  color: #1e293b;
  -webkit-overflow-scrolling: touch;
  border-radius: 40px;
  border: 6px solid #2a2a2a;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,0.4), inset 0 0 0 1.5px #444;
  margin: 20px auto;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --sb-primary: #22c55e;
  --sb-accent: #22c55e;
  --sb-text-main: #1e293b;
  --sb-text-muted: #64748b;
  --sb-radius: 24px;
  --sb-avatar-size: 400px;
}
.sb-wrap *, .sb-wrap *::before, .sb-wrap *::after { scrollbar-width: none; -ms-overflow-style: none; }
.sb-wrap *::-webkit-scrollbar { display: none; }
@media (min-width: 520px) {
  .sb-wrap { width: 393px; max-width: 393px; height: 852px; max-height: 852px; border-radius: 48px; border: 10px solid #1a1a1a; box-shadow: 0 25px 60px -12px rgba(0,0,0,0.3), inset 0 0 0 2px #333; }
}

.sb-wrap .sb-screen { flex: 1; display: flex; flex-direction: column; height: 100%; width: 100%; position: absolute; top: 0; left: 0; background: inherit; transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
.sb-wrap #sb-screen-lesson { overflow: hidden; }

.sb-wrap .sb-home-header { padding: calc(env(safe-area-inset-top, 0px) + 48px) 20px 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sb-wrap .sb-home-title { font-size: 1.4rem; font-weight: 700; color: var(--sb-text-main); }
.sb-wrap .sb-home-header-right { width: 42px; display: inline-flex; align-items: center; justify-content: flex-end; }
.sb-wrap .sb-home-section { padding: 0 0 24px; }
.sb-wrap .sb-section-title { font-size: 1.05rem; font-weight: 700; color: var(--sb-text-main); padding: 12px 20px 10px; }

.sb-wrap .sb-card-slider { display: flex; flex-direction: column; gap: 14px; padding: 0 20px 24px; }
.sb-wrap .sb-card { position: relative; width: 100%; height: 200px; border-radius: 20px; overflow: hidden; cursor: pointer; transition: transform 0.2s; }
.sb-wrap .sb-card:hover { transform: scale(1.02); }
.sb-wrap .sb-card-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.sb-wrap .sb-card-person { position: absolute; right: -20px; bottom: 0; height: 85%; object-fit: contain; z-index: 1; pointer-events: none; }
.sb-wrap .sb-card-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 14px 16px 0 16px; }
.sb-wrap .sb-card-bottom { background: rgba(0,0,0,0.6); backdrop-filter: blur(6px); margin: 0 -16px -14px; padding: 12px 40% 14px 16px; border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; display: flex; flex-direction: column; gap: 2px; }
.sb-wrap .sb-card-top { display: flex; gap: 8px; }
.sb-wrap .sb-card-badge { background: var(--sb-primary); color: white; font-size: 0.7rem; font-weight: 700; padding: 3px 10px; border-radius: 10px; }
.sb-wrap .sb-card-title { font-size: 1rem; font-weight: 700; color: #fff; }
.sb-wrap .sb-card-desc { font-size: 0.72rem; color: rgba(255,255,255,0.8); line-height: 1.3; display: -webkit-box; line-clamp: 2; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sb-wrap .sb-card-lessons { font-size: 0.7rem; font-weight: 600; color: rgba(255,255,255,0.6); margin-top: 2px; }

.sb-wrap .sb-lesson-nav { padding: 20px; display: flex; align-items: center; justify-content: space-between; z-index: 10; }
.sb-wrap .sb-btn-close { background: white; border: none; width: 36px; height: 36px; border-radius: 50%; color: var(--sb-text-main); font-size: 1.2rem; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sb-wrap .sb-progress-dots { display: flex; gap: 6px; }
.sb-wrap .sb-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.2); transition: background 0.3s, transform 0.3s; }
.sb-wrap .sb-dot.active { background: var(--sb-accent); transform: scale(1.2); }

.sb-wrap .sb-character-area { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px; padding: 168px 16px 18px; position: relative; overflow-y: auto; }
.sb-wrap .sb-bot-avatar { width: var(--sb-avatar-size); font-size: 5rem; filter: drop-shadow(0 10px 15px rgba(0,0,0,0.3)); flex-shrink: 0; transition: opacity 0.3s ease; position: absolute; top: 14px; left: 50%; margin-left: calc(var(--sb-avatar-size) / -2); z-index: 0; pointer-events: none; display: flex; justify-content: center; }
.sb-wrap .sb-character-area.sb-result-mode { justify-content: flex-start; padding-top: 20px; }
.sb-wrap .sb-bot-avatar .sb-avatar-img { width: var(--sb-avatar-size); height: var(--sb-avatar-size); object-fit: contain; animation: sbFloat 4s ease-in-out infinite; }
@keyframes sbFloat { 0% { transform: translateY(0px); } 50% { transform: translateY(-12px); } 100% { transform: translateY(0px); } }

.sb-wrap .sb-bubble-container { width: 100%; max-width: 340px; position: relative; display: flex; flex-direction: column; animation: sbSlideUp 0.3s ease-out; z-index: 2; padding-bottom: 10px; }
@keyframes sbSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.sb-wrap .sb-speaker-label { font-size: 0.75rem; font-weight: 700; padding: 4px 12px; border-radius: 12px; position: absolute; top: -12px; left: 20px; z-index: 2; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.sb-wrap .sb-bot-bubble-wrapper .sb-speaker-label { background: var(--sb-primary); color: white; }
.sb-wrap .sb-user-bubble-wrapper .sb-speaker-label { background: var(--sb-text-muted); color: white; }

.sb-wrap .sb-bubble { padding: 16px 20px; margin: 10px 0 14px; border-radius: var(--sb-radius); font-size: 1rem; line-height: 1.4; font-weight: 500; box-shadow: 0 10px 25px rgba(0,0,0,0.15); position: relative; overflow-wrap: anywhere; word-break: break-word; }
.sb-wrap .sb-bot-bubble-wrapper .sb-bubble { background: white; color: #1e293b; border-bottom-left-radius: 4px; }
.sb-wrap .sb-bot-bubble-inner { display: flex; align-items: center; gap: 10px; }
.sb-wrap .sb-bot-bubble-inner span { flex: 1; }

.sb-wrap .sb-btn-replay { background: none; border: none; padding: 0; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; opacity: 0.8; }
.sb-wrap .sb-btn-replay:active { opacity: 0.5; }
.sb-wrap .sb-replay-icon { width: 24px; height: 24px; object-fit: contain; filter: invert(56%) sepia(60%) saturate(600%) hue-rotate(170deg) brightness(95%); }

.sb-wrap .sb-user-area { padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 20px); flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; background: transparent; backdrop-filter: none; }
.sb-wrap .sb-user-bubble-wrapper { width: 100%; max-width: 340px; }
.sb-wrap .sb-user-bubble-wrapper .sb-bubble { background: #334155; color: var(--sb-text-main); border-bottom-right-radius: 4px; }
.sb-wrap .sb-user-bubble-top { display: flex; align-items: center; gap: 10px; }
.sb-wrap .sb-user-bubble-top #sb-user-text { flex: 1; min-width: 0; }
.sb-wrap .sb-user-text-feedback { color: var(--sb-text-main); }
.sb-wrap .sb-hint-text { margin-top: 10px; font-size: 0.8rem; color: var(--sb-text-muted); }

.sb-wrap .sb-answer-bubble-wrapper .sb-bubble { background: #334155; color: #e2e8f0; border-bottom-left-radius: 4px; font-size: 1rem; line-height: 1.6; }
.sb-wrap .sb-word-match { color: var(--sb-accent); }
.sb-wrap .sb-word-extra { color: rgba(255,255,255,0.5); }
.sb-wrap .sb-word-missing { color: #fb923c; font-weight: 700; font-style: italic; }

.sb-wrap .sb-instruction-text { font-size: 0.88rem; color: #14532d; text-align: center; background: rgba(240,253,244,0.95); border: 1px solid #86efac; padding: 12px 14px; border-radius: 14px; width: 100%; max-width: 340px; box-shadow: 0 6px 18px rgba(0,0,0,0.10); font-weight: 700; }

.sb-wrap .sb-mic-container { margin-top: 8px; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 0; border-radius: 0; background: transparent; box-shadow: none; border: none; }
.sb-wrap .sb-mic-icon { width: 24px; height: 24px; object-fit: contain; filter: invert(56%) sepia(60%) saturate(600%) hue-rotate(170deg) brightness(95%); }
.sb-wrap .sb-mic-inline img { width: 18px; height: 18px; object-fit: contain; filter: invert(56%) sepia(60%) saturate(600%) hue-rotate(170deg) brightness(95%); vertical-align: middle; }
.sb-wrap .sb-btn-mic-main { width: 56px; height: 56px; border-radius: 50%; background: #ffffff; border: 2px solid #86efac; color: #166534; cursor: pointer; box-shadow: 0 8px 20px rgba(34,197,94,0.18); display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); position: relative; padding: 0; }
.sb-wrap .sb-btn-mic-main:active { transform: scale(0.92); }
.sb-wrap .sb-btn-mic-main.sb-recording { background: #ef4444; border-color: #ef4444; color: white; box-shadow: 0 0 0 0 rgba(239,68,68,0.4); animation: sbPulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.sb-wrap .sb-btn-mic-main.sb-recording .sb-mic-icon { filter: grayscale(1) brightness(0.75) !important; }
@keyframes sbPulse { 0% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); } 70% { box-shadow: 0 0 0 20px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }

.sb-wrap .sb-btn-next-bar { background: white; color: var(--sb-primary); width: 85%; max-width: 400px; padding: 12px; border-radius: 30px; border: none; font-size: 1.15rem; font-weight: 700; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.15); margin-top: 8px; line-height: 1; transition: transform 0.2s; }
.sb-wrap .sb-btn-next-bar:hover { transform: translateY(-2px); }
.sb-wrap .sb-btn-skip { width: 56px; height: 56px; border-radius: 50%; border: 2px solid #bbf7d0; background: #f0fdf4; color: #166534; font-size: 1.3rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(34,197,94,0.16); }
.sb-wrap .sb-btn-skip:active { transform: scale(0.98); }
.sb-wrap .sb-mic-label { display: none; }

.sb-wrap .sb-result-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px 40px;
  /* ナビ（左上×）のクリックを邪魔しない */
  z-index: 9;
  pointer-events: none;
  animation: sbSlideUpResult 0.5s ease-out;
}
@keyframes sbSlideUpResult { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.sb-wrap .sb-result-card { background: white; border-radius: 22px; padding: 0 20px 24px; width: 100%; max-width: 340px; box-shadow: 0 10px 40px rgba(0,0,0,0.1); display: flex; flex-direction: column; align-items: center; pointer-events: auto; }
.sb-wrap .sb-result-header { background: var(--sb-accent); color: white; font-size: 0.84rem; font-weight: 800; padding: 9px 20px; border-radius: 0 0 16px 16px; margin-bottom: 14px; }
.sb-wrap .sb-result-title { font-size: 1.12rem; font-weight: 800; color: var(--sb-text-main); margin-bottom: 14px; text-align: center; }
.sb-wrap .sb-result-stars { display: flex; gap: 4px; margin-bottom: 8px; }
.sb-wrap .sb-star { font-size: 2.6rem; line-height: 1; }
.sb-wrap .sb-star.sb-filled { color: #f59e0b; }
.sb-wrap .sb-star.sb-empty { color: #d1d5db; }
.sb-wrap .sb-result-score { font-size: 2.2rem; font-weight: 800; color: var(--sb-primary); margin-bottom: 18px; }

.sb-wrap .sb-cta-popover-backdrop {
  position: absolute;
  inset: 0;
  /* ナビ（閉じるボタン）操作を邪魔しない */
  z-index: 9;
  background: transparent;
}

.sb-wrap .sb-lesson-nav-right { width: 42px; display: inline-flex; align-items: center; justify-content: flex-end; }

/* ポップを閉じた後に再度開くためのチップ */
.sb-wrap .sb-cta-peek {
  position: static;
  left: auto;
  right: auto;
  top: auto;
  z-index: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  aspect-ratio: 1 / 1;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(15, 23, 42, 0.62);
  color: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 38px rgba(0,0,0,0.28);
  font-weight: 900;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, opacity 140ms ease;
  animation: sbPeekBounce 3s ease-in-out infinite;
}
.sb-wrap .sb-cta-peek:active { transform: scale(0.99); }
.sb-wrap .sb-cta-peek:focus-visible { outline: 3px solid rgba(34,197,94,0.35); outline-offset: 2px; }
.sb-wrap .sb-cta-peek-icon { font-size: 18px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.sb-wrap .sb-cta-peek-icon svg { display: block; }
.sb-wrap .sb-cta-peek.sb-cta-peek-anim { animation: sbPeekIn 300ms cubic-bezier(0.22, 1, 0.36, 1), sbPeekBounce 3s ease-in-out infinite; }

@keyframes sbPeekIn {
  from { opacity: 0; transform: translateX(8px) scale(0.96); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes sbPeekBounce {
  0%, 72% { transform: translateY(0); }
  78% { transform: translateY(-6px); }
  83% { transform: translateY(0); }
  88% { transform: translateY(-3px); }
  92% { transform: translateY(0); }
  100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .sb-wrap .sb-cta-peek { animation: none; }
  .sb-wrap .sb-cta-peek.sb-cta-peek-anim { animation: none; }
}

@media (max-width: 360px) {
  .sb-wrap .sb-cta-peek { width: 38px; height: 38px; }
  .sb-wrap .sb-cta-peek-icon { font-size: 16px; }
}
.sb-wrap .sb-cta-popover {
  position: absolute;
  /* デフォルト: 下側（結果など） */
  bottom: calc(env(safe-area-inset-bottom, 0px) + 78px);
  z-index: 30;
  left: 12px;
  right: 12px;
  width: auto;
  max-width: none;
  background: rgba(255,255,255,0.92);
  color: #0f172a;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.10);
  box-shadow: 0 22px 55px rgba(0,0,0,0.25);
  overflow: hidden;
  transform-origin: 90% 100%;
  animation: sbCtaPop 180ms ease-out;
}

/* 結果画面は下の結果カードの「上」に積む（セリフっぽく） */
.sb-wrap.sb-cta-mode-result .sb-cta-popover {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 360px);
  background: transparent;
  color: inherit;
  border-radius: 0;
  border: none;
  box-shadow: none;
  overflow: visible;
}

@media (max-width: 430px) {
  /* スマホではスコアのすぐ上に寄せる */
  .sb-wrap.sb-cta-mode-result .sb-cta-popover { bottom: calc(env(safe-area-inset-bottom, 0px) + 280px); }
}
@media (max-height: 820px) {
  /* 低い画面でもスコア付近に寄せる */
  .sb-wrap.sb-cta-mode-result .sb-cta-popover { bottom: calc(env(safe-area-inset-bottom, 0px) + 260px); }
}

/* レッスン中はセリフに被らないよう上側へ */
.sb-wrap.sb-cta-mode-lesson .sb-cta-popover {
  /* 通知っぽく上部に出す（ナビに被せてOK） */
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  bottom: auto;
}

/* レッスン中は「通知トースト」風に見せる */
.sb-wrap.sb-cta-mode-lesson .sb-cta-popover {
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 18px 45px rgba(0,0,0,0.35);
  backdrop-filter: blur(14px);
}
.sb-wrap.sb-cta-mode-lesson .sb-cta-popover-inner { padding: 10px 12px 12px; }
.sb-wrap.sb-cta-mode-lesson .sb-cta-popover-title { font-size: 0.82rem; line-height: 1.25; }
.sb-wrap.sb-cta-mode-lesson .sb-cta-popover-desc { font-size: 0.7rem; color: rgba(255,255,255,0.78); }
/* sb-cta-close（×）は廃止 */
.sb-wrap.sb-cta-mode-lesson .sb-store-actions { gap: 8px; margin-top: 0; }
.sb-wrap.sb-cta-mode-lesson .sb-store-badge-img { height: 42px; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.22)); }

@keyframes sbToastIn {
  0% { opacity: 0; transform: translateY(-18px) scale(0.985); filter: blur(0.6px); }
  60% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0px); }
  78% { transform: translateY(-2px) scale(1); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.sb-wrap.sb-cta-mode-lesson .sb-cta-popover { animation: sbToastIn 420ms cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes sbCtaPop { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.sb-wrap .sb-cta-popover-inner { padding: 14px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.sb-wrap .sb-cta-popover-top { display: flex; align-items: center; justify-content: center; gap: 10px; }
.sb-wrap .sb-cta-popover-title-inline { flex: 1; min-width: 0; text-align: center; }
/* sb-cta-close（×）は廃止 */
.sb-wrap.sb-cta-mode-result .sb-cta-popover-inner { padding: 0; display: block; }
.sb-wrap .sb-cta-bubble { max-width: 100%; }
.sb-wrap .sb-cta-bubble .sb-bubble { display: flex; flex-direction: column; gap: 10px; }
.sb-wrap .sb-cta-title { font-weight: 900; }

/* 結果画面の見出しは改行しない（1行固定） */
.sb-wrap.sb-cta-mode-result .sb-cta-title {
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  font-size: 0.86rem;
  letter-spacing: -0.01em;
}
.sb-wrap .sb-cta-desc { font-size: 0.78rem; color: var(--sb-text-muted); line-height: 1.35; }
.sb-wrap .sb-store-actions-cta { margin-top: 2px; }
.sb-wrap .sb-store-actions { display: flex; gap: 10px; margin-top: 2px; flex-wrap: nowrap; }
.sb-wrap .sb-store-actions-result { margin-top: 2px; }
.sb-wrap .sb-store-btn {
  flex: 1;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  text-decoration: none;
  background: rgba(15,23,42,0.92);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  box-shadow: 0 14px 28px rgba(0,0,0,0.18);
  min-height: 54px;
  position: relative;
  padding-left: 42px;
}
.sb-wrap .sb-store-btn:active { transform: scale(0.99); }
.sb-wrap .sb-store-btn:focus-visible { outline: 3px solid rgba(34,197,94,0.35); outline-offset: 2px; }
.sb-wrap .sb-store-btn-top { font-size: 0.62rem; opacity: 0.78; font-weight: 700; letter-spacing: 0.02em; }
.sb-wrap .sb-store-btn-bottom { font-size: 0.98rem; font-weight: 900; letter-spacing: -0.01em; }
.sb-wrap .sb-store-googleplay { background: rgba(2,6,23,0.92); }
.sb-wrap .sb-store-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
}
.sb-wrap .sb-store-icon svg { width: 20px; height: 20px; display: block; }

.sb-wrap .sb-store-badge { flex: 1 1 0; display: block; text-decoration: none; min-width: 0; }
.sb-wrap .sb-store-badge-img {
  width: 100%;
  height: 54px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 14px 28px rgba(0,0,0,0.18));
}

.sb-wrap .sb-tutorial-backdrop {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 96px 16px 16px;
  background: rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(2px);
}
.sb-wrap .sb-tutorial-popover {
  width: 100%;
  max-width: 330px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.96);
  color: #0f172a;
  border: 1px solid rgba(15,23,42,0.10);
  box-shadow: 0 24px 70px rgba(15,23,42,0.28);
  animation: sbTutorialIn 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.sb-wrap .sb-tutorial-popover--lesson {
  margin-top: auto;
  margin-bottom: 86px;
}
.sb-wrap .sb-tutorial-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(34,197,94,0.12);
  color: #166534;
  font-size: 0.72rem;
  font-weight: 800;
}
.sb-wrap .sb-tutorial-title {
  margin-top: 10px;
  font-size: 1.02rem;
  line-height: 1.35;
  font-weight: 900;
}
.sb-wrap .sb-tutorial-body {
  margin-top: 7px;
  color: #475569;
  font-size: 0.84rem;
  line-height: 1.55;
}
.sb-wrap .sb-tutorial-emphasis {
  margin-top: 10px;
  color: #b45309;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.55;
}
.sb-wrap .sb-tutorial-note {
  margin-top: 6px;
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.5;
}
.sb-wrap .sb-tutorial-btn {
  width: 100%;
  margin-top: 14px;
  min-height: 42px;
  border: none;
  border-radius: 14px;
  background: #22c55e;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
}
.sb-wrap .sb-tutorial-btn:focus-visible {
  outline: 3px solid rgba(34,197,94,0.35);
  outline-offset: 2px;
}
@keyframes sbTutorialIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 360px) {
  .sb-wrap .sb-store-actions { gap: 8px; }
  .sb-wrap .sb-store-badge-img { height: 46px; }
  .sb-wrap .sb-cta-popover-title { font-size: 0.84rem; }
  .sb-wrap .sb-cta-popover-desc { font-size: 0.72rem; }
  .sb-wrap .sb-tutorial-backdrop { padding: 72px 12px 12px; }
  .sb-wrap .sb-tutorial-popover { padding: 15px; }
  .sb-wrap .sb-tutorial-title { font-size: 0.96rem; }
  .sb-wrap .sb-tutorial-body { font-size: 0.78rem; }
}

.sb-wrap .sb-result-cta {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.22);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sb-wrap .sb-result-cta-title { font-weight: 900; font-size: 0.92rem; color: #0f172a; }
.sb-wrap .sb-result-cta-desc { font-size: 0.78rem; color: #475569; line-height: 1.35; }

.sb-wrap .sb-hidden { display: none !important; }

@media (max-width: 430px) {
  .sb-wrap .sb-screen { overflow: hidden; overscroll-behavior-y: auto; }
  .sb-wrap #sb-screen-home .sb-home-section { flex: 0 0 auto; min-height: auto; display: block; overflow: visible; padding: 0 0 8px; }
  .sb-wrap #sb-screen-home .sb-card-slider { flex: 0 0 auto; min-height: auto; overflow: visible; padding: 0 14px 6px; gap: 8px; }
  .sb-wrap #sb-screen-lesson { overflow: hidden; overscroll-behavior-y: auto; }
  .sb-wrap #sb-screen-lesson .sb-character-area { flex: 1; min-height: 0; overflow: hidden; }
  .sb-wrap #sb-screen-lesson .sb-user-area { touch-action: manipulation; }
  .sb-wrap .sb-home-header { padding: 32px 14px 6px; }
  .sb-wrap .sb-home-title { font-size: 1.2rem; }
  .sb-wrap .sb-section-title { font-size: 0.96rem; padding: 10px 14px 7px; }
  .sb-wrap .sb-card { height: 146px; border-radius: 16px; }
  .sb-wrap .sb-card-person { right: -14px; height: 82%; }
  .sb-wrap .sb-card-overlay { padding: 11px 13px 0 13px; }
  .sb-wrap .sb-card-bottom { margin: 0 -13px -11px; padding: 10px 35% 11px 13px; }
  .sb-wrap .sb-card-badge { font-size: 0.66rem; padding: 3px 8px; }
  .sb-wrap .sb-card-title { font-size: 0.92rem; }
  .sb-wrap .sb-card-desc { font-size: 0.66rem; line-height: 1.3; }
  .sb-wrap .sb-card-lessons { font-size: 0.66rem; }
  .sb-wrap { --sb-avatar-size: 305px; }
  .sb-wrap .sb-character-area { gap: 14px; padding: 130px 12px 12px; }
  .sb-wrap .sb-bot-avatar { font-size: 4rem; }
  .sb-wrap .sb-bubble-container, .sb-wrap .sb-user-bubble-wrapper, .sb-wrap .sb-instruction-text { max-width: 100%; }
  .sb-wrap .sb-bubble-container { padding-bottom: 10px; }
  .sb-wrap .sb-bubble { padding: 13px 15px; margin: 10px 0 12px; font-size: 0.9rem; line-height: 1.38; }
  .sb-wrap .sb-speaker-label { font-size: 0.7rem; padding: 3px 10px; top: -10px; }
  .sb-wrap .sb-hint-text { margin-top: 8px; font-size: 0.76rem; }
  .sb-wrap .sb-btn-replay { width: 21px; height: 21px; }
  .sb-wrap .sb-replay-icon { width: 21px; height: 21px; }
  .sb-wrap .sb-btn-mic-main { width: 46px; height: 46px; }
  .sb-wrap .sb-btn-skip { width: 46px; height: 46px; font-size: 1.08rem; }
  .sb-wrap .sb-mic-icon { width: 19px; height: 19px; }
  .sb-wrap .sb-user-area { padding: 6px 12px calc(env(safe-area-inset-bottom, 0px) + 10px); }
  .sb-wrap .sb-instruction-text { padding: 10px 12px; font-size: 0.8rem; }
  .sb-wrap .sb-mic-container { margin-top: 4px; gap: 10px; }
  .sb-wrap .sb-btn-next-bar { width: 92%; font-size: 0.92rem; padding: 9px; margin-top: 5px; }
  .sb-wrap .sb-result-overlay { padding: 0 14px 26px; }
  .sb-wrap .sb-result-card { max-width: 320px; padding: 0 16px 20px; border-radius: 20px; }
  .sb-wrap .sb-result-header { font-size: 0.78rem; padding: 8px 16px; margin-bottom: 12px; }
  .sb-wrap .sb-result-title { font-size: 1.02rem; margin-bottom: 12px; }
  .sb-wrap .sb-star { font-size: 2.35rem; }
  .sb-wrap .sb-result-score { font-size: 2.0rem; margin-bottom: 14px; }
  .sb-wrap.sb-cta-mode-result .sb-cta-title { font-size: 0.78rem; }
}
@media (max-height: 820px) {
  .sb-wrap .sb-screen { overflow: hidden; overscroll-behavior-y: auto; }
  .sb-wrap #sb-screen-home .sb-home-section { flex: 0 0 auto; min-height: auto; display: block; overflow: visible; padding: 0 0 6px; }
  .sb-wrap #sb-screen-home .sb-card-slider { flex: 0 0 auto; min-height: auto; overflow: visible; padding-bottom: 4px; gap: 8px; }
  .sb-wrap #sb-screen-lesson { overflow: hidden; overscroll-behavior-y: auto; }
  .sb-wrap #sb-screen-lesson .sb-character-area { flex: 1; min-height: 0; overflow: hidden; }
  .sb-wrap #sb-screen-lesson .sb-user-area { touch-action: manipulation; }
  .sb-wrap .sb-lesson-nav { padding: 11px 14px; }
  .sb-wrap { --sb-avatar-size: 284px; }
  .sb-wrap .sb-character-area { gap: 10px; padding: 122px 12px 10px; }
  .sb-wrap .sb-bot-avatar { font-size: 3.5rem; }
  .sb-wrap .sb-card { height: 136px; }
  .sb-wrap .sb-card-title { font-size: 0.9rem; }
  .sb-wrap .sb-card-desc { font-size: 0.64rem; }
  .sb-wrap .sb-bubble-container { padding-bottom: 8px; }
  .sb-wrap .sb-bubble { padding: 12px 14px; margin: 9px 0 10px; font-size: 0.88rem; line-height: 1.34; }
  .sb-wrap .sb-btn-mic-main { width: 44px; height: 44px; }
  .sb-wrap .sb-btn-skip { width: 44px; height: 44px; font-size: 1.04rem; }
  .sb-wrap .sb-user-area { padding: 5px 12px calc(env(safe-area-inset-bottom, 0px) + 8px); }
  .sb-wrap .sb-instruction-text { padding: 9px 11px; font-size: 0.78rem; }
  .sb-wrap .sb-mic-container { margin-top: 3px; gap: 9px; }
  .sb-wrap .sb-btn-next-bar { padding: 9px; font-size: 0.9rem; margin-top: 5px; }
  .sb-wrap .sb-result-overlay { padding: 0 14px 24px; }
  .sb-wrap .sb-result-card { max-width: 320px; padding: 0 16px 18px; border-radius: 20px; }
  .sb-wrap .sb-result-header { font-size: 0.78rem; padding: 8px 16px; margin-bottom: 12px; }
  .sb-wrap .sb-result-title { font-size: 1.02rem; margin-bottom: 12px; }
  .sb-wrap .sb-star { font-size: 2.35rem; }
  .sb-wrap .sb-result-score { font-size: 2.0rem; margin-bottom: 14px; }
  .sb-wrap.sb-cta-mode-result .sb-cta-title { font-size: 0.78rem; }
}
