
* {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Roboto", sans-serif;
  height: 100vh;
  min-height: 100dvh;
  /* background: linear-gradient(135deg, #cad9ff 0%, #8a9ae0 100%); */
  overflow: hidden;
}

body.auth-pending #loginScreen {
  display: none;
}

body.auth-pending #gameMenu,
body.auth-pending #gameMenu .menu-button,
body.auth-pending .primary-menu,
body.auth-pending .secondary-menu {
  display: none !important;
}

body.is-loading #gameMenu {
  opacity: 0.55;
}

#center.hidden {
  display: none;
}

#output.login-output {
  position: fixed;
  top: calc(50% + 92px);
  left: 50%;
  z-index: 900;
  width: min(calc(100% - 48px), 320px);
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  text-shadow: 0 2px 10px rgba(10, 20, 20, 0.42);
  transform: translateX(-50%);
  pointer-events: none;
}

#output.login-output:empty {
  display: none;
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 800;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(11, 22, 25, 0.24), rgba(12, 30, 26, 0.18)),
    url("image/_keyvisual.jpg");
  background-position: center;
  background-size: cover;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.46;
  pointer-events: none;
}

.login-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(8, 20, 24, 0.12),
      rgba(8, 20, 24, 0.02) 42%,
      rgba(7, 19, 18, 0.20)
    );
  pointer-events: none;
}

.login {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 48px), 320px);
  text-align: center;
}

.login-logo {
  margin: 0 0 36px;
  color: rgba(255, 255, 255, 0.96);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.1;
  text-shadow: 0 2px 14px rgba(20, 34, 30, 0.28);
}

.google-login {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid #747775;
  border-radius: 999px;
  background: #fff;
  color: #1f1f1f;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 5px 18px rgba(20, 34, 30, 0.14);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.google-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(20, 34, 30, 0.18);
}

.google-login:active {
  transform: translateY(0);
}

.google-login:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.82);
  outline-offset: 4px;
}

.google-logo {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.login-links {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  z-index: 3;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  line-height: 1;
  text-align: center;
}

.login-links a {
  margin: 0 7px;
  color: inherit;
  text-decoration: none;
}

.login-links a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 768px) {
  .login-screen {
    background-image:
      linear-gradient(rgba(11, 22, 25, 0.22), rgba(12, 30, 26, 0.16)),
      url("image/keyvisual.jpg");
    background-position: center;
  }
}

@media (max-width: 500px) {
  .login-logo {
    margin-bottom: 30px;
    font-size: 34px;
  }
}

.game-menu {
  position: fixed;
  left: 8px;
  top: calc(78% - 176px);
  bottom: auto;
  z-index: 1000;
}

.menu-button {
  width: 50px;
  height: 50px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #333;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.menu-button:hover:not(:disabled) {
  background: rgba(245, 245, 245, 0.96);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.11);
}

.menu-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.action-attention > .menu-button {
  animation: actionPulse 1.1s ease-in-out infinite;
  border-color: rgba(255, 190, 90, 0.9);
}

@keyframes actionPulse {
  0%,
  100% {
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  }

  50% {
    background: rgba(255, 246, 218, 0.98);
    box-shadow:
      0 6px 20px rgba(0, 0, 0, 0.13),
      0 0 16px rgba(255, 184, 72, 0.52);
  }
}

.menu-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.main-button {
  position: relative;
  z-index: 20;
}

.main-button svg {
  transition: transform 0.3s cubic-bezier(.2, .8, .2, 1);
}

.main-button.open svg {
  transform: rotate(45deg);
}

.primary-menu {
  position: absolute;
  top: 0;
  left: 60px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}

.primary-menu > * {
  opacity: 0;
  transform: translateX(22px) scale(0.82);
  pointer-events: none;
  transition:
    opacity 0.22s ease,
    transform 0.28s cubic-bezier(.2, .8, .2, 1);
}

.primary-menu.open > * {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.primary-menu > *:nth-child(1) {
  transition-delay: 0.02s;
}

.primary-menu > *:nth-child(2) {
  transition-delay: 0.055s;
}

.primary-menu > *:nth-child(3) {
  transition-delay: 0.09s;
}

.primary-menu > *:nth-child(4) {
  transition-delay: 0.125s;
}

.icon-wrapper {
  position: relative;
}

.icon-wrapper::after {
  content: attr(data-label);
  position: absolute;
  top: 58px;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%) translateY(3px);
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(30, 30, 30, 0.80);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.icon-wrapper:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.more-wrapper {
  position: relative;
}

.secondary-menu {
  position: absolute;
  bottom: 60px;
  left: 0;
  width: 180px;
  padding: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.96);
  transform-origin: bottom left;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.24s cubic-bezier(.2, .8, .2, 1),
    visibility 0s linear 0.24s;
}

.secondary-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  transition-delay: 0s;
}

.secondary-menu:not(.open) > * {
  pointer-events: none;
}

.primary-menu:not(.open) .secondary-menu {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.secondary-button {
  width: 100%;
  height: 43px;
  padding: 0 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #333;
  display: flex;
  align-items: center;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  text-align: left;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}

.secondary-button:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: translateX(-2px);
}

.secondary-button svg {
  width: 18px;
  height: 18px;
  margin-right: 11px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.secondary-control {
  width: 100%;
  min-height: 43px;
  padding: 6px 12px;
  border-radius: 9px;
  color: #333;
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1;
}

.secondary-control:hover {
  background: rgba(0, 0, 0, 0.05);
}

.secondary-control label,
.secondary-control span {
  white-space: nowrap;
}

.secondary-control span {
  color: rgba(50, 50, 50, 0.68);
  font-size: 12px;
  text-align: right;
}

.secondary-control input[type="range"] {
  width: 100%;
  min-width: 0;
  accent-color: #333;
  cursor: pointer;
}

.menu-divider {
  height: 1px;
  margin: 5px 6px;
  background: rgba(0, 0, 0, 0.08);
}








/* 透明なクリックブロック */
.click-blocker {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 900;
  cursor: wait;
}

.click-blocker.active {
  display: block;
}

.log-blocker {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(0, 0, 0, 0.02);
  cursor: default;
}

body.is-log-open #gameMenu,
body.is-log-open #directionPad,
body.is-log-open #specialActionShortcut,
body.is-log-open #itemListWindow,
body.is-log-open #itemViewWindow,
body.is-log-open #skillListWindow,
body.is-log-open #skillViewWindow,
body.is-log-open #specialActionPicker {
  pointer-events: none;
}

/* ローディングリング */
.loading-ring {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.65);
  border-top-color: rgba(20, 20, 20, 0.75);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.18);
  z-index: 1000;
  display: none;
  pointer-events: none;
  animation: spin 0.7s linear infinite;
}

.loading-ring.active {
  display: block;
}

@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}




































[hidden],
.hidden {
  display: none;
}














.tm.hidden {
  display: none;
}

.tm {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: #263238;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  background: rgba(25, 40, 35, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.tm::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(25, 40, 35, 0.08);
  pointer-events: none;
}

.tm-box {
  position: relative;
  width: min(90%, 420px);
  padding: 27px 26px;
  color: #263238;
  text-align: left;
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.70),
      rgba(255, 255, 255, 0.45)
    );
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  box-shadow:
    0 18px 60px rgba(40, 60, 50, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: termsModalIn 0.25s ease forwards;
}

.tm-label {
  margin-bottom: 7px;
  color: #7a898d;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.tm-box h3 {
  margin: 0 0 9px;
  color: #263238;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
  text-shadow: none;
}

.tm-message {
  margin: 0;
  color: #64757b;
  font-size: 13px;
  line-height: 1.7;
}

.tm-box a {
  color: #405c65;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tm-box a:hover {
  color: #263238;
}

.tm-actions {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
}

.tm-box button {
  flex: 0 0 auto;
  min-width: 88px;
  border-radius: 999px;
  padding: 10px 20px;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  text-align: center;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}

#tmNo {
  color: #54666d;
  border: 1px solid rgba(50, 70, 75, 0.2);
  background: rgba(255, 255, 255, 0.35);
}

#tmNo:hover {
  background: rgba(255, 255, 255, 0.6);
}

#tmYes {
  color: #fff;
  border: 0;
  padding: 10px 24px;
  background: rgba(30, 45, 50, 0.88);
  box-shadow: none;
}

#tmYes:hover {
  background: #263238;
  transform: translateY(-1px);
}

#authorLetterClose {
  color: #fff;
  border: 0;
  padding: 10px 24px;
  background: rgba(30, 45, 50, 0.88);
  box-shadow: none;
}

#authorLetterClose:hover {
  background: #263238;
  transform: translateY(-1px);
}

.author-letter-box {
  width: min(90%, 460px);
}

.author-letter-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.author-credit {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  color: #405158;
}

.author-credit span:first-child {
  color: #7a898d;
}

.author-letter-body p {
  margin: 8px 0 0;
  color: #64757b;
}

.author-letter-attachment {
  padding-top: 10px;
  border-top: 1px solid rgba(64, 81, 88, 0.16);
  color: #405158;
  font-weight: 600;
}

.tm-box button:focus-visible {
  outline: 2px solid rgba(64, 92, 101, 0.55);
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .tm {
    padding: 0;
  }

  .tm-box {
    width: calc(100% - 32px);
    padding: 24px 22px;
  }

  .tm-actions {
    flex-direction: column-reverse;
  }

  .tm-box button {
    width: 100%;
  }

  .author-credit {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@keyframes termsModalIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}












































/*フローティング矢印方向パッド*/
.direction-pad {
  position: fixed;
  left: 4%;
  top: 78%;
  transform: translateY(-50%);
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.1) 40%,
    rgba(255, 255, 255, 0) 70%
  );
  border: 1px solid rgba(200, 200, 200, 0.3);
  backdrop-filter: blur(0.8px) saturate(50%);
  -webkit-backdrop-filter: blur(0.8px) saturate(50%);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  z-index: 200;
}

/*外周に浮かぶ矢印ボタン*/
.direction-pad .dir-btn {
  position: absolute;
  width: 46px;
  height: 46px;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  border-radius: 50%;
  border: 1px solid rgba(180, 200, 255, 0.5);
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.25s ease;
}

.direction-pad .dir-btn:hover:not(:disabled) {
  background: rgba(180, 220, 255, 0.55);
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(120, 180, 255, 0.4);
}

.direction-pad .dir-btn:active:not(:disabled) {
  transform: scale(0.92);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.direction-pad .dir-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* === 各方向位置（少し外側に配置） === */
#up {
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
}
#down {
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}
#left {
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
}
#right {
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
}

/* === スマホ向け縮小調整 === */
@media (max-width: 768px) {
  .direction-pad {
    left:auto;
    right: 10%;
    top: 78%;
    width: 130px;
    height: 130px;
  }
  .direction-pad .dir-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  #up { top: -8px; }
  #down { bottom: -8px; }
  #left { left: -8px; }
  #right { right: -8px; }
}






















/* === ログウィンドウ（アイテムパネル調で統一）=== */
.log-window {
  position: fixed;
  top: 65%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(20, 20, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 18px 22px;
  width: 340px;
  max-height: 70vh;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;

  color: #f0f0f0;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 14.5px;
  line-height: 1.6;

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(12px);

  z-index: 1100;
  transition: opacity 0.25s ease, transform 0.25s ease;
  animation: fadeInPanel 0.25s ease forwards;
}

/* タイトル */
.log-window h3 {
  margin-top: 0;
  margin-bottom: 10px;
  text-align: center;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.25);
}

/* ログ本文 */
.log-window .log-list {
  width: 100%;
  margin-top: 6px;
  min-height: 66px;
  display: flex;
  align-items: center;
  overflow-y: auto;
  max-height: 50vh;

  -ms-overflow-style: none;  /* IE, Edge */
  scrollbar-width: none;     /* Firefox */
}
.log-window .log-list::-webkit-scrollbar {
  display: none;             /* Chrome, Safari, Opera */
}

.log-window .log-list p {
  width: 100%;
  margin: 4px 0;
  padding: 6px 8px;
  color: #f0f0f0;
  background: transparent;
  border: none;
  border-left: 3px solid rgba(255, 255, 255, 0.1);
  transition: background 0.25s ease, border-color 0.25s ease;
}
.log-window .log-list p:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(120, 190, 255, 0.6);
}

/* 閉じるボタン（アイテムウィンドウ準拠） */
.log-window button {
  display: block;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: none;
  padding: 10px 0;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  margin-top: 12px;
  border-radius: 8px;
  transition: background 0.25s, transform 0.2s;
}
.log-window button:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.log-window .log-action-button {
  width: auto;
  min-width: 92px;
  align-self: flex-end;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  box-shadow: none;
}

.log-window .log-action-button:hover,
.log-window .log-action-button:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.log-window .log-action-button:focus {
  outline: none;
}

.log-window .log-action-button:focus-visible {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.26);
}

/* === スマホ対応 === */
@media (max-width: 768px) {
  .log-window {
    width: 70vw;
    max-height: 65vh;
    padding: 16px;
  }

  .log-window .log-action-button {
    width: auto;
    min-width: 88px;
  }
}

/* === フェードインアニメーション === */
@keyframes fadeInPanel {
  from {
    opacity: 0;
    transform: translate(-50%, -46%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}



















#actionPanel {
  transition: opacity 0.25s ease;
}

.action-menu {
  left: 0;
  right: auto;
  width: 190px;
  max-height: min(300px, calc(100vh - 90px));
  overflow-y: auto;
  transform-origin: bottom left;
}

.action-menu::-webkit-scrollbar {
  display: none;
}

.action-menu {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.action-empty {
  cursor: default;
  color: rgba(50, 50, 50, 0.55);
}

.action-empty:hover {
  background: transparent;
  transform: none;
}

.menu-button-text {
  line-height: 1;
}

.special-action-shortcut {
  position: fixed;
  left: 20%;
  bottom: 30%;
  transform: none;
  z-index: 320;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(180, 200, 255, 0.5);
  background: rgba(255, 255, 255, 0.35);
  color: #1a1a1a;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  animation: actionPulse 1.1s ease-in-out infinite;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.special-action-shortcut svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.special-action-shortcut::after {
  content: attr(data-label);
  position: absolute;
  top: 54px;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%) translateY(3px);
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(30, 30, 30, 0.80);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.special-action-shortcut:hover:not(:disabled) {
  background: rgba(180, 220, 255, 0.55);
  box-shadow: 0 0 12px rgba(120, 180, 255, 0.4);
}

.special-action-shortcut:hover:not(:disabled)::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.special-action-shortcut:disabled {
  cursor: not-allowed;
  filter: saturate(0.7);
}

/* ✅ スマホ向け調整 */
@media (max-width: 768px) {
  .game-menu {
    top: 12px;
    right: 12px;
    bottom: auto;
    left: auto;
  }

  .menu-button {
    width: 47px;
    height: 47px;
  }

  .menu-button svg {
    width: 21px;
    height: 21px;
  }

  .primary-menu {
    left: auto;
    right: 56px;
    flex-direction: row-reverse;
    gap: 6px;
  }

  .icon-wrapper::after {
    top: 58px;
    bottom: auto;
  }

  .secondary-menu {
    top: 56px;
    right: 0;
    bottom: auto;
    left: auto;
    transform: translateY(-8px) scale(0.96);
    transform-origin: top right;
  }

  .action-menu {
    width: 172px;
    left: 0;
    right: auto;
    transform-origin: top left;
  }

  .special-action-shortcut {
    left: 5%;
    bottom: 14px;
    width: 40px;
    height: 40px;
  }

  .special-action-shortcut::after {
    top: auto;
    bottom: 48px;
    transform: translateX(-50%) translateY(-3px);
  }

  .special-action-shortcut:hover:not(:disabled)::after {
    transform: translateX(-50%) translateY(0);
  }
}



/* ===== 敵情報（中央表示） ===== */
#center {
  margin: 0 !important;
}

.enemy-component {
  --enemy-component-y: 5%;
  --enemy-image-height: 300px;
  --enemy-panel-overlap: 50px;
  position: fixed;
  top: var(--enemy-component-y);
  left: 50%;
  z-index: 200;
  width: min(430px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  color: #fff;
  animation: fadeInEnemy 0.15s ease forwards;
  transition: opacity 0.18s ease;
  will-change: opacity;
  pointer-events: auto;
  transform: translateX(-50%);
}

.enemy-image[hidden] {
  display: none;
}

.enemy-image {
  display: block;
  width: auto;
  height: var(--enemy-image-height);
  max-width: 100%;
  object-fit: contain;
  filter: none;
  image-rendering: pixelated;
  pointer-events: auto;
}

.enemy-status-panel {
  position: relative;
  z-index: 1;
  overflow: hidden;
  margin-bottom: calc(-1 * var(--enemy-panel-overlap));
  background: rgba(0, 0, 0, 0.4);
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  width: 260px;
  max-width: 100%;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background-clip: padding-box;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 16px rgba(0, 0, 0, 0.3);
  transform: translateZ(0);
  backface-visibility: hidden;
  contain: paint;
  pointer-events: auto;
}

.enemy-status-panel.enemy-damage-flash {
  animation: enemyDamageFlash 0.42s ease-out;
}

.enemy-status-panel h2 {
  margin: 0 0 6px 0;
  font-size: 17px;
  color: #ff6666;
  letter-spacing: 0;
}

.enemy-hp-bar {
  width: min(190px, 100%);
  height: 10px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  margin: 8px auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.enemy-hp-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff3c3c, #ff7070);
  border-radius: 8px 0 0 8px;
  transition: width 0.18s ease, background 0.18s ease;
}

.enemy-hp-text {
  font-size: 11px;
  color: #eee;
  margin: 5px 0 0;
}

@keyframes fadeInEnemy {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes enemyDamageFlash {
  0% {
    background: rgba(142, 20, 20, 0.82);
    box-shadow:
      inset 0 0 0 1px rgba(255, 190, 190, 0.74),
      0 0 26px rgba(255, 62, 62, 0.66);
  }
  65% {
    background: rgba(95, 10, 10, 0.58);
    box-shadow:
      inset 0 0 0 1px rgba(255, 130, 130, 0.42),
      0 0 18px rgba(255, 54, 54, 0.34);
  }
  100% {
    background: rgba(0, 0, 0, 0.4);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.2),
      0 0 16px rgba(0, 0, 0, 0.3);
  }
}

/* 退場中に追加されるクラス（JSで付与） */
.enemy-component.enemy-status-exiting {
  pointer-events: none;
}

.enemy-component.defeatout {
  animation: enemyDefeatOut 0.42s ease forwards;
}

.enemy-component.defeatout .enemy-image {
  animation: enemyImageDefeatOut 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  transform-origin: center bottom;
}

.enemy-component.defeatout .enemy-status-panel {
  animation: enemyPanelDefeatOut 0.24s ease forwards;
}

.enemy-component.fadeout {
  animation: enemyFadeOut 0.22s ease forwards;
}

/* HPバーが減るときの色変化 */
.enemy-hp-fill.low {
  background: linear-gradient(90deg, #ff9900, #ff3300);
}

.enemy-hp-fill.empty {
  opacity: 0;
}

@keyframes enemyDefeatOut {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  70% {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
}

@keyframes enemyImageDefeatOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }

  40% {
    opacity: 1;
    transform: translateY(-5px) scale(1.08);
    filter: brightness(1.8);
  }

  100% {
    opacity: 0;
    transform: translateY(-18px) scale(0.72);
    filter: brightness(1.2) blur(2px);
  }
}

@keyframes enemyPanelDefeatOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

@keyframes enemyFadeOut {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(4px) scale(0.96);
    filter: blur(2px);
  }
}

@media (max-width: 768px) {
  .enemy-component {
    --enemy-component-y: 26%;
    --enemy-image-height: 270px;
    --enemy-panel-overlap: 16px;
    width: min(390px, 96vw);
  }

  .enemy-status-panel {
    padding: 9px 13px;
    width: 240px;
  }
}



.clickable-row {
  cursor: pointer;
  transition: background 0.25s ease;
}

.clickable-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

@keyframes fadeInPanel {
  from {
    opacity: 0;
    transform: translate(-50%, -46%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.item-list-window {
  position: fixed;
  top: 50%; 
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(20, 20, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 18px 22px;
  width: 340px;
  height: min(420px, calc(100dvh - 48px));
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  color: #f8f8f8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  animation: fadeInPanel 0.25s ease forwards;
}
/* === スクロール領域を限定 === */
.item-list-window .item-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin-top: 8px;
  margin-bottom: 12px; /* ✅ ボタンとの間に余白 */
  max-height: none;
}

/* === 閉じるボタンはパネル下に固定 === */
.item-list-window .close-btn {
  position: relative;     /* ✅ 下端に自然に配置 */
  align-self: center;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: none;
  padding: 10px 0;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.25s;
  margin-top: auto;       /* ✅ スクロール領域の下に押し出す */
}
.item-list-window .close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* === スクロールバー非表示 === */
.item-scroll::-webkit-scrollbar { display: none; }
.item-scroll { -ms-overflow-style: none; scrollbar-width: none; }
.item-list-window::-webkit-scrollbar {
  display: none;             /* Chrome, Safari, Opera */
}

/* テーブルがボタンを押し下げないようにする */
.item-list-window table {
  flex: 0 0 auto;
}

/* ボタンを下部に固定し、縮まないように */
.item-list-window button {
  flex-shrink: 0;
}

.item-list-window h3 {
  margin-top: 0;
  text-align: center;
  color: #fff;
  letter-spacing: 0.5px;
}

.item-list-window table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.item-list-window th,
.item-list-window td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #f0f0f0;
}

.item-list-window button {
  display: block;
  width: 100%;
  background: rgba(255, 255, 255, 0.08); /* パネルに馴染む半透明 */
  color: #fff;
  border: none;                          /* 枠なし */
  padding: 10px 0;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  margin-top: 8px;                       /* テーブルとの隙間 */
  border-radius: 8px;                    /* 軽く丸み */
  transition: background 0.25s;
  position: sticky;
  bottom: 0;
  z-index: 200; /* スクロール中に他要素に隠れないように */
}
.item-list-window button:hover {
  background: rgba(255, 255, 255, 0.18); /* 少し明るく */
}

/* === スマホ時のアイテムリスト閉じるボタン対策 === */
@media (max-width: 768px) {
  .item-list-window {
    width: 90vw;
    height: min(420px, calc(100dvh - 32px));
    max-height: 65vh;
    padding: 16px;
    overflow: hidden;
  }

  .item-list-window button {
    position: relative;
    width: 100%;
  }

}


/* ==== アイテムテーブル ==== */
.item-table {
  border-collapse: collapse;
  width: 100%;
  max-width: 100%;
  margin: 0 0 10px;
  overflow: visible;
  max-height: none;
  color: #f0f0f0;
  font-size: 14px;
  table-layout: fixed;
}

.item-table tr {
  height: 36px;
}

.item-table th,
.item-table td {
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  height: 36px;
  line-height: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

/* ==== ヘッダー固定 ==== */
.item-table thead,
.item-table tbody {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.item-table thead th {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.05); /* ← 少し明るめ半透明（黒地と馴染む） */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
/* th と td の統一感をとる */
.item-table th,
.item-table td {
  background: transparent; /* ✅ 行背景と完全一致 */
  color: #f0f0f0;
  padding: 6px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  height: 36px;
  line-height: 24px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.item-table td:last-child {
  width: 64px;
  text-align: right;
}

.item-table tr:hover td {
  background: rgba(255, 255, 255, 0.05);
}











/* === item-list-window と同じ見た目・構造 === */
.item-view-window {
  position: fixed;
  bottom: 25%;                 /* ✅ 下から25%の位置に固定 */
  left: 50%;                   /* ✅ 横方向の中央 */
  transform: translateX(-50%); /* ✅ 横方向だけ中央寄せ */
  background: rgba(20, 20, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 18px 22px;
  width: 340px;
  max-height: 65vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  color: #f8f8f8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  animation: fadeInPanel 0.25s ease forwards;
  top: auto !important;
  transform: translateX(-50%) !important;
}

/* === タイトル・本文 === */
.item-view-window h3 {
  margin-top: 0;
  text-align: center;
  color: #fff;
  letter-spacing: 0.5px;
}

.item-view-window p {
  margin: 8px 0;
  text-align: left;
  color: #ddd;
  font-size: 14px;
  line-height: 1.5;
}

/* === ボタン（item-list-window と同じスタイル）=== */
.item-view-window button,
.town-dialog button {
  display: block;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: none;
  padding: 10px 0;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  margin-top: 8px;
  border-radius: 8px;
  transition: background 0.25s, transform 0.2s;
}

.item-view-window button:hover,
.town-dialog button:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}



















/* === スキルリスト === */
.skill-list-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(20, 20, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 18px 22px;
  width: 340px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  color: #f8f8f8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  animation: fadeInPanel 0.25s ease forwards;
}

.skill-scroll {
  flex: 1;
  overflow-y: auto;
  margin-top: 8px;
  margin-bottom: 12px;
  max-height: 50vh;
}
.skill-scroll::-webkit-scrollbar { display: none; }

.skill-list-window h3 {
  margin-top: 0;
  text-align: center;
  color: #fff;
  letter-spacing: 0.5px;
}

.skill-table {
  width: 100%;
  border-collapse: collapse;
}
.skill-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.25s;
}
.skill-table td:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* 閉じるボタン */
.skill-list-window .close-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: none;
  padding: 10px 0;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.25s;
  margin-top: auto;
}
.skill-list-window .close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* === スキル詳細 === */
.skill-view-window {
  position: fixed;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 18px 22px;
  width: 340px;
  max-height: 65vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  color: #f8f8f8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  animation: fadeInPanel 0.25s ease forwards;
}

.skill-view-window h3 {
  margin-top: 0;
  text-align: center;
  color: #fff;
}
.skill-view-window p {
  margin: 8px 0;
  text-align: left;
  color: #ddd;
  font-size: 14px;
  line-height: 1.5;
}
.skill-view-window button {
  display: block;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: none;
  padding: 10px 0;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
  margin-top: 8px;
  border-radius: 8px;
  transition: background 0.25s, transform 0.2s;
}
.skill-view-window button:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}


























.clickable-item {
  cursor: pointer;
  color: #8cf;
}
.clickable-item:hover {
  text-decoration: underline;
}




























/* === クライアント側の特殊探索選択パネル === */
.special-action-picker {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(20, 20, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 18px 22px;
  width: 340px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #f8f8f8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  animation: fadeInPanel 0.25s ease forwards;
}

.special-action-picker h3 {
  margin-top: 0;
  text-align: center;
  color: #fff;
  letter-spacing: 0.5px;
}

.special-action-picker-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  width: 100%;
}

.special-action-picker-button {
  flex: 1 1 40%;
  min-width: 120px;
  padding: 10px 0;
  color: #fff;
  font-size: 15px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.25s, transform 0.2s;
}

.special-action-picker-button:hover,
.special-action-picker .close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.special-action-picker .close-btn {
  width: 100%;
  margin-top: 14px;
  padding: 10px 0;
  color: #fff;
  font-size: 15px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: background 0.25s, transform 0.2s;
}

@media (max-width: 768px) {
  .special-action-picker {
    width: 90vw;
    max-height: 65vh;
    padding: 16px;
  }

  .special-action-picker-button {
    flex: 1 1 45%;
    padding: 8px 0;
    font-size: 13px;
  }
}

/* ログUIと共通の表面だけを合わせる */
.casual-window {
  background: rgba(20, 20, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  color: #f0f0f0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(12px);
}

.item-view-window p,
.skill-view-window p {
  color: #f0f0f0;
}

.item-list-window .close-btn,
.skill-list-window .close-btn {
  transition: background 0.25s, transform 0.2s;
}

.item-list-window .close-btn:hover,
.skill-list-window .close-btn:hover {
  transform: translateY(-2px);
}



















/* === 手持ちアイテム使用ボタン === */
.direction-pad .held-item-use-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(180, 200, 255, 0.5);
  background: rgba(255, 255, 255, 0.35);
  color: #1a1a1a;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  transition:
    opacity 0.18s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.direction-pad .held-item-use-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.direction-pad .held-item-use-btn::after {
  content: attr(data-label);
  position: absolute;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%) translateY(-3px);
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(30, 30, 30, 0.80);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.direction-pad .held-item-use-btn:hover {
  transform: translate(-50%, -50%);
}

.direction-pad .held-item-use-btn.has-held-item:hover:not(:disabled) {
  background: rgba(180, 220, 255, 0.55);
  box-shadow: 0 0 12px rgba(120, 180, 255, 0.4);
}

.direction-pad .held-item-use-btn.has-held-item:hover:not(:disabled)::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.direction-pad .held-item-use-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: saturate(0.7);
}




































































.status-window {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 300;
  width: 280px;
  background: rgba(20, 20, 20, 0.6);
  color: #eee;
  font-family: 'Courier New', monospace;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 16px;
  padding-top: 36px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.5s, opacity 0.4s;
}

.status-window.player-damage-flash {
  animation: playerDamageFlash 0.42s ease-out;
}

.status-window.collapsed {
  transform: translateY(80%);
  opacity: 0.3;
}

@keyframes playerDamageFlash {
  0% {
    background: rgba(142, 20, 20, 0.86);
    border-color: rgba(255, 190, 190, 0.74);
    box-shadow: 0 0 26px rgba(255, 62, 62, 0.66);
  }
  65% {
    background: rgba(95, 10, 10, 0.58);
    border-color: rgba(255, 130, 130, 0.46);
    box-shadow: 0 0 18px rgba(255, 54, 54, 0.34);
  }
  100% {
    background: rgba(20, 20, 20, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  }
}

.toggle-button {
  position: absolute;
  top: 6px;
  right: 6px;
  background: transparent;
  color: #fff;
  border: none;
  font-size: 18px;
  cursor: pointer;
  user-select: none;
}

.status-window.collapsed .toggle-button {
  transform: rotate(90deg);
}

.status-window h2 {
  margin: 0 0 12px 0;
  font-size: 1.1em;
  text-align: center;
  color: #ffffff;
}

.status-window ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.status-window li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  gap: 6px;
  flex-wrap: wrap;
}

.status-window li:last-child {
  border-bottom: none;
}

.clickable-item-row {
  cursor: pointer;
  transition: background 0.2s;
}

.clickable-item-row:hover {
  background: rgba(255, 255, 255, 0.1);
}

.clickable-item-row span:last-child {
  color: rgba(255, 255, 255, 0.4);
}


/* 共有のベース */
.bar {
  height: 100%;
  border-radius: 6px 0 0 6px;
}

/* HP（従来の赤系） */
.hp-bar {
  background: linear-gradient(to right, #ff5e5e, #ff8888);
  transition: width 0.24s ease;
}

/* MP（青系） */
.mp-bar {
  background: linear-gradient(to right, #4aa3ff, #78c9ff);
  transition: width 0.24s ease;
}

.bar-container {
  width: 80%;
  background: #333;
  border-radius: 6px;
  position: relative;
  height: 14px;
  overflow: hidden;
  margin-top: 4px;
}

.bar-label {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: #fff;
  line-height: 14px;
}

.mp-label {
  color: #e7f3ff;
  text-shadow: 0 0 2px rgba(0,0,0,.55);
}


/* Map and controls styling */
#MAPUI {
  position: fixed;
  top: 75%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
@media (max-width: 768px) {
  #MAPUI {
    top: 70%;
    left: 50%;
  }
}

#mapContainer {
  background: rgba(30, 30, 30, 0.6);
  padding: 6px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: scale(1.9);
  transition: background 0.3s ease;
}
@media (max-width: 768px) {
  #mapContainer {
    transform: scale(1.6);
  }
}

.tile {
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border-radius: 0px; /* ← 角をフラットに戻す */
  opacity: 0.85;
  image-rendering: pixelated;
}

.tile:hover {
  opacity: 1;
}






/* #terms {
  position: fixed;
  bottom: 5px;
  left: 3px;
  background: rgba(255, 255, 255, 0.2);
  color: rgb(0, 0, 255);
  border: 1px solid rgba(84, 101, 253, 0.6);
  letter-spacing: 0.5px;
  font-size:9px;
  padding: 5px 8px;
  border-radius: 4px;
  text-decoration: none;
  backdrop-filter: blur(4px);
  transition: background 0.3s, transform 0.2s;
  z-index: 200;
}

#terms:hover {
  transform: translateY(-2px);
} */










.glass-button {
  display: inline-block;
  padding: 10px 28px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
}
.glass-button:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(180, 200, 255, 0.4);
}
