/* ================= SCOPED CSS RESET (Preflight Disabled Replacement) ================= */
    *, ::before, ::after {
      box-sizing: border-box;
      border-width: 0;
      border-style: solid;
      border-color: currentColor;
    }
    html {
      line-height: 1.5;
      -webkit-text-size-adjust: 100%;
      tab-size: 4;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Hiragino Sans", "BIZ UDPGothic", Meiryo, sans-serif;
    }
    body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd {
      margin: 0;
      padding: 0;
    }
    ul, ol {
      list-style: none;
    }
    button, input, optgroup, select, textarea {
      font-family: inherit;
      font-size: 100%;
      font-weight: inherit;
      line-height: inherit;
      color: inherit;
      margin: 0;
      padding: 0;
      border: 0 solid currentColor;
      background: transparent;
    }
    button, [role="button"] {
      cursor: pointer;
    }
    button, select {
      text-transform: none;
    }
    img, svg, video, canvas, audio, iframe, embed, object {
      display: block;
      vertical-align: middle;
      max-width: 100%;
      height: auto;
    }
    table {
      text-indent: 0;
      border-color: inherit;
      border-collapse: collapse;
    }

    /* ================= THEME DEFINITIONS ================= */
    :root {
      --primary-color: #0284c7;
      --primary-dark: #0369a1;
      --primary-container: #0ea5e9;
      --primary-light: #e0f2fe;
      --footer-bg: #0c4a6e;
      --theme-badge: #0284c7;
    }
    body.theme-asagi {
      --primary-color: #0d9488;
      --primary-dark: #0f766e;
      --primary-container: #14b8a6;
      --primary-light: #ccfbf1;
      --footer-bg: #115e59;
      --theme-badge: #0d9488;
    }
    body.theme-ruri {
      --primary-color: #2563eb;
      --primary-dark: #1d4ed8;
      --primary-container: #3b82f6;
      --primary-light: #dbeafe;
      --footer-bg: #1e3a8a;
      --theme-badge: #2563eb;
    }
    body.theme-yuakane {
      --primary-color: #ea580c;
      --primary-dark: #c2410c;
      --primary-container: #f97316;
      --primary-light: #ffedd5;
      --footer-bg: #7c2d12;
      --theme-badge: #ea580c;
    }
    body.theme-sumi {
      --primary-color: #475569;
      --primary-dark: #334155;
      --primary-container: #64748b;
      --primary-light: #f1f5f9;
      --footer-bg: #1e293b;
      --theme-badge: #475569;
    }
    html, body {
      margin: 0;
      padding: 0;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Hiragino Sans", "BIZ UDPGothic", Meiryo, sans-serif;
    }
    ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }
    ::-webkit-scrollbar-track {
      background: transparent;
    }
    ::-webkit-scrollbar-thumb {
      background: #cbd5e1;
      border-radius: 9999px;
    }
    ::-webkit-scrollbar-thumb:hover {
      background: #94a3b8;
    }

    /* ハンバーガーアイコンのアニメーション定義 */
    .hamburger-icon-box {
      width: 18px;
      height: 14px;
      position: relative;
      display: inline-flex;
      flex-direction: column;
      justify-content: space-between;
    }
    .hamburger-line {
      display: block;
      height: 2px;
      width: 100%;
      background-color: currentColor;
      border-radius: 9999px;
      transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, width 0.25s ease;
      transform-origin: center;
    }
    .hamburger-active .line-top {
      transform: translateY(6px) rotate(45deg);
    }
    .hamburger-active .line-middle {
      opacity: 0;
      transform: scaleX(0);
    }
    .hamburger-active .line-bottom {
      transform: translateY(-6px) rotate(-45deg);
    }

    /* 吹き出し（Speech Bubble）タブスタイル定義 */
    .bubble-tab-btn {
      position: relative;
      background-color: var(--primary-light, #e0f2fe);
      color: var(--primary-color, #0284c7);
      border-radius: 0.5rem 0.5rem 0 0;
      font-weight: 600;
      transition: all 0.2s ease;
      z-index: 1;
    }
    .bubble-tab-btn:hover {
      filter: brightness(0.96);
    }
    .bubble-tab-btn.active {
      background-color: var(--primary-color, #0284c7) !important;
      color: #ffffff !important;
      font-weight: 700;
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
      z-index: 10;
    }
    .bubble-tab-btn.active::after {
      content: "";
      position: absolute;
      bottom: -7px;
      left: 50%;
      transform: translateX(-50%);
      width: 0;
      height: 0;
      border-left: 7px solid transparent;
      border-right: 7px solid transparent;
      border-top: 7px solid var(--primary-color, #0284c7);
      z-index: 20;
    }
/* ==End of CSS== */