.reader-floating-hud {
      position: fixed;
      bottom: 20px;
      bottom: max(14px, env(safe-area-inset-bottom, 14px));
      left: 50%;
      transform: translateX(-50%);
      z-index: 1000;
      background: rgba(15, 23, 42, 0.94);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid rgba(255, 255, 255, 0.16);
      border-radius: 9999px;
      padding: 6px 12px;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75);
      white-space: nowrap !important;
      user-select: none;
      -webkit-user-select: none;
      box-sizing: border-box;
      max-width: calc(100vw - 16px);
    }
    .reader-floating-hud .hud-action-btn {
      background: transparent;
      color: #e2e8f0;
      border: 1px solid transparent;
      border-radius: 9999px;
      padding: 5px 10px;
      font-size: 0.82rem;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 3px;
      text-decoration: none;
      transition: all 0.15s ease;
      white-space: nowrap !important;
      flex-shrink: 0;
      line-height: 1.2;
      touch-action: manipulation;
    }
    .reader-floating-hud .hud-action-btn:hover {
      background: rgba(255, 255, 255, 0.14);
      color: #ffffff;
    }
    .reader-floating-hud .hud-action-btn:active {
      transform: scale(0.95);
    }
    .reader-floating-hud .hud-btn-next {
      background: #6366f1;
      color: #ffffff;
      padding: 5px 12px;
      box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
    }
    .reader-floating-hud .hud-btn-next:hover {
      background: #4f46e5;
    }
    .reader-floating-hud .hud-disabled {
      opacity: 0.35;
      cursor: not-allowed;
      pointer-events: none;
    }
    .hud-font-ctrl {
      display: inline-flex;
      align-items: center;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 9999px;
      padding: 2px 6px;
      white-space: nowrap !important;
      flex-shrink: 0;
    }
    .hud-mini-btn {
      background: transparent;
      border: none;
      color: #cbd5e1;
      font-size: 0.75rem;
      font-weight: 700;
      cursor: pointer;
      padding: 2px 5px;
      border-radius: 4px;
      white-space: nowrap !important;
      flex-shrink: 0;
      line-height: 1;
      touch-action: manipulation;
    }
    .hud-mini-btn:hover {
      color: #ffffff;
    }
    .hud-mini-btn:active {
      transform: scale(0.9);
    }
    .hud-size-val {
      font-size: 0.75rem;
      font-weight: 700;
      color: #94a3b8;
      padding: 0 3px;
      min-width: 24px;
      text-align: center;
      white-space: nowrap !important;
      flex-shrink: 0;
    }
    .hud-divider {
      width: 1px;
      height: 16px;
      background: rgba(255, 255, 255, 0.18);
      flex-shrink: 0;
      margin: 0 1px;
    }
    .font-serif {
      font-family: 'Noto Serif KR', Georgia, serif !important;
    }
    .font-pretendard {
      font-family: -apple-system, BlinkMacSystemFont, 'Pretendard', sans-serif !important;
    }

    /* Mobile Responsive Optimizations */
    @media (max-width: 640px) {
      .reader-floating-hud {
        bottom: max(12px, env(safe-area-inset-bottom, 12px));
        padding: 4px 7px;
        gap: 3px;
        /* 좁은 화면에서 이전/다음 버튼이 화면 밖으로 잘리지 않도록 두 줄로 내린다. */
        flex-wrap: wrap;
        justify-content: center;
        width: calc(100vw - 16px);
        border-radius: 18px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
      }
      .reader-floating-hud .hud-action-btn {
        padding: 4px 7px;
        font-size: 0.75rem;
        gap: 2px;
      }
      .reader-floating-hud .hud-btn-next {
        padding: 4px 9px;
      }
      .hud-font-ctrl {
        padding: 2px 4px;
      }
      .hud-mini-btn {
        padding: 2px 4px;
        font-size: 0.7rem;
      }
      .hud-size-val {
        font-size: 0.7rem;
        min-width: 19px;
        padding: 0 1px;
      }
      .hud-divider {
        height: 14px;
        margin: 0;
      }
    }

    @media (max-width: 380px) {
      .reader-floating-hud {
        bottom: max(8px, env(safe-area-inset-bottom, 8px));
        padding: 3px 5px;
        gap: 2px;
      }
      .reader-floating-hud .hud-action-btn {
        padding: 3px 5px;
        font-size: 0.7rem;
      }
      .reader-floating-hud .hud-btn-next {
        padding: 3px 7px;
      }
      .hud-mini-btn {
        padding: 1px 3px;
        font-size: 0.65rem;
      }
      .hud-size-val {
        font-size: 0.65rem;
        min-width: 16px;
      }
    }

    /* Novel Illustration & Content Image Containment (Prevent Right-side Overflow) */
    .reader-content-body,
    .reader-container {
      box-sizing: border-box;
      max-width: 100%;
    }
    .reader-content-body img,
    .reader-container img,
    .novel-illustration,
    .novel-illustration-wrap img,
    .reader-illustration img {
      max-width: 100% !important;
      height: auto !important;
      display: block !important;
      margin: 1.5rem auto !important;
      border-radius: 0.75rem;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
      border: 1px solid rgba(255, 255, 255, 0.12);
      box-sizing: border-box !important;
      object-fit: contain;
    }
    .novel-illustration-wrap,
    .reader-illustration {
      max-width: 100% !important;
      box-sizing: border-box !important;
      overflow: hidden;
      margin: 2rem auto;
      text-align: center;
    }

    /* Reading Progress Bar & HUD Toggle Transition */
    #novel-reading-progress {
      position: fixed;
      top: 0;
      left: 0;
      height: 3px;
      width: 0%;
      background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899);
      z-index: 1100;
      transition: width 0.12s ease-out;
      pointer-events: none;
    }
    .reader-floating-hud {
      transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    }
    .reader-floating-hud.hud-hidden {
      transform: translate(-50%, 140%);
      opacity: 0;
      pointer-events: none;
    }

    /* Light, Sepia & High-Contrast Theme Contrast Overrides */
    body.theme-light {
      --surface-color: #f1f5f9;
      --border-color: #cbd5e1;
    }
    body.theme-sepia {
      --surface-color: #f3e5c8;
      --border-color: #dcc7a1;
    }
    body.theme-high-contrast {
      --surface-color: #090d16;
      --border-color: rgba(250, 204, 21, 0.35);
    }
    body.theme-high-contrast .episode-header h1,
    body.theme-high-contrast .reader-comments h3,
    body.theme-high-contrast .reader-content-body {
      color: #fef08a !important;
    }
    body.theme-light .episode-header h1,
    body.theme-light .reader-comments h3,
    body.theme-light .comment-item,
    body.theme-light .comment-item strong,
    body.theme-light .author-note-box,
    body.theme-light #commentInput,
    body.theme-light #episodeSelect,
    body.theme-light .nav-ep-btn[data-episode-id]:not([style*="var(--primary-color)"]),
    body.theme-light [data-action="scroll-top"],
    body.theme-light [data-action="share-episode"],
    body.theme-light .reader-bottom-series-btn {
      color: #0f172a !important;
    }
    body.theme-light .reader-top-strip a {
      color: #334155 !important;
    }
    body.theme-sepia .episode-header h1,
    body.theme-sepia .reader-comments h3,
    body.theme-sepia .comment-item,
    body.theme-sepia .comment-item strong,
    body.theme-sepia .author-note-box,
    body.theme-sepia #commentInput,
    body.theme-sepia #episodeSelect,
    body.theme-sepia .nav-ep-btn[data-episode-id]:not([style*="var(--primary-color)"]),
    body.theme-sepia [data-action="scroll-top"],
    body.theme-sepia [data-action="share-episode"],
    body.theme-sepia .reader-bottom-series-btn {
      color: #2c241b !important;
    }
    body.theme-sepia .reader-top-strip a {
      color: #4a3b2c !important;
    }
    @media (max-width: 640px) {
      .reader-container {
        padding: 1.25rem 1rem 5.5rem 1rem !important;
      }
      .reader-top-strip {
        flex-direction: column;
        align-items: stretch !important;
      }
      .reader-top-strip > div {
        width: 100%;
        justify-content: space-between;
      }
      #episodeSelect {
        flex: 1;
        max-width: 100% !important;
      }
    }
