@import url("https://fonts.googleapis.com/css2?family=DotGothic16&display=swap");

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-top: 62px;
  font-family: "DotGothic16", sans-serif;
  background: #2b1b2f;
  color: #2b1b2f;
}

.site {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: #ffe27a;
}

/* 上部バー */

.top-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 3000;
  display: flex;
  gap: 8px;
  padding: 8px;
  background: #2b1b2f;
}

.menu-btn,
.top-random-btn {
  flex: 1;
  min-height: 44px;
  font-family: inherit;
  font-size: 0.74rem;
  color: #2b1b2f;
  background: #fffdf2;
  border: 3px solid #2b1b2f;
  box-shadow: 3px 3px 0 #ff4b8b;
}

/* メニュー */

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  justify-content: flex-start;
  background: rgba(0,0,0,0.28);
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.22s ease;
}

.menu-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.side-menu {
  width: 60%;
  max-width: 288px;
  height: 100%;
  padding: 18px 14px;
  overflow-y: auto;
  background: rgba(43, 27, 47, 0.94);
  border-right: 4px solid #ff4b8b;
  transform: translateX(0);
  transition: transform 0.24s ease-out;
}

.menu-overlay.hidden .side-menu {
  transform: translateX(-105%);
}

.menu-title {
  margin-bottom: 18px;
  font-size: 0.92rem;
  color: #fff;
  text-align: center;
}

.menu-link {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 12px 10px;
  font-family: inherit;
  font-size: 0.76rem;
  text-align: left;
  color: #2b1b2f;
  text-decoration: none;
  background: #fffdf2;
  border: 3px solid #fffdf2;
  box-shadow: 3px 3px 0 #ff4b8b;
}

.menu-board-btn {
  cursor: pointer;
}

.menu-divider {
  height: 2px;
  margin: 18px 0;
  background: rgba(255,255,255,0.25);
}

.close-menu-btn {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  font-family: inherit;
  font-size: 0.72rem;
  color: #fff;
  background: #ff3b78;
  border: 3px solid #fff;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.28);
}

/* ロビー */

.lobby {
  padding: 0 0 18px;
  text-align: center;
  background:
    linear-gradient(
      180deg,
      #ff75c8 0%,
      #ffd65c 58%,
      #67ddff 100%
    );
  border-bottom: 5px solid #2b1b2f;
}

.main-visual {
  display: block;
  width: 100%;
  image-rendering: pixelated;
}

.catch {
  max-width: 340px;
  margin: 16px auto 10px;
  padding: 10px 12px;
  font-size: 0.86rem;
  line-height: 1.6;
  background: rgba(255,255,255,0.82);
  border: 3px solid #2b1b2f;
}

/* ゲーム検索機 */

.search-entry {
  width: calc(100% - 24px);
  max-width: 360px;
  display: block;
  margin: 8px auto 30px;
  padding: 0 12px;
  color: #2b1b2f;
  text-decoration: none;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.search-entry-image {
  display: block;
  width: min(76%, 270px);
  height: auto;
  margin: 0 auto 10px;
  image-rendering: pixelated;
  filter: drop-shadow(4px 4px 0 rgba(43, 27, 47, 0.24));
}

.search-entry-label {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  font-size: 0.8rem;
  background: #82ffcf;
  border: 3px solid #2b1b2f;
  box-shadow: 3px 3px 0 #ff4b8b;
}

.search-entry:active .search-entry-label {
  transform: translate(3px, 3px);
  box-shadow: none;
}

/* カバ店長のおすすめ */

.manager-recommend {
  width: calc(100% - 24px);
  max-width: 390px;
  margin: 18px auto 22px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.manager-stage {
  position: relative;
  min-height: 300px;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.manager-image {
  position: absolute;
  left: -8px;
  bottom: 0;
  width: 55%;
  max-width: 210px;
  height: auto;
  z-index: 2;
  image-rendering: pixelated;
  pointer-events: none;
}

.manager-speech {
  position: relative;
  z-index: 4;
  width: 72%;
  min-height: 62px;
  margin: 0 0 8px auto;
  padding: 10px 12px;
  font-size: 0.74rem;
  line-height: 1.5;
  text-align: center;
  background: #fffdf2;
  border: 3px solid #2b1b2f;
  box-shadow: 3px 3px 0 rgba(43, 27, 47, 0.2);
}

.manager-speech::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: -13px;
  width: 18px;
  height: 18px;
  background: #fffdf2;
  border-right: 3px solid #2b1b2f;
  border-bottom: 3px solid #2b1b2f;
  transform: rotate(45deg);
}

.manager-game-card {
  position: relative;
  z-index: 3;
  display: block;
  width: 58%;
  margin: 18px 0 0 auto;
  color: #2b1b2f;
  text-decoration: none;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.24s ease,
    transform 0.24s ease;
}

.manager-game-card img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  image-rendering: pixelated;
  filter: drop-shadow(4px 4px 0 rgba(43, 27, 47, 0.28));
}

.manager-game-card.is-switching {
  opacity: 0;
  transform: translateY(5px);
}

.manager-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
}

.manager-play-btn {
  width: min(100%, 310px);
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #fff;
  text-decoration: none;
  background: #ff3b78;
  border: 3px solid #2b1b2f;
  box-shadow: 3px 3px 0 #2b1b2f;
}

.manager-change-btn {
  padding: 4px 8px;
  font-family: inherit;
  font-size: 0.68rem;
  line-height: 1.35;
  color: #2b1b2f;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.manager-change-btn:hover,
.manager-change-btn:focus-visible {
  color: #ff006e;
}

.manager-change-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

@media (max-width: 360px) {
  .manager-stage {
    min-height: 275px;
  }

  .manager-image {
    width: 52%;
  }

  .manager-game-card {
    width: 57%;
  }

  .manager-speech {
    width: 76%;
    font-size: 0.7rem;
  }
}

/* おしらせ */

.news {
  width: calc(100% - 24px);
  max-width: 340px;
  margin: 0 auto 10px;
}

.news-box {
  padding: 8px 10px;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
  background: rgba(255,255,255,0.82);
  border: 3px solid #2b1b2f;
}

.news-title {
  font-size: 0.78rem;
}

.news-new {
  color: #ff006e;
}

/* 最近の記録 */

.recent-records {
  width: calc(100% - 24px);
  max-width: 340px;
  margin: 0 auto 12px;
}

.recent-records-box {
  padding: 8px 10px;
  text-align: left;
  background: rgba(255,255,255,0.86);
  border: 3px solid #2b1b2f;
}

.recent-records-title {
  margin-bottom: 6px;
  font-size: 0.78rem;
  text-align: center;
}

.recent-record-list {
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
  scrollbar-width: thin;
}

.record-card,
.record-loading {
  padding: 7px 8px;
  background: #fffdf2;
  border: 2px solid #2b1b2f;
  font-size: 0.72rem;
}

.record-rank {
  font-size: 0.78rem;
  line-height: 1.25;
  color: #ff006e;
}

.record-meta {
  margin-top: 3px;
  font-size: 0.66rem;
  line-height: 1.35;
}

.record-score {
  margin-top: 2px;
  font-size: 0.72rem;
  text-align: right;
}

.record-link-btn {
  display: block;
  margin-top: 8px;
  padding: 7px 8px;
  font-size: 0.7rem;
  text-align: center;
  color: #fff;
  text-decoration: none;
  background: #ff3b78;
  border: 2px solid #2b1b2f;
  box-shadow: 2px 2px 0 rgba(43, 27, 47, 0.28);
}

/* フロア */

.floor {
  padding: 26px 12px 36px;
  border-bottom: 5px solid #2b1b2f;
}

.floor-header {
  margin-bottom: 16px;
  text-align: center;
}

.floor-title {
  display: inline-block;
  margin: 0;
  padding: 8px 16px;
  font-size: 1.22rem;
  background: #fffdf2;
  border: 4px solid #2b1b2f;
}

.floor-desc {
  max-width: 340px;
  margin: 12px auto 0;
  font-size: 0.8rem;
  line-height: 1.55;
}

/* フロアカラー */

.floor-1 {
  background:
    linear-gradient(
      180deg,
      #a8ff75 0%,
      #ffe96b 100%
    );
}

.floor-2 {
  background:
    linear-gradient(
      180deg,
      #ffb347 0%,
      #ff7ab6 48%,
      #9c7cff 100%
    );
}

.floor-food {
  background:
    linear-gradient(
      180deg,
      #ffb86a 0%,
      #ffe27a 100%
    );
}

.floor-drink {
  background:
    linear-gradient(
      180deg,
      #6de7ff 0%,
      #82ffcf 50%,
      #fff06a 100%
    );
}

.floor-experiment {
  color: #2b1b2f;
  background:
    linear-gradient(
      180deg,
      #8d7dff 0%,
      #72e6ff 52%,
      #b5ffdb 100%
    );
}

.floor-experiment .floor-title,
.floor-experiment .floor-desc {
  color: #2b1b2f;
}


/* ゲーム */

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.game-card {
  display: block;
  color: #2b1b2f;
  text-decoration: none;
  background: #fffdf2;
  border: 4px solid #2b1b2f;
  box-shadow: 3px 3px 0 rgba(43, 27, 47, 0.28);
  overflow: hidden;
}

.game-card img {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  image-rendering: pixelated;
}

/* フッター */

.footer {
  padding: 28px 12px 44px;
  text-align: center;
  color: #fff;
  background: #2b1b2f;
}

.back-top {
  display: inline-block;
  margin-bottom: 20px;
  color: #fff;
  text-decoration: none;
  border-bottom: 2px solid #fff;
}

.creator-title {
  margin: 0 0 14px;
  font-size: 1rem;
}

.profile-image {
  width: 140px;
  height: 140px;
  object-fit: cover;
  display: block;
  margin: 0 auto 16px;
  border: 4px solid #fff;
  background: #fff;
  image-rendering: pixelated;
  box-shadow: 4px 4px 0 #ff4b8b;
}

.profile {
  max-width: 380px;
  margin: 0 auto 18px;
  padding: 12px;
  font-size: 0.82rem;
  line-height: 1.7;
  text-align: left;
  border: 3px solid #fff;
}

.sns-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  max-width: 390px;
  margin: 0 auto;
}

.sns-links a {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  font-size: 0.72rem;
  color: #2b1b2f;
  text-decoration: none;
  background: #fffdf2;
  border: 3px solid #fffdf2;
  box-shadow: 3px 3px 0 #ff4b8b;
}

/* ひとこと掲示板 */

.board-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  background: rgba(0,0,0,0.45);
}

.board-modal.hidden {
  display: none;
}

.board-window {
  width: 100%;
  max-width: 420px;
  max-height: 78vh;
  overflow: hidden;
  padding: 12px;
  background: #fff7d6;
  border: 4px solid #2b1b2f;
  box-shadow: 5px 5px 0 #2b1b2f;
}

.board-title {
  margin-bottom: 10px;
  text-align: center;
  font-size: 0.9rem;
}

.board-input,
.board-textarea {
  width: 100%;
  margin-bottom: 8px;
  padding: 8px;
  font-family: inherit;
  font-size: 0.72rem;
  color: #2b1b2f;
  background: #fffdf2;
  border: 3px solid #2b1b2f;
}

.board-textarea {
  height: 72px;
  resize: none;
}

.board-send-btn,
.board-close-btn {
  width: 100%;
  margin-bottom: 8px;
  padding: 10px;
  font-family: inherit;
  font-size: 0.74rem;
  color: #fff;
  background: #ff3b78;
  border: 3px solid #2b1b2f;
  box-shadow: 2px 2px 0 rgba(43,27,47,0.28);
}

.board-message-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
  padding-right: 2px;
}

.board-message-card {
  padding: 8px;
  background: #fffdf2;
  border: 2px solid #2b1b2f;
  font-size: 0.72rem;
  line-height: 1.45;
}

.board-message-name {
  margin-bottom: 3px;
  color: #ff006e;
  font-size: 0.65rem;
}

.board-message-date {
  margin-bottom: 4px;
  font-size: 0.58rem;
  color: #666;
}
