:root {
  --paper: #fbf4e6;
  --wood: #b98a5e;
  --wood-dark: #8a6239;
  --ink: #4a3527;
  --accent: #c96b4f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Hiragino Maru Gothic ProN", "Rounded Mplus 1c", "Yu Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.store-header {
  padding: 28px 20px 12px;
  text-align: center;
}
.store-name {
  margin: 0;
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 900;
  letter-spacing: 0.02em;
}
.store-name .heart { color: var(--accent); }
.store-copy {
  margin: 6px 0 0;
  font-size: clamp(13px, 3vw, 16px);
  color: #8a6a52;
}

main { padding-bottom: 40px; }

.shelf-section { margin: 18px 0; }
.shelf-label {
  margin: 0 0 8px 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--wood-dark);
  border-left: 4px solid var(--accent);
  padding-left: 8px;
}

.shelf {
  position: relative;
  padding: 14px 0 26px;
  background: linear-gradient(180deg, #d8ad7c 0%, var(--wood) 55%, var(--wood-dark) 100%);
  box-shadow: inset 0 -6px 0 rgba(0,0,0,0.15);
  border-top: 3px solid #efd4ab;
}
.shelf::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 10px;
  background: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0));
}

.shelf-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 6px 20px 10px;
  -webkit-overflow-scrolling: touch;
}
.shelf-row::-webkit-scrollbar { height: 6px; }
.shelf-row::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.25); border-radius: 4px; }

.book {
  scroll-snap-align: start;
  position: relative;
  flex: 0 0 auto;
  width: 128px;
  height: 178px;
  border: none;
  border-radius: 4px 8px 8px 4px;
  padding: 0;
  cursor: pointer;
  background: #fff;
  box-shadow: 2px 4px 8px rgba(0,0,0,0.35);
  transform: rotate(-1.5deg) translateY(0);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}
.shelf-row .book:nth-child(3n+2) { transform: rotate(1deg); }
.shelf-row .book:nth-child(3n) { transform: rotate(-0.5deg) translateY(-4px); }

.book:hover, .book:focus-visible {
  transform: translateY(-10px) rotate(0deg);
  box-shadow: 4px 10px 16px rgba(0,0,0,0.4);
}

.book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-tag {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: #fff8ec;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 3px;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.book-empty {
  background: repeating-linear-gradient(135deg, #cbb18e, #cbb18e 6px, #c2a67f 6px, #c2a67f 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.75;
  cursor: default;
}
.book-empty .empty-label {
  writing-mode: vertical-rl;
  font-weight: 700;
  color: #fffaf0;
  letter-spacing: 0.15em;
}

.book-uketsuke {
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.uketsuke-spine {
  writing-mode: vertical-rl;
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: 0.05em;
}

.uketsuke-footer-note {
  text-align: center;
  margin: 30px auto 0;
  color: #8a6a52;
  font-size: 14px;
}
.uketsuke-link {
  display: block;
  margin: 10px auto 0;
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 20px;
  padding: 8px 18px;
  font-weight: 700;
  cursor: pointer;
}

.store-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  font-size: 12px;
  color: #a08262;
}
.footer-link { color: inherit; }

/* ===== モーダル共通 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(40, 28, 18, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-overlay[hidden] { display: none; }

.modal-card {
  position: relative;
  background: #fffdf8;
  border-radius: 16px;
  padding: 24px 20px 20px;
  max-width: 360px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  animation: pop-in 0.18s ease;
}
@keyframes pop-in {
  from { transform: scale(0.92) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 8px; right: 10px;
  background: none;
  border: none;
  font-size: 22px;
  color: #a08262;
  cursor: pointer;
  line-height: 1;
}

.modal-cover {
  width: 100%;
  max-width: 220px;
  border-radius: 6px;
  box-shadow: 2px 6px 14px rgba(0,0,0,0.3);
  margin-bottom: 14px;
}
.modal-title { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.modal-subtitle { margin: 0 0 16px; font-size: 13px; color: #8a6a52; }
.modal-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  padding: 12px 24px;
  border-radius: 24px;
  box-shadow: 0 4px 10px rgba(201,107,79,0.4);
}

/* ===== 受付嬢 ===== */
.uketsuke-character { margin: 0 auto 4px; width: 110px; }
.uketsuke-chat { margin: 8px 0 14px; text-align: left; }
.chat-bubble {
  background: #f3e6d3;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 8px;
  max-width: 100%;
}
.chat-bubble-shop { border-top-left-radius: 2px; }
.chat-bubble-user {
  background: var(--accent);
  color: #fff;
  border-top-right-radius: 2px;
  margin-left: 20%;
}
.uketsuke-form { display: flex; gap: 8px; }
.uketsuke-form input[type="text"] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d8c3a5;
  border-radius: 20px;
  font-size: 14px;
}
.uketsuke-form button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}
.uketsuke-form.is-sent { opacity: 0.5; pointer-events: none; }

/* ===== レスポンシブ ===== */
@media (min-width: 640px) {
  .book { width: 150px; height: 208px; }
}
@media (max-width: 400px) {
  .book { width: 116px; height: 160px; }
  .shelf-row { gap: 10px; padding-left: 14px; }
}
