* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: #000;
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Meiryo", sans-serif;
  color: #fff;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ゲーム領域（JSで9:16に合わせてサイズ設定、--s は拡大率） */
#stage {
  position: relative;
  --s: 1;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(255, 90, 20, .15);
}

.site-nav-overlay {
  position: absolute;
  top: calc(10px * var(--s));
  left: calc(10px * var(--s));
  right: calc(10px * var(--s));
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
  pointer-events: auto;
}

.site-back-link, .site-x-link {
  color: #fff;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  padding: calc(6px * var(--s)) calc(12px * var(--s));
  border-radius: calc(8px * var(--s));
  font-size: calc(12px * var(--s));
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 0.2s;
}

.site-back-link:hover, .site-x-link:hover {
  background: rgba(2, 132, 199, 0.85);
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.hidden { display: none !important; }

button {
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
  border: none;
  color: #fff;
  border-radius: calc(12px * var(--s));
  padding: calc(10px * var(--s)) calc(16px * var(--s));
  font-size: calc(18px * var(--s));
  background: #3a2a2a;
  box-shadow: 0 calc(4px * var(--s)) 0 #1a1010;
  transition: transform .05s;
}
button:active { transform: translateY(calc(3px * var(--s))); box-shadow: 0 calc(1px * var(--s)) 0 #1a1010; }

button.primary {
  background: linear-gradient(#ff7a2a, #e0410f);
  box-shadow: 0 calc(5px * var(--s)) 0 #8a2306;
  font-size: calc(26px * var(--s));
  padding: calc(14px * var(--s)) calc(40px * var(--s));
  font-family: "Dela Gothic One", sans-serif;
  font-weight: 400;
  letter-spacing: .05em;
}

/* オーバーレイ共通 */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(16px * var(--s));
  padding: calc(24px * var(--s));
  text-align: center;
  background: radial-gradient(ellipse at center, rgba(20, 5, 0, .55), rgba(0, 0, 0, .85));
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: "Dela Gothic One", sans-serif;
  line-height: 1.05;
  transform: rotate(-4deg);
}
.logo .small {
  font-size: calc(30px * var(--s));
  color: #9fd8ff;
  text-shadow: 0 0 calc(10px * var(--s)) #3aa0ff;
}
.logo .big {
  font-size: calc(64px * var(--s));
  color: #ffd25a;
  -webkit-text-stroke: calc(2px * var(--s)) #7a2200;
  text-shadow: 0 calc(5px * var(--s)) 0 #7a2200, 0 0 calc(30px * var(--s)) rgba(255, 100, 0, .8);
}

.howto-cards {
  display: flex;
  flex-direction: column;
  gap: calc(10px * var(--s));
  width: 90%;
  max-width: 440px;
}

.howto-item {
  display: flex;
  align-items: center;
  gap: calc(10px * var(--s));
  background: rgba(0, 0, 0, 0.65);
  border: calc(1.5px * var(--s)) solid rgba(255, 180, 80, 0.4);
  border-radius: calc(10px * var(--s));
  padding: calc(10px * var(--s)) calc(14px * var(--s));
  text-align: left;
}

.howto-badge {
  background: linear-gradient(#ff7a2a, #e0410f);
  color: #fff;
  font-family: "Dela Gothic One", sans-serif;
  font-size: calc(13px * var(--s));
  padding: calc(4px * var(--s)) calc(8px * var(--s));
  border-radius: calc(6px * var(--s));
  white-space: nowrap;
}

.howto-item p {
  font-size: calc(15px * var(--s));
  line-height: 1.45;
  color: #fff;
}

.howto-item b {
  color: #ffd25a;
}

#cardImg {
  width: 92%;
  aspect-ratio: 1 / 1;
  border-radius: calc(12px * var(--s));
  box-shadow: 0 0 calc(30px * var(--s)) rgba(255, 160, 40, .35);
  animation: pop .5s cubic-bezier(.2, 1.6, .4, 1);
}

@keyframes pop {
  from { transform: scale(.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.result-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(12px * var(--s));
  width: 92%;
  max-width: 440px;
}

.result-actions button,
.btn-ofuse {
  width: 100%;
  box-sizing: border-box;
}

.btn-ofuse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff7a45, #fa541c);
  color: #fff;
  font-family: "Dela Gothic One", sans-serif;
  font-size: calc(18px * var(--s));
  padding: calc(12px * var(--s)) calc(20px * var(--s));
  border-radius: calc(30px * var(--s));
  text-decoration: none;
  box-shadow: 0 calc(4px * var(--s)) 0 #a82e08, 0 calc(6px * var(--s)) calc(18px * var(--s)) rgba(250, 84, 28, 0.4);
  transition: transform .1s, filter .1s;
}

.btn-ofuse:hover {
  filter: brightness(1.1);
  transform: translateY(calc(-2px * var(--s)));
}

.btn-ofuse:active {
  transform: translateY(calc(2px * var(--s)));
  box-shadow: 0 calc(2px * var(--s)) 0 #a82e08;
}

.btn-x {
  background: #0f1419;
  color: #fff;
  border: 1px solid #333;
  box-shadow: 0 calc(4px * var(--s)) 0 #000, 0 calc(6px * var(--s)) calc(18px * var(--s)) rgba(0, 0, 0, 0.5);
  font-family: "Dela Gothic One", sans-serif;
  font-size: calc(18px * var(--s));
  padding: calc(12px * var(--s)) calc(20px * var(--s));
  border-radius: calc(30px * var(--s));
  cursor: pointer;
  transition: transform .1s, filter .1s;
}

.btn-x:hover {
  filter: brightness(1.2);
  transform: translateY(calc(-2px * var(--s)));
}

.btn-x:active {
  transform: translateY(calc(2px * var(--s)));
  box-shadow: 0 calc(2px * var(--s)) 0 #000;
}

.share-hint {
  margin: calc(6px * var(--s)) 0 0 0;
  font-size: calc(13px * var(--s));
  color: rgba(255, 235, 200, 0.85);
  font-weight: 700;
  text-align: center;
}


