* { box-sizing: border-box; margin: 0; padding: 0; }
body { overflow: hidden; background: #000; font-family: 'Segoe UI', sans-serif; }
.icon-svg { width: 16px; height: 16px; vertical-align: middle; display: inline-block; }

/* Webfont */
.noto-serif-jp { font-family: "Noto Serif JP", serif; font-optical-sizing: auto; font-weight: 700 !important; font-style: normal; letter-spacing: 0.05em; }

/* 汎用クラス */
.pc-only { display: block; }
.sp-only { display: none; }

/* ── ローダー */
#loader { position: fixed; inset: 0; z-index: 9999; background: #fff; background-image: url(/assets/images/loading-bg3.png); background-size: cover; display: flex; align-items: center; justify-content: center; transition: opacity 0.9s ease; }
#loader.fade-out { opacity: 0; pointer-events: none; }
#loader-overlay { width: 100%; height: 100%; background: rgba(255,255,255,0.8); display: flex; align-items: center; justify-content: center; transition: opacity 0.9s ease; backdrop-filter: blur(8px); }
#loader-content { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
#loader-catchcopy { font-size: 1.0rem; color: rgba(255,255,255,0.9); letter-spacing: 0.0em; font-weight: 300; min-height: 2em; font-family: 'Noto Serif JP', 'YuMincho', 'Yu Mincho', serif; }
.mango-dot { opacity: 0; display: inline-block; transition: opacity 0.3s ease; }
#loader-progress { margin-top: -8px; font-size: 0.9rem; color: rgba(0,0,0,1.0); letter-spacing: 0.05em; font-weight: 300; }
#loader-progress-num { font-size: 1.6rem; font-weight: 600; }
.mango-dot.visible { opacity: 1; }
/*#loader-catchcopy::after { content: '|'; margin-left: 2px; animation: blink 1s step-end infinite; color: rgba(255,200,60,0.9); }*/
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
#loader-btns { width: 95%; }
#loader-btns p { font-size: 14px; line-height: 1.7; }
#loader-btns ul {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  margin-top: 16px;
}
#loader-btns ul li { width: 100%; list-style-type: none; }
#loader-btns ul li:nth-child(n+2) { display: none; }
#loader-btns ul li button { font-size: 14px; }
#loader-jpyc { width: clamp(500px, 60vw, 700px); }
#loader-logo { position: absolute; top: 10px; left: 10px; width: clamp(200px, 15vw, 400px); opacity: 1.0; }
#loader-start-btn { display: none; background: linear-gradient(135deg, #f4a429, #e8831a); color: #fff; border: none; border-radius: 50px; padding: 16px 36px; font-size: 1.1rem; font-weight: 700; cursor: pointer; box-shadow: 0 4px 20px rgba(244,164,41,0.5); letter-spacing: 0.05em; animation: loader-pulse 2s ease infinite; }
#loader-metamask-btn { display: none; background: linear-gradient(135deg, #f4a429, #e8831a); color: #fff; border: none; border-radius: 50px; padding: 16px 36px; font-size: 1.1rem; font-weight: 700; cursor: pointer; box-shadow: 0 4px 20px rgba(244,164,41,0.5); letter-spacing: 0.05em; animation: loader-pulse 2s ease infinite; }
#loader-metamask-hint { display: none; }
#loader-other-wallet-hint { margin-top: 12px; text-align: center; }
#loader-other-wallet-hint a { color: #0066ff; font-size: 12px; text-decoration: none; cursor: pointer; }
@keyframes loader-pulse { 0%, 100% { transform: scale(1); box-shadow: 0 4px 20px rgba(244,164,41,0.5); } 50% { transform: scale(1.04); box-shadow: 0 6px 28px rgba(244,164,41,0.7); } }
#loader-jpyc-btn { background: linear-gradient(135deg, #1b8bf5, #0a38d1 ); color: #fff; border: none; border-radius: 50px; padding: 16px 36px; font-size: 1.1rem; font-weight: 700; cursor: pointer; box-shadow: 0 4px 20px rgba(244,164,41,0.5); letter-spacing: 0.05em; animation: loader-pulse 2s ease infinite; }
#loader-jpyc-btn a { display: block; color: #fff; text-decoration: none; }

#time-overlay { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; transition: background 3s ease; z-index: 5; }
#hud { position: absolute; top: 24px; right: 200px; color: rgba(255,255,255,0.75); font-size: 13px; background: rgba(0,0,0,0.45); padding: 8px 14px; border-radius: 6px; pointer-events: none; backdrop-filter: blur(4px); z-index: 10; }
#main-logo { position: fixed; top: 10px; left: 10px; width:clamp(200px, 15vw, 400px); pointer-events: none; z-index: 90; }

/* ── 右上コントロール群（BGM・照明） */
#top-right-controls { position: fixed; top: 20px; right: 68px; z-index: 20; display: flex; flex-direction: row; align-items: flex-start; gap: 8px; }
#bgm-toggle { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.15); cursor: pointer; background: rgba(0,0,0,0.5); backdrop-filter: blur(6px); font-size: 22px; display: flex; align-items: center; justify-content: center; transition: background 0.2s, transform 0.15s; color: white; }
#bgm-toggle:hover { background: rgba(0,0,0,0.2); transform: scale(1.08); }
#my-shop-add-btn { position: fixed; right: 20px; top: 20px; display: block; width: 44px !important; height: 44px !important; margin: 0; padding: 0; background: rgba(0,0,0,0.55); border: 1px solid rgba(255, 160, 40, 0.25); border-radius: 24px; color: rgba(255, 200, 120, 0.75); font-size: 12px; cursor: pointer; text-align: center; white-space: nowrap; transition: all 0.2s;
}
#my-shop-add-btn:hover { background: rgba(0,0,0,0.2) !important; transform: scale(1.08); }
#my-shop-add-btn span { display: none; }

/* ── 照明UI */
#lighting-ui { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
#lighting-toggle { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.15); cursor: pointer; background: rgba(0,0,0,0.5); backdrop-filter: blur(6px); font-size: 22px; display: flex; align-items: center; justify-content: center; transition: background 0.2s, transform 0.15s; color: white; }
#lighting-toggle:hover { background: rgba(255,200,80,0.25); transform: scale(1.08); }
#lighting-panel { display: none; flex-direction: column; gap: 6px; background: rgba(0,0,0,0.6); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; padding: 10px; min-width: 130px; }
#lighting-panel.open { display: flex; }
.time-btn { display: flex; align-items: center; gap: 8px; background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.7); font-size: 13px; padding: 7px 10px; border-radius: 7px; transition: background 0.15s, color 0.15s; text-align: left; width: 100%; }
.time-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.time-btn.active { background: rgba(255,200,80,0.2); color: #f5d78a; }
.time-btn .btn-icon { font-size: 16px; }
#auto-label { font-size: 10px; color: rgba(255,200,80,0.7); text-align: right; padding-right: 4px; }

/* ── モニタースライドショー */
#monitor-slide { position: absolute; pointer-events: auto; cursor: pointer; z-index: 8; transform: translate(-50%, -50%); transform-origin: center center; }
#monitor-slide img { display: block; border-radius: 4px; mix-blend-mode: screen; opacity: 0; transition: opacity 1.2s ease; width: 100%; }
#monitor-slide img.visible { opacity: 0.85; }
#monitor-slide:hover img.visible { opacity: 1; filter: brightness(1.1); }

/* ── ライトボックス */
#lightbox { position: absolute; inset: 0; background: rgba(0,0,0,0.78); display: none; align-items: center; justify-content: center; backdrop-filter: blur(8px); z-index: 200; }
#lightbox.open { display: flex; }
#lightbox-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; max-width: min(780px, 90vw); animation: lbSlideIn 0.25s ease; }
@keyframes lbSlideIn { from { transform: translateY(16px) scale(0.97); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
#lightbox-img { width: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.8); display: block; }
#lightbox-

#lightbox-footer { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 16px; }
#lightbox-title { color: rgba(255,255,255,0.85); font-size: 15px; font-weight: 500; flex: 1; }
#lightbox-close { background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.4); font-size: 26px; line-height: 1; padding: 0 4px; transition: color 0.15s; }
#lightbox-close:hover { color: #fff; }
#lightbox-link { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,200,80,0.15); border: 1px solid rgba(255,200,80,0.5); color: #f5d78a; font-size: 13px; font-weight: 500; padding: 8px 18px; border-radius: 7px; text-decoration: none; transition: background 0.2s; white-space: nowrap; }
#lightbox-link:hover { background: rgba(255,200,80,0.3); color: #fff; }
#lightbox-link.hidden { display: none; }

/* ── ホットスポット */
.hotspot { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; cursor: pointer; user-select: none; z-index: 10; }
.hotspot-ring { width: 48px; height: 48px; border-radius: 50%; border: 2.5px solid rgba(255,200,80,0.9); background: rgba(255,180,40,0.18); display: flex; align-items: center; justify-content: center; font-size: 20px; animation: pulse 2.2s ease-in-out infinite; transition: transform 0.15s, background 0.15s; }
.hotspot:hover .hotspot-ring { background: rgba(255,180,40,0.45); transform: scale(1.15); }
.hotspot-label { position: absolute; top: 54px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.65); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 4px; white-space: nowrap; backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.2s; }
.hotspot:hover .hotspot-label { opacity: 1; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,180,40,0.5); } 50% { box-shadow: 0 0 0 12px rgba(255,180,40,0); } }

/* ── 事例モーダル */
#modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.55); display: none; align-items: center; justify-content: center; backdrop-filter: blur(3px); z-index: 100; }
#modal-overlay.open { display: flex; }
#modal { background: #1a1410; border: 1px solid rgba(255,200,80,0.35); border-radius: 12px; width: min(820px,92vw); max-height: 80vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,0.7); animation: modalIn 0.25s ease; }
@keyframes modalIn { from { opacity:0; transform: translateY(20px) scale(0.97); } to { opacity:1; transform: translateY(0) scale(1); } }
#modal-header { padding: 20px 24px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; gap: 12px; }
#modal-header .icon { font-size: 28px; }
#modal-header h2 { color: #f5d78a; font-size: 20px; font-weight: 600; flex: 1; }
#modal-header .sub { color: rgba(255,255,255,0.4); font-size: 12px; margin-top: 2px; }
#modal-close { background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.5); font-size: 22px; padding: 4px 8px; border-radius: 6px; transition: color 0.15s, background 0.15s; }
#modal-close:hover { color: #fff; background: rgba(255,255,255,0.1); }
#modal-body { overflow-y: auto; padding: 20px 24px 24px; display: grid; gap: 14px; }
.case-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09); border-radius: 8px; padding: 16px 18px; transition: border-color 0.2s, background 0.2s; text-decoration: none; display: block; color: inherit; }
.case-card:hover { border-color: rgba(255,200,80,0.45); background: rgba(255,200,80,0.06); }
.case-card .card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.case-card .card-title { color: #f0e6c8; font-size: 15px; font-weight: 600; line-height: 1.4; }
.case-card .card-year { color: rgba(255,255,255,0.3); font-size: 12px; }
.case-card .card-category { color: #f5d78a; font-size: 11px; margin: 5px 0 8px; font-weight: 500; }
.case-card .card-desc { color: rgba(255,255,255,0.6); font-size: 13px; line-height: 1.7; }
.case-card .card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.case-card .tag { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); color: rgba(255,255,255,0.55); font-size: 10.5px; padding: 2px 8px; border-radius: 20px; }
.case-card .card-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 12px; color: rgba(255,200,80,0.7); }

/* ── ビビ ホットスポット */
#vivi-hotspot { position: absolute; z-index: 12; transform: translate(-50%, -50%); cursor: pointer; pointer-events: auto; user-select: none; display: none; }
#vivi-hotspot .vivi-hs-ring { width: 80px; height: 80px; border-radius: 50%; border: 2.5px solid rgba(255,160,40,0.9); background: rgba(255,120,20,0.5); display: flex; align-items: center; justify-content: center; font-size: 24px; animation: viviPulse 2s ease-in-out infinite; transition: transform 0.15s, background 0.15s; }
#vivi-hotspot:hover .vivi-hs-ring { background: rgba(255,120,20,0.4); transform: scale(1.15); }
#vivi-hotspot .vivi-hs-label { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.7); color: #ffcc66; font-size: 11px; padding: 3px 8px; border-radius: 4px; white-space: nowrap; backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.2s; }
#vivi-hotspot:hover .vivi-hs-label { opacity: 1; }
@keyframes viviPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,140,20,0.5); } 50% { box-shadow: 0 0 0 14px rgba(255,140,20,0); } }

/* ════════════════════════════════════
   RPGダイアログ
   ════════════════════════════════════ */
#rpg-dialog {
  position: absolute; bottom: 50px; left: 0; right: 0; z-index: 150;
  display: flex; flex-direction: column; align-items: center;
  pointer-events: none; opacity: 0; transform: translateY(14px);
  transition: opacity 0.3s, transform 0.3s;
}
#rpg-dialog.open { opacity: 1; transform: translateY(0); pointer-events: auto; }

#rpg-window {
  width: min(680px, 92vw);
  background: rgba(252, 251, 242, 0.95);
  border: 2px solid rgba(23, 120, 0, 0.5);
  border-radius: 14px;
  box-shadow: 0 -8px 40px rgba(200,100,0,0.2);
  backdrop-filter: blur(16px);
  overflow: hidden;
}
#rpg-name-bar {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px 7px;
  background: rgba(23,120,0,0.85);
  border-bottom: 1px solid rgba(255,160,40,0.12);
}
#rpg-char-icon { font-size: 20px; }
#rpg-char-name { color: #e2ff66; font-size: 16px; font-weight: 700; letter-spacing: 0.5px; flex: 1; }
#rpg-close { background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.35); font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 5px; transition: color 0.15s, background 0.15s; }
#rpg-close:hover { color: #fff; background: rgba(255,255,255,0.1); }

#rpg-message { padding: 14px 18px 10px; color: #a57220; font-size: 16px; line-height: 1.85; min-height: 72px; white-space: pre-wrap; }

#rpg-choices { padding: 4px 12px 14px; display: flex; flex-direction: column; gap: 5px; border-top: 1px solid rgba(255,160,40,0.1); }
.rpg-choice {
  background: rgba(23, 120, 0, 0.65); border: 1px solid rgba(23,120,0,0.22);
  color: #e2ff66; font-size: 16px; padding: 9px 14px;
  border-radius: 7px; cursor: pointer; text-align: left; width: 100%;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  display: flex; align-items: center; gap: 8px;
}
.rpg-choice:hover { background: rgba(154,180,0,0.85); border-color: rgba(154,180,0,0.6); color: #fff; }
.rpg-choice .ch-arr { color: rgba(255,180,60,0.7); font-size: 10px; flex-shrink: 0; }

/* チャットモード */
#rpg-chat-area { display: none; padding: 0 12px 12px; border-top: 1px solid rgba(255,160,40,0.1); }
#rpg-chat-area.open { display: block; }
#rpg-chat-messages { max-height: 400px; overflow-y: auto; padding: 8px 0 4px; display: flex; flex-direction: column; gap: 7px; scroll-behavior: smooth; }
#rpg-chat-messages::-webkit-scrollbar { width: 3px; }
#rpg-chat-messages::-webkit-scrollbar-thumb { background: rgba(255,180,60,0.2); border-radius: 2px; }
.rpg-msg { display: flex; gap: 6px; align-items: flex-start; animation: msgIn 0.2s ease; }
@keyframes msgIn { from { opacity:0; transform: translateY(4px); } to { opacity:1; transform:translateY(0); } }
.rpg-msg.user-msg { flex-direction: row-reverse; }
.rpg-bubble { max-width: 78%; padding: 7px 11px; border-radius: 9px; font-size: 14px; line-height: 1.6; }
.rpg-msg.vivi-msg .rpg-bubble { background: rgba(255,255,255,1.0); color: #a57220; border: 1px solid rgba(255,160,40,0.2); border-radius: 3px 9px 9px 9px; }
.rpg-msg.user-msg .rpg-bubble { background: rgba(255,200,80,0.1); color: #a57220; border: 1px solid rgba(255,200,80,0.2); border-radius: 9px 3px 9px 9px; }
.rpg-ico { font-size: 16px; flex-shrink: 0; padding-top: 2px; }
.rpg-typing span { display: inline-block; width: 5px; height: 5px; background: rgba(255,180,60,0.7); border-radius: 50%; margin: 0 2px; animation: dotBounce 1s ease-in-out infinite; }
.rpg-typing span:nth-child(2) { animation-delay: 0.15s; }
.rpg-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dotBounce { 0%,80%,100% { transform: translateY(0); opacity:0.5; } 40% { transform: translateY(-4px); opacity:1; } }
#rpg-input-row { display: flex; gap: 6px; margin-top: 8px; }
#rpg-input { flex: 1; background: rgba(255,255,255,1.0); border: 1px solid rgba(255,160,40,0.25); border-radius: 8px; padding: 8px 12px; color: #a57220; font-size: 13px; outline: none; transition: border-color 0.2s; }
#rpg-input:focus { border-color: rgba(255,180,60,0.55); }
#rpg-input::placeholder { color: rgba(0,0,0,0.28); }
#rpg-send { background: rgba(200,90,0,1.0); border: 1px solid rgba(255,160,40,0.4); border-radius: 8px; padding: 8px 14px; color: #fff; cursor: pointer; font-size: 13px; font-weight: 600; transition: background 0.2s, color 0.2s; }
#rpg-send:hover { background: rgba(200,90,0,0.8); color: #fff; }
#rpg-send:disabled { opacity: 0.4; cursor: not-allowed; }
#rpg-back-btn { font-size: 12px; color: #ff6600; background: none; border: none; cursor: pointer; padding: 4px 0; margin-top: 4px; display: block; transition: color 0.15s; }
#rpg-back-btn:hover { color: #ff6600; }

/* ════════════════════════════════════
   ショップモーダル（ドーナツメニュー）
   ════════════════════════════════════ */
#shop-modal { position: absolute; inset: 0; /*background: rgba(0,0,0,0.72);*/ display: none; align-items: center; justify-content: center; backdrop-filter: blur(8px); z-index: 200; }
#shop-modal.open { display: flex; }
#shop-window { background: rgba(252, 251, 242, 0.95); /*border: 1.5px solid rgba(255,160,40,0.4);*/ border-radius: 14px; width: min(92vw); max-height: 82vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,0.85); animation: modalIn 0.25s ease; }
#shop-header { padding: 18px 22px 14px; border-bottom: 1px solid rgba(255,255,255,0.07); display: flex; align-items: center; gap: 12px; }
#shop-header .sh-icon { font-size: 28px; }
#shop-header h2 { color: #333; font-size: 18px; font-weight: 700; flex: 1; }
#shop-header .sh-sub { color: #636e72; font-size: 12px; margin-top: 2px; }
#shop-close { background: none; border: none; cursor: pointer; color: rgba(0,0,0,1.0); font-size: 22px; padding: 4px 8px; border-radius: 6px; transition: color 0.15s, background 0.15s; margin-left: auto; }
#shop-close:hover { color:rgba(0,0,0,0.8); /*background: rgba(255,255,255,0.1);*/ }
#shop-tabs { display: flex; flex-wrap: wrap;/*flex-wrap: inherit; -webkit-box-pack: justify; -ms-flex-pack: justify; justify-content: space-between;*/ gap: 10px; padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,0.07); flex-shrink: 0; }
.shop-tab { background: rgba(255,255,255,0.5); border: none; border-bottom: 2px solid transparent; color: #333; font-size: 16px; font-weight: 600; padding: 10px 16px 11px; width: 200px; cursor: pointer; transition: color 0.15s, border-color 0.15s; white-space: nowrap; border-radius: 7px 7px 0 0; }
.shop-tab:hover { color: #ff6600; background: rgba(255,255,255,1.0); }
.shop-tab.active { color: #ff6600; background: rgba(255,255,255,1.0); border-bottom-color: #ffcc66; }
#shop-items { overflow-y: auto; padding: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 14px; }
#shop-items::-webkit-scrollbar { width: 4px; }
#shop-items::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 2px; }
.donut-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09); border-radius: 10px; padding: 16px 14px 14px; text-align: center; transition: border-color 0.2s, background 0.2s; display: flex; flex-direction: column; }
.donut-card:hover { border-color: rgba(255,180,60,0.45); background: rgba(255,140,20,0.06); }
.donut-icon { font-size: 40px; margin-bottom: 10px; }
.donut-name { color: #a57220; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.donut-price { color: #ffcc66; font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.donut-desc { color: rgba(255,255,255,0.45); font-size: 11px; line-height: 1.55; flex: 1; margin-bottom: 12px; }
.donut-buy { background: rgba(160,70,0,0.35); border: 1px solid rgba(255,160,40,0.35); color: #ffcc66; font-size: 12px; font-weight: 600; padding: 7px 0; border-radius: 7px; cursor: pointer; width: 100%; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.donut-buy:hover { background: rgba(200,90,0,0.65); color: #fff; border-color: rgba(255,200,60,0.7); }

/* ── カートUI */
#cart-ui { position: fixed; bottom: 50px; left: 20px; z-index: 30; }
#cart-toggle { display: flex; align-items: center; gap: 8px; width: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); border: 1px solid rgba(255,160,40,0.35); border-radius: 24px; color: rgba(255, 200, 120, 0.75); font-size: 12px; padding: 9px 18px; cursor: pointer; transition: background 0.2s, border-color 0.2s; }
#cart-toggle:hover { background: rgba(120,50,0,0.5); border-color: rgba(255,180,60,0.65); color: #fff; }
#cart-count { background: #e07000; color: #fff; font-size: 11px; font-weight: 700; border-radius: 50%; width: 20px; height: 20px; display: none; align-items: center; justify-content: center; }
#cart-count.visible { display: flex; }
#cart-panel { display: none; position: absolute; bottom: 52px; left: 0; background: rgba(252, 251, 242, 0.95); backdrop-filter: blur(14px); border: 1.5px solid rgba(255,255,255,0.35); border-radius: 12px; padding: 14px; min-width: 230px; max-width: 400px; width: 400px; box-shadow: 0 8px 30px rgba(0,0,0,0.6); }
#cart-panel.open { display: block; }
#cart-panel-title { color: #ff6600; font-size: 12px; font-weight: 700; margin-bottom: 10px; letter-spacing: 0.5px; }
#cart-items { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; margin-bottom: 10px; }
.cart-item { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #333; }
.cart-item .ci-icon { font-size: 16px; flex-shrink: 0; }
.cart-item .ci-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item .ci-qty-ctrl { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.cart-item .ci-qty-btn { background: rgba(0,0,0,0.2); border: 1px solid rgba(0,0,0,0.0); color: #fff; font-size: 11px; width: 20px; height: 20px; border-radius: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1; }
.cart-item .ci-qty-btn:hover { background: rgba(255, 120, 10, 1.0); border-color: rgba(255,160,40,0.6); }
.cart-item .ci-qty { color: #333; min-width: 16px; text-align: center; }
.cart-item .ci-price { color: #cc0000; font-weight: 600; flex-shrink: 0; }
.cart-item .ci-delete-btn { background: none; border: none; color: rgba(0,0,0,1.0); font-size: 11px; cursor: pointer; padding: 2px 4px; border-radius: 4px; flex-shrink: 0; }
.cart-item .ci-delete-btn:hover { color: rgba(255, 120, 10, 1.0); }
#cart-empty { color: #333; font-size: 12px; text-align: center; padding: 8px 0; }
#cart-total { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 8px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
#cart-total .ct-label { color: #333; }
#cart-total .ct-amount { color: #cc0000; font-weight: 700; font-size: 15px; }
#checkout-btn { margin-top: 10px; width: 100%; background: rgba(255, 120, 10, 0.8); border: 1px solid rgba(255, 160, 40, 0.85); color: #fff; font-size: 13px; font-weight: 600; padding: 8px 0; border-radius: 8px; cursor: pointer; transition: background 0.2s, color 0.2s; }
#checkout-btn:hover { background: rgba(255, 120, 10, 1.0); color: #fff; }
#checkout-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ════════════════════════════════════
   JPYCお支払いモーダル
   ════════════════════════════════════ */
#payment-modal { position: absolute; inset: 0; /*background: rgba(0,0,0,0.78);*/ display: none; align-items: center; justify-content: center; backdrop-filter: blur(10px); z-index: 300; }
#payment-modal.open { display: flex; }
#payment-window { background: rgba(252, 251, 242, 0.95); border: 1.5px solid rgba(255,255,255,0.45); border-radius: 14px; width: min(480px,92vw); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 24px 70px rgba(0,0,0,0.9); animation: modalIn 0.25s ease; }

#payment-header { padding: 16px 20px 13px; border-bottom: 1px solid rgba(255, 255, 255, 1.0); display: flex; align-items: center; gap: 12px; /*background: rgba(180,80,0,0.15);*/ }
#payment-header .pay-hd-icon { /*font-size: 24px;*/ }
#payment-header .pay-hd-icon img { display: inline-block; width: 30px; height: 30px; /*font-size: 24px;*/ }
#payment-header h2 { color: #333; font-size: 17px; font-weight: 700; flex: 1; }
#payment-header .pay-hd-sub { color: #333; font-size: 11px; margin-top: 2px; }
#payment-close { background: none; border: none; cursor: pointer; color: rgba(0,0,0,1.0); font-size: 20px; padding: 4px 8px; border-radius: 6px; transition: color 0.15s, background 0.15s; margin-left: auto; }
#payment-close:hover { color: rgba(0,0,0,0.8);; /*background: rgba(255,255,255,0.1);*/ }

#payment-body { padding: 18px 20px 18px; display: flex; flex-direction: column; gap: 16px; }

.pay-section-label { color: #e65100; font-size: 10.5px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; margin-bottom: 8px; }

/* 注文内容 */
#pay-order-items { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.pay-order-row { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #a57220; }
.pay-order-row .poi-name { flex: 1; color: #333; }
.pay-order-row .poi-qty  { color: #333; font-size: 12px; }
.pay-order-row .poi-price { color: #333; font-weight: 600; }
.pay-gift-row { font-size: 12px; color:#ff6600; padding: 4px 0 0; }
#pay-order-total { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 0; border-top: 1px solid rgba(255,255,255,0.07); margin-bottom: 1em; }
.pay-total-label { color: #333; font-size: 13px; }
.pay-total-value { color: #cc0000; font-size: 20px; font-weight: 700; }

/* チェーン選択 */
#pay-chain-selector { margin-bottom: 12px; }
.pay-chain-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.pay-chain-btn { flex: 0 0 calc(50% - 4px); display: flex; align-items: center; justify-content: center; gap: 5px; padding: 8px 4px; background: rgba(255,255,255,1.0); border: 1px solid rgba(255,255,255,0.12); color: rgba(0,0,0,1.0); border-radius: 8px; font-size: 13px; cursor: pointer; transition: all 0.15s; }
.chain-icon { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.pay-chain-btn:hover { background: rgba(255,255,255,0.8); color: #333; }
.pay-chain-btn.active { background: rgba(255,207,0,0.5); border-color: rgba(255,207,0,0.5); color: #333; }
#pay-eth-warning { display: none; font-size: 11px; /*color: rgba(255,200,80,0.85);*/ margin: 2px 0 6px; }

/* ウォレット */
.pay-wallet-hint { color: #333; font-size: 12px; line-height: 1.6; margin-bottom: 12px; }
.pay-wallet-info { background: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.8); border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pay-wallet-address { color: #333; font-size: 13px; font-family: monospace; }
.pay-wallet-balance { color: #333; font-size: 12px; white-space: nowrap; }

/* アクションボタン */
.pay-action-btn { width: 100%; padding: 11px 0; border-radius: 9px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.2s, color 0.2s, border-color 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.pay-action-btn { background: rgba(255, 120, 8, 0.8); border: 1px solid rgba(255,160,40,0.35); color: #fff; }
.pay-action-btn:hover:not(:disabled) { background: rgba(255, 120, 8, 1.0); border-color: rgba(255,200,60,0.7); color: #fff; }
.pay-action-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pay-action-primary { background: rgba(255, 120, 8, 0.8); border: 1.5px solid rgba(255,160,40,0.6); color: #fff; }
.pay-action-primary:hover:not(:disabled) { background: rgba(255, 120, 8, 1.0); border-color: rgba(255,220,80,0.8); }

/* 処理中 */
#pay-processing { text-align: center; padding: 24px 0 8px; }
.pay-spinner { width: 36px; height: 36px; border: 3px solid rgba(255,160,40,0.2); border-top-color: rgba(255,160,40,0.85); border-radius: 50%; animation: spin 0.9s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.pay-processing-text { color: #333; font-size: 14px; line-height: 1.7; }

/* 完了 */
#pay-success { text-align: center; padding: 8px 0 8px; }
.pay-success-icon { /*font-size: 48px;*/ margin-bottom: 10px; animation: popIn 0.4s ease; }
.pay-success-icon img { display: block; width: 60%; height: auto; margin: 0 auto; }
@keyframes popIn { from { transform: scale(0.5); opacity:0; } to { transform: scale(1); opacity:1; } }
.pay-success-title { color: #ff6600; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.pay-success-sub { color: #333; font-size: 14px; line-height: 1.8; margin-bottom: 16px; }
.pay-success-order-id { color: #333; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.pay-success-tx { color: #333; font-size: 10px; font-family: monospace; word-break: break-all; margin-bottom: 16px; }

/* エラー */
#pay-error { text-align: center; padding: 16px 0 8px; }
.pay-error-icon { font-size: 36px; margin-bottom: 10px; }
.pay-error-text { color: rgba(255,120,100,0.9); font-size: 13px; line-height: 1.7; margin-bottom: 16px; }
.pay-error-hint { white-space: pre-line; font-size: 12px; color: #ff6600; margin-top: 10px; margin-bottom: 12px; line-height: 1.6; text-align: left; }

/* ウォレットウィジェット（カートそば） */
#wallet-widget { margin-bottom: 8px; }
#wallet-widget-btn { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.55); backdrop-filter: blur(8px); border: 1px solid rgba(255,160,40,0.25); border-radius: 24px; color: rgba(255,200,120,0.75); font-size: 12px; padding: 9px 18px; cursor: pointer; transition: background 0.2s, border-color 0.2s; width: 100%; }
#wallet-widget-btn:hover { background: rgba(100,40,0,0.5); border-color: rgba(255,180,60,0.55); color: #fff; }
#wallet-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.25); flex-shrink: 0; }
#wallet-dot.connected { background: #4caf50; }
#wallet-label { flex: 1; text-align: left; white-space: nowrap; }

/* ═══════════════════════════════════════════
   AI MODE UI
   ═══════════════════════════════════════════ */

#ai-mode-ui {
  display: none;
}

body.ai-mode #ai-mode-ui {
  display: block;
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  font-family: 'Segoe UI', 'Noto Sans JP', sans-serif;
  background: #faf8f4;
  min-height: 100vh;
  color: #333;
}

/* 3D空間・HUD・その他UIを非表示 */
body.ai-mode canvas,
body.ai-mode #hud,
body.ai-mode #time-overlay,
body.ai-mode #lighting-ui,
body.ai-mode #rpg-dialog,
body.ai-mode #vivi-hotspot,
body.ai-mode #shop-modal,
body.ai-mode #payment-modal,
body.ai-mode #modal-overlay,
body.ai-mode #lightbox,
body.ai-mode #cart-ui,
body.ai-mode #monitor-slide {
  display: none !important;
}

/* ヘッダー */
.ai-header {
  text-align: center;
  padding: 24px 0 16px;
  border-bottom: 2px solid #e8e0d0;
  margin-bottom: 24px;
}

.ai-header h1 {
  font-size: 1.8rem;
  margin: 0 0 4px;
  color: #5c3b1a;
}

.ai-subtitle {
  font-size: 0.85rem;
  color: #999;
  margin: 0;
  letter-spacing: 0.05em;
}

/* セクション共通 */
.ai-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.ai-section h2 {
  font-size: 1rem;
  color: #5c3b1a;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0ebe0;
}

.ai-optional {
  font-size: 0.75rem;
  color: #aaa;
  font-weight: normal;
}

/* メニューボタン */
#ai-menu-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#ai-menu-items button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fdf6ee;
  border: 1px solid #e8d9c0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s, border-color 0.15s;
  text-align: left;
  width: 100%;
}

#ai-menu-items button:hover {
  background: #f5e9d5;
  border-color: #c9955a;
}

#ai-menu-items button .ai-btn-name {
  font-weight: 500;
  color: #3d2a1a;
}

#ai-menu-items button .ai-btn-price {
  font-size: 0.85rem;
  color: #c9955a;
  font-weight: bold;
}

/* カート */
#ai-cart-items {
  font-size: 0.9rem;
  color: #555;
  min-height: 40px;
  margin-bottom: 8px;
}

.ai-cart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #f5f0e8;
}

.ai-cart-row:last-child {
  border-bottom: none;
}

.ai-cart-row .ai-cart-name {
  flex: 1;
  color: #3d2a1a;
}

.ai-cart-row .ai-cart-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-cart-row button {
  width: 24px;
  height: 24px;
  border: 1px solid #e0d0bc;
  border-radius: 4px;
  background: #faf5ee;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-cart-row button:hover {
  background: #f0e4cc;
}

.ai-total {
  text-align: right;
  font-weight: bold;
  color: #5c3b1a;
  margin: 8px 0 0;
  font-size: 1rem;
}

#ai-cart-total {
  color: #c9955a;
  font-size: 1.1rem;
}

/* Permitセクション */
.ai-permit-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

#ai-permit-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: monospace;
  color: #333;
  outline: none;
  transition: border-color 0.15s;
}

#ai-permit-input:focus {
  border-color: #c9955a;
}

#ai-set-permit {
  padding: 8px 14px;
  background: #5c3b1a;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
}

#ai-set-permit:hover {
  background: #7a4f2a;
}

#ai-permit-status {
  font-size: 0.8rem;
  margin: 0;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

#ai-permit-status[data-status="none"]    { color: #aaa; }
#ai-permit-status[data-status="set"]     { color: #2a7a4f; background: #e8f7ee; }
#ai-permit-status[data-status="invalid"] { color: #c0392b; background: #fdecea; }

/* アクションボタン */
#ai-actions-section {
  display: flex;
  gap: 10px;
}

#ai-checkout {
  flex: 1;
  padding: 14px 0;
  background: #c9955a;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.15s;
}

#ai-checkout:hover:not(:disabled) {
  background: #a87a45;
}

#ai-checkout:disabled {
  background: #ddd;
  color: #aaa;
  cursor: not-allowed;
}

#ai-clear {
  padding: 14px 16px;
  background: #f5f0e8;
  color: #888;
  border: 1px solid #e0d5c5;
  border-radius: 10px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
}

#ai-clear:hover {
  background: #ede3d0;
}

/* ステータス */
#ai-status-section {
  text-align: center;
  font-size: 0.85rem;
  color: #888;
}

#ai-status-msg {
  margin: 0;
  min-height: 1.2em;
}

#ai-status-msg.success { color: #2a7a4f; font-weight: bold; }
#ai-status-msg.error   { color: #c0392b; font-weight: bold; }
#ai-status-msg.loading { color: #c9955a; }

/* ═══════════════════════════════════════════
   PERMIT MODE UI
   ═══════════════════════════════════════════ */

#permit-mode-ui {
  display: none;
}

body.permit-mode #permit-mode-ui {
  display: block;
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  font-family: 'Segoe UI', 'Noto Sans JP', sans-serif;
  background: #faf8f4;
  min-height: 100vh;
  color: #333;
}

/* 3D空間を非表示（ai-modeと同じ） */
body.permit-mode canvas,
body.permit-mode #hud,
body.permit-mode #time-overlay,
body.permit-mode #lighting-ui,
body.permit-mode #rpg-dialog,
body.permit-mode #vivi-hotspot,
body.permit-mode #shop-modal,
body.permit-mode #payment-modal,
body.permit-mode #modal-overlay,
body.permit-mode #lightbox,
body.permit-mode #cart-ui,
body.permit-mode #monitor-slide {
  display: none !important;
}

/* ウォレット接続ボタン */
#permit-connect-btn {
  width: 100%;
  padding: 14px;
  background: #e8730a;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.15s;
}
#permit-connect-btn:hover { background: #c05e08; }

.permit-wallet-addr,
.permit-jpyc-balance {
  font-size: 0.9rem;
  color: #555;
  margin: 4px 0;
}

#permit-address {
  font-family: monospace;
  font-size: 0.85rem;
}

/* フォームフィールド */
.permit-field {
  margin-bottom: 20px;
}

.permit-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: bold;
  color: #5c3b1a;
  margin-bottom: 8px;
}

/* プリセットボタン群 */
.permit-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.permit-preset {
  padding: 8px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #faf5ee;
  cursor: pointer;
  font-size: 0.9rem;
  color: #555;
  transition: all 0.15s;
}
.permit-preset:hover  { border-color: #c9955a; color: #c9955a; }
.permit-preset.active { border-color: #c9955a; background: #c9955a; color: #fff; font-weight: bold; }

/* 手入力行 */
.permit-custom-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

#permit-amount-input {
  width: 100px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}
#permit-amount-input:focus { border-color: #c9955a; }

.permit-unit {
  font-size: 0.9rem;
  color: #888;
}

/* 発行ボタン */
#permit-issue-btn {
  width: 100%;
  padding: 14px;
  background: #5c3b1a;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s;
}
#permit-issue-btn:hover    { background: #7a4f2a; }
#permit-issue-btn:disabled { background: #ddd; color: #aaa; cursor: not-allowed; }

#permit-issue-status {
  font-size: 0.85rem;
  color: #e8730a;
  min-height: 1.2em;
  margin: 8px 0 0;
  text-align: center;
}

/* コード表示 */
.permit-result-lead {
  font-size: 0.95rem;
  margin: 0 0 8px;
  color: #444;
}

.permit-code-box {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #f0ebe0;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}

.permit-code-box code {
  flex: 1;
  font-family: monospace;
  font-size: 0.75rem;
  word-break: break-all;
  color: #3d2a1a;
}

#permit-copy-btn {
  padding: 6px 12px;
  background: #5c3b1a;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  white-space: nowrap;
}
#permit-copy-btn:hover { background: #7a4f2a; }

#permit-copy-msg {
  font-size: 0.8rem;
  color: #2a7a4f;
  text-align: center;
}

/* QRコード */
#permit-qr-container {
  text-align: center;
  margin: 16px 0;
}

#permit-qr-canvas {
  border: 1px solid #e0d5c5;
  border-radius: 8px;
}

.permit-qr-label {
  font-size: 0.8rem;
  color: #888;
  margin: 4px 0 0;
}

/* サマリー */
.permit-summary {
  background: #fff9f0;
  border: 1px solid #f0d5a0;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 12px 0;
}

#permit-summary-text {
  font-size: 0.85rem;
  color: #7a4f2a;
  margin: 0;
  line-height: 1.6;
}

/* 再発行ボタン */
#permit-reissue-btn {
  width: 100%;
  padding: 12px;
  background: #f5f0e8;
  color: #5c3b1a;
  border: 1px solid #e0d5c5;
  border-radius: 10px;
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 8px;
}
#permit-reissue-btn:hover { background: #ede3d0; }

/* ════════════════════════════════════
   マンゴー商品カード（product-card）
   — shop.jsの_renderShopItemsで生成
   ════════════════════════════════════ */

/* 発送注意書きバナー */
#shop-shipping-notice {
  background: rgba(255, 200, 0, 0.2);
  border-bottom: 1px solid rgba(255, 160, 40, 0.18);
  color: #ff6600;
  font-size: 12px;
  padding: 8px 20px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1.5;
}

.shop-category-header {
  grid-column: 1 / -1;
  color: #ffcc66;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 4px 2px;
  border-bottom: 1px solid rgba(255,200,80,0.2);
  margin-top: 6px;
}
.shop-category-header:first-child { margin-top: 0; }

.product-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, background 0.2s;
  padding: 14px;
}
.product-card:hover {
  border-color: rgba(255,180,60,0.45);
  background: rgba(255,140,20,0.06);
}
.product-card.out-of-stock { opacity: 0.5; }

/* グレード・バッジ */
.product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
  display: none;
}
.badge-grade {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}
.grade-tokua {
  background: linear-gradient(135deg, #db9d00, #c08506);
  color: #fff;
}
.grade-a {
  background: linear-gradient(135deg, #a3a095, #7c7973);
  /*border: 1px solid rgba(80, 160, 230, 0.45);*/
  color: #fff;
}
.grade-b {
  background: linear-gradient(135deg, #bb620e, #945328);
  /*border: 1px solid rgba(60, 180, 120, 0.4);*/
  color: #fff;
}
.badge-tag {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,1.0);
  color: #636e72;
}

/* 画像ラップ（バッジオーバーレイ用） */
.product-icon-wrap { position: relative; }
.badge-grade-overlay {
  position: absolute;
  top: -10px;
  left: -10px;
  z-index: 2;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  /*box-shadow: 0 2px 8px rgba(0,0,0,0.45);*/
  letter-spacing: 0.05em;
}

/* 絵文字アイコン */
.product-icon-area {
  font-size: 52px;
  text-align: center;
  padding: 4px 0 8px;
  line-height: 1;
}

/* 重量ラベル（目立つ） */
.product-weight-label {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

/* 商品情報 */
.product-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-name {
  color: #a57220;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.4;
}
.product-desc {
  color: #333;
  font-size: 11px;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 8px;
}
.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-bottom: 10px;
}
.product-meta span {
  font-size: 10px;
  color: #333;
}
.product-meta span:nth-child(1) {
  display: none;
}
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.product-buy-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.product-qty-select {
  /*background: rgba(0,0,0,0.4);*/
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 7px;
  color: #636e72;
  font-size: 12px;
  padding: 6px 4px;
  width: 44px;
  text-align: center;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}
.product-qty-select:hover { /*border-color: rgba(255,200,60,0.6);*/ }
.product-qty-select:focus { /*border-color: rgba(255,200,60,0.7);*/ }
.product-qty-select option { /*background: #1a0e05; color: #ffcc66;*/ }
.product-price {
  color: #cc0000;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}
.price-unit {
  font-size: 10px;
  color: #cc0000;
  font-weight: 400;
}
.product-buy-btn {
  background: rgba(255,120,10,0.8);
  border: 1px solid rgba(255,160,40,0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.product-buy-btn:hover:not(:disabled) {
  background: rgba(255,120,8,1.0);
  color: #fff;
  border-color: rgba(255,200,60,0.7);
}
.product-buy-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─────────────────────────────────────────────
   生産者紹介ボタン・モーダル
   ───────────────────────────────────────────── */

#producer-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 50;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,200,80,0.25);
  border-radius: 24px;
  color: rgba(255,220,130,0.8);
  font-size: 12px;
  font-weight: 600;
  padding: 9px 18px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
#producer-btn:hover {
  border-color: rgba(255,200,80,0.55);
  color: #ffcc66;
  background: rgba(0,0,0,0.8);
}

/* 配送情報フォームモーダル */
#delivery-form-modal {
  position: fixed;
  inset: 0;
  /*background: rgba(0,0,0,0.75);*/
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#delivery-form-modal.open { opacity: 1; pointer-events: all; }
#delivery-form-window {
  background: rgba(252, 251, 242, 0.95);
  border: 1px solid rgba(200,150,50,0.3);
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
#delivery-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  font-size: 18px;
  font-weight: 700;
  color: #333;
  position: sticky;
  top: 0;
  background: rgba(252, 251, 242, 0.95);
}
#delivery-form-header button {
  background: none;
  border: none;
  color: rgba(0,0,0,1.0);
  font-size: 18px;
  cursor: pointer;
}
#delivery-form-body { padding: 20px; background:rgba(252, 251, 242, 0.95); height: 75vh; overflow-y: auto; }
#delivery-form-body::-webkit-scrollbar { width: 4px; }
#delivery-form-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 2px; }

.df-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #ff7500;
  letter-spacing: 0.05em;
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}
.df-section-title:first-child { margin-top: 0; }
.df-row { margin-bottom: 12px; }
.df-label {
  display: block;
  font-size: 12px;
  color: #333;
  margin-bottom: 4px;
}
.df-required { color: #ff6b6b; font-size: 10px; margin-left: 4px; }
.df-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255,255,255,1.0);
  border: 1px solid rgba(0,0,0,0.3);
  border-radius: 8px;
  color: #333;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.df-input:focus { border-color: rgba(255,200,100,0.6); }
.df-input::placeholder { color: rgba(255,255,255,0.22); }
.df-same-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #333;
  margin: 18px 0;
  cursor: pointer;
}
.df-same-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #ffd080;
}
#df-save-row { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; gap: 8px; }
.df-save-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #333; cursor: pointer; }
.df-save-label input[type=checkbox] { accent-color: #e6a020; width: 14px; height: 14px; cursor: pointer; }
.df-clear-link { font-size: 11px; color: rgba(255,255,255,0.3); text-decoration: underline; white-space: nowrap; }
.df-clear-link:hover { color: rgba(255,255,255,0.6); }

.df-proceed-btn {
  width: 100%;
  padding: 14px;
  margin-top: 20px;
  background: rgba(255, 120, 10, 0.8);
  border: 1px solid rgba(255, 160, 40, 0.85);
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}
.df-proceed-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.df-proceed-btn:not(:disabled):hover { opacity: 0.9; }

#producer-modal {
  position: fixed;
  inset: 0;
  /*background: rgba(0,0,0,0.72);*/
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  z-index: 200;
}
#producer-modal.open { display: flex; }

#producer-window {
  background: rgba(252, 251, 242, 0.95);
  /*border: 1.5px solid rgba(100,200,80,0.3);*/
  border-radius: 14px;
  width: min(92vw, 520px);
  max-height: 82vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,0.85);
  animation: modalIn 0.25s ease;
}

#producer-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.prod-icon { font-size: 28px; }
#producer-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #000;
  margin: 0 0 2px;
}
.prod-header-sub {
  font-size: 11px;
  color: #000;
}
#producer-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(0,0,0,1.0);
  font-size: 22px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s;
}
#producer-close:hover { color: rgba(0,0,0,0.8); /*background: rgba(255,255,255,0.1);*/ }

#producer-body {
  overflow-y: auto;
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
#producer-body::-webkit-scrollbar { width: 5px; }
#producer-body::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.2); border-radius: 2px; }

/* プロフィール */
.prod-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,1.0);
  border-radius: 10px;
  padding: 16px;
}
.prod-logo-placeholder {
  width: 70px;
  /*font-size: 56px;*/
  line-height: 1;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
}
.prod-farm-name {
  font-size: 16px;
  font-weight: 700;
  color: #000;
  margin-bottom: 4px;
}
.prod-owner {
  font-size: 14px;
  color: #000;
  margin-bottom: 6px;
}
.prod-location {
  font-size: 12px;
  color: #000;
}

/* セクション */
.prod-section { display: flex; flex-direction: column; gap: 10px; }
.prod-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #000;
  border-bottom: 1px solid rgba(0,0,0,0.2);
  padding-bottom: 6px;
}
.prod-section video {
  width: 100%;
  aspect-ratio: 16/9;
}
.prod-text {
  font-size: 13px;
  color: #000;
  line-height: 1.8;
  margin: 0;
}

/* 品種リスト */
.prod-variety-list { display: flex; flex-direction: column; gap: 10px; }
.prod-variety-item {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.0);
  border-radius: 8px;
  padding: 10px 14px;
}
.pvi-name {
  font-size: 14px;
  font-weight: 700;
  color: #ff3300;
  margin-bottom: 4px;
}
.pvi-desc {
  font-size: 12px;
  color: rgba(0,0,0,1.0);
  line-height: 1.6;
}

/* ─────────────────────────────────────────────
   引換証 QRコードエリア
   ───────────────────────────────────────────── */

#receipt-qr-area {
  border-top: 1px solid rgba(255, 180, 60, 0.2);
  padding-top: 16px;
  animation: receiptFadeIn 0.4s ease;
}

#receipt-qr-code {
  display: inline-block;
  padding: 12px;
  background: #fff8f0;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

#receipt-qr-code img {
  display: block;
}

@keyframes receiptFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────
   ギフト設定UI
   ───────────────────────────────────────────── */

.gift-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  cursor: pointer;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 4px;
}
.gift-toggle-label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.gift-checkbox { display: none; }
.gift-toggle-slider {
  width: 44px;
  height: 24px;
  background: rgba(0,0,0,0.15);
  border-radius: 12px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.gift-toggle-slider::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
}
.gift-checkbox:checked + .gift-toggle-slider {
  background: rgba(255, 160, 40, 1.0);
}
.gift-checkbox:checked + .gift-toggle-slider::after {
  transform: translateX(20px);
}

#gift-form {
  animation: slideDown 0.2s ease;
  border: 1px solid rgba(255, 180, 60, 0.2);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  background: rgba(255, 140, 20, 0.05);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gift-field { margin-bottom: 14px; }
.gift-field:last-child { margin-bottom: 0; }

.gift-field-label {
  font-size: 12px;
  font-weight: 600;
  color: #ff7500;
  display: block;
  margin-bottom: 6px;
}

.gift-radio-group {
  display: flex;
  gap: 16px;
}
.gift-radio {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
}

.gift-input {
  width: 100%;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 7px;
  color: #333;
  font-size: 13px;
  line-height: 1.5;
  padding: 8px 10px;
  outline: none;
  resize: none;
  box-sizing: border-box;
}
.gift-input:focus {
  border-color: rgba(255, 180, 60, 0.5);
}
/*
.gift-input option {
  background: #2c1a08;
  color: #a57220;
}
*/

/* ════════════════════════════════════════
   グローバルナビゲーション（右上）
════════════════════════════════════════ */
#global-nav {
  position: fixed;
  top: 20px;
  right: 116px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
#global-nav-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
  color: rgba(255,255,255,0.85);
}
#global-nav-toggle:hover { background: rgba(0,0,0,0.2); transform: scale(1.08); }

#global-nav-panel {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 8px;
  min-width: 160px;
}
#global-nav-panel.open { display: flex; }

.gnav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 7px;
  transition: background 0.15s, color 0.15s;
  text-align: left;
  width: 100%;
  text-decoration: none;
  font-family: inherit;
}
.gnav-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.gnav-mail { color: rgba(255,220,120,0.8); }
.gnav-mail:hover { color: #f5d78a; }

/* ════════════════════════════════════════
   お問い合わせフォームモーダル
════════════════════════════════════════ */
#contact-form-modal {
  position: fixed;
  inset: 0;
  /*background: rgba(0,0,0,0.72);*/
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  z-index: 150;
  padding: 16px;
}
#contact-form-modal.open { display: flex; }

#contact-form-window {
  background: rgba(252, 251, 242, 0.95);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 88vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: mdSlideIn 0.25s ease;
  color: #2d3436;
}

#cf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  font-size: 18px;
  font-weight: 700;
  color: #2d3436;
  position: sticky;
  top: 0;
  background: rgba(252, 251, 242, 0.95);
  border-radius: 16px 16px 0 0;
}
#cf-close-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: rgba(0, 0, 0, 1.0);
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
#cf-close-btn:hover { color: rgba(0, 0, 0, 0.8);/*background: #f5f5f5; color: #636e72;*/ }

#cf-body { padding: 20px; background: rgba(252, 251, 242, 0.95); height: 75vh; overflow-y: auto; }
#cf-body::-webkit-scrollbar { width: 5px; }
#cf-body::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.2);}

#cf-lead {
  font-size: 14px;
  color: #333;
  line-height: 1.7;
  margin-bottom: 20px;
}

.cf-row { margin-bottom: 14px; }
.cf-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #333;
  margin-bottom: 5px;
}
.cf-required {
  color: #e74c3c;
  font-size: 11px;
  margin-left: 4px;
}
.cf-input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #dfe6e9;
  border-radius: 8px;
  font-size: 14px;
  color: #2d3436;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
  box-sizing: border-box;
}
.cf-input:focus { border-color: #f9a825; }
.cf-select { cursor: pointer; background: #fff; }
.cf-textarea { resize: vertical; min-height: 100px; }
.cf-count {
  font-size: 11px;
  color: #b2bec3;
  text-align: right;
  margin-top: 4px;
}
.cf-error {
  color: #e74c3c;
  font-size: 13px;
  margin-bottom: 10px;
  min-height: 18px;
}
.cf-send-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #f9a825, #e65100);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  font-family: inherit;
}
.cf-send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.cf-send-btn:not(:disabled):hover { opacity: 0.9; transform: translateY(-1px); }

.cf-success-icon  { font-size: 48px; text-align: center; margin-bottom: 12px; }
.cf-success-title { font-size: 20px; font-weight: 800; text-align: center; color: #27ae60; margin-bottom: 12px; }
.cf-success-text  { font-size: 14px; line-height: 1.8; color: #636e72; text-align: center; margin-bottom: 24px; }

/* ════════════════════════════════════════
   このお店についてモーダル
════════════════════════════════════════ */
#about-modal {
  position: fixed;
  inset: 0;
  /*background: rgba(0,0,0,0.72);*/
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  z-index: 150;
  padding: 16px;
}
#about-modal.open { display: flex; }

#about-window {
  background: rgba(252, 251, 242, 0.95);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  /*overflow-y: auto;*/
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: mdSlideIn 0.25s ease;
  color: #2d3436;
}

#about-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  font-size: 18px;
  font-weight: 700;
  color: #2d3436;
  position: sticky;
  top: 0;
  background: rgba(252, 251, 242, 0.95);
  border-radius: 16px 16px 0 0;
}
#about-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: rgba(0,0,0,1.0);
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
#about-close:hover { color: rgba(0,0,0,0.8); /*background: #f5f5f5;*/ }

#about-body { padding: 16px 20px 24px; overflow-y: auto; height: 75vh; background: rgba(252, 251, 242, 0.95); }

#about-body::-webkit-scrollbar { width: 5px; }
#about-body::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.2); border-radius: 2px; }

.about-section {
  border-bottom: 1px solid #f0f0f0;
  padding: 16px 0;
}
.about-section:last-child { border-bottom: none; }
.about-section figure {
  margin-bottom: 16px;
}

.about-h3 {
  font-size: 16px;
  font-weight: 700;
  color: #e65100;
  margin: 0 0 8px;
}

.about-p {
  font-size: 14px;
  line-height: 1.8;
  color: #333;
  margin: 0;
}

/* ════════════════════════════════════════
   FAQモーダル
════════════════════════════════════════ */
#faq-modal {
  position: fixed;
  inset: 0;
  /*background: rgba(0,0,0,0.72);*/
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  z-index: 150;
  padding: 16px;
}
#faq-modal.open { display: flex; }

#faq-window {
  background: rgba(252, 251, 242, 0.95);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: mdSlideIn 0.25s ease;
  color: #2d3436;
}

#faq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  font-size: 18px;
  font-weight: 700;
  color: #333;
  position: sticky;
  top: 0;
  background: rgba(252, 251, 242, 0.95);
  border-radius: 16px 16px 0 0;
}
#faq-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: rgba(0, 0, 0, 1.0);
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
#faq-close:hover { color: rgba(0, 0, 0, 0.8);/*background: #f5f5f5; color: #636e72;*/ }

#faq-body { padding: 16px 20px 20px; background: rgba(252, 251, 242, 0.95); height: 75vh; overflow-y: auto; }

#faq-body::-webkit-scrollbar { width: 5px; }
#faq-body::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.2); border-radius: 2px; }

.faq-item {
  border-bottom: 1px solid #f0f0f0;
  padding: 1.5em 0;
}
.faq-item:last-of-type { border-bottom: none; }

.faq-q {
  font-size: 14px;
  font-weight: 700;
  color: #e65100;
  margin-bottom: 6px;
}
.faq-q::before { content: 'Q. '; }

.faq-a {
  font-size: 14px;
  line-height: 1.7;
  color: #333;
}
.faq-a::before { content: 'A. '; font-weight: 700; color: #2d3436; }

.faq-contact {
  margin: 16px 0;
  padding: 12px 16px;
  background: #fff8e1;
  border-radius: 8px;
  font-size: 13px;
  color: #333;
  text-align: center;
}
.faq-contact a { color: #e65100; font-weight: 700; text-decoration: none; }
.faq-contact a:hover { text-decoration: underline; }
#faq-contact-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #f9a825, #e65100);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.5px;
}
#faq-contact-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ════════════════════════════════════════
   マンゴーポップアップホットスポット
════════════════════════════════════════ */
.mango-popup-hotspot {
  position: fixed;
  pointer-events: auto;
  cursor: pointer;
  z-index: 12;
  transform-origin: center bottom;
  transition: opacity 0.4s ease;
}
.mango-popup-hotspot img {
  display: block;
  max-width: 200px;
  width: 200px;
  height: auto;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.5));
  transition: filter 0.2s ease;
  border-radius: 8px;
  animation: mangoBob 3s ease-in-out infinite;
}
.mango-popup-hotspot:hover img {
  filter: drop-shadow(0 8px 24px rgba(249,168,37,0.6));
}
@keyframes mangoBob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* ════════════════════════════════════════
   マンゴー詳細モーダル
════════════════════════════════════════ */
#mango-detail-modal {
  position: fixed;
  inset: 0;
  /*background: rgba(252, 251, 242, 0.95);*/
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  z-index: 150;
  padding: 16px;
}
#mango-detail-modal.open { display: flex; }

#mango-detail-window {
  /*background: rgba(252, 251, 242, 0.95);*/
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: mdSlideIn 0.25s ease;
  color: #2d3436;
}
@keyframes mdSlideIn {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

#mango-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  background: rgba(252, 251, 242, 0.95);
  border-radius: 16px 16px 0 0;
}
#mango-detail-title {
  font-size: 18px;
  font-weight: 800;
  color: #333;
}
#mango-detail-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: rgba(0,0,0,1.0);
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
#mango-detail-close:hover { color: rgba(0,0,0,0.8);/*background: #f5f5f5; color: #636e72;*/ }

#mango-detail-body { background: rgba(252, 251, 242, 0.95); height: 75vh; overflow-y: auto; padding: 20px; }

#mango-detail-body::-webkit-scrollbar { width: 5px; }
#mango-detail-body::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.2); border-radius: 2px; }

#mango-detail-tagline {
  font-size: 16px;
  color: #e65100;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}
#mango-detail-desc {
  font-size: 14px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 20px;
}

.mango-detail-section {
  margin-bottom: 20px;
}
.mango-detail-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #2d3436;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f0f0f0;
}
#mango-detail-thumb {
  margin-bottom: 20px;
}
#mango-detail-thumb img {
  display: block;
}
.mango-detail-section p {
  font-size: 13px;
  line-height: 1.7;
  color: #333;
  margin: 0;
}

/* 価格表 */
.mango-price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.mango-price-table th {
  background: #fff8e1;
  padding: 8px 10px;
  text-align: center;
  font-weight: 700;
  color: #5d4037;
  border: 1px solid #ffe082;
}
.mango-price-table td {
  padding: 8px 10px;
  text-align: center;
  border: 1px solid #f0f0f0;
  color: #2d3436;
}
.mango-price-table tbody td:not(.grade-tokua, .grade-a, .grade-b) {
  background-color: #fff;
}
.mango-price-table .grade-cell {
  font-weight: 700;
  text-align: left;
}
.mango-price-table .grade-tokua { color: #fff; }
.mango-price-table .grade-a     { color: #fff; }
.mango-price-table .grade-b     { color: #fff; }
.price-tbd { color: #b2bec3; font-size: 12px; }

.mango-detail-note {
  font-size: 12px;
  color: #333;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

#mango-detail-cart-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #f9a825, #e65100);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: 0.5px;
}
#mango-detail-cart-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ════════════════════════════════════════
   購入履歴モーダル
════════════════════════════════════════ */
#history-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  /*background: rgba(0,0,0,0.7);*/
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  padding: 40px 16px;
}
#history-modal.open { display: flex; }
#history-modal-window {
  background: rgba(252, 251, 242, 0.95);
  /*border: 1px solid rgba(244,164,41,0.3);*/
  border-radius: 16px;
  width: 100%; max-width: 560px;
  overflow: hidden;
}
#history-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(252, 251, 242, 0.95);
  border-bottom: 1px solid rgba(0,0,0,0.1);
  font-size: 18px; font-weight: 700; color: #333;
}
#history-modal-close {
  background: none; border: none; color: rgba(0,0,0,1.0);
  font-size: 18px; cursor: pointer; padding: 4px 8px;
}
#history-modal-close:hover { color: rgba(0,0,0,0.8) }
#history-modal-body { padding: 20px; background: rgba(252, 251, 242, 0.95); }

.hist-loading, .hist-empty, .hist-error {
  text-align: center; padding: 40px 20px;
  color: rgba(255,255,255,0.5); font-size: 14px;
}
.hist-error { color: #f87; }
.hist-wallet-label {
  font-size: 11px; color: #333;
  margin-bottom: 16px; font-family: monospace;
}
.hist-connect { text-align: center; padding: 30px 20px; }
.hist-connect p { color: #333; font-size: 14px; margin-bottom: 20px; }
.hist-connect-btn {
  background: rgba(244,164,41,1.0); border: 1px solid rgba(244,164,41,1.0);
  color: #fff; border-radius: 50px; padding: 12px 24px;
  font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  margin: 6px auto; width: 100%; max-width: 260px; justify-content: center;
}
.hist-connect-btn:hover { background: rgba(244,164,41,0.8); }
.hist-connect-btn--wc {
  background: rgba(59,153,252,1.0); border-color: rgba(59,153,252,1.0); color: #fff;
}
.hist-connect-btn--wc:hover { background: rgba(59,153,252,0.8); }

.hist-order {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 12px; padding: 16px;
  margin-bottom: 14px;
}
.hist-order-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.hist-order-id { font-size: 12px; font-family: monospace; color: #333; }
.hist-status { font-size: 12px; font-weight: 600; }

.hist-items { margin: 10px 0; }
.hist-item-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 4px 0; gap: 8px;
}
.hist-item-name { font-size: 13px; color: #333; flex: 1; }
.hist-item-price { font-size: 12px; color: #333; white-space: nowrap; }

.hist-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 4px 0; gap: 8px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 12px;
}
.hist-label { color: #999; white-space: nowrap; }
.hist-value { color: #333; text-align: right; word-break: break-all; }
.hist-total-row { margin-top: 6px; }
.hist-total-val { color: #cc0000; font-weight: 700; font-size: 14px; }
.hist-tx-link { color: #7bb3ff; text-decoration: none; }
.hist-tx-link:hover { text-decoration: underline; }

/* ════════════════════════════════════════
   リンク・動画ホットスポット（観光協会・ガイドブック・PV）
════════════════════════════════════════ */
.link-hotspot {
  position: fixed;
  pointer-events: auto;
  cursor: pointer;
  z-index: 12;
  transform-origin: center center;
  transition: opacity 0.4s ease;
}

.lhs-card {
  background: rgba(255,255,255,0.92);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-width: 220px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: lhsBob 3.5s ease-in-out infinite;
}
.link-hotspot:hover .lhs-card {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 14px 36px rgba(0,0,0,0.55);
}
@keyframes lhsBob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-7px); }
}

.lhs-img {
  display: block;
  width: 220px;
  height: 140px;
  object-fit: cover;
  flex-shrink: 0;
}

.lhs-label {
  font-size: 11px;
  font-weight: 700;
  color: #333;
  background: rgba(255,255,255,0.95);
  padding: 7px 10px;
  text-align: center;
  line-height: 1.4;
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* 動画カード */
.lhs-video-card { max-width: 260px; }

.lhs-video-wrap {
  position: relative;
  width: 260px;
  height: 146px;
  background: #000;
  flex-shrink: 0;
}

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

.lhs-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.38);
  transition: opacity 0.25s ease;
}

.lhs-play-icon {
  font-size: 36px;
  color: rgba(255,255,255,0.9);
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  transition: transform 0.15s ease;
}
.link-hotspot:hover .lhs-play-icon {
  transform: scale(1.15);
}

/* 動画が未配置のときのプレースホルダー */
.lhs-placeholder {
  width: 260px;
  height: 146px;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
}
.lhs-placeholder-icon { font-size: 36px; }
.lhs-placeholder-text {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
}

/* ════════════════════════════════════════
   サイトフッター
════════════════════════════════════════ */
#site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255,255,255,0.07);
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  gap: 12px;
  pointer-events: auto;
}

#footer-left {
  white-space: nowrap;
  flex-shrink: 0;
}
#footer-left a {
  color: rgba(255,200,80,0.6);
  text-decoration: none;
  transition: color 0.15s;
}
#footer-left a:hover { color: rgba(255,200,80,0.9); }

#footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.footer-link {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.45);
  font-size: 11px;
  padding: 0;
  transition: color 0.15s;
  white-space: nowrap;
}
.footer-link:hover { color: rgba(255,255,255,0.85); }
.footer-sep { color: rgba(255,255,255,0.2); }

/* ════════════════════════════════════════
   法的情報モーダル（特商法・プライバシーポリシー）
════════════════════════════════════════ */
#legal-tokusho-modal,
#legal-privacy-modal {
  position: fixed;
  inset: 0;
  /*background: rgba(0,0,0,0.72);*/
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  z-index: 160;
  padding: 16px;
}
#legal-tokusho-modal.open,
#legal-privacy-modal.open { display: flex; }

.legal-window {
  background: rgba(252, 251, 242, 0.95);
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  animation: mdSlideIn 0.22s ease;
  color: #2d3436;
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 13px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  background: rgba(252, 251, 242, 0.95);
  border-radius: 14px 14px 0 0;
}
.legal-title {
  font-size: 18px;
  font-weight: 700;
  color: #2d3436;
}
.legal-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: rgba(0,0,0,1.0);
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.legal-close:hover { color: rgba(0,0,0,0.8);/*background: #f5f5f5; color: #636e72;*/ }

.legal-body {
  overflow-y: auto;
  height: 75vh;
  padding: 20px;
  background-color: rgba(252, 251, 242, 0.95);
}
.legal-body::-webkit-scrollbar { width: 5px; }
.legal-body::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.2); border-radius: 2px; }

/* 特商法テーブル */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 40px;
}
.legal-table th {
  width: 36%;
  padding: 10px 12px;
  background: rgba(0,0,0,0.05);
  border: 1px solid #e0e0e0;
  font-weight: 700;
  color: #555;
  vertical-align: top;
  text-align: left;
}
.legal-table td {
  padding: 10px 12px;
  background: rgba(255,255,255,0.8);
  border: 1px solid #e0e0e0;
  color: #444;
  line-height: 1.6;
  vertical-align: top;
}

/* プライバシーポリシー */
.legal-intro {
  font-size: 12px;
  color: #333;
  line-height: 1.7;
  margin-bottom: 2em;
}
.legal-outro {
  font-size: 12px;
  color: #333;
  line-height: 1.7;
  text-align: right;
  margin-top: 2em;
  margin-bottom: 2em;
}
.legal-h3 {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin: 2em 0 6px;
}
.legal-p {
  font-size: 12px;
  color: #333;
  line-height: 1.7;
  margin: 0;
}

/* WASDコントローラー */
#wasd-controller {
  position: fixed;
  right: 20px;
  bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 100;
  user-select: none;
  pointer-events: auto;
}
.wasd-row { display: flex; gap: 6px; }
.wasd-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  border: 2px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.1s, border-color 0.1s;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.wasd-btn:hover    { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.45); }
.wasd-btn.pressed,
.wasd-btn:active   { background: rgba(255,255,255,0.3);  border-color: rgba(255,255,255,0.7); color: #fff; transform: scale(0.93); }

/* ════════════════════════════════════════
   スマホ用ホットスポット（PCでは非表示）
   ════════════════════════════════════════ */
.ms-section { background: #0d0807; border-top: 1px solid rgba(255,200,80,0.12); }
.ms-section--video { padding: 0; }
.ms-img { width: 100%; display: block; }
.ms-video { width: 100%; display: block; }
.ms-body { padding: 16px 20px 24px; }
.ms-title { font-size: 16px; font-weight: 700; color: #ffcc66; margin-bottom: 8px; }
.ms-desc { font-size: 14px; color: rgba(255,255,255,0.75); line-height: 1.7; }
.ms-banner { display: block; border-top: 1px solid rgba(255,200,80,0.12); }

/* ═══════════════════════════════════════════
   レスポンシブ：スマホ（〜768px）
   PC（769px〜）はデフォルトスタイルがそのまま適用
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  body { overflow-y: auto; }

  /* 汎用クラス */
  .pc-only { display: none; }
  .sp-only { display: block; }
  
  /* ローダー */
  #loader { background-image: url(/assets/images/mango-bg.png); background-size: cover; background-position: center; }
  #loader-content { width: 90%; padding-top: 0vw; }
  #loader-logo {
    display: none;
    top: 5px;
    left: calc((100% - 120px) / 2);
    width: 120px;
  }
  #loader-jpyc { width: 90vw; }
  #loader-catchcopy { display: none; }
  /*#loader-btns p {  }*/
  #loader-btns ul { margin-bottom: 16px; }
  #loader-btns ul li { width: calc(50% - 1.25vw); }
  #loader-btns ul li:nth-child(n+2) { display: block; }
  #loader-btns ul li button { display: block; width: 100%; padding: 10px; font-size: 12px; text-align: center; }
  #loader-btns p { font-size: 9pt; }

  /* ロゴ */
  #main-logo {
    top: 5px;
    left: calc((100% - 120px) / 2);
    width: 120px;
  }

  /* ── 3D専用UI → スマホでは非表示 ── */
  #hud         { display: none !important; } /* WASD操作説明 */
  #top-right-controls { right: inherit; left: 65px; top: 12px; } /* 照明切替・BGMボタン */
  #top-right-controls #lighting-ui { display: none !important; }
  #monitor-slide { display: none !important; } /* 3D投影モニター */

  /* ── ショップモーダル ── */
  #shop-modal { inset: inherit; }
  #shop-window {
    max-height: inherit;
    width: 100vw;
    border-radius: 0;
  }
  #shop-tabs {
    flex-wrap: inherit;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
  }
  #shop-shipping-notice {
    border-bottom: none;
  }
  .shop-tab {
    width: 49%;
    font-size: 16px;
    padding: 8px 10px 9px;
  }
  #shop-items {
    grid-template-columns: 1fr; /* スマホは1カラム */
    height: calc(100vh - 170px);
    padding: 12px;
    gap: 10px;
    background: rgba(0, 0, 0, 0.05);
  }
  #shop-items::-webkit-scrollbar { width: 5px; }
  #shop-items::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.2); border-radius: 2px; }

  /* ── 商品カード → 縦並び ── */
  .product-card {
    /*flex-direction: column;*/
    flex-direction: inherit;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.5);
  }
  .product-icon-wrap {
    width: 45%;
  }
  .product-text-wrap {
    width: 50%;
    text-align: left;
  }
  .product-img-wrap {
    width: 100%;
    aspect-ratio: 3 / 2;
  }
  .product-img {
    width: 100%;
    height: 100%;
  }
  /* 重量ラベル（目立つ） */
  .product-weight-label {
    font-size: 14px;
    letter-spacing: -0.05em;
  }
  .product-footer {
    display: block;
  }
  .product-price {
    /*text-align: right;*/
    margin-bottom: 1em;
  }
  .product-buy-btn {
    width: calc(100% - 40px);
  }

  /* ── RPGダイアログ ── */
  #rpg-dialog {
    bottom: inherit;
    top: 15dvh;
  }
  #rpg-window {
    width: 95vw;
  }
  #rpg-char-icon {
    font-size: 16px;
  }
  #rpg-char-name {
    font-size: 14px;
  }
  #rpg-message {
    font-size: 14px;
    padding: 12px 14px 8px;
  }
  .rpg-choice {
    font-size: 14px;
    padding: 10px 12px;
  }

  /* ── カートUI ── */
  #cart-ui {
    left: 12px;
    right: 12px;
    bottom: 40px;
  }
  #cart-ui-button-wrapper{
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
  }
  #wallet-widget {
    width: calc(50% - 6px);
    margin-bottom: 0px;
  }
  #my-shop-add-btn {
    position: fixed;
    left: 12px;
    top: 12px;
    width: 44px !important;
    height: 44px !important;
    margin: 0px !important;
    padding: 0px 0px !important;
    white-space: inherit !important;
  }
  #my-shop-add-btn span {
    display: none;
  }
  #cart-toggle {
    gap: 8px;
    width: calc(50% - 6px);
    /*width: 48px;*/
    backdrop-filter: blur(8px);
    border-radius: 24px;
    padding: 9px 0 9px 18px;
    white-space: nowrap;
  }
  #cart-panel {
    min-width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    left: 0;
    bottom: 56px;
  }

  /* 配送情報フォームモーダル */
  #delivery-form-modal { inset: inherit; width: 100%; }
  #delivery-form-window { width: 100vw; height: 100vh; max-height: inherit; border-radius: 0px;}
  /*#delivery-form-header {  }*/
  #delivery-form-body {  height: 90vh; }
  #delivery-form-body::-webkit-scrollbar { width: 5px; }
  #delivery-form-body::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.2); border-radius: 2px; }
  .df-proceed-btn { margin-bottom: 10vh;}

  /* ── 支払いモーダル ── */
  #payment-window {
    width: 96vw;
    max-height: 92vh;
    overflow-y: auto;
  }
  .pay-success-sub { font-size: 12px; }

  /* ── ライトボックス ── */
  #lightbox-inner {
    max-width: 95vw;
  }

  /* ── ビビホットスポット（固定位置） ── */
  /* main.jsでinline styleを設定するのでCSSはサポートのみ */
  #vivi-hotspot .vivi-hs-label {
    font-size: 10px;
    top: 54px;
    opacity: 1;
  }

  /* グローバルナビゲーション（右上） */
  #global-nav { right: 14px; top: 12px; }
  
  /* WASDコントローラー */
  #wasd-controller {
    display: none;
  }

  /* モバイル用ホットスポット */
  #mobile-hotspot {
    position: fixed;
    top: 25vw;
    left: 2.5vw;
    width: 95vw;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex !important;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
  }
  #mobile-hotspot > .ms-detail-btn {
    width: calc(50% - 1.25vw);
    padding: 0;
    border: none;
    cursor: pointer;
    /*
    background-color: rgba(0,0,0,0.8);
    color: #fff;
    width: 15em;
    text-align: left;
    margin: 0;
    border-color: rgba(255,255,255,0.2);
    border-radius: 0 10px 10px 0;
    border-left: none;
    */
  }

  /* このお店についてモーダル */
  #about-modal { inset: inherit; padding: 0px; }
  #about-window { border-radius: 0; padding-bottom: 100px; height: 100vh; max-height: inherit; }
  #about-header { border-radius: 0; }
  #about-body {  height: 90vh; }

  /* 生産者紹介モーダル */
  #producer-modal { inset: inherit; width: 100%; padding: 0px; }
  #producer-window { border-radius: 0; width: 100%; height: 100vh; max-height: inherit; }
  #producer-header { border-radius: 0; }
  #producer-body { height: 90vh; padding-bottom: 100px; }

  /* マンゴー詳細モーダル */
  #mango-detail-modal { inset: inherit; padding: 0px; }
  #mango-detail-window { border-radius: 0; padding-bottom: 100px; height: 100vh; max-height: inherit; }
  #mango-detail-header { border-radius: 0; }
  #mango-detail-body { height: 90vh; padding-bottom: 40px; }

  /* お問い合わせフォームモーダル */
  #contact-form-modal { inset: inherit; width: 100%; padding: 0; }
  #contact-form-window { height: 100vh; max-height: 100vh; border-radius: 0; max-height: inherit; }
  #cf-header { border-radius: 0; }
  #cf-body { height: calc(100vh - 68px); }
  #faq-contact-btn { margin-bottom: 10vh; }

  /* FAQモーダル */
  #faq-modal { inset: inherit; padding: 0; }
  #faq-window { height: 100vh; max-height: 100vh; border-radius: 0; max-height: inherit; }
  #faq-header { border-radius: 0; }
  #faq-body { height: 90vh; }
  .cf-send-btn {
    margin-bottom: 10vh;
  }

  #legal-tokusho-modal,
  #legal-privacy-modal { inset: inherit; padding: 0; }
  .legal-window { height: 100vh; max-height: 100vh; border-radius: 0; max-height: inherit; }
  .legal-header { border-radius: 0; }
  .legal-body { height: 90vh; padding-bottom: 10vh; }

  /* サイトフッター */
  #site-footer { font-size: 10px; padding: 5px 12px; }
  /*#footer-left {  }
  #footer-right {  }*/
  .footer-link { font-size: 10px; }

  /* 特商法テーブル */
  .legal-table { border-bottom: 1px solid #e0e0e0; }
  .legal-table th { display: block; width: 100%; font-size: 12px; padding: 8px 10px; border-bottom: none; }
  .legal-table td { display: block; width: 100%; font-size: 12px; padding: 8px 10px; border-bottom: none; }

  /* iOSのinputフォーカス時の自動ズームを防ぐ（16px未満でズームが発生するため） */
  .df-input,
  .gift-input,
  .cf-input,
  #rpg-input,
  .product-qty-select { font-size: 14px; }
}

/* ── メンテナンス画面 ────────────────────────────── */
#maintenance-screen {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: linear-gradient(135deg, #f97316, #ea580c);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}
#maintenance-content {
  max-width: 480px;
  padding: 32px;
}
#maintenance-logo {
  max-width: 200px;
  margin-bottom: 24px;
}
#maintenance-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}
#maintenance-open-time {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  background: rgba(255,255,255,0.15);
  border-radius: 8px;
  padding: 10px 16px;
  display: inline-block;
}
#maintenance-sub {
  font-size: 14px;
  opacity: 0.9;
  line-height: 1.6;
}