/* =========================================================
   竹原スタンプラリー 参加者向けスタイル
   方針: 淡いグレーの地 + 白いカード + アクセント1色。
         写真とキャラクターが主役になるよう、UI 自体は無彩色に近づける。
   テーマ色（--primary 等）は layouts/app.blade.php でラリーごとに差し込む
   ========================================================= */

:root {
  --primary: #3b7cf6;
  --secondary: #dce7fb;
  --bg: #f2f4f7;
  --ink: #16202a;

  --surface: #ffffff;
  --muted: #6b7684;
  --line: #e5e9ef;
  --line-strong: #d3d9e2;
  --primary-soft: rgba(59, 124, 246, 0.10);
  --primary-ink: #ffffff;
  --pin: #4ec3ea;        /* 未獲得ピン: 明るいスカイブルー */
  --pin-done: #35c7a4;   /* 獲得済ピン: 明るいミント */
  --success: #2f9e6b;
  --success-soft: #e6f5ec;
  --danger: #d94a4a;

  --r-xl: 24px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow-float: 0 12px 32px -16px rgba(22, 32, 42, .28);
  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", system-ui, sans-serif;
  --font-num: "Manrope", "Zen Kaku Gothic New", system-ui, sans-serif;
  --tab-h: 68px;
}

@supports (color: color-mix(in srgb, red, blue)) {
  :root {
    --primary-soft: color-mix(in srgb, var(--primary) 11%, white);
    --secondary: color-mix(in srgb, var(--primary) 16%, white);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt";
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.3; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.shell { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; }
.page { padding: 8px 18px calc(var(--tab-h) + env(safe-area-inset-bottom) + 28px); }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 6px; }
.topbar__brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14px; letter-spacing: .01em; }
.topbar__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--surface); }
.avatar--initial { display: inline-flex; align-items: center; justify-content: center; background: var(--surface); color: var(--ink); font-weight: 700; font-size: 14px; border: 1px solid var(--line); }

.subhead { display: flex; align-items: center; gap: 8px; padding: 14px 12px 6px; }
.subhead__back { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); }
.subhead h1 { font-size: 16px; flex: 1; text-align: center; padding-right: 48px; }

/* ---------- type helpers ---------- */
.eyebrow { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.h-lg { font-size: 26px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.h-md { font-size: 17px; font-weight: 700; }
.num { font-family: var(--font-num); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 28px; }
.mb-2 { margin-bottom: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 24px 0 10px; }
.section-title h2 { font-size: 15px; font-weight: 700; }
.section-title a { font-size: 12.5px; color: var(--primary); font-weight: 500; }
.hidden { display: none !important; }

/* ---------- cards ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); padding: 18px; }
.card + .card { margin-top: 10px; }
.card--flat { border: 1px solid var(--line); }
.card--soft { background: var(--primary-soft); }
.card--sky { background: var(--secondary); }
.card--accent { background: var(--primary); color: var(--primary-ink); }
.card--accent .muted, .card--accent .eyebrow { color: rgba(255,255,255,.75); }

/* ---------- hero (写真 + フロートするチップ) ---------- */
.hero { position: relative; overflow: hidden; border-radius: var(--r-xl); background: var(--surface); min-height: 140px; padding: 20px 18px; }
.hero--photo { padding: 0; min-height: 0; background: #d9dee6; }
.hero__img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; display: block; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,16,24,0) 40%, rgba(10,16,24,.62) 100%); }
.hero__badge { position: absolute; top: 14px; left: 14px; background: rgba(255,255,255,.85); backdrop-filter: blur(8px); border-radius: 999px; padding: 4px 11px; font-size: 11.5px; font-weight: 700; }
.hero__cap { padding: 14px 18px 16px; }
.hero__cap--over { position: absolute; left: 0; right: 0; bottom: 0; color: #fff; padding: 14px 18px 18px; }
.hero__cap--over .small { color: rgba(255,255,255,.82); }
.hero__bubbles { display: none; }

/* 写真の上に浮くガラスのチップ */
.chips { position: absolute; left: 14px; right: 14px; top: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.chip-glass { display: inline-flex; flex-direction: column; gap: 1px; padding: 9px 13px; border-radius: 14px; background: rgba(255,255,255,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.7); box-shadow: 0 8px 24px -14px rgba(0,0,0,.45); min-width: 96px; }
.chip-glass span { font-size: 10.5px; color: var(--muted); font-weight: 500; line-height: 1.2; }
.chip-glass b { font-family: var(--font-num); font-weight: 700; font-size: 18px; letter-spacing: -.02em; line-height: 1.15; color: var(--ink); }
.chip-glass b small { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.chip-glass--accent { background: var(--primary); border-color: transparent; }
.chip-glass--accent span, .chip-glass--accent b, .chip-glass--accent b small { color: #fff; }
.chips--left { align-items: flex-start; }
@keyframes chipin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.chip-glass { animation: chipin .5s cubic-bezier(.22,1,.36,1) both; }
.chip-glass:nth-child(2) { animation-delay: .08s; }
.chip-glass:nth-child(3) { animation-delay: .16s; }

/* ---------- progress ---------- */
.progress-card { display: grid; grid-template-columns: 104px 1fr; gap: 18px; align-items: center; }
.ring { position: relative; width: 104px; height: 104px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__track { fill: none; stroke: var(--bg); stroke-width: 8; }
.ring__bar { fill: none; stroke: var(--primary); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .9s cubic-bezier(.22,1,.36,1); }
.ring__label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ring__num { font-family: var(--font-num); font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.ring__num small { font-size: 13px; font-weight: 600; color: var(--muted); }
.ring__cap { font-size: 10.5px; color: var(--muted); margin-top: 6px; font-weight: 500; }
.guide { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; background: var(--bg); border-radius: var(--r-md); font-size: 13px; }
.guide .icon { flex: none; color: var(--primary); margin-top: 1px; }

.bar { height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: 999px; transition: width .6s cubic-bezier(.22,1,.36,1); }

/* ---------- stamp grid ---------- */
.stamps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px; }
.stamp { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; font-size: 11px; font-weight: 500; color: var(--muted); }
.stamp > span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.stamp__seal { position: relative; width: 64px; height: 64px; border-radius: 50%; border: 1.5px dashed var(--line-strong); display: flex; align-items: center; justify-content: center; background: var(--bg); font-family: var(--font-num); font-size: 16px; font-weight: 600; color: var(--muted); }
.stamp__seal svg { width: 26px; height: 26px; }
.stamp.is-done .stamp__seal { border: 2px solid var(--primary); color: var(--primary); background: var(--primary-soft); }
.stamp.is-done { color: var(--ink); font-weight: 700; }
.stamp__seal--photo { border: 0; overflow: hidden; }
.stamp__seal--photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(1.08) contrast(.85); opacity: .75; }
.stamp.is-done .stamp__seal--photo { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }
.stamp.is-done .stamp__seal--photo img { filter: none; opacity: 1; }
.stamp__mark { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); }
.stamp__mark svg { width: 13px; height: 13px; }
.stamp:not(.is-done) .stamp__mark { display: none; }

/* seal (獲得済み・成功シート) */
.seal { width: 140px; height: 140px; margin: 0 auto; border-radius: 50%; border: 3px solid var(--primary); color: var(--primary); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; transform: rotate(-6deg); }
.seal::after { content: ""; position: absolute; inset: 6px; border: 1px solid var(--primary); border-radius: 50%; opacity: .5; }
.seal__num { font-family: var(--font-num); font-size: 40px; font-weight: 700; line-height: 1; }
.seal__txt { font-size: 11.5px; letter-spacing: .12em; margin-top: 4px; font-weight: 700; }
.seal__date { font-family: var(--font-num); font-size: 11px; margin-top: 2px; opacity: .8; }
.seal.is-pop { animation: sealpop .55s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes sealpop { 0% { transform: rotate(-6deg) scale(2); opacity: 0; } 60% { opacity: 1; } 100% { transform: rotate(-6deg) scale(1); } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 15px 18px; border-radius: 16px; border: 0; font-weight: 700; font-size: 15px; background: var(--primary); color: var(--primary-ink); transition: transform .08s, opacity .15s; }
.btn:active { transform: scale(.985); }
.btn:disabled { opacity: .5; cursor: default; }
.btn--secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn--ghost { background: transparent; color: var(--muted); padding: 10px; font-weight: 500; }
.btn--sky { background: var(--ink); color: #fff; }
.btn--sm { width: auto; padding: 9px 14px; font-size: 13px; border-radius: 12px; }
.btn--round { width: 56px; height: 56px; padding: 0; border-radius: 50%; }
.btn--pill { padding: 17px 24px; border-radius: 999px; font-size: 16px; letter-spacing: .02em; white-space: nowrap; }
.btn--pill svg { flex: 0 0 auto; }
.btn--line { background: #06c755; color: #fff; box-shadow: 0 10px 24px rgba(6,199,85,.28); }
.btn--line:hover { background: #05b34c; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* ---------- スポット一覧 ---------- */
.spot-list { display: flex; flex-direction: column; gap: 12px; }
.spot-card { display: block; background: var(--surface); border-radius: var(--r-xl); overflow: hidden; }
.spot-card__photo { position: relative; aspect-ratio: 16 / 9; background: #dfe4eb; }
.spot-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spot-card__blank { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #a9b2bf; }
.spot-card__num { position: absolute; left: 12px; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.88); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; font-family: var(--font-num); font-weight: 700; font-size: 13px; }
.spot-card__pill { position: absolute; right: 12px; top: 12px; }
.spot-card__dist { position: absolute; right: 12px; bottom: 10px; background: rgba(255,255,255,.88); backdrop-filter: blur(8px); color: var(--ink); font-family: var(--font-num); font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.spot-card__body { display: flex; align-items: center; gap: 10px; padding: 12px 16px 14px; }
.spot__name { font-weight: 700; font-size: 15px; }
.spot__sub { font-size: 12px; color: var(--muted); }
.spot-card.is-done .spot-card__photo::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px var(--primary); pointer-events: none; }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.pill--done { background: var(--primary); color: #fff; }
.pill--todo { background: var(--bg); color: var(--muted); }
.pill--used { background: var(--line); color: var(--muted); }
.pill--ok { background: var(--success-soft); color: var(--success); }

.seg { display: flex; background: var(--surface); border-radius: 14px; padding: 4px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 11px; font-weight: 500; font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.is-active { background: var(--primary); color: var(--primary-ink); font-weight: 700; box-shadow: 0 4px 12px -6px var(--primary); }

.map { width: 100%; height: 62vh; min-height: 380px; border-radius: var(--r-xl); overflow: hidden; background: #dfe4eb; }
.map-marker { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--pin); border: 2.5px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; }
.map-marker span { transform: rotate(45deg); color: #fff; font-family: var(--font-num); font-weight: 700; font-size: 12px; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.map-marker.is-done { background: var(--pin-done); }
.map-me { width: 16px; height: 16px; border-radius: 50%; background: var(--primary); border: 3px solid #fff; box-shadow: 0 0 0 6px var(--primary-soft); }
.leaflet-popup-content { font-family: var(--font); }

/* ---------- スポット詳細 ---------- */
.detail-hero { position: relative; border-radius: var(--r-xl); overflow: hidden; background: #dfe4eb; aspect-ratio: 4 / 3; }
.detail-hero__num { position: absolute; left: 14px; top: 14px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.88); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; font-family: var(--font-num); font-weight: 700; }
.detail-hero__placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #a9b2bf; }

.gallery-swipe { position: relative; border-radius: var(--r-xl); overflow: hidden; background: #0f141a; }
.gallery-swipe__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gallery-swipe__track::-webkit-scrollbar { display: none; }
.gallery-swipe__slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; position: relative; aspect-ratio: 4 / 3; }
.gallery-swipe__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-swipe__slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 14px; color: #fff; font-size: 12.5px; font-weight: 500; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.55)); }
.gallery-swipe .detail-hero__num { position: absolute; left: 14px; top: 14px; }
.gallery-swipe__dots { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.gallery-swipe__dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.45); transition: all .2s; }
.gallery-swipe__dots i.is-active { background: #fff; width: 14px; border-radius: 3px; }
.gallery-swipe__count { position: absolute; right: 12px; top: 16px; background: rgba(255,255,255,.88); backdrop-filter: blur(8px); color: var(--ink); font-family: var(--font-num); font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }

/* 「スタンプを押す」アクションカード（画面内で唯一のアクセント面） */
.action-card { background: var(--primary); color: #fff; border-radius: var(--r-xl); padding: 18px 18px 16px; }
.action-card__label { font-size: 12px; opacity: .8; font-weight: 500; }
.action-card__val { font-family: var(--font-num); font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin-top: 2px; }
.action-card__val small { font-size: 13px; font-weight: 600; opacity: .8; margin-left: 4px; }
.action-card__note { font-size: 12.5px; opacity: .85; margin-top: 4px; }
.action-card .btn { background: #fff; color: var(--primary); margin-top: 14px; }
.action-card .btn:disabled { opacity: .6; }
.action-card.is-near { background: var(--ink); }
.action-card.is-near .btn { background: var(--primary); color: #fff; }
.action-card .btn .icon { color: currentColor; }

/* ---------- 景品 ---------- */
.reward { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: start; }
.reward__img { width: 72px; height: 72px; border-radius: 16px; background: var(--bg); display: flex; align-items: center; justify-content: center; color: var(--muted); overflow: hidden; }
.reward__img img { width: 100%; height: 100%; object-fit: cover; }
.reward__name { font-weight: 700; font-size: 15px; }
.reward__cond { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.reward .bar { margin-top: 10px; }
.reward__foot { grid-column: 1 / -1; margin-top: 2px; }

.ticket { position: relative; background: var(--surface); border-radius: var(--r-xl); overflow: hidden; }
.ticket__head { padding: 22px 20px 18px; background: var(--ink); color: #fff; }
.ticket__head .eyebrow { color: rgba(255,255,255,.7); }
.ticket__body { padding: 20px; }
.ticket__cut { position: relative; height: 0; border-top: 1.5px dashed var(--line-strong); margin: 0 14px; }
.ticket__cut::before, .ticket__cut::after { content: ""; position: absolute; top: -12px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); }
.ticket__cut::before { left: -26px; } .ticket__cut::after { right: -26px; }
.code { font-family: var(--font-num); font-size: 32px; letter-spacing: .16em; font-weight: 700; text-align: center; padding: 8px 0; }
.ticket--used .ticket__head { background: #8f98a5; }
.used-mark { position: absolute; right: 16px; top: 88px; padding: 6px 14px; border: 3px solid var(--danger); color: var(--danger); font-weight: 900; font-size: 18px; letter-spacing: .1em; transform: rotate(-12deg); border-radius: 6px; opacity: .85; }

.pin-input { display: flex; gap: 8px; }
.pin-input input { flex: 1; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); font-family: var(--font-num); font-size: 18px; letter-spacing: .2em; text-align: center; background: var(--bg); }
.pin-input input:focus { outline: none; border-color: var(--primary); background: var(--surface); }

.slider { position: relative; height: 56px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; user-select: none; touch-action: pan-y; }
.slider__label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 500; color: var(--muted); font-size: 13.5px; pointer-events: none; }
.slider__knob { position: absolute; top: 3px; left: 3px; width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; transition: left .2s; }
.slider.is-done { background: var(--success); border-color: var(--success); }
.slider.is-done .slider__label { color: #fff; }

/* ---------- forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.input, .select, .textarea { width: 100%; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); font-size: 15px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); background: var(--surface); }
.chips-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip span { display: inline-block; padding: 9px 14px; border-radius: 999px; background: var(--bg); border: 1px solid transparent; font-weight: 500; font-size: 13.5px; }
.chip input:checked + span { background: var(--ink); color: #fff; font-weight: 700; }
.chip input:focus-visible + span { outline: 2px solid var(--primary); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 50; max-width: min(440px, calc(100% - 32px)); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-float); animation: toastin .3s ease-out; }
.toast--error { background: var(--danger); }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- tab bar ---------- */
.tabbar { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(255,255,255,.9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); z-index: 30; }
.tabbar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 500; color: var(--muted); }
.tabbar__item .icon { width: 24px; height: 24px; }
.tabbar__item.is-active { color: var(--primary); font-weight: 700; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; padding: 10px 20px 32px; }
.login__art { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.login__kvwrap { position: relative; }
.login__kv { width: 100%; border-radius: var(--r-xl); aspect-ratio: 4 / 4.2; object-fit: cover; }
.login__thumbs { position: absolute; left: 12px; right: 12px; bottom: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.login__thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: 2px solid rgba(255,255,255,.9); }
.login__title { font-size: 30px; font-weight: 300; line-height: 1.25; letter-spacing: -.01em; margin-top: 26px; }
.login__title b { font-weight: 800; }
.login__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.login__foot .muted { font-size: 13px; }
.bubble-logo { width: 100%; aspect-ratio: 4 / 4.2; border-radius: var(--r-xl); background: var(--surface); padding: 25%; }
.dev-login { margin-top: 18px; }
.dev-login .input { background: var(--surface); }

/* ---------- camera ---------- */
.cam { position: fixed; inset: 0; background: #000; z-index: 40; display: flex; flex-direction: column; }
.cam__view { position: relative; flex: 1; overflow: hidden; }
.cam__view video, .cam__view canvas.cam__snap { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam__overlay { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.cam__ctrl { padding: 14px 18px calc(16px + env(safe-area-inset-bottom)); background: rgba(0,0,0,.85); color: #fff; }
.cam__ctrl .row { gap: 12px; }
.cam__ctrl input[type=range] { flex: 1; accent-color: var(--primary); }
.cam__shutter { width: 68px; height: 68px; border-radius: 50%; background: #fff; border: 5px solid rgba(255,255,255,.35); background-clip: padding-box; margin: 0 auto; display: block; }
.cam__top { position: absolute; top: 0; left: 0; right: 0; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; color: #fff; z-index: 2; background: linear-gradient(rgba(0,0,0,.6), transparent); }
.cam__top a, .cam__top button { color: #fff; background: rgba(0,0,0,.35); border: 0; border-radius: 50%; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.cam__hint { font-size: 12px; text-align: center; opacity: .8; margin-bottom: 8px; }
.cam .btn--secondary { background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.gallery img { border-radius: var(--r-md); aspect-ratio: 1; object-fit: cover; }

/* ---------- 写真ギャラリー ---------- */
.strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -18px; padding: 0 18px 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip__item { flex: 0 0 210px; scroll-snap-align: start; position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.strip__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.strip__cap { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); padding: 5px 10px; font-size: 11.5px; font-weight: 600; color: var(--ink); background: rgba(255,255,255,.88); backdrop-filter: blur(8px); border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mosaic { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mosaic--3 { grid-template-columns: repeat(3, 1fr); }
.mosaic__item { display: block; padding: 0; border: 0; background: var(--surface); border-radius: 14px; overflow: hidden; cursor: pointer; }
.mosaic__item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; transition: transform .25s; }
.mosaic__item:active img { transform: scale(.97); }
.mosaic:not(.mosaic--3) .mosaic__item:first-child { grid-column: 1 / -1; }
.mosaic:not(.mosaic--3) .mosaic__item:first-child img { aspect-ratio: 16 / 9; }

.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(10,14,20,.94); display: flex; align-items: center; justify-content: center; padding: 16px; animation: toastin .2s; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; object-fit: contain; }
.lightbox__close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; display: flex; align-items: center; justify-content: center; }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .icon { width: 40px; height: 40px; color: var(--line-strong); }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.recent { display: flex; flex-direction: column; gap: 10px; }
.recent__item { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.recent__item time { margin-left: auto; color: var(--muted); font-family: var(--font-num); font-size: 12px; }
.recent__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.overlay-bg { position: fixed; inset: 0; background: rgba(10,14,20,.5); backdrop-filter: blur(4px); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 480px; background: var(--surface); border-radius: 26px 26px 0 0; padding: 22px 22px calc(24px + env(safe-area-inset-bottom)); animation: sheetin .3s cubic-bezier(.22,1,.36,1); }
@keyframes sheetin { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet__grip { width: 40px; height: 4px; border-radius: 3px; background: var(--line-strong); margin: -4px auto 18px; }

/* =========================================================
   写真を大きく: フルブリード + 写真の上に文字
   ========================================================= */

/* ログイン: 全画面カバー */
body.is-cover { background: #0f141a; }
body.is-cover .page { padding: 0; }
.cover { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; overflow: hidden; }
.cover__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover__img--blank { background: linear-gradient(160deg, #26313d, #0f141a); }
.cover__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,20,.35) 0%, rgba(10,14,20,0) 28%, rgba(10,14,20,.15) 50%, rgba(10,14,20,.88) 100%); }
.cover__top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: calc(16px + env(safe-area-inset-top)) 20px 0; font-size: 13px; font-weight: 700; }
.cover__brand { display: inline-flex; align-items: center; gap: 8px; }
.cover__brand .topbar__dot { background: #fff; }
.cover__date { font-weight: 600; opacity: .9; }
.cover__body { position: relative; padding: 0 20px calc(28px + env(safe-area-inset-bottom)); }
.cover__thumbs { display: flex; gap: 8px; margin-bottom: 18px; }
.cover__thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 14px; border: 2px solid rgba(255,255,255,.85); }
.cover__title { font-size: 34px; font-weight: 300; line-height: 1.22; letter-spacing: -.01em; text-shadow: 0 2px 20px rgba(0,0,0,.35); }
.cover__title b { font-weight: 800; }
.cover__lead { margin-top: 12px; font-size: 13.5px; color: rgba(255,255,255,.82); max-width: 32em; }
.cover__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-top: 22px; }
/* LINEログインだけを置く足元: ボタンを1本、全幅で中央に */
.cover__foot--line { display: block; margin-top: 26px; }
.cover__status { display: block; font-size: 12px; color: rgba(255,255,255,.75); margin-bottom: 8px; }
.cover__status--under { margin: 10px 0 0; text-align: center; }
.cover__input { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.35); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.cover__input::placeholder { color: rgba(255,255,255,.6); }
.cover__input:focus { background: rgba(255,255,255,.22); border-color: #fff; }

/* ホーム: 端まで広げた大きなヒーロー、見出しは写真の上 */
.hero--top { margin: -8px -18px 0; border-radius: 0 0 28px 28px; }
.hero__img--tall { aspect-ratio: 4 / 4.6; }
.hero__shade--strong { background: linear-gradient(180deg, rgba(10,16,24,.2) 0%, rgba(10,16,24,0) 30%, rgba(10,16,24,.25) 55%, rgba(10,16,24,.82) 100%); }
.hero--top .hero__cap--over { padding: 16px 20px 24px; }
.hero__title { font-size: 30px; font-weight: 700; line-height: 1.22; letter-spacing: -.01em; color: #fff; margin-top: 4px; text-shadow: 0 2px 18px rgba(0,0,0,.3); }
.hero--top .chips { top: 16px; right: 16px; }
.hero--top:not(.hero--photo) { margin: 0; border-radius: var(--r-xl); }

/* スポット一覧: 写真を大きく、名前を写真の上に */
.spot-card__photo { aspect-ratio: 4 / 3; }
.spot-card__photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,16,24,0) 45%, rgba(10,16,24,.8) 100%); z-index: 1; pointer-events: none; }
.spot-card__num, .spot-card__pill, .spot-card__dist, .spot-card__over { z-index: 2; }
.spot-card__over { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; gap: 10px; padding: 14px 16px 16px; color: #fff; }
.spot-card__over .spot__name { font-size: 18px; color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.3); }
.spot-card__over .spot__sub { color: rgba(255,255,255,.8); }
.spot-card__count { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-num); font-size: 12px; font-weight: 700; color: #fff; opacity: .9; white-space: nowrap; }
.spot-card__dist { bottom: auto; top: 12px; right: 12px; }
.spot-card__pill { top: 12px; right: auto; left: 50px; }
.spot-card__blank { color: rgba(255,255,255,.5); background: linear-gradient(160deg, #6b7684, #3d4652); }

/* スポット詳細: フルブリードのギャラリー、タイトルを写真の上 */
.gallery-swipe--top, .detail-hero--top { margin: -8px -18px 0; border-radius: 0 0 28px 28px; }
.gallery-swipe--top .gallery-swipe__slide, .detail-hero--top { aspect-ratio: 4 / 4.4; }
.gallery-swipe--top .gallery-swipe__slide figcaption { display: none; }
.gallery-swipe__title { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 20px 26px; color: #fff; background: linear-gradient(180deg, rgba(10,16,24,0), rgba(10,16,24,.85)); pointer-events: none; }
.gallery-swipe__title .eyebrow { color: rgba(255,255,255,.8); }
.gallery-swipe__title h2 { font-size: 28px; line-height: 1.2; letter-spacing: -.01em; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.gallery-swipe__title .small { color: rgba(255,255,255,.8); }
.gallery-swipe--top .gallery-swipe__dots { bottom: 12px; }
.gallery-swipe--top .gallery-swipe__caption { position: absolute; left: 20px; top: 62px; font-size: 12px; color: #fff; background: rgba(10,16,24,.45); backdrop-filter: blur(8px); padding: 4px 10px; border-radius: 999px; }
.subhead--float { position: absolute; top: 0; left: 0; right: 0; z-index: 3; padding: 14px 14px 0; }
.subhead--float h1 { color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.4); }
.subhead--float .subhead__back { background: rgba(255,255,255,.88); backdrop-filter: blur(8px); border: 0; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ログイン: キャラクター等のアートを上部に、文字は下（.cover--art） */
body.is-cover:has(.cover--art) { background: var(--bg); }
.cover--art { color: var(--ink); background: var(--bg); justify-content: flex-start; }
.cover--art .cover__img { position: relative; inset: auto; width: 100%; height: auto; max-height: 64vh; max-height: 64dvh; aspect-ratio: 466 / 657; object-fit: cover; object-position: center top; display: block; }
.cover--art .cover__shade { top: auto; height: 34vh; bottom: auto; position: absolute; left: 0; right: 0; top: calc(min(64vh, 100vw * 657 / 466) - 34vh); background: linear-gradient(180deg, rgba(242,244,247,0) 0%, rgba(242,244,247,.35) 55%, var(--bg) 100%); pointer-events: none; }
.cover--art .cover__top { color: var(--ink); text-shadow: 0 1px 8px rgba(255,255,255,.7); }
.cover--art .cover__brand .topbar__dot { background: var(--primary); }
.cover--art .cover__body { margin-top: -7vh; padding-bottom: calc(24px + env(safe-area-inset-bottom)); flex: 1; display: flex; flex-direction: column; }
/* アートが上、文字が下のレイアウトではログインボタンを画面下端に寄せる */
.cover--art .cover__foot { margin-top: auto; padding-top: 26px; }
.cover--art .cover__thumbs { display: none; }
.cover--art .cover__title { text-shadow: none; font-size: 28px; word-break: keep-all; overflow-wrap: anywhere; }
.cover--art .cover__lead { color: var(--muted); }
.cover--art .cover__status { color: var(--muted); }
.cover--art .cover__input { background: var(--surface); border-color: var(--line); color: var(--ink); backdrop-filter: none; }
.cover--art .cover__input::placeholder { color: var(--muted); }
.cover--art .cover__input:focus { border-color: var(--primary); }
@media (max-height: 700px) { .cover--art .cover__thumbs { display: none; } .cover--art .cover__title { font-size: 26px; } }

/* =========================================================
   アートワーク（アニメのビジュアル）と実写の組み合わせ
   ========================================================= */
.art-card__tag { display: inline-block; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.9); color: var(--ink); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; backdrop-filter: blur(6px); }

/* 作品カード（ホーム・一覧の合間） */
.art-card { display: block; position: relative; border-radius: var(--r-xl); overflow: hidden; background: #dfe4eb; }
.art-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.art-card--slim img { aspect-ratio: 16 / 8; }
.art-card__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; color: #fff; background: linear-gradient(180deg, rgba(10,16,24,0), rgba(10,16,24,.75)); display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.art-card__cap b { font-size: 15px; text-shadow: 0 1px 10px rgba(0,0,0,.35); }
.art-card__cap .small { color: rgba(255,255,255,.85); }

/* 上部のアートヒーロー（景品・写真タブ） */
.art-hero { position: relative; margin: -8px -18px 0; border-radius: 0 0 28px 28px; overflow: hidden; background: #dfe4eb; }
.art-hero img { width: 100%; aspect-ratio: 4 / 4.2; object-fit: cover; object-position: center 30%; display: block; }
.art-hero--short img { aspect-ratio: 4 / 3.2; }
.art-hero__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 20px 24px; color: #fff; background: linear-gradient(180deg, rgba(10,16,24,0), rgba(10,16,24,.8)); }
.art-hero__cap .small { color: rgba(255,255,255,.85); }

/* 小さなバナー（アンケート） */
.art-banner { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; background: var(--surface); border-radius: var(--r-lg); padding: 10px; }
.art-banner img { width: 84px; height: 84px; object-fit: cover; object-position: center 20%; border-radius: 14px; }
.art-banner p { font-size: 13px; color: var(--muted); padding-right: 6px; }

/* スポット詳細「作中のシーン」 */
.art-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -18px; padding: 0 18px 6px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.art-row::-webkit-scrollbar { display: none; }
.art-row__item { flex: 0 0 62%; scroll-snap-align: start; position: relative; padding: 0; border: 0; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; cursor: pointer; text-align: left; }
.art-row__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.art-row__cap { position: absolute; left: 10px; bottom: 10px; padding: 5px 10px; font-size: 11.5px; font-weight: 600; color: var(--ink); background: rgba(255,255,255,.88); backdrop-filter: blur(8px); border-radius: 999px; max-width: calc(100% - 20px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-hero--art img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.spot-card__arttag { position: absolute; left: 50px; top: 15px; z-index: 2; }
.spot-card--art .spot-card__photo img { object-position: center 30%; }

/* 風景ストリップ・モザイク内のアートに小さな印 */
.strip__item--art::after, .mosaic__item--art::after { content: "たまゆら"; position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.9); font-size: 10px; font-weight: 700; color: var(--ink); }
.mosaic__item { position: relative; }

/* =========================================================
   Swiper: まちの風景 / 作中のシーン
   ========================================================= */
.scene-swiper { margin: 0 -18px; padding: 0 18px 22px; overflow: hidden; position: relative; }
.scene-swiper .swiper-slide { width: 72%; max-width: 300px; height: auto; border: 0; padding: 0; text-align: left; cursor: pointer; }
.scene-swiper .strip__item img { aspect-ratio: 4 / 3; }
.scene-swiper .swiper-scrollbar { left: 18px; right: 18px; width: auto; bottom: 6px; height: 3px; background: var(--line); border-radius: 2px; }
.scene-swiper .swiper-scrollbar-drag { background: var(--ink); border-radius: 2px; }
.scene-swiper__nav { position: absolute; top: calc(50% - 22px); transform: translateY(-50%); z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--ink); display: none; align-items: center; justify-content: center; box-shadow: var(--shadow-float); }
.scene-swiper__nav--prev { left: 22px; }
.scene-swiper__nav--next { right: 22px; }
.scene-swiper__nav--next .icon { transform: rotate(180deg); }
.scene-swiper__nav.swiper-button-disabled { opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .scene-swiper__nav { display: inline-flex; } }
.scene-swiper .swiper-slide img { pointer-events: none; }

/* =========================================================
   アクションカード: スポット写真をぼかした背景（青一色をやめる）
   ========================================================= */
.action-card { position: relative; overflow: hidden; background: var(--ink); }
.action-card--photo::before {
  content: ""; position: absolute; inset: -24px;
  background: var(--card-bg) center 40% / cover no-repeat;
  filter: blur(16px) saturate(1.15) brightness(.9);
  transform: scale(1.08);
}
.action-card--photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(10,16,24,.22) 0%, rgba(10,16,24,.62) 100%);
}
.action-card__body { position: relative; z-index: 1; }
.action-card__pin { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.16); backdrop-filter: blur(8px); display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.action-card__val { text-shadow: 0 2px 16px rgba(0,0,0,.35); }
.action-card__meter { position: relative; height: 4px; border-radius: 2px; background: rgba(255,255,255,.22); margin: 12px 0 8px; overflow: hidden; }
.action-card__meter i { display: block; height: 100%; width: 0; border-radius: 2px; background: #fff; transition: width .6s cubic-bezier(.22,1,.36,1); }
.action-card .btn { background: rgba(255,255,255,.94); color: var(--ink); }
.action-card .btn .icon { color: var(--primary); }
.action-card.is-near { background: #1f5e46; }
.action-card.is-near.action-card--photo::after { background: linear-gradient(160deg, rgba(20,60,44,.35) 0%, rgba(14,44,32,.78) 100%); }
.action-card.is-near .action-card__meter i { background: #6be0a6; width: 100% !important; }
.action-card.is-near .action-card__pin { background: #2fbf77; }
.action-card.is-near .btn { background: var(--primary); color: #fff; }
.action-card.is-near .btn .icon { color: #fff; }

/* ラリー名の横のアイコン（アートワーク icon 枠を丸く切り抜き） */
.topbar__icon { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); flex: none; }
.cover__brand .topbar__icon { width: 30px; height: 30px; border-color: rgba(255,255,255,.9); box-shadow: none; }

.cover__alert { display: inline-block; margin-bottom: 14px; padding: 8px 12px; border-radius: 12px; background: rgba(217,74,74,.12); color: #b93a3a; font-size: 12.5px; font-weight: 600; }
