@import "./player.css";

body[data-edition="remake"] {
  --remake-header-offset: var(--remake-measured-header-offset, 90px);
  --remake-visual-size: min(100vw, calc(100vh - var(--remake-header-offset)));
  --remake-visual-fit: contain;
  --remake-frame-image: url("/remake/images/ui/frame.webp");
  --remake-story-frame-image: url("/remake/images/ui/story-frame-new.webp");
  --remake-frame-edge-cover: 2px;
  --remake-frame-edge-cover-double: 4px;
  --remake-media-z: 1;
  --remake-overlay-z: 2;
  --remake-frame-z: 3;
  --remake-text-z: 5;
  --remake-content-width: min(900px, calc(100vw - 160px));
  --remake-content-width-mobile: min(92%, 720px);
  --remake-body-font-size: 24px;
  --remake-body-font-size-mobile: 20px;
  --remake-return-font-size: 21px;
  --remake-return-font-size-mobile: 18px;
  --remake-heading-font-size: 27px;
  --remake-heading-font-size-mobile: 22px;
  --remake-elder-lead-font-size: 20px;
  --remake-elder-lead-font-size-mobile: 16px;
  /* PC版では背景を少し締めるため、画像別の暗幕設定に加算する。 */
  --remake-overlay-alpha-boost: 0.10;
  --remake-overlay-alpha-device-bias: 0.1;
  --remake-overlay-alpha-user-adjust: 0;
  --remake-bg-user-brightness: 1;
  background: #000;
  color: #fff;
  overflow-anchor: none;
}

@supports (height: 100dvh) {
  body[data-edition="remake"] {
    --remake-visual-size: min(100vw, calc(100dvh - var(--remake-header-offset)));
  }

  body[data-edition="remake"] .game-shell {
    min-height: 100dvh;
  }
}

body[data-edition="remake"][data-remake-text-size="large"] {
  --remake-body-font-size: 29px;
  --remake-body-font-size-mobile: 24px;
  --remake-return-font-size: 25px;
  --remake-return-font-size-mobile: 21px;
  --remake-heading-font-size: 32px;
  --remake-heading-font-size-mobile: 27px;
  --remake-elder-lead-font-size: calc(20px * 29 / 24);
  --remake-elder-lead-font-size-mobile: calc(16px * 24 / 20);
}

body[data-edition="remake"][data-remake-text-size="small"] {
  --remake-body-font-size: 20px;
  --remake-body-font-size-mobile: 17px;
  --remake-return-font-size: 18px;
  --remake-return-font-size-mobile: 15px;
  --remake-heading-font-size: 23px;
  --remake-heading-font-size-mobile: 19px;
  --remake-elder-lead-font-size: calc(20px * 20 / 24);
  --remake-elder-lead-font-size-mobile: calc(16px * 17 / 20);
}

body[data-edition="remake"] .play-screen,
body[data-edition="remake"] .scene-main,
body[data-edition="remake"] .battle-screen {
  overflow-anchor: none;
}

body[data-edition="remake"] .game-shell {
  width: 100%;
  min-height: 100vh;
  padding: 0;
}

body[data-edition="remake"][data-remake-image-loading="true"] .game-shell {
  cursor: progress;
  pointer-events: none;
}

body[data-edition="remake"][data-remake-transition-loading="true"] .game-header,
body[data-edition="remake"][data-remake-transition-loading="true"] .title-screen,
body[data-edition="remake"][data-remake-transition-loading="true"] .info-screen,
body[data-edition="remake"][data-remake-transition-loading="true"] .save-screen,
body[data-edition="remake"][data-remake-transition-loading="true"] .play-screen > * {
  visibility: hidden;
}

body[data-edition="remake"][data-remake-image-loading="true"] .game-shell::before,
body[data-edition="remake"][data-remake-image-loading="true"] .game-shell::after {
  content: "";
  position: fixed;
  z-index: 140;
  pointer-events: none;
}

body[data-edition="remake"][data-remake-image-loading="true"] .game-shell::before {
  inset: 0;
  background: rgb(0 0 0 / 0.2);
}

body[data-edition="remake"][data-remake-image-loading="true"] .game-shell::after {
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  border: 3px solid rgb(255 255 255 / 0.28);
  border-top-color: rgb(134 216 255 / 0.92);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: remake-image-loading-spin 0.82s linear infinite;
}

@keyframes remake-image-loading-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

body[data-edition="remake"] .game-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-height: 64px;
  padding: 10px 18px;
  border-bottom: 1px solid rgb(255 255 255 / 0.18);
  background: rgb(0 0 0 / 0.48);
  backdrop-filter: blur(8px);
}

body[data-edition="remake"] .game-header[hidden] {
  display: none;
}

body[data-edition="remake"] .game-actions--legacy {
  display: none;
}

body[data-edition="remake"] .title-screen {
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  background: #000;
}

body[data-edition="remake"] .title-screen[hidden],
body[data-edition="remake"] .info-screen[hidden],
body[data-edition="remake"] .save-screen[hidden],
body[data-edition="remake"] .play-screen[hidden] {
  display: none;
}

body[data-edition="remake"] .title-panel {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 100svh;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 0;
  background: #000;
  padding: 16px 28px 54px;
}

body[data-edition="remake"] .remake-title-visual {
  position: relative;
  width: min(56vh, 78vw, 640px);
  aspect-ratio: 3 / 2;
}

body[data-edition="remake"] .remake-title-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/remake/images/ui/frame.webp") center / 100% 100% no-repeat;
  pointer-events: none;
}

body[data-edition="remake"] .title-panel img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  border: 0;
  object-fit: contain;
}

body[data-edition="remake"] .remake-title-config {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 6;
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgb(255 255 255 / 0.34);
  border-radius: 6px;
  background: rgb(255 255 255 / 0.07);
  padding: 4px;
  cursor: pointer;
  box-shadow: inset 0 0 12px rgb(255 255 255 / 0.04), 0 4px 16px rgb(0 0 0 / 0.38);
}

body[data-edition="remake"] .remake-title-config:hover,
body[data-edition="remake"] .remake-title-config:focus-visible {
  border-color: rgb(134 216 255 / 0.9);
  background: rgb(134 216 255 / 0.16);
  outline: 0;
}

body[data-edition="remake"] .remake-title-config img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: brightness(1.22) contrast(1.1) saturate(1.08) drop-shadow(0 0 4px rgb(255 255 255 / 0.16));
}

body[data-edition="remake"] .remake-title-settings-guide[hidden] {
  display: none;
}

body[data-edition="remake"] .remake-title-settings-guide {
  --remake-title-guide-x: calc(100vw - 42px);
  --remake-title-guide-y: 38px;
  --remake-title-guide-radius: 37px;
  z-index: 90;
  background: transparent;
}

body[data-edition="remake"] .remake-title-settings-guide__shade {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      circle at var(--remake-title-guide-x) var(--remake-title-guide-y),
      transparent 0 var(--remake-title-guide-radius),
      rgb(0 0 0 / 0.76) calc(var(--remake-title-guide-radius) + 1px)
    );
}

body[data-edition="remake"] .remake-title-settings-guide__icon {
  position: fixed;
  left: var(--remake-title-guide-x);
  top: var(--remake-title-guide-y);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

body[data-edition="remake"] .remake-title-settings-guide__icon img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: brightness(1.9) contrast(1.22) saturate(1.16) drop-shadow(0 0 5px rgb(255 255 255 / 0.34));
}

body[data-edition="remake"] .remake-title-settings-guide__ring {
  position: fixed;
  left: var(--remake-title-guide-x);
  top: var(--remake-title-guide-y);
  width: calc(var(--remake-title-guide-radius) * 2);
  height: calc(var(--remake-title-guide-radius) * 2);
  border: 4px solid #ff3b30;
  border-radius: 50%;
  box-shadow: 0 0 22px rgb(255 59 48 / 0.78);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

body[data-edition="remake"] .remake-title-settings-guide__panel {
  min-height: 240px;
}

body[data-edition="remake"] .remake-title-settings-guide__panel p {
  margin: 0;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.8;
  text-align: left;
}

@media (max-width: 520px) {
  body[data-edition="remake"] .remake-title-settings-guide {
    padding-top: max(92px, calc(env(safe-area-inset-top) + 84px));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  body[data-edition="remake"] .remake-title-settings-guide__panel {
    min-height: 300px;
  }
}

body[data-edition="remake"] .title-actions {
  display: grid;
  gap: 4px;
  width: min(540px, calc(100vw - 56px));
  justify-items: center;
}

body[data-edition="remake"] .title-actions a,
body[data-edition="remake"] .title-actions button {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #86d8ff;
  padding: 1px 0;
  text-align: center;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 27px;
  line-height: 1.28;
  text-decoration: none;
  text-shadow: 0 2px 12px rgb(0 0 0 / 0.9);
  cursor: pointer;
}

body[data-edition="remake"] .title-actions a:hover,
body[data-edition="remake"] .title-actions a:focus-visible,
body[data-edition="remake"] .title-actions button:hover,
body[data-edition="remake"] .title-actions button:focus-visible {
  color: #bff0ff;
  text-decoration: underline;
  text-underline-offset: 7px;
  outline: 0;
}

body[data-edition="remake"] .remake-title-new {
  display: inline-block;
  margin-left: 8px;
  color: #ff4b4b;
  font-family: "Segoe UI", sans-serif;
  font-size: 0.46em;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  text-shadow: 0 0 8px rgb(255 0 0 / 0.72), 0 2px 8px rgb(0 0 0 / 0.95);
}

body[data-edition="remake"] .remake-title-new[hidden] {
  display: none;
}

body[data-edition="remake"] .title-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 32px;
  z-index: 4;
  margin: 0;
  padding: 0 12px;
}

body[data-edition="remake"] .title-footer a,
body[data-edition="remake"] .title-footer button {
  color: rgb(255 255 255 / 0.78);
  text-shadow: 0 2px 10px rgb(0 0 0 / 0.9);
}

body[data-edition="remake"] .title-footer a:hover,
body[data-edition="remake"] .title-footer a:focus-visible,
body[data-edition="remake"] .title-footer button:hover,
body[data-edition="remake"] .title-footer button:focus-visible {
  color: #bff0ff;
}

body[data-edition="remake"] .title-credit {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 4;
  margin: 0;
  padding: 0 12px;
  color: rgb(255 255 255 / 0.82);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 10px rgb(0 0 0 / 0.9);
}

body[data-edition="remake"] .remake-hud {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

body[data-edition="remake"] .remake-hud[hidden] {
  display: none;
}

body[data-edition="remake"] .remake-hud--settings-only .remake-hud__life,
body[data-edition="remake"] .remake-hud--settings-only .remake-hud__button:not(.remake-hud__button--settings) {
  display: none;
}

body[data-edition="remake"] .remake-hud--settings-with-text .remake-hud__life,
body[data-edition="remake"] .remake-hud--settings-with-text .remake-hud__button:not(.remake-hud__button--settings, .remake-hud__button--text) {
  display: none;
}

body[data-edition="remake"] .info-screen[data-remake-info="true"] {
  position: relative;
  min-height: calc(100vh - var(--remake-header-offset));
  margin-top: var(--remake-header-offset);
  background: #000;
}

body[data-edition="remake"] .info-screen[data-omake-view="detail"] {
  touch-action: manipulation;
}

body[data-edition="remake"] .info-screen[data-remake-info="true"]::before,
body[data-edition="remake"] .info-screen[data-remake-info="true"]::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

body[data-edition="remake"] .info-screen[data-remake-info="true"]::before {
  top: calc(var(--remake-header-offset) + var(--remake-frame-edge-cover));
  left: 50%;
  z-index: 0;
  width: calc(var(--remake-visual-size) - var(--remake-frame-edge-cover-double));
  height: calc(var(--remake-visual-size) - var(--remake-frame-edge-cover-double));
  transform: translateX(-50%);
  background-image: var(--remake-info-bg);
  background-position: center;
  background-size: var(--remake-visual-fit);
  background-repeat: no-repeat;
  filter: brightness(var(--remake-bg-brightness, 1)) brightness(var(--remake-bg-user-brightness, 1)) contrast(var(--remake-bg-contrast, 1)) saturate(var(--remake-bg-saturation, 1));
}

body[data-edition="remake"] .info-screen[data-remake-info="true"] .reading-panel::before {
  content: "";
  position: fixed;
  top: var(--remake-header-offset);
  left: 50%;
  z-index: var(--remake-frame-z);
  width: var(--remake-visual-size);
  height: var(--remake-visual-size);
  transform: translateX(-50%);
  background: var(--remake-frame-image) center / var(--remake-visual-fit) no-repeat;
  pointer-events: none;
}

body[data-edition="remake"] .info-screen[data-remake-info="true"]::after {
  inset: var(--remake-header-offset) 0 0;
  z-index: var(--remake-overlay-z);
  background: rgb(0 0 0 / clamp(0.2, calc(var(--remake-overlay-alpha, 0.58) + var(--remake-overlay-alpha-boost, 0) + var(--remake-overlay-alpha-device-bias, 0) + var(--remake-overlay-alpha-user-adjust, 0)), 0.82));
}

body[data-edition="remake"] .info-screen[data-remake-info="true"][data-remake-text-visible="false"]::after,
body[data-edition="remake"] .info-screen[data-remake-info="true"][data-remake-text-visible="false"] .reading-panel h2,
body[data-edition="remake"] .info-screen[data-remake-info="true"][data-remake-text-visible="false"] .reading-scroll,
body[data-edition="remake"] .info-screen[data-remake-info="true"][data-remake-text-visible="false"] .reading-actions {
  display: none;
}

body[data-edition="remake"] .info-screen[data-remake-info-images="inline"]::before,
body[data-edition="remake"] .info-screen[data-remake-info-images="inline"]::after,
body[data-edition="remake"] .info-screen[data-remake-info-images="inline"] .reading-panel::before {
  display: none;
}

body[data-edition="remake"] .info-screen[data-remake-info="true"] .reading-panel {
  position: relative;
  z-index: 3;
  width: var(--remake-content-width);
  min-height: calc(100vh - var(--remake-header-offset));
  margin: 0 auto;
  border: 0;
  background: transparent;
  padding: 18px 0 96px;
  user-select: none;
  -webkit-user-select: none;
}

body[data-edition="remake"] .info-screen[data-remake-info="true"] .reading-panel h2 {
  position: relative;
  z-index: var(--remake-text-z);
  margin: 0 0 14px;
  color: #fff;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: var(--remake-heading-font-size);
  font-weight: 700;
}

body[data-edition="remake"] .info-screen[data-remake-info="true"] .reading-scroll {
  position: relative;
  z-index: var(--remake-text-z);
  overflow: visible;
  border: 0;
  background: transparent;
  padding: 0;
  color: #fff;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: var(--remake-body-font-size);
  line-height: 2;
  text-shadow: 0 2px 12px rgb(0 0 0 / 0.78);
}

body[data-edition="remake"] .info-screen[data-remake-info="true"] .reading-scroll p {
  margin: 0 0 1em;
}

body[data-edition="remake"] .info-screen[data-remake-info="true"] .reading-scroll,
body[data-edition="remake"] .scene-text {
  line-break: strict;
  overflow-wrap: normal;
  text-wrap: pretty;
  word-break: normal;
}

body[data-edition="remake"] .info-screen[data-remake-info="true"] .reading-actions {
  position: relative;
  z-index: var(--remake-text-z);
  justify-content: flex-end;
}

body[data-edition="remake"] .remake-author-message,
body[data-edition="remake"] .remake-author-message .legacy-info-button {
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

body[data-edition="remake"] .remake-author-message__archive {
  position: relative;
  margin: calc(1.4em + 16px) 0 1.6em;
  padding: clamp(28px, 5vw, 78px) clamp(24px, 5vw, 80px);
  color: #1c1a17;
  background: url("/remake/images/ui/message-bg.webp") center / 100% 100% no-repeat;
  font-size: 0.86em;
  line-height: 1.82;
  text-shadow: 0 1px 0 rgb(255 255 255 / 0.34);
  filter: drop-shadow(0 18px 34px rgb(0 0 0 / 0.46));
}

body[data-edition="remake"] .remake-author-message__archive p {
  margin-bottom: 0.85em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body[data-edition="remake"] .remake-rule-page {
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: var(--remake-body-font-size);
  line-height: 1.8;
}

body[data-edition="remake"] .remake-rule-page p {
  margin: 0 0 1em;
}

body[data-edition="remake"] .remake-guide-hud {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

body[data-edition="remake"] .remake-rule-anchor {
  color: #86d8ff;
  text-decoration: none;
}

body[data-edition="remake"] .remake-rule-anchor:hover,
body[data-edition="remake"] .remake-rule-anchor:focus-visible {
  color: #bcefff;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

body[data-edition="remake"] .remake-rule-section {
  margin: 0 0 1.5em;
}

body[data-edition="remake"] .remake-rule-section h3 {
  margin: 0 0 0.8em;
  background: linear-gradient(
    90deg,
    rgb(72 80 90 / 0.5),
    rgb(72 80 90 / 0.28) 68%,
    rgb(72 80 90 / 0)
  );
  color: #fff;
  padding: 0.28em 0.65em;
  font-size: 1em;
  font-weight: 700;
  line-height: 1.4;
  text-shadow: 0 2px 10px rgb(0 0 0 / 0.85);
}

body[data-edition="remake"] .remake-rule-menu {
  width: 100%;
  border-collapse: collapse;
  font-size: 1em;
  line-height: 1.7;
}

body[data-edition="remake"] .remake-rule-menu td {
  border-bottom: 1px solid rgb(255 255 255 / 0.28);
  padding: 12px 12px 12px 0;
  vertical-align: middle;
}

body[data-edition="remake"] .remake-rule-menu td:first-child {
  width: 120px;
  text-align: center;
}

body[data-edition="remake"] .remake-rule-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 104px;
}

body[data-edition="remake"] .remake-rule-icon__frame {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid rgb(255 255 255 / 0.36);
  border-radius: 8px;
  background: rgb(8 16 24 / 0.64);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.16),
    0 8px 18px rgb(0 0 0 / 0.48);
}

body[data-edition="remake"] .remake-rule-icon__frame img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgb(0 0 0 / 0.55));
}

body[data-edition="remake"] .remake-rule-icon__label {
  display: block;
  max-width: 100%;
  color: #d5edf8;
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 8px rgb(0 0 0 / 0.8);
}

body[data-edition="remake"] .remake-rule-icon-pair {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

body[data-edition="remake"] .remake-rule-icon-pair img {
  width: 38px;
  height: 38px;
}

body[data-edition="remake"] .remake-rule-section ul {
  margin: 0;
  padding-left: 1.25em;
  font-size: 0.9em;
  line-height: 1.8;
}

body[data-edition="remake"] .remake-rule-page__return {
  margin-top: 1.8em;
  text-align: right;
}

body[data-edition="remake"] .remake-info-page__return {
  text-align: right;
}

body[data-edition="remake"] .info-screen[data-remake-info="true"] .remake-rule-page__return .legacy-info-button,
body[data-edition="remake"] .info-screen[data-remake-info="true"] .remake-info-page__return .legacy-info-button,
body[data-edition="remake"] .info-screen[data-remake-info="true"] .remake-info-title-return {
  font-size: var(--remake-return-font-size);
}

body[data-edition="remake"] .remake-inline-image {
  position: relative;
  width: min(50%, 420px);
  margin: 0.25em 0 0.8em;
}

body[data-edition="remake"] .remake-inline-image--large {
  width: min(72%, 640px);
}

body[data-edition="remake"] .remake-inline-image--full {
  float: none;
  clear: both;
  width: 100%;
  max-width: 100%;
  margin: 1em 0 1.2em;
}

body[data-edition="remake"] .remake-inline-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--remake-story-frame-image) center / 100% 100% no-repeat;
  pointer-events: none;
}

body[data-edition="remake"] .remake-inline-image--left {
  float: left;
  margin-right: 1.1em;
}

body[data-edition="remake"] .remake-inline-image--right {
  float: right;
  margin-left: 1.1em;
}

body[data-edition="remake"] .remake-inline-image img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 14px 32px rgb(0 0 0 / 0.5);
  filter: brightness(var(--remake-inline-brightness, 1)) brightness(var(--remake-bg-user-brightness, 1)) contrast(var(--remake-inline-contrast, 1));
}

body[data-edition="remake"] .remake-inline-image + p {
  margin-top: 0;
}

body[data-edition="remake"] .info-screen[data-remake-info="true"] .legacy-info-button {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #86d8ff;
  padding: 8px 0;
  text-align: left;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: var(--remake-body-font-size);
  line-height: 1.7;
  text-shadow: 0 2px 12px rgb(0 0 0 / 0.8);
}

body[data-edition="remake"] .info-screen[data-remake-info="true"] .legacy-info-button.remake-info-title-return {
  font-size: var(--remake-return-font-size);
}

body[data-edition="remake"] .info-screen[data-remake-info="true"] .legacy-info-button.omake-detail__back {
  font-size: var(--remake-return-font-size);
}

body[data-edition="remake"] .info-screen[data-remake-info="true"] .legacy-info-button:hover,
body[data-edition="remake"] .info-screen[data-remake-info="true"] .legacy-info-button:focus-visible {
  color: #bff0ff;
  text-decoration: underline;
  text-underline-offset: 7px;
  outline: 0;
}

body[data-edition="remake"] .info-screen[data-omake-view="index"] {
  min-height: calc(100vh - var(--remake-header-offset));
  margin-top: var(--remake-header-offset);
  background: #000;
}

body[data-edition="remake"] .info-screen[data-omake-view="index"] .reading-panel {
  width: min(820px, calc(100vw - 28px));
  margin: 0 auto;
  border: 0;
  background: transparent;
  padding: 12px 0 56px;
}

body[data-edition="remake"] .info-screen[data-omake-view="index"] .reading-panel h2 {
  display: none;
}

body[data-edition="remake"] .info-screen[data-omake-view="index"] .reading-scroll {
  max-height: none;
  overflow: visible;
  border: 0;
  background: transparent;
  padding: 0;
}

body[data-edition="remake"] .info-screen[data-omake-view="index"] .reading-actions {
  justify-content: flex-end;
  width: 100%;
  margin-top: 16px;
}

body[data-edition="remake"] .info-screen[data-omake-view="index"] .reading-extra {
  width: 100%;
  margin-top: 14px;
}

body[data-edition="remake"] .info-screen[data-omake-view="index"] .reading-extra[hidden] {
  display: none;
}

body[data-edition="remake"] .info-screen[data-omake-view="index"] .back-to-title-button--link {
  min-height: 0;
  border: 0;
  background: transparent;
  color: #86d8ff;
  padding: 8px 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: var(--remake-return-font-size);
  line-height: 1.7;
  text-decoration: none;
  text-shadow: 0 2px 12px rgb(0 0 0 / 0.9);
}

body[data-edition="remake"] .info-screen[data-omake-view="index"] .back-to-title-button--link:hover,
body[data-edition="remake"] .info-screen[data-omake-view="index"] .back-to-title-button--link:focus-visible {
  color: #bff0ff;
  text-decoration: underline;
  text-underline-offset: 7px;
  outline: 0;
}

body[data-edition="remake"] .omake-index-heading {
  position: relative;
  z-index: var(--remake-text-z);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin: 0 0 12px;
}

body[data-edition="remake"] .omake-index-title {
  min-width: 0;
  margin: 0;
  color: rgb(255 255 255 / 0.96);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: var(--remake-heading-font-size);
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  text-shadow: 0 2px 9px rgb(0 0 0 / 0.9);
}

body[data-edition="remake"] .omake-index-lead {
  position: relative;
  z-index: var(--remake-text-z);
  margin: 0 0 16px;
  color: rgb(255 255 255 / 0.9);
  font-family: "Yu Gothic", "Yu Gothic UI", "Hiragino Sans", "Meiryo", sans-serif;
  font-size: var(--remake-elder-lead-font-size);
  font-weight: 500;
  line-height: 1.55;
  text-align: left;
  text-shadow: 0 2px 7px rgb(0 0 0 / 0.9);
}

body[data-edition="remake"] .omake-index {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  margin: 0 auto;
  background: #050505;
  border: 2px solid rgb(69 54 33 / 0.72);
}

body[data-edition="remake"] .omake-progress {
  position: relative;
  z-index: var(--remake-text-z);
  display: grid;
  gap: 4px;
  width: 100%;
  margin: 14px 0 0;
  color: rgb(255 255 255 / 0.9);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  text-shadow: 0 2px 7px rgb(0 0 0 / 0.9);
}

body[data-edition="remake"] .omake-progress__row {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.6em;
}

body[data-edition="remake"] .omake-progress dt,
body[data-edition="remake"] .omake-progress dd {
  margin: 0;
}

body[data-edition="remake"] .omake-progress dd {
  min-width: 4.4em;
  text-align: left;
  color: rgb(255 244 197 / 0.95);
}

body[data-edition="remake"] .omake-debug-tools {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  margin: 0;
  color: #f8f2e7;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 14px;
}

body[data-edition="remake"] .omake-debug-tools .legacy-info-button {
  width: auto;
  min-width: 136px;
  margin: 0;
  padding: 6px 14px;
  font-size: 14px;
}

body[data-edition="remake"] .omake-debug-tools .legacy-info-button:disabled {
  cursor: default;
  opacity: 0.48;
}

body[data-edition="remake"] .omake-panel {
  position: relative;
  display: block;
  aspect-ratio: 1;
  min-width: 0;
  border: 0;
  border-right: 1px solid rgb(96 81 55 / 0.62);
  border-bottom: 1px solid rgb(96 81 55 / 0.62);
  background: transparent;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

body[data-edition="remake"] .omake-panel:hover,
body[data-edition="remake"] .omake-panel:focus-visible {
  box-shadow: inset 0 0 0 2px rgb(134 216 255 / 0.9);
  outline: 0;
}

body[data-edition="remake"] .omake-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: var(--remake-story-frame-image) center / 100% 100% no-repeat;
  pointer-events: none;
}

body[data-edition="remake"] .omake-panel[data-image-loading="true"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  width: 22px;
  height: 22px;
  border: 2px solid rgb(255 255 255 / 0.24);
  border-top-color: rgb(134 216 255 / 0.9);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: remake-image-loading-spin 0.82s linear infinite;
  pointer-events: none;
}

body[data-edition="remake"] .omake-panel[aria-disabled="true"] {
  cursor: default;
}

body[data-edition="remake"] .omake-panel:nth-child(5n) {
  border-right: 0;
}

body[data-edition="remake"] .omake-panel:nth-last-child(-n + 5) {
  border-bottom: 0;
}

body[data-edition="remake"] .omake-panel img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body[data-edition="remake"] .omake-panel__back {
  z-index: 1;
  opacity: 0.95;
}

body[data-edition="remake"] .omake-panel__icon {
  z-index: 2;
}

body[data-edition="remake"] .omake-panel__new {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 5;
  color: #ff4b4b;
  font-family: "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 8px rgb(255 0 0 / 0.8), 0 1px 4px rgb(0 0 0 / 0.88);
}

body[data-edition="remake"] .omake-detail {
  width: 100%;
}

body[data-edition="remake"] .omake-detail__start-image {
  --remake-story-frame-image: var(--remake-frame-image);
  margin-top: 0.1em;
}

body[data-edition="remake"] .omake-detail__end-image {
  --remake-story-frame-image: var(--remake-frame-image);
  margin-top: 1.25em;
}

body[data-edition="remake"] .omake-text-strong {
  font-weight: 700;
}

body[data-edition="remake"] .omake-text-red {
  color: #ff4b4b;
  text-shadow: 0 0 12px rgb(255 0 0 / 0.48), 0 2px 12px rgb(0 0 0 / 0.82);
}

body[data-edition="remake"] .omake-text-em {
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-weight: 700;
}

body[data-edition="remake"] .remake-text-dash {
  display: inline-block;
  width: calc(var(--remake-dash-count, 2) * 0.9em);
  height: 0.08em;
  margin: 0 0.03em;
  border-radius: 999px;
  background: currentColor;
  transform: translateY(-0.12em);
  vertical-align: middle;
}

body[data-edition="remake"] .omake-detail__back {
  display: block;
  margin: 1.6em 0 0 auto;
  font-size: var(--remake-return-font-size);
}

body[data-edition="remake"] .remake-info-anchor--emphasis {
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-weight: 700;
}

body[data-edition="remake"] .remake-heading-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  min-height: 1.2em;
  width: 100%;
}

body[data-edition="remake"] .remake-heading-line__title {
  min-width: 0;
}

body[data-edition="remake"] .remake-heading-line__actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
  justify-content: flex-end;
  gap: 18px;
  margin-left: auto;
}

body[data-edition="remake"] .remake-skip-link {
  flex: 0 0 auto;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #86d8ff;
  padding: 0;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 0.56em;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 2px 10px rgb(0 0 0 / 0.8);
  cursor: pointer;
}

body[data-edition="remake"] .remake-info-title-return {
  flex: 0 0 auto;
  padding: 0;
  line-height: 1;
}

body[data-edition="remake"] .remake-skip-link:hover,
body[data-edition="remake"] .remake-skip-link:focus-visible {
  color: #bff0ff;
  text-decoration: underline;
  text-underline-offset: 5px;
  outline: 0;
}

body[data-edition="remake"] .remake-hud__life {
  min-width: 96px;
  color: #fff;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  text-shadow: 0 2px 8px rgb(0 0 0 / 0.75);
  white-space: nowrap;
}

body[data-edition="remake"] .remake-hud__button {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 46px;
  height: 46px;
  border: 1px solid rgb(255 255 255 / 0.34);
  border-radius: 6px;
  background: rgb(255 255 255 / 0.07);
  color: #fff;
  padding: 0;
  cursor: pointer;
  box-shadow: inset 0 0 12px rgb(255 255 255 / 0.04);
}

body[data-edition="remake"] .remake-hud__button:hover,
body[data-edition="remake"] .remake-hud__button:focus-visible {
  border-color: rgb(134 216 255 / 0.9);
  background: rgb(134 216 255 / 0.16);
  outline: 0;
}

body[data-edition="remake"] .remake-hud__button:disabled,
body[data-edition="remake"] .remake-hud__button[aria-disabled="true"] {
  cursor: default;
  opacity: 0.82;
}

body[data-edition="remake"] .remake-hud__button[hidden] {
  display: none;
}

body[data-edition="remake"] .remake-hud__icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

body[data-edition="remake"] .remake-hud__disabled {
  z-index: 2;
  pointer-events: none;
}

body[data-edition="remake"] .remake-hud__disabled[hidden] {
  display: none;
}

body[data-edition="remake"] .remake-hud__icon img {
  display: block;
  grid-area: 1 / 1;
  width: 38px;
  height: 38px;
  filter: brightness(1.22) contrast(1.1) saturate(1.08) drop-shadow(0 0 4px rgb(255 255 255 / 0.16));
  object-fit: contain;
}

body[data-edition="remake"] .remake-hud__icon .remake-hud__disabled {
  filter: none;
}

body[data-edition="remake"] .remake-hud__fallback {
  grid-area: 1 / 1;
}

body[data-edition="remake"] .remake-hud__icon img:not([hidden]) + .remake-hud__fallback {
  display: none;
}

body[data-edition="remake"] .remake-hud__badge {
  position: absolute;
  right: 4px;
  bottom: 3px;
  display: inline-grid;
  place-items: center;
  min-width: 1.35em;
  height: auto;
  border: 1px solid rgb(248 232 183 / 0.7);
  border-radius: 999px;
  background: rgb(24 12 8 / 0.9);
  color: #f8e8b7;
  padding: 0 0.25em;
  font-family: Georgia, serif;
  font-size: clamp(11px, 1.15vw, 14px);
  font-weight: 700;
  line-height: 1.3;
  box-shadow: 0 0 8px rgb(0 0 0 / 0.65);
  z-index: 3;
}

@media (max-width: 760px) {
  body[data-edition="remake"] .remake-hud__badge {
    font-size: clamp(12px, 3.2vw, 16px);
  }
}

body[data-edition="remake"] .remake-hud__badge[hidden] {
  display: none;
}

body[data-edition="remake"] .remake-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  align-items: center;
  justify-items: center;
  background: rgb(0 0 0 / 0.58);
  box-sizing: border-box;
  padding: max(16px, env(safe-area-inset-top)) 0 max(24px, env(safe-area-inset-bottom));
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body[data-edition="remake"] .remake-overlay[hidden] {
  display: none;
}

body[data-edition="remake"] .remake-overlay__panel {
  position: relative;
  display: grid;
  align-content: center;
  gap: 14px;
  box-sizing: border-box;
  width: min(420px, calc(100vw - 40px));
  min-height: 360px;
  max-height: none;
  padding: 54px 52px 42px;
  background: url("/remake/images/ui/paper2.webp") center / 100% 100% no-repeat;
  color: #1f1712;
  filter: drop-shadow(0 20px 42px rgb(0 0 0 / 0.58));
}

body[data-edition="remake"] .remake-overlay--brightness .remake-overlay__panel {
  width: min(660px, calc(100vw - 40px));
}

body[data-edition="remake"] .remake-settings-main {
  display: grid;
  gap: 14px;
}

body[data-edition="remake"] .remake-settings-main[hidden] {
  display: none;
}

body[data-edition="remake"] .remake-overlay__panel h2 {
  margin: 0 0 4px;
  color: #1f1712;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 22px;
  text-align: center;
}

body[data-edition="remake"] .remake-bgm-control {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-weight: 700;
}

body[data-edition="remake"] .remake-bgm-control > input,
body[data-edition="remake"] .remake-volume-control,
body[data-edition="remake"] .remake-bgm-control__toggle,
body[data-edition="remake"] .remake-background-brightness-control > input {
  min-width: 0;
  width: 100%;
}

body[data-edition="remake"] .remake-volume-control {
  display: grid;
  gap: 0;
}

body[data-edition="remake"] .remake-volume-control input {
  width: 100%;
}

body[data-edition="remake"] .remake-volume-control__unsupported {
  color: #b00020;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

body[data-edition="remake"] .remake-volume-control input[hidden] ~ .remake-volume-control__ticks {
  display: none;
}

body[data-edition="remake"] .remake-volume-control__ticks {
  position: relative;
  display: block;
  height: 14px;
  color: rgb(31 23 18 / 0.72);
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
}

body[data-edition="remake"] .remake-volume-control__ticks::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 7px;
  background:
    linear-gradient(90deg, transparent 0 calc(50% + 1px), rgb(115 72 30 / 0.86) calc(50% + 1px) calc(50% + 3px), transparent calc(50% + 3px));
  pointer-events: none;
}

body[data-edition="remake"] .remake-volume-control__ticks span {
  position: absolute;
  top: 6px;
  transform: translateX(-50%);
  white-space: nowrap;
}

body[data-edition="remake"] .remake-volume-control__ticks span:nth-child(1) {
  top: 3px;
  left: 0;
  transform: none;
}

body[data-edition="remake"] .remake-volume-control__ticks span:nth-child(2) {
  left: calc(50% + 2px);
  color: #5f3518;
}

body[data-edition="remake"] .remake-volume-control__ticks span:nth-child(3) {
  top: 3px;
  right: 0;
  transform: none;
}

body[data-edition="remake"] .remake-background-brightness-control {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 12px;
  margin: 0;
  min-height: 38px;
  border: 1px solid rgb(48 34 24 / 0.55);
  border-radius: 6px;
  background: rgb(255 248 227 / 0.62);
  color: #1f1712;
  padding: 0 12px;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-weight: 700;
  cursor: pointer;
}

body[data-edition="remake"] .remake-background-brightness-control output {
  font-size: 13px;
  white-space: nowrap;
  text-align: right;
}

body[data-edition="remake"] .remake-brightness-calibration {
  display: grid;
  gap: 12px;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

body[data-edition="remake"] .remake-brightness-calibration[hidden] {
  display: none;
}

body[data-edition="remake"] .remake-brightness-calibration h3 {
  margin: 0;
  font-size: 18px;
  text-align: center;
}

body[data-edition="remake"] .remake-brightness-calibration__lead {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

body[data-edition="remake"] .remake-brightness-calibration__sample {
  position: relative;
  min-height: 300px;
  border: 1px solid rgb(48 34 24 / 0.5);
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 46%, rgb(40 52 72 / 0.38), transparent 42%),
    linear-gradient(180deg, #08090d, #020204);
  overflow: hidden;
  filter: brightness(var(--remake-calibration-image-brightness, 1));
}

@media (max-height: 640px) {
  body[data-edition="remake"] .remake-overlay {
    align-items: start;
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(86px, calc(env(safe-area-inset-bottom) + 72px));
  }

  body[data-edition="remake"] .remake-overlay--brightness .remake-overlay__panel {
    gap: 8px;
    min-height: 0;
    padding-block: 36px 28px;
  }

  body[data-edition="remake"] .remake-brightness-calibration {
    gap: 8px;
  }

  body[data-edition="remake"] .remake-brightness-calibration h3 {
    font-size: 16px;
  }

  body[data-edition="remake"] .remake-brightness-calibration__lead {
    font-size: 12px;
    line-height: 1.42;
  }

  body[data-edition="remake"] .remake-brightness-calibration__sample {
    min-height: 190px;
  }

  body[data-edition="remake"] .remake-brightness-calibration__sample-text {
    left: 18px;
    right: 18px;
    font-size: 14px;
    line-height: 1.35;
  }

  body[data-edition="remake"] .remake-brightness-calibration__sample-text--top {
    top: 14px;
  }

  body[data-edition="remake"] .remake-brightness-calibration__sample-text--bottom {
    bottom: 14px;
  }
}

@media (max-width: 520px) {
  body[data-edition="remake"] .remake-overlay {
    align-items: start;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: max(132px, calc(env(safe-area-inset-bottom) + 112px));
  }

  body[data-edition="remake"] .remake-overlay--brightness .remake-overlay__panel {
    gap: 8px;
    min-height: 0;
    padding: 34px 24px 28px;
  }

  body[data-edition="remake"] .remake-brightness-calibration {
    gap: 8px;
  }

  body[data-edition="remake"] .remake-brightness-calibration h3 {
    font-size: 17px;
  }

  body[data-edition="remake"] .remake-brightness-calibration__lead {
    font-size: 12px;
    line-height: 1.42;
  }

  body[data-edition="remake"] .remake-brightness-calibration__sample {
    min-height: 210px;
  }

  body[data-edition="remake"] .remake-brightness-calibration__sample-text {
    left: 18px;
    right: 18px;
    font-size: 14px;
    line-height: 1.34;
  }

  body[data-edition="remake"] .remake-brightness-calibration__sample-text--top {
    top: 12px;
  }

  body[data-edition="remake"] .remake-brightness-calibration__sample-text--bottom {
    bottom: 12px;
  }

  body[data-edition="remake"] .remake-brightness-calibration__range {
    gap: 8px;
    font-size: 12px;
  }

  body[data-edition="remake"] .remake-brightness-calibration__value {
    font-size: 12px;
  }
}

body[data-edition="remake"] .remake-brightness-calibration__sample img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0.96;
  filter: saturate(0.92) contrast(0.96);
  transform: translateY(calc(-5% - 30px)) scale(1.2);
  transform-origin: center top;
}

body[data-edition="remake"] .remake-brightness-calibration__sample::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / var(--remake-calibration-overlay-alpha, 0.54));
  pointer-events: none;
}

body[data-edition="remake"] .remake-brightness-calibration__sample-text {
  position: absolute;
  left: 32px;
  right: 32px;
  z-index: 1;
  color: #fff;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.45;
  text-align: left;
  text-shadow:
    0 2px 10px rgb(0 0 0 / 0.95),
    0 0 18px rgb(0 0 0 / 0.9);
}

body[data-edition="remake"] .remake-brightness-calibration__sample-text--top {
  top: 24px;
}

body[data-edition="remake"] .remake-brightness-calibration__sample-text--middle {
  top: 50%;
  transform: translateY(-50%);
}

body[data-edition="remake"] .remake-brightness-calibration__sample-text--bottom {
  bottom: 24px;
}

body[data-edition="remake"] .remake-brightness-calibration__range {
  display: grid;
  grid-template-columns: 3.5em minmax(0, 1fr) 4em;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}

body[data-edition="remake"] .remake-brightness-calibration__range input {
  width: 100%;
}

body[data-edition="remake"] .remake-brightness-calibration__value {
  min-height: 1.4em;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

body[data-edition="remake"] .remake-brightness-calibration__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body[data-edition="remake"] .remake-text-size-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 0;
  border: 1px solid rgb(48 34 24 / 0.28);
  border-radius: 6px;
  padding: 12px;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-weight: 700;
}

body[data-edition="remake"] .remake-text-size-control legend {
  padding: 0 6px;
  color: #1f1712;
  font-weight: 700;
  white-space: nowrap;
}

body[data-edition="remake"] .remake-text-size-control label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  border: 1px solid rgb(48 34 24 / 0.28);
  border-radius: 6px;
  background: rgb(255 248 227 / 0.46);
  cursor: pointer;
}

body[data-edition="remake"] .remake-text-size-control label:has(input:checked) {
  border-color: rgb(76 51 30 / 0.72);
  background: rgb(255 244 197 / 0.86);
}

body[data-edition="remake"] .remake-bgm-control__toggle,
body[data-edition="remake"] .remake-brightness-calibration__actions button,
body[data-edition="remake"] .remake-overlay__return-title,
body[data-edition="remake"] .remake-overlay__close {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  min-height: 38px;
  border: 1px solid rgb(48 34 24 / 0.55);
  border-radius: 6px;
  background: rgb(255 248 227 / 0.62);
  color: #1f1712;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-weight: 700;
  cursor: pointer;
}

body[data-edition="remake"] .remake-overlay__return-title,
body[data-edition="remake"] .remake-overlay__close {
  width: 100%;
  margin-top: 12px;
}

body[data-edition="remake"] .remake-bgm-control__toggle:hover,
body[data-edition="remake"] .remake-bgm-control__toggle:focus-visible,
body[data-edition="remake"] .remake-background-brightness-control:hover,
body[data-edition="remake"] .remake-background-brightness-control:focus-visible,
body[data-edition="remake"] .remake-brightness-calibration__actions button:hover,
body[data-edition="remake"] .remake-brightness-calibration__actions button:focus-visible,
body[data-edition="remake"] .remake-overlay__return-title:hover,
body[data-edition="remake"] .remake-overlay__return-title:focus-visible,
body[data-edition="remake"] .remake-overlay__close:hover,
body[data-edition="remake"] .remake-overlay__close:focus-visible {
  outline: 2px solid rgb(76 51 30 / 0.72);
  outline-offset: 2px;
  background: rgb(255 244 197 / 0.9);
}

body[data-edition="remake"] .remake-system-dialog {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 0.62);
  padding: 24px;
}

body[data-edition="remake"] .remake-system-dialog__paper {
  display: grid;
  align-content: center;
  gap: 22px;
  width: min(640px, calc(100vw - 40px));
  min-height: 214px;
  aspect-ratio: 3 / 1;
  padding: 40px 68px 34px;
  background: url("/remake/images/ui/paper2.webp") center / 100% 100% no-repeat;
  color: #1f1712;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  text-align: center;
  filter: drop-shadow(0 20px 42px rgb(0 0 0 / 0.58));
}

body[data-edition="remake"] .remake-system-dialog--record .remake-system-dialog__paper {
  align-content: start;
  width: min(720px, calc(100vw - 40px));
  min-height: min(680px, calc(100vh - 48px));
  aspect-ratio: auto;
  padding: 78px 68px 38px;
}

body[data-edition="remake"] .remake-system-dialog__title {
  margin: 0;
  color: #1f1712;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.25;
}

body[data-edition="remake"] .remake-system-dialog__message {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.75;
}

body[data-edition="remake"] .remake-system-dialog__record {
  display: grid;
  min-height: 0;
}

body[data-edition="remake"] .remake-system-dialog__record .remake-save-record {
  display: grid;
  gap: 10px;
}

body[data-edition="remake"] .remake-system-dialog__actions {
  display: flex;
  justify-content: center;
  gap: 22px;
}

body[data-edition="remake"] .remake-system-dialog__choice {
  min-width: 96px;
  min-height: 42px;
  border: 1px solid rgb(48 34 24 / 0.55);
  border-radius: 4px;
  background: rgb(255 248 227 / 0.72);
  color: #1f1712;
  padding: 8px 18px;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-weight: 700;
  cursor: pointer;
}

body[data-edition="remake"] .remake-system-dialog__choice:hover,
body[data-edition="remake"] .remake-system-dialog__choice:focus-visible {
  outline: 2px solid rgb(76 51 30 / 0.72);
  outline-offset: 2px;
  background: rgb(255 244 197 / 0.9);
}

body[data-edition="remake"] .ios-html-audio-pause-overlay {
  z-index: 120;
  background: rgb(0 0 0 / 0.72);
}

body[data-edition="remake"] .ios-html-audio-pause-overlay__panel {
  gap: 20px;
  width: min(420px, calc(100vw - 40px));
  min-height: 230px;
  border: 0;
  background: url("/remake/images/ui/paper2.webp") center / 100% 100% no-repeat;
  color: #1f1712;
  padding: 52px 50px 44px;
  filter: drop-shadow(0 20px 42px rgb(0 0 0 / 0.58));
}

body[data-edition="remake"] .ios-html-audio-pause-overlay__title {
  color: #1f1712;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(34px, 8vw, 46px);
  line-height: 1.1;
}

body[data-edition="remake"] .ios-html-audio-pause-overlay__button {
  min-height: 44px;
  border: 1px solid rgb(48 34 24 / 0.55);
  border-radius: 6px;
  background: rgb(255 248 227 / 0.72);
  color: #1f1712;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-weight: 700;
}

body[data-edition="remake"] .ios-html-audio-pause-overlay__button:hover,
body[data-edition="remake"] .ios-html-audio-pause-overlay__button:focus-visible {
  outline: 2px solid rgb(76 51 30 / 0.72);
  outline-offset: 2px;
  background: rgb(255 244 197 / 0.9);
}

@media (max-width: 520px) {
  body[data-edition="remake"] .remake-system-dialog {
    padding: 14px;
  }

  body[data-edition="remake"] .remake-system-dialog__paper {
    width: min(420px, calc(100vw - 28px));
    min-height: 190px;
    padding: 32px 34px 28px;
  }

  body[data-edition="remake"] .remake-system-dialog--record .remake-system-dialog__paper {
    min-height: 0;
    max-height: calc(100vh - 28px);
    padding: 44px 28px 44px;
    overflow: auto;
  }

  body[data-edition="remake"] .remake-system-dialog__message {
    font-size: 17px;
  }

  body[data-edition="remake"] .remake-system-dialog__actions {
    gap: 12px;
  }

  body[data-edition="remake"] .ios-html-audio-pause-overlay {
    padding-bottom: max(86px, calc(env(safe-area-inset-bottom) + 72px));
  }

  body[data-edition="remake"] .ios-html-audio-pause-overlay__panel {
    width: min(360px, calc(100vw - 28px));
    min-height: 220px;
    padding: 42px 34px 36px;
  }
}

body[data-edition="remake"] .status-bar {
  display: none;
}

body[data-edition="remake"] .save-screen {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--remake-header-offset) + 8px) 16px 8px;
  background: #000 url("/remake/images/ui/time-master.webp") top center / min(100vw, 820px) auto no-repeat fixed;
  overflow: hidden auto;
}

body[data-edition="remake"] .save-screen::before {
  content: "";
  position: fixed;
  inset: var(--remake-header-offset) 0 0;
  z-index: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.2), rgb(0 0 0 / 0.54) 62%, rgb(0 0 0 / 0.82));
  pointer-events: none;
}

body[data-edition="remake"] .save-room {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 860px);
  min-height: calc(100vh - var(--remake-header-offset) - 16px);
  margin: 0 auto;
  grid-template-rows: auto 1fr;
  color: #fff;
}

body[data-edition="remake"] .save-room h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

body[data-edition="remake"] .save-room__text {
  align-self: start;
  width: min(100%, 820px);
  margin: 0 auto 8px;
  border: 0;
  background: transparent;
  padding: 0;
  color: #fff;
  font-family: "Yu Gothic", "Yu Gothic UI", "Hiragino Sans", "Meiryo", sans-serif;
  font-size: var(--remake-elder-lead-font-size);
  line-height: 1.55;
  font-weight: 500;
  text-align: left;
  text-shadow: 0 2px 7px rgb(0 0 0 / 0.9);
}

body[data-edition="remake"] .save-room__text p {
  margin: 0 0 0.42em;
}

body[data-edition="remake"] .save-room__actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(78px, 1fr));
  gap: clamp(10px, 2.2vw, 24px);
  width: min(84vw, 640px);
  margin: auto auto 8px;
}

body[data-edition="remake"] .save-room__actions .remake-save-action {
  display: grid;
  gap: 6px;
  min-height: 0;
  border: 0;
  background: transparent;
  color: #f6efe0;
  padding: 0;
  cursor: pointer;
  justify-items: center;
  text-shadow: 0 2px 6px rgb(0 0 0 / 0.86);
}

body[data-edition="remake"] .save-room__actions .remake-save-action:disabled {
  cursor: default;
}

body[data-edition="remake"] .remake-save-action__icon {
  position: relative;
  display: block;
  width: clamp(68px, 9vw, 104px);
  aspect-ratio: 1;
  border: 1px solid rgb(255 255 255 / 0.36);
  background: rgb(5 8 10 / 0.42);
  padding: 6px;
  box-shadow: 0 8px 18px rgb(0 0 0 / 0.45);
  backdrop-filter: blur(2px);
}

body[data-edition="remake"] .remake-save-action__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body[data-edition="remake"] .remake-save-action__disabled {
  position: absolute;
  inset: 0;
  padding: 6px;
  box-sizing: border-box;
}

body[data-edition="remake"] .remake-save-action__label {
  max-width: 9em;
  min-height: 2.5em;
  font-size: clamp(11px, 1.35vw, 14px);
  line-height: 1.22;
}

body[data-edition="remake"] .save-record {
  align-self: end;
  width: min(100%, 860px);
  margin: 0 auto;
  border: 0;
  background: url("/remake/images/ui/paper2.webp") center / 100% 100% no-repeat;
  color: #3b3022;
  padding: clamp(18px, 2.6vw, 30px) clamp(24px, 4.6vw, 52px) clamp(20px, 2.8vw, 32px);
  text-align: center;
}

body[data-edition="remake"] .save-record > #saveRecordTitle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

body[data-edition="remake"] .remake-save-record h3 {
  margin: 0 0 6px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
}

body[data-edition="remake"] .remake-save-record__empty {
  margin: 8px 0 14px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(18px, 2.7vw, 28px);
}

body[data-edition="remake"] .remake-save-record__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px clamp(24px, 7vw, 76px);
  width: min(620px, 100%);
  margin: 0 auto 8px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(20px, 2.8vw, 32px);
  font-weight: 700;
}

body[data-edition="remake"] .remake-save-record__stats div {
  display: grid;
  grid-template-columns: 3.4em 1.6em;
  align-items: baseline;
  justify-content: center;
  gap: clamp(10px, 2vw, 24px);
}

body[data-edition="remake"] .remake-save-record__stats dt,
body[data-edition="remake"] .remake-save-record__stats dd {
  margin: 0;
}

body[data-edition="remake"] .remake-save-record__stats dt {
  text-align: left;
}

body[data-edition="remake"] .remake-save-record__stats dd {
  text-align: right;
}

body[data-edition="remake"] .remake-inventory-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  width: min(600px, 100%);
  margin: 0 auto;
  background: #050505;
  border: 2px solid rgb(69 54 33 / 0.72);
}

body[data-edition="remake"] .remake-inventory-item {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  border-right: 1px solid rgb(96 81 55 / 0.62);
  border-bottom: 1px solid rgb(96 81 55 / 0.62);
  overflow: hidden;
}

body[data-edition="remake"] .remake-inventory-item:nth-child(7n) {
  border-right: 0;
}

body[data-edition="remake"] .remake-inventory-item:nth-child(n + 8) {
  border-bottom: 0;
}

body[data-edition="remake"] .remake-inventory-item img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body[data-edition="remake"] .remake-inventory-item__back {
  opacity: 0.95;
}

body[data-edition="remake"] .remake-inventory-item__icon {
  padding: 8%;
}

body[data-edition="remake"] .remake-inventory-item__badge {
  position: absolute;
  right: 4px;
  bottom: 3px;
  min-width: 1.35em;
  border-radius: 999px;
  background: rgb(24 12 8 / 0.9);
  color: #f8e8b7;
  border: 1px solid rgb(248 232 183 / 0.7);
  font: 700 clamp(12px, 2vw, 18px) / 1.3 "Georgia", serif;
  text-align: center;
  padding: 0 0.25em;
}

body[data-edition="remake"] .dice-tray {
  display: none;
}

body[data-edition="remake"][data-state="battle"] .game-header {
  background: linear-gradient(180deg, rgb(0 0 0 / 0.76), rgb(0 0 0 / 0.18));
}

body[data-edition="remake"][data-state="battle"] .remake-hud {
  display: flex;
}

body[data-edition="remake"][data-state="battle"] .remake-hud__life,
body[data-edition="remake"][data-state="battle"] .remake-hud__button:not(.remake-hud__button--settings) {
  display: none;
}

body[data-edition="remake"] .battle-screen {
  margin: 0;
}

body[data-edition="remake"][data-state="battle"] {
  overflow: hidden;
}

body[data-edition="remake"][data-state="battle"] .battle-screen {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  background: #000;
}

body[data-edition="remake"][data-state="battle"] .scene-card,
body[data-edition="remake"][data-state="battle"] .route-history {
  display: none;
}

body[data-edition="remake"] .battle-card--remake {
  display: block;
  min-height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #000;
  color: #fff;
  padding: 0;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

body[data-edition="remake"] .battle-remake-stage {
  position: relative;
  --battle-visual-size: min(100vw, calc(100vh - var(--remake-header-offset)));
  --battle-visual-size: min(100vw, calc(100dvh - var(--remake-header-offset)));
  --battle-dice-paper-width: min(280px, calc(100vw - 48px));
  --battle-dice-paper-height: calc(var(--battle-dice-paper-width) / 1.42);
  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  padding-top: var(--remake-header-offset);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 40%, rgb(255 255 255 / 0.08), transparent 34%),
    #000;
}

body[data-edition="remake"] .battle-remake-media {
  position: absolute;
  inset: var(--remake-header-offset) 0 0;
  z-index: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
}

body[data-edition="remake"] .battle-remake-media::after {
  content: "";
  position: absolute;
  --battle-slash-width: calc(var(--battle-visual-size) * 1.42);
  --battle-slash-thickness: clamp(3px, calc(var(--battle-visual-size) * 0.007), 7px);
  top: calc(50% - var(--battle-visual-size) / 2 - var(--battle-slash-thickness) / 2);
  left: calc(50% + var(--battle-visual-size) / 2 - var(--battle-slash-width));
  z-index: 3;
  display: none;
  width: var(--battle-slash-width);
  height: var(--battle-slash-thickness);
  border-radius: 999px;
  pointer-events: none;
}

body[data-edition="remake"] .battle-remake-media img {
  width: var(--battle-visual-size);
  height: var(--battle-visual-size);
  object-fit: contain;
  filter: saturate(1.04) contrast(1.04);
}

body[data-edition="remake"] .battle-remake-effect-layer {
  position: absolute;
  inset: var(--remake-header-offset) 0 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

body[data-edition="remake"] .battle-remake-effect-layer--mid {
  z-index: 4;
}

body[data-edition="remake"] .battle-remake-effect-layer--front {
  z-index: 5;
}

body[data-edition="remake"] .remake-section-heal-effect {
  position: fixed;
  inset: 0;
  z-index: 95;
  --battle-visual-size: min(100vw, 100vh);
  min-height: 0;
  background: transparent;
  pointer-events: none;
  overflow: hidden;
}

body[data-edition="remake"] .remake-section-heal-effect .battle-remake-effect-layer {
  inset: 0;
}

body[data-edition="remake"] .battle-card--intro .battle-remake-media img {
  animation: remake-battle-enemy-intro 1450ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

body[data-edition="remake"] .battle-card--victory:not([data-battle-effect="player-hit"]) .battle-remake-media img {
  visibility: hidden;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="player-hit"] .battle-remake-media::after {
  display: block;
  background: linear-gradient(90deg, transparent, rgb(134 216 255 / 0.7) 14%, #fff 52%, rgb(255 255 255 / 0.92) 76%, transparent);
  box-shadow:
    0 0 10px rgb(255 255 255 / 0.78),
    0 0 22px rgb(134 216 255 / 0.58);
  filter: drop-shadow(0 0 12px rgb(154 232 255 / 0.74));
  transform-origin: right center;
  animation: remake-battle-slash 500ms cubic-bezier(0.16, 0.84, 0.3, 1) both;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="player-hit"] .battle-remake-media img {
  animation: remake-battle-enemy-blink 500ms steps(1, end) both;
}

body[data-edition="remake"] .battle-remake-vignette {
  position: absolute;
  inset: var(--remake-header-offset) 0 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgb(0 0 0 / 0.08), rgb(0 0 0 / 0.18) 48%, rgb(0 0 0 / 0.72)),
    radial-gradient(circle at 50% 42%, transparent 0 42%, rgb(0 0 0 / 0.34) 84%);
  pointer-events: none;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="enemy-hit"] .battle-remake-stage::after {
  content: "";
  position: absolute;
  inset: var(--remake-header-offset) 0 0;
  z-index: 7;
  background:
    radial-gradient(circle at 50% 42%, rgb(255 40 40 / 0.32), transparent 44%),
    rgb(180 0 0 / 0.28);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: remake-battle-red-flash 500ms ease-out both;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="dragon-breath-soft"] .battle-remake-effect-layer--back::before,
body[data-edition="remake"] .battle-card--remake[data-battle-effect="dragon-breath-soft"] .battle-remake-effect-layer--back::after,
body[data-edition="remake"] .battle-card--remake[data-battle-effect="dragon-breath-soft"] .battle-remake-effect-layer--front::before,
body[data-edition="remake"] .battle-card--remake[data-battle-effect="dragon-breath-soft"] .battle-remake-effect-layer--front::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  mix-blend-mode: screen;
  transform-origin: right center;
  pointer-events: none;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="dragon-breath-soft"] .battle-remake-effect-layer--back::before {
  top: 20%;
  left: 10%;
  width: 104%;
  height: 48%;
  background:
    radial-gradient(ellipse at 30% 52%, rgb(255 210 120 / 0.44), rgb(255 92 18 / 0.26) 48%, rgb(120 12 0 / 0.12) 70%, transparent 84%),
    linear-gradient(90deg, transparent 0%, rgb(255 132 34 / 0.18) 20%, rgb(170 26 0 / 0.24) 58%, transparent 94%);
  filter: blur(16px) drop-shadow(0 0 24px rgb(255 84 18 / 0.46));
  animation: remake-battle-dragon-breath-soft-cloud 960ms ease-out both;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="dragon-breath-soft"] .battle-remake-effect-layer--back::after {
  top: 32%;
  left: 13%;
  width: 88%;
  height: 24%;
  background: linear-gradient(90deg, transparent 0%, rgb(255 224 136 / 0.38) 20%, rgb(255 104 28 / 0.24) 52%, rgb(120 0 0 / 0.1) 80%, transparent 100%);
  filter: blur(14px);
  opacity: 0.82;
  animation: remake-battle-dragon-breath-soft-trail 920ms ease-out both;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="dragon-breath-soft"] .battle-remake-effect-layer--front::before {
  top: 35%;
  left: 25%;
  width: 45%;
  height: 14%;
  background: linear-gradient(90deg, transparent 0%, rgb(255 252 190 / 0.76) 20%, rgb(255 180 72 / 0.52) 48%, rgb(255 86 20 / 0.16) 78%, transparent 100%);
  filter: blur(9px) drop-shadow(0 0 16px rgb(255 174 62 / 0.42));
  animation: remake-battle-dragon-breath-soft-core 820ms ease-out both;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="dragon-breath-soft"] .battle-remake-effect-layer--front::after {
  top: 37%;
  left: 27%;
  width: 30%;
  height: 9%;
  background: linear-gradient(90deg, transparent 0%, rgb(255 255 210 / 0.72) 28%, rgb(255 208 92 / 0.28) 66%, transparent 100%);
  filter: blur(5px);
  animation: remake-battle-dragon-breath-soft-core 760ms ease-out 60ms both;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="heal-rise-blur"] .battle-remake-effect-layer--front::before,
body[data-edition="remake"] .battle-card--remake[data-battle-effect="heal-rise-blur"] .battle-remake-effect-layer--front::after,
body[data-edition="remake"] .battle-card--remake[data-battle-effect="heal-rise-blur"] .battle-remake-effect-layer--back::before,
body[data-edition="remake"] .battle-card--remake[data-battle-effect="heal-rise-blur"] .battle-remake-effect-layer--back::after,
body[data-edition="remake"] .battle-card--remake[data-battle-effect="heal-rise-blur"] .battle-remake-effect-layer--mid::before {
  content: "";
  position: absolute;
  bottom: calc(50% - var(--battle-visual-size) * 0.52);
  width: calc(var(--battle-visual-size) * var(--heal-rise-width, 0.18));
  height: calc(var(--battle-visual-size) * var(--heal-rise-height, 0.86));
  border-radius: 999px 999px 18px 18px;
  background:
    radial-gradient(ellipse at 50% 100%, rgb(var(--heal-rise-base-rgb, 190 255 225) / var(--heal-rise-base-alpha, 0.7)), transparent 28%),
    linear-gradient(0deg, transparent 0%, rgb(var(--heal-rise-low-rgb, 86 230 168) / var(--heal-rise-low-alpha, 0.2)) 16%, rgb(var(--heal-rise-core-rgb, 160 255 206) / var(--heal-rise-core-alpha, 0.82)) 46%, rgb(var(--heal-rise-tip-rgb, 190 255 248) / var(--heal-rise-tip-alpha, 0.62)) 68%, transparent 100%);
  filter:
    blur(var(--heal-rise-blur, 7px))
    drop-shadow(0 0 var(--heal-rise-glow-size, 20px) rgb(var(--heal-rise-glow-rgb, 112 255 218) / var(--heal-rise-glow-alpha, 0.66)))
    drop-shadow(0 var(--heal-rise-trail-offset, 0px) var(--heal-rise-trail-blur, 0px) rgb(var(--heal-rise-trail-rgb, 112 255 218) / var(--heal-rise-trail-alpha, 0)))
    drop-shadow(0 calc(var(--heal-rise-trail-offset, 0px) * 1.8) var(--heal-rise-trail-blur-2, 0px) rgb(var(--heal-rise-trail-rgb-2, 160 255 206) / var(--heal-rise-trail-alpha-2, 0)));
  mix-blend-mode: screen;
  opacity: 0;
  transform-origin: center bottom;
  animation: remake-battle-heal-rise var(--heal-rise-duration, 660ms) cubic-bezier(0.3, 0, 0.88, 0.42) both;
  animation-delay: var(--heal-rise-delay, 0ms);
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="heal-rise-blur"] .battle-remake-effect-layer--back::before {
  left: calc(50% - var(--battle-visual-size) * 0.38);
  --heal-rise-width: 0.12;
  --heal-rise-base-rgb: 132 244 186;
  --heal-rise-low-rgb: 64 210 145;
  --heal-rise-core-rgb: 118 235 178;
  --heal-rise-tip-rgb: 150 245 204;
  --heal-rise-glow-rgb: 86 230 168;
  --heal-rise-trail-rgb: 86 230 168;
  --heal-rise-trail-rgb-2: 132 244 186;
  --heal-rise-blur: 15px;
  --heal-rise-delay: 120ms;
  --heal-rise-glow-size: 30px;
  --heal-rise-trail-offset: 22px;
  --heal-rise-trail-blur: 20px;
  --heal-rise-trail-blur-2: 34px;
  --heal-rise-trail-alpha: 0.2;
  --heal-rise-trail-alpha-2: 0.1;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="heal-rise-blur"] .battle-remake-effect-layer--front::before {
  left: calc(50% - var(--battle-visual-size) * 0.21);
  --heal-rise-width: 0.16;
  --heal-rise-base-rgb: 178 255 224;
  --heal-rise-low-rgb: 112 245 188;
  --heal-rise-core-rgb: 166 255 218;
  --heal-rise-tip-rgb: 206 255 246;
  --heal-rise-glow-rgb: 122 255 218;
  --heal-rise-trail-rgb: 112 255 218;
  --heal-rise-trail-rgb-2: 178 255 224;
  --heal-rise-blur: 9px;
  --heal-rise-delay: 60ms;
  --heal-rise-glow-size: 30px;
  --heal-rise-trail-offset: 18px;
  --heal-rise-trail-blur: 18px;
  --heal-rise-trail-blur-2: 28px;
  --heal-rise-trail-alpha: 0.28;
  --heal-rise-trail-alpha-2: 0.13;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="heal-rise-blur"] .battle-remake-effect-layer--back::after {
  left: calc(50% + var(--battle-visual-size) * 0.05);
  --heal-rise-base-rgb: 178 255 224;
  --heal-rise-low-rgb: 112 245 188;
  --heal-rise-core-rgb: 166 255 218;
  --heal-rise-tip-rgb: 206 255 246;
  --heal-rise-glow-rgb: 122 255 218;
  --heal-rise-trail-rgb: 112 255 218;
  --heal-rise-trail-rgb-2: 178 255 224;
  --heal-rise-base-alpha: 0.86;
  --heal-rise-low-alpha: 0.2;
  --heal-rise-core-alpha: 0.68;
  --heal-rise-tip-alpha: 0.52;
  --heal-rise-glow-alpha: 0.54;
  --heal-rise-blur: 10px;
  --heal-rise-width: 0.16;
  --heal-rise-height: 0.94;
  --heal-rise-delay: 60ms;
  --heal-rise-glow-size: 28px;
  --heal-rise-trail-offset: 18px;
  --heal-rise-trail-blur: 18px;
  --heal-rise-trail-blur-2: 28px;
  --heal-rise-trail-alpha: 0.24;
  --heal-rise-trail-alpha-2: 0.11;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="heal-rise-blur"] .battle-remake-effect-layer--front::after {
  left: calc(50% + var(--battle-visual-size) * 0.26);
  --heal-rise-base-rgb: 132 244 186;
  --heal-rise-low-rgb: 64 210 145;
  --heal-rise-core-rgb: 118 235 178;
  --heal-rise-tip-rgb: 150 245 204;
  --heal-rise-glow-rgb: 86 230 168;
  --heal-rise-trail-rgb: 86 230 168;
  --heal-rise-trail-rgb-2: 132 244 186;
  --heal-rise-base-alpha: 0.46;
  --heal-rise-low-alpha: 0.12;
  --heal-rise-core-alpha: 0.34;
  --heal-rise-tip-alpha: 0.24;
  --heal-rise-glow-alpha: 0.24;
  --heal-rise-blur: 8px;
  --heal-rise-width: 0.12;
  --heal-rise-height: 0.82;
  --heal-rise-delay: 120ms;
  --heal-rise-glow-size: 28px;
  --heal-rise-trail-offset: 22px;
  --heal-rise-trail-blur: 20px;
  --heal-rise-trail-blur-2: 34px;
  --heal-rise-trail-alpha: 0.18;
  --heal-rise-trail-alpha-2: 0.09;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="heal-rise-blur"] .battle-remake-effect-layer--mid::before {
  left: calc(50% - var(--battle-visual-size) * 0.12);
  --heal-rise-width: 0.24;
  --heal-rise-height: 1;
  --heal-rise-base-rgb: 226 255 248;
  --heal-rise-low-rgb: 164 255 222;
  --heal-rise-core-rgb: 218 255 246;
  --heal-rise-tip-rgb: 238 255 255;
  --heal-rise-glow-rgb: 184 255 240;
  --heal-rise-trail-rgb: 160 255 226;
  --heal-rise-trail-rgb-2: 220 255 246;
  --heal-rise-blur: 8px;
  --heal-rise-delay: 0ms;
  --heal-rise-duration: 640ms;
  --heal-rise-base-alpha: 0.9;
  --heal-rise-low-alpha: 0.22;
  --heal-rise-core-alpha: 0.72;
  --heal-rise-tip-alpha: 0.56;
  --heal-rise-glow-alpha: 0.58;
  --heal-rise-glow-size: 32px;
  --heal-rise-trail-offset: 16px;
  --heal-rise-trail-blur: 16px;
  --heal-rise-trail-blur-2: 26px;
  --heal-rise-trail-alpha: 0.3;
  --heal-rise-trail-alpha-2: 0.14;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="kaiderinja-orb-heal"] .battle-remake-effect-layer--front {
  background: radial-gradient(circle at 50% 50%, rgb(190 235 255 / 0.22), transparent 18%);
  animation: remake-battle-kaiderinja-orb-core 1120ms ease-out both;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="kaiderinja-orb-heal"] .battle-remake-effect-layer--back::before,
body[data-edition="remake"] .battle-card--remake[data-battle-effect="kaiderinja-orb-heal"] .battle-remake-effect-layer--back::after,
body[data-edition="remake"] .battle-card--remake[data-battle-effect="kaiderinja-orb-heal"] .battle-remake-effect-layer--mid::before,
body[data-edition="remake"] .battle-card--remake[data-battle-effect="kaiderinja-orb-heal"] .battle-remake-effect-layer--mid::after,
body[data-edition="remake"] .battle-card--remake[data-battle-effect="kaiderinja-orb-heal"] .battle-remake-effect-layer--front::before,
body[data-edition="remake"] .battle-card--remake[data-battle-effect="kaiderinja-orb-heal"] .battle-remake-effect-layer--front::after {
  content: "";
  position: absolute;
  top: calc(50% - var(--orb-size, 22px) / 2);
  left: calc(50% - var(--orb-size, 22px) / 2);
  width: var(--orb-size, 22px);
  height: var(--orb-size, 22px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgb(242 255 255 / 0.96), rgb(142 224 255 / 0.8) 32%, rgb(54 142 255 / 0.42) 66%, transparent 100%);
  filter:
    blur(var(--orb-blur, 0.5px))
    drop-shadow(0 0 var(--orb-glow, 16px) rgb(92 190 255 / var(--orb-glow-alpha, 0.72)));
  mix-blend-mode: screen;
  opacity: 0;
  transform-origin: center center;
  animation: remake-battle-kaiderinja-orb-in var(--orb-duration, 1080ms) cubic-bezier(0.3, 0, 0.86, 0.44) both;
  animation-delay: var(--orb-delay, 0ms);
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="kaiderinja-orb-heal"] .battle-remake-effect-layer--back::before {
  --orb-size: clamp(14px, calc(var(--battle-visual-size) * 0.036), 28px);
  --orb-radius: calc(var(--battle-visual-size) * 0.46);
  --orb-angle-start: -162deg;
  --orb-angle-end: 198deg;
  --orb-delay: 0ms;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="kaiderinja-orb-heal"] .battle-remake-effect-layer--front::before {
  --orb-size: clamp(16px, calc(var(--battle-visual-size) * 0.042), 34px);
  --orb-radius: calc(var(--battle-visual-size) * 0.4);
  --orb-angle-start: -84deg;
  --orb-angle-end: 262deg;
  --orb-delay: 70ms;
  --orb-glow-alpha: 0.82;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="kaiderinja-orb-heal"] .battle-remake-effect-layer--mid::before {
  --orb-size: clamp(13px, calc(var(--battle-visual-size) * 0.032), 26px);
  --orb-radius: calc(var(--battle-visual-size) * 0.5);
  --orb-angle-start: -18deg;
  --orb-angle-end: 330deg;
  --orb-delay: 130ms;
  --orb-blur: 1px;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="kaiderinja-orb-heal"] .battle-remake-effect-layer--back::after {
  --orb-size: clamp(15px, calc(var(--battle-visual-size) * 0.038), 30px);
  --orb-radius: calc(var(--battle-visual-size) * 0.44);
  --orb-angle-start: 48deg;
  --orb-angle-end: 392deg;
  --orb-delay: 40ms;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="kaiderinja-orb-heal"] .battle-remake-effect-layer--front::after {
  --orb-size: clamp(12px, calc(var(--battle-visual-size) * 0.03), 24px);
  --orb-radius: calc(var(--battle-visual-size) * 0.48);
  --orb-angle-start: 116deg;
  --orb-angle-end: 466deg;
  --orb-delay: 110ms;
  --orb-blur: 1.2px;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="kaiderinja-orb-heal"] .battle-remake-effect-layer--mid::after {
  --orb-size: clamp(16px, calc(var(--battle-visual-size) * 0.04), 32px);
  --orb-radius: calc(var(--battle-visual-size) * 0.42);
  --orb-angle-start: 194deg;
  --orb-angle-end: 532deg;
  --orb-delay: 170ms;
  --orb-glow: 20px;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="kaiderinja-orb-heal"] .battle-remake-media img {
  animation: remake-battle-kaiderinja-orb-target 1120ms ease-out both;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="barrier-light-blur"] {
  --phantom-blur-strong: 6px;
  --phantom-blur-mid: 2px;
  --phantom-opacity-low: 0.48;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="barrier-light-blur"] .battle-remake-effect-layer--front::before {
  content: "";
  position: absolute;
  inset: 20%;
  background:
    radial-gradient(circle at 48% 42%, rgb(180 235 255 / 0.24), transparent 36%),
    radial-gradient(circle at 54% 56%, rgb(120 180 255 / 0.14), transparent 42%);
  filter: blur(7px) drop-shadow(0 0 12px rgb(140 210 255 / 0.32));
  mix-blend-mode: screen;
  animation: remake-battle-phantom-aura 820ms ease-out both;
}

body[data-edition="remake"] .battle-card--remake[data-battle-effect="barrier-light-blur"] .battle-remake-media img {
  animation: remake-battle-phantom-hit 900ms ease-out both;
}

body[data-edition="remake"] .battle-remake-parameter {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-content: space-between;
  gap: clamp(20px, 5vw, 72px);
  width: min(var(--battle-visual-size), calc(100vw - 24px));
  margin: 14px auto 0;
  color: #111;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  filter: drop-shadow(0 14px 24px rgb(0 0 0 / 0.56));
}

body[data-edition="remake"] .battle-card--intro .battle-remake-parameter,
body[data-edition="remake"] .battle-card--intro .battle-actions--remake {
  animation: remake-battle-ui-intro 900ms ease-out 520ms both;
}

body[data-edition="remake"] .battle-remake-actor {
  width: calc(var(--battle-visual-size) * 383 / 1254);
  min-width: 0;
  aspect-ratio: 383 / 223;
  background: url("/remake/images/ui/parameter_sheet_v2.png") center / 100% 100% no-repeat;
  padding:
    calc(var(--battle-visual-size) * 26 / 1254)
    calc(var(--battle-visual-size) * 24 / 1254)
    calc(var(--battle-visual-size) * 16 / 1254);
  text-align: center;
}

body[data-edition="remake"] .battle-remake-actor--player {
  justify-self: start;
}

body[data-edition="remake"] .battle-remake-actor--enemy {
  justify-self: end;
}

body[data-edition="remake"] .battle-remake-actor__hp,
body[data-edition="remake"] .battle-remake-actor__stats {
  transform: translateY(calc(var(--battle-visual-size) * 31 / 1254));
}

body[data-edition="remake"] .battle-remake-actor__name {
  overflow: hidden;
  font-size: clamp(12px, calc(var(--battle-visual-size) * 30 / 1254), 30px);
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-edition="remake"] .battle-remake-actor__hp {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: calc(var(--battle-visual-size) * 8 / 1254);
  margin-top: calc(var(--battle-visual-size) * 10 / 1254);
  line-height: 1;
}

body[data-edition="remake"] .battle-remake-actor__hp span {
  font-size: clamp(10px, calc(var(--battle-visual-size) * 22 / 1254), 22px);
}

body[data-edition="remake"] .battle-remake-actor__hp b {
  min-width: 1.7em;
  font-size: clamp(18px, calc(var(--battle-visual-size) * 42 / 1254), 42px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

body[data-edition="remake"] .battle-remake-actor__stats {
  display: flex;
  justify-content: center;
  gap: calc(var(--battle-visual-size) * 18 / 1254);
  margin-top: calc(var(--battle-visual-size) * 8 / 1254);
  font-size: clamp(10px, calc(var(--battle-visual-size) * 22 / 1254), 22px);
  line-height: 1.2;
}

body[data-edition="remake"] .battle-remake-dice {
  position: relative;
  z-index: 6;
  justify-content: center;
  min-height: 0;
  margin: 8px auto 0;
}

body[data-edition="remake"] .battle-remake-bottom {
  position: absolute;
  bottom: 34px;
  left: 50%;
  z-index: 6;
  display: grid;
  gap: 18px;
  width: min(900px, calc(100vw - 160px));
  transform: translateX(-50%);
}

body[data-edition="remake"] .battle-card--message .battle-actions--remake {
  display: none;
}

body[data-edition="remake"] .battle-message--remake {
  position: absolute;
  top: min(calc(100vh - 180px), calc(50vh + var(--battle-dice-paper-height) / 2 + 16px));
  top: min(calc(100dvh - 180px), calc(50dvh + var(--battle-dice-paper-height) / 2 + 16px));
  left: 50%;
  z-index: 6;
  display: block;
  width: min(620px, calc(100vw - 48px));
  box-sizing: border-box;
  min-height: 0;
  max-height: calc(1.58em * 4 + 78px);
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: rgb(18 18 18 / 0.78);
  color: #fff;
  padding: 14px 18px;
  overflow: hidden;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: calc(var(--remake-return-font-size) * 0.9);
  line-height: 1.58;
  text-align: left;
  text-shadow: 0 2px 10px rgb(0 0 0 / 0.9);
  box-shadow: 0 18px 36px rgb(0 0 0 / 0.42);
  overflow-wrap: break-word;
  transform: translateX(-50%);
  white-space: pre-line;
  word-break: normal;
}

body[data-edition="remake"] .battle-message--remake:empty {
  display: none;
}

body[data-edition="remake"] .battle-message--remake .battle-result--remake {
  display: flex;
  justify-content: flex-start;
  margin-top: 0;
}

body[data-edition="remake"] .battle-message--remake .battle-result--remake button {
  width: auto;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #9de8ff;
  padding: 0;
  font: inherit;
  line-height: 1.35;
  text-align: left;
  text-shadow: 0 2px 8px rgb(0 0 0 / 0.82);
}

body[data-edition="remake"] .battle-message--remake .battle-result--remake button:hover,
body[data-edition="remake"] .battle-message--remake .battle-result--remake button:focus-visible {
  color: #d8f4ff;
  text-decoration: underline;
  text-underline-offset: 7px;
  background: transparent;
  outline: 0;
}

body[data-edition="remake"] .battle-actions--remake {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(24px, 9vw, 140px);
  margin: 0;
}

body[data-edition="remake"] .battle-command {
  position: relative;
  display: grid;
  place-items: center;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  width: clamp(92px, 15vw, 150px);
  aspect-ratio: 1;
  min-height: 0;
  border: 1px solid rgb(255 255 255 / 0.34);
  border-radius: 8px;
  background: rgb(0 0 0 / 0.58);
  color: #fff;
  padding: 10px;
  box-shadow: 0 16px 32px rgb(0 0 0 / 0.44);
}

body[data-edition="remake"] .battle-command:hover,
body[data-edition="remake"] .battle-command:focus-visible {
  border-color: rgb(134 216 255 / 0.94);
  background: rgb(12 30 42 / 0.68);
  outline: 0;
}

body[data-edition="remake"] .battle-command:disabled {
  cursor: default;
  opacity: 0.52;
}

body[data-edition="remake"] .battle-command img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgb(0 0 0 / 0.58));
}

body[data-edition="remake"] .battle-command span {
  position: absolute;
  right: 8px;
  bottom: 6px;
  left: 8px;
  overflow: hidden;
  color: #fff;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: clamp(12px, 1.7vw, 16px);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 2px 8px rgb(0 0 0 / 0.9);
  white-space: nowrap;
}

body[data-edition="remake"] .battle-command__badge {
  position: absolute;
  right: 6px;
  bottom: 4px;
  display: inline-grid;
  place-items: center;
  min-width: 1.35em;
  height: auto;
  border: 1px solid rgb(248 232 183 / 0.7);
  border-radius: 999px;
  background: rgb(24 12 8 / 0.9);
  color: #f8e8b7;
  padding: 0 0.25em;
  font-family: Georgia, serif;
  font-size: clamp(12px, 2vw, 18px);
  font-weight: 700;
  line-height: 1.3;
  box-shadow: 0 0 8px rgb(0 0 0 / 0.65);
}

body[data-edition="remake"] .battle-result--remake {
  justify-items: start;
  margin: 0;
  padding: 0;
  border: 0;
}

body[data-edition="remake"] .battle-result--remake button {
  width: auto;
}

@keyframes remake-battle-enemy-intro {
  from {
    opacity: 0;
    transform: scale(1.2);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes remake-battle-ui-intro {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body[data-edition="remake"] .remake-dice-overlay {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: grid;
  place-items: center;
  pointer-events: none;
}

body[data-edition="remake"] .remake-dice-overlay[hidden] {
  display: none;
}

body[data-edition="remake"] .remake-dice-overlay__paper {
  display: grid;
  grid-template-rows: minmax(32px, auto) auto;
  place-items: center;
  align-content: center;
  gap: 8px;
  width: var(--battle-dice-paper-width, min(280px, calc(100vw - 48px)));
  aspect-ratio: 1.42;
  background: url("/remake/images/ui/paper.webp") center / contain no-repeat;
  filter: drop-shadow(0 24px 42px rgb(0 0 0 / 0.62));
}

body[data-edition="remake"] .remake-dice-overlay__guide {
  max-width: 82%;
  min-height: 24px;
  color: #20170f;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: clamp(12px, 2.9vw, 16px);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  text-shadow: 0 1px 0 rgb(255 255 255 / 0.45);
}

body[data-edition="remake"] .remake-dice-overlay__guide[hidden] {
  visibility: hidden;
}

body[data-edition="remake"] .remake-dice-overlay__guide-number {
  color: #9f1f18;
  font-size: 1.15em;
  font-weight: 800;
}

body[data-edition="remake"] .remake-dice-overlay__guide-lines {
  display: grid;
  gap: 1px;
  line-height: 1.35;
}

body[data-edition="remake"] .remake-dice-overlay__dice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vw, 34px);
  padding-top: 4px;
}

body[data-edition="remake"] .remake-dice-overlay__dice img {
  width: clamp(58px, 12vw, 86px);
  height: clamp(58px, 12vw, 86px);
  object-fit: contain;
  image-rendering: auto;
  filter: drop-shadow(0 6px 10px rgb(0 0 0 / 0.42));
}

body[data-edition="remake"] .remake-dice-overlay__dice.dice-tray--rolling img {
  transform: translateY(-2px) rotate(-3deg);
}

body[data-edition="remake"] .play-screen {
  position: relative;
  min-height: 100vh;
  overflow: visible;
  background: #000;
  touch-action: manipulation;
}

body[data-edition="remake"] .scene-card {
  display: block;
  width: 100%;
  position: relative;
  min-height: 100vh;
  margin: 0;
  border: 0;
  background: #000;
  overflow: visible;
}

body[data-edition="remake"] .scene-card::after {
  content: "";
  position: fixed;
  top: var(--remake-header-offset);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--remake-overlay-z);
  background: rgb(0 0 0 / clamp(0.2, calc(var(--remake-overlay-alpha, 0.62) + var(--remake-overlay-alpha-boost, 0) + var(--remake-overlay-alpha-device-bias, 0) + var(--remake-overlay-alpha-user-adjust, 0)), 0.82));
  opacity: 1;
  pointer-events: none;
}

body[data-edition="remake"] .scene-card::before {
  content: "";
  position: fixed;
  top: var(--remake-header-offset);
  left: 50%;
  z-index: var(--remake-frame-z);
  width: var(--remake-visual-size);
  height: var(--remake-visual-size);
  transform: translateX(-50%);
  pointer-events: none;
  background: var(--remake-frame-image) center / var(--remake-visual-fit) no-repeat;
}

body[data-edition="remake"] .scene-media {
  position: fixed;
  top: var(--remake-header-offset);
  left: 50%;
  z-index: var(--remake-media-z);
  display: block;
  box-sizing: border-box;
  width: var(--remake-visual-size);
  height: var(--remake-visual-size);
  margin: 0;
  border: 0;
  background: #000;
  padding: var(--remake-frame-edge-cover);
  transform: translateX(-50%);
  overflow: hidden;
}

body[data-edition="remake"] .scene-media img {
  width: 100%;
  height: 100%;
  object-fit: var(--remake-visual-fit);
  transform: scale(1);
  filter: brightness(var(--remake-bg-brightness, 1)) brightness(var(--remake-bg-user-brightness, 1)) contrast(var(--remake-bg-contrast, 1));
}

body[data-edition="remake"] .scene-main {
  position: relative;
  z-index: var(--remake-text-z);
  width: var(--remake-content-width);
  min-height: 100vh;
  margin: 0 auto;
  padding: 84px 0 96px;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
}

body[data-edition="remake"] .scene-main input,
body[data-edition="remake"] .scene-main textarea {
  user-select: text;
  -webkit-user-select: text;
}

body[data-edition="remake"] .scene-main h2 {
  margin: 0 0 14px;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: var(--remake-body-font-size);
  font-weight: 700;
  color: #fff;
}

body[data-edition="remake"] .play-screen[data-remake-text-visible="false"] .scene-main h2,
body[data-edition="remake"] .play-screen[data-remake-text-visible="false"] .scene-text,
body[data-edition="remake"] .play-screen[data-remake-text-visible="false"] .choices,
body[data-edition="remake"] .play-screen[data-remake-text-visible="false"] .utility-actions,
body[data-edition="remake"] .play-screen[data-remake-text-visible="false"] .dice-tray {
  display: none;
}

body[data-edition="remake"] .play-screen[data-remake-text-visible="false"] .scene-card::after {
  display: none;
}

body[data-edition="remake"] .scene-text {
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0 auto;
  border: 0;
  background: transparent;
  padding: 0;
  color: #fff;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: var(--remake-body-font-size);
  line-height: 2;
  text-shadow: 0 2px 12px rgb(0 0 0 / 0.78);
}

body[data-edition="remake"] .scene-text .legacy-text-style,
body[data-edition="remake"] .scene-text .legacy-text-color-black {
  color: inherit;
}

body[data-edition="remake"] .scene-text .legacy-text-gothic {
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

body[data-edition="remake"] .scene-text .legacy-text-color-red {
  color: #ff3b30;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-weight: 700;
}

body[data-edition="remake"] .scene-text .legacy-align-center {
  text-align: left;
}

body[data-edition="remake"] .scene-text p {
  margin: 0 0 1em;
}

body[data-edition="remake"][data-ending-page="true"] .scene-text table {
  width: 100%;
  border-spacing: 0;
}

body[data-edition="remake"][data-ending-page="true"] .scene-text td {
  padding: 0;
}

body[data-edition="remake"] .remake-ending-message {
  position: relative;
  width: 100%;
  margin: 1.5em 0 0;
  background: url("/remake/images/ui/paper2.webp") center / 100% 100% no-repeat;
  color: #2a2118;
  padding: clamp(54px, calc(5vw + 24px), 80px) clamp(60px, calc(6vw + 24px), 96px);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: clamp(19px, 2.3vw, 29px);
  line-height: 1.75;
  text-shadow: none;
  box-sizing: border-box;
}

body[data-edition="remake"] .remake-ending-message .legacy-text-style,
body[data-edition="remake"] .remake-ending-message .legacy-text-color-white,
body[data-edition="remake"] .remake-ending-message .legacy-text-color-yellow {
  color: inherit;
}

body[data-edition="remake"] .remake-ending-message .legacy-text-color-red {
  color: #b41622;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 1.35em;
  font-weight: 700;
}

body[data-edition="remake"] .remake-ending-message__credit {
  display: block;
  max-width: calc(100% - clamp(86px, 12vw, 140px));
  font-size: 0.46em;
  line-height: 1.45;
}

body[data-edition="remake"] .remake-ending-message__fin {
  position: absolute;
  right: clamp(128px, calc(4vw + 100px), 152px);
  bottom: clamp(64px, calc(3.5vw + 40px), 86px);
  width: clamp(70px, 10vw, 118px);
  height: auto;
  pointer-events: none;
}

body[data-edition="remake"] .remake-ending-message .legacy-info-button {
  display: none;
  margin-top: 0.8em;
  color: #5b2f24;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 0.8em;
  font-weight: 700;
  text-shadow: none;
}

body[data-edition="remake"] .input-choice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}

body[data-edition="remake"] .input-choice p {
  flex: 0 0 100%;
  color: #fff;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: var(--remake-body-font-size);
  line-height: 1.7;
  text-shadow: 0 2px 12px rgb(0 0 0 / 0.8);
}

body[data-edition="remake"] .input-choice[data-input-choice="sec54_call_master"] p,
body[data-edition="remake"] .input-choice[data-input-choice="sec55_open_route"] p {
  font-family: "Yu Gothic", "Yu Gothic UI", "Hiragino Sans", "Meiryo", sans-serif;
  font-size: calc(var(--remake-body-font-size) * 0.9);
}

body[data-edition="remake"] .input-choice button {
  flex: 0 0 auto;
  width: auto;
}

body[data-edition="remake"] .input-choice__fields {
  flex: 0 0 auto;
}

body[data-edition="remake"] .choices {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: none;
  margin: 34px auto 0;
}

body[data-edition="remake"] .ending-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
}

body[data-edition="remake"] .choices button,
body[data-edition="remake"] .utility-actions button {
  min-height: 0;
  width: fit-content;
  max-width: 100%;
  justify-self: start;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #86d8ff;
  padding: 6px 0;
  text-align: left;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: var(--remake-body-font-size);
  line-height: 1.7;
  text-shadow: 0 2px 12px rgb(0 0 0 / 0.8);
}

body[data-edition="remake"] .choices button:hover,
body[data-edition="remake"] .choices button:focus-visible,
body[data-edition="remake"] .utility-actions button:hover,
body[data-edition="remake"] .utility-actions button:focus-visible {
  color: #bff0ff;
  text-decoration: underline;
  text-underline-offset: 7px;
  outline: 0;
}

body[data-edition="remake"] .choices .ending-share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 2px solid #777;
  border-radius: 4px;
  background: #111;
  color: #fff;
  padding: 0 16px;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  text-shadow: none;
}

body[data-edition="remake"] .choices .ending-share-link:hover,
body[data-edition="remake"] .choices .ending-share-link:focus-visible {
  border-color: #e7c66f;
  outline: none;
}

body[data-edition="remake"][data-remake-content-fade="true"] .scene-main,
body[data-edition="remake"][data-remake-content-fade="true"] .scene-card::after {
  animation: remake-readable-fade-in var(--remake-readable-fade-ms, 240ms) ease-out both;
}

body[data-edition="remake"][data-remake-content-fade="true"][data-remake-background-fade="true"] .scene-main,
body[data-edition="remake"][data-remake-content-fade="true"][data-remake-background-fade="true"] .scene-card::after {
  animation-delay: var(--remake-readable-fade-delay-ms, 300ms);
}

body[data-edition="remake"][data-remake-content-fade="true"] .scene-main {
  pointer-events: none;
}

body[data-edition="remake"][data-remake-content-fade="true"][data-remake-background-fade="true"] .scene-media {
  animation: remake-background-fade-in var(--remake-background-fade-ms, 500ms) ease-out both;
}

@keyframes remake-background-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes remake-readable-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes remake-battle-slash {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(-45deg) scaleX(0.018);
  }

  16% {
    opacity: 0.78;
    transform: translate(calc(var(--battle-visual-size) * -0.16), calc(var(--battle-visual-size) * 0.16)) rotate(-45deg) scaleX(0.08);
  }

  36% {
    opacity: 1;
    transform: translate(calc(var(--battle-visual-size) * -0.36), calc(var(--battle-visual-size) * 0.36)) rotate(-45deg) scaleX(0.44);
  }

  50% {
    opacity: 1;
    transform: translate(calc(var(--battle-visual-size) * -0.5), calc(var(--battle-visual-size) * 0.5)) rotate(-45deg) scaleX(0.62);
  }

  64% {
    opacity: 0.94;
    transform: translate(calc(var(--battle-visual-size) * -0.64), calc(var(--battle-visual-size) * 0.64)) rotate(-45deg) scaleX(0.38);
  }

  84% {
    opacity: 0.42;
    transform: translate(calc(var(--battle-visual-size) * -0.84), calc(var(--battle-visual-size) * 0.84)) rotate(-45deg) scaleX(0.07);
  }

  100% {
    opacity: 0;
    transform: translate(calc(var(--battle-visual-size) * -1), var(--battle-visual-size)) rotate(-45deg) scaleX(0.018);
  }
}

@keyframes remake-battle-enemy-blink {
  0%,
  13%,
  26%,
  39%,
  52%,
  65%,
  78%,
  100% {
    opacity: 1;
  }

  7%,
  20%,
  33%,
  46%,
  59%,
  72% {
    opacity: 0.32;
  }
}

@keyframes remake-battle-red-flash {
  0% {
    opacity: 0;
  }

  16% {
    opacity: 1;
  }

  42% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes remake-battle-dragon-breath-soft-cloud {
  0% {
    opacity: 0;
    transform: translateX(18%) scaleX(0.46);
  }

  36% {
    opacity: 1;
    transform: translateX(-3%) scaleX(1);
  }

  100% {
    opacity: 0;
    transform: translateX(-20%) scaleX(1.08);
  }
}

@keyframes remake-battle-dragon-breath-soft-trail {
  0% {
    opacity: 0;
    transform: translateX(20%) scaleX(0.32);
  }

  30% {
    opacity: 0.82;
    transform: translateX(-2%) scaleX(0.92);
  }

  100% {
    opacity: 0;
    transform: translateX(-24%) scaleX(1.18);
  }
}

@keyframes remake-battle-dragon-breath-soft-core {
  0% {
    opacity: 0;
    transform: translateX(22%) scaleX(0.26);
  }

  32% {
    opacity: 0.92;
    transform: translateX(-4%) scaleX(1);
  }

  100% {
    opacity: 0;
    transform: translateX(-26%) scaleX(1.22);
  }
}

@keyframes remake-battle-heal-rise {
  0% {
    opacity: 0;
    transform: translateY(52%) scaleX(1) scaleY(1);
  }

  18% {
    opacity: 0.2;
    transform: translateY(40%) scaleX(1) scaleY(1);
  }

  42% {
    opacity: 0.62;
    transform: translateY(16%) scaleX(1) scaleY(1);
  }

  68% {
    opacity: 0.48;
    transform: translateY(-36%) scaleX(1) scaleY(1);
  }

  86% {
    opacity: 0.16;
    transform: translateY(-66%) scaleX(1) scaleY(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-84%) scaleX(1) scaleY(1);
  }
}

@keyframes remake-battle-kaiderinja-orb-in {
  0% {
    opacity: 0;
    transform: rotate(var(--orb-angle-start)) translateX(var(--orb-radius)) scale(0.55);
  }

  12% {
    opacity: 0.86;
  }

  58% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: rotate(var(--orb-angle-end)) translateX(0) scale(0.24);
  }
}

@keyframes remake-battle-kaiderinja-orb-core {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.9);
  }

  58% {
    opacity: 0.84;
    transform: scale(1.02);
  }
}

@keyframes remake-battle-kaiderinja-orb-target {
  0%,
  100% {
    filter: saturate(1.06) contrast(1.05);
  }

  58% {
    filter: saturate(1.18) contrast(1.08) drop-shadow(0 0 20px rgb(92 190 255 / 0.38));
  }
}

@keyframes remake-battle-phantom-aura {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }

  32% {
    opacity: 0.78;
    transform: scale(1.04);
  }

  100% {
    opacity: 0;
    transform: scale(1.16);
  }
}

@keyframes remake-battle-phantom-hit {
  0% {
    opacity: 1;
    filter: saturate(1.06) contrast(1.05) blur(0);
    transform: translate(0, 0) scale(1);
  }

  20% {
    opacity: 0.62;
    filter: saturate(0.82) contrast(0.9) blur(6px);
    transform: scale(1.005);
  }

  42% {
    opacity: var(--phantom-opacity-low, 0.34);
    filter: saturate(0.68) contrast(0.84) blur(var(--phantom-blur-strong, 12px));
    transform: scale(1.012);
  }

  68% {
    opacity: 0.76;
    filter: saturate(0.9) contrast(0.95) blur(var(--phantom-blur-mid, 5px));
    transform: scale(1.004);
  }

  100% {
    opacity: 1;
    filter: saturate(1.06) contrast(1.05) blur(0);
    transform: translate(0, 0) scale(1);
  }
}

@media (max-width: 760px) {
  body[data-edition="remake"] {
    --remake-header-offset: var(--remake-measured-header-offset, 152px);
    --remake-body-font-size: var(--remake-body-font-size-mobile);
    --remake-return-font-size: var(--remake-return-font-size-mobile);
    --remake-heading-font-size: var(--remake-heading-font-size-mobile);
    --remake-elder-lead-font-size: var(--remake-elder-lead-font-size-mobile);
    --remake-overlay-alpha-boost: 0;
    --remake-overlay-alpha-device-bias: 0;
  }

  body[data-edition="remake"][data-remake-text-size="large"],
  body[data-edition="remake"][data-remake-text-size="small"] {
    --remake-body-font-size: var(--remake-body-font-size-mobile);
    --remake-return-font-size: var(--remake-return-font-size-mobile);
    --remake-heading-font-size: var(--remake-heading-font-size-mobile);
    --remake-elder-lead-font-size: var(--remake-elder-lead-font-size-mobile);
  }

  body[data-edition="remake"] .scene-card::after {
    background: rgb(0 0 0 / clamp(0.2, calc(var(--remake-overlay-alpha, 0.36) + var(--remake-overlay-alpha-boost, 0) + var(--remake-overlay-alpha-device-bias, 0) + var(--remake-overlay-alpha-user-adjust, 0)), 0.82));
  }

  body[data-edition="remake"] .remake-overlay__panel {
    width: min(420px, calc(100vw - 32px));
    padding: 58px 36px 46px;
  }

  body[data-edition="remake"] .remake-background-brightness-control {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  body[data-edition="remake"] .remake-overlay--brightness .remake-overlay__panel {
    width: min(660px, calc(100vw - 32px));
    padding-inline: 24px;
  }

  body[data-edition="remake"] .title-panel {
    gap: 14px;
    padding: 10px 18px 48px;
  }

  body[data-edition="remake"] .remake-title-visual {
    width: min(58vh, 92vw);
  }

  body[data-edition="remake"] .title-actions {
    gap: 5px;
    width: calc(100vw - 36px);
  }

  body[data-edition="remake"] .title-actions a,
  body[data-edition="remake"] .title-actions button {
    font-size: 23px;
    line-height: 1.38;
  }

  body[data-edition="remake"] .omake-index {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body[data-edition="remake"] .omake-panel:nth-child(5n) {
    border-right: 1px solid rgb(96 81 55 / 0.62);
  }

  body[data-edition="remake"] .omake-panel:nth-child(3n) {
    border-right: 0;
  }

  body[data-edition="remake"] .omake-panel:nth-last-child(-n + 5) {
    border-bottom: 1px solid rgb(96 81 55 / 0.62);
  }

  body[data-edition="remake"] .omake-panel:nth-last-child(-n + 3) {
    border-bottom: 0;
  }

  body[data-edition="remake"] .title-credit {
    bottom: 7px;
    font-size: 10px;
  }

  body[data-edition="remake"] .title-footer {
    bottom: 28px;
    font-size: 12px;
  }

  body[data-edition="remake"][data-state="battle"] {
    --remake-header-offset: var(--remake-measured-header-offset, 118px);
  }

  body[data-edition="remake"] .remake-hud {
    gap: 8px;
  }

  body[data-edition="remake"] .remake-hud__button {
    width: 44px;
    height: 44px;
  }

  body[data-edition="remake"] .remake-hud__icon,
  body[data-edition="remake"] .remake-hud__icon img {
    width: 36px;
    height: 36px;
  }

  body[data-edition="remake"] .battle-remake-stage {
    --battle-visual-size: 100vw;
    --battle-actor-width: min(184px, calc((100vw - 12px) / 2));
  }

  body[data-edition="remake"] .battle-remake-media {
    align-items: center;
    box-sizing: border-box;
    padding-top: 0;
  }

  body[data-edition="remake"] .battle-card--remake[data-battle-enemy="kaiderinjaTrue"] .battle-remake-media {
    transform: translateY(calc(var(--battle-actor-width) * 223 / 383 * 0.24));
  }

  body[data-edition="remake"] .scene-main {
    width: var(--remake-content-width-mobile);
    padding: calc(var(--remake-header-offset) + 32px) 0 84px;
  }

  body[data-edition="remake"] .info-screen[data-remake-info="true"] .reading-panel {
    width: var(--remake-content-width-mobile);
    padding: 16px 0 84px;
  }

  body[data-edition="remake"] .info-screen[data-remake-info="true"] .reading-scroll {
    font-size: var(--remake-body-font-size);
  }

  body[data-edition="remake"] .info-screen[data-remake-info="true"] .legacy-info-button {
    font-size: var(--remake-body-font-size);
  }

  body[data-edition="remake"] .remake-author-message__archive {
    padding-top: clamp(44px, 12vw, 78px);
  }

  body[data-edition="remake"] .remake-inline-image {
    float: none;
    width: min(100%, 420px);
    margin: 0.5em auto 1em;
  }

  body[data-edition="remake"] .scene-text,
  body[data-edition="remake"] .input-choice p,
  body[data-edition="remake"] .choices button,
  body[data-edition="remake"] .utility-actions button {
    font-size: var(--remake-body-font-size);
  }

  body[data-edition="remake"] .remake-ending-message {
    margin-top: 1em;
    padding: 38px 34px 72px;
    font-size: 20px;
    line-height: 1.62;
  }

  body[data-edition="remake"] .remake-ending-message__credit {
    max-width: calc(100% - 106px);
    font-size: 0.42em;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  body[data-edition="remake"] .remake-ending-message__fin {
    right: 32px;
    bottom: 44px;
    width: 74px;
  }

  body[data-edition="remake"] .battle-remake-parameter {
    grid-template-columns: auto auto;
    gap: 4px;
    width: calc(100vw - 8px);
    margin-top: 12px;
  }

  body[data-edition="remake"] .battle-remake-actor {
    width: var(--battle-actor-width);
    padding:
      calc(var(--battle-actor-width) * 26 / 383)
      calc(var(--battle-actor-width) * 18 / 383)
      calc(var(--battle-actor-width) * 14 / 383);
  }

  body[data-edition="remake"] .battle-remake-actor__name {
    font-size: clamp(13px, calc(var(--battle-actor-width) * 24 / 383), 18px);
  }

  body[data-edition="remake"] .battle-remake-actor__hp {
    gap: 4px;
    transform: translateY(calc(var(--battle-visual-size) * 31 / 1254 + 12px));
  }

  body[data-edition="remake"] .battle-remake-actor__hp span {
    font-size: clamp(11px, calc(var(--battle-actor-width) * 18 / 383), 13px);
  }

  body[data-edition="remake"] .battle-remake-actor__hp b {
    font-size: clamp(20px, calc(var(--battle-actor-width) * 38 / 383), 29px);
  }

  body[data-edition="remake"] .battle-remake-actor__stats {
    flex-wrap: nowrap;
    gap: 6px;
    font-size: clamp(10px, calc(var(--battle-actor-width) * 18 / 383), 13px);
    transform: translateY(calc(var(--battle-visual-size) * 31 / 1254 + 12px));
  }

  body[data-edition="remake"] .battle-remake-bottom {
    top: min(calc(100vh - 126px), calc(var(--remake-header-offset) + (100vh - var(--remake-header-offset)) * 0.68));
    bottom: auto;
    width: calc(100vw - 48px);
  }

  body[data-edition="remake"] .battle-message--remake {
    max-height: none;
    width: calc(100vw - 4px);
    padding: 12px 14px;
    font-size: calc(var(--remake-return-font-size) * 0.9);
  }

  body[data-edition="remake"] .battle-actions--remake {
    gap: 28px;
  }
}

@media (max-width: 360px) {
  body[data-edition="remake"] .omake-index {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-edition="remake"] .omake-panel:nth-child(3n),
  body[data-edition="remake"] .omake-panel:nth-child(4n),
  body[data-edition="remake"] .omake-panel:nth-child(5n) {
    border-right: 1px solid rgb(96 81 55 / 0.62);
  }

  body[data-edition="remake"] .omake-panel:nth-child(2n) {
    border-right: 0;
  }

  body[data-edition="remake"] .omake-panel:nth-last-child(-n + 3),
  body[data-edition="remake"] .omake-panel:nth-last-child(-n + 4),
  body[data-edition="remake"] .omake-panel:nth-last-child(-n + 5) {
    border-bottom: 1px solid rgb(96 81 55 / 0.62);
  }

  body[data-edition="remake"] .omake-panel:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 520px) {
  body[data-edition="remake"] .remake-overlay--brightness {
    align-items: start;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: max(132px, calc(env(safe-area-inset-bottom) + 112px));
  }

  body[data-edition="remake"] .remake-overlay--brightness .remake-overlay__panel {
    gap: 8px;
    min-height: 0;
    width: min(420px, calc(100vw - 32px));
    padding: 34px 24px 28px;
  }

  body[data-edition="remake"] .remake-overlay--brightness .remake-brightness-calibration {
    gap: 8px;
  }

  body[data-edition="remake"] .remake-overlay--brightness .remake-brightness-calibration__lead {
    font-size: 12px;
    line-height: 1.42;
  }

  body[data-edition="remake"] .remake-overlay--brightness .remake-brightness-calibration__sample {
    min-height: 190px;
  }

  body[data-edition="remake"] .remake-overlay--brightness .remake-brightness-calibration__sample-text {
    left: 18px;
    right: 18px;
    font-size: 14px;
    line-height: 1.34;
  }

  body[data-edition="remake"] .remake-overlay--brightness .remake-brightness-calibration__sample-text--top {
    top: 12px;
  }

  body[data-edition="remake"] .remake-overlay--brightness .remake-brightness-calibration__sample-text--bottom {
    bottom: 12px;
  }
}

@media (max-width: 520px) {
  body[data-edition="remake"] .remake-overlay.remake-title-settings-guide {
    padding-top: max(92px, calc(env(safe-area-inset-top) + 84px));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}
