/* ==========================================================================
   Character Prompt Park — 手のひらのテーマパーク
   クリーム×オレンジの3Dトイ質感 / 空色の世界にアプリフレームが浮かぶ
   ========================================================================== */

:root {
  color-scheme: light;
  --sky: #6ec4ee;
  --sky-deep: #4aaede;
  --cream: #fdf3e0;
  --cream-bright: #fffaf0;
  --panel: #fff6e6;
  --line: rgba(122, 82, 46, 0.14);
  --ink: #5a3a22;
  --ink-strong: #47280f;
  --ink-soft: #8a6a49;
  --ink-mute: #a3835f;
  --orange: #f28a2e;
  --orange-deep: #d96f1d;
  --orange-soft: #ffc98f;
  --coral: #e8705f;
  --coral-deep: #c9503f;
  --mint: #67c7a2;
  --mint-deep: #47a37f;
  --yellow: #ffd66b;
  --blue: #79c3e8;
  --pink: #f4a9b8;
  --shadow-soft: 0 10px 30px rgba(122, 66, 20, 0.14);
  --radius-lg: 28px;
  --radius-md: 20px;
  --font-display: "Fredoka", "Zen Maru Gothic", sans-serif;
  --font-body: "Zen Maru Gothic", "Fredoka", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, #7ecdf3 0%, var(--sky) 45%, #9adcf6 100%);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 99;
  background: var(--ink-strong);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
}

.skip-link:focus {
  left: 8px;
}

/* ==========================================================================
   そらの背景（アプリの外の世界）
   ========================================================================== */

.park-sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.sun {
  position: absolute;
  top: 6vh;
  right: 8vw;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff3c2, #ffd66b 70%);
  box-shadow: 0 0 60px 22px rgba(255, 224, 130, 0.55);
}

.cloud {
  position: absolute;
  background: #ffffff;
  border-radius: 999px;
  opacity: 0.92;
  animation: drift 46s linear infinite;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.cloud-a { top: 12vh; left: -180px; width: 150px; height: 46px; }
.cloud-a::before { width: 66px; height: 66px; top: -32px; left: 26px; }
.cloud-a::after { width: 48px; height: 48px; top: -22px; left: 80px; }

.cloud-b { top: 42vh; left: -260px; width: 190px; height: 54px; animation-duration: 62s; animation-delay: -18s; }
.cloud-b::before { width: 82px; height: 82px; top: -40px; left: 34px; }
.cloud-b::after { width: 56px; height: 56px; top: -26px; left: 104px; }

.cloud-c { top: 72vh; left: -140px; width: 120px; height: 40px; animation-duration: 54s; animation-delay: -34s; }
.cloud-c::before { width: 54px; height: 54px; top: -26px; left: 20px; }
.cloud-c::after { width: 40px; height: 40px; top: -18px; left: 62px; }

@keyframes drift {
  to { transform: translateX(calc(100vw + 320px)); }
}

.balloon {
  position: absolute;
  width: 34px;
  height: 42px;
  border-radius: 50% 50% 48% 48%;
  animation: floatUp 15s ease-in-out infinite;
}

.balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: 44px;
  background: rgba(90, 58, 34, 0.35);
}

.balloon-a { left: 6vw; bottom: 18vh; background: radial-gradient(circle at 35% 30%, #ffd2b0, var(--coral)); }
.balloon-b { right: 7vw; bottom: 30vh; background: radial-gradient(circle at 35% 30%, #fff2b8, var(--yellow)); animation-delay: -5s; }
.balloon-c { right: 16vw; bottom: 8vh; background: radial-gradient(circle at 35% 30%, #d8f2e6, var(--mint)); animation-delay: -9s; }

@keyframes floatUp {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-26px) rotate(3deg); }
}

.bg-wheel {
  position: absolute;
  bottom: -30px;
  left: 3vw;
  width: 220px;
  height: 242px;
  opacity: 0.5;
}

/* ==========================================================================
   アプリフレーム
   ========================================================================== */

.phone {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  margin: 0 auto;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -8%, #bfe7fa 0%, rgba(191, 231, 250, 0) 55%),
    linear-gradient(180deg, #fdf6e6 0%, var(--cream) 100%);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(31, 84, 116, 0.35);
}

@media (min-width: 540px) {
  .phone {
    margin: 22px auto;
    min-height: calc(100dvh - 44px);
    border-radius: 42px;
    border: 6px solid #ffffff;
    overflow: clip;
  }
}

main {
  flex: 1;
  padding: 0 16px calc(96px + env(safe-area-inset-bottom));
}

/* ---------- トップバー ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 8px;
}

body:not([data-screen="home"]) .topbar {
  display: none;
}

.icon-button {
  width: 46px;
  height: 44px;
  border-radius: 15px;
  background: var(--cream-bright);
  box-shadow: 0 3px 0 #e3cfa8, inset 0 1px 0 #ffffff;
  display: grid;
  place-content: center;
  gap: 5px;
}

.icon-button span {
  display: block;
  width: 18px;
  height: 3px;
  border-radius: 3px;
  background: var(--orange);
}

.icon-button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #e3cfa8;
}

.brand {
  text-decoration: none;
  color: inherit;
  text-align: center;
  line-height: 1;
  display: grid;
}

.brand strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--orange);
  text-shadow: 0 2px 0 #fff, 0 4px 0 rgba(217, 111, 29, 0.25);
}

.brand em {
  font-style: normal;
  font-weight: 900;
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  color: var(--ink-strong);
  margin-top: 3px;
}

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.round-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cream-bright);
  box-shadow: 0 3px 0 #e3cfa8, inset 0 1px 0 #ffffff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.05rem;
  color: var(--orange-deep);
  flex: none;
}

.round-icon svg {
  width: 22px;
  height: 22px;
}

.round-icon:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #e3cfa8;
}

.round-icon.ghost {
  background: #fff;
}

.round-icon.add {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 3px 0 var(--orange-deep), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.avatar-button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #ffe9c9, #ffd9a1);
  border: 3px solid #ffffff;
  box-shadow: 0 3px 0 #e3cfa8;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.avatar-button svg {
  width: 66px;
  height: 78px;
  margin-top: -14px;
}

/* ==========================================================================
   画面の切り替え
   ========================================================================== */

.screen {
  animation: screenIn 0.34s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.screen[hidden] {
  display: none;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
}

.screen-head {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  padding: 14px 0 12px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(180deg, var(--cream) 78%, rgba(253, 243, 224, 0));
}

.screen-head p {
  text-align: center;
  font-weight: 900;
  font-size: 1.02rem;
  color: var(--ink-strong);
}

/* ==========================================================================
   共通パーツ
   ========================================================================== */

.section-heading {
  margin: 22px 4px 12px;
}

.section-heading span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--orange);
}

.section-heading h2 {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--ink-strong);
}

.mini-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
}

.soft-panel {
  background: var(--cream-bright);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

/* 3Dトイボタン */
.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 20px;
  border-radius: 22px;
  font-size: 1.12rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #ffab55 0%, var(--orange) 55%, #ec7f1f 100%);
  box-shadow: 0 6px 0 var(--orange-deep), 0 14px 26px rgba(217, 111, 29, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.55);
  text-shadow: 0 1.5px 0 rgba(160, 78, 8, 0.4);
  transition: transform 0.12s, box-shadow 0.12s;
}

.primary-button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--orange-deep), 0 6px 14px rgba(217, 111, 29, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.55);
}

.primary-button:disabled {
  filter: saturate(0.55) brightness(1.05);
  cursor: wait;
}

.primary-button.slim {
  padding: 13px 18px;
  font-size: 1rem;
  margin-top: 14px;
}

.primary-button .dice {
  font-size: 1.3rem;
}

.pill-button {
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffab55, var(--orange));
  color: #fff;
  font-weight: 900;
  font-size: 0.86rem;
  box-shadow: 0 3.5px 0 var(--orange-deep), inset 0 1.5px 0 rgba(255, 255, 255, 0.5);
}

.pill-button:active {
  transform: translateY(2.5px);
  box-shadow: 0 1px 0 var(--orange-deep);
}

.text-button {
  display: block;
  margin: 18px auto 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-mute);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* リボンバナー */
.ribbon-banner {
  position: relative;
  width: fit-content;
  margin: 8px auto 14px;
  z-index: 1;
}

.ribbon-banner span {
  display: block;
  padding: 10px 26px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: #fff;
  background: linear-gradient(180deg, #f8a259, var(--orange));
  border-radius: 12px;
  box-shadow: 0 4px 0 var(--orange-deep), inset 0 2px 0 rgba(255, 255, 255, 0.45);
  text-shadow: 0 1.5px 0 rgba(160, 78, 8, 0.45);
}

.ribbon-banner::before,
.ribbon-banner::after {
  content: "";
  position: absolute;
  top: 7px;
  width: 26px;
  height: 34px;
  background: var(--orange-deep);
  z-index: -1;
}

.ribbon-banner::before {
  left: -16px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 42% 50%);
  transform: skewY(-6deg);
}

.ribbon-banner::after {
  right: -16px;
  clip-path: polygon(0 0, 100% 0, 58% 50%, 100% 100%, 0 100%);
  transform: skewY(6deg);
}

.ribbon-banner.coral span {
  background: linear-gradient(180deg, #f28a77, var(--coral));
  box-shadow: 0 4px 0 var(--coral-deep), inset 0 2px 0 rgba(255, 255, 255, 0.45);
}

.ribbon-banner.coral::before,
.ribbon-banner.coral::after {
  background: var(--coral-deep);
}

/* ==========================================================================
   ホーム
   ========================================================================== */

.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  padding: 22px 18px 148px;
  min-height: 430px;
  background: linear-gradient(180deg, #8fd4f5, #ffe9c4);
  border: 3px solid #ffffff;
  box-shadow: var(--shadow-soft);
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 100%;
}

.hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(38, 92, 128, 0.18) 0%, rgba(38, 92, 128, 0) 34%),
    linear-gradient(0deg, rgba(122, 66, 20, 0.22) 0%, rgba(122, 66, 20, 0) 30%);
}

.hero-flag {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 24px;
  background:
    repeating-linear-gradient(90deg,
      var(--coral) 0 34px,
      var(--yellow) 34px 68px,
      var(--mint) 68px 102px,
      var(--blue) 102px 136px);
  clip-path: polygon(0 0, 100% 0, 100% 40%, 96% 100%, 92% 40%, 88% 100%, 84% 40%, 80% 100%, 76% 40%, 72% 100%, 68% 40%, 64% 100%, 60% 40%, 56% 100%, 52% 40%, 48% 100%, 44% 40%, 40% 100%, 36% 40%, 32% 100%, 28% 40%, 24% 100%, 20% 40%, 16% 100%, 12% 40%, 8% 100%, 4% 40%, 0 100%);
  opacity: 0.92;
}

.hero-copy {
  position: relative;
  z-index: 2;
  margin-top: 16px;
}

.hero-logo {
  display: grid;
  line-height: 0.95;
}

.hero-logo strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.35rem;
  color: var(--orange);
  text-shadow:
    0 2px 0 #fff, 0 -2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff,
    0 5px 0 rgba(217, 111, 29, 0.35);
}

.hero-logo em {
  font-style: normal;
  font-weight: 900;
  font-size: 1.06rem;
  letter-spacing: 0.4em;
  color: var(--ink-strong);
  text-shadow: 0 1.5px 0 #fff;
  margin-top: 6px;
}

.hero-sub {
  margin-top: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: #2f7ba6;
}

.hero-greeting {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 16px;
  background: rgba(90, 53, 25, 0.82);
  color: #ffe9c4;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: 0 3px 0 rgba(61, 34, 13, 0.7);
}

.hero-greeting span {
  color: var(--yellow);
  font-family: var(--font-display);
  letter-spacing: 0.06em;
}

.hero-chars {
  position: absolute;
  left: 10px;
  bottom: -4px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  filter: drop-shadow(0 8px 10px rgba(80, 40, 8, 0.32));
}

.hero-okan {
  width: 148px;
  height: 175px;
  animation: bob 3.4s ease-in-out infinite;
}

.hero-hermie {
  width: 96px;
  height: 91px;
  margin-left: -26px;
  animation: bob 3.4s ease-in-out infinite 0.4s;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.hero-ticket {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  width: 168px;
  background: rgba(255, 250, 240, 0.94);
  border: 2px dashed rgba(217, 111, 29, 0.5);
  border-radius: 18px;
  padding: 12px 12px 13px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(3px);
}

.ticket-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral);
}

.ticket-art {
  margin: 8px auto 6px;
  width: 74px;
  height: 56px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 3px 8px rgba(122, 66, 20, 0.2);
}

.ticket-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-ticket strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 900;
  color: var(--ink-strong);
  line-height: 1.4;
  margin-bottom: 9px;
}

/* アトラクションのタイル */
.attraction-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.attraction-grid button {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 14px 6px 11px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fffdf6, var(--tile-bg, #ffe1bd));
  border: 2px solid #ffffff;
  box-shadow: 0 4px 0 rgba(160, 106, 44, 0.28), 0 8px 18px rgba(122, 66, 20, 0.12);
  transition: transform 0.14s, box-shadow 0.14s;
}

.attraction-grid button:hover {
  transform: translateY(-3px);
}

.attraction-grid button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(160, 106, 44, 0.28);
}

.attraction-grid .toy-icon {
  font-size: 1.72rem;
  filter: drop-shadow(0 3px 3px rgba(122, 66, 20, 0.28));
}

.attraction-grid strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-strong);
}

.attraction-grid small {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink);
}

/* さいきんの冒険 */
.recent-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: none;
}

.recent-strip::-webkit-scrollbar {
  display: none;
}

.recent-strip .recent-card {
  flex: none;
  width: 168px;
  text-align: left;
  background: var(--cream-bright);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 3px 0 rgba(160, 106, 44, 0.16);
}

.recent-strip .recent-card:active {
  transform: translateY(2px);
}

.recent-card strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--ink-strong);
  line-height: 1.45;
}

.recent-card span {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--orange-deep);
}

.recent-empty {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-mute);
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px dashed var(--line);
  border-radius: 16px;
  padding: 16px;
  width: 100%;
  text-align: center;
}

/* ==========================================================================
   ガチャ
   ========================================================================== */

.gacha-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 4px 0 0;
}

/* うしろの光線 */
.gacha-stage::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(420px, 120vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: repeating-conic-gradient(
    rgba(255, 214, 107, 0.22) 0deg 9deg,
    rgba(255, 214, 107, 0) 9deg 18deg
  );
  -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 68%);
  mask-image: radial-gradient(circle, #000 30%, transparent 68%);
  animation: rayTurn 44s linear infinite;
  pointer-events: none;
}

@keyframes rayTurn {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.twinkle {
  position: absolute;
  color: var(--yellow);
  text-shadow: 0 1px 0 rgba(217, 111, 29, 0.4);
  animation: twinkle 2.2s ease-in-out infinite;
  pointer-events: none;
}

.t-a { top: 8%; left: 14%; font-size: 1.15rem; }
.t-b { top: 18%; right: 12%; font-size: 0.85rem; animation-delay: 0.5s; color: var(--pink); }
.t-c { bottom: 26%; left: 8%; font-size: 0.9rem; animation-delay: 1.1s; color: var(--blue); }
.t-d { bottom: 14%; right: 9%; font-size: 1.2rem; animation-delay: 1.6s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.8) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(24deg); }
}

.gacha-machine {
  width: min(250px, 68vw);
  height: auto;
  filter: drop-shadow(0 14px 22px rgba(122, 66, 20, 0.28));
}

.gacha-lever {
  transform-origin: 232px 228px;
  transition: transform 0.3s;
}

.spinning .gacha-lever {
  animation: leverPull 0.9s ease-in-out infinite;
}

@keyframes leverPull {
  0%, 100% { transform: rotate(0deg); }
  40% { transform: rotate(58deg); }
}

.spinning .dome-capsules {
  animation: shake 0.35s linear infinite;
}

@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-3px, -4px); }
  50% { transform: translate(3px, -1px); }
  75% { transform: translate(-2px, -5px); }
}

.drop-capsule {
  opacity: 0;
}

.dropping .drop-capsule {
  animation: capsuleDrop 0.85s cubic-bezier(0.3, 0, 0.6, 1.4) forwards;
}

@keyframes capsuleDrop {
  0% { opacity: 0; transform: translateY(-24px); }
  30% { opacity: 1; }
  62% { transform: translateY(46px); }
  80% { transform: translateY(38px); }
  100% { opacity: 1; transform: translateY(46px); }
}

.gacha-note {
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.7;
  margin: 12px 0 4px;
}

.gacha-note strong {
  color: var(--orange-deep);
  font-weight: 900;
}

.mode-chip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 2px 10px;
}

.mode-chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--cream-bright);
  border: 1.5px solid var(--line);
  font-weight: 900;
  font-size: 0.8rem;
  color: var(--ink-strong);
  box-shadow: 0 2.5px 0 rgba(160, 106, 44, 0.18);
}

/* リール */
.reel-list {
  display: grid;
  gap: 8px;
}

.reel-row {
  display: grid;
  grid-template-columns: 86px 1fr auto;
  align-items: center;
  gap: 8px;
  background: var(--cream-bright);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 8px 10px;
  box-shadow: 0 2.5px 0 rgba(160, 106, 44, 0.14);
}

.reel-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}

.reel-label .reel-icon {
  font-size: 1.05rem;
}

.reel-value {
  justify-self: start;
  max-width: 100%;
  text-align: left;
  padding: 7px 13px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, #ffeed2);
  border: 1.5px solid rgba(217, 111, 29, 0.28);
  font-weight: 900;
  font-size: 0.85rem;
  color: var(--ink-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: transform 0.1s;
}

.reel-value:active {
  transform: scale(0.96);
}

.is-spinning .reel-value {
  animation: reelBlur 0.12s linear infinite;
}

@keyframes reelBlur {
  0%, 100% { transform: translateY(0); filter: blur(0); }
  50% { transform: translateY(-2px); filter: blur(1.5px); }
}

.reel-tools {
  display: flex;
  gap: 6px;
}

.reel-tools button {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  background: #fff;
  border: 1.5px solid var(--line);
  box-shadow: 0 2px 0 rgba(160, 106, 44, 0.16);
  color: var(--orange-deep);
}

.reel-tools button:active {
  transform: translateY(1.5px);
  box-shadow: none;
}

.reel-tools .lock-button[aria-pressed="true"] {
  background: var(--yellow);
  border-color: rgba(160, 106, 44, 0.4);
  color: var(--ink-strong);
}

.spin-button {
  margin-top: 14px;
}

/* ==========================================================================
   生成結果
   ========================================================================== */

.result-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 4px solid #ffffff;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 5 / 3.4;
  background: #ffe4c0;
}

.result-visual > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rv-mode {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--orange-deep);
  box-shadow: 0 2px 6px rgba(122, 66, 20, 0.25);
}

.result-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 2px 6px;
}

.result-title-row h2 {
  font-size: 1.18rem;
  font-weight: 900;
  color: var(--ink-strong);
  line-height: 1.5;
}

.heart-button {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--cream-bright);
  border: 1.5px solid var(--line);
  box-shadow: 0 3px 0 rgba(160, 106, 44, 0.18);
  color: #d8c3ac;
  transition: color 0.15s, transform 0.15s;
}

.heart-button svg {
  width: 24px;
  height: 24px;
}

.heart-button[aria-pressed="true"] {
  color: var(--coral);
  animation: heartPop 0.35s cubic-bezier(0.2, 1.6, 0.4, 1);
}

@keyframes heartPop {
  0% { transform: scale(0.7); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.heart-button:active {
  transform: translateY(2px) scale(0.96);
}

.why-text {
  margin: 0 2px 14px;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.8;
  color: var(--ink);
}

/* バズ予報 */
.buzz-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fff4f0, #ffe8de);
  border: 1.5px solid rgba(201, 80, 63, 0.28);
  box-shadow: 0 3px 0 rgba(160, 106, 44, 0.12);
}

.buzz-stars {
  font-size: 1rem;
  letter-spacing: 2px;
}

.buzz-stars .on { color: var(--orange); text-shadow: 0 1px 0 rgba(217, 111, 29, 0.4); }
.buzz-stars .off { color: #e8d5c2; }

.buzz-label {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--coral-deep);
}

.labeled-box {
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  padding: 13px 15px;
  margin-bottom: 12px;
  background: var(--cream-bright);
  box-shadow: 0 3px 0 rgba(160, 106, 44, 0.12);
}

.labeled-box.prompt {
  background: linear-gradient(180deg, #fffdf6, #fff3da);
}

.labeled-box.sns {
  background: linear-gradient(180deg, #fbfffb, #eefaf1);
  border-color: rgba(71, 163, 127, 0.25);
}

.labeled-box .mini-label {
  display: block;
  margin-bottom: 7px;
}

.labeled-box p:last-child {
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.85;
  color: var(--ink-strong);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.button-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 14px 0 18px;
}

.tool-button {
  padding: 13px 8px;
  border-radius: 16px;
  font-weight: 900;
  font-size: 0.86rem;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  box-shadow: 0 4px 0 var(--btn-deep, #b98430), inset 0 1.5px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.12s, box-shadow 0.12s;
}

.tool-button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--btn-deep, #b98430);
}

.tool-button.amber {
  background: linear-gradient(180deg, #ffce6b, #f2ab34);
  --btn-deep: #cd8a1d;
}

.tool-button.mint {
  background: linear-gradient(180deg, #8adcb8, var(--mint));
  --btn-deep: var(--mint-deep);
}

.tool-button.coral {
  background: linear-gradient(180deg, #f39181, var(--coral));
  --btn-deep: var(--coral-deep);
}

.idea-block {
  margin-bottom: 8px;
}

.idea-list {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}

.idea-chip {
  text-align: left;
  padding: 11px 14px;
  border-radius: 14px;
  background: var(--cream-bright);
  border: 1.5px dashed rgba(217, 111, 29, 0.4);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  transition: transform 0.12s, background 0.12s;
}

.idea-chip::before {
  content: "→ ";
  color: var(--orange);
  font-weight: 900;
}

.idea-chip:active {
  transform: scale(0.98);
  background: #fff3da;
}

/* ==========================================================================
   キャラクター
   ========================================================================== */

.main-character-card {
  position: relative;
  display: grid;
  grid-template-columns: 158px 1fr;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-lg);
  border: 3px solid #fff;
  background: linear-gradient(160deg, #ffe9c4, #ffd9a1 60%, #ffcf90);
  padding: 16px 14px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.mc-stage {
  position: relative;
  height: 150px;
}

.mc-figure {
  position: absolute;
  left: 0;
  bottom: -14px;
  width: 118px;
  height: 139px;
}

.mc-buddy {
  position: absolute;
  right: -4px;
  bottom: -10px;
  width: 72px;
  height: 68px;
}

.mc-info .eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange-deep);
}

.mc-info h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--ink-strong);
  margin: 2px 0 6px;
}

.mc-info p {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.7;
  color: var(--ink);
}

.mc-heart {
  position: absolute;
  top: 10px;
  right: 14px;
  color: var(--coral);
  font-size: 1.2rem;
  filter: drop-shadow(0 2px 0 #fff);
}

.sub-character-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.sub-character-row button {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 14px 8px 10px;
  border-radius: 18px;
  border: 2.5px solid transparent;
  background: var(--sub-bg, #eaf6fd);
  box-shadow: 0 3.5px 0 rgba(122, 82, 46, 0.18);
  transition: transform 0.14s, border-color 0.14s;
}

.sub-character-row button.active {
  border-color: var(--orange);
  background: #fff3da;
}

.sub-character-row button:active {
  transform: translateY(2px);
}

.sub-character-row svg {
  width: 58px;
  height: 58px;
}

.sub-character-row strong {
  font-size: 0.78rem;
  font-weight: 900;
  color: #fff;
  background: var(--sub-tag, var(--blue));
  border-radius: 999px;
  padding: 3px 12px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}

.character-form {
  display: grid;
  gap: 12px;
}

.character-form label {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 900;
  color: var(--ink-mute);
}

.character-form input,
.character-form textarea {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-strong);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 11px 13px;
  resize: vertical;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.character-form input:focus,
.character-form textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(242, 138, 46, 0.18);
}

/* ==========================================================================
   ギャラリー
   ========================================================================== */

.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.filter-chip {
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.82rem;
  color: var(--ink-mute);
  background: var(--cream-bright);
  border: 1.5px solid var(--line);
  box-shadow: 0 2.5px 0 rgba(160, 106, 44, 0.14);
}

.filter-chip.active {
  color: #fff;
  background: linear-gradient(180deg, #ffab55, var(--orange));
  border-color: transparent;
  box-shadow: 0 2.5px 0 var(--orange-deep);
  text-shadow: 0 1px 0 rgba(160, 78, 8, 0.35);
}

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

.gallery-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--cream-bright);
  border: 2px solid #fff;
  box-shadow: 0 4px 0 rgba(160, 106, 44, 0.18), 0 8px 18px rgba(122, 66, 20, 0.12);
  text-align: left;
}

.gallery-card:active {
  transform: translateY(2px);
}

.gc-visual {
  position: relative;
  display: block;
  width: 100%;
  height: 86px;
  padding: 0;
  background: var(--gc-bg, linear-gradient(140deg, #ffd9a1, #ffc07d));
}

.gc-body {
  display: block;
  width: 100%;
  text-align: left;
}

.gc-visual svg {
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  width: 64px;
  height: 72px;
  filter: drop-shadow(0 3px 4px rgba(80, 40, 8, 0.25));
}

.gc-fav {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.9);
  color: #d8c3ac;
  font-size: 0.9rem;
  box-shadow: 0 2px 5px rgba(122, 66, 20, 0.2);
}

.gc-fav.on {
  color: var(--coral);
}

.gc-del {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-mute);
  font-size: 0.85rem;
  box-shadow: 0 2px 5px rgba(122, 66, 20, 0.2);
}

.gc-body {
  padding: 9px 11px 11px;
}

.gc-body strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.79rem;
  font-weight: 900;
  color: var(--ink-strong);
  line-height: 1.5;
  min-height: 2.4em;
}

.gc-body span {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--orange-deep);
}

.empty-gallery {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 34px 16px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--line);
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-mute);
  text-align: center;
}

.empty-gallery svg {
  width: 74px;
  height: 70px;
  opacity: 0.85;
}

/* ==========================================================================
   マイページ（パスポート＋設定）
   ========================================================================== */

.passport-card {
  position: relative;
  background: var(--cream-bright);
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-soft);
}

.passport-card::before,
.passport-card::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--line);
}

.passport-card::before {
  left: -11px;
}

.passport-card::after {
  right: -11px;
}

.passport-label {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.24em;
  color: var(--orange-deep);
  border-bottom: 2px dashed var(--line);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.passport-main {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: center;
}

.passport-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 32%, #ffe9c9, #ffd9a1);
  border: 3.5px solid #fff;
  box-shadow: 0 3px 0 #e3cfa8, 0 6px 14px rgba(122, 66, 20, 0.18);
  display: grid;
  place-items: center;
}

.passport-photo svg {
  width: 124px;
  height: 147px;
  margin-top: -22px;
}

.passport-fields h2 {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--ink-strong);
  margin-bottom: 6px;
}

.passport-fields dl {
  display: grid;
  gap: 3px;
}

.passport-fields dl div {
  display: flex;
  gap: 10px;
  font-size: 0.78rem;
}

.passport-fields dt {
  font-weight: 900;
  color: var(--ink-mute);
  flex: none;
}

.passport-fields dd {
  font-weight: 700;
  color: var(--ink);
}

.love-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 2px 4px;
  padding-top: 12px;
  border-top: 2px dashed var(--line);
}

.love-hearts {
  font-size: 0.95rem;
  letter-spacing: 2px;
}

.love-hearts .on { color: var(--coral); }
.love-hearts .off { color: #e8d9c2; }

.passport-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 12px;
}

.passport-stats div {
  display: grid;
  justify-items: center;
  gap: 2px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 9px 4px;
}

.passport-stats dt {
  font-size: 0.66rem;
  font-weight: 900;
  color: var(--ink-mute);
}

.passport-stats dd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--orange-deep);
}

.progress-track {
  height: 12px;
  border-radius: 999px;
  background: #f0e3c8;
  border: 1.5px solid var(--line);
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  width: 14%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), var(--orange));
  transition: width 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

.level-note {
  text-align: right;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-mute);
  margin-top: 6px;
}

.stamp-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px dashed var(--line);
}

.stamp {
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.02rem;
  border: 2px dashed #e3d2b4;
  color: #d9c8aa;
  background: #fffdf6;
}

.stamp.on {
  border-style: solid;
  border-color: var(--coral);
  background: #fff0ea;
  color: var(--coral-deep);
  transform: rotate(-8deg);
}

.stamp.on:nth-child(even) {
  transform: rotate(7deg);
  border-color: var(--mint-deep);
  background: #ecf9f2;
  color: var(--mint-deep);
}

/* 楽しさレベル */
.fun-level {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 14px 10px 12px;
  background: var(--cream-bright);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.fun-track {
  position: absolute;
  top: 34px;
  left: 12%;
  right: 12%;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e8e2d2, var(--yellow), var(--orange), var(--coral));
  opacity: 0.6;
}

.level-chip {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  font-size: 0.66rem;
  font-weight: 900;
  color: var(--ink-mute);
  padding: 2px 0;
}

.level-chip i {
  font-style: normal;
  font-size: 1.28rem;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f4ecd9;
  border: 2.5px solid transparent;
  filter: grayscale(0.7);
  transition: transform 0.16s, filter 0.16s;
}

.level-chip.active {
  color: var(--ink-strong);
}

.level-chip.active i {
  background: #fff;
  border-color: var(--orange);
  filter: none;
  transform: scale(1.12);
  box-shadow: 0 3px 0 rgba(217, 111, 29, 0.35);
}

/* スライダー */
.slider-list {
  display: grid;
  gap: 13px;
}

.slider-list label {
  display: grid;
  grid-template-columns: 64px 1fr 48px;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--ink);
}

.slider-list output {
  text-align: right;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--orange-deep);
}

.slider-list input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange) var(--fill, 50%), #f0e3c8 var(--fill, 50%));
  outline-offset: 4px;
}

.slider-list input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--orange);
  box-shadow: 0 2.5px 0 rgba(217, 111, 29, 0.4);
}

.slider-list input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--orange);
  box-shadow: 0 2.5px 0 rgba(217, 111, 29, 0.4);
}

/* トグルスイッチ */
.toggle-list {
  display: grid;
  gap: 4px;
  margin-top: 14px;
}

.toggle-list label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  padding: 9px 2px;
  cursor: pointer;
}

.toggle-list input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch {
  flex: none;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: #e4d7bd;
  position: relative;
  transition: background 0.18s;
  box-shadow: inset 0 2px 3px rgba(122, 66, 20, 0.2);
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(122, 66, 20, 0.3);
  transition: left 0.18s;
}

.toggle-list input:checked + .switch {
  background: var(--mint);
}

.toggle-list input:checked + .switch::after {
  left: 25px;
}

.toggle-list input:focus-visible + .switch {
  outline: 3px solid rgba(242, 138, 46, 0.5);
  outline-offset: 2px;
}

/* ==========================================================================
   ボトムナビ
   ========================================================================== */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, 100%);
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  background: var(--cream-bright);
  border-top: 2px solid rgba(122, 82, 46, 0.1);
  box-shadow: 0 -8px 24px rgba(122, 66, 20, 0.14);
}

@media (min-width: 540px) {
  .bottom-nav {
    bottom: 22px;
    border-radius: 0 0 38px 38px;
    border: 0;
    width: min(468px, calc(100% - 12px));
  }
}

.bottom-nav button {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 6px 2px;
  font-size: 0.62rem;
  font-weight: 900;
  color: var(--ink-mute);
  border-radius: 14px;
  transition: color 0.15s;
}

.bottom-nav button svg {
  width: 23px;
  height: 23px;
}

.bottom-nav button.active {
  color: var(--orange-deep);
}

.bottom-nav button.active:not(.nav-gacha)::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
}

.nav-gacha {
  position: relative;
}

.gacha-orb {
  width: 54px;
  height: 54px;
  margin-top: -26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffab55, var(--orange));
  border: 4px solid var(--cream-bright);
  box-shadow: 0 5px 0 var(--orange-deep), 0 10px 18px rgba(217, 111, 29, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.gacha-orb svg {
  width: 30px;
  height: 30px;
  color: #fff0d8;
}

.nav-gacha:active .gacha-orb {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--orange-deep);
}

.nav-gacha.active .gacha-orb {
  background: linear-gradient(180deg, #f39181, var(--coral));
  box-shadow: 0 5px 0 var(--coral-deep), 0 10px 18px rgba(201, 80, 63, 0.4);
}

/* ==========================================================================
   カプセル開封演出
   ========================================================================== */

.reveal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, rgba(255, 236, 200, 0.96), rgba(242, 170, 90, 0.94));
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.reveal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.reveal-overlay[hidden] {
  display: none;
}

.reveal-stage {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
}

.reveal-stage p {
  font-size: 1.02rem;
  font-weight: 900;
  color: var(--ink-strong);
  text-shadow: 0 1px 0 #fff;
}

.reveal-capsule {
  width: 150px;
  height: 150px;
  filter: drop-shadow(0 14px 20px rgba(122, 44, 8, 0.35));
}

.reveal-overlay.shaking .reveal-capsule {
  animation: capShake 0.5s ease-in-out infinite;
}

@keyframes capShake {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(-9deg) translateY(-6px); }
  75% { transform: rotate(9deg) translateY(-2px); }
}

.cap-top,
.cap-bottom {
  transition: transform 0.45s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.cap-star {
  opacity: 0;
  transform-origin: 70px 70px;
  transform: scale(0.2);
  transition: transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1), opacity 0.2s;
}

.reveal-overlay.open .cap-top {
  transform: translate(-26px, -52px) rotate(-26deg);
}

.reveal-overlay.open .cap-bottom {
  transform: translate(16px, 34px) rotate(16deg);
}

.reveal-overlay.open .cap-star {
  opacity: 1;
  transform: scale(1.45) rotate(18deg);
}

.reveal-burst {
  position: absolute;
  top: 64px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, 0) scale(0);
  box-shadow:
    0 -46px 0 6px var(--yellow), 33px -33px 0 5px var(--pink), 46px 0 0 6px var(--mint),
    33px 33px 0 5px var(--blue), 0 46px 0 6px var(--coral), -33px 33px 0 5px var(--yellow),
    -46px 0 0 6px var(--pink), -33px -33px 0 5px var(--mint);
  opacity: 0;
}

.reveal-overlay.open .reveal-burst {
  animation: burstOut 0.55s ease-out forwards;
}

@keyframes burstOut {
  0% { opacity: 1; transform: translate(-50%, 0) scale(0.2); }
  100% { opacity: 0; transform: translate(-50%, 0) scale(2.1); }
}

/* ==========================================================================
   トースト・紙ふぶき
   ========================================================================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(104px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  z-index: 40;
  background: rgba(71, 40, 15, 0.94);
  color: #ffe9c4;
  font-size: 0.86rem;
  font-weight: 900;
  padding: 12px 22px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  max-width: min(420px, calc(100vw - 40px));
  text-align: center;
  box-shadow: 0 8px 22px rgba(31, 16, 4, 0.35);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.confetti {
  position: fixed;
  top: -14px;
  width: 10px;
  height: 14px;
  border-radius: 3px;
  background: var(--confetti, var(--orange));
  z-index: 30;
  pointer-events: none;
  animation: confettiFall 1.25s ease-in forwards;
}

.confetti:nth-child(odd) {
  border-radius: 50%;
  width: 8px;
  height: 8px;
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0) translateX(0);
  }
  100% {
    opacity: 0.85;
    transform: translateY(104vh) rotate(560deg) translateX(6vw);
  }
}

/* ==========================================================================
   アクセシビリティ・レスポンシブ
   ========================================================================== */

:focus-visible {
  outline: 3px solid rgba(242, 138, 46, 0.6);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

@media (max-width: 370px) {
  .attraction-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-ticket {
    width: 150px;
  }

  .hero-okan {
    width: 116px;
    height: 137px;
  }

  .reel-row {
    grid-template-columns: 74px 1fr auto;
  }
}
