body {
  font-family: 'Segoe UI', 'ヒラギノ角ゴ ProN', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  background: #f5f5f5;
  margin: 0;
  padding: 0;
}
#app {
  max-width: 900px;
  margin: 20px auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  padding: 24px;
}
#map {
  width: 100%;
  height: 600px;
  min-height: 400px;
  max-width: 100vw;
  margin-bottom: 24px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ccc;
  position: relative;
}
#zoom-indicator {
  position: absolute;
  top: 12px;
  right: 20px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 1.1em;
  padding: 6px 18px;
  border-radius: 16px;
  z-index: 1000;
  pointer-events: none;
  user-select: none;
}
#attrib-bar {
  position: absolute;
  right: 18px;
  bottom: 10px;
  background: rgba(255,255,255,0.85);
  color: #444;
  font-size: 0.95em;
  padding: 4px 14px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  z-index: 1001;
  display: flex;
  gap: 6px;
  align-items: center;
}
#gacha-modal {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
}
#gacha-modal-content {
  background: none;
  text-align: center;
  color: #fff;
  max-width: 90vw;
  max-height: 90vh;
}
/* --- #gacha-skipall-btn のスタイルは一番下で強制上書き --- */

#gacha-modal video {
  width: 380px;
  max-width: 90vw;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.4);
}
#gacha-modal img {
  width: 320px;
  max-width: 80vw;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
  margin-bottom: 20px;
}
#gacha-modal button {
  margin-top: 18px;
  font-size: 1.2em;
  padding: 10px 32px;
  border-radius: 8px;
  border: none;
  background: #1d72b8;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 8px rgba(0,0,0,0.13);
}
#gacha-modal button:hover {
  background: #166099;
}
.ur-badge {
  font-size: 2.2em;
  font-family: 'Comic Sans MS', 'Impact', cursive, sans-serif;
  font-weight: bold;
  color: #ff00ff;
  background: repeating-linear-gradient(135deg, #ffff00 0 16px, #ff00ff 16px 32px, #00ffff 32px 48px);
  border: 5px double #ff0000;
  border-radius: 10px;
  padding: 12px 22px 10px 22px;
  letter-spacing: 0.12em;
  text-shadow: 2px 2px 0 #fff, 0 0 4px #000, 0 0 12px #fff;
  box-shadow: 0 0 0 #fff;
  animation: ur-badge-blink 0.4s steps(1) infinite alternate;
  margin-bottom: 8px;
  position: relative;
  z-index: 10;
}
@keyframes ur-badge-blink {
  0% { filter: brightness(1.2) drop-shadow(0 0 2px #fff); }
  100% { filter: brightness(0.7) drop-shadow(0 0 8px #ff0); }
}

.ur-flash {
  display: inline-block;
  font-size: 1.1em;
  color: #fff;
  background: linear-gradient(90deg,#fdc800 20%,#fff799 40%,#fdc800 60%,#fff799 80%);
  padding: 4px 18px;
  border-radius: 12px;
  margin-top: 8px;
  font-weight: bold;
  box-shadow: 0 0 8px #fff799;
  animation: ur-flash-glow 0.7s linear infinite alternate;
}
@keyframes ur-flash-anim {
  0% { filter: brightness(1.0) drop-shadow(0 0 8px #ffd700); }
  100% { filter: brightness(1.3) drop-shadow(0 0 24px #fff799); }
}
@keyframes ur-flash-glow {
  0% { box-shadow: 0 0 8px #fff799; }
  100% { box-shadow: 0 0 24px #fff799, 0 0 8px #fdc800; }
}
.gacha-result-list {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  margin-bottom: 18px;
}

/* 一覧時OKボタンを下部固定 */
#gacha-modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 40vh;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding-bottom: 68px !important;
}
#gacha-result-ok-btn {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 21000;
  width: 80vw;
  max-width: 340px;
  box-sizing: border-box;
  font-size: 1.25em;
  padding: 16px 0;
  border-radius: 9px;
}
@media (min-width: 600px) {
  #gacha-result-ok-btn {
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    width: auto;
    max-width: none;
    padding: 10px 32px;
    border-radius: 8px;
  }
}

#ur-rate-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 18px 0 10px 0;
  font-size: 1.08em;
  font-family: 'Segoe UI', 'Meiryo', Arial, sans-serif;
  color: #222;
  background: #f6f6f6;
  border: 1px solid #bbb;
  border-radius: 7px;
  padding: 8px 18px 8px 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
#ur-rate-control label {
  font-weight: 500;
  margin-right: 10px;
  color: #222;
  text-shadow: none;
}
#ur-rate-value {
  font-size: 1.15em;
  color: #1565c0;
  font-family: 'Segoe UI', 'Meiryo', Arial, sans-serif;
  margin: 0 4px;
}
#ur-rate-slider {
  accent-color: #1565c0;
  width: 180px;
  height: 1.8em;
  margin-left: 10px;
  background: transparent;
}
#ur-rate-slider::-webkit-slider-thumb {
  background: #1565c0;
  border: 1.5px solid #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  box-shadow: 0 0 3px #aaa;
}
#ur-rate-slider::-webkit-slider-runnable-track {
  height: 5px;
  background: #e0e0e0;
  border-radius: 4px;
}
#ur-rate-slider:focus {
  outline: 1.5px solid #1565c0;
}
#ur-rate-slider::-moz-range-thumb {
  background: #1565c0;
  border: 1.5px solid #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  box-shadow: 0 0 3px #aaa;
}
#ur-rate-slider::-moz-range-track {
  height: 5px;
  background: #e0e0e0;
  border-radius: 4px;
}
#ur-rate-slider::-ms-thumb {
  background: #1565c0;
  border: 1.5px solid #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  box-shadow: 0 0 3px #aaa;
}
#ur-rate-slider::-ms-fill-lower {
  background: #e0e0e0;
}
#ur-rate-slider::-ms-fill-upper {
  background: #e0e0e0;
}
#ur-rate-slider:focus-visible {
  outline: 1.5px solid #1565c0;
}

#gacha-controls {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-bottom: 18px;
}
.gacha-result-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 10px 8px 2px 8px;
  min-width: 110px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.09);
  position: relative;
}
.gacha-result-item .ur-badge {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2em;
  padding: 2px 10px;
  border-radius: 8px;
  background: linear-gradient(90deg, #ffe066 0%, #ffd700 100%);
  color: #b8860b;
  box-shadow: 0 0 8px #fff799;
  z-index: 2;
  animation: ur-flash-anim 1s linear infinite alternate;
}
.gacha-result-item img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  margin-top: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.10);
}
@media (max-width: 600px) {
  .gacha-result-list {
    gap: 8px;
  }
  .gacha-result-item img {
    width: 64px;
    height: 64px;
  }
  .gacha-result-item {
    min-width: 70px;
    padding: 6px 2px 2px 2px;
  }
}

#attrib-bar a {
  color: #1d72b8;
  text-decoration: none;
}
#attrib-bar a:hover {
  text-decoration: underline;
}
@media (max-width: 800px) {
  #map {
    height: 400px;
  }
}
.leaflet-container {
  border-radius: 8px;
}
#gacha-controls {
  margin-bottom: 24px;
  text-align: center;
}
#gacha-controls button {
  font-size: 1.2em;
  margin: 0 10px;
  padding: 12px 32px;
  border-radius: 6px;
  border: none;
  background: #1d72b8;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
#gacha-controls button:hover {
  background: #155a8a;
}
#tile-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.tile-item {
  width: 80px;
  height: 80px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #eee;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tile-item.locked {
  filter: grayscale(1) brightness(0.7);
  position: relative;
}
.tile-item.locked::after {
  content: 'このタイルはまだ取得できていません';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  color: #fff;
  background: rgba(0,0,0,0.7);
  font-size: 0.7em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
  padding: 4px;
}
.tile-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#gacha-modal button {
  font-size: 1.2em;
  margin: 0 10px;
  padding: 12px 32px;
  border-radius: 6px;
  border: none;
  background: #1d72b8;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
#gacha-modal button:hover {
  background: #155a8a;
}

/* --- スキップボタンだけ控えめ＆強制上書き --- */
#gacha-modal #gacha-skipall-btn {
  position: absolute;
  top: 18px;
  right: 28px;
  z-index: 10;
  background: transparent !important;
  color: #888 !important;
  border: 1px solid #bbb !important;
  border-radius: 6px !important;
  font-size: 1em !important;
  font-weight: normal !important;
  padding: 4px 14px !important;
  cursor: pointer;
  box-shadow: none !important;
  transition: background 0.18s, color 0.18s, border 0.18s;
  display: none;
}
#gacha-modal #gacha-skipall-btn:hover {
  background: #f0f0f0 !important;
  color: #333 !important;
  border: 1px solid #888 !important;
}
