/* ==========================================================
   無課金ゼミナール V3 追加スタイル
   - 4階層ナビ / 3入口カード / コマ3タブ
   - キャラ合いの手吹き出し / 赤シートモード / タップ開示例題
   - 明るいライト版静止図 / 診断型テスト結果・弱点ジャンプ
   ========================================================== */

.v3-hero {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  padding: clamp(24px, 4vw, 44px);
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--surface) 60%, #FFF8E8 100%);
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  margin-bottom: 24px;
}
.v3-hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 24px;
  align-items: center;
}
@media (max-width: 780px) {
  .v3-hero-grid { grid-template-columns: 1fr; }
}
.v3-hero h1 {
  font-size: var(--fs-hero);
  line-height: 1.3;
  margin: 8px 0 12px;
  font-weight: 800;
}
.v3-hero p { color: var(--ink-2); margin: 0 0 18px; }
.v3-hero-chars {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
}
.v3-hero-chars img {
  height: 180px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.08));
}
.v3-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.v3-pill.blue { background: var(--cyan-soft); color: #126272; }
.v3-pill.pink { background: var(--pink-soft); color: #961F49; }
.v3-pill.purple { background: var(--purple-soft); color: #4C31A8; }
.v3-pill.gold { background: var(--yellow-soft); color: #8A510F; }
.v3-pill.muted { background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); }

.v3-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 820px) {
  .v3-grid-3 { grid-template-columns: 1fr; }
}
.v3-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--sh-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.v3-lesson-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  height: 100%;
}
.v3-lesson-card-title {
  margin: 4px 0 6px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
}
.v3-lesson-card-desc {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.v3-lesson-card-foot {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-ink);
}
a.v3-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
a.v3-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
  border-color: var(--accent-2);
}

/* 進捗プログレスバー */
.v3-progress-bar {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: var(--line-soft);
  overflow: hidden;
  margin-top: 10px;
}
.v3-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .3s ease;
}

/* 再開バナー */
.v3-resume-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1.5px solid var(--accent-2);
  border-radius: var(--r);
  padding: 14px 20px;
  margin: 18px 0 22px;
  box-shadow: var(--sh-sm);
}
.v3-resume-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}
.v3-resume-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}

/* フィルタバー */
.v3-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 14px 0 18px;
}
.v3-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s ease;
}
.v3-toggle-pill.is-on {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent-ink);
}
.v3-toggle-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
  transition: background .15s ease;
}
.v3-toggle-pill.is-on .v3-toggle-dot {
  background: var(--accent);
}
.v3-sec-title {
  font-size: 22px;
  font-weight: 800;
  margin: 26px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* パンくず・タブ */
.v3-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.v3-crumb a { color: var(--accent-ink); text-decoration: none; font-weight: 700; }
.v3-crumb a:hover { text-decoration: underline; }

.v3-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0 20px;
  border-bottom: 2px solid var(--line-soft);
  padding-bottom: 10px;
}
.v3-tab {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s ease;
}
.v3-tab.active {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.v3-tab:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* 科目4階層リスト */
.v3-chapter {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 14px;
  overflow: hidden;
}
.v3-chapter summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-2);
}
.v3-chapter[open] summary { border-bottom: 1px solid var(--line-soft); }
.v3-section-box { padding: 14px 20px; border-bottom: 1px solid var(--line-soft); }
.v3-section-box:last-child { border-bottom: none; }
.v3-section-head { font-size: 15px; font-weight: 800; color: var(--ink-2); margin: 0 0 10px; }
.v3-lesson-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-soft);
  margin-bottom: 8px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}
.v3-lesson-row:hover { border-color: var(--accent-2); background: var(--accent-tint); }
.v3-lesson-row.upcoming { opacity: .62; }
.v3-badges { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }

/* テキストツールバー（赤シートモード） */
.v3-text-toolbar {
  position: sticky;
  top: 70px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 16px;
  margin-bottom: 20px;
  box-shadow: var(--sh-sm);
}
.v3-toc-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  flex: 1 1 320px;
  min-width: 0;
}
.v3-toc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 240px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.v3-toc-chip:hover {
  background: var(--accent-tint);
  border-color: var(--accent-2);
  color: var(--accent-ink);
}
.v3-toc-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.v3-toc-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 680px) {
  .v3-toc-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  .v3-toc-chip { flex-shrink: 0; max-width: 200px; }
}
/* Webテキスト：はじめに／節／まとめタブ */
.v3-text-toolbar { align-items: center; }
.v3-text-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: thin;
}
.v3-text-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: inherit;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.v3-text-tab:hover {
  background: var(--accent-tint);
  border-color: var(--accent-2);
  color: var(--accent-ink);
}
.v3-text-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.v3-text-tab-title {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}
.v3-text-panel[hidden] { display: none; }
.v3-text-panel { animation: v3-text-fade .16s ease; }
@keyframes v3-text-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.v3-section-heading {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 0 0 18px;
}
.v3-section-heading h2 { margin: 0; }
.v3-section-number {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 20px;
  font-weight: 800;
}
.v3-text-lead {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.8;
}
.v3-goal-list,
.v3-review-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.v3-goal-list li,
.v3-review-list li {
  position: relative;
  padding: 12px 16px 12px 42px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  line-height: 1.75;
}
.v3-goal-list li::before,
.v3-review-list li::before {
  content: "✓";
  position: absolute;
  left: 14px;
  top: 12px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 800;
}
.v3-roadmap {
  display: grid;
  gap: 10px;
}
.v3-roadmap-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px dashed var(--accent-2);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.v3-roadmap-item:hover {
  background: var(--accent-tint);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.v3-roadmap-num {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 800;
}
.v3-roadmap-copy {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}
.v3-roadmap-copy b { font-size: 15.5px; }
.v3-roadmap-copy small { color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.v3-roadmap-arrow { color: var(--accent-ink); font-size: 22px; font-weight: 800; }
.v3-section-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}
.v3-prerequisites {
  margin: 18px 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}
.v3-prerequisites summary { cursor: pointer; font-weight: 800; color: var(--ink-2); }
.v3-prerequisites ul { margin: 10px 0 0; padding-left: 22px; color: var(--ink-2); }
.v3-glossary-details {
  margin: 18px 0;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.v3-glossary-details summary { cursor: pointer; font-weight: 800; color: var(--ink-2); }
.v3-glossary-details[open] summary { margin-bottom: 12px; }
@media (max-width: 680px) {
  .v3-text-toolbar { flex-direction: column; align-items: stretch; }
  .v3-text-tabs { width: 100%; }
  .v3-text-tab { padding: 8px 14px; }
  .v3-section-number { width: 38px; height: 38px; border-radius: 11px; font-size: 17px; }
}

/* キャラ合いの手吹き出し */
.v3-dialogue {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 18px 0;
  max-width: 720px;
}
.v3-bubble-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.v3-bubble-row.metan {
  padding-left: 20px;
}
.v3-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 2px solid var(--accent-2);
  background: var(--accent-soft);
  flex-shrink: 0;
}
.v3-bubble-row.metan .v3-avatar {
  border-color: #E06B93;
  background: var(--pink-soft);
}
.v3-bubble {
  max-width: 620px;
  padding: 13px 18px;
  border-radius: 18px;
  border-top-left-radius: 4px;
  font-size: 17px;
  line-height: 1.8;
  border: 1px solid rgba(53, 118, 44, .22);
  background: #F2FAEE;
  box-shadow: 0 1px 3px rgba(20, 30, 15, .04);
}
.v3-bubble-row.metan .v3-bubble {
  border-color: rgba(196, 47, 99, .22);
  background: #FFF3F7;
}
.v3-bubble-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-ink);
  margin-bottom: 3px;
}
.v3-bubble-row.metan .v3-bubble-name { color: #9E214D; }

/* 本文セクション＆コールアウト＆例題 */
.v3-article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 36px);
  box-shadow: var(--sh-sm);
  font-size: 18px;
}
.v3-section { margin: 30px 0; scroll-margin-top: 130px; }
.v3-section h2 {
  font-size: clamp(21px, 2.4vw, 26px);
  font-weight: 800;
  padding-left: 14px;
  border-left: 6px solid var(--accent);
  margin: 0 0 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.v3-p { font-size: 18.5px; line-height: 2.0; margin: 16px 0; text-wrap: pretty; }

.v3-callout {
  border-radius: var(--r);
  padding: 16px 20px;
  margin: 18px 0;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 17.5px;
  line-height: 1.85;
}
.v3-callout.analogy { background: #EEF8FC; border-color: #A7DCE8; }
.v3-callout.point { background: #F1F9EE; border-color: #AEDB9F; }
.v3-callout.pitfall { background: #FFF2F2; border-color: #F2B5B7; }
.v3-callout-title { font-weight: 800; font-size: 17.5px; margin-bottom: 6px; }

/* 明るいライト版静止図＆表 */
.v3-figure {
  margin: 22px 0;
  padding: 16px;
  border-radius: var(--r);
  background: #FFFFFF;
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  text-align: center;
}
.v3-figure img, .v3-figure svg {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 0 auto;
}
.v3-figure img {
  width: auto;
  max-width: min(100%, 620px);
  max-height: 420px;
}
.v3-figure svg {
  max-width: min(100%, 820px);
}
.v3-figure figcaption {
  margin-top: 10px;
  font-size: 15.5px;
  color: var(--ink-2);
  font-weight: 700;
}
.v3-credit { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
.v3-table-wrap { overflow-x: auto; text-align: left; }
.v3-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16.5px;
  background: #FFFFFF;
}
.v3-table th, .v3-table td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.v3-table th { background: var(--surface-2); font-weight: 800; }

/* タップ開示例題 */
.v3-example {
  margin: 20px 0;
  border: 2px solid var(--cyan);
  border-radius: var(--r);
  background: #FAFDFF;
  padding: 18px;
}
.v3-example-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.v3-example details {
  margin-top: 12px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 14px;
}
.v3-example summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--cyan);
}
.v3-steps { margin: 10px 0 8px 20px; padding: 0; }
.v3-steps li { margin-bottom: 6px; }
.v3-answer-box {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--accent-ink);
  font-weight: 800;
}

/* よくあるミス＆用語集 */
.v3-mistake-card {
  border: 1px solid #F2B5B7;
  background: #FFF9F9;
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.v3-glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.v3-gloss-item {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  background: var(--surface-2);
}

.v3-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--sh-sm);
}
.v3-btn.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.v3-btn:hover { opacity: .92; }

.v3-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
  overflow: hidden;
  background: #070B1C;
  margin-bottom: 16px;
}
.v3-video-frame iframe { width: 100%; height: 100%; border: 0; }

/* テキスト末尾アクション・通知表データ管理 */
.v3-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
  padding: 18px 20px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.v3-action-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.v3-subj-prog-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 2fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}
.v3-subj-prog-row:last-child { border-bottom: none; }
@media (max-width: 640px) {
  .v3-subj-prog-row { grid-template-columns: 1fr; gap: 6px; }
}

.v3-data-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}
.v3-btn-sm {
  padding: 8px 14px;
  font-size: 13.5px;
}
.v3-btn.danger {
  background: #FFF5F5;
  color: #B32025;
  border: 1px solid #F2B5B7;
}
.v3-btn.danger:hover {
  background: #FDECEC;
}

/* 購買部カード内のボタン下揃え */
.goods-card.has-img .goods-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.goods-card.has-img .goods-body .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ずんだ餅獲得の軽いポップ */
@keyframes v3Pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.22); }
  100% { transform: scale(1); }
}
.v3-pop { animation: v3Pop .4s ease; }

/* ============ 購買部：ずんだ餅ショップ ============ */
.shop-counter {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 320px;
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  background: linear-gradient(135deg, #F6EFE2 0%, #E7EDDF 100%);
}
.shop-counter-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 62%;
}
.shop-counter-shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(255, 252, 245, .92) 0%,
    rgba(255, 252, 245, .72) 34%,
    rgba(255, 252, 245, .05) 62%,
    rgba(58, 40, 20, .16) 100%);
}
.shop-bubble {
  position: absolute;
  left: clamp(14px, 3vw, 34px);
  bottom: clamp(16px, 3vw, 32px);
  max-width: min(52%, 460px);
  background: #FFFDF6;
  border: 2px solid #8E2A44;
  border-radius: 18px;
  padding: 14px 18px;
  box-shadow: var(--sh-md);
}
.shop-bubble::after {
  content: "";
  position: absolute;
  right: -10px; bottom: 22px;
  width: 16px; height: 16px;
  background: #FFFDF6;
  border-right: 2px solid #8E2A44;
  border-top: 2px solid #8E2A44;
  transform: rotate(45deg);
}
.shop-bubble-name {
  font-size: 12.5px; font-weight: 800; color: #8E2A44; margin-bottom: 4px;
}
.shop-bubble p { margin: 0; font-size: 15px; line-height: 1.7; font-weight: 700; }
.shop-clerk {
  position: absolute;
  right: clamp(2%, 6vw, 9%);
  bottom: 0;
  height: min(88%, 420px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(40, 24, 12, .22));
  pointer-events: none;
}
@media (max-width: 760px) {
  .shop-counter { min-height: 420px; }
  .shop-clerk { height: 200px; right: 4%; bottom: 0; }
  .shop-bubble {
    left: 14px; right: 14px; top: 14px; bottom: auto;
    max-width: none;
  }
  .shop-bubble::after { display: none; }
}

.shop-item.is-locked { opacity: .78; }
.shop-lock {
  flex: none;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-3);
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: 999px;
  padding: 6px 12px;
}

/* 部屋のキャラ別テーマ */
.room-stage.is-metan .room-wall {
  background: linear-gradient(180deg,
    color-mix(in srgb, #FBDCE7 70%, var(--surface-2)),
    var(--surface-2));
}
.room-stage.is-metan .room-floor {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 60%, #F7D9E4), var(--surface-2)),
    repeating-linear-gradient(90deg, transparent 0 48px, var(--line-soft) 48px 49px);
}

/* 赤シート単語帳 */
.words-card {
  display: block;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 13px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.words-card:hover { border-color: var(--accent-2); background: var(--accent-tint); }
.words-term { font-weight: 800; font-size: 16.5px; }
.words-term small { font-weight: 600; font-size: 12px; color: var(--ink-3); margin-left: 8px; }
.words-def { margin-top: 6px; font-size: 14.5px; color: var(--ink-2); line-height: 1.75; border-radius: 6px; }
.words-src { margin-top: 8px; font-size: 11.5px; color: var(--ink-3); font-weight: 700; }
.words-card.is-red .words-def {
  background: #D64045;
  color: transparent;
  padding: 2px 6px;
  margin-left: -6px;
  user-select: none;
}
.words-card.is-red .words-src { opacity: .35; }
.words-card.is-red.revealed .words-def { background: #FDECEC; color: #B32025; }

/* 問題文中の小問 (1)(2) / ①② 箇条書き */
.v3-subitems {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.v3-subitems li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(30, 120, 200, .06);
  border: 1px solid rgba(30, 120, 200, .14);
  line-height: 1.7;
}
.v3-subitem-key {
  flex: 0 0 auto;
  font-weight: 800;
  color: var(--cyan);
}

/* 参考書風の蛍光ペンマーカー（重要語句・強調） */
.v3-p strong,
.v3-callout strong,
.v3-bubble strong,
.v3-steps strong,
.v3-answer-box strong,
.v3-goal-list strong,
.v3-review-list strong,
.v3-table strong,
.v3-marker {
  font-weight: 800;
  color: inherit;
  background: linear-gradient(transparent 56%, rgba(255, 229, 92, 0.72) 56%);
  padding: 0 3px;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.v3-callout.pitfall strong {
  background: linear-gradient(transparent 56%, rgba(255, 176, 184, 0.65) 56%);
}

