    html {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      width: 100%;
      min-height: 100%;
      overflow-x: hidden;
    }

    *, *::before, *::after {
      box-sizing: inherit;
    }

    body {
      margin: 0;
      padding: 0;
      width: 100%;
      min-height: 100%;
      overflow-x: hidden;
      font-family: "Alegreya Sans SC", Arial, sans-serif;
      background-color: #0f0f0f;
      background-image: url("../../images/ViewerBackground.jpg");
      background-repeat: repeat;
      color: #f3f0df;
    }

    button, input, select, textarea {
      font-family: "Alegreya Sans SC", Arial, sans-serif;
    }

    body.page-loading #menu-bar,
    body.page-loading #page-content,
    body.page-loading #fixed-page-copyright {
      visibility: hidden;
    }

    #initial-loading-overlay {
      position: fixed;
      inset: 0;
      z-index: 5000;
      display: none;
      align-items: center;
      justify-content: center;
      background: rgba(0, 0, 0, 0.82);
      color: #f3f0df;
      text-align: center;
      pointer-events: none;
    }

    body.page-loading #initial-loading-overlay {
      display: flex;
    }

    .initial-loading-content {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.75rem;
      padding: 1.5rem 1.75rem;
      border-radius: 14px;
      background: rgba(0, 0, 0, 0.72);
      border: 1px solid rgba(255, 255, 247, 0.18);
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
      font-size: 1.1rem;
      font-weight: 700;
    }

    .initial-loading-spinner {
      display: block;
      width: 36px;
      height: 36px;
      object-fit: contain;
      user-select: none;
      -webkit-user-drag: none;
    }

    #initial-loading-progress-text {
      min-width: 13rem;
      font-size: 0.9rem;
      font-weight: 500;
      color: rgba(243, 240, 223, 0.88);
    }

    .initial-loading-progress-track {
      width: min(300px, 70vw);
      height: 10px;
      border-radius: 999px;
      overflow: hidden;
      background: rgba(255, 255, 255, 0.14);
      box-shadow: inset 0 0 0 1px rgba(255, 255, 247, 0.08);
    }

    .initial-loading-progress-bar {
      width: 0%;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, rgba(180, 141, 73, 0.88), rgba(243, 240, 223, 0.96));
      transition: width 0.18s ease;
    }

    body.layout-vertical {
      padding-top: 60px;
    }

    body.layout-wide {
      padding-right: 80px;
    }

    body.layout-vertical.menu-layout-wide.manual-vertical-mode {
      padding-right: 80px;
    }

    #menu-bar {
      position: fixed;
      background: rgba(0, 0, 0, 0.94);
      z-index: 1000;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      user-select: none;
      -webkit-user-select: none;
      --menu-button-scale: 0.75;
      --menu-content-scale: 1;
      overflow: hidden;
    }

    #menu-bar-inner {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      flex: 0 0 auto;
      transform: scale(var(--menu-content-scale, 1));
      transition: transform 0.12s ease-out;
      will-change: transform;
    }

    body.menu-layout-vertical #menu-bar {
      top: 0;
      left: 0;
      width: 100%;
      height: 60px;
      flex-direction: row;
    }

    body.menu-layout-vertical #menu-bar-inner {
      transform-origin: center center;
    }

    body.menu-layout-vertical #menu-bar {
      transform: translateY(var(--vertical-menu-offset, 0px));
      transition: transform 0.18s ease-out;
    }

    body.menu-layout-wide #menu-bar {
      top: 0;
      right: 0;
      width: 80px;
      height: 100vh;
      flex-direction: column;
      justify-content: flex-start;
      padding: 0.75rem 0.25rem;
    }

    body.menu-layout-wide #menu-bar-inner {
      flex-direction: column;
      width: 100%;
      transform-origin: center top;
    }

    body.menu-layout-wide .menu-item {
      flex-direction: column;
      gap: 0.5rem;
      width: 100%;
    }

    body.menu-layout-wide .menu-label {
      display: block;
    }


    #vertical-mode-menu-item {
      display: none;
    }

    body.menu-layout-wide #vertical-mode-menu-item {
      display: flex;
    }

    .menu-item {
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: default;
      user-select: none;
      -webkit-user-select: none;
    }

    .menu-item .menu-label,
    .menu-item .menu-button,
    .menu-item .menu-button img {
      pointer-events: none;
    }

    .menu-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: calc(50px * var(--menu-button-scale, 1));
      height: calc(50px * var(--menu-button-scale, 1));
      background: transparent;
      border: 0;
      padding: 0;
      cursor: pointer;
      flex: 0 0 auto;
    }

    .menu-button img {
      display: block;
      width: calc(50px * var(--menu-button-scale, 1));
      height: calc(50px * var(--menu-button-scale, 1));
    }

    .menu-button-text-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: calc(50px * var(--menu-button-scale, 1));
      min-height: calc(50px * var(--menu-button-scale, 1));
      padding: 0.35rem 0.5rem;
      border: 1px solid rgba(180, 141, 73, 0.8);
      border-radius: 10px;
      background: rgba(180, 141, 73, 0.12);
      color: #b48d49;
      font-size: calc(0.75rem * var(--menu-button-scale, 1));
      font-weight: 700;
      line-height: 1.05;
      text-align: center;
      letter-spacing: 0.02em;
      transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    }

    .menu-item:hover .menu-button-text-badge,
    .menu-item:focus-visible .menu-button-text-badge {
      background: rgba(255, 255, 247, 0.18);
      color: #fffff7;
      border-color: rgba(255, 255, 247, 0.88);
    }

    .menu-label {
      display: none;
      font-size: 0.8rem;
      line-height: 1;
      color: #b48d49;
      text-align: center;
      user-select: none;
	  margin-top: -5px;
      transition: color 0.15s ease;
    }

    .menu-item:hover .menu-label,
    .menu-item:focus-visible .menu-label {
      color: #fffff7;
    }

    .menu-item:focus {
      outline: none;
    }

    #page-content {
      width: 100%;
      max-width: 100%;
      overflow-x: hidden;
      padding: 0;
    }

    #comic-container {
      width: 100%;
    }

    .comic-stack {
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
      align-items: center;
      width: 100%;
    }

    .comic-spread {
      display: flex;
      gap: var(--wide-page-gap, 0.5rem);
      justify-content: center;
      align-items: flex-start;
      width: 100%;
    }

    .vertical-page-slot {
      width: 100%;
      display: flex;
      justify-content: center;
    }

    .vertical-page-slot .comic-page,
    .vertical-page-placeholder {
      width: min(
        100vw,
        calc((100vh - 60px) * var(--page-width-ratio, 0.6462)),
        var(--page-render-width, 960px)
      );
      max-width: 100vw;
      aspect-ratio: var(--page-aspect-ratio, 1920 / 2971);
    }

    body.layout-vertical.menu-layout-wide.manual-vertical-mode .vertical-page-slot .comic-page,
    body.layout-vertical.menu-layout-wide.manual-vertical-mode .vertical-page-placeholder {
      width: min(100%, calc(100vw - 80px));
      max-width: none;
    }

    .vertical-page-placeholder {
      visibility: hidden;
      pointer-events: none;
    }

    body.layout-wide #comic-container {
      position: relative;
      min-height: 100vh;
      overflow: hidden;
      --wide-page-gap: 1.3rem;
    }

    @supports (height: 100dvh) {
      body.layout-wide #comic-container {
        min-height: 100dvh;
      }
    }

    body.layout-wide .comic-spread {
      min-height: 100vh;
      align-items: center;
    }

    @supports (height: 100dvh) {
      body.layout-wide .comic-spread {
        min-height: 100dvh;
      }
    }

    .wide-stage {
      position: relative;
      width: 100%;
      min-height: 100vh;
      overflow: hidden;
      --wide-side-gap: 125px;
      --wide-active-page-width: auto;
    }

    .wide-stage .wide-fourup-strip {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: var(--wide-page-gap, 0.5rem);
      transition: transform 0.28s ease-out, opacity 0.24s ease-out;
      will-change: transform, opacity;
      opacity: 1;
    }

    .wide-stage .wide-fourup-strip.is-fading-out {
      opacity: 0.18;
    }

    .wide-stage .wide-fourup-strip.is-fading-in {
      opacity: 0.18;
    }

    .wide-stage .wide-fourup-page {
      width: var(--wide-active-page-width, auto);
      height: auto;
      flex: 0 0 auto;
    }

    .wide-stage .wide-fourup-page.is-side-page {
      width: var(--wide-peek-page-width, var(--wide-active-page-width, auto));
      opacity: 0.72;
      filter: brightness(0.82) contrast(0.9) blur(1.5px);
      transform-origin: center center;
    }

    .wide-stage .wide-fourup-page.is-left-side-page {
      margin-right: var(--wide-side-gap, 125px);
    }

    .wide-stage .wide-fourup-page.is-right-side-page {
      margin-left: var(--wide-side-gap, 125px);
    }

    .wide-stage::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 10;
      background:
        linear-gradient(
          to right,
          rgba(0, 0, 0, 0.72) 0,
          rgba(0, 0, 0, 0.42) 4.5rem,
          rgba(0, 0, 0, 0) 10rem,
          rgba(0, 0, 0, 0) calc(100% - 10rem),
          rgba(0, 0, 0, 0.42) calc(100% - 4.5rem),
          rgba(0, 0, 0, 0.72) 100%
        );
    }


    .wide-nav-arrow {
      position: absolute;
      top: calc(50% - 32px);
      z-index: 20;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 64px;
      height: 64px;
      padding: 0;
      border: 0;
      background: transparent;
      cursor: pointer;
      opacity: 0.72;
      transition: opacity 0.15s ease;
      user-select: none;
      -webkit-user-select: none;
    }

    .wide-nav-arrow:hover,
    .wide-nav-arrow:focus-visible {
      opacity: 1;
    }

    .wide-nav-arrow:focus-visible {
      outline: 2px solid rgba(255, 255, 247, 0.9);
      outline-offset: 4px;
    }

    .wide-nav-arrow.is-disabled {
      opacity: 0;
      pointer-events: none;
    }

    .wide-nav-arrow.left {
      left: 24px;
    }

    .wide-nav-arrow.right {
      right: 24px;
    }

    .wide-nav-arrow img {
      display: block;
      width: 64px;
      height: 64px;
      object-fit: contain;
      image-rendering: -webkit-optimize-contrast;
      image-rendering: crisp-edges;
      pointer-events: none;
      user-select: none;
      -webkit-user-drag: none;
    }

    .wide-stage .wide-fourup-page:not(.is-side-page) {
      position: relative;
      z-index: 2;
    }

    .wide-stage .wide-fourup-placeholder {
      width: var(--wide-peek-page-width, var(--wide-active-page-width, auto));
      height: auto;
      visibility: hidden;
      pointer-events: none;
      box-shadow: none;
      background: transparent;
      aspect-ratio: var(--page-aspect-ratio, 1920 / 2971);
    }

    .wide-stage .wide-fourup-placeholder.is-active-placeholder {
      width: var(--wide-active-page-width, auto);
      max-width: none;
      flex: 0 0 auto;
    }

    @supports (height: 100dvh) {
      .wide-stage {
        min-height: 100dvh;
      }
    }

    .wide-stage .comic-spread {
      position: absolute;
      inset: 0;
      padding: 0 1rem;
      transition: transform 0.24s ease, opacity 0.24s ease;
      will-change: transform, opacity;
    }
    .wide-stage .comic-spread.is-active {
      transform: translateX(0);
      opacity: 1;
      z-index: 2;
    }

    .wide-stage .comic-spread.is-entering-from-right {
      transform: translateX(100%);
      opacity: 1;
      z-index: 4;
    }

    .wide-stage .comic-spread.is-entering-from-left {
      transform: translateX(-100%);
      opacity: 1;
      z-index: 4;
    }

    .wide-stage .comic-spread.is-leaving-to-left {
      transform: translateX(-100%);
      opacity: 1;
      z-index: 1;
    }

    .wide-stage .comic-spread.is-leaving-to-right {
      transform: translateX(100%);
      opacity: 1;
      z-index: 1;
    }

    .comic-page {
      position: relative;
      width: min(100%, var(--page-render-width, 960px));
      aspect-ratio: var(--page-aspect-ratio, 1920 / 2971);
      background: #080808;
      overflow: visible;
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    }

    body.layout-vertical .comic-page {
      width: min(
        100vw,
        calc((100vh - 60px) * var(--page-width-ratio, 0.6462)),
        var(--page-render-width, 960px)
      );
      max-width: 100vw;
      max-height: calc(100vh - 60px);
    }

    body.layout-vertical.menu-layout-wide.manual-vertical-mode .comic-page {
      width: min(100%, calc(100vw - 80px));
      max-width: none;
      max-height: none;
    }

    body.layout-wide .comic-page {
      width: var(--wide-active-page-width, auto);
      height: auto;
      max-width: none;
      max-height: 100vh;
      flex: 0 0 auto;
    }

    @supports (height: 100dvh) {
      body.layout-wide .comic-page {
        max-height: 100dvh;
      }
    }

    .comic-page img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: contain;
      background: #000;
    }

    .page-art-stage {
      position: relative;
      width: 100%;
      height: 100%;
      overflow: hidden;
      background: #000;
    }

    .page-art-image {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: contain;
      background: #000;
      opacity: 0;
      transition: opacity 0.22s ease;
      pointer-events: auto;
      -webkit-user-drag: auto;
      user-select: auto;
      -webkit-user-select: auto;
    }

    .page-art-image.is-current {
      opacity: 1;
      z-index: 1;
    }

    .page-art-image.is-next {
      z-index: 2;
    }

    .page-art-stage.is-transitioning .page-art-image.is-current {
      opacity: 0;
    }

    .page-art-stage.is-transitioning .page-art-image.is-next {
      opacity: 1;
    }

    .page-art-loading-indicator {
      position: absolute;
      top: 50%;
      left: 50%;
      z-index: 4;
      display: none;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      transform: translate(-50%, -50%);
      pointer-events: none;
    }

    .page-art-stage.is-loading .page-art-loading-indicator {
      display: inline-flex;
    }

    .page-art-loading-indicator img {
      width: 32px;
      height: 32px;
      object-fit: contain;
      background: transparent;
      user-select: none;
      -webkit-user-drag: none;
    }

    .page-number-corner {
      position: absolute;
      top: 0;
      z-index: 6;
      pointer-events: none;
      user-select: none;
      -webkit-user-select: none;
      background: transparent !important;
      opacity: 0;
      transition: opacity 0.28s ease;
      --page-corner-scale: 0.35;
    }

    body.show-page-ornaments .page-number-corner {
      opacity: 1;
    }

    .page-number-corner.left {
      left: 0;
      top: 40px;
      transform: translate(-50%, -50%);
    }

    .page-number-corner.right {
      right: 0;
      top: 40px;
      transform: translate(50%, -50%);
    }

    body.layout-vertical .page-number-corner.left {
      left: 50%;
      top: 0;
      transform: translate(-50%, -50%);
    }

    .page-number-corner-inner {
      position: relative;
      width: 140px;
      height: 140px;
      transform: scale(var(--page-corner-scale));
      transform-origin: center center;
      pointer-events: none;
      user-select: none;
      background: transparent !important;
    }

    .page-number-corner img {
      display: block;
      width: 140px;
      height: auto;
      pointer-events: none;
      user-select: none;
      -webkit-user-drag: none;
      background: transparent !important;
    }

    .page-number-label {
      position: absolute;
      font-size: 3rem;
      line-height: 1;
      color: #f7f3e3;
      text-shadow:
        0 1px 1px rgba(0, 0, 0, 0.95),
        0 0 6px rgba(0, 0, 0, 0.85);
      font-weight: 700;
      min-width: 2ch;
      pointer-events: none;
      user-select: none;
      background: transparent !important;
      width: 24px;
    }

    .page-number-corner.left .page-number-label {
      left: 46px;
      top: 43px;
      text-align: center;
    }

    .page-number-corner.right .page-number-label {
      left: 46px;
      top: 43px;
      text-align: center;
    }

    .comic-page-overlay {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1.5rem;
    }

    .hidden-page-content {
      width: 100%;
      height: 100%;
      background: #000;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 2rem;
    }

    .hidden-page-content .overlay-panel {
      background: transparent;
      border: 1px solid rgba(255, 255, 255, 0.25);
      max-width: 80%;
    }

    .overlay-panel {
      width: min(560px, 80%);
      background: rgba(0, 0, 0, 0.82);
      color: #fff;
      border-radius: 14px;
      padding: 1.25rem 1.5rem;
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
      text-align: center;
    }

    .overlay-panel p {
      margin: 0 0 1rem 0;
      line-height: 1.45;
    }

    .overlay-panel .warning-lines {
      margin: 0 auto 1rem auto;
      text-align: center;
      font-size: 1.1rem;
      line-height: 1.5;
    }

    .overlay-panel .warning-line + .warning-line {
      margin-top: 0.25rem;
    }

    .show-page-button {
      display: block;
      width: fit-content;
      margin: 0 auto 1rem auto;
      padding: 0.9rem 1.75rem;
      border: 0;
      border-radius: 10px;
      background: #b48d49;
      color: #111;
      font-size: 1.1rem;
      font-weight: bold;
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease;
      clear: both;
    }

    .show-page-button:hover,
    .show-page-button:focus-visible {
      background: #fffff7;
      color: #111;
    }

    .sensitive-content-link {
      display: inline-block;
      border: 0;
      background: transparent;
      color: #b48d49;
      text-decoration: none;
      font: inherit;
      padding: 0;
      cursor: pointer;
      text-align: center;
      transition: color 0.15s ease;
    }

    .sensitive-content-link:hover,
    .sensitive-content-link:focus-visible {
      color: #fffff7;
    }

    .hidden-page-content .sensitive-content-link {
      color: #b48d49;
    }

    .hidden-page-content .sensitive-content-link:hover,
    .hidden-page-content .sensitive-content-link:focus-visible {
      color: #fffff7;
    }


    .inline-link-button {
      border: 0;
      background: transparent;
      color: #b48d49;
      text-decoration: none;
      font: inherit;
      padding: 0;
      cursor: pointer;
      transition: color 0.15s ease;
    }

    .inline-link-button:hover,
    .inline-link-button:focus-visible {
      color: #fffff7;
    }

    #supporter-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.78);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 2100;
      padding: 1rem;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }

    #supporter-modal-overlay.open {
      display: flex;
    }

    #supporter-login-modal {
      width: min(680px, 100%);
      max-width: 100%;
      max-height: calc(100vh - 2rem);
      max-height: calc(100dvh - 2rem);
      overflow-y: auto;
      background: #111;
      color: #f3f0df;
      border: 1px solid rgba(255, 255, 247, 0.2);
      border-radius: 12px;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
      padding: 1.5rem;
      margin: auto;
      text-align: center;
    }

    #supporter-login-modal h2 {
      margin-top: 0;
      margin-bottom: 0.75rem;
    }

    #supporter-login-modal p {
      margin: 0 0 1rem 0;
      line-height: 1.5;
    }

    .supporter-modal-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: 0.75rem;
      margin-top: 1.25rem;
    }

    .supporter-action-button {
      display: inline-block;
      min-width: 180px;
      padding: 0.95rem 1.25rem;
      border: 0;
      border-radius: 10px;
      background: #b48d49;
      color: #111;
      font: inherit;
      font-size: 1.05rem;
      font-weight: bold;
      text-decoration: none;
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
    }

    .supporter-action-button:hover,
    .supporter-action-button:focus-visible {
      background: #fffff7;
      color: #111;
    }

    .supporter-action-button.secondary {
      background: rgba(255, 255, 255, 0.08);
      color: #f3f0df;
      border: 1px solid rgba(255, 255, 247, 0.18);
    }

    .supporter-action-button.secondary:hover,
    .supporter-action-button.secondary:focus-visible {
      background: rgba(255, 255, 255, 0.16);
      color: #fffff7;
    }

    .supporter-status-panel {
      margin: 1rem auto 0 auto;
      max-width: 32rem;
      padding: 1rem 1.1rem;
      border-radius: 10px;
      border: 1px solid rgba(255, 255, 247, 0.14);
      background: rgba(255, 255, 255, 0.04);
      text-align: left;
    }

    .supporter-status-row + .supporter-status-row {
      margin-top: 0.4rem;
    }
	
	.supporter-status-row {
      text-align: center;
	}

    #supporter-modal-message {
      margin-top: 1rem;
      min-height: 1.2em;
      color: #ff8f8f;
      font-weight: bold;
    }

    #supporter-modal-message.is-success {
      color: #7fe08f;
    }

    #supporter-modal-message.is-error {
      color: #ff8f8f;
    }

    .error {
      color: #ff8f8f;
      white-space: pre-wrap;
    }

    #modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.7);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 2000;
      padding: 1rem;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }

    #modal-overlay.open {
      display: flex;
    }

    #content-warning-modal {
      width: min(760px, 100%);
      max-width: 100%;
      max-height: calc(100vh - 2rem);
      max-height: calc(100dvh - 2rem);
      overflow-y: auto;
      background: #111;
      color: #f3f0df;
      border: 1px solid rgba(255, 255, 247, 0.2);
      border-radius: 12px;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
      padding: 1.5rem;
      margin: auto;
      text-align: center;
    }

    #modal-logo {
      display: block;
      width: min(320px, 100%);
      max-width: 100%;
      margin: 0 auto 1rem auto;
    }

    #content-warning-modal h2 {
      margin-top: 0;
      margin-bottom: 1rem;
    }

    #content-warning-modal p {
      margin: 0 0 1rem 0;
    }

    .simple-setting {
      margin: 1rem 0 1.25rem 0;
      text-align: center;
    }

    .warning-setting {
      margin: 1rem 0 1.25rem 0;
      min-width: 0;
      width: 100%;
      text-align: center;
    }

    .warning-label {
      font-weight: bold;
      margin-bottom: 0.5rem;
      color: #fffff7;
    }

    .tri-state-toggle {
      display: inline-grid;
      grid-template-columns: repeat(3, 1fr);
      border: 1px solid #56503d;
      border-radius: 999px;
      overflow: hidden;
      background: #2a2418;
      min-width: 280px;
      max-width: 100%;
      margin: 0 auto;
    }

    .tri-state-option {
      position: relative;
      margin: 0;
    }

    .tri-state-option input[type="radio"] {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }

    .tri-state-option label {
      display: block;
      padding: 0.65rem 1rem;
      text-align: center;
      cursor: pointer;
      user-select: none;
      font-weight: bold;
      background: #2a2418;
      color: #f3f0df;
      transition: background 0.15s ease, color 0.15s ease;
    }

    .tri-state-option input[type="radio"]:checked + label {
      background: #b48d49;
      color: #111;
    }

    #advanced-settings-toggle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      margin-top: 0.5rem;
      margin-bottom: 0.75rem;
      padding: 0;
      border: 0;
      background: transparent;
      color: #b48d49;
      font: inherit;
      font-weight: bold;
      cursor: pointer;
    }

    #advanced-settings-toggle:hover,
    #advanced-settings-toggle:focus {
      text-decoration: none;
    }

    #advanced-settings-indicator {
      display: inline-block;
      width: 1.1em;
      text-align: center;
    }

    #advanced-settings-panel {
      display: none;
      border-top: 1px solid rgba(255, 255, 247, 0.18);
      margin-top: 0.5rem;
      padding-top: 1rem;
    }

    #advanced-settings-panel.open {
      display: block;
    }

    #warning-settings-container {
      display: grid;
      grid-template-columns: 1fr;
      gap: 0 1.5rem;
      justify-items: center;
    }

    body.layout-wide #warning-settings-container {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      align-items: start;
    }

    #adult-confirm-container {
      margin-top: 1.5rem;
      padding: 1rem;
      border: 1px solid rgba(255, 255, 247, 0.18);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.04);
      cursor: pointer;
      transition: background 0.15s ease, border-color 0.15s ease;
    }

    #adult-confirm-container:hover,
    #adult-confirm-container:focus-within {
      background: rgba(255, 255, 255, 0.07);
      border-color: rgba(180, 141, 73, 0.6);
    }

    #adult-confirm-label {
      display: flex;
      align-items: flex-start;
      justify-content: center;
      gap: 0.6rem;
      cursor: pointer;
      line-height: 1.4;
      text-align: left;
      max-width: 34rem;
      width: 100%;
      margin: 0 auto;
      user-select: none;
      -webkit-user-select: none;
    }

    #adult-confirm-checkbox {
      margin-top: 0.15rem;
      flex: 0 0 auto;
      accent-color: #b48d49;
      cursor: pointer;
    }

    #modal-message {
      margin-top: 0.75rem;
      min-height: 1.2em;
      color: #ff8f8f;
      font-weight: bold;
    }

    #confirm-content-warning {
      display: block;
      width: 100%;
      margin-top: 1.5rem;
      padding: 1rem 1.25rem;
      border: 0;
      border-radius: 10px;
      background: #b48d49;
      color: #111;
      font-size: 1.1rem;
      font-weight: bold;
      cursor: pointer;
    }

    #confirm-content-warning:hover,
    #confirm-content-warning:focus-visible {
      background: #fffff7;
      color: #111;
    }

    #confirm-content-warning:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    #resume-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.78);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 2200;
      padding: 1rem;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }

    #resume-modal-overlay.open {
      display: flex;
    }

    #resume-reading-modal {
      width: min(640px, 100%);
      max-width: 100%;
      background: #111;
      color: #f3f0df;
      border: 1px solid rgba(255, 255, 247, 0.2);
      border-radius: 12px;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
      padding: 1.5rem;
      margin: auto;
      text-align: center;
    }

    #resume-reading-modal h2 {
      margin-top: 0;
      margin-bottom: 0.75rem;
    }

    #resume-reading-modal p {
      margin: 0 0 1rem 0;
      line-height: 1.5;
    }

    .resume-modal-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: 0.75rem;
      margin-top: 1.25rem;
    }

    .resume-page-button {
		display: inline-flex;
		align-items: center;
		justify-content: flex-start;
		gap: 0.45rem;
		min-width: 180px;
		padding: 0.85rem 0.95rem;
		border: 0;
		border-radius: 10px;
		background: #b48d49;
		color: #111;
		font: inherit;
		font-size: 1.15rem;
		font-weight: bold;
		text-decoration: none;
		text-align: center;
		cursor: pointer;
		transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
    }

    .resume-page-button-icon {
      display: block;
      width: 36px;
      height: 36px;
      flex: 0 0 36px;
      object-fit: contain;
      pointer-events: none;
      user-select: none;
      -webkit-user-drag: none;
    }

    .resume-page-button-text {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      line-height: 0.95;
    }

    .resume-page-button-primary-label {
      display: block;
    }

    .resume-page-button-secondary-label {
      display: block;
      margin-top: 0.18rem;
      font-size: 0.68em;
      line-height: 1.1;
    }

    .resume-page-button:hover,
    .resume-page-button:focus-visible {
      background: #fffff7;
      color: #111;
    }

    .resume-page-button.secondary {
      background: rgba(255, 255, 255, 0.08);
      color: #f3f0df;
      border: 1px solid rgba(255, 255, 247, 0.18);
    }

    .resume-page-button.secondary:hover,
    .resume-page-button.secondary:focus-visible {
      background: rgba(255, 255, 255, 0.16);
      color: #fffff7;
    }


    #comic-container.is-auxiliary-view {
      padding: 1rem;
    }

    #comic-container.is-map-view {
      padding: 0;
    }

    .aux-placeholder-copy {
      max-width: 44rem;
      margin: 0 auto;
      padding: 1.25rem;
      border: 1px solid rgba(255,255,247,0.14);
      border-radius: 12px;
      background: rgba(255,255,255,0.04);
      text-align: center;
      line-height: 1.6;
    }

    .aux-placeholder-copy p:last-child {
      margin-bottom: 0;
    }

    .toc-view {
      width: 100%;
      max-width: 1600px;
      margin: 0 auto;
      padding: 0.5rem 0 2rem 0;
    }

    .toc-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      margin-bottom: 1.5rem;
      flex-wrap: wrap;
    }

    .toc-title {
      margin: 0;
      font-size: 2rem;
      color: #fffff7;
    }

    .aux-close-button,
    .bookmark-add-button,
    .bookmark-save-button,
    .bookmark-cancel-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0.8rem 1rem;
      border: 0;
      border-radius: 10px;
      background: #b48d49;
      color: #111;
      font: inherit;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease;
    }

    .aux-close-button:hover,
    .aux-close-button:focus-visible,
    .bookmark-add-button:hover,
    .bookmark-add-button:focus-visible,
    .bookmark-save-button:hover,
    .bookmark-save-button:focus-visible,
    .bookmark-cancel-button:hover,
    .bookmark-cancel-button:focus-visible {
      background: #fffff7;
      color: #111;
    }

    .bookmark-cancel-button {
      background: rgba(255,255,255,0.08);
      color: #f3f0df;
      border: 1px solid rgba(255,255,247,0.18);
    }

    .toc-chapter + .toc-chapter {
      margin-top: 2rem;
    }

    .toc-chapter-title {
      margin: 0 0 0.9rem 0;
      color: #fffff7;
      font-size: 1.5rem;
      border-bottom: 1px solid rgba(255,255,247,0.15);
      padding-bottom: 0.35rem;
    }

    .toc-empty {
      color: rgba(243,240,223,0.82);
      font-size: 1.05rem;
      padding: 0.4rem 0 0.8rem 0;
    }

    .toc-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, 120px);
      gap: 1rem;
      justify-content: center;
    }

    .toc-thumb-button {
      position: relative;
      display: block;
      width: 120px;
      border: 1px solid rgba(255,255,247,0.14);
      border-radius: 12px;
      padding: 0;
      overflow: visible;
      background: rgba(0,0,0,0.45);
      cursor: pointer;
      transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
      text-align: left;
    }

    .toc-thumb-button:hover,
    .toc-thumb-button:focus-visible {
      transform: translateY(-2px);
      border-color: rgba(180,141,73,0.8);
      box-shadow: 0 10px 22px rgba(0,0,0,0.28);
      z-index: 5;
    }

    .toc-thumb-button img {
      display: block;
      width: 120px;
      height: 186px;
      object-fit: cover;
      background: #000;
    }

    .toc-thumb-image-wrapper {
      position: relative;
      width: 120px;
      height: 186px;
      overflow: hidden;
      background: #000;
    }

    .toc-thumb-image-wrapper.is-sensitive .toc-thumb-thumbnail-image {
      filter: blur(10px);
      transform: scale(1.04);
    }

    .toc-thumb-image-wrapper.is-supporter-locked .toc-thumb-thumbnail-image {
      filter: blur(10px);
      transform: scale(1.04);
    }

    .toc-supporter-indicator {
      position: absolute;
      right: 0.4rem;
      bottom: 0.4rem;
      padding: 0.2rem 0.4rem;
      border-radius: 999px;
      background: rgba(0, 0, 0, 0.78);
      border: 1px solid rgba(180, 141, 73, 0.7);
      color: #b48d49;
      font-size: 0.68rem;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      pointer-events: none;
      user-select: none;
    }

    .toc-sensitive-indicator {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 64px !important;
      height: 64px !important;
	  background: none !important;
      transform: translate(-50%, -50%);
      pointer-events: none;
      user-select: none;
      -webkit-user-drag: none;
    }

    .toc-thumb-page-number {
      position: absolute;
      top: 0.5rem;
      left: 0.5rem;
      font-size: 1rem;
      font-weight: 700;
      color: #fff;
      -webkit-text-stroke: 1.5px #000;
      paint-order: stroke fill;
      text-shadow: 0 0 4px rgba(0,0,0,0.95);
      letter-spacing: 0.02em;
      pointer-events: none;
    }

    .toc-thumb-label {
      padding: 0.65rem 0.75rem 0.8rem 0.75rem;
      color: #f3f0df;
      font-size: 0.95rem;
    }

    .toc-thumb-tooltip {
      position: absolute;
      left: 50%;
      bottom: calc(100% + 0.7rem);
      transform: translateX(-50%) translateY(4px);
      min-width: 170px;
      max-width: min(260px, calc(100vw - 2rem));
      padding: 0.55rem 0.7rem;
      border: 1px solid rgba(180, 141, 73, 0.78);
      border-radius: 12px;
      background: rgba(12, 10, 8, 0.96);
      color: #f7f2df;
      font-size: 0.86rem;
      line-height: 1.3;
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.1s ease, transform 0.1s ease;
      white-space: normal;
      z-index: 4;
    }

    .toc-thumb-tooltip::after {
      content: "";
      position: absolute;
      left: 50%;
      top: 100%;
      width: 10px;
      height: 10px;
      background: rgba(12, 10, 8, 0.96);
      border-right: 1px solid rgba(180, 141, 73, 0.78);
      border-bottom: 1px solid rgba(180, 141, 73, 0.78);
      transform: translate(-50%, -50%) rotate(45deg);
    }

    .toc-thumb-button:hover .toc-thumb-tooltip,
    .toc-thumb-button:focus-visible .toc-thumb-tooltip,
    .toc-thumb-button:focus-within .toc-thumb-tooltip {
      opacity: 1;
      transform: translateX(-50%) translateY(0);
    }

    .glossary-view {
      width: 100%;
      max-width: 1600px;
      margin: 0 auto;
      padding: 0.5rem 0 2rem 0;
    }

    .glossary-list {
      display: flex;
      flex-direction: column;
      gap: 0.9rem;
    }

    .glossary-entry {
      width: min(100%, 420px);
      max-width: 420px;
      margin: 0 auto;
      padding: 0.85rem 0.95rem;
      border: 1px solid rgba(255,255,247,0.14);
      border-radius: 12px;
      background: rgba(255,255,255,0.04);
      box-shadow: 0 8px 24px rgba(0,0,0,0.18);
      transition: border-color 0.15s ease, background 0.15s ease;
      cursor: default;
    }

    .glossary-entry:hover,
    .glossary-entry:focus-within {
      border-color: rgba(255,255,247,0.34);
    }

    .glossary-entry.is-open {
      border-color: rgba(180,141,73,0.6);
      background: rgba(180,141,73,0.08);
    }

    .glossary-entry.is-open:hover,
    .glossary-entry.is-open:focus-within {
      border-color: rgba(180,141,73,0.78);
    }

    .glossary-term-button {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      width: 100%;
      padding: 0;
      border: 0;
      background: transparent;
      color: #f3f0df;
      font: inherit;
      font-size: 1.1rem;
      font-weight: 700;
      text-align: left;
      cursor: pointer;
    }

    .glossary-term-button:hover,
    .glossary-term-button:focus-visible {
      color: #fffff7;
      text-decoration: underline;
      text-decoration-thickness: 1px;
      text-underline-offset: 0.12em;
    }

    .glossary-term-icon {
      width: 16px;
      height: 16px;
      flex: 0 0 16px;
      object-fit: contain;
      user-select: none;
      -webkit-user-drag: none;
    }

    .glossary-term-name {
      flex: 1 1 auto;
    }

    .glossary-term-chevron {
      flex: 0 0 auto;
      color: #b48d49;
      font-size: 0.9rem;
    }

    .glossary-definition-panel {
      margin-top: 0.85rem;
      padding-top: 0.85rem;
      border-top: 1px solid rgba(255,255,247,0.12);
    }

    .glossary-definition-nav {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      margin-top: 0.85rem;
      flex-wrap: nowrap;
    }

    .glossary-nav-button {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.18rem;
      min-width: 0;
      min-height: 38px;
      padding: 0.45rem 0.6rem;
      border: 1px solid rgba(255,255,247,0.16);
      border-radius: 10px;
      background: rgba(255,255,255,0.06);
      color: #f3f0df;
      font: inherit;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
      flex: 0 0 auto;
    }

    .glossary-nav-button:hover,
    .glossary-nav-button:focus-visible {
      background: rgba(255,255,255,0.14);
      color: #fffff7;
      border-color: rgba(180,141,73,0.7);
    }

    .glossary-nav-button.is-disabled {
      opacity: 0.35;
      cursor: default;
      pointer-events: none;
    }

    .glossary-nav-button .glossary-nav-label {
      white-space: nowrap;
    }

    .glossary-nav-button .glossary-spoiler-badge {
      position: absolute;
      top: 4px;
      right: 4px;
      width: 8px;
      height: 8px;
      object-fit: contain;
      pointer-events: none;
    }

    .glossary-nav-tooltip {
      position: absolute;
      right: 0;
      bottom: calc(100% + 6px);
      display: none;
      padding: 0.35rem 0.5rem;
      border-radius: 8px;
      background: black;
      color: #fffff7;
      font-size: 0.72rem;
      line-height: 1.15;
      white-space: nowrap;
      box-shadow: none;
      text-shadow: 0 1px 3px rgba(0,0,0,0.9);
      z-index: 2;
      pointer-events: none;
    }

    .glossary-nav-button.is-spoiler:hover .glossary-nav-tooltip,
    .glossary-nav-button.is-spoiler:focus-visible .glossary-nav-tooltip {
      display: block;
    }

    .glossary-definition-page {
      font-size: 0.95rem;
      font-weight: 700;
      color: #b48d49;
      text-align: center;
      white-space: nowrap;
      flex: 1 1 auto;
      min-width: 0;
    }

    .glossary-definition-text {
      line-height: 1.55;
      white-space: pre-wrap;
      color: #f3f0df;
    }

    .glossary-inline-link {
      border: 0;
      background: transparent;
      color: #b48d49;
      font: inherit;
      font-weight: 700;
      padding: 0;
      cursor: pointer;
      text-decoration: underline;
      text-underline-offset: 0.12em;
    }

    .glossary-inline-link:hover,
    .glossary-inline-link:focus-visible {
      color: #fffff7;
    }

    @media (max-width: 700px) {
      .glossary-definition-nav {
        gap: 0.4rem;
      }

      .glossary-definition-page {
        font-size: 0.88rem;
      }

      .glossary-nav-button {
        padding: 0.4rem 0.5rem;
        font-size: 0.92rem;
      }
    }

    .glossary-term-image-wrap {
      margin: 0 0 0.95rem 0;
      text-align: center;
    }

    .glossary-term-image {
      display: block;
      width: min(100%, 420px);
      max-width: 100%;
      height: auto;
      margin: 0 auto;
      border-radius: 12px;
      border: 1px solid rgba(255,255,247,0.14);
      background: rgba(0,0,0,0.38);
      box-shadow: 0 8px 24px rgba(0,0,0,0.22);
    }

    .glossary-bts-section {
      margin-top: 1rem;
      padding-top: 0.85rem;
      border-top: 1px solid rgba(255,255,247,0.1);
    }

    .glossary-bts-heading {
      margin: 0 0 0.65rem 0;
      color: #fffff7;
      font-size: 1rem;
      font-weight: 700;
    }

    .glossary-bts-list {
      display: flex;
      flex-direction: column;
      gap: 0.45rem;
    }

    .glossary-bts-link {
      position: relative;
      display: inline-flex;
      align-items: center;
      justify-content: flex-start;
      gap: 0.45rem;
      width: fit-content;
      max-width: 100%;
      padding: 0.2rem 0;
      border: 0;
      background: transparent;
      color: #b48d49;
      font: inherit;
      font-weight: 700;
      text-align: left;
      cursor: pointer;
      text-decoration: underline;
      text-underline-offset: 0.12em;
    }

    .glossary-bts-link:hover,
    .glossary-bts-link:focus-visible {
      color: #fffff7;
    }

    .glossary-bts-link .glossary-spoiler-badge {
      position: static;
      width: 10px;
      height: 10px;
      flex: 0 0 10px;
      object-fit: contain;
      pointer-events: none;
    }

    .glossary-bts-link .glossary-nav-tooltip {
      right: auto;
      left: 0;
      bottom: calc(100% + 4px);
    }

    .glossary-bts-link.is-spoiler:hover .glossary-nav-tooltip,
    .glossary-bts-link.is-spoiler:focus-visible .glossary-nav-tooltip {
      display: block;
    }

    .glossary-bts-modal {
      width: 100%;
      height: 100%;
      max-width: none;
      max-height: none;
      padding: 1.25rem 1.5rem 1.5rem 1.5rem;
      background: transparent;
      border: 0;
      border-radius: 0;
      box-shadow: none;
      text-align: left;
      display: flex;
      flex-direction: column;
    }

    .glossary-bts-modal-header {
      position: relative;
      display: flex;
      align-items: flex-start;
      justify-content: center;
      gap: 0.75rem;
      margin-bottom: 0.85rem;
      padding-right: 5rem;
      flex: 0 0 auto;
    }

    .glossary-bts-modal-title-wrap {
      min-width: 0;
      text-align: center;
    }

    .glossary-bts-modal-title {
      margin: 0;
      color: #fffff7;
      font-size: 1.4rem;
    }

    .glossary-bts-modal-subtitle {
      margin-top: 0.2rem;
      color: #b48d49;
      font-size: 0.98rem;
      font-weight: 700;
      word-break: break-word;
    }

    .glossary-bts-close {
      position: absolute;
      top: 0;
      right: 0;
      min-width: 0;
      width: auto;
      padding: 0.7rem 0.95rem;
      flex: 0 0 auto;
    }

    .glossary-bts-browser {
      flex: 1 1 auto;
      min-height: 0;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      gap: 0.95rem;
    }

    .glossary-bts-stage {
      width: 100%;
      min-height: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0.95rem;
    }

    .glossary-bts-image-frame {
      position: relative;
      width: min(100%, 1500px);
      min-height: 0;
      flex: 1 1 auto;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 5.5rem;
      overflow: hidden;
    }

    .glossary-bts-image-stage {
      position: relative;
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
    }

    .glossary-bts-main-image {
      display: block;
      max-width: 100%;
      max-height: calc(100vh - 250px);
      max-height: calc(100dvh - 250px);
      width: auto;
      height: auto;
      margin: 0 auto;
      background: rgba(0,0,0,0.38);
      cursor: default;
    }

    .glossary-bts-main-image.is-openable {
      cursor: pointer;
    }

    .glossary-bts-main-image.is-blurred {
      filter: blur(16px);
      transform: scale(1.02);
    }

    .glossary-bts-nav-button {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      z-index: 2;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 64px;
      height: 64px;
      padding: 0;
      border: 1px solid rgba(255,255,247,0.15);
      border-radius: 999px;
      background: rgba(0,0,0,0.55);
      color: #fffff7;
      font: inherit;
      font-size: 1.9rem;
      line-height: 1;
      cursor: pointer;
      transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
    }

    .glossary-bts-nav-button:hover,
    .glossary-bts-nav-button:focus-visible {
      background: rgba(180,141,73,0.22);
      border-color: rgba(180,141,73,0.7);
    }

    .glossary-bts-nav-button.is-disabled {
      opacity: 0.3;
      pointer-events: none;
    }

    .glossary-bts-nav-button.prev {
      left: 0.75rem;
    }

    .glossary-bts-nav-button.next {
      right: 0.75rem;
    }

    .glossary-bts-nav-button .glossary-spoiler-badge {
      position: absolute;
      top: 7px;
      right: 7px;
      width: 10px;
      height: 10px;
    }

    .glossary-bts-nav-button .glossary-nav-tooltip {
      right: 0.25rem;
      bottom: calc(100% + 8px);
    }

    .glossary-bts-nav-button.is-spoiler:hover .glossary-nav-tooltip,
    .glossary-bts-nav-button.is-spoiler:focus-visible .glossary-nav-tooltip {
      display: block;
    }

    .glossary-bts-caption {
      width: min(100%, 920px);
      padding: 0.95rem 1rem;
      border-radius: 12px;
      border: 1px solid rgba(255,255,247,0.1);
      background: rgba(255,255,255,0.04);
      color: #f3f0df;
      white-space: pre-wrap;
      line-height: 1.55;
      text-align: center;
    }

    .glossary-bts-caption.is-muted {
      color: rgba(243,240,223,0.78);
      font-style: italic;
    }

    .glossary-bts-caption .show-page-button,
    .glossary-bts-caption .sensitive-content-link {
      margin-top: 0.75rem;
    }

    @media (max-width: 900px) {
      .glossary-bts-modal {
        padding: 1rem;
      }

      .glossary-bts-modal-header {
        padding-right: 0;
        padding-top: 3rem;
      }

      .glossary-bts-close {
        top: 0;
        right: 0;
      }

      .glossary-bts-image-frame {
        padding: 0 3.75rem;
      }

      .glossary-bts-nav-button {
        width: 52px;
        height: 52px;
        font-size: 1.55rem;
      }

      .glossary-bts-nav-button.prev {
        left: 0.2rem;
      }

      .glossary-bts-nav-button.next {
        right: 0.2rem;
      }

      .glossary-bts-main-image {
        max-height: calc(100vh - 290px);
        max-height: calc(100dvh - 290px);
      }
    }

    .dialog-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.78);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 2250;
      padding: 1rem;
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
    }

    .dialog-overlay.open {
      display: flex;
    }

    .dialog-modal {
      width: min(720px, 100%);
      max-width: 100%;
      max-height: calc(100vh - 2rem);
      max-height: calc(100dvh - 2rem);
      overflow-y: auto;
      background: #111;
      color: #f3f0df;
      border: 1px solid rgba(255, 255, 247, 0.2);
      border-radius: 12px;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
      padding: 1.5rem;
      margin: auto;
      text-align: center;
    }

    .dialog-modal h2 {
      margin: 0 0 0.75rem 0;
    }

    .dialog-modal p {
      margin: 0 0 1rem 0;
      line-height: 1.45;
    }


    .music-choice-modal {
      width: min(420px, 100%);
    }

    .music-choice-page-overlay {
      z-index: 9;
      display: none;
      background: rgba(0, 0, 0, 0.18);
    }

    .music-choice-page-overlay.open {
      display: flex;
    }

    .music-choice-autoprompt-toggle {
      display: flex;
      align-items: flex-start;
      gap: 0.7rem;
      margin: 0.25rem 0 1rem 0;
      text-align: left;
      font-size: 0.98rem;
      line-height: 1.35;
    }

    .music-choice-autoprompt-checkbox {
      margin-top: 0.2rem;
      flex: 0 0 auto;
    }

    .music-choice-modal-actions .bookmark-cancel-button {
      margin: 0 auto;
    }

    .music-choice-modal-actions,
    .music-choice-actions {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      margin-top: 1rem;
    }

    .music-player-shell {
      position: fixed;
      top: 12px;
      left: 12px;
      width: 200px;
      background: rgba(10, 10, 10, 0.96);
      border: 1px solid rgba(255, 255, 247, 0.18);
      border-radius: 10px;
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
      overflow: hidden;
      z-index: 2400;
    }

    .music-player-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      padding: 0.35rem 0.45rem;
      background: rgba(0, 0, 0, 0.45);
      color: #f3f0df;
      font-size: 0.8rem;
      line-height: 1.2;
    }

    .music-player-title {
      font-weight: 700;
      flex: 1 1 auto;
      min-width: 0;
    }

    .music-player-toolbar-actions {
      display: flex;
      align-items: center;
      gap: 0.35rem;
    }

    .music-player-toolbar-button {
      color: #f3f0df;
      background: transparent;
      border: 0;
      cursor: pointer;
      padding: 0.15rem 0.3rem;
      font-size: 1rem;
      line-height: 1;
      flex: 0 0 auto;
    }

    .music-player-minimize-button {
      font-size: 0.95rem;
      transform: translateY(-1px);
    }

    #music-player-frame {
      width: 200px;
      height: 200px;
      background: #000;
      overflow: hidden;
    }

    .music-player-shell.is-minimized {
      width: auto;
      min-width: 0;
      overflow: visible;
    }

    .music-player-shell.is-minimized .music-player-title {
      white-space: nowrap;
    }

    .music-player-shell.is-minimized #music-player-frame,
    .music-player-shell.is-minimized .music-player-volume-controls {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      border: 0;
      overflow: hidden;
      clip: rect(0 0 0 0);
      clip-path: inset(50%);
      white-space: nowrap;
    }

    .music-player-volume-controls {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      padding: 0.45rem 0.55rem 0.55rem;
      background: rgba(255, 255, 255, 0.04);
      color: #f3f0df;
    }

    .music-player-volume-icon {
      display: block;
      width: 16px;
      height: 16px;
      flex: 0 0 16px;
      object-fit: contain;
      opacity: 0.9;
    }

    .music-player-volume-slider {
      flex: 1 1 auto;
      min-width: 0;
      cursor: pointer;
    }

    .music-player-volume-label {
      flex: 0 0 auto;
      min-width: 2.7rem;
      text-align: right;
      font-size: 0.78rem;
      line-height: 1;
      color: rgba(243, 240, 223, 0.9);
    }

    .bookmark-modal-actions {
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      margin-top: 1rem;
    }

    .bookmark-modal-toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      margin-top: 1.25rem;
      flex-wrap: wrap;
    }

    .bookmark-modal-toolbar-left,
    .bookmark-modal-toolbar-right {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      flex-wrap: wrap;
    }

    .bookmark-modal-toolbar-right {
      margin-left: auto;
      justify-content: flex-end;
    }

    .bookmark-page-row {
      display: flex;
      align-items: stretch;
      gap: 0.5rem;
    }

    .bookmark-page-button {
      width: 100%;
      min-width: 0;
      display: inline-flex;
      align-items: center;
      justify-content: flex-start;
      gap: 0.7rem;
      padding: 0.85rem 0.95rem;
      border: 0;
      border-radius: 10px;
      background: #b48d49;
      color: #111;
      font: inherit;
      font-size: 1.05rem;
      font-weight: bold;
      text-align: left;
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease;
    }

    .bookmark-page-button:hover,
    .bookmark-page-button:focus-visible {
      background: #fffff7;
      color: #111;
    }

    .bookmark-page-button.secondary {
      background: rgba(255,255,255,0.08);
      color: #f3f0df;
      border: 1px solid rgba(255,255,247,0.18);
    }

    .bookmark-page-button.referral-option {
      background: #5783c5;
      color: #fff;
    }

    .bookmark-page-button.referral-option:hover,
    .bookmark-page-button.referral-option:focus-visible {
      background: #6991cf;
      color: #fff;
    }

    .bookmark-page-button-text {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      min-width: 0;
    }

    .bookmark-page-button-primary {
      display: block;
    }

    .bookmark-page-button-secondary {
      display: block;
      margin-top: 0.18rem;
      font-size: 0.72em;
      line-height: 1.2;
      white-space: normal;
      opacity: 0.9;
    }

    .bookmark-remove-button {
      flex: 0 0 auto;
      align-self: stretch;
      padding: 0 0.9rem;
      border: 1px solid rgba(255,255,247,0.18);
      border-radius: 10px;
      background: rgba(255,255,255,0.08);
      color: #f3f0df;
      font: inherit;
      font-weight: 700;
      cursor: pointer;
    }

    .bookmark-remove-button:hover,
    .bookmark-remove-button:focus-visible {
      background: rgba(255,255,255,0.16);
    }

    .bookmark-form {
      display: none;
      margin-top: 1rem;
      text-align: left;
      border: 1px solid rgba(255,255,247,0.14);
      border-radius: 10px;
      padding: 1rem;
      background: rgba(255,255,255,0.04);
    }

    .bookmark-form.open {
      display: block;
    }

    .bookmark-form-row + .bookmark-form-row {
      margin-top: 0.85rem;
    }

    .bookmark-form label {
      display: block;
      margin-bottom: 0.35rem;
      font-weight: 700;
    }

    .bookmark-form input,
    .bookmark-form textarea {
      width: 100%;
      border: 1px solid rgba(255,255,247,0.18);
      border-radius: 8px;
      background: rgba(0,0,0,0.35);
      color: #f3f0df;
      padding: 0.7rem 0.8rem;
      font: inherit;
    }

    .bookmark-form textarea {
      min-height: 82px;
      resize: vertical;
    }

    .bookmark-form-actions {
      display: flex;
      gap: 0.75rem;
      margin-top: 1rem;
      flex-wrap: wrap;
    }

    .captions-blurb {
      margin: 0.45rem 0;
      line-height: 1.45;
      color: rgba(243, 240, 223, 0.92);
    }

    .captions-options {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.6rem;
      margin-top: 1rem;
    }

    .captions-option {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 0.6rem;
      width: 100%;
      min-width: 0;
      padding: 0.7rem 0.75rem;
      border: 1px solid rgba(255,255,247,0.16);
      border-radius: 10px;
      background: rgba(255,255,255,0.05);
      color: #f3f0df;
      font: inherit;
      font-size: 0.98rem;
      cursor: pointer;
      text-align: left;
    }

    .captions-option:hover,
    .captions-option:focus-visible,
    .captions-option.is-selected {
      background: rgba(180,141,73,0.22);
      border-color: rgba(180,141,73,0.65);
    }

    .captions-option img {
      width: 46px;
      height: 24px;
      object-fit: cover;
      border-radius: 4px;
      flex: 0 0 46px;
      background: rgba(255,255,255,0.1);
    }
	
	.translatedTextSpan {
		width: 100%;
		height: 100%;
	}

    .translation-box-overlay-layer {
      position: absolute;
      inset: 0;
      pointer-events: none;
      z-index: 5;
    }

    .translation-box-overlay {
      position: absolute;
      background: rgba(0,0,0,0.95);
      border-radius: 8px;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 0.35rem 0.45rem;
      white-space: pre-wrap;
      overflow: hidden;
      line-height: 1.15;
      font-size: clamp(0.52rem, 0.6vw, 1.2rem);
      cursor: pointer;
    }

    .translation-box-overlay span {
      width: 100%;
      display: block;
      overflow-wrap: anywhere;
      word-break: break-word;
    }


    .page-bonus-bar {
      position: absolute;
      left: 0.9rem;
      bottom: 0.9rem;
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      max-width: calc(100% - 1.8rem);
      padding: 0.35rem 0.55rem;
      border-radius: 999px;
      background: rgba(0, 0, 0, 0.88);
      color: #f3f0df;
      font-size: 0.72rem;
      line-height: 1;
      white-space: nowrap;
      pointer-events: auto;
      opacity: 0;
      visibility: hidden;
      transition:
        opacity 0.35s ease 2.2s,
        visibility 0s linear 2.55s;
      z-index: 7;
    }

    .comic-page.is-bonus-hovered .page-bonus-bar,
    .comic-page:focus-within .page-bonus-bar,
    .comic-page .page-bonus-bar.is-active {
      opacity: 1;
      visibility: visible;
      transition:
        opacity 0.18s ease,
        visibility 0s linear 0s;
    }

    .comic-page.is-bonus-force-hidden .page-bonus-bar {
      opacity: 0;
      visibility: hidden;
      transition:
        opacity 0.12s ease,
        visibility 0s linear 0.12s;
    }

    .page-bonus-control,
    .page-bonus-icon-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.4rem;
      min-height: 24px;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      padding: 0.15rem 0.2rem;
      margin: 0;
      cursor: pointer;
      border-radius: 999px;
      white-space: nowrap;
    }

    .page-bonus-control:hover,
    .page-bonus-control:focus-visible,
    .page-bonus-icon-button:hover,
    .page-bonus-icon-button:focus-visible,
    .page-bonus-control.is-hover-state,
    .page-bonus-icon-button.is-hover-state {
      background: rgba(255, 255, 255, 0.12);
      outline: none;
    }

    .page-bonus-control.is-disabled,
    .page-bonus-icon-button.is-disabled {
      cursor: default;
      opacity: 0.7;
    }

    .page-bonus-art-toggle {
      width: 7.2rem;
      min-width: 7.2rem;
      max-width: 7.2rem;
      justify-content: flex-start;
      gap: 0.45rem;
      flex: 0 0 9.2rem;
      overflow: hidden;
      padding-left: 0.45rem;
      padding-right: 0.45rem;
    }

    .page-bonus-art-label {
      min-width: 0;
      font-weight: 700;
      color: #fffff7;
      text-align: left;
    }

    .page-bonus-pips {
      display: inline-flex;
      align-items: center;
      gap: 0.18rem;
    }

    .page-bonus-pip {
      width: 0.42rem;
      height: 0.42rem;
      border-radius: 999px;
      border: 1px solid rgba(243, 240, 223, 0.48);
      background: transparent;
      flex: 0 0 auto;
    }

    .page-bonus-pip.is-active {
      background: #f3f0df;
      border-color: #f3f0df;
    }

    .page-bonus-icon-button img {
		display: block;
		width: 16px;
		height: 16px;
		object-fit: contain;
		pointer-events: none;
		user-select: none;
		-webkit-user-drag: none;
		background: transparent !important;
		box-shadow: none !important;
		border: none !important;
	}

    .page-bonus-inline-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
      position: relative;
      pointer-events: none;
    }

    .page-bonus-inline-icon svg,
    .page-bonus-inline-image {
      display: block;
      width: 16px;
      height: 16px;
      object-fit: contain;
      user-select: none;
      -webkit-user-drag: none;
	  background: none !important;
    }

    .reader-toast-region {
      position: fixed;
      left: 50%;
      bottom: 1.5rem;
      transform: translateX(-50%);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.5rem;
      z-index: 20000;
      pointer-events: none;
    }

    .reader-toast {
      max-width: min(calc(100vw - 2rem), 28rem);
      padding: 0.7rem 0.95rem;
      border-radius: 999px;
      border: 1px solid rgba(255,255,247,0.14);
      background: rgba(12, 10, 8, 0.94);
      color: #fffff7;
      box-shadow: 0 10px 30px rgba(0,0,0,0.34);
      font-size: 0.95rem;
      line-height: 1.3;
      opacity: 0;
      transform: translateY(8px);
      transition: opacity 0.18s ease, transform 0.18s ease;
    }

    .reader-toast.is-visible {
      opacity: 1;
      transform: translateY(0);
    }

    .page-bonus-count {
      min-width: 0.8rem;
      text-align: left;
      font-weight: 700;
      color: #fffff7;
    }

    .page-bonus-bar.is-minimized {
      padding-left: 0.35rem;
      padding-right: 0.35rem;
      gap: 0.2rem;
    }

    .page-bonus-collapse-button {
      min-width: 24px;
      padding-left: 0.35rem;
      padding-right: 0.35rem;
      font-weight: 800;
      font-size: 0.9rem;
      line-height: 1;
    }


    .page-bonus-bar.is-minimized .page-bonus-collapsible {
      display: none;
    }


    .page-artist-blurb-overlay {
      position: absolute;
      left: 5px;
      right: 5px;
      bottom: 60px;
      z-index: 9;
      padding: 0.9rem 1rem 1rem 1rem;
      background: rgba(0, 0, 0, 0.9);
      color: #f3f0df;
      font-size: 0.95rem;
      line-height: 1.4;
      white-space: pre-wrap;
      display: none;
      flex-direction: column;
      gap: 0.9rem;
      pointer-events: auto;
      touch-action: manipulation;
	  border-radius: 20px;
      max-height: calc(100% - 70px);
      overflow: hidden;
    }

    .page-artist-blurb-header {
      display: block;
      margin-bottom: 0;
      color: #fffff7;
      font-size: 0.9rem;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      white-space: normal;
    }

    .page-artist-blurb-body {
      display: block;
      white-space: pre-wrap;
      flex: 1 1 auto;
      min-height: 0;
      overflow: hidden;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .page-artist-blurb-overlay.is-visible {
      display: flex;
    }

    .comic-page[data-showing-artist-blurb="true"] .page-bonus-bar {
      z-index: 7;
    }

    .page-artist-blurb-outline-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      align-self: flex-start;
      margin-top: 0;
      white-space: normal;
      text-align: center;
      text-decoration: none;
      pointer-events: auto;
      position: relative;
      z-index: 1;
      touch-action: manipulation;
    }

    .comic-page img.is-bonus-locked,
    .comic-page .translation-box-overlay.is-bonus-locked {
      filter: blur(18px) brightness(0.38);
      transform: scale(1.02);
      transition: filter 0.18s ease, transform 0.18s ease;
    }


    .preview-sketch-page .preview-sketch-thumbnail-image {
      filter: blur(16px) brightness(0.42);
      transform: scale(1.03);
      transform-origin: center center;
    }

    .page-bonus-locked-overlay {
      position: absolute;
      inset: 0;
      z-index: 8;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1.5rem;
      pointer-events: none;
    }

    .page-bonus-locked-overlay.is-visible {
      display: flex;
    }

    .page-bonus-locked-overlay .overlay-panel {
      pointer-events: auto;
    }

    #vertical-footer-vignette {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      height: 2.75rem;
      pointer-events: none;
      z-index: 2390;
      opacity: 0;
      background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.92) 100%);
      transition: opacity 0.18s ease;
    }

    body.layout-vertical #vertical-footer-vignette {
      opacity: 1;
    }

    #fixed-page-copyright {
      position: fixed;
      left: 50%;
      bottom: 0.35rem;
      transform: translateX(-50%);
      z-index: 2400;
      font-size: 0.82rem;
      line-height: 1;
      color: rgba(243, 240, 223, 0.52);
      text-align: center;
      pointer-events: none;
      user-select: none;
      -webkit-user-select: none;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
      white-space: nowrap;
    }


    #rss-feed-links {
      position: fixed;
      left: 10px;
      bottom: 8px;
      z-index: 2400;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 0.28rem;
    }

    .rss-feed-link {
      color: rgba(255, 255, 247, 0.58);
      font-size: 0.7rem;
      line-height: 1;
      text-decoration: none;
      letter-spacing: 0.04em;
      transition: color 0.15s ease;
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
    }

    .rss-feed-link:hover,
    .rss-feed-link:focus-visible {
      color: rgba(180, 141, 73, 0.95);
      text-decoration: underline;
    }

    body.layout-vertical #page-content {
      padding-bottom: 2.25rem;
    }

    body.layout-wide #fixed-page-copyright {
	  left: auto;
	  right: 96px;
	  right: calc(80px + 1rem);
	  bottom: 0.6rem;
	  transform: none;
	  text-align: right;
    }

    body.layout-vertical .comic-stack {
      padding-bottom: 2.5rem;
    }

    .toc-controls {
      display: flex;
      justify-content: center;
      margin: 0 0 1.5rem 0;
    }

    .toc-bonus-toggle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.65rem;
      min-width: 240px;
      padding: 0.8rem 1rem;
      border: 0;
      border-radius: 10px;
      background: #b48d49;
      color: #111;
      font: inherit;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease;
    }

    .toc-bonus-toggle:hover,
    .toc-bonus-toggle:focus-visible {
      background: #fffff7;
      color: #111;
    }

    .toc-bonus-toggle img {
      display: block;
      width: 40px;
      height: 40px;
      object-fit: contain;
      pointer-events: none;
      user-select: none;
      -webkit-user-drag: none;
    }


    .map-view {
      position: relative;
      width: 100%;
      min-height: calc(100vh - 60px - 2.25rem);
      min-height: calc(100dvh - 60px - 2.25rem);
    }

    body.layout-wide .map-view {
      min-height: 100vh;
      min-height: 100dvh;
    }

    .map-stage {
      position: relative;
      width: 100%;
      min-height: calc(100vh - 60px - 2.25rem);
      min-height: calc(100dvh - 60px - 2.25rem);
      overflow: hidden;
      background: transparent;
      touch-action: none;
      user-select: none;
      -webkit-user-select: none;
    }

    body.layout-wide .map-stage {
      min-height: 100vh;
      min-height: 100dvh;
    }

    .map-canvas {
      position: absolute;
      inset: 0;
      overflow: hidden;
      cursor: grab;
      touch-action: none;
    }

    .map-canvas.is-dragging {
      cursor: grabbing;
    }

    .map-canvas.is-ruler {
      cursor: crosshair;
    }

    .map-image-layer,
    .map-overlay-layer {
      position: absolute;
      left: 0;
      top: 0;
      width: 3840px;
      height: 2160px;
      transform-origin: 0 0;
      will-change: transform;
    }

    .map-image-layer img {
      display: block;
      width: 3840px;
      height: 2160px;
      max-width: none;
      user-select: none;
      -webkit-user-drag: none;
      pointer-events: none;
    }

    .map-overlay-layer {
      pointer-events: none;
      overflow: visible;
    }

    .map-ruler-line {
      stroke: #fffff7;
      stroke-width: 4;
      stroke-linecap: round;
      filter: drop-shadow(0 0 4px rgba(0,0,0,0.8));
    }

    .map-ruler-point {
      fill: #b48d49;
      stroke: #111;
      stroke-width: 2;
    }

    .map-distance-badge {
      position: absolute;
      left: 0;
      top: 0;
      transform: translate(-50%, calc(-100% - 0.5rem));
      padding: 0.35rem 0.55rem;
      border-radius: 999px;
      background: rgba(0, 0, 0, 0.84);
      color: #fffff7;
      font-size: 0.88rem;
      font-weight: 700;
      white-space: nowrap;
      box-shadow: 0 8px 18px rgba(0,0,0,0.3);
    }
	
	.map-reference-trail {
	  fill: none;
	  stroke: rgba(255, 255, 255, 0.92);
	  stroke-width: 4;
	  stroke-linecap: round;
	  stroke-linejoin: round;
	  stroke-dasharray: 10 12;
	  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.75));
	}

	.map-reference-dot {
	  fill: #ffffff;
	}

	.map-reference-connector {
	  stroke: #ffffff;
	  stroke-width: 2;
	  stroke-linecap: round;
	}

	/* Keep your existing label styles */
	.map-reference-pin-label-bg {
	  fill: rgba(0, 0, 0, 0.86);
	  stroke: rgba(255, 255, 247, 0.38);
	  stroke-width: 2;
	}

	.map-reference-pin-label-text {
	  fill: #fffff7;
	  font-size: 28px;
	  font-weight: 700;
	  pointer-events: none;
	}

    .map-loading-overlay {
      position: absolute;
      inset: 0;
      display: none;
      align-items: center;
      justify-content: center;
      background: rgba(0, 0, 0, 0.38);
      z-index: 3;
      pointer-events: none;
    }

    .map-loading-overlay.is-visible {
      display: flex;
    }

    .map-loading-overlay img {
      display: block;
      width: 42px;
      height: 42px;
      object-fit: contain;
      user-select: none;
      -webkit-user-drag: none;
    }

    .map-controls {
      position: absolute;
      top: 1rem;
      right: 1rem;
      z-index: 4;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      width: min(280px, calc(100% - 2rem));
      align-items: stretch;
      pointer-events: none;
      transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .map-controls.is-minimized {
      width: auto;
    }

    .map-control-group {
      padding: 0.75rem;
      border-radius: 14px;
      background: rgba(0, 0, 0, 0.82);
      border: 1px solid rgba(255, 255, 247, 0.16);
      box-shadow: 0 12px 24px rgba(0,0,0,0.32);
      pointer-events: auto;
    }

    .map-controls-shell {
      display: contents;
    }

    .map-controls.is-minimized .map-controls-shell {
      display: none;
    }

    .map-control-label {
      margin: 0 0 0.55rem 0;
      color: #fffff7;
      font-size: 0.95rem;
      font-weight: 700;
      letter-spacing: 0.02em;
    }

    .map-controls-topbar {
      display: flex;
      justify-content: flex-end;
      gap: 0.5rem;
      pointer-events: auto;
    }

    .map-minimize-button,
    .map-exit-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 44px;
      padding: 0.7rem 0.9rem;
      border: 1px solid rgba(255, 255, 247, 0.16);
      border-radius: 12px;
      background: rgba(0, 0, 0, 0.82);
      color: #f3f0df;
      font: inherit;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    }

    .map-minimize-button {
      width: 44px;
      min-width: 44px;
      padding: 0;
    }

    .map-minimize-button img {
      display: block;
      width: 28px;
      height: 28px;
      object-fit: contain;
      pointer-events: none;
      user-select: none;
      -webkit-user-drag: none;
    }

    .map-minimize-button:hover,
    .map-minimize-button:focus-visible,
    .map-exit-button:hover,
    .map-exit-button:focus-visible {
      background: rgba(255,255,255,0.12);
      border-color: rgba(255,255,247,0.3);
      outline: none;
    }

    .map-segmented-control {
      display: inline-grid;
      grid-template-columns: repeat(2, 1fr);
      width: 100%;
      border: 1px solid rgba(180,141,73,0.45);
      border-radius: 999px;
      overflow: hidden;
      background: rgba(255,255,255,0.06);
    }

    .map-segmented-control button,
    .map-tool-button {
      border: 0;
      background: transparent;
      color: #f3f0df;
      font: inherit;
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
    }

    .map-segmented-control button {
      padding: 0.65rem 0.7rem;
      font-weight: 700;
    }

    .map-segmented-control button.is-active {
      background: #b48d49;
      color: #111;
    }

    .map-tool-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0.65rem;
    }

    .map-ruler-submenu {
      display: none;
      margin-top: 0.75rem;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 0.5rem;
    }

    .map-ruler-submenu.is-visible {
      display: grid;
    }

    .map-ruler-mode-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 50px;
      padding: 0.45rem;
      border: 1px solid rgba(255,255,247,0.14);
      border-radius: 12px;
      background: rgba(255,255,255,0.04);
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
    }

    .map-ruler-mode-button:hover,
    .map-ruler-mode-button:focus-visible {
      background: rgba(255,255,255,0.1);
      border-color: rgba(255,255,247,0.3);
      outline: none;
    }

    .map-ruler-mode-button.is-active {
      background: rgba(180,141,73,0.24);
      border-color: rgba(180,141,73,0.7);
    }

    .map-ruler-mode-button img {
      display: block;
      width: 32px;
      height: 32px;
      object-fit: contain;
      pointer-events: none;
      user-select: none;
      -webkit-user-drag: none;
    }

    .map-tool-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0;
      min-height: 54px;
      padding: 0.65rem 0.75rem;
      border: 1px solid rgba(255,255,247,0.14);
      border-radius: 12px;
      background: rgba(255,255,255,0.04);
      text-align: center;
      font-weight: 700;
    }

    .map-tool-button:hover,
    .map-tool-button:focus-visible {
      background: rgba(255,255,255,0.1);
      border-color: rgba(255,255,247,0.3);
      outline: none;
    }

    .map-tool-button.is-active {
      background: rgba(180,141,73,0.24);
      border-color: rgba(180,141,73,0.7);
      color: #fffff7;
    }

    .map-tool-button img {
      display: block;
      width: 32px;
      height: 32px;
      object-fit: contain;
      flex: 0 0 32px;
      pointer-events: none;
      user-select: none;
      -webkit-user-drag: none;
    }

    @media (max-width: 700px) {
      .map-controls {
        top: 0.75rem;
        right: 0.75rem;
        width: min(260px, calc(100% - 1.5rem));
      }

      .map-control-group {
        padding: 0.65rem;
      }
    }

    @media (max-width: 700px) {
      #modal-overlay {
        align-items: flex-start;
        padding: 0.75rem;
      }

      #content-warning-modal {
        width: 100%;
        max-height: calc(100vh - 1.5rem);
        max-height: calc(100dvh - 1.5rem);
        margin: 0 auto;
        border-radius: 10px;
        padding: 1rem;
      }

      #modal-logo {
        width: min(256px, 80%);
        margin: 0 auto 0.75rem auto;
      }

      #advanced-settings-toggle {
        margin-bottom: 0.5rem;
      }

      #adult-confirm-container {
        margin-top: 1rem;
        padding: 0.85rem;
      }

      #confirm-content-warning {
        margin-top: 1rem;
      }

      .tri-state-toggle {
        min-width: 0;
        width: 100%;
      }

      .tri-state-option label {
        padding: 0.65rem 0.5rem;
        font-size: 0.95rem;
      }
    }

    body.credits-modal-open,
    body.glossary-bts-modal-open {
      overflow: hidden;
    }

    #credits-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.82);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 2300;
      padding: 1rem;
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
    }

    #credits-modal-overlay.open {
      display: flex;
    }

    #credits-modal {
      width: min(980px, 100%);
      max-width: 100%;
      max-height: calc(100vh - 2rem);
      max-height: calc(100dvh - 2rem);
      overflow-y: auto;
      overscroll-behavior: contain;
      background: #111;
      color: #f3f0df;
      border: 1px solid rgba(255, 255, 247, 0.2);
      border-radius: 12px;
      box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
      padding: 1.5rem;
      margin: auto;
      text-align: center;
    }

    #credits-modal h2,
    #credits-modal h3 {
      margin-top: 0;
      color: #fffff7;
    }

    .credits-button-text {
      color: #b48d49;
      font-size: 0.95rem;
      font-weight: 700;
      letter-spacing: 0.02em;
      line-height: 1;
    }

    body.layout-wide .credits-button-text {
      writing-mode: horizontal-tb;
      text-align: center;
    }

    .credits-copy {
      max-width: 52rem;
      margin: 0 auto 1.25rem auto;
      line-height: 1.55;
    }

    .credits-copy p {
      margin: 0 0 1rem 0;
    }

    .credits-people-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 1rem;
      margin: 1.5rem 0 2rem 0;
    }

    .credits-person-card {
      background: rgba(255, 255, 255, 0.045);
      border: 1px solid rgba(255, 255, 247, 0.12);
      border-radius: 12px;
      padding: 1rem 0.85rem;
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      min-width: 0;
    }

    .credits-person-card img {
      width: 128px;
      height: 128px;
      object-fit: cover;
      border-radius: 10px;
      display: block;
      margin: 0 auto 0.85rem auto;
      background: rgba(255,255,255,0.06);
    }

    .credits-person-role {
      color: #d8c69a;
      font-size: 0.96rem;
      line-height: 1.35;
      margin-bottom: 0.45rem;
    }

    .credits-person-name {
      color: #fffff7;
      font-size: 1.08rem;
      font-weight: 700;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .credits-supporters-section {
      margin-top: 2rem;
      padding-top: 1.4rem;
      border-top: 1px solid rgba(255,255,247,0.12);
    }

    .credits-supporters-intro {
      max-width: 52rem;
      margin: 0 auto 1rem auto;
      line-height: 1.55;
    }

    .credits-supporters-intro a {
      color: #b48d49;
      text-decoration: underline;
      overflow-wrap: anywhere;
    }

    .credits-supporters-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 0.45rem 0.8rem;
      margin-top: 1rem;
    }

    .credits-supporter-name {
      min-width: 0;
      padding: 0.48rem 0.6rem;
      border-radius: 8px;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,247,0.08);
      line-height: 1.2;
      text-align: center;
      overflow-wrap: anywhere;
      word-break: break-word;
      transition: opacity 0.22s ease;
      opacity: 1;
    }

    .credits-supporter-name.is-hidden {
      opacity: 0;
    }

    .credits-supporter-status {
      min-height: 1.25rem;
      margin-top: 0.85rem;
      color: rgba(243, 240, 223, 0.78);
      font-size: 0.94rem;
    }

    .credits-close-row {
      margin-top: 1.4rem;
      display: flex;
      justify-content: center;
    }

    .credits-close-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0.9rem 1.2rem;
      border: 0;
      border-radius: 10px;
      background: #b48d49;
      color: #111;
      font: inherit;
      font-weight: 700;
      cursor: pointer;
      transition: background 0.15s ease, color 0.15s ease;
    }

    .credits-close-button:hover,
    .credits-close-button:focus-visible {
      background: #fffff7;
      color: #111;
    }

    @media (max-width: 860px) {
      .credits-people-grid,
      .credits-supporters-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 560px) {
      .credits-people-grid,
      .credits-supporters-grid {
        grid-template-columns: 1fr;
      }
    }

  


.comments-view-shell {
  width: 100%;
  padding: 1rem;
}

.comments-view-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
  max-width: 1600px;
  margin: 0 auto;
}

.comments-view-layout.is-wide {
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.9fr);
}

.comments-page-column,
.comments-column {
  min-width: 0;
}

.comments-view-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.comments-view-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.comments-view-subtitle {
  color: #d5c496;
  font-size: 1rem;
}

.comments-back-button,
.comments-submit-button,
.comments-secondary-button {
  font-family: inherit;
  border: 1px solid rgba(180, 141, 73, 0.8);
  background: rgba(180, 141, 73, 0.14);
  color: #fffff7;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  cursor: pointer;
}

.comments-back-button:hover,
.comments-submit-button:hover,
.comments-secondary-button:hover {
  background: rgba(255, 255, 247, 0.16);
}

.comments-focus-page-wrap {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 247, 0.12);
  border-radius: 16px;
  padding: 1rem;
}

.comments-composer-card,
.comments-loading-state,
.comments-empty-state,
.comment-item {
  background: rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(255, 255, 247, 0.12);
  border-radius: 14px;
  padding: 1rem;
}

.comments-auth-panel {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.comments-auth-status,
.comments-system-note {
  color: #f3f0df;
  line-height: 1.4;
}

.comments-auth-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.comments-auth-toggle {
  font-family: inherit;
  border: 1px solid rgba(255, 255, 247, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #f3f0df;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
}

.comments-auth-toggle:hover,
.comments-auth-toggle.is-active {
  border-color: rgba(180, 141, 73, 0.8);
  background: rgba(180, 141, 73, 0.16);
  color: #fffff7;
}

.comments-signed-in-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}
.comments-auth-forms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.comments-inline-auth-form,
.comments-compose-form {
  display: grid;
  gap: 0.5rem;
  width: 100%;
}

.comments-inline-auth-form label,
.comments-compose-form label {
  display: block;
  width: 100%;
}

.comments-inline-auth-form input,
.comments-compose-form input,
.comments-compose-form textarea {
  display: block;
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 247, 0.2);
  background: rgba(255, 255, 255, 0.07);
  color: #fffff7;
  padding: 0.75rem 0.9rem;
  font-size: 1rem;
}

.comments-compose-form textarea {
  resize: vertical;
  min-height: 8rem;
}

.comments-submit-button,
.comments-secondary-button,
.comments-auth-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.comments-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.comments-list {
  display: grid;
  gap: 0.9rem;
}

.comment-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
}

.comment-item-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  background: rgba(180, 141, 73, 0.18);
  border: 1px solid rgba(180, 141, 73, 0.45);
  color: #d5c496;
  font-size: 0.85rem;
}

.comment-item-time {
  color: rgba(243, 240, 223, 0.76);
  font-size: 0.9rem;
}

.comment-item-body {
  white-space: pre-wrap;
  line-height: 1.5;
}

.comments-flash-message {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.9rem;
}

.comments-flash-message.success {
  background: rgba(80, 150, 90, 0.2);
  border: 1px solid rgba(120, 220, 140, 0.35);
}

.comments-flash-message.error {
  background: rgba(180, 70, 70, 0.2);
  border: 1px solid rgba(240, 120, 120, 0.35);
}


@media (max-width: 700px) {
  .comments-view-shell {
    padding: 0.75rem;
  }

  .comments-view-header {
    align-items: flex-start;
  }

  .comments-auth-toggle-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .comments-auth-toggle,
  .comments-secondary-button,
  .comments-submit-button {
    width: 100%;
  }

  .comments-inline-auth-form,
  .comments-compose-form {
    gap: 0.65rem;
  }

  .comments-signed-in-row {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 1100px) {
  .comments-view-layout.is-wide {
    grid-template-columns: 1fr;
  }
}


    .translation-box-overlay-item {
      position: absolute;
      pointer-events: auto;
    }

    .translation-box-overlay {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.95);
      border-radius: 8px;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 0.35rem 0.45rem;
      white-space: pre-wrap;
      overflow: hidden;
      line-height: 1.15;
      font-size: clamp(0.52rem, 0.6vw, 1.2rem);
      transition: opacity 0.18s ease;
      pointer-events: auto;
    }

    .translation-box-overlay.is-empty {
      color: #f3f0df;
      border: 1px solid rgba(255, 255, 255, 0.18);
    }

    .translation-box-overlay.is-loading {
      opacity: 0.8;
    }

    .translation-box-overlay .translatedTextSpan {
      width: 100%;
      display: block;
      overflow-wrap: anywhere;
      word-break: break-word;
    }

    .translatedTextSpan-fallback {
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      gap: 0.3em;
      line-height: 1.1;
    }

    .translation-warning-indicator {
      display: inline;
      cursor: help;
      flex: 0 0 auto;
	  width: auto !important;
    }

    .translation-fallback-text {
      display: inline;
    }

    .translation-box-side-arrow {
      position: absolute;
      top: 50%;
      width: 16px;
      height: 32px;
      margin-top: -16px;
      padding: 0;
      border: 0;
      background: transparent;
      cursor: pointer;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.18s ease;
      z-index: 2;
    }

    .translation-box-side-arrow img {
      display: block;
      width: 16px;
      height: 32px;
      pointer-events: none;
      user-select: none;
      -webkit-user-drag: none;
    }

    .translation-box-side-arrow.left {
      left: -16px;
    }

    .translation-box-side-arrow.right {
      right: -16px;
    }

    .translation-box-controls {
      position: absolute;
      left: 0;
      right: 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.18rem;
      min-width: 100%;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.18s ease;
      z-index: 2;
    }

    .translation-box-overlay-item.translation-ui-below .translation-box-controls {
      top: calc(100% + 6px);
    }

    .translation-box-overlay-item.translation-ui-above .translation-box-controls {
      bottom: calc(100% + 6px);
    }

    .translation-box-overlay-item.translation-ui-narrow .translation-box-controls {
      width: var(--translation-ui-min-width, 188px);
      min-width: var(--translation-ui-min-width, 188px);
      left: 50%;
      right: auto;
      transform: translateX(-50%);
    }

    .translation-box-meta {
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      gap: 0.14rem;
      min-height: 18px;
      padding: 0.12rem 0.2rem;
      border-radius: 999px;
      background: rgba(0, 0, 0, 0.82);
      color: #f3f0df;
      font-size: 0.68rem;
      line-height: 1;
      white-space: nowrap;
      pointer-events: auto;
    }

    .translation-box-contribute {
      flex: 0 0 auto;
      pointer-events: auto;
    }

    .translation-box-contribute button,
    .translation-vote-button,
    .translation-translator-button,
    .translation-box-side-arrow {
      appearance: none;
      -webkit-appearance: none;
      border: 0;
      background: transparent !important;
      background-color: transparent !important;
      box-shadow: none;
      color: inherit;
      padding: 0;
      margin: 0;
      cursor: pointer;
      font: inherit;
    }

    .translation-box-contribute button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
    }

    .translation-box-contribute img,
    .translation-vote-button img {
      display: block;
      pointer-events: none;
      user-select: none;
      -webkit-user-drag: none;
    }

    .translation-vote-button img {
      width: 16px;
      height: 16px;
    }

    .translation-box-side-arrow img,
    .translation-box-contribute img,
    .translation-vote-button img {
      background: transparent !important;
      background-color: transparent !important;
      box-shadow: none;
    }

    .translation-score {
      min-width: 0.95rem;
      text-align: center;
      font-weight: 700;
    }

    .translation-translator-button {
      position: relative;
      color: #f3f0df;
      text-decoration: underline;
      text-decoration-style: dotted;
      text-underline-offset: 0.15em;
      padding-left: 0.22rem;
      padding-right: 0.06rem;
    }

    .translation-translator-tooltip {
      position: absolute;
      right: 0;
      bottom: calc(100% + 0.3rem);
      min-width: 170px;
      max-width: 220px;
      padding: 0.4rem 0.5rem;
      border-radius: 8px;
      background: rgba(0, 0, 0, 0.96);
      border: 1px solid rgba(255, 255, 255, 0.18);
      color: #f3f0df;
      font-size: 0.65rem;
      line-height: 1.2;
      text-decoration: none;
      white-space: normal;
      display: none;
      z-index: 4;
    }

    .translation-translator-tooltip::before {
      content: "";
      display: inline-block;
      width: 0.82rem;
      text-align: center;
      margin-right: 0.32rem;
    }

    .translation-translator-tooltip.is-preferred::before {
      content: "☑";
    }

    .translation-translator-tooltip.is-not-preferred::before {
      content: "☐";
    }

    .translation-translator-button:hover .translation-translator-tooltip,
    .translation-translator-button:focus-visible .translation-translator-tooltip {
      display: block;
    }

    .translation-box-overlay-item.is-selected .translation-box-side-arrow,
    .translation-box-overlay-item.is-selected .translation-box-controls,
    .translation-box-overlay-item:focus-within .translation-box-side-arrow,
    .translation-box-overlay-item:focus-within .translation-box-controls {
      opacity: 1;
      pointer-events: auto;
    }

    .translation-auth-modal-overlay,
    .translation-contribute-modal-overlay {
      position: fixed;
      inset: 0;
      z-index: 5600;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1rem;
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      background: rgba(0, 0, 0, 0.82);
    }

    .translation-auth-modal-overlay.open,
    .translation-contribute-modal-overlay.open {
      display: flex;
    }

    .translation-modal {
      width: min(92vw, 460px);
      max-height: min(88vh, 760px);
      overflow: auto;
      padding: 1.2rem 1.25rem;
      border-radius: 18px;
      background: rgba(12, 12, 12, 0.98);
      color: #f3f0df;
      border: 1px solid rgba(180, 141, 73, 0.48);
      box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
    }

    .translation-modal h2 {
      margin-top: 0;
      margin-bottom: 0.65rem;
    }

    .translation-modal p {
      margin-top: 0;
    }

    .translation-modal-form {
      display: flex;
      flex-direction: column;
      gap: 0.55rem;
    }

    .translation-modal-form label {
      font-weight: 700;
    }

    .translation-modal-form input,
    .translation-modal-form textarea,
    .translation-modal-form button {
      font: inherit;
    }

    .translation-modal-form input,
    .translation-modal-form textarea {
      width: 100%;
      padding: 0.7rem 0.8rem;
      border-radius: 10px;
      border: 1px solid rgba(255, 255, 255, 0.18);
      background: rgba(255, 255, 255, 0.06);
      color: #f3f0df;
    }

    .translation-modal-form textarea {
      resize: vertical;
      min-height: 140px;
    }

    .translation-modal-actions,
    .translation-auth-toggle-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.55rem;
      margin-top: 0.75rem;
    }

    .translation-modal-button,
    .translation-auth-toggle {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 40px;
      padding: 0.55rem 0.9rem;
      border-radius: 999px;
      border: 1px solid rgba(180, 141, 73, 0.5);
      background: rgba(180, 141, 73, 0.18);
      color: #fffff7;
      cursor: pointer;
    }

    .translation-modal-button.secondary,
    .translation-auth-toggle {
      background: rgba(255, 255, 255, 0.06);
    }

    .translation-auth-toggle.is-active {
      background: rgba(180, 141, 73, 0.25);
    }

    .translation-modal-message {
      min-height: 1.2rem;
      margin-top: 0.6rem;
      font-size: 0.92rem;
    }

    .translation-modal-message.error {
      color: #ffbcbc;
    }

    .translation-modal-message.success {
      color: #c8f2cf;
    }

    .translation-auth-status {
      margin-bottom: 0.5rem;
    }

    .translation-auth-cta {
      margin-bottom: 0.8rem;
      color: #f3f0df;
    }

    .translation-original-phrase,
    .translation-author-notes {
      padding: 0.8rem 0.9rem;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.05);
      white-space: pre-wrap;
    }

    .translation-author-notes {
      font-size: 0.95rem;
      color: rgba(243, 240, 223, 0.92);
      border: 1px solid rgba(180, 141, 73, 0.26);
      background: rgba(180, 141, 73, 0.08);
    }

    @media (max-width: 700px) {
      .captions-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .translation-box-meta {
        max-width: calc(100% - 24px);
      }

      .translation-translator-tooltip {
        right: auto;
        left: 0;
      }
    }


body.modal-open {
  overflow: hidden;
}


@media (max-width: 700px) {
  .captions-blurb-desktop-only {
    display: none;
  }

  .captions-option {
    padding: 0.62rem 0.65rem;
    gap: 0.5rem;
    font-size: 0.9rem;
  }
}


.new-pages-divider {
  position: absolute;
  background: #55ffad;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

body.show-page-ornaments .new-pages-divider {
  opacity: 0.95;
}
.new-pages-divider.vertical {
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}
.new-pages-divider.horizontal {
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
}
.new-pages-badge {
  position: absolute;
  background: #55ffad;
  color: #123;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 10px;
  line-height: 1;
  padding: 5px 7px;
  border-radius: 999px;
  z-index: 6;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity 0.28s ease;
}

body.show-page-ornaments .new-pages-badge {
  opacity: 1;
}
.new-pages-badge.vertical {
  left: 0;
  top: 64px;
  transform: translateX(-48%) rotate(-90deg);
  transform-origin: center center;
}
.new-pages-badge.horizontal {
  right: 12px;
  top: 0;
  transform: translateY(-48%);
}


    .captions-option-checklist {
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      text-align: left;
      gap: 0.2rem;
      min-height: 70px;
    }

    .captions-option-checklist-label {
      font-weight: 700;
    }

    .captions-option-checklist-subtitle {
      font-size: 0.82rem;
      line-height: 1.25;
      opacity: 0.84;
    }

    .translation-checklist-modal-overlay {
      position: fixed;
      inset: 0;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1rem;
      background: rgba(0, 0, 0, 0.72);
      z-index: 13000;
    }

    .translation-checklist-modal-overlay.open {
      display: flex;
    }

    .translation-checklist-modal {
      width: min(100%, 40rem);
      max-height: min(82vh, 42rem);
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .translation-checklist-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      margin-bottom: 0.75rem;
    }

    .translation-checklist-header h2 {
      margin: 0;
    }

    .translation-checklist-status {
      margin-bottom: 0.75rem;
      min-height: 1.35rem;
    }

    .translation-checklist-items {
      display: flex;
      flex-direction: column;
      gap: 0.55rem;
      overflow-y: auto;
      padding-right: 0.2rem;
    }

    .translation-checklist-item {
      width: 100%;
      border: 1px solid rgba(180,141,73,0.28);
      border-radius: 10px;
      background: rgba(255,255,255,0.05);
      color: #f7f1e1;
      text-align: left;
      padding: 0.8rem 0.9rem;
      font: inherit;
      cursor: pointer;
      transition: background 0.18s ease, border-color 0.18s ease;
    }

    .translation-checklist-item:hover,
    .translation-checklist-item:focus-visible {
      background: rgba(180,141,73,0.16);
      border-color: rgba(180,141,73,0.62);
      outline: none;
    }

    .translation-checklist-close-button {
      flex: 0 0 auto;
    }

    @media (max-width: 700px) {
      .translation-checklist-modal {
        max-height: min(88vh, 42rem);
      }

      .translation-checklist-header {
        flex-direction: column;
        align-items: stretch;
      }
    }

@media (max-width: 700px) {
    #translation-checklist-trigger {
        display: none !important;
    }
}
