/* 揉光 — Chrome 61 baseline + safe-area · cream / blush / lavender */

html {
  touch-action: manipulation;
  height: 100%;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #f8efe6;
  color: #5a4a5c;
  -webkit-touch-callout: none;
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
  background: #f6ebe3;
  background: -webkit-linear-gradient(160deg, #faf3eb 0%, #f3e4ef 48%, #e8dff5 100%);
  background: linear-gradient(160deg, #faf3eb 0%, #f3e4ef 48%, #e8dff5 100%);
}

#game-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  touch-action: none;
}

.screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  pointer-events: none;
  padding: 24px;
  padding-top: 24px;
  padding-top: var(--safe-area-inset-top, env(safe-area-inset-top, 0px));
  padding-bottom: 24px;
  padding-bottom: var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
}

.screen > * {
  pointer-events: auto;
}

.hidden {
  display: none !important;
}

.title-orb {
  position: absolute;
  top: 22%;
  left: 50%;
  width: 240px;
  height: 240px;
  margin-left: -120px;
  border-radius: 50%;
  background: rgba(255, 186, 200, 0.45);
  -webkit-filter: blur(40px);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

.title-orb.soft {
  top: 38%;
  width: 200px;
  height: 200px;
  margin-left: -60px;
  background: rgba(198, 180, 240, 0.4);
}

.title-block {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 28px 28px 32px;
  border-radius: 28px;
  background: rgba(255, 252, 248, 0.88);
  box-shadow: 0 18px 48px rgba(180, 140, 170, 0.22),
              0 2px 0 rgba(255, 255, 255, 0.9) inset;
  max-width: 320px;
  width: 86%;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: #c48aa0;
  margin-bottom: 10px;
  text-transform: none;
}

.game-title {
  font-size: 52px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: #7a5a6e;
  line-height: 1.1;
  text-indent: 0.18em;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.8);
}

.tagline {
  margin-top: 12px;
  font-size: 15px;
  color: #9a7a8e;
  letter-spacing: 0.08em;
}

.best-line {
  margin-top: 16px;
  margin-bottom: 22px;
  font-size: 13px;
  color: #b898a8;
}

.primary-btn {
  display: inline-block;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 14px 36px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #fff;
  background: #e8a0b4;
  background: -webkit-linear-gradient(135deg, #f0b0c0 0%, #d898c0 55%, #c8a8e0 100%);
  background: linear-gradient(135deg, #f0b0c0 0%, #d898c0 55%, #c8a8e0 100%);
  box-shadow: 0 10px 28px rgba(200, 140, 170, 0.4),
              0 1px 0 rgba(255, 255, 255, 0.45) inset;
  -webkit-appearance: none;
  appearance: none;
}

.primary-btn:active {
  opacity: 0.85;
  -webkit-transform: scale(0.97);
  transform: scale(0.97);
}

.primary-btn.pulse {
  -webkit-animation: softPulse 2.4s ease-in-out infinite;
  animation: softPulse 2.4s ease-in-out infinite;
}

@-webkit-keyframes softPulse {
  0%, 100% { box-shadow: 0 10px 28px rgba(200, 140, 170, 0.4), 0 1px 0 rgba(255, 255, 255, 0.45) inset; }
  50% { box-shadow: 0 14px 36px rgba(200, 140, 170, 0.55), 0 1px 0 rgba(255, 255, 255, 0.45) inset; }
}

@keyframes softPulse {
  0%, 100% { box-shadow: 0 10px 28px rgba(200, 140, 170, 0.4), 0 1px 0 rgba(255, 255, 255, 0.45) inset; }
  50% { box-shadow: 0 14px 36px rgba(200, 140, 170, 0.55), 0 1px 0 rgba(255, 255, 255, 0.45) inset; }
}

.hint-foot {
  position: absolute;
  bottom: 36px;
  bottom: calc(36px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: #b8a0b0;
  letter-spacing: 0.06em;
  z-index: 2;
  pointer-events: none;
}

/* HUD */
.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding: 14px 16px;
  padding-top: 14px;
  padding-top: calc(14px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)));
  pointer-events: none;
}

.hud-left {
  pointer-events: none;
}

.hud-mode-label {
  font-size: 18px;
  font-weight: 600;
  color: #7a5a6e;
  letter-spacing: 0.1em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.hud-stat-line {
  margin-top: 4px;
  font-size: 12px;
  color: #a8889c;
}

.icon-btn {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 252, 248, 0.85);
  color: #9a7a8e;
  font-size: 18px;
  box-shadow: 0 4px 14px rgba(160, 120, 150, 0.18);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.icon-btn:active {
  opacity: 0.75;
}

.icon-btn.muted {
  color: #c0a8b4;
}

/* Mode chips */
.mode-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  padding: 10px 12px 18px;
  padding-bottom: 18px;
  padding-bottom: calc(18px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
  pointer-events: none;
}

.mode-chip {
  pointer-events: auto;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 10px 14px;
  margin: 4px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: #8a6a7e;
  background: rgba(255, 252, 248, 0.78);
  box-shadow: 0 4px 12px rgba(160, 120, 150, 0.14);
  -webkit-appearance: none;
  appearance: none;
}

.mode-chip:active {
  opacity: 0.8;
}

.mode-chip.active {
  color: #fff;
  background: #e0a0b8;
  background: -webkit-linear-gradient(135deg, #f0b0c4, #c8a0d8);
  background: linear-gradient(135deg, #f0b0c4, #c8a0d8);
  box-shadow: 0 6px 18px rgba(200, 140, 170, 0.35);
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 110px;
  bottom: calc(110px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
  z-index: 30;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(90, 70, 90, 0.82);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
}
