*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #FF6B6B;
  --orange: #FF9A3C;
  --yellow: #FFD93D;
  --green: #6BCB77;
  --bg: #FFF9F0;
  --surface: #fff;
  --text: #2D2D2D;
  --muted: #888;
  --border: #F0E6D3;
  --r: 16px;
  --r-sm: 10px;
  --shadow: 0 4px 20px rgba(255,107,107,.12);
  --font: 'Hiragino Kaku Gothic ProN','Hiragino Sans','Noto Sans JP',sans-serif;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100dvh; overflow-x: hidden; }

.page { display: none; min-height: 100dvh; }
.page.active { display: block; }

/* ======== TOP ======== */
.top-bg {
  min-height: 100dvh;
  background: linear-gradient(160deg, var(--red) 0%, var(--orange) 60%, var(--yellow) 100%);
  display: flex; align-items: center; justify-content: center;
}
.top-content { text-align: center; color: #fff; padding: 40px 32px; }
.top-emoji { font-size: 72px; line-height: 1; margin-bottom: 20px; }
.top-title { font-size: 34px; font-weight: 900; line-height: 1.2; text-shadow: 0 2px 6px rgba(0,0,0,.2); margin-bottom: 10px; }
.top-title span { font-size: 26px; opacity: .9; }
.top-sub { font-size: 15px; opacity: .85; margin-bottom: 48px; }
.top-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 20px 40px;
  background: #fff; color: var(--red);
  border: none; border-radius: 100px;
  font-size: 18px; font-weight: 900; font-family: var(--font);
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
  transition: transform .15s, box-shadow .15s;
  margin-bottom: 20px;
}
.top-btn:active { transform: scale(.97); box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.top-note { font-size: 12px; opacity: .75; }

/* ======== LOADING ======== */
#page-loading {
  background: linear-gradient(160deg, var(--red) 0%, var(--orange) 60%, var(--yellow) 100%);
  display: none; align-items: center; justify-content: center;
}
#page-loading.active { display: flex; }
.loading-wrap { text-align: center; color: #fff; padding: 40px 24px; }
.loading-ring { width: 72px; height: 72px; border: 5px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 28px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-title { font-size: 26px; font-weight: 900; margin-bottom: 10px; }
.loading-sub { font-size: 14px; opacity: .9; margin-bottom: 24px; line-height: 1.6; }
.loading-tip-box { background: rgba(255,255,255,.2); border-radius: 12px; padding: 14px 20px; font-size: 13px; min-height: 48px; display: flex; align-items: center; justify-content: center; }

/* ======== RESULT ======== */
.result-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.back-btn { border: none; background: transparent; font-size: 15px; font-weight: 700; color: var(--red); cursor: pointer; font-family: var(--font); }
.weather-badge { display: flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; }
.weather-badge img { width: 30px; height: 30px; }

.result-hero { background: linear-gradient(135deg, var(--red), var(--orange)); padding: 20px 20px 28px; text-align: center; color: #fff; position: relative; }
.result-hero::after { content: ''; position: absolute; bottom: -18px; left: -10px; right: -10px; height: 36px; background: var(--bg); border-radius: 50% 50% 0 0; }
.hero-note { font-size: 15px; font-weight: 800; line-height: 1.5; margin-bottom: 6px; }
.hero-weather { font-size: 12px; opacity: .88; }

/* ======== SPOT CARD ======== */
.spots-list { padding: 30px 14px 16px; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }

.spot-card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; }

/* 写真 */
.spot-photo { width: 100%; height: 180px; object-fit: cover; display: block; background: linear-gradient(135deg, #FFE8E8, #FFD6B0); }
.spot-photo-error { width: 100%; height: 180px; display: flex; align-items: center; justify-content: center; font-size: 48px; background: linear-gradient(135deg, #FFF0F0, #FFE8D6); }

.spot-body { padding: 14px 14px 0; }

.spot-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.spot-num { width: 24px; height: 24px; background: var(--red); color: #fff; border-radius: 50%; font-size: 12px; font-weight: 900; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.spot-cat { padding: 2px 8px; background: #FFF0F0; color: var(--red); border-radius: 100px; font-size: 11px; font-weight: 700; }
.spot-name { font-size: 17px; font-weight: 800; line-height: 1.3; margin-bottom: 2px; }
.spot-addr { font-size: 11px; color: var(--muted); margin-bottom: 10px; }

.spot-buzz {
  border-left: 3px solid var(--yellow);
  background: linear-gradient(135deg, #FFFBEE, #FFF5E8);
  border-radius: 0 8px 8px 0;
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1.6;
}
.spot-buzz-label { font-size: 10px; font-weight: 800; color: #C48A00; margin-bottom: 3px; }
.spot-source { font-size: 10px; color: var(--muted); margin-top: 4px; }

.spot-desc { font-size: 13px; line-height: 1.65; margin-bottom: 8px; color: var(--text); }
.spot-tips { font-size: 12px; color: #2D7A3A; background: #F0FAF2; border-radius: 8px; padding: 7px 10px; margin-bottom: 12px; line-height: 1.5; }

.spot-links { display: flex; border-top: 1px solid var(--border); }
.spot-link { flex: 1; padding: 11px 6px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: var(--text); font-size: 10px; font-weight: 700; border-right: 1px solid var(--border); transition: background .15s; }
.spot-link:last-child { border-right: none; }
.spot-link:active { background: #FFF0F0; }
.spot-link-icon { font-size: 18px; }
.spot-link-label { color: var(--muted); }

/* ======== BOTTOM ======== */
.bottom-action { padding: 8px 14px 48px; max-width: 480px; margin: 0 auto; }
.retry-btn { width: 100%; padding: 16px; border: none; border-radius: var(--r); font-size: 15px; font-weight: 700; font-family: var(--font); cursor: pointer; background: var(--red); color: #fff; }
