/* そらのこと トップページ試作品 Ver.0.3 / シンプル・スマホ優先 */
:root {
  color-scheme: light;
  --ink: #223b4a;
  --muted: #687f8d;
  --blue: #2a6f91;
  --pale: #edf6fa;
  --line: #ddeaf0;
  --body: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--ink); background: #fff; font-family: var(--body); line-height: 1.7; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }
:focus-visible { outline: 3px solid #4187ad; outline-offset: 4px; }
.container { width: min(100% - 48px, 1030px); margin-inline: auto; }
.skip-link { position: fixed; top: 9px; left: 9px; z-index: 100; background: #fff; padding: 9px 14px; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
#news, #weather, #climate, #disaster, #about, #contact { scroll-margin-top: 82px; }

/* ヘッダーは細く、主張しすぎない */
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.98); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 65px; }
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-mark { width: 35px; height: 35px; flex: 0 0 auto; }
.brand-name { font-weight: 800; letter-spacing: .08em; font-size: 21px; }
.site-nav { display: flex; gap: 22px; align-items: center; }
.site-nav a { font-size: 12px; font-weight: 600; color: #486779; white-space: nowrap; }
.site-nav a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.menu-toggle { display: none; }

/* 写真・イラストは帯状に。画像には文字を置かない */
.sky-band { width: 100%; height: clamp(128px, 18vw, 224px); background: #94bed0 url("assets/hero-sky.svg") center 54% / cover no-repeat; }
.intro { padding: 31px 0 23px; text-align: center; }
.intro h1 { margin: 0; font-size: clamp(22px, 2.9vw, 31px); line-height: 1.48; font-weight: 800; letter-spacing: .025em; }
.intro p { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.mobile-break { display: none; }

/* 新着記事はトップにコンパクトに置く */
.latest { margin: 0 auto; max-width: 840px; }
.compact-heading { display: flex; gap: 15px; align-items: center; margin: 0 0 11px; }
.compact-heading h2 { margin: 0; white-space: nowrap; font-size: 18px; font-weight: 800; line-height: 1.55; letter-spacing: .04em; }
.section-rule { height: 1px; flex: 1; background: var(--line); }
.latest-list { display: flex; overflow-x: auto; gap: 12px; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 4px; }
.latest-list:empty { display: none; }
.article-card { flex: 0 0 min(100%, 350px); display: flex; gap: 12px; min-width: 0; scroll-snap-align: start; align-items: center; border: 1px solid var(--line); border-radius: 9px; padding: 9px; }
.article-card:hover { border-color: #a0cada; }
.article-card__image { width: 125px; height: 89px; flex: 0 0 125px; background: var(--pale); overflow: hidden; border-radius: 5px; }
.article-card__image img { width: 100%; height: 100%; object-fit: cover; }
.article-card__body { min-width: 0; }
.article-card__meta { display: flex; flex-wrap: wrap; gap: 3px 9px; color: var(--muted); font-size: 10px; }
.article-card__label { color: var(--blue); font-weight: 700; }
.article-card h3 { font-size: 13px; font-weight: 700; line-height: 1.55; margin: 5px 0 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.latest-empty { display: flex; gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 9px; }
.latest-empty img { width: 127px; height: 86px; object-fit: cover; border-radius: 5px; }
.latest-empty__text { display: flex; flex-direction: column; gap: 3px; }
.latest-empty strong { font-size: 15px; letter-spacing: .015em; }
.latest-empty span { color: var(--muted); font-size: 12px; }

/* 3つの丸アイコン。リンク先は同一ページ下部の各カテゴリー */
.category-jumps { padding: 28px 0 34px; max-width: 840px; margin-inline: auto; }
.compact-heading--category { margin-bottom: 16px; }
.jump-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; max-width: 570px; margin-inline: auto; }
.jump-item { display: flex; flex-direction: column; gap: 7px; align-items: center; text-align: center; font-size: 13px; font-weight: 700; line-height: 1.45; color: #3d5c6d; }
.jump-circle { display: grid; place-items: center; width: 83px; height: 83px; border-radius: 50%; transition: transform .18s ease, box-shadow .18s ease; }
.jump-circle svg { width: 45px; height: 45px; }
.jump-circle--weather { color: #418ba9; background: #e7f5fa; }
.jump-circle--climate { color: #558b7c; background: #eaf4ed; }
.jump-circle--disaster { color: #b07f56; background: #faf2e6; }
.jump-item:hover .jump-circle { transform: translateY(-2px); box-shadow: 0 5px 14px rgba(25,80,108,.1); }

/* ファーストビューの下は、3分野のイメージ画像で読み物の入口をつくる。 */
.below-fold { background: #f8fbfc; border-top: 1px solid #eaf0f3; border-bottom: 1px solid #eaf0f3; padding: 12px 0; }
.topic { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 65px); align-items: center; padding: 47px 0; border-bottom: 1px solid #dbe7ed; }
.topic:last-child { border-bottom: 0; }
/* PCでは中央の画像を反転し、3つの景色が単調に並ばないようにする */
.topic:nth-child(even) .topic-visual { order: 2; }
.topic-visual { width: 100%; aspect-ratio: 800/460; border-radius: 10px; overflow: hidden; background: #dcecf2; box-shadow: 0 4px 16px rgba(32, 73, 89, .065); }
.topic-visual img { display: block; width: 100%; height: 100%; object-fit: cover; }
.topic-body { min-width: 0; }
.topic-index { display: inline-block; color: #78a1b5; font-size: 12px; font-weight: 800; letter-spacing: .15em; }
.topic h2 { margin: 7px 0 13px; font-size: clamp(22px, 2.6vw, 27px); letter-spacing: .025em; line-height: 1.45; }
.topic-content p { margin: 0 0 18px; color: #506d7c; font-size: 14px; line-height: 2; }
.topic-note { display: block; color: #8296a0; font-size: 12px; }
.topic-articles { display: grid; gap: 7px; }
.topic-article-link { display: block; width: fit-content; font-size: 13px; font-weight: 700; color: var(--blue); text-decoration: underline; text-underline-offset: 4px; }
.topic-article-link::before { content: '›'; margin-right: 8px; }

/* サイト案内も装飾を控えめに */
.simple-section { padding-block: 57px; }
.minor-label { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .16em; color: #74a0b7; }
.simple-section h2 { margin: 0 0 19px; font-size: 23px; }
.simple-section > p:not(.minor-label) { font-size: 14px; line-height: 2; color: #506c7c; margin: 0 0 10px; }
.simple-section .about-motto { color: #2a6786 !important; font-size: 17px !important; font-weight: 700; }
.contact { background: #edf5f8; }
.pending-note { font-size: 12px !important; color: #7794a4 !important; }
.site-footer { background: #183e54; color: #f6fbfd; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 25px 48px; padding-block: 42px 30px; }
.footer-brand { font-size: 20px; font-weight: 800; letter-spacing: .06em; }
.footer-inner p { font-size: 11px; color: #d0e4ed; margin: 4px 0 0; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 10px 19px; max-width: 500px; }
.footer-inner nav a, .footer-inner nav span { font-size: 11px; color: #d7e8f0; }
.footer-inner nav a:hover { text-decoration: underline; }
.footer-inner nav span { opacity: .65; }
.footer-inner small { width: 100%; color: #a8c4d2; font-size: 11px; border-top: 1px solid #3b5c6d; padding-top: 15px; }

@media (max-width: 840px) {
  .header-inner { min-height: 61px; }
  .site-nav { display: none; position: absolute; inset: 100% 0 auto; flex-direction: column; align-items: stretch; gap: 0; background: #fff; padding: 8px 23px 18px; box-shadow: 0 12px 18px rgba(32,68,83,.11); border-top: 1px solid var(--line); }
  .site-nav.is-open { display: flex; }
  .site-nav a { font-size: 14px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
  .menu-toggle { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 41px; height: 41px; gap: 5px; cursor: pointer; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
  .menu-toggle span { height: 2px; width: 20px; background: var(--ink); border-radius: 4px; transition: transform .2s, opacity .2s; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 600px) {
  #news, #weather, #climate, #disaster, #about, #contact { scroll-margin-top: 72px; }
  .container { width: calc(100% - 36px); }
  .header-inner { min-height: 56px; }
  .brand-mark { width: 33px; height: 33px; }
  .brand-name { font-size: 19px; }
  .sky-band { height: clamp(86px, 26vw, 123px); background-position: center 48%; }
  .intro { padding: 23px 0 20px; }
  .intro h1 { font-size: clamp(20px, 5.6vw, 25px); line-height: 1.45; letter-spacing: 0; }
  .mobile-break { display: initial; }
  .intro p { font-size: 12px; margin-top: 6px; }
  .compact-heading { margin-bottom: 10px; }
  .compact-heading h2 { font-size: 16px; }
  .latest-list { gap: 9px; }
  .article-card { flex-basis: 100%; padding: 7px; }
  .article-card__image { width: 110px; height: 77px; flex-basis: 110px; }
  .article-card h3 { font-size: 12px; }
  .article-card__meta { font-size: 9.5px; }
  .latest-empty { padding: 7px; gap: 11px; }
  .latest-empty img { width: 110px; height: 77px; }
  .latest-empty strong { font-size: 14px; }
  .latest-empty span { font-size: 11px; }
  .category-jumps { padding: 26px 0 25px; }
  .compact-heading--category { margin-bottom: 13px; }
  .jump-list { gap: 5px; }
  .jump-item { gap: 7px; font-size: 11px; }
  .jump-circle { width: 70px; height: 70px; }
  .jump-circle svg { width: 38px; height: 38px; }
  .below-fold { padding: 4px 0; }
  .topic { grid-template-columns: 1fr; gap: 15px; padding: 29px 0 32px; }
  .topic:nth-child(even) .topic-visual { order: initial; }
  .topic-visual { border-radius: 8px; }
  .topic-index { font-size: 11px; }
  .topic h2 { margin: 3px 0 9px; font-size: 20px; }
  .topic-content p { font-size: 13px; margin-bottom: 12px; }
  .simple-section { padding-block: 39px; }
  .simple-section h2 { font-size: 20px; }
  .simple-section > p:not(.minor-label) { font-size: 13px; }
  .simple-section .about-motto { font-size: 15px !important; }
  .footer-inner { padding-block: 33px 23px; }
  .footer-inner nav { gap: 8px 18px; }
}
@media (max-width: 340px) {
  .container { width: calc(100% - 30px); }
  .intro h1 { font-size: 19px; }
  .jump-circle { width: 62px; height: 62px; }
  .jump-circle svg { width: 34px; height: 34px; }
  .jump-item { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
/* JSで記事が追加された際、未公開メッセージを確実に隠す */
.latest-empty[hidden] { display: none; }
