/* ===================================================
   レッドとあそぼう  共通スタイル
   Scandinavian Design × Red Play System (RPS)
   やさしく、親しみやすく、あたたかく
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Yomogi&family=Zen+Maru+Gothic:wght@500;700;900&family=Kiwi+Maru:wght@500&display=swap');

/* ========== Design Tokens ========== */
:root {
  /* Color — Scandinavian warm palette */
  --linen:        #F7F2EA;   /* 生成り、亜麻 */
  --linen-soft:   #FBF7F0;   /* カード背景 */
  --linen-deep:   #EFE8DC;   /* 仕切り */
  --ink:          #2D2823;   /* 本文、純黒を避ける */
  --ink-soft:     #4A4037;   /* サブ文字（読みやすく濃いめ） */
  --ink-mute:     #6B6157;   /* キャプション */

  --red:          #C85A4D;   /* 落ち着いたトマト赤 */
  --red-soft:     #E8A79E;   /* 赤のライト */
  --terracotta:   #D89B7C;   /* テラコッタ */
  --sage:         #A8B89C;   /* セージグリーン */
  --sage-deep:    #7E9373;
  --mustard:      #E5B94E;   /* 落ち着いたマスタード */
  --sky:          #9CB8C9;   /* くすみブルー */
  --lavender:     #B5A5C4;   /* くすみラベンダー */
  --cream-yellow: #F5E6B8;   /* バターミルク */

  /* Semantic */
  --c-win:  var(--terracotta);
  --c-lose: var(--sky);
  --c-draw: var(--lavender);
  --c-calm: var(--sage);

  /* Border */
  --border-soft:  rgba(45, 40, 35, 0.10);
  --border-mid:   rgba(45, 40, 35, 0.16);
  --border-strong:rgba(45, 40, 35, 0.24);

  /* Shadow — Scandinavian soft, never hard */
  --shadow-xs: 0 1px 2px rgba(45, 40, 35, 0.04);
  --shadow-sm: 0 2px 8px rgba(45, 40, 35, 0.06);
  --shadow-md: 0 6px 20px rgba(45, 40, 35, 0.08);
  --shadow-lg: 0 12px 32px rgba(45, 40, 35, 0.10);

  /* Spacing — 8px system */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 24px;  --s-6: 32px;  --s-7: 48px;  --s-8: 64px;  --s-9: 96px;

  /* Radius */
  --r-sm: 12px;  --r-md: 20px;  --r-lg: 28px;  --r-xl: 36px;  --r-full: 999px;

  /* Typography scale */
  --t-xs:  10px;  --t-sm:  12px;  --t-base: 13px;
  --t-lg:  15px;  --t-xl:  19px;  --t-2xl: 24px;
  --t-3xl: 48px;  --t-4xl: 64px;  --t-display: 80px;

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-soft:   cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 768px) {
  :root {
    --t-xs:  11px;  --t-sm:  13px;  --t-base: 15px;
    --t-lg:  18px;  --t-xl:  23px;  --t-2xl: 30px;
    --t-3xl: 60px;  --t-4xl: 80px;  --t-display: 104px;
  }
}

/* ========== Reset ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', system-ui, sans-serif;
  font-weight: 500;
  color: var(--ink);
  background-color: #CFE3EC;   /* 星背景のベース色 */
  background-image: url('images/bg-stars.png');
  background-size: 600px auto;
  background-repeat: repeat;
  background-attachment: fixed;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.7;
  letter-spacing: 0.02em;
}

/* 全体にリネンのベールを重ねて、北欧のやわらかトーンに寄せる */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(251, 247, 240, 0.35), transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(251, 247, 240, 0.5), transparent 60%),
    rgba(247, 242, 234, 0.32);
  z-index: 0;
}

/* ========== Layout ========== */
.container {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: var(--s-4) var(--s-5);
  padding-top: max(var(--s-5), env(safe-area-inset-top));
  padding-bottom: max(var(--s-5), env(safe-area-inset-bottom));
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-4);
}

@media (min-width: 768px) {
  .container {
    max-width: 1080px;
    gap: var(--s-5);
    padding: var(--s-5) var(--s-6);
  }
}

/* ========== Typography ========== */
.title-main {
  font-family: 'Kiwi Maru', 'Yomogi', serif;
  font-size: clamp(36px, 10vw, 80px);
  font-weight: 500;
  color: var(--ink);
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-shadow: 2px 3px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
  white-space: nowrap;
}
.title-main .char {
  display: inline-block;
  transform-origin: center bottom;
}
/* 北欧パレットで色数は7、まとまり感を保ちつつカラフル */
.title-main .char:nth-child(1) { color: #C85A4D; transform: rotate(-3deg); }  /* レ - red */
.title-main .char:nth-child(2) { color: #D89B7C; transform: rotate(2deg); }   /* ッ - terracotta */
.title-main .char:nth-child(3) { color: #E5B94E; transform: rotate(-2deg); }  /* ド - mustard */
.title-main .char:nth-child(4) { color: #7E9373; transform: rotate(3deg); }   /* と - sage */
.title-main .char:nth-child(5) { color: #9CB8C9; transform: rotate(-2deg); }  /* あ - sky */
.title-main .char:nth-child(6) { color: #B5A5C4; transform: rotate(3deg); }   /* そ - lavender */
.title-main .char:nth-child(7) { color: #D89B7C; transform: rotate(-2deg); }  /* ぼ - terracotta */
.title-main .char:nth-child(8) { color: #C85A4D; transform: rotate(2deg); }   /* う - red */

.title-sub {
  font-family: 'Yomogi', 'Zen Maru Gothic', sans-serif;
  font-size: var(--t-base);
  font-weight: 500;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.6;
  letter-spacing: 0.08em;
}

/* ========== Character ========== */
.character {
  position: relative;
  width: min(72vw, 320px);
  height: min(72vw, 320px);
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 768px) {
  .character { width: 360px; height: 360px; }
}
.character.sm {
  width: min(48vw, 200px);
  height: min(48vw, 200px);
}
.character img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(45, 40, 35, 0.12));
}

@keyframes gentle-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-6px) rotate(0.8deg); }
}
@keyframes hop {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
@keyframes peek-in {
  0%   { transform: translateY(60px) scale(0.9); opacity: 0; }
  60%  { transform: translateY(-6px) scale(1.02); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(-2deg) translateY(-3px); }
  75%      { transform: rotate(2deg) translateY(-3px); }
}
@keyframes jump-joy {
  0%   { transform: translateY(0) scale(1); }
  30%  { transform: translateY(-24px) scale(1.04) rotate(-2deg); }
  55%  { transform: translateY(0) scale(1); }
  75%  { transform: translateY(-14px) scale(1.02) rotate(1.5deg); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes slump {
  0%   { transform: translateY(0) scale(1); }
  100% { transform: translateY(3px) scale(0.98); }
}
@keyframes tilt {
  0%, 100% { transform: rotate(-2deg); }
  50%      { transform: rotate(2deg); }
}

.character.floating img { animation: gentle-float 3.6s ease-in-out infinite; }
.character.hopping  img { animation: hop 0.5s ease-in-out infinite; }
.character.peeking  img { animation: peek-in 0.9s var(--ease-spring) forwards; }
.character.wiggling img { animation: wiggle 0.6s ease-in-out infinite; }
.character.joyful   img { animation: jump-joy 1.4s ease-in-out; }
.character.slumping img { animation: slump 0.6s ease-out forwards; }
.character.tilting  img { animation: tilt 2.4s ease-in-out infinite; }

/* ========== Speech Bubble ========== */
.bubble {
  position: relative;
  background: var(--linen-soft);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-6);
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: var(--t-xl);
  font-weight: 700;
  line-height: 1.7;
  color: var(--ink);
  max-width: 26ch;
  text-align: center;
  box-shadow: var(--shadow-md);
  animation: bubble-in 0.5s var(--ease-spring);
}
.bubble::before,
.bubble::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 18px;
  height: 18px;
  background: var(--linen-soft);
}
.bubble::before {
  bottom: -13px;
  border-right: 1px solid var(--border-mid);
  border-bottom: 1px solid var(--border-mid);
  box-shadow: var(--shadow-xs);
}
.bubble::after { display: none; }

/* Side bubble（キャラクターの横に表示・尻尾は左向き） */
.bubble.side {
  max-width: 80ch;
  min-width: 24ch;
  width: clamp(300px, 60vw, 520px);
  min-height: 160px;
  text-align: left;
  font-size: var(--t-lg);
  padding: var(--s-5) var(--s-6);
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.bubble.side > span {
  display: block;
  width: 100%;
}
.bubble.side::before {
  bottom: auto;
  left: -9px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  border: none;
  border-left: 1px solid var(--border-mid);
  border-bottom: 1px solid var(--border-mid);
  box-shadow: none;
}
.bubble .next-cue {
  display: inline-block;
  margin-left: 6px;
  color: var(--red);
  animation: cue-bounce 1s ease-in-out infinite;
  font-size: 0.8em;
}
@keyframes cue-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50%      { transform: translateY(3px); opacity: 1; }
}

/* Janken stage: キャラ + 吹き出し 横並び */
.janken-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-4);
  flex-wrap: wrap;
  width: 100%;
}
@media (min-width: 640px) {
  .janken-stage { flex-wrap: nowrap; gap: var(--s-5); }
}
.janken-stage .character {
  flex-shrink: 0;
  width: min(52vw, 260px);
  height: min(52vw, 260px);
  cursor: pointer;
}
@media (min-width: 640px) {
  .janken-stage .character { width: 280px; height: 280px; }
}
@keyframes bubble-in {
  0%   { transform: translateY(12px) scale(0.96); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* ========== Buttons ========== */
.btn {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-weight: 700;
  font-size: var(--t-xl);
  color: var(--linen-soft);
  background: var(--red);
  border: none;
  border-radius: var(--r-full);
  padding: 20px 56px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s var(--ease-soft), box-shadow 0.2s var(--ease-soft), background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.14em;
  display: inline-block;
  min-height: 64px;
}
.btn:hover  { transform: translateY(-2px); box-shadow: var(--shadow-lg); background: #B84E42; }
.btn:active { transform: translateY(1px);  box-shadow: var(--shadow-sm); }
.btn:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; }
.btn.small { font-size: var(--t-base); padding: 12px 32px; letter-spacing: 0.08em; min-height: 48px; }
.btn.warm  { background: var(--terracotta); }
.btn.warm:hover  { background: #C48867; }
.btn.sage  { background: var(--sage-deep); }
.btn.sage:hover  { background: #6B7F61; }

.btn-ghost {
  font-family: 'Yomogi', sans-serif;
  font-size: var(--t-sm);
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: var(--r-full);
  padding: 8px 20px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s var(--ease-soft);
}
.btn-ghost:hover { color: var(--red); border-color: var(--red); }

/* ========== Name Card ========== */
.name-card-wrap {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}
.peek-red {
  position: absolute;
  width: 110px;
  height: auto;
  top: 40%;
  right: -110px;
  transform: translateY(-50%) rotate(4deg);
  z-index: 0;
  pointer-events: none;
  animation: peek-wiggle 4s ease-in-out infinite;
  filter: drop-shadow(-4px 6px 8px rgba(0,0,0,0.15));
}
@keyframes peek-wiggle {
  0%, 100% { transform: translateY(-50%) rotate(4deg); }
  50% { transform: translateY(calc(-50% - 4px)) rotate(2deg); }
}
@media (min-width: 640px) {
  .peek-red { width: 160px; right: -140px; }
}
.name-card {
  position: relative;
  z-index: 1;
  background:
    radial-gradient(circle at 12% 18%, rgba(229,185,78,0.18) 0 10px, transparent 11px),
    radial-gradient(circle at 88% 22%, rgba(168,184,156,0.22) 0 8px, transparent 9px),
    radial-gradient(circle at 8% 78%, rgba(156,184,201,0.22) 0 9px, transparent 10px),
    radial-gradient(circle at 92% 82%, rgba(181,165,196,0.22) 0 7px, transparent 8px),
    radial-gradient(circle at 50% 8%, rgba(216,155,124,0.18) 0 6px, transparent 7px),
    linear-gradient(180deg, #FFFBF3 0%, var(--linen-soft) 100%);
  border: 2px solid #EADFCC;
  border-radius: var(--r-xl);
  padding: var(--s-7) var(--s-6);
  box-shadow: var(--shadow-lg), 0 0 0 6px rgba(255,255,255,0.5) inset;
  width: 100%;
  max-width: 560px;
  text-align: center;
  animation: card-in 0.7s var(--ease-spring);
}
@keyframes card-in {
  0%   { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.name-label {
  font-family: 'Kiwi Maru', serif;
  font-size: 28px;
  color: var(--ink);
  margin-bottom: var(--s-2);
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.name-label .c1 { color: #C85A4D; }
.name-label .c2 { color: #E5B94E; }
.name-label .c3 { color: #7E9373; }
.name-label .c4 { color: #9CB8C9; }
.name-label .c5 { color: #B5A5C4; }
.name-label .c6 { color: #D89B7C; }
.name-label span {
  display: inline-block;
  animation: letter-hop 2.4s ease-in-out infinite;
}
.name-label span:nth-child(2)  { animation-delay: 0.08s; }
.name-label span:nth-child(3)  { animation-delay: 0.16s; }
.name-label span:nth-child(4)  { animation-delay: 0.24s; }
.name-label span:nth-child(5)  { animation-delay: 0.32s; }
.name-label span:nth-child(6)  { animation-delay: 0.40s; }
.name-label span:nth-child(7)  { animation-delay: 0.48s; }
.name-label span:nth-child(8)  { animation-delay: 0.56s; }
.name-label span:nth-child(9)  { animation-delay: 0.64s; }
.name-label span:nth-child(10) { animation-delay: 0.72s; }
.name-label span:nth-child(11) { animation-delay: 0.80s; }
.name-label span:nth-child(12) { animation-delay: 0.88s; }
@keyframes letter-hop {
  0%, 70%, 100% { transform: translateY(0); }
  80% { transform: translateY(-4px); }
}
.name-sublabel {
  font-family: 'Yomogi', sans-serif;
  font-size: 19px;
  color: var(--ink-soft);
  margin-bottom: var(--s-5);
  font-weight: 500;
}

.name-input {
  font-family: inherit;
  font-size: var(--t-xl);
  font-weight: 700;
  color: var(--ink);
  width: 100%;
  padding: var(--s-4) var(--s-5);
  background: var(--linen);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-md);
  text-align: center;
  margin-bottom: var(--s-5);
  outline: none;
  transition: all 0.2s var(--ease-soft);
}
.name-input:focus {
  background: #fff;
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(200, 90, 77, 0.12);
}
.name-input::placeholder { color: var(--ink-mute); font-weight: 500; }

.honorific-label {
  font-family: 'Yomogi', sans-serif;
  font-size: var(--t-base);
  color: var(--ink-soft);
  margin-bottom: var(--s-3);
  font-weight: 500;
}

.honorific-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-2);
  margin-bottom: var(--s-6);
}
.honorific-btn {
  font-family: inherit;
  font-size: var(--t-base);
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--h-color, var(--border-mid));
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-1);
  cursor: pointer;
  transition: all 0.2s var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
  min-height: 52px;
  box-shadow: 0 2px 0 var(--h-color, var(--border-mid));
}
.honorific-btn:nth-child(1) { --h-color: #C85A4D; color: #A4463A; }
.honorific-btn:nth-child(2) { --h-color: #E5B94E; color: #B08A2A; }
.honorific-btn:nth-child(3) { --h-color: #7E9373; color: #5F7555; }
.honorific-btn:nth-child(4) { --h-color: #9CB8C9; color: #5F7F93; }
.honorific-btn:nth-child(5) { --h-color: #B5A5C4; color: #7D6C8E; }
.honorific-btn:nth-child(6) { --h-color: #D89B7C; color: #9F6E53; }
.honorific-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 0 var(--h-color);
}
.honorific-btn.selected {
  background: var(--h-color);
  color: #fff;
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.15);
}

/* ========== Menu Grid ========== */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-2);
  width: 100%;
}
@media (max-width: 480px) {
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.menu-item {
  background: var(--linen-soft);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-lg);
  padding: var(--s-6) var(--s-3) var(--s-5);
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.25s var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  position: relative;
  min-height: 170px;
}
.menu-item:hover  { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.menu-item:active { transform: translateY(0); box-shadow: var(--shadow-xs); }
.menu-item.disabled { opacity: 0.55; cursor: not-allowed; }
.menu-item.disabled:hover { transform: none; box-shadow: var(--shadow-md); }

.menu-icon {
  font-size: 64px;
  line-height: 1;
  display: block;
}
.menu-name {
  font-family: 'Kiwi Maru', serif;
  font-size: var(--t-lg);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.06em;
}
.menu-item .coming-soon {
  font-family: 'Yomogi', sans-serif;
  font-size: var(--t-sm);
  color: var(--ink-mute);
  font-weight: 500;
}

/* カラードット */
.menu-item::before {
  content: '';
  position: absolute;
  top: var(--s-3);
  left: var(--s-3);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mustard);
}
.menu-item:nth-child(1)::before { background: var(--red); }
.menu-item:nth-child(2)::before { background: var(--sage-deep); }
.menu-item:nth-child(3)::before { background: var(--sky); }

/* ========== Menu Image Buttons ========== */
.menu-img-item {
  display: block;
  text-decoration: none;
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s var(--ease-soft);
}
.menu-img-item img {
  width: 75%;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 10px rgba(45, 40, 35, 0.18));
  transition: filter 0.25s ease;
}
.menu-img-item:hover {
  transform: translateY(-4px) scale(1.05);
}
.menu-img-item:hover img {
  filter: drop-shadow(0 8px 20px rgba(45, 40, 35, 0.25));
}
.menu-img-item:active {
  transform: translateY(0) scale(0.98);
}
.menu-img-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.menu-img-item .coming-soon {
  font-family: 'Yomogi', sans-serif;
  font-size: var(--t-xs);
  color: var(--ink-soft);
  font-weight: 700;
  text-align: center;
  margin-top: var(--s-1);
  letter-spacing: 0.08em;
}

/* ========== Janken ========== */
.call-text {
  font-family: 'Kiwi Maru', serif;
  font-size: var(--t-3xl);
  font-weight: 500;
  color: var(--red);
  letter-spacing: 0.12em;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--s-4);
  text-shadow: 2px 2px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
}
.call-text span {
  display: inline-block;
  animation: pop-letter 0.5s var(--ease-spring);
}
@keyframes pop-letter {
  0%   { transform: scale(0.6) translateY(8px); opacity: 0; }
  60%  { transform: scale(1.1) translateY(-2px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.hand-buttons {
  display: flex;
  gap: var(--s-4);
  justify-content: center;
  flex-wrap: wrap;
}
.hand-btn {
  width: 96px;
  height: 96px;
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  background: var(--linen-soft);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  padding: var(--s-2);
  font-family: inherit;
}
.hand-btn:hover:not(.disabled)  { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.hand-btn:active:not(.disabled) { transform: translateY(0); box-shadow: var(--shadow-xs); }
.hand-btn .hand-emoji { font-size: 40px; line-height: 1; }
.hand-btn .hand-name {
  font-family: 'Kiwi Maru', serif;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.08em;
}
.hand-btn.gu    { background: #FBEDE8; }  /* 薄いテラコッタ */
.hand-btn.choki { background: #EEF2E6; }  /* 薄いセージ */
.hand-btn.pa    { background: #E9EFF3; }  /* 薄いくすみ青 */
.hand-btn.disabled { opacity: 0.4; pointer-events: none; }
.hand-btn.ready { animation: btn-pulse 1.2s ease-in-out infinite; }
@keyframes btn-pulse {
  0%, 100% { transform: scale(1); box-shadow: var(--shadow-sm); }
  50%      { transform: scale(1.06); box-shadow: 0 8px 24px rgba(200, 90, 77, 0.22); }
}

.result { text-align: center; min-height: 48px; }
.result-label {
  font-family: 'Kiwi Maru', serif;
  font-size: var(--t-2xl);
  font-weight: 500;
  letter-spacing: 0.1em;
  animation: bubble-in 0.6s var(--ease-spring);
}
.result-label.win  { color: var(--c-win); }
.result-label.lose { color: var(--c-lose); }
.result-label.draw { color: var(--c-draw); }

.score {
  display: flex;
  gap: var(--s-4);
  align-items: center;
  font-family: 'Yomogi', sans-serif;
  font-size: var(--t-base);
  color: var(--ink-soft);
  background: var(--linen-soft);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-full);
  padding: var(--s-3) var(--s-6);
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.06em;
  font-weight: 500;
}
.score .num {
  font-family: 'Kiwi Maru', serif;
  font-size: var(--t-xl);
  font-weight: 500;
  color: var(--red);
  margin-left: var(--s-1);
}

/* ========== Back Link ========== */
.back-link {
  position: fixed;
  top: max(var(--s-4), env(safe-area-inset-top));
  left: var(--s-4);
  z-index: 10;
  font-family: 'Yomogi', sans-serif;
  font-size: var(--t-base);
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--linen-soft);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-full);
  padding: var(--s-3) var(--s-5);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s var(--ease-soft);
  cursor: pointer;
}
.back-link:hover  { transform: translateX(-2px); box-shadow: var(--shadow-md); }
.back-link:active { transform: translateX(0);    box-shadow: var(--shadow-xs); }

/* ========== Utils ========== */
.deco {
  font-family: 'Yomogi', sans-serif;
  font-size: var(--t-base);
  color: var(--ink-soft);
  text-align: center;
  letter-spacing: 0.1em;
  margin-top: var(--s-3);
  font-weight: 500;
}

.hidden    { display: none !important; }
.invisible { opacity: 0 !important; }

/* Janken専用：コンパクトな縦間隔 */
body.janken .container { gap: var(--s-3); padding-top: var(--s-7); }
body.janken .result { min-height: 40px; }
body.janken .result-label { font-size: var(--t-xl); }

/* ========== Ruby（ふりがな） ========== */
ruby {
  ruby-align: center;
}
ruby rt {
  font-size: 0.5em;
  font-weight: 600;
  color: var(--ink-soft);
  font-family: 'Zen Maru Gothic', 'Kiwi Maru', sans-serif;
  letter-spacing: 0.02em;
  margin-bottom: 0.15em;
  user-select: none;
}

/* ========== Quiz Buttons ========== */
.quiz-buttons {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========== Motion Preferences ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
