:root {
  --bg: #f4f6fb;
  --fg: #1a1a1a;
  --accent: #1565c0;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* ---------- ホーム ---------- */
.home-header { text-align: center; padding: 24px 16px 8px; }
.home-header h1 { margin: 0; font-size: clamp(1.8rem, 6vw, 2.6rem); }

/* トップの日めくり */
.home-cal { padding: 18px 16px 6px; }
.hc-date { margin: 0; font-size: clamp(2rem, 9vw, 3rem); font-weight: 900; line-height: 1.1; }
.hc-week.sun { color: #d32f2f; }
.hc-week.sat { color: #1565c0; }
.hc-holiday {
  display: inline-block; margin: 10px 0 0; padding: 6px 18px;
  background: #ffebee; color: #b71c1c; border: 2px solid #ef9a9a; border-radius: 999px;
  font-size: clamp(1rem, 4vw, 1.3rem); font-weight: 800;
}
.hc-season { margin: 8px 0 0; font-size: clamp(1.05rem, 4.4vw, 1.4rem); color: #00695c; font-weight: 700; }
.home-guide {
  text-align: center; margin: 8px 16px 0; font-weight: 700; color: #444;
  font-size: clamp(1.05rem, 4.4vw, 1.35rem);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  padding: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 140px;
  padding: 18px 12px;
  border-radius: 22px;
  background: var(--c, var(--accent));
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .15);
  transition: transform .08s ease;
}
.tile:active { transform: scale(.96); }
.tile-icon { font-size: clamp(2.6rem, 12vw, 3.6rem); line-height: 1; }
.tile-title {
  font-size: clamp(1.1rem, 4.5vw, 1.5rem);
  font-weight: 700;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

.home-footer { text-align: center; padding: 24px 16px 40px; }
.home-footer a { color: #888; text-decoration: none; font-size: .95rem; }
.empty { grid-column: 1 / -1; text-align: center; color: #666; }

/* ---------- 音楽（ページ内 YouTube 再生）---------- */
.music-header { padding-top: 16px; }
.back-home {
  display: inline-block;
  margin-bottom: 10px;
  padding: 12px 22px;
  font-size: clamp(1.1rem, 4.5vw, 1.4rem);
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .15);
}
.back-home:active { transform: scale(.96); }

.player-wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}
.player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: none;            /* 最初は非表示。曲を押すと表示 */
}
.player-hint {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: #fff;
  font-size: clamp(1.1rem, 4.5vw, 1.5rem);
  font-weight: 700;
}

.music-grid { padding-top: 20px; }
.song { border: 0; font: inherit; cursor: pointer; }
.song.playing { outline: 5px solid #ffd54f; outline-offset: 2px; }

/* ---------- ラジオ ---------- */
.radio-wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; }
.radio-now {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: #fff; border-radius: 16px; padding: 18px 16px; margin: 8px 0 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.radio-now-text { margin: 0; font-size: clamp(1.1rem, 4.6vw, 1.5rem); font-weight: 800; text-align: center; }
.radio-stop {
  border: 0; border-radius: 999px; padding: 12px 28px; cursor: pointer;
  font-size: clamp(1.05rem, 4.4vw, 1.3rem); font-weight: 800; color: #fff; background: #c62828;
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
}
.radio-stop:active { transform: scale(.96); }

.radio-grid { padding-top: 14px; }
.station { border: 0; font: inherit; cursor: pointer; position: relative; }
.station-desc { font-size: clamp(.78rem, 3vw, .95rem); font-weight: 600; opacity: .92; text-align: center; }
.station.playing { outline: 5px solid #ffd54f; outline-offset: 2px; }
.radio-note { text-align: center; color: #666; font-size: .92rem; margin: 16px 4px 0; line-height: 1.5; }

/* ---------- お天気 ---------- */
.wx-wrap { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; }

.wx-alert { border-radius: 16px; padding: 18px 20px; margin: 14px 0; text-align: center; }
.wx-alert-title { margin: 0; font-size: clamp(1.3rem, 5.5vw, 1.8rem); font-weight: 800; }
.wx-alert-sub { margin: 8px 0 0; font-size: clamp(1rem, 4vw, 1.25rem); font-weight: 700; }
.wx-alert.ok { background: #e8f5e9; color: #1b5e20; }
.wx-alert.ok.small { padding: 14px 18px; }
.wx-alert.lv1 { background: #fff8e1; color: #8d6e00; border: 2px solid #ffd54f; }
.wx-alert.lv2 { background: #fff0e0; color: #b34700; border: 3px solid #fb8c00; }
.wx-alert.lv3 { background: #ffebee; color: #b71c1c; border: 4px solid #d32f2f; }

.wx-typhoon { background: #fff; border-radius: 16px; padding: 16px; margin: 14px 0; box-shadow: 0 2px 10px rgba(0,0,0,.08); text-align: center; }
.wx-typhoon h2 { margin: 4px 0 10px; font-size: clamp(1.3rem, 5.5vw, 1.7rem); color: #b34700; }
.wx-typhoon-name { margin: 14px 0 8px; font-size: clamp(1.15rem, 4.6vw, 1.4rem); font-weight: 800; }
.wx-typhoon-img { width: 100%; max-width: 560px; height: auto; border-radius: 12px; border: 1px solid #e0e0e0; }
.wx-note { margin: 12px 4px 2px; font-size: .95rem; color: #555; line-height: 1.5; }

.wx-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 8px; }
.wx-day { background: #fff; border-radius: 16px; padding: 14px 8px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.wx-day-label { margin: 0; font-size: clamp(1rem, 4vw, 1.3rem); font-weight: 800; }
.wx-day-emoji { margin: 6px 0; font-size: clamp(2.6rem, 13vw, 3.4rem); line-height: 1; }
.wx-day-text { margin: 6px 2px; font-size: clamp(.82rem, 3.2vw, 1rem); color: #333; min-height: 2.6em; }
.wx-day-temp { margin: 6px 0 4px; font-size: clamp(1.1rem, 4.5vw, 1.4rem); font-weight: 800; }
.wx-day-temp .t-max { color: #e53935; }
.wx-day-temp .t-min { color: #1e88e5; }
.wx-day-temp .t-sep { color: #aaa; margin: 0 2px; }
.wx-day-pop { margin: 2px 0 0; font-size: clamp(.9rem, 3.6vw, 1.1rem); color: #0277bd; font-weight: 700; }

.wx-source { text-align: center; color: #888; font-size: .85rem; margin: 14px 0 0; }
