:root{
  --sky-top:#79c2ec;
  --sky-bottom:#cfe9f7;
  --cream:#faf6ee;
  --card:#ffffff;
  --ink:#3a3128;
  --ink-soft:#8a7f6f;
  --line:#ece4d4;
  --green:#5fae6e;
  --green-soft:#eaf5ea;
  --amber-soft:#fbf1de;
  --radius-lg:28px;
  --radius-md:18px;
}
*{box-sizing:border-box;}
html,body{ height:100%; }
body{
  margin:0;
  font-family:'Zen Maru Gothic', sans-serif;
  background:var(--cream);
  color:var(--ink);
}

/* スクロールは効かせつつバーは常に非表示 */
*{
  scrollbar-width:none;      /* Firefox */
  -ms-overflow-style:none;   /* Edge/IE */
}
*::-webkit-scrollbar{
  display:none;               /* Chrome/Safari */
  width:0; height:0;
}
.hand{ font-family:'Klee One', cursive; }

#root{
  max-width:480px;
  margin:0 auto;
  min-height:100vh;
  background:var(--cream);
  display:flex;
  flex-direction:column;
  position:relative;
}

/* ---------- App bar ---------- */
.appbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 20px 10px;
}
.appbar .icon-btn{
  width:34px;height:34px;
  display:flex;align-items:center;justify-content:center;
  color:var(--ink);
  background:none;
  border:none;
  padding:0;
  cursor:pointer;
  font-family:inherit;
}

/* ---------- ハンバーガーメニュー ---------- */
.menu-backdrop{
  position:fixed;
  inset:0;
  background:rgba(40,32,20,.28);
  z-index:20;
}
.menu-panel{
  position:absolute;
  top:56px; left:16px;
  width:180px;
  background:#fff;
  border-radius:18px;
  padding:8px;
  box-shadow:0 10px 26px rgba(40,30,10,.22);
  z-index:21;
  display:flex;
  flex-direction:column;
  gap:2px;
}
.menu-item{
  display:flex;
  align-items:center;
  gap:10px;
  background:none;
  border:none;
  font-family:inherit;
  font-size:13.5px;
  color:var(--ink);
  padding:10px 10px;
  border-radius:12px;
  cursor:pointer;
  text-align:left;
}
.menu-item svg{ width:19px; height:19px; flex-shrink:0; }
.menu-item.active{ background:var(--green-soft); color:#3d7a48; font-weight:700; }
.menu-note{
  font-size:10.5px;
  color:var(--ink-soft);
  padding:8px 10px 4px;
  border-top:1px solid var(--line);
  margin-top:4px;
}
.appbar h1{
  font-size:19px;
  font-weight:700;
  margin:0;
  letter-spacing:.02em;
}

/* ---------- scroll area ---------- */
.screen{
  flex:1;
  overflow-y:auto;
  padding-bottom:96px;
}

/* ---------- hero (home) ---------- */
.hero{
  position:relative;
  margin:4px 16px 0;
  border-radius:var(--radius-lg);
  overflow:hidden;
  background:linear-gradient(var(--sky-top), var(--sky-bottom));
  min-height:250px;
}
.hero img.bg{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  opacity:.9;
}
.hero .bubble{
  position:absolute;
  top:14px; left:14px;
  max-width:58%;
  width:max-content;
  background:#fffdfa;
  border-radius:24px;
  padding:12px 16px;
  font-size:12px;
  line-height:1.7;
  font-weight:500;
  box-shadow:0 6px 16px rgba(60,45,20,.14);
  white-space:pre-line;
}
.hero .bubble::before{
  content:"";
  position:absolute;
  bottom:-8px; left:26px;
  width:16px; height:16px;
  background:#fffdfa;
  border-radius:0 0 0 16px;
  transform:rotate(-20deg);
}
.hero .bubble::after{
  content:"";
  position:absolute;
  bottom:-16px; left:18px;
  width:8px; height:8px;
  background:#fffdfa;
  border-radius:50%;
}
.hero .buta{
  position:absolute;
  left:8px; bottom:10px;
  width:52%;
  max-width:210px;
  filter:drop-shadow(0 8px 10px rgba(40,30,10,.18));
}
/* ---------- cards ---------- */
.card{
  background:var(--card);
  margin:14px 16px 0;
  border-radius:var(--radius-md);
  padding:16px 18px;
  box-shadow:0 2px 10px rgba(60,45,20,.06);
}
.card .card-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  margin-bottom:10px;
}
.card .card-head h2{
  font-size:15px;
  margin:0;
  font-weight:700;
}
.card .card-head time{
  font-size:11px;
  color:var(--ink-soft);
}

.now-row{
  display:flex;
  align-items:center;
  gap:14px;
}
.now-row img{
  width:64px;height:64px;
  object-fit:contain;
  flex-shrink:0;
}
.now-row .level-name{
  font-size:21px;
  font-weight:700;
  margin:0 0 4px;
  display:flex;
  align-items:center;
  gap:8px;
}
.status-badge{
  display:inline-block;
  font-size:10px;
  font-weight:700;
  padding:3px 9px;
  border-radius:10px;
  flex-shrink:0;
}
.status-badge.observed{ background:var(--green-soft); color:#3d7a48; }
.status-badge.reference{ background:var(--amber-soft); color:#a3721f; }
.status-badge.pending{ background:var(--line); color:var(--ink-soft); }

/* データが取れていない時のぶた画像(彩度を落として区別する) */
.img-muted{
  filter:grayscale(1) opacity(.55);
}
.now-row p{
  font-size:12.5px;
  color:var(--ink-soft);
  margin:0;
  line-height:1.55;
}

.chips{
  display:flex;
  gap:8px;
  margin-top:14px;
}
.chip{
  flex:1;
  background:var(--green-soft);
  border-radius:14px;
  padding:9px 4px;
  text-align:center;
  font-size:13px;
  font-weight:700;
  color:#3d7a48;
}
.chip span{
  display:block;
  font-size:10px;
  color:var(--ink-soft);
  font-weight:500;
  margin-top:2px;
}

.tip-card{
  display:flex;
  align-items:center;
  gap:12px;
}
.tip-card .tip-text{ flex:1; }
.tip-card .tip-text h2{
  font-size:12.5px;
  color:#3d7a48;
  display:flex;
  align-items:center;
  gap:4px;
  margin:0 0 6px;
}
.tip-card .tip-text p{
  font-size:13px;
  line-height:1.6;
  margin:0;
}
.tip-card img{
  width:52px;height:52px;
  object-fit:contain;
  flex-shrink:0;
}

/* ---------- tab bar ---------- */
.tabbar{
  position:sticky;
  bottom:0;
  display:flex;
  background:#fff;
  border-top:1px solid var(--line);
  padding:8px 4px calc(8px + env(safe-area-inset-bottom));
}
.tab{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:3px;
  background:none;
  border:none;
  font-family:inherit;
  font-size:10.5px;
  color:var(--ink-soft);
  padding:4px 0;
  cursor:pointer;
}
.tab.active{ color:var(--green); font-weight:700; }
.tab svg{ width:22px; height:22px; }

/* ---------- 現状タブ (voting) ---------- */
.vote-title{ padding:22px 20px 4px; }
.vote-title h2{ font-size:18px; margin:0 0 4px; }
.vote-title p{ font-size:12.5px; color:var(--ink-soft); margin:0; }

.vote-grid{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:16px;
}
.vote-option{
  display:flex;
  align-items:center;
  gap:14px;
  background:var(--card);
  border:2px solid var(--line);
  border-radius:var(--radius-md);
  padding:10px 16px;
  cursor:pointer;
  text-align:left;
  font-family:inherit;
  width:100%;
}
.vote-option img{ width:46px;height:46px; object-fit:contain; }
.vote-option .label{ font-size:15px; font-weight:700; }
.vote-option.selected{
  border-color:var(--green);
  background:var(--green-soft);
}
.vote-thanks{
  margin:0 16px;
  background:var(--green-soft);
  border-radius:var(--radius-md);
  padding:16px 18px;
  display:flex;
  align-items:center;
  gap:12px;
}
.vote-thanks img{ width:48px;height:48px; }
.vote-thanks p{ margin:0; font-size:13px; line-height:1.6; }

.agg-card .agg-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:9px;
  font-size:12px;
}
.agg-row .agg-label{ width:78px; flex-shrink:0; color:var(--ink-soft); }
.agg-row .agg-bar-bg{
  flex:1; height:8px; background:var(--line); border-radius:6px; overflow:hidden;
}
.agg-row .agg-bar{ height:100%; background:var(--green); }
.agg-row .agg-pct{ width:32px; text-align:right; color:var(--ink-soft); }

/* ---------- 予報タブ ---------- */
.day-tabs{
  display:flex;
  gap:8px;
  padding:16px 16px 4px;
  overflow-x:auto;
}
.day-tab{
  flex-shrink:0;
  min-width:56px;
  text-align:center;
  background:var(--card);
  border:2px solid var(--line);
  border-radius:14px;
  padding:8px 4px;
  cursor:pointer;
  font-family:inherit;
}
.day-tab .dow{ font-size:11px; color:var(--ink-soft); }
.day-tab .day{ font-size:15px; font-weight:700; }
.day-tab.active{ border-color:var(--green); background:var(--green-soft); }
.day-tab.active .dow{ color:#3d7a48; }

.hour-list{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:12px 16px 16px;
}
.hour-row{
  display:flex;
  align-items:center;
  gap:12px;
  background:var(--card);
  border-radius:14px;
  padding:9px 14px;
  box-shadow:0 1px 6px rgba(60,45,20,.05);
}
.hour-row .htime{ width:42px; flex-shrink:0; font-size:12.5px; font-weight:700; color:var(--ink-soft); }
.hour-row img{ width:30px;height:30px;object-fit:contain; }
.hour-row .hlabel{ flex:1; font-size:13px; font-weight:700; }
.hour-row .htemp{ font-size:12px; color:var(--ink-soft); }

/* ---------- コラムタブ ---------- */
.column-list{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:16px;
}
.column-item{
  display:flex;
  gap:12px;
  background:var(--card);
  border-radius:16px;
  padding:12px;
  box-shadow:0 2px 8px rgba(60,45,20,.05);
  border:none;
  width:100%;
  text-align:left;
  font-family:inherit;
  cursor:pointer;
}
.column-item .thumb,
.column-item .thumb-img{
  width:64px;height:64px;
  border-radius:12px;
  flex-shrink:0;
}
.column-item .thumb{
  background:var(--amber-soft);
  display:flex;align-items:center;justify-content:center;
  font-size:28px;
}
.column-item .thumb-img{
  object-fit:cover;
}
.column-item .ctext{ flex:1; min-width:0; }
.column-item .ctag{ font-size:10.5px; color:#3d7a48; font-weight:700; }
.column-item h3{ font-size:14px; margin:4px 0 4px; line-height:1.4; }
.column-item p{ font-size:11.5px; color:var(--ink-soft); margin:0; line-height:1.5; }

/* ---------- 記事詳細 ---------- */
.article-detail{ padding:16px 20px 24px; }
.back-btn{
  display:flex;
  align-items:center;
  gap:4px;
  background:none;
  border:none;
  font-family:inherit;
  font-size:12.5px;
  color:var(--ink-soft);
  padding:6px 0 14px;
  cursor:pointer;
}
.back-btn svg{ width:17px; height:17px; }
.article-hero-img{
  width:100%;
  border-radius:16px;
  object-fit:cover;
  max-height:200px;
  margin-bottom:14px;
}
.article-meta{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}
.article-meta time{ font-size:11px; color:var(--ink-soft); }
.article-title{
  font-size:19px;
  line-height:1.5;
  margin:0 0 14px;
}
.article-body{
  font-size:13.5px;
  line-height:1.85;
  color:var(--ink);
}
.article-body p{ margin:0 0 14px; }
.article-body ul, .article-body ol{ margin:0 0 14px; padding-left:1.3em; }
.article-body li{ margin-bottom:6px; }
.article-body img{
  width:100%;
  border-radius:14px;
  margin:6px 0 14px;
}
.article-body strong{ color:#3d7a48; }

.section-pad{ padding:20px 20px 0; }

/* ---------- 予報タブ(準備中) ---------- */
.forecast-pending{
  margin:20px 16px 0;
  background:var(--card);
  border-radius:var(--radius-md);
  padding:32px 24px;
  text-align:center;
  box-shadow:0 2px 10px rgba(60,45,20,.06);
}
.forecast-pending img{
  width:72px;height:72px;
  object-fit:contain;
  margin-bottom:14px;
  opacity:.85;
}
.forecast-pending .fp-title{
  font-size:15px;
  font-weight:700;
  margin:0 0 8px;
}
.forecast-pending .fp-desc{
  font-size:12.5px;
  color:var(--ink-soft);
  line-height:1.7;
  margin:0;
}
