/* hidden 属性を display 指定より優先させる */
[hidden] {
  display: none !important;
}

/* 画面全体を表示領域にぴったり収め、スクロール・端の跳ね返りを止める */
html,
body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  height: 100vh;    /* 古いブラウザ用 */
  height: 100dvh;   /* スマホのアドレスバーを除いた実際の表示高さ */
  background-color: #334155;
  touch-action: manipulation;           /* ダブルタップ拡大の判定をなくしてタップを速くする */
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* 盤面の一辺：横幅と、他の部品を除いた残りの高さのうち小さい方 */
:root {
  --board-size: min(92vw, 500px, calc(100dvh - 280px));
}

/* 部屋情報バー */
#room-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 500px;
  padding: 6px 12px;
  box-sizing: border-box;
  background-color: #0f172a;
  border-bottom: 1px solid #334155;
  color: #94a3b8;
  font-size: 13px;
  font-weight: bold;
}

.header-btns {
  display: flex;
  gap: 6px;
}

.sub-btn {
  background: #334155;
  border: 1px solid #475569;
  color: #e2e8f0;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}
.sub-btn:hover {
  background: #475569;
}

/* 上部インフォパネル */
#info-panel {
  flex-shrink: 0;
  width: 100%;
  max-width: 500px;
  background-color: #0f172a;
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  box-sizing: border-box;
  border: 2px solid #3d4452;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  font-family: "Segoe UI", -apple-system, "Hiragino Sans", "Meiryo", sans-serif;
}

#info-top {
  display: flex;
  align-items: stretch;
  border-bottom: 2px solid #3d4452;
}

#info-left,
#info-right {
  color: #e2e8f0;
  font-size: 15px;
  padding: 8px 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  letter-spacing: 1px;
}

#info-left {
  flex: 4;
  border-right: 2px solid #3d4452;
}

#info-right {
  flex: 6;
}

#info-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}

#info-bottom span {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
}

.heli-0 { background-color: #f43f5e; }
.heli-1 { background-color: #eab308; }
.heli-2 { background-color: #10b981; }

/* 行動済み（配置済み）インジケータ */
.heli-done {
  background-color: #475569 !important;
  opacity: 0.25 !important;
  transform: scale(0.85);
}

/* 盤面 */
#board-container {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

#game-board {
  display: grid;
  grid-template-rows: repeat(9, 1fr);
  grid-template-columns: repeat(9, 1fr);
  width: var(--board-size);
  height: var(--board-size);
  flex-shrink: 0;
  background-color: #1e293b;
  gap: 4px;
  padding: 8px;
  box-sizing: border-box;
  justify-items: center;
  align-items: center;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#action-area {
  width: var(--board-size);
  flex-shrink: 0;
  height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18%;
  box-sizing: border-box;
}

.action-btn {
  width: 56px;
  height: 42px;
  font-size: 20px;
  font-weight: bold;
  border-radius: 8px;
  border: 1px solid #475569;
  background-color: #1e293b;
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.action-btn:disabled {
  opacity: 0.25;
  border-color: #334155;
  color: #64748b;
  cursor: default;
}

#btn-undo:not(:disabled) {
  background-color: #334155;
  border-color: #64748b;
  color: #f8fafc;
}

#btn-confirm:not(:disabled) {
  background-color: #059669;
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

#bottom-panel {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  max-width: 500px;
  padding: 10px 0 16px 0;
  background-color: #0f172a;
  border-top: 1px solid #333333;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

/* 押せない状態のアイコン（第1ラウンドの📜など） */
.icon-btn.disabled {
  opacity: 0.35;
  cursor: default;
}

.icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  background-color: #1e293b;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
  border: 1px solid #636e72;
}

/* ===== 建物マス ===== */
.building {
  width: 85%;
  height: 85%;
  background-color: #e2e8f0;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
}

/* 選択可能な候補 */
.building.hint {
  box-shadow: inset 0 0 0 3px #38bdf8;
  cursor: pointer;
}
.building.hint-thief {
  box-shadow: inset 0 0 0 3px #ef4444;
  cursor: pointer;
}

/* 仮選択 */
.building.temp-search {
  background-color: #0284c7 !important;
}
.building.temp-thief-move {
  background-color: #ef4444 !important;
}

/* 捜索演出（水色に発光して消える） */
.building.searched {
  animation: searchFlash 1.8s ease-out forwards;
  outline: 3px solid #38bdf8;
  outline-offset: -2px;
}

@keyframes searchFlash {
  0% { background-color: #38bdf8; }
  40% { background-color: #bae6fd; }
  100% { background-color: #e2e8f0; outline-color: transparent; }
}

/* ===== 交差点マス ===== */
.intersection {
  width: 60%;
  height: 60%;
  background-color: #1e293b;
  border-radius: 50%;
  border: 2px solid rgba(61, 68, 82, 0.6);
  box-sizing: border-box;
}

.intersection.hint {
  border-color: #38bdf8;
  cursor: pointer;
}

.intersection.temp-move {
  background-color: #0284c7;
  border-color: #38bdf8;
}

/* ===== 犯人の車 ===== */
.thief {
  width: 75%;
  height: 75%;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  pointer-events: none;
  border-radius: 4px;
}

.thief.selected {
  outline: 3px solid #ef4444;
  outline-offset: 3px;
  box-shadow: 0 0 12px #ef4444;
}

.thief.arrested {
  outline: 3px solid #f43f5e;
  box-shadow: 0 0 16px #f43f5e;
  animation: popIn 0.3s ease-out;
}

/* ===== 痕跡 ===== */
.trace {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #ffffff;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  font-weight: bold;
  z-index: 5;
  pointer-events: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.trace-start  { border: 3.5px solid #eab308; }
.trace-mid    { border: 3.5px solid #ef4444; }
.trace-normal { border: 3.5px solid #3b82f6; }

/* 未発見（犯人視点・終了後の答え合わせで表示） */
.trace.ghost {
  opacity: 0.6;
}

/* 発見済み */
.trace.found {
  opacity: 1;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.9);
}

.trace.pop,
.thief.pop {
  animation: popIn 0.3s ease-out;
}

@keyframes popIn {
  0% { transform: scale(0); }
  80% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ===== 警察ヘリ ===== */
.police {
  width: 75%;
  height: 75%;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  border-radius: 50%;
  cursor: pointer;
}

.police.selected {
  outline: 3px solid #00f0ff;
  outline-offset: 3px;
  box-shadow: 0 0 12px #00f0ff;
}

.police.acted {
  opacity: 0.3;
  filter: grayscale(0.85);
  transform: scale(0.9);
  cursor: default;
}

/* ===== モーダル ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal-content {
  background-color: #1e293b;
  border: 2px solid #475569;
  border-radius: 12px;
  padding: 24px;
  width: 90%;
  max-width: 380px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  text-align: center;
  color: #ffffff;
  box-sizing: border-box;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;    /* 小さい画面でも中身が切れないように */
}

.modal-title {
  margin: 0 0 8px 0;
  font-size: 22px;
  letter-spacing: 2px;
}

.modal-desc {
  color: #94a3b8;
  font-size: 14px;
  margin: 0 0 16px 0;
}

#input-room-name {
  width: 80%;
  padding: 10px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #475569;
  background-color: #0f172a;
  color: #ffffff;
  text-align: center;
  margin-bottom: 16px;
  user-select: text;
  -webkit-user-select: text;
}

.modal-btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.primary-btn {
  background-color: #0284c7;
  border: 1px solid #38bdf8;
  color: #ffffff;
  padding: 10px;
  font-size: 15px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
}
.primary-btn:hover {
  background-color: #0369a1;
}

.secondary-btn {
  background-color: #334155;
  border: 1px solid #64748b;
  color: #e2e8f0;
  padding: 8px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
}
.secondary-btn:hover {
  background-color: #475569;
}
.danger-btn {
  background-color: #b91c1c;
  border: 1px solid #f87171;
  color: #ffffff;
  padding: 10px;
  font-size: 15px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
}
.danger-btn:hover {
  background-color: #991b1b;
}

.secondary-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.role-slots {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}

.role-card {
  flex: 1;
  background-color: #0f172a;
  border: 2px solid #334155;
  border-radius: 8px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.role-icon {
  font-size: 32px;
}

.role-name {
  font-size: 14px;
  font-weight: bold;
}

.role-status {
  font-size: 12px;
  color: #94a3b8;
}

.role-select-btn {
  margin-top: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 4px;
  border: 1px solid #475569;
  background-color: #1e293b;
  color: #ffffff;
  cursor: pointer;
}
.role-select-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.wait-msg {
  font-size: 13px;
  color: #facc15;
  margin-top: 14px;
  min-height: 18px;
}

.result-badge {
  font-size: 48px;
  margin-bottom: 8px;
}

/* ===== 設定画面 ===== */
.settings-content {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 12px;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: bold;
  color: #e2e8f0;
  cursor: pointer;
  text-align: left;
}

/* チェックボックスをスイッチ風にする */
.toggle-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 24px;
  margin: 0;
  border-radius: 12px;
  background-color: #475569;
  cursor: pointer;
}
.toggle-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #ffffff;
}
.toggle-row input[type="checkbox"]:checked {
  background-color: #059669;
}
.toggle-row input[type="checkbox"]:checked::after {
  left: 23px;
}

.small-btn {
  align-self: flex-start;
  padding: 4px 10px;
  font-size: 12px;
}

.settings-heading {
  margin: 4px 0 0 0;
  font-size: 16px;
  text-align: left;
}

.rules-box {
  text-align: left;
  font-size: 13px;
  line-height: 1.6;
  color: #cbd5e1;
  background-color: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 4px 12px 8px 12px;
  max-height: 40vh;
  max-height: 40dvh;
  overflow-y: auto;
}
.rules-box h4 {
  margin: 10px 0 4px 0;
  font-size: 14px;
  color: #ffffff;
}
.rules-box ul {
  margin: 0;
  padding-left: 18px;
}
.rules-box li {
  margin-bottom: 4px;
}
.rule-yellow { color: #eab308; font-weight: bold; }
.rule-red    { color: #ef4444; font-weight: bold; }
.rule-blue   { color: #3b82f6; font-weight: bold; }

/* ===== 勝敗決定時の演出 ===== */
/* 逮捕：捜索した建物が赤く点滅 */
.building.arrest-blink {
  animation: arrestBlink 0.4s steps(1) 3;
}
@keyframes arrestBlink {
  0%  { background-color: #ef4444; box-shadow: 0 0 16px #ef4444; }
  50% { background-color: #e2e8f0; box-shadow: none; }
}

/* 逮捕：盤面がその建物に向かってズームイン */
#game-board.zoom-in {
  transition: transform 0.6s ease-in, opacity 0.6s ease-in;
  transform: scale(3);
  opacity: 0;
}

/* 逮捕：結果画面がズームして現れる */
.modal-content.zoom-pop {
  animation: zoomPop 0.35s ease-out;
}
@keyframes zoomPop {
  0%   { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* 逃走：現在地の車が光る */
.thief.escape-glow {
  animation: escapeGlow 0.7s ease-in-out 2;
}
@keyframes escapeGlow {
  0%, 100% { box-shadow: 0 0 0 transparent; transform: scale(1); }
  50%      { box-shadow: 0 0 24px 8px #facc15; transform: scale(1.25); }
}

/* 逃走：左から右へのワイプで結果画面へ */
#wipe {
  position: fixed;
  inset: 0;
  background-color: #0f172a;
  z-index: 150;
  pointer-events: none;
}
#wipe.wipe-in {
  animation: wipeIn 0.45s ease-in forwards;
}
#wipe.wipe-out {
  animation: wipeOut 0.45s ease-out forwards;
}
@keyframes wipeIn {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes wipeOut {
  from { clip-path: inset(0 0 0 0); }
  to   { clip-path: inset(0 0 0 100%); }
}

/* ===== 行動履歴 ===== */
#history-bar {
  position: absolute;
  inset: 0;
  background-color: #0f172a;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  box-sizing: border-box;
}

.history-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-controls input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: #38bdf8;
  cursor: pointer;
}

.hist-btn {
  flex-shrink: 0;
  width: 34px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #475569;
  background-color: #1e293b;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}
.hist-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.history-info {
  font-size: 12px;
  font-weight: bold;
  color: #cbd5e1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hist-name-0 { color: #f43f5e; }
.hist-name-1 { color: #eab308; }
.hist-name-2 { color: #10b981; }

/* 履歴で表示中のラウンドに捜索した建物：そのヘリの色で点滅
   （盤面の hist-lit をスクリプトで一定間隔で付け外しし、全部の建物を同時に光らせる） */
.building.hist-0 { --hist-color: #f43f5e; }
.building.hist-1 { --hist-color: #eab308; }
.building.hist-2 { --hist-color: #10b981; }
.building.hist-0,
.building.hist-1,
.building.hist-2 {
  transition: background-color 0.3s ease;
}
#game-board.hist-lit .building.hist-0,
#game-board.hist-lit .building.hist-1,
#game-board.hist-lit .building.hist-2 {
  background-color: var(--hist-color);
}

/* ===== スタンプ ===== */
/* スタンプ一覧（下部パネルのすぐ上に表示） */
#stamp-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  background-color: #0f172a;
  border-top: 1px solid #475569;
  border-radius: 12px 12px 0 0;
  padding: 8px 12px 10px 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
  box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.4);
}

.stamp-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stamp-tabs {
  flex: 1;
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.stamp-tab {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 14px;
  border: 1px solid #475569;
  background-color: #1e293b;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}
.stamp-tab.active {
  background-color: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
}

.stamp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stamp-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px;
  border-radius: 10px;
  border: 1px solid #475569;
  background-color: #1e293b;
  color: #e2e8f0;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
}
.stamp-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.stamp-btn img,
.stamp-btn .stamp-emoji-text {
  width: 36px;
  height: 36px;
  font-size: 28px;
  line-height: 36px;
  text-align: center;
}

.stamp-mute-row {
  font-size: 12px;
  color: #94a3b8;
}

/* 建物に置くスタンプを選んだときの案内バー */
#stamp-place-bar {
  position: absolute;
  inset: 0;
  background-color: #0f172a;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: #facc15;
  font-size: 14px;
  font-weight: bold;
  z-index: 15;
}

/* 置き場所を選んでいる間、建物を紫の枠で示す */
.building.stamp-target {
  box-shadow: inset 0 0 0 3px #a78bfa;
  cursor: pointer;
}

/* 吹き出しを表示する層（画面全体に重ねる。盤面の外にもはみ出せる） */
#stamp-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
}

/* 吹き出し本体。送った人の役職で枠の色が変わる */
.stamp-bubble {
  --bubble-border: #94a3b8;
  --tail-shift: 0px;
  position: absolute;
  width: max-content;      /* 画面の端に置いても縮まないようにする */
  translate: -50% -100%;   /* scale のアニメーションとずれないよう translate で指定 */
  transform-origin: calc(50% + var(--tail-shift)) 100%;
  margin-top: -12px;   /* しっぽの分だけ上にずらす */
  background-color: #ffffff;
  border: 3px solid var(--bubble-border);
  border-radius: 14px;
  padding: 6px 12px 4px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
  animation: stampIn 0.35s cubic-bezier(0.2, 1.6, 0.4, 1) both;
  transition: opacity 0.3s ease;
}
.stamp-bubble.from-police { --bubble-border: #38bdf8; }
.stamp-bubble.from-thief  { --bubble-border: #ef4444; }

/* しっぽ（指している建物の方を向く） */
.stamp-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: calc(50% + var(--tail-shift));
  transform: translateX(-50%);
  border: 10px solid transparent;
  border-top: 12px solid var(--bubble-border);
}

/* 位置が決まっているスタンプ：自分のもの（右下。しっぽで⚙️の方を指す） */
.stamp-bubble.fixed-mine {
  translate: -100% -100%;
  transform-origin: 100% 100%;
}
.stamp-bubble.fixed-mine::after {
  left: auto;
  right: 12px;
  transform: none;
}

/* 位置が決まっているスタンプ：相手のもの（左上。しっぽは上向き） */
.stamp-bubble.fixed-opp {
  translate: 0 0;
  transform-origin: 0 0;
  margin-top: 12px;
}
.stamp-bubble.fixed-opp::after {
  top: auto;
  bottom: 100%;
  left: 12px;
  transform: none;
  border-top: 10px solid transparent;
  border-bottom: 12px solid var(--bubble-border);
}

.stamp-bubble.out {
  opacity: 0;
}

.stamp-bubble img,
.stamp-bubble .stamp-emoji-text {
  width: 56px;
  height: 56px;
  font-size: 44px;
  line-height: 56px;
  text-align: center;
}
.stamp-bubble .stamp-emoji-text {
  animation: stampBob 0.8s ease-in-out infinite;
}

.stamp-bubble-text {
  font-size: 13px;
  font-weight: bold;
  color: #0f172a;
  white-space: nowrap;
}

/* 画面中央から広がりながら消えるスタンプ（吹き出しなし） */
.stamp-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: max-content;
  animation: stampBurst 1.8s ease-out forwards;   /* 長さはスタンプごとにスクリプトで上書きする */
}
.stamp-burst img,
.stamp-burst .stamp-emoji-text {
  width: 120px;
  height: 120px;
  font-size: 100px;
  line-height: 120px;
  text-align: center;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}
.stamp-burst .stamp-emoji-text {
  animation: none;   /* 広がる動きと重ならないよう、ゆらゆらは止める */
}

/* 広がるスタンプの文字（ポップな字体。英字は Luckiest Guy、日本語は Mochiy Pop One） */
.stamp-burst-text {
  font-family: "Luckiest Guy", "Mochiy Pop One", sans-serif;
  font-size: 56px;
  line-height: 1;
  letter-spacing: 2px;
  color: #facc15;
  -webkit-text-stroke: 3px #1e1b4b;
  text-shadow: 0 5px 0 #1e1b4b, 0 8px 14px rgba(0, 0, 0, 0.5);
  rotate: -6deg;
  white-space: nowrap;
}

/* ポンと出て → そのまま大きく広がりながら消える */
@keyframes stampBurst {
  0%   { scale: 0.3; opacity: 0; }
  10%  { scale: 1;   opacity: 1; }
  100% { scale: 3.5; opacity: 0; }
}

@keyframes stampIn {
  0%   { scale: 0.3; }
  70%  { scale: 1.1; }
  100% { scale: 1; }
}

@keyframes stampBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-4px) rotate(-6deg); }
}