@import url("https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&family=Lekton:ital,wght@0,400;0,700;1,400&family=Zen+Kaku+Gothic+Antique&display=swap");

:root {
  --bg-color: #e6e9ef;
  --text-main: #2c3e50;
  --accent-blue: #70a1ff;
  --navy-blue: #1e272e;
  --glass-bg: rgba(255, 255, 255, 0.4);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background-color: var(--bg-color);
  background: linear-gradient(135deg, #fcfdff 0%, #c0cde3 100%);
  color: var(--text-main);
  font-family: "Josefin Sans", "Zen Kaku Gothic Antique", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
}
a {
  color: inherit;
  transition: color 0.3s;
}
a:hover {
  color: var(--accent-blue);
}
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, rgba(112, 161, 255, 0.1), transparent);
  pointer-events: none;
}
#page-content {
  transition: opacity 0.4s ease;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
hr {
  border: none;
  border: 1px solid #ffffff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin: 1px auto;
  width: 90%;
}

/* --- Floating Player Logic --- */
#floating-player {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  pointer-events: none;
}
.player-body {
  width: 440px;
  opacity: 1;
  transform: scale(1);
  transform-origin: bottom right;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease,
    backdrop-filter 0.3s ease;
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* Safari対応 */
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0);
}
@media (max-width: 500px) {
  .player-body {
    width: calc(100vw - 60px);
  }
}
.mini-trigger {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-blue);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(112, 161, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.5);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}
.mini-trigger:hover {
  background: #8ab4ff;
  box-shadow: 0 0 15px rgba(112, 161, 255, 0.8);
}
#floating-player.is-minimized .player-body {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}
#floating-player.is-minimized .mini-trigger {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
.music-icon {
  color: white;
  font-size: 1.3rem;
  animation: music-float 3s infinite ease-in-out;
}
@keyframes music-float {
  0%,
  100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(8deg);
  }
}
.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
  padding: 0 0.2rem;
  font-size: 0.7rem;
  letter-spacing: 0.1rem;
  color: var(--accent-blue);
  font-weight: 600;
}
.close-btn {
  background: none;
  border: none;
  font-weight: bold;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 5px;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.close-btn:hover {
  transform: scale(1.4);
}
.close-icon {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 2.5px solid var(--accent-blue);
  border-bottom: 2.5px solid var(--accent-blue);
  transform: rotate(45deg);
  margin-bottom: 6px;
}
.bgm-player-container {
  padding: 1rem;
  overflow: hidden;
}
.bgm-player-container iframe {
  border-radius: 6px;
}
#player-toggle-btn {
  background: none;
  border: none;
  color: var(--accent-blue);
  font-weight: bold;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}
.player-content {
  padding: 10px;
}
.player-wrapper {
  width: 100%;
  height: 230px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.05);
}
.player-wrapper iframe {
  margin-top: 0;
}

footer {
  margin-top: auto;
  padding-top: 3rem;
  margin-bottom: 2rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.disclaimer {
  font-size: 0.7rem;
  opacity: 0.5;
  max-width: 400px;
  line-height: 1.4;
  letter-spacing: 0.02rem;
}
.copyright {
  font-size: 0.8rem;
  opacity: 0.6;
  letter-spacing: 0.05rem;
  font-weight: 500;
}
.container {
  width: 85%;
  max-width: 500px;
  text-align: center;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 4rem);
}
.top-page {
  margin-top: 4rem;
}
header {
  margin-bottom: 3rem;
}
h1 {
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: 0.3rem;
  color: var(--navy-blue);
  margin-bottom: 0.5rem;
  text-shadow: #ffffff 0px 0px 4px;
}
.subtitle {
  font-size: 0.75rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  opacity: 0.6;
  text-shadow: #ffffff 0px 0px 4px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.nav-card {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 1.5rem 1.8rem 1.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.nav-card:hover {
  background: rgba(255, 255, 255, 0.6);
  border-color: var(--accent-blue);
}
.card-content h2 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  text-align: left;
}
.card-content span {
  display: block;
  font-size: 0.7rem;
  opacity: 0.6;
  text-align: left;
  text-transform: uppercase;
}
.arrow {
  font-size: 1.2rem;
  opacity: 0.3;
  transition: transform 0.3s;
}
.nav-card:hover .arrow {
  transform: translateX(5px);
  opacity: 1;
  color: var(--accent-blue);
}

/* pages */
.back-link {
  margin-bottom: 1.5rem;
}
.back-link a {
  text-decoration: none;
  font-size: 0.8rem;
  color: var(--accent-blue);
  letter-spacing: 0.1rem;
  text-shadow: #ffffff 0px 0px 4px;
}
.content-body {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 2rem;
}
.pages-header {
  margin-left: 0.5rem;
}
.pages {
  max-width: 650px;
  margin: 2rem auto 0 auto;
  text-align: left;
}

/* profile */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.profile-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--glass-bg);
  box-shadow: 0 0 15px rgba(110, 110, 110, 0.4);
  transition: transform 0.3s ease;
}
.profile-icon:hover {
  transform: rotate(5deg) scale(1.05);
}
.identity {
  margin-top: 0.5rem;
}
.detail-row {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.2rem;
}
.detail-row .detail-item {
  flex: 1;
  margin-bottom: 0;
}
.label {
  display: block;
  font-size: 0.7rem;
  color: var(--accent-blue);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

/* cafe timer */
h3 {
  font-size: 1.3rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--navy-blue);
}
.step-list {
  list-style: none;
}
.step-list li {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.6rem;
  align-items: flex-start;
}
.step-num {
  font-family: "Lekton", monospace;
  color: var(--accent-blue);
  font-weight: 700;
}
.launch-button {
  display: block;
  text-align: center;
  background: var(--navy-blue);
  color: white;
  text-decoration: none;
  padding: 1rem;
  margin-bottom: 2rem;
  border: 3px solid var(--accent-blue);
  border-radius: 8px;
  letter-spacing: 0.2rem;
  transition: opacity 0.3s;
  cursor: pointer;
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}
.launch-button:hover {
  opacity: 0.9;
  transform: scale(1.02);
}
.guide-page {
  max-width: 650px;
  margin: 2rem auto;
  text-align: left;
}
.section-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-left: 0.8rem;
  letter-spacing: 0.05rem;
}
.feature-list {
  margin-top: 1.5rem;
  padding-left: 0.5rem;
}
.feature-list ul {
  list-style: none;
  margin-top: 0.5rem;
}
.feature-list li {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  position: relative;
  padding-left: 1.2rem;
  opacity: 0.85;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 6px;
  height: 6px;
  background: var(--accent-blue);
  transform: rotate(45deg);
}
.blue-line {
  border-left: 4px solid var(--accent-blue);
}
.yellow-line {
  border-left: 4px solid #f1c40f;
}
.item-title {
  font-size: 0.95rem;
  color: var(--navy-blue);
  margin-bottom: 0.3rem;
}
.content-body p {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.85;
}
.info-box {
  margin-top: 1rem;
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.03);
}
.info-title {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
  letter-spacing: 0.05rem;
  display: flex;
  align-items: center;
}
.info-box:not(.alert) .info-title {
  color: var(--accent-blue);
}
.info-box.alert .info-title {
  color: #c0392b;
}
.info-box p {
  font-size: 0.85rem !important;
  line-height: 1.6;
  margin: 0;
}
.tab-container {
  display: flex;
  gap: 1rem;
  padding-left: 1rem;
}
.tab-button {
  background: none;
  border: none;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 400;
  font-size: 1rem;
  color: var(--text-main);
  opacity: 0.5;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}
.tab-button.active {
  opacity: 1;
  color: var(--accent-blue);
  border-bottom: 2px solid var(--accent-blue);
}
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease;
}
.tab-content.active {
  display: block;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.screen-gallery {
  margin: 2rem 0;
}
.gallery-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.gallery-item {
  margin: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}
.gallery-item figcaption {
  font-size: 0.7rem;
  padding: 0.5rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.5);
  color: var(--navy-blue);
  letter-spacing: 0.05rem;
}
.gallery-sub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 480px) {
  .gallery-sub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* status iframe */
.iframe-wrapper {
  width: 100%;
  height: 750px;
  overflow: hidden;
  position: relative;
}
.status-iframe {
  width: 133.33%;
  height: 1000px;
  margin-bottom: -250px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  transform-origin: top left;
  transform: scale(0.75);
}
