/* ==========================================================================
   星霜のフロンティア - スタイルシート
   DQ風「白枠・黒背景・等幅フォント」のUIを基本方針とする。
   ========================================================================== */

/* "DQFont" は外部フォントファイルを同梱していないため実体は存在しない。
   local() 参照のみのため常にフォールバック(等幅な日本語フォント)に落ちる。
   半角英数字と全角文字の字幅ズレを避けるため、フォールバック先も等幅ベースの
   ゴシック体に固定し、汎用 monospace には頼らない。 */
@font-face {
  font-family: "DQFont";
  src: local("MS Gothic"), local("Yu Gothic"), local("Meiryo");
}

:root {
  --dq-bg: #000000;
  --dq-border: #ffffff;
  --dq-border-inner: #4a4a8a;
  --dq-text: #ffffff;
  --dq-accent: #ffe15a;
  --dq-hp: #4caf50;
  --dq-hp-low: #e53935;
  --dq-mp: #4aa3ff;
  --dq-cursor: #ffe15a;
  --dq-disabled: #777777;
  --dq-shop-highlight: #2a2a5a;
  --dq-warn: #ff9f1c;
  --dq-danger: #ff4d4d;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #111;
  color: var(--dq-text);
  font-family: "DQFont", "MS Gothic", "Yu Gothic", "Meiryo", monospace;
  overflow: hidden;
  user-select: none;
  /* 等幅フォントの文字潰れ対策。白枠黒背景の高コントラスト画面では
     アンチエイリアスが弱いと文字が細く読みにくくなるため補正する。 */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.02em;
}

#game-root {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 800px;
  max-height: 600px;
  margin: 0 auto;
  background: #000;
  overflow: hidden;
}

/* ==========================================================================
   共通: 画面(シーン)切り替え
   ========================================================================== */

.screen {
  position: absolute;
  inset: 0;
  display: none;
}

.screen.active {
  display: block;
}

/* ==========================================================================
   タイトル画面
   ========================================================================== */

#screen-title {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #1a1a3a 0%, #000000 80%);
  text-align: center;
}

#screen-title.active {
  display: flex;
}

.title-logo {
  font-size: 2.2rem;
  letter-spacing: 0.2em;
  color: var(--dq-accent);
  text-shadow: 2px 2px 0 #000, 0 0 12px rgba(255, 225, 90, 0.6);
  margin-bottom: 0.2em;
}

.title-sub {
  font-size: 0.9rem;
  color: #cfcfcf;
  margin-bottom: 3rem;
}

.title-hero-visual {
  position: relative;
  width: min(92vw, 560px);
  height: 220px;
  margin: -1.5rem auto 1.25rem;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.75);
  border-radius: 12px;
  background:
    linear-gradient(to bottom, rgba(79,176,239,0.95) 0 55%, rgba(108,174,93,0.95) 56% 100%);
  box-shadow: 0 0 24px rgba(74,163,255,0.35), inset 0 -34px 0 rgba(45,104,51,0.28);
}

.title-hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

.title-sun {
  position: absolute;
  width: 70px;
  height: 70px;
  top: 18px;
  right: 64px;
  border-radius: 50%;
  background: rgba(255,240,142,0.9);
  box-shadow: 0 0 24px rgba(255,240,142,0.7);
}

.title-castle {
  position: absolute;
  bottom: 44px;
  width: 82px;
  height: 92px;
  background: #e8ddc5;
  border: 3px solid rgba(80,72,70,0.7);
  opacity: 0.9;
}

.title-castle::before,
.title-castle::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 28px;
  height: 128px;
  background: #f0e7d3;
  border: 3px solid rgba(80,72,70,0.7);
}

.title-castle::before { left: -22px; }
.title-castle::after { right: -22px; }
.title-castle-left { left: 72px; transform: scale(0.72); transform-origin: bottom; }
.title-castle-right { right: 92px; transform: scale(0.58); transform-origin: bottom; }

.title-hero-visual .hero-sprite {
  position: absolute;
  left: 50%;
  bottom: 16px;
  width: 170px;
  height: 170px;
  z-index: 3;
  transform: translateX(-50%);
  transform-origin: bottom center;
  --body-color: #ffe066;
  --accent-color: #2a5ad0;
  --skin-color: #ffe066;
  --hair-color: #ff9a1f;
  pointer-events: none;
}

.title-hero-sign {
  position: absolute;
  right: 18px;
  bottom: 26px;
  z-index: 4;
  padding: 7px 12px;
  color: #4a2b16;
  background: #c99555;
  border: 3px solid #704522;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: bold;
  line-height: 1.25;
  transform: rotate(-3deg);
}

.title-menu {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 260px;
}

.title-debug-link {
  margin-top: 1.25rem;
  padding: 0;
  background: none;
  border: none;
  color: #c87878;
  font-family: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-decoration: underline;
  cursor: pointer;
}

.title-debug-link:hover,
.title-debug-link:focus-visible {
  color: #ffb0b0;
}

.title-name-input {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.title-name-note {
  margin: -0.35rem 0 0;
  color: #c8b07a;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.title-name-input input {
  background: #000;
  border: 3px solid var(--dq-border);
  color: var(--dq-text);
  font-family: inherit;
  font-size: 1rem;
  padding: 0.4em 0.6em;
  text-align: center;
  width: 220px;
}

.hidden {
  display: none !important;
}

.share-house-content-window {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(34rem, calc(100vw - 2rem));
  max-height: min(34rem, calc(100vh - 2rem));
  transform: translate(-50%, -50%);
  padding: 1rem 1.2rem;
  z-index: 60;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
}

.share-house-content-title {
  color: #ffe58a;
  font-weight: 700;
  margin: 0 2rem 0.6rem 0;
}

.share-house-content-body {
  color: #f5f0d0;
  line-height: 1.55;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.share-house-content-body p {
  margin: 0 0 0.75rem;
}

.share-house-content-body p:last-child {
  margin-bottom: 0;
}

.share-house-content-close {
  position: absolute;
  top: 0.35rem;
  right: 0.55rem;
  border: 0;
  background: transparent;
  color: var(--dq-text);
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.share-house-content-back {
  flex: 0 0 auto;
  margin-top: 0.45rem;
}

.management-record-list-window {
  left: 50%;
  right: auto;
  top: 5%;
  bottom: 5%;
  width: min(46rem, calc(100vw - 2rem));
  transform: translateX(-50%);
  overflow-y: auto;
}

.management-record-list-title {
  color: #ffe58a;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.management-record-row {
  display: grid;
  grid-template-columns: 3.5rem 5rem minmax(0, 1fr);
  align-items: start;
  gap: 0.5rem;
  white-space: normal;
}

.management-record-category,
.management-record-status {
  display: inline-block;
  text-align: center;
  border: 1px solid var(--dq-border-inner);
  border-radius: 3px;
  padding: 0.05rem 0.25rem;
  line-height: 1.45;
}

.management-record-status {
  inline-size: 5rem;
  box-sizing: border-box;
  color: #ffe58a;
}

.management-record-title,
.management-record-hint {
  min-width: 0;
}

.management-record-hint {
  color: #d8d1ad;
  font-size: 0.92rem;
  line-height: 1.55;
}

.encyclopedia-list-window {
  left: 50%;
  right: auto;
  top: 5%;
  bottom: 5%;
  width: min(42rem, calc(100vw - 2rem));
  transform: translateX(-50%);
  overflow-y: auto;
}

.encyclopedia-detail-window .share-house-content-title {
  color: #b8e0ff;
}

.encyclopedia-detail-window .share-house-content-body {
  color: #eef6ff;
}

@media (max-width: 560px) {
  .management-record-list-window {
    top: 1rem;
    bottom: 1rem;
  }

  .management-record-row {
    grid-template-columns: 3rem 4.6rem minmax(0, 1fr);
    gap: 0.3rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .management-record-status {
    inline-size: 4.6rem;
  }

  .share-house-content-window {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
  }
}

/* ==========================================================================
   DQ風ウィンドウ(白枠・黒背景・二重線)基本クラス
   ========================================================================== */

.dq-window {
  position: absolute;
  background: #000000;
  border: 4px solid var(--dq-border);
  border-radius: 6px;
  box-shadow:
    inset 0 0 0 2px #000,
    inset 0 0 0 3px var(--dq-border-inner),
    0 4px 14px rgba(0, 0, 0, 0.65);
  padding: 12px 16px;
  z-index: 50;
  line-height: 1.5;
}

/* ウィンドウ間の重なり順を明示的なレイヤーとして分離する。
   以前は全ウィンドウが z-index:50 で衝突しており、装備選択メニュー表示中に
   ステータス画面をJSでhiddenにする回避策(ui.js openEquipMenu)が必要だった。
   ここで層を分けることで、そのようなDOM操作なしに正しい重なり順を保証する。 */
.status-window { z-index: 40; }
.shop-window,
.church-window { z-index: 45; }
.command-window { z-index: 50; }
.message-window { z-index: 55; }

.dq-command-item {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--dq-text);
  font-family: inherit;
  font-size: 1rem;
  text-align: left;
  padding: 0.35em 0.6em;
  cursor: pointer;
  border-radius: 3px;
}

.dq-command-item::before {
  content: "  ";
}

.dq-command-item.selected {
  background: var(--dq-shop-highlight);
}

.dq-command-item.selected::before {
  content: "▶ ";
  color: var(--dq-cursor);
}

.command-message {
  white-space: pre-line;
  padding: 0.35em 0.6em 0.55em;
  color: var(--dq-text);
}

.dq-command-item:disabled {
  color: var(--dq-disabled);
  cursor: default;
}

/* ==========================================================================
   メッセージウィンドウ
   ========================================================================== */

.message-window {
  left: 5%;
  right: 5%;
  bottom: 4%;
  min-height: 96px;
  font-size: 1rem;
  line-height: 1.6em;
}

/* 特別メッセージ(プロローグ/ボス撃破/エンディング等)の豪華フレーム。
   DQ風の金色の二重枠+四隅の角飾り+金色のグローで通常メッセージと区別する。 */
.message-window.special {
  --acc-corner-tl: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'><defs><path id='l' d='M0 0 C-9-2 -13-5 -11-9 C-5-7 -4-9 -4-11 C-13-13 -17-17 -15-21 C-6-19 -5-21 -5-23 C-15-25 -17-31 -11-33 C-4-31 -3-35 -2-39 C0-41 2-41 2-39 C3-35 4-31 11-33 C17-31 15-25 5-23 C5-21 6-19 15-21 C17-17 13-13 4-11 C4-9 5-7 11-9 C13-5 9-2 0 0 Z'/></defs><g fill='none' stroke-linecap='round' stroke-linejoin='round'><g transform='rotate(0)'><path d='M4 4 C16 2 26 8 26 16 C26 23 20 26 15 23 C10 20 9 15 13 13 C16 11 19 13 18 16' stroke='%23d9b64e' stroke-width='2'/><use href='%23l' transform='translate(18 18) rotate(135) scale(1.05)' stroke='%23d9b64e' stroke-width='2'/><use href='%23l' transform='translate(18 18) rotate(90) scale(0.8)' stroke='%23d9b64e' stroke-width='2'/><use href='%23l' transform='translate(18 18) rotate(180) scale(0.8)' stroke='%23d9b64e' stroke-width='2'/><path d='M18 18 L48 48' stroke='%23f0d070' stroke-width='1'/><path d='M18 18 L50 18' stroke='%23f0d070' stroke-width='1'/><path d='M18 18 L18 50' stroke='%23f0d070' stroke-width='1'/></g></g></svg>");
  --acc-corner-tr: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'><defs><path id='l' d='M0 0 C-9-2 -13-5 -11-9 C-5-7 -4-9 -4-11 C-13-13 -17-17 -15-21 C-6-19 -5-21 -5-23 C-15-25 -17-31 -11-33 C-4-31 -3-35 -2-39 C0-41 2-41 2-39 C3-35 4-31 11-33 C17-31 15-25 5-23 C5-21 6-19 15-21 C17-17 13-13 4-11 C4-9 5-7 11-9 C13-5 9-2 0 0 Z'/></defs><g fill='none' stroke-linecap='round' stroke-linejoin='round'><g transform='rotate(90 48 48)'><path d='M4 4 C16 2 26 8 26 16 C26 23 20 26 15 23 C10 20 9 15 13 13 C16 11 19 13 18 16' stroke='%23d9b64e' stroke-width='2'/><use href='%23l' transform='translate(18 18) rotate(135) scale(1.05)' stroke='%23d9b64e' stroke-width='2'/><use href='%23l' transform='translate(18 18) rotate(90) scale(0.8)' stroke='%23d9b64e' stroke-width='2'/><use href='%23l' transform='translate(18 18) rotate(180) scale(0.8)' stroke='%23d9b64e' stroke-width='2'/><path d='M18 18 L48 48' stroke='%23f0d070' stroke-width='1'/><path d='M18 18 L50 18' stroke='%23f0d070' stroke-width='1'/><path d='M18 18 L18 50' stroke='%23f0d070' stroke-width='1'/></g></g></svg>");
  --acc-corner-bl: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'><defs><path id='l' d='M0 0 C-9-2 -13-5 -11-9 C-5-7 -4-9 -4-11 C-13-13 -17-17 -15-21 C-6-19 -5-21 -5-23 C-15-25 -17-31 -11-33 C-4-31 -3-35 -2-39 C0-41 2-41 2-39 C3-35 4-31 11-33 C17-31 15-25 5-23 C5-21 6-19 15-21 C17-17 13-13 4-11 C4-9 5-7 11-9 C13-5 9-2 0 0 Z'/></defs><g fill='none' stroke-linecap='round' stroke-linejoin='round'><g transform='rotate(270 48 48)'><path d='M4 4 C16 2 26 8 26 16 C26 23 20 26 15 23 C10 20 9 15 13 13 C16 11 19 13 18 16' stroke='%23d9b64e' stroke-width='2'/><use href='%23l' transform='translate(18 18) rotate(135) scale(1.05)' stroke='%23d9b64e' stroke-width='2'/><use href='%23l' transform='translate(18 18) rotate(90) scale(0.8)' stroke='%23d9b64e' stroke-width='2'/><use href='%23l' transform='translate(18 18) rotate(180) scale(0.8)' stroke='%23d9b64e' stroke-width='2'/><path d='M18 18 L48 48' stroke='%23f0d070' stroke-width='1'/><path d='M18 18 L50 18' stroke='%23f0d070' stroke-width='1'/><path d='M18 18 L18 50' stroke='%23f0d070' stroke-width='1'/></g></g></svg>");
  --acc-corner-br: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96'><defs><path id='l' d='M0 0 C-9-2 -13-5 -11-9 C-5-7 -4-9 -4-11 C-13-13 -17-17 -15-21 C-6-19 -5-21 -5-23 C-15-25 -17-31 -11-33 C-4-31 -3-35 -2-39 C0-41 2-41 2-39 C3-35 4-31 11-33 C17-31 15-25 5-23 C5-21 6-19 15-21 C17-17 13-13 4-11 C4-9 5-7 11-9 C13-5 9-2 0 0 Z'/></defs><g fill='none' stroke-linecap='round' stroke-linejoin='round'><g transform='rotate(180 48 48)'><path d='M4 4 C16 2 26 8 26 16 C26 23 20 26 15 23 C10 20 9 15 13 13 C16 11 19 13 18 16' stroke='%23d9b64e' stroke-width='2'/><use href='%23l' transform='translate(18 18) rotate(135) scale(1.05)' stroke='%23d9b64e' stroke-width='2'/><use href='%23l' transform='translate(18 18) rotate(90) scale(0.8)' stroke='%23d9b64e' stroke-width='2'/><use href='%23l' transform='translate(18 18) rotate(180) scale(0.8)' stroke='%23d9b64e' stroke-width='2'/><path d='M18 18 L48 48' stroke='%23f0d070' stroke-width='1'/><path d='M18 18 L50 18' stroke='%23f0d070' stroke-width='1'/><path d='M18 18 L18 50' stroke='%23f0d070' stroke-width='1'/></g></g></svg>");
  --acc-center-top: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 50'><defs><g id='leaf' fill='none' stroke-linecap='round' stroke-linejoin='round'><path d='M0,0 C-2,-2 -6,-2 -10,-4 C-16,-6 -20,-8 -22,-12 C-24,-16 -23,-20 -19,-21 C-15,-22 -12,-19 -11,-16 C-14,-22 -17,-27 -16,-32 C-15,-37 -11,-39 -7,-37 C-10,-42 -11,-48 -6,-52 C-3,-54 3,-54 6,-52 C11,-48 10,-42 7,-37 C11,-39 15,-37 16,-32 C17,-27 14,-22 11,-16 C12,-19 15,-22 19,-21 C23,-20 24,-16 22,-12 C20,-8 16,-6 10,-4 C6,-2 2,-2 0,0 Z' stroke='%23d9b64e' stroke-width='2'/><path d='M0,-2 C0,-10 0,-26 0,-50 M0,-8 C-5,-10 -12,-12 -19,-21 M0,-18 C-7,-22 -12,-28 -16,-32 M0,-32 C-5,-37 -8,-44 -6,-52 M0,-8 C5,-10 12,-12 19,-21 M0,-18 C7,-22 12,-28 16,-32 M0,-32 C5,-37 8,-44 6,-52' stroke='%23f0d070' stroke-width='1'/></g><g id='tendril' fill='none' stroke-linecap='round' stroke-linejoin='round'><path d='M0,0 C-8,-2 -18,-8 -20,-17 C-22,-26 -13,-32 -5,-31 C3,-30 7,-22 5,-15 C4,-9 0,-6 -5,-6 C-9,-7 -13,-11 -13,-16 C-13,-20 -10,-23 -7,-24' stroke='%23d9b64e' stroke-width='2'/><path d='M0,0 C-8,-2 -18,-8 -20,-17 M-5,-6 C-9,-7 -13,-11 -13,-16' stroke='%23f0d070' stroke-width='1'/></g></defs><use href='%23leaf' transform='translate(110,50) scale(0.75)'/><use href='%23leaf' transform='translate(68,50) scale(0.92)'/><use href='%23leaf' transform='translate(152,50) scale(-0.92,0.92)'/><use href='%23tendril' transform='translate(36,34) scale(0.9)'/><use href='%23tendril' transform='translate(184,34) scale(-0.9,0.9)'/></svg>");
  border: 3px solid #e8c15a;
  box-shadow:
    0 0 0 3px #000,
    0 0 0 6px #8a6a2a,
    0 0 26px rgba(255, 215, 100, 0.45),
    inset 0 0 0 2px #000,
    inset 0 0 20px rgba(255, 215, 100, 0.12);
  background: linear-gradient(180deg, #1a1408 0%, #0b0803 100%);
  border-radius: 8px;
  /* 四隅・上部中央の装飾にかぶりにくいよう、文字を中央寄せ+上下対称の余白で
     ウィンドウ内の上下中央に寄せる */
  text-align: center;
  padding-top: 58px;
  padding-bottom: 58px;
  /* 左右の装飾(四隅のアカンサス・上部中央)に文字が被らないよう、
     左右は20%ずつ余白にする(メッセージは自動で折り返す)。 */
  padding-left: 20%;
  padding-right: 20%;
  box-sizing: border-box;
  /* ウィンドウ自体は下部表示のまま、中のメッセージを上下中央に寄せる */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
/* 四隅のアカンサス紋様(一点物の渦巻く葉・deepseek-v4-pro生成) */
.message-window.special::before {
  content: "";
  position: absolute;
  inset: 6px;
  pointer-events: none;
  background-image: var(--acc-corner-tl), var(--acc-corner-tr), var(--acc-corner-bl), var(--acc-corner-br);
  background-repeat: no-repeat;
  background-position: top left, top right, bottom left, bottom right;
  background-size: 115px 115px;
}
/* 中央上部のアカンサス紋様(左右対称・リピートなし) */
.message-window.special::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  pointer-events: none;
  background-image: var(--acc-center-top);
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 220px 50px;
}

/* 特別枠の本文は余白内で折り返し、装飾と重ならないようにする。 */
.message-window.special .message-text {
  width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message-text {
  margin: 0;
  white-space: pre-wrap;
}

.message-cursor {
  position: absolute;
  right: 16px;
  bottom: 8px;
  color: var(--dq-cursor);
  animation: dq-blink 0.8s infinite steps(2);
}

@keyframes dq-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ==========================================================================
   コマンドウィンドウ(戦闘/フィールド共通)
   ========================================================================== */

.command-window {
  right: 5%;
  bottom: 4%;
  min-width: 180px;
  /* 画面の小さいスマホでは項目が増えるとウィンドウ上端が画面外へはみ出し、
     タップもスクロールもできなくなる。高さを抑えてウィンドウ内スクロールに
     切り替える(選択行は ui.js が scrollIntoView で追従させる)。 */
  max-height: 92%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.command-window.has-help {
  min-width: 240px;
  max-width: 18em;
}

.command-help {
  margin: 0.45em 0.15em 0;
  padding: 0.45em 0.55em 0.1em;
  border-top: 2px solid var(--dq-border-inner);
  white-space: normal;
  line-height: 1.45;
  font-size: 0.92em;
}

/* 戦闘時は画面下部のパーティステータス欄と重ならないよう上へ退避する。 */
#screen-battle.active ~ .command-window {
  bottom: 18%;
  max-height: 78%;
}

.command-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.command-title {
  color: var(--dq-accent);
  margin: 0 0 0.45em;
  padding: 0 0.6em 0.35em;
  border-bottom: 2px solid var(--dq-border-inner);
  white-space: nowrap;
}

/* ==========================================================================
   ステータスウィンドウ
   ========================================================================== */

.status-window {
  left: 8%;
  right: 8%;
  top: 8%;
  bottom: 8%;
  overflow-y: auto;
}

.status-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.status-content th,
.status-content td {
  text-align: left;
  padding: 0.25em 0.5em;
  border-bottom: 1px solid var(--dq-border-inner);
}

.status-stat-bonus {
  color: var(--dq-accent);
  font-size: 0.85em;
}

.status-member-block {
  margin-bottom: 1em;
}

.status-member-name {
  color: var(--dq-accent);
  font-size: 1.05rem;
}

.status-equip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 0.4em;
}

.status-equip-btn {
  font-size: 0.75rem;
  padding: 3px 6px;
}

/* ==========================================================================
   HP/MPバー
   ========================================================================== */

.stat-bar-row {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.85rem;
  margin: 2px 0;
}

.stat-bar-label {
  width: 2.4em;
  color: #cfcfcf;
}

.stat-bar-track {
  position: relative;
  flex: 1 1 auto;
  /* 戦闘カードのように横幅が狭い親要素でも、ラベル/数値に押し潰されて
     ゲージ帯が見えなくなる(width:0近くまで縮む)ことがあったため、
     最低限の視認幅を確保する。 */
  min-width: 24px;
  height: 10px;
  background: #222;
  border: 1px solid var(--dq-border);
}

.stat-bar-fill {
  height: 100%;
  background: var(--dq-hp);
}

.stat-bar-fill.mp {
  background: var(--dq-mp);
}

.stat-bar-fill.low {
  background: var(--dq-hp-low);
}

.stat-bar-value {
  width: 4.4em;
  text-align: right;
  font-size: 0.8rem;
}

/* HP残量による状態色。20%以下は橙、戦闘不能(HP0)は赤。
   ステータス窓(.status-member-block)・戦闘中カード(.battle-member-card)の
   どちらに付いても、名前・数値・ゲージラベルをまとめて着色する。 */
.status-member-block.cond-low .status-member-name,
.status-member-block.cond-low .stat-bar-value,
.status-member-block.cond-low .stat-bar-label,
.battle-member-card.cond-low .battle-member-name,
.battle-member-card.cond-low .stat-bar-value,
.battle-member-card.cond-low .stat-bar-label,
.stat-bar-row.cond-low .stat-bar-value,
.stat-bar-row.cond-low .stat-bar-label {
  color: var(--dq-warn);
}

.status-member-block.cond-down .status-member-name,
.status-member-block.cond-down .stat-bar-value,
.status-member-block.cond-down .stat-bar-label,
.battle-member-card.cond-down .battle-member-name,
.battle-member-card.cond-down .stat-bar-value,
.battle-member-card.cond-down .stat-bar-label,
.stat-bar-row.cond-down .stat-bar-value,
.stat-bar-row.cond-down .stat-bar-label {
  color: var(--dq-danger);
}

.stat-bar-row.cond-low .stat-bar-track {
  border-color: var(--dq-warn);
}

.stat-bar-row.cond-down .stat-bar-track {
  border-color: var(--dq-danger);
}

/* ==========================================================================
   ショップウィンドウ
   ========================================================================== */

.shop-window {
  left: 8%;
  right: 8%;
  top: 10%;
  bottom: 10%;
  display: flex;
  flex-direction: column;
}

.shop-header {
  font-size: 1.05rem;
  color: var(--dq-accent);
  border-bottom: 2px solid var(--dq-border-inner);
  padding-bottom: 0.4em;
  margin-bottom: 0.4em;
}

.shop-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  overflow-y: auto;
}

.shop-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.35em 0.4em;
  cursor: pointer;
  border-radius: 3px;
}

/* 購入リスト: マウスホバーでは背景を変えない(キーボード/カーソルの
   selected 状態のみハイライトする)。ホバーで背景が変わるのは操作の
   意図と合わないため。 */
.shop-list li.selected {
  background: var(--dq-shop-highlight);
}

.shop-list li .item-price {
  color: var(--dq-accent);
}

.shop-detail {
  min-height: 2.2em;
  padding: 6px 10px 0;
  font-size: 0.85rem;
  line-height: 1.4em;
  color: #e2d8bc;
  text-align: left;
  border-top: 1px dashed rgba(210, 190, 130, 0.35);
}

.shop-footer {
  border-top: 2px solid var(--dq-border-inner);
  padding-top: 0.4em;
  margin-top: 0.4em;
  font-size: 0.9rem;
  color: #cfcfcf;
}

/* ==========================================================================
   教会ウィンドウ
   ========================================================================== */

.church-window {
  left: 10%;
  right: 10%;
  top: 12%;
  bottom: 12%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ==========================================================================
   マップシーン(フィールド/町/ダンジョン)
   ========================================================================== */

#screen-map {
  background: #000;
}

.map-viewport {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.map-canvas-wrap {
  position: relative;
  width: 512px;
  height: 512px;
  flex: 0 0 512px;
}

#canvas-map, .map-effects-layer, .hero-sprite-layer {
  position: absolute;
  inset: 0;
  width: 512px;
  height: 512px;
}

#canvas-map, .map-effects-layer {
  image-rendering: pixelated;
  background: #000;
  border: 0;
}

.hero-sprite-layer,
.map-effects-layer { pointer-events: none; }
.hero-sprite-layer { z-index: 1; }
.map-effects-layer { z-index: 2; background: transparent; }
.hero-sprite {
  position: absolute;
  width: 32px;
  height: 32px;
  overflow: visible;
  transform: translate3d(-32px, -32px, 0);
  --body-color: #3aa050;
  --accent-color: #cccccc;
  --skin-color: #f5d6a8;
  --hair-color: #2a1a10;
}
.hero-shadow ellipse { fill: rgba(0, 0, 0, 0.25); }.hero-body { fill: var(--body-color); }.hero-head { fill: var(--skin-color); }.hero-hair { fill: var(--hair-color); }.hero-face, .hero-chick-eye { fill: #202020; }.hero-legs rect { fill: #332218; }.hero-equip, .hero-chick-wing, .hero-chick-tuft { fill: var(--accent-color); }.hero-equip-rod rect, .hero-equip-staff rect { fill: #5a3a20; }.hero-equip-sword rect { fill: #8a6a2a; }.hero-chick-body, .hero-chick-head { fill: #ffe066; }.hero-chick-legs rect, .hero-chick-beak { fill: #f5a623; }.hero-chick-wing { fill: #f5c53a; }
.hero-chick, .hero-equip { display: none; }.hero-sprite.is-chick .hero-normal { display: none; }.hero-sprite.is-chick .hero-chick { display: inline; }.hero-sprite.equip-sword .hero-equip-sword, .hero-sprite.equip-axe .hero-equip-axe, .hero-sprite.equip-rod .hero-equip-rod, .hero-sprite.equip-staff .hero-equip-staff, .hero-sprite.equip-bag .hero-equip-bag { display: inline; }
.hero-down, .hero-down-view { display: none; }
.hero-down-lid { fill: #8a5a2e; stroke: #4a2e12; stroke-width: 1; }
.hero-down-cross { fill: #e8d8a8; }
.hero-down-seam { fill: #6a421e; }
.hero-sprite.is-down .hero-normal, .hero-sprite.is-down .hero-chick { display: none; }
.hero-sprite.is-down .hero-down { display: inline; }
.hero-sprite.is-down.facing-down .hero-down-view-down { display: inline; }
.hero-sprite.is-down.facing-up .hero-down-view-up { display: inline; }
.hero-sprite.is-down.facing-right .hero-down-view-side { display: inline; }
.hero-sprite.is-down.facing-left .hero-down-view-side { display: inline; transform: scaleX(-1); transform-origin: 16px 16px; }
.hero-hat { display: none; fill: var(--hat-color, #3a5a8a); }
.hero-sprite.has-hat .hero-hat { display: inline; }
.hero-sprite.has-hat .hero-hair { display: none; }
.hero-sprite.facing-up .hero-face { transform: translateY(-3px); }.hero-sprite.facing-left .hero-face { transform: translateX(-3px); }.hero-sprite.facing-right .hero-face { transform: translateX(3px); }.hero-sprite.facing-left .hero-normal { transform: scaleX(-1); transform-origin: 16px 16px; }.hero-sprite.is-walking .hero-normal, .hero-sprite.is-walking .hero-chick { animation: hero-walk-bob 180ms steps(2, end) infinite; transform-origin: 16px 24px; }.hero-sprite.facing-left.is-walking .hero-normal { animation: hero-walk-bob-left 180ms steps(2, end) infinite; }.hero-sprite.is-walking .hero-legs, .hero-sprite.is-walking .hero-chick-legs { animation: hero-walk-legs 180ms steps(2, end) infinite; transform-origin: 16px 24px; }.hero-sprite.is-cutscene { visibility: hidden; }
/* ひよこの4方向ビュー切り替え(下=正面/上=背面/右/左)。
   参照絵の側面図はどちらも左向きに描かれているため、右向き表示時は
   scaleX(-1) で反転して正しい向きにする。 */
.hero-chick-view { display: none; }.hero-sprite.is-chick.facing-down .hero-chick-view-down { display: inline; }.hero-sprite.is-chick.facing-up .hero-chick-view-up { display: inline; }.hero-sprite.is-chick.facing-right .hero-chick-view-side { display: inline; }.hero-sprite.is-chick.facing-right .hero-chick-view-side { transform: scaleX(-1); transform-origin: 16px 16px; }.hero-sprite.is-chick.facing-left .hero-chick-view-left { display: inline; }
@keyframes hero-walk-bob { 50% { transform: translateY(-1px); } } @keyframes hero-walk-bob-left { 50% { transform: scaleX(-1) translateY(-1px); } } @keyframes hero-walk-legs { 50% { transform: translateX(2px); } }

.hud-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: flex-start;
  padding: 6px 12px;
  font-size: 0.85rem;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85), rgba(0,0,0,0));
  color: #fff;
  pointer-events: none;
  z-index: 10;
}

/* エリア表示: ドラッグ選択とクリックコピーを可能にする。
   hud-top が pointer-events:none のため、ここで auto に戻す。 */
#hud-location {
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  cursor: pointer;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.35);
}
#hud-location:hover {
  border-bottom-color: rgba(255, 255, 255, 0.85);
}

#hud-gold {
  margin-left: 8px;
}

/* ==========================================================================
   戦闘シーン
   ========================================================================== */

#screen-battle {
  background: #000;
}

.battle-viewport {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 58%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, #14142e 0%, #000000 100%);
}

#canvas-battle {
  image-rendering: pixelated;
}

.battle-party-status {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 4%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  z-index: 20;
}

.battle-member-card {
  min-width: 0;
  overflow: hidden;
  border: 3px solid var(--dq-border);
  border-radius: 4px;
  background: #000;
  padding: 6px 8px;
  font-size: 0.8rem;
  box-shadow:
    inset 0 0 0 2px #000,
    inset 0 0 0 3px var(--dq-border-inner),
    0 2px 8px rgba(0, 0, 0, 0.5);
}

.battle-member-card.dead {
  /* カード全体ではなくポートレートだけ透明にする(dead は装飾クラス) */
}

.battle-member-portrait-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 4px;
  position: relative;
  min-height: 40px;
}

/* 実機QA改善(2026-09-08): 戦闘スプライトを表示するミニCanvasポートレート。 */
.battle-member-portrait-canvas {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
}

.battle-member-portrait-canvas.down {
  opacity: 0.35;
}

.battle-member-portrait {
  position: relative;
  width: 30px;
  height: 38px;
  border-radius: 42% 42% 24% 24%;
  background: linear-gradient(to bottom, var(--skin-color, #f5d6a8) 0 28%, var(--body-color, #3aa050) 28% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.battle-member-portrait.is-chick {
  border-radius: 50% 50% 40% 40%;
  background: radial-gradient(circle at 50% 38%, var(--skin-color, #ffe066) 0 55%, var(--body-color, #ff9a1f) 56% 100%);
}

.battle-member-portrait.down {
  opacity: 0.35;
}

.battle-member-down-halo {
  position: absolute;
  top: -7px;
  left: 50%;
  width: 24px;
  height: 7px;
  margin-left: -12px;
  border: 2px solid #ffe566;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 230, 80, 0.75);
  animation: battle-down-halo-pulse 1.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes battle-down-halo-pulse {
  0%, 100% { opacity: 0.82; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.battle-member-name {
  color: var(--dq-accent);
  font-size: 0.85rem;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.battle-member-status {
  color: var(--dq-warn);
  font-size: 0.72rem;
  line-height: 1.1;
}

/* ==========================================================================
   メニューボタン(全体メニュー起動用)
   ========================================================================== */

.menu-open-btn {
  position: static;
  margin-left: auto;
  z-index: 30;
  background: #000;
  color: #fff;
  border: 2px solid var(--dq-border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.8rem;
  padding: 4px 10px;
  cursor: pointer;
  pointer-events: auto;
}

/* ==========================================================================
   エンディング画面
   ========================================================================== */

#screen-ending {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #1a1a3a 0%, #000000 80%);
  text-align: center;
  padding: 24px;
}

#screen-ending.active {
  display: flex;
}

/* エンディング画面も特別メッセージと同じ豪華フレームで囲む */
#screen-ending.active .ending-content {
  border: 3px solid #e8c15a;
  border-radius: 8px;
  box-shadow:
    0 0 0 3px #000,
    0 0 0 6px #8a6a2a,
    0 0 26px rgba(255, 215, 100, 0.45),
    inset 0 0 20px rgba(255, 215, 100, 0.08);
  background: linear-gradient(180deg, #1a1408 0%, #0b0803 100%);
  padding: 2.2rem 2.5rem;
  max-width: 52em;
  max-height: 90vh;
  overflow-y: auto;
  margin: 0 auto;
}

.ending-content h2 {
  color: var(--dq-accent);
  letter-spacing: 0.15em;
  margin-bottom: 1em;
}

.ending-content h3 {
  color: var(--dq-accent);
  letter-spacing: 0.12em;
  margin: 1.2em 0 0.6em;
  font-size: 1.05rem;
}

.ending-content p {
  max-width: 42em;
  line-height: 1.8;
  margin: 0 auto 1em;
}

.ending-ceremony {
  color: var(--dq-accent);
  letter-spacing: 0.18em;
  margin-top: 1.6em !important;
}

.ending-party-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin: 0 auto 0.4em;
}

.ending-party-table th,
.ending-party-table td {
  border: 1px solid #8a6a2a;
  padding: 0.35em 0.45em;
  text-align: center;
}

.ending-party-table th {
  color: var(--dq-accent);
  background: rgba(232, 193, 90, 0.08);
}

.ending-party-table td:first-child,
.ending-party-table th:first-child {
  text-align: left;
}

.ending-mvp {
  margin-top: 1.2em;
  text-align: left;
}

.ending-award {
  border: 1px solid #8a6a2a;
  background: rgba(0, 0, 0, 0.28);
  padding: 0.55em 0.8em;
  margin: 0.45em 0;
}

.ending-award-title {
  color: var(--dq-accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.2em;
}

.ending-award-body {
  line-height: 1.6;
  font-size: 0.92rem;
}

.ending-hint {
  color: #c8b07a;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
}

.ending-credit {
  margin-top: 2em;
  color: var(--dq-accent);
  letter-spacing: 0.3em;
}

.ending-action {
  display: block;
  margin: 1.5em auto 0;
  padding: 0.55em 1.1em;
  background: #000;
  border: 2px solid var(--dq-border);
  color: var(--dq-text);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.ending-action:hover,
.ending-action:focus {
  color: var(--dq-accent);
  border-color: var(--dq-accent);
}

/* ==========================================================================
   レスポンシブ(スマホ幅)
   ========================================================================== */

@media (max-width: 480px) {
  .title-logo {
    font-size: 1.5rem;
  }
  .dq-window {
    padding: 8px 10px;
    font-size: 0.9rem;
  }
  .battle-party-status {
    grid-template-columns: repeat(2, 1fr);
  }
  .title-hero-visual {
    height: 180px;
  }
  .title-hero-visual .hero-sprite {
    transform: translateX(-50%);
  }
  .title-castle-left { left: 44px; }
  .title-castle-right { right: 44px; }
  .title-hero-sign {
    right: 8px;
    bottom: 14px;
    font-size: 0.7rem;
  }
}

/* ==========================================================================
   マンガ式ツッコミ演出(加算のみ。既存セレクタ不変)
   ========================================================================== */

#tsukkomi-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.tsukkomi-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px;
}

.tsukkomi {
  position: relative;
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
  -webkit-text-stroke: 2px #c00;
  text-shadow: 3px 3px 0 #c00, -2px -2px 0 #c00, 2px -2px 0 #c00, -2px 2px 0 #c00;
  white-space: nowrap;
  animation: tsukkomi-don 1.6s ease-out forwards;
}

.tsukkomi-large {
  font-size: 3rem;
}

/* 集中線 */
.tsukkomi-lines {
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, 0.9) 0deg 2deg, transparent 2deg 6deg);
  -webkit-mask-image: radial-gradient(circle, transparent 28%, #000 72%);
  mask-image: radial-gradient(circle, transparent 28%, #000 72%);
  animation: tsukkomi-don 1.6s ease-out forwards;
}

@keyframes tsukkomi-don {
  0% { transform: scale(3); opacity: 0; }
  15% { transform: scale(1); opacity: 1; }
  80% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.1); opacity: 0; }
}

/* ==========================================================================
   スマホ対応: タッチ操作パネル / 画面フィット
   ========================================================================== */

#touch-controls { display: none; }

body.touch-ui { touch-action: manipulation; }

/* max-width/max-heightのPC向け制限を外し、スマホは画面全体を使う */
body.touch-ui #game-root {
  max-width: none;
  max-height: none;
}

body.touch-ui #touch-controls {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
}

/* タイトル/エンディングでは操作パネルを出さない */
body.touch-ui #screen-title.active ~ #touch-controls,
body.touch-ui #screen-ending.active ~ #touch-controls { display: none; }

/* 戦闘中は移動不要なのでD-padを隠す(A/Bは残す) */
body.touch-ui #screen-battle.active ~ #touch-controls #touch-dpad { display: none; }

.touch-btn {
  pointer-events: auto;
  touch-action: none;
  -webkit-touch-callout: none;
  user-select: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1.05rem;
  line-height: 1;
  padding: 0;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.6);
}

.touch-btn.active { background: rgba(90, 90, 160, 0.65); }

.touch-dpad {
  position: absolute;
  left: calc(10px + env(safe-area-inset-left, 0px));
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  width: clamp(132px, 38vw, 176px);
  height: clamp(132px, 38vw, 176px);
  pointer-events: auto;
  touch-action: none;
}

.touch-dpad .touch-btn {
  position: absolute;
  width: 34%;
  height: 34%;
  pointer-events: none;
}

.touch-dpad .touch-up { left: 33%; top: 0; }
.touch-dpad .touch-left { left: 0; top: 33%; }
.touch-dpad .touch-right { right: 0; top: 33%; }
.touch-dpad .touch-down { left: 33%; bottom: 0; }

.touch-actions {
  position: absolute;
  right: calc(10px + env(safe-area-inset-right, 0px));
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: flex-end;
  gap: clamp(8px, 3vw, 16px);
  pointer-events: none;
}

.touch-actions .touch-btn {
  width: clamp(56px, 16vw, 72px);
  height: clamp(56px, 16vw, 72px);
  border-radius: 50%;
  font-size: 1.15rem;
}

.touch-actions .touch-b { margin-bottom: clamp(18px, 6vw, 30px); }

/* 縮小(JSが --map-scale / --battle-scale を設定) */
.map-canvas-wrap {
  transform-origin: top left;
}

#canvas-battle {
  transform-origin: center center;
}

/* キーボード前提の操作ガイドはタッチ端末では出さない */
body.touch-ui #rpg-key-guide { display: none; }

/* スマホの縦画面: 全体高さを動的ビューポートに合わせる。
   ロゴ帯予約時は、ロゴ境界より上だけをゲーム領域にする。 */
body.touch-ui.has-netlify-badge { background: #000; }
body.touch-ui.has-netlify-badge #game-root {
  height: calc(100% - var(--netlify-badge-height, 0px));
}
@supports (height: 100dvh) {
  body.touch-ui #game-root,
  body.touch-ui.has-netlify-badge #game-root {
    height: calc(100dvh - var(--netlify-badge-height, 0px));
  }
}

/* タッチ時: タップ領域を広げ、タップハイライトを消す */
body.touch-ui { -webkit-tap-highlight-color: transparent; }
body.touch-ui .dq-command-item {
  min-height: 44px;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
}
body.touch-ui .hud-top {
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}
body.touch-ui #hud-location {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.touch-ui #hud-gold {
  flex: 0 0 auto;
  white-space: nowrap;
}
body.touch-ui .menu-open-btn {
  flex: 0 0 auto;
  padding: 7px 14px;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* 会話中/入力ロック中/メニュー中など、開けない状態では押せない見た目にする。
   「見えているのに無反応」で死んだボタンと誤解されるのを防ぐ。 */
body.touch-ui .menu-open-btn:disabled {
  opacity: 0.45;
}

/* 戦闘時: コマンド窓を少し上へ(A/Bボタンと重ならない余白) */
body.touch-ui #screen-battle.active ~ .command-window {
  bottom: calc(18% + 12px);
  max-height: calc(78% - 12px);
}

/* 低い横向き画面: パネルやタイトルを小さくする */
@media (max-height: 420px) and (orientation: landscape) {
  .touch-dpad { width: 108px; height: 108px; }
  .touch-actions .touch-btn { width: 52px; height: 52px; }
  .title-hero-visual { height: 150px; }
  .message-window { min-height: 72px; font-size: 0.92rem; }
}

#rpg-levelup-card {
  background: rgba(20, 16, 8, 0.92);
  border: 2px solid #ffd76b;
  border-radius: 8px;
  padding: 16px 24px;
  color: #ffe98a;
  font-family: inherit;
  text-align: center;
  box-shadow: 0 0 24px rgba(255, 215, 107, 0.6);
}

.rpg-levelup-title {
  font-size: 18px;
  font-weight: bold;
}

.rpg-levelup-stats {
  font-size: 12px;
  margin-top: 6px;
}
