/* 熊本ラーメン スタンプラリー — モバイルファースト。赤(#B7161B)×黒マー油(#1E1E1E)×麺の黄(#F5C33B)×クリーム地 */
:root{
  --red:#B7161B; --red-dark:#8E1015; --yellow:#F5C33B; --ink:#1E1E1E; --cream:#FBF6EE; --paper:#fff;
  --muted:#7a7268; --line:#e8e0d4; --ok:#2e7d32;
  --red-deep:#5a0a0d; --yellow-dark:#c9971c;
  /* 扉絵の丼イラスト用 */
  --ill-broth:#f2d6a6; --ill-noodle:#f5dd8f; --ill-chashu:#a0522d; --ill-chashu-light:#d2884f;
  --ill-nori:#2a3a2a; --ill-negi:#6ab04c; --ill-garlic:#8b5a2b; --ill-wood:#c99a5b;
  /* スタンプの色（来店回数で昇格）: 1回=銅 / 2回=銀 / 3回=金 / 4回以上=プラチナ。-2 はハイライト側 */
  --stamp-none:#cfc8bd;
  --tier-bronze:#b06a2b;   --tier-bronze-2:#e6a96b;
  --tier-silver:#7f868f;   --tier-silver-2:#d9dee4;
  --tier-gold:#c8901a;     --tier-gold-2:#f8d978;
  --tier-platinum:#4f6f8f; --tier-platinum-2:#c9dded;
  --header-h:52px; --tab-h:60px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--cream);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Hiragino Kaku Gothic ProN","Noto Sans JP",sans-serif;-webkit-text-size-adjust:100%}
a{color:var(--red)}
button{font:inherit}
.hidden{display:none!important}
.muted{color:var(--muted)}
.small{font-size:12px}
.center{text-align:center}

/* ---- ヘッダー ---- */
#appHeader{position:fixed;top:0;left:0;right:0;height:calc(var(--header-h) + env(safe-area-inset-top));padding-top:env(safe-area-inset-top);
  background:var(--red);color:#fff;display:flex;align-items:center;gap:8px;padding-left:10px;padding-right:10px;z-index:50;box-shadow:0 2px 6px rgba(0,0,0,.18)}
#appHeader .brand{color:#fff;text-decoration:none;font-weight:700;font-size:15px;display:flex;align-items:center;gap:6px;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.brand-mark{font-size:20px}
.icon-btn{background:none;border:none;color:#fff;font-size:28px;line-height:1;padding:0 6px;cursor:pointer}
.progress-badge{background:var(--yellow);color:var(--ink);font-weight:700;font-size:13px;padding:5px 10px;border-radius:999px;text-decoration:none;white-space:nowrap}

/* ---- 本文 ---- */
#view{padding:calc(var(--header-h) + env(safe-area-inset-top) + 12px) 0 calc(var(--tab-h) + env(safe-area-inset-bottom) + 24px);max-width:680px;margin:0 auto}
.pad{padding:0 16px}
h2.sec{font-size:17px;margin:22px 16px 10px;display:flex;align-items:center;justify-content:space-between}
h2.sec small{font-weight:400;font-size:12px;color:var(--muted)}
.card{background:var(--paper);border:1px solid var(--line);border-radius:14px;padding:14px 16px;margin:0 16px 12px}

/* ---- タブ ---- */
#tabbar{position:fixed;left:0;right:0;bottom:0;height:calc(var(--tab-h) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);
  background:#fff;border-top:1px solid var(--line);display:flex;z-index:50}
#tabbar .tab{flex:1;background:none;border:none;color:var(--muted);font-size:20px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer}
#tabbar .tab span{font-size:10px}
#tabbar .tab.on{color:var(--red);font-weight:700}
/* 中央のチェックインボタン（浮き上がった赤丸の 🍜） */
#tabbar .tab.go{color:var(--red);font-weight:700}
#tabbar .tab.go .ico{width:54px;height:54px;border-radius:50%;background:var(--red);color:#fff;font-size:26px;display:flex;align-items:center;justify-content:center;margin-top:-26px;border:3px solid #fff;box-shadow:0 3px 10px rgba(0,0,0,.25)}
#tabbar .tab.go.on .ico{background:var(--red-dark)}

/* ---- チェックイン画面 ---- */
.go-status{text-align:center}
.go-status .big{font-size:40px;line-height:1;margin-bottom:6px}
.go-status h3{margin:0 0 6px;font-size:17px;line-height:1.4}
.go-status p{margin:0 0 12px;font-size:14px;line-height:1.6}
.go-status .spinner{margin-bottom:6px}
.go-status.ok{background:#fff8e1;border-color:#f4dd8c}
.shop-item.near .name{color:inherit;text-decoration:none}
.shop-item.near .dist{font-weight:800;color:var(--red);white-space:nowrap;font-size:15px}
.shop-item.near.can{border-color:var(--red);box-shadow:0 0 0 1px var(--red) inset}

/* ---- ボタン ---- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;background:var(--red);color:#fff;border:none;border-radius:12px;padding:13px 18px;font-size:16px;font-weight:700;cursor:pointer;text-decoration:none;width:100%}
.btn:disabled{opacity:.55;cursor:default}
.btn.secondary{background:#fff;color:var(--red);border:2px solid var(--red)}
.btn.ghost{background:transparent;color:var(--ink);border:1px solid var(--line)}
.btn.sm{padding:8px 12px;font-size:13px;width:auto;border-radius:10px}
.btn.yellow{background:var(--yellow);color:var(--ink)}
.btn-row{display:flex;gap:8px}

/* ---- トースト ---- */
.toast{position:fixed;left:50%;bottom:calc(var(--tab-h) + env(safe-area-inset-bottom) + 16px);transform:translateX(-50%);background:rgba(30,30,30,.94);color:#fff;padding:10px 16px;border-radius:12px;font-size:14px;max-width:88vw;z-index:100;text-align:center}

/* ---- 扉絵（起動時のカバー） ---- */
.splash{position:fixed;inset:0;z-index:300;background:radial-gradient(120% 80% at 50% 0%,var(--red) 0%,var(--red-dark) 60%,var(--red-deep) 100%);color:#fff;
  display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 24px calc(28px + env(safe-area-inset-bottom));text-align:center;overflow:hidden}
.splash::before,.splash::after{content:"";position:absolute;border:3px dashed rgba(255,255,255,.16);border-radius:50%;pointer-events:none}
.splash::before{width:320px;height:320px;left:-130px;top:-90px}
.splash::after{width:240px;height:240px;right:-100px;bottom:110px}
.splash-art{width:min(62vw,240px);position:relative;animation:bowlIn .7s cubic-bezier(.2,1.3,.4,1) both}
.splash-art svg{width:100%;height:auto;display:block;filter:drop-shadow(0 12px 18px rgba(0,0,0,.35))}
.splash-title{display:flex;flex-direction:column;line-height:1.1;margin:18px 0 12px;position:relative;animation:pop .6s .25s both}
/* 主役は「食べて応援！」。店名側は一回り小さく */
.splash-title .t1{font-size:clamp(44px,13.5vw,64px);font-weight:900;color:var(--yellow);letter-spacing:.02em;line-height:1.05;margin-bottom:10px;text-shadow:0 4px 0 rgba(0,0,0,.28)}
/* 「熊本ラーメン」「スタンプラリー」は同じ幅: 広い方（スタンプラリー）に合わせて短い方を均等割付 */
.splash-title .sub{display:inline-block;width:max-content;max-width:100%;margin:0 auto}
.splash-title .t2,.splash-title .t3{display:block;font-size:clamp(24px,7.6vw,34px);font-weight:900;letter-spacing:.04em;line-height:1.2;text-align:justify;text-align-last:justify;text-shadow:0 3px 0 rgba(0,0,0,.28)}
.splash-lead{font-size:14px;line-height:1.7;opacity:.95;margin:0 0 22px;position:relative;animation:pop .6s .4s both}
.splash-start{max-width:300px;background:var(--yellow);color:var(--ink);font-size:20px;padding:16px 24px;border-radius:999px;position:relative;
  box-shadow:0 6px 0 var(--yellow-dark),0 12px 22px rgba(0,0,0,.3);animation:pop .6s .55s both}
.splash-start:active{transform:translateY(4px);box-shadow:0 2px 0 var(--yellow-dark)}
.splash-foot{font-size:11px;opacity:.75;margin:14px 0 0;position:relative}
.splash.out{animation:splashOut .45s ease-in forwards}
.splash .steam path{animation:steam 2.4s ease-in-out infinite}
.splash .steam path:nth-child(2){animation-delay:.6s}
.splash .steam path:nth-child(3){animation-delay:1.2s}
@keyframes splashOut{to{opacity:0;transform:scale(1.04)}}
@keyframes bowlIn{0%{transform:translateY(40px) scale(.7);opacity:0}100%{transform:none;opacity:1}}
@keyframes steam{0%{opacity:0;transform:translateY(6px)}40%{opacity:.9}100%{opacity:0;transform:translateY(-14px)}}
@media (prefers-reduced-motion:reduce){.splash,.splash *{animation:none!important}}

/* ---- ヒーロー（トップ） ---- */
.hero{margin:0 16px 14px;background:linear-gradient(135deg,var(--red) 0%,var(--red-dark) 100%);color:#fff;border-radius:18px;padding:20px 18px;position:relative;overflow:hidden}
.hero::after{content:"🍜";position:absolute;right:-6px;bottom:-14px;font-size:96px;opacity:.18;transform:rotate(-12deg)}
.hero h1{margin:0 0 6px;font-size:22px;line-height:1.3}
.hero p{margin:0 0 12px;font-size:13px;opacity:.95}
.hero .stats{display:flex;gap:14px;font-size:12px;opacity:.95;margin-bottom:12px}
.hero .stats b{font-size:18px;display:block}
.hero .btn{background:var(--yellow);color:var(--ink)}

/* ---- 地図 ---- */
/* z-index:0 + isolation で Leaflet 内部の z-index(タイル400/操作UI1000)を地図の中に閉じ込め、ヘッダー・タブバーの下に収める */
.map-wrap{margin:0 16px 12px;border-radius:14px;overflow:hidden;border:1px solid var(--line);position:relative;background:#eee;z-index:0;isolation:isolate}
#map{height:320px;width:100%}
.map-wrap .locate{position:absolute;right:10px;bottom:10px;z-index:400;background:#fff;border:1px solid #ccc;border-radius:10px;padding:8px 10px;font-size:13px;cursor:pointer;box-shadow:0 1px 4px rgba(0,0,0,.2)}
.leaflet-container{font-family:inherit}
.map-popup b{display:block;font-size:14px;margin-bottom:2px}
.map-popup a{font-weight:700}

/* ---- 星 ---- */
.stars{position:relative;display:inline-block;font-size:15px;line-height:1;color:#d9d2c6;letter-spacing:1px;white-space:nowrap}
.stars>span{position:absolute;left:0;top:0;overflow:hidden;color:#f0a800;white-space:nowrap}
.score{font-weight:700;color:var(--red);font-size:16px}
.score small{font-weight:400;color:var(--muted);font-size:11px}

/* ---- 店舗リスト ---- */
.shop-item{display:flex;gap:12px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px 12px;margin:0 16px 10px;text-decoration:none;color:inherit}
.shop-item .stamp-mini{flex:0 0 58px;width:58px;height:58px}
.shop-item .body{flex:1;min-width:0}
.shop-item .name{font-weight:700;font-size:15px;margin-bottom:2px;display:flex;gap:6px;align-items:center}
.shop-item .meta{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shop-item .rank{flex:0 0 26px;font-weight:800;color:var(--red);font-size:18px;text-align:center}
.tag{display:inline-block;font-size:10px;padding:2px 6px;border-radius:6px;background:#f3ebdd;color:#6b5a3e;font-weight:600}
.tag.red{background:#fde9e9;color:var(--red)}
.tag.dark{background:var(--ink);color:#fff}
.filters{display:flex;gap:8px;margin:0 16px 12px;flex-wrap:wrap}
.filters select,.filters button{font:inherit;font-size:13px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:#fff}
.filters button.on{background:var(--ink);color:#fff;border-color:var(--ink)}

/* ---- 店舗詳細 ---- */
.shop-hero{margin:0 16px 12px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;display:flex;gap:14px;align-items:center}
.shop-hero .stamp-mini{flex:0 0 96px;width:96px;height:96px}
.shop-hero h2{margin:0 0 4px;font-size:19px}
.shop-photo{margin:0 16px 12px;border-radius:16px;overflow:hidden;background:#eee;aspect-ratio:16/9}
.shop-photo img{width:100%;height:100%;object-fit:cover;display:block}
dl.info{margin:0;display:grid;grid-template-columns:5.5em 1fr;gap:6px 10px;font-size:13px}
dl.info dt{color:var(--muted)} dl.info dd{margin:0;white-space:pre-line}
.mycount{background:#fff8e1;border:1px solid #f4dd8c;border-radius:12px;padding:10px 12px;font-size:13px;margin:0 16px 12px}
.review{display:flex;gap:10px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px;margin:0 16px 10px}
.review img{width:84px;height:84px;object-fit:cover;border-radius:10px;flex:0 0 84px;background:#eee}
.review .body{flex:1;min-width:0}
.review .who{font-size:12px;color:var(--muted);display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.review .who b{color:var(--ink)}
.review .txt{font-size:14px;margin-top:4px;white-space:pre-wrap;word-break:break-word}
.review .shopname{font-size:12px;font-weight:700;color:var(--red);text-decoration:none}

/* ---- 最近の投稿（写真グリッド） ---- */
.photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:0 16px 12px}
.photo-grid a{position:relative;display:block;aspect-ratio:1;border-radius:10px;overflow:hidden;background:#eee}
.photo-grid img{width:100%;height:100%;object-fit:cover;display:block}
.photo-grid .cap{position:absolute;left:0;right:0;bottom:0;background:linear-gradient(transparent,rgba(0,0,0,.7));color:#fff;font-size:10px;padding:14px 6px 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ---- スタンプ ---- */
.stamp{width:100%;height:100%;display:block}
.stamp.got{transform:rotate(-8deg);filter:drop-shadow(0 1px 1px rgba(0,0,0,.15))}
.stamp-img{width:100%;height:100%;object-fit:contain;border-radius:50%}
.stamp-wrap{position:relative;width:100%;aspect-ratio:1;--stamp-col:var(--stamp-none)}
.stamp-wrap .cnt{position:absolute;right:-4px;top:-4px;background:var(--ink);color:#fff;font-size:11px;font-weight:700;border-radius:999px;min-width:22px;height:22px;display:flex;align-items:center;justify-content:center;padding:0 5px;border:2px solid #fff;z-index:1}
.stamp-wrap.none .stamp-img{opacity:.25;filter:grayscale(1)}
/* 仮スタンプ SVG の線と文字は --stamp-col で着色（未取得=グレー / 取得済み=回数の色） */
.stamp .st-line{stroke:var(--stamp-col)}
.stamp .st-text{fill:var(--stamp-col)}
/* 回数による色: 獲得済み .stamp-wrap に tier-* が付く */
.stamp-wrap.tier-bronze{--tier:var(--tier-bronze);--tier-2:var(--tier-bronze-2)}
.stamp-wrap.tier-silver{--tier:var(--tier-silver);--tier-2:var(--tier-silver-2)}
.stamp-wrap.tier-gold{--tier:var(--tier-gold);--tier-2:var(--tier-gold-2)}
.stamp-wrap.tier-platinum{--tier:var(--tier-platinum);--tier-2:var(--tier-platinum-2)}
.stamp-wrap.got{--stamp-col:var(--tier)}
/* 絵柄画像のスタンプは色のリングで段階を示す */
.stamp-wrap.got .stamp-img{box-shadow:0 0 0 3px var(--tier),0 0 0 5px var(--tier-2)}
/* 金・プラチナは光沢（円形の輝きを重ねる） */
.stamp-wrap.tier-gold::after,.stamp-wrap.tier-platinum::after{content:"";position:absolute;inset:0;border-radius:50%;pointer-events:none;
  background:linear-gradient(135deg,rgba(255,255,255,0) 35%,rgba(255,255,255,.55) 50%,rgba(255,255,255,0) 65%);mix-blend-mode:screen}
.stamp-wrap .tier-tag{position:absolute;left:50%;bottom:-7px;transform:translateX(-50%);z-index:1;white-space:nowrap;
  background:linear-gradient(135deg,var(--tier) 0%,var(--tier-2) 160%);color:#fff;font-size:9px;font-weight:800;letter-spacing:.5px;line-height:1;
  padding:3px 7px;border-radius:999px;border:1.5px solid #fff;box-shadow:0 1px 2px rgba(0,0,0,.25);text-shadow:0 1px 1px rgba(0,0,0,.3)}
.shop-hero .tier-tag{font-size:11px;padding:4px 9px}
.got-overlay .big .tier-tag{font-size:15px;padding:6px 14px;bottom:-12px;border-width:2px}
.got-overlay .big .cnt{font-size:15px;min-width:30px;height:30px}
/* 台紙の凡例 */
.tier-legend{display:flex;flex-wrap:wrap;gap:6px 12px;margin:14px 16px 6px;font-size:12px;color:var(--muted)}
.tier-legend span{display:inline-flex;align-items:center;gap:5px}
.tier-legend i{width:14px;height:14px;border-radius:50%;background:linear-gradient(135deg,var(--tier),var(--tier-2));border:1px solid #fff;box-shadow:0 0 0 1px var(--tier)}
.tier-legend .tier-bronze{--tier:var(--tier-bronze);--tier-2:var(--tier-bronze-2)}
.tier-legend .tier-silver{--tier:var(--tier-silver);--tier-2:var(--tier-silver-2)}
.tier-legend .tier-gold{--tier:var(--tier-gold);--tier-2:var(--tier-gold-2)}
.tier-legend .tier-platinum{--tier:var(--tier-platinum);--tier-2:var(--tier-platinum-2)}

/* ---- アカウント連携ボタン（各社ブランド色。文言・色はガイドラインに沿う） ---- */
:root{--brand-line:#06C755;--brand-apple:#000;--brand-google-border:#dadce0;--brand-google-text:#3c4043}
.oauth-btns{display:flex;flex-direction:column;gap:10px}
.oauth-btn{border-radius:999px;font-size:15px;gap:10px}
.oauth-btn .ico,.oauth-btn .g-ico{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;font-size:18px;line-height:1}
.oauth-btn .g-ico{background:#fff;border-radius:50%;font-weight:900;font-size:16px;color:#4285F4;border:1px solid var(--brand-google-border)}
.oauth-google{background:#fff;color:var(--brand-google-text);border:1px solid var(--brand-google-border)}
.oauth-line{background:var(--brand-line);color:#fff}
.oauth-apple{background:var(--brand-apple);color:#fff}
.oauth-btn:disabled{opacity:.6}
.or-sep{display:flex;align-items:center;gap:10px;margin:0 16px 12px;color:var(--muted);font-size:12px}
.or-sep::before,.or-sep::after{content:"";flex:1;height:1px;background:var(--line)}

/* ---- QR スキャナ ---- */
.scan-wrap{position:relative;margin:0 16px 10px;border-radius:14px;overflow:hidden;background:#000;aspect-ratio:1}
.scan-wrap video{width:100%;height:100%;object-fit:cover;display:block}
.scan-frame{position:absolute;inset:18%;border:3px solid var(--yellow);border-radius:14px;box-shadow:0 0 0 999px rgba(0,0,0,.35);pointer-events:none}

/* ---- クーポン・特典 ---- */
.coupon-banner{display:block;margin:0 16px 12px;padding:12px 14px;border-radius:14px;background:linear-gradient(135deg,var(--yellow),#ffe28a);color:var(--ink);font-weight:700;font-size:14px;text-decoration:none;border:1px solid #efcf6a}
.coupon-banner.none{background:#fff;border-color:var(--line);font-weight:600}
.coupon{display:flex;gap:12px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px;margin:0 16px 10px;text-decoration:none;color:inherit;position:relative;overflow:hidden}
.coupon::before{content:"";position:absolute;left:0;top:0;bottom:0;width:6px;background:var(--red)}
.coupon .ic{font-size:28px;line-height:1;flex:0 0 36px;text-align:center}
.coupon .body{flex:1;min-width:0}
.coupon .ttl{font-weight:700;font-size:15px;margin-bottom:2px}
.coupon .meta{font-size:12px;color:var(--muted)}
.coupon .st{font-size:11px;font-weight:700;color:#fff;background:var(--red);padding:4px 8px;border-radius:999px;white-space:nowrap}
.coupon.used,.coupon.expired{opacity:.6}
.coupon.used::before,.coupon.expired::before{background:var(--muted)}
.coupon.used .st,.coupon.expired .st{background:var(--muted)}
.coupon-detail{margin:0 16px 12px;background:#fff;border:2px dashed var(--red);border-radius:18px;padding:18px 16px 16px;text-align:center;position:relative;overflow:hidden}
.coupon-detail .ribbon{display:inline-block;background:var(--red);color:#fff;font-size:12px;font-weight:700;padding:4px 12px;border-radius:999px;margin-bottom:10px}
.coupon-detail h2{margin:0 0 6px;font-size:22px;line-height:1.3}
.coupon-detail .shop{font-size:14px;font-weight:700;margin-bottom:8px}
.coupon-detail .shop a{text-decoration:none}
.coupon-detail .desc{font-size:14px;line-height:1.7;margin:0 0 12px;white-space:pre-line;text-align:left;background:var(--cream);border-radius:10px;padding:10px 12px}
.coupon-detail dl.info{text-align:left;margin:0 auto 14px;max-width:320px;grid-template-columns:7em 1fr}
.coupon-detail .staff-box{background:#fff8e1;border:1px solid #f4dd8c;border-radius:14px;padding:12px}
.coupon-detail .staff-box p{margin:0 0 10px;font-size:13px;line-height:1.6}
.coupon-detail .used-mark{display:inline-block;border:4px solid var(--muted);color:var(--muted);font-weight:900;font-size:22px;padding:8px 22px;border-radius:12px;transform:rotate(-8deg);margin:8px 0}
.coupon-detail .used-mark span{font-size:12px;font-weight:600}
.coupon-detail .used-mark.expired{border-color:var(--red);color:var(--red)}
.coupon-detail.used,.coupon-detail.expired{border-color:var(--line)}
.coupon-detail.used .ribbon{background:var(--muted)}
/* 獲得演出内の特典表示 */
.got-overlay .milestone.tier{background:linear-gradient(135deg,var(--tier-gold),var(--tier-gold-2));color:var(--ink)}
.got-overlay .got-rewards{position:relative;z-index:2;background:#fff;border:2px dashed var(--red);border-radius:14px;padding:10px 16px;margin:0 0 14px;max-width:320px;font-size:14px}
.got-overlay .got-rewards b{display:block;color:var(--red);margin-bottom:4px}
.got-overlay .got-rewards .rw{font-weight:700;margin:2px 0}
/* 台紙の未取得: 黒丸に白い「？」 */
.stamp-q circle{fill:var(--ink)}
.stamp-q text{fill:#fff}

/* ---- 地図ピン（ラーメンアイコン） ---- */
.pin-wrap{background:none;border:none}
.pin{width:32px;height:32px;border-radius:50%;background:var(--pin,var(--muted));border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.35);display:flex;align-items:center;justify-content:center;font-size:17px;line-height:1}
.pin.got{border-color:var(--yellow);border-width:3px}

/* ---- 台紙 ---- */
.progress{margin:0 16px 14px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 14px}
.progress .bar{height:10px;background:#efe7d9;border-radius:6px;overflow:hidden;margin-top:8px}
.progress .bar>div{height:100%;background:linear-gradient(90deg,var(--red),#e0453b);border-radius:6px;transition:width .5s}
.card-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:0 16px}
.card-cell{background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px 6px 8px;text-align:center;text-decoration:none;color:inherit}
.card-cell .stamp-wrap{width:72px;margin:0 auto 6px}
.card-cell .nm{font-size:11px;line-height:1.25;height:2.5em;overflow:hidden;color:var(--ink)}
.card-cell.none .nm{color:var(--muted)}
.complete{margin:0 16px 14px;background:linear-gradient(135deg,#F5C33B,#ffe28a);border-radius:16px;padding:16px;text-align:center;font-weight:700}

/* ---- チェックイン / 写真 / 評価 ---- */
.step{display:flex;gap:6px;margin:0 16px 12px;font-size:12px;color:var(--muted)}
.step span{flex:1;text-align:center;padding:6px 0;border-bottom:3px solid var(--line)}
.step span.on{color:var(--red);border-color:var(--red);font-weight:700}
.step span.done{color:var(--ok);border-color:var(--ok)}
.preview{margin:0 16px 12px;border-radius:14px;overflow:hidden;background:#f1ece3;min-height:180px;display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:13px}
.preview img{width:100%;display:block;max-height:60vh;object-fit:contain;background:#000}
.file-btn{position:relative;overflow:hidden}
.file-btn input{position:absolute;inset:0;opacity:0;font-size:100px;cursor:pointer}
.rate-stars{display:flex;justify-content:center;gap:6px;margin:6px 0 12px}
.rate-stars button{background:none;border:none;font-size:42px;line-height:1;color:#d9d2c6;cursor:pointer;padding:0 2px;transition:transform .1s}
.rate-stars button.on{color:#f0a800}
.rate-stars button:active{transform:scale(1.15)}
.rate-label{text-align:center;font-weight:700;color:var(--red);min-height:1.4em;margin-bottom:8px}
textarea.comment{width:100%;min-height:96px;font:inherit;font-size:15px;padding:10px;border:1px solid var(--line);border-radius:12px;resize:vertical}
input.text{width:100%;font:inherit;font-size:16px;padding:12px;border:1px solid var(--line);border-radius:12px}

/* ---- 獲得演出 ---- */
.got-overlay{position:fixed;inset:0;background:rgba(251,246,238,.97);z-index:200;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;text-align:center;overflow:hidden}
.got-overlay .big{width:200px;height:200px;animation:press .55s cubic-bezier(.2,1.4,.4,1) both;position:relative;z-index:2}
.got-overlay h2{margin:14px 0 4px;font-size:26px;color:var(--red);position:relative;z-index:2}
.got-overlay p{margin:0 0 18px;color:var(--muted);position:relative;z-index:2}
.got-overlay .btn{position:relative;z-index:2}
.got-overlay .milestone{background:var(--yellow);color:var(--ink);font-weight:800;font-size:15px;padding:6px 14px;border-radius:999px;margin:4px 0 8px;position:relative;z-index:2}
/* 演出パーツ: 紙吹雪 canvas / 回転する放射光 / 押印フラッシュ */
.got-overlay .confetti{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:3}
.got-overlay .rays{position:absolute;left:50%;top:50%;width:150vmax;height:150vmax;margin:-75vmax 0 0 -75vmax;pointer-events:none;z-index:1;opacity:0;
  background:repeating-conic-gradient(from 0deg,rgba(245,195,59,.45) 0deg 12deg,rgba(245,195,59,0) 12deg 30deg);animation:raysIn .6s .4s ease-out forwards,spin 14s linear infinite}
.got-overlay .flash{position:absolute;inset:0;background:#fff;pointer-events:none;z-index:4;opacity:0;animation:flash .5s .38s ease-out}
.got-overlay.slam{animation:slam .35s cubic-bezier(.3,.1,.3,1)}
.got-overlay .pop{opacity:0;animation:pop .5s .5s cubic-bezier(.2,1.4,.4,1) forwards}
.got-overlay .pop.d1{animation-delay:.68s}
.got-overlay .pop.d2{animation-delay:.86s}
/* 「動きを減らす」端末: 光・シェイク・紙吹雪は出さず、押印と文字だけ */
.got-overlay.reduce .rays,.got-overlay.reduce .flash{display:none}
.got-overlay.reduce .big{animation-duration:.2s}
.got-overlay.reduce .pop{animation-duration:.2s;animation-delay:.1s}
@keyframes press{0%{transform:scale(2.4) rotate(-30deg);opacity:0}55%{transform:scale(.9) rotate(-8deg);opacity:1}75%{transform:scale(1.06) rotate(-8deg)}100%{transform:scale(1) rotate(-8deg);opacity:1}}
@keyframes raysIn{to{opacity:1}}
@keyframes flash{0%{opacity:.9}100%{opacity:0}}
@keyframes slam{0%{transform:translate(0,0)}20%{transform:translate(-6px,4px)}40%{transform:translate(6px,-4px)}60%{transform:translate(-4px,2px)}80%{transform:translate(3px,-2px)}100%{transform:translate(0,0)}}
@keyframes pop{0%{opacity:0;transform:scale(.6) translateY(10px)}100%{opacity:1;transform:scale(1) translateY(0)}}
.shake{animation:shake .4s}
@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}

/* ---- ランキング ---- */
.rank-list .shop-item{margin-bottom:8px}
.note{font-size:12px;color:var(--muted);margin:0 16px 12px;line-height:1.5}
.history .review img{width:64px;height:64px;flex-basis:64px}
.loading{text-align:center;color:var(--muted);padding:40px 16px}
.spinner{display:inline-block;width:26px;height:26px;border:3px solid #e2d9c9;border-top-color:var(--red);border-radius:50%;animation:spin .8s linear infinite;vertical-align:middle}
@keyframes spin{to{transform:rotate(360deg)}}
.retry{margin:0 16px}

@media (min-width:700px){
  #map{height:420px}
  .card-grid{grid-template-columns:repeat(4,1fr)}
  .photo-grid{grid-template-columns:repeat(4,1fr)}
}
