:root {
  --cover-bg: #8e24aa;
  --cover-gold: #ffd54f;
  --paper-bg: #fffde7;
  --primary-blue: #90caf9;
  --text-main: #37474f;
  --accent-pink: #f48fb1;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: 'Hiragino Kaku Gothic ProN', sans-serif;
  overflow: hidden;
  background-color: #263238;
}

.hidden {
  display: none !important;
}

/* 本の表紙デザイン */
.book-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #ab47bc, #6a1b9a);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  box-shadow: inset 0 0 100px rgba(0,0,0,0.5);
}

.cover-content {
  background: rgba(255, 255, 255, 0.1);
  border: 4px double var(--cover-gold);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
}

.cover-title {
  color: var(--cover-gold);
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
  margin-bottom: 10px;
}

.cover-subtitle {
  color: #f3e5f5;
  font-size: 0.9rem;
  margin-bottom: 30px;
}

.open-book-btn {
  background: var(--cover-gold);
  color: #4a148c;
  border: none;
  border-radius: 25px;
  padding: 12px 30px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  transition: transform 0.2s, background 0.2s;
}

.open-book-btn:active {
  transform: scale(0.95);
}

/* シール帳本体 */
.sticker-book {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #f5f5f5;
  display: flex;
  flex-direction: column;
}

.book-bar {
  height: 50px;
  background-color: var(--primary-blue);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.book-bar h2 {
  margin: 0;
  font-size: 1.1rem;
  color: #1565c0;
}

.nav-btn {
  background: white;
  border: none;
  border-radius: 15px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--text-main);
  cursor: pointer;
}

.nav-btn.accent {
  background: var(--accent-pink);
  color: white;
}

.book-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* シール台紙 */
.sticker-canvas {
  flex: 1;
  background-color: var(--paper-bg);
  background-image: 
    radial-gradient(#e0e0e0 10%, transparent 11%),
    radial-gradient(#e0e0e0 10%, transparent 11%);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  position: relative;
  overflow: hidden;
}

.canvas-hint {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.8);
  padding: 5px 15px;
  border-radius: 15px;
  font-size: 0.75rem;
  color: #757575;
  pointer-events: none;
}

/* 貼られたシール (台紙上) */
.placed-sticker {
  position: absolute;
  font-size: 3rem;
  cursor: move;
  user-select: none;
  touch-action: none;
  filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.2));
  transition: transform 0.1s;
}

.placed-sticker:active {
  transform: scale(1.2);
}

/* 下部トレイ */
.sticker-tray {
  height: 110px;
  background: white;
  border-top: 2px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  padding: 8px 15px;
}

.tray-title {
  font-size: 0.75rem;
  color: #9e9e9e;
  margin-bottom: 5px;
}

.tray-list {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  align-items: center;
  height: 100%;
}

.tray-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
  cursor: grab;
  user-select: none;
}

.tray-item .icon {
  font-size: 2.2rem;
}

.tray-item .name {
  font-size: 0.65rem;
  color: var(--text-main);
  text-align: center;
}

.tray-item.locked {
  opacity: 0.3;
  filter: grayscale(100%);
  cursor: not-allowed;
}

/* マップモーダル */
.map-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 500;
  display: flex;
  flex-direction: column;
  background: white;
}

.map-modal-header {
  height: 45px;
  background: #37474f;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  font-size: 0.9rem;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

#map {
  flex: 1;
  width: 100%;
}

.get-btn {
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 5px 10px;
  cursor: pointer;
  margin-top: 5px;
  font-size: 0.75rem;
}