
/* ===== 豊田地域文化広場 新骨格（中村・富田図書館の骨格を踏襲） ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: Verdana, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 14px;
  line-height: 1.8;
  color: #333;
  margin: 0;
  background-color: #cdcdcd;
}
a { color: #0000ff; }
a:visited { color: #0000ff; }
img { max-width: 100%; height: auto; }
iframe { max-width: 100%; }

.wrapper { max-width: 770px; margin: 0 auto; background-color: #ffffff; }

/* ===== ヘッダー画像 ===== */
header h1 { margin: 0; font-size: 0; line-height: 0; }
header img { display: block; width: 100%; height: auto; }

/* ===== ナビゲーション ===== */
#nav_all { display: flex; flex-wrap: wrap; padding: 1px; background-color: #ffffff; }
#nav_all a { text-decoration: none; color: #ffffff; margin: 1px; flex: 1 1 100px; min-width: 0; }
.nav-btn {
  display: flex; align-items: center; justify-content: center;
  height: 30px; text-align: center; font-size: 12px; white-space: nowrap;
  background-color: #027eb4; color: #ffffff; cursor: pointer;
}
.nav-btn:hover { background-color: #ffe4b5; color: #000000; }
.nav-btn.current { background-color: #BCC8DB; color: #000000; }

/* ===== メイン ===== */
#main { padding: 8px 20px 24px; }
.sec-title {
  background-color: #027eb4; color: #ffffff;
  padding: 5px 8px; margin: 24px 0 8px; font-size: 16px; font-weight: bold;
}
.sub-title {
  color: #003366; border-bottom: 2px solid #027eb4;
  padding-bottom: 3px; margin: 18px 0 8px; font-size: 15px;
}
p { margin: 6px 0; }
hr { border: none; border-top: 1px dashed #aaa; margin: 14px 0; }
dt { margin: 5px 0; }

.note { margin: 6px 0; }
.lead-label { font-weight: bold; color: #003366; margin: 14px 0 4px; }
ul.plain { list-style: none; margin: 4px 0 10px; padding: 0; }
ul.plain li { padding: 2px 0 2px 16px; position: relative; }
ul.plain li::before { content: '・'; position: absolute; left: 0; }
.news-date { font-weight: bold; margin: 14px 0 2px; }
.badge-new { color: #cc0000; font-weight: bold; margin-left: 6px; }

/* ===== 関連リンク・バナー ===== */
ul.link-list { list-style: none; margin: 6px 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.link-grid { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 14px; }
.link-grid a { display: block; }
.link-grid img { display: block; width: 190px; height: 60px; object-fit: contain; background-color: #ffffff; border: 1px solid #ccc; }
.banner-area { background-color: #f0f0f0; padding: 6px; margin-top: 14px; }
.banner-area .link-grid { margin: 0; }
.link-grid img.banner-label { width: auto; height: 46px; border: 0; background: transparent; align-self: center; }

/* ===== イベント・講座（追加用スペース） ===== */
.event-space { min-height: 120px; margin: 8px 0 14px; }
.event-empty { color: #666; margin: 8px 0; }
.event-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0; }
.event-item { width: calc(50% - 7px); border: 1px solid #ccc; padding: 6px; background-color: #ffffff; }
.event-item img { display: block; width: 100%; height: auto; }
.event-item .event-date { margin: 6px 0 0; font-weight: bold; color: #003366; }
.event-item .event-name { margin: 2px 0 0; }

/* ===== 建物概要・開館時間 ===== */
table.info { border-collapse: collapse; width: 100%; margin: 8px 0 12px; }
table.info th, table.info td { border: 1px solid #aaa; padding: 6px 10px; text-align: left; vertical-align: top; }
table.info th { background-color: #dce8f5; width: 26%; white-space: nowrap; }
.plan-img img { width: 85%; max-width: 560px; border: 1px solid #ccc; display: block; margin: 8px 0; }

/* ===== 施設内の紹介 ===== */
.room-cards { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.room-card { width: calc(33.333% - 6px); border: 1px solid #ccc; background-color: #ffffff; }
.room-title { background-color: #2d6fad; color: #ffffff; font-weight: bold; padding: 3px 8px; font-size: 13px; }
.room-card a.photo { display: block; }
.room-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.room-body { padding: 4px 8px 8px; font-size: 12px; line-height: 1.65; }
.room-use { margin: 4px 0; font-weight: bold; color: #003366; }
.room-eq { margin: 4px 0; }
.room-link { margin: 4px 0 0; }

/* ===== 料金表 ===== */
table.fee { border-collapse: collapse; width: 100%; font-size: 12px; margin: 6px 0 16px; }
table.fee caption { text-align: left; font-weight: bold; color: #003366; padding: 4px 0; font-size: 13px; }
table.fee th, table.fee td { border: 1px solid #aaa; padding: 4px 6px; text-align: center; vertical-align: middle; }
table.fee thead th { background-color: #1a4e8a; color: #ffffff; font-weight: bold; }
table.fee td.group { background-color: #2d6fad; color: #ffffff; font-weight: bold; font-size: 11px; }
table.fee td.lab { background-color: #dce8f5; font-weight: bold; text-align: left; padding-left: 6px; }

/* ===== アクセス ===== */
dl.access-info { margin: 6px 0; }
dl.access-info dt { font-weight: bold; margin-top: 12px; }
dl.access-info dd { margin: 4px 0 4px 1em; }
.map-wrap iframe { display: block; width: 100%; max-width: 600px; height: 380px; border: 0; margin: 8px 0; }

/* ===== フッター ===== */
footer { clear: both; }
.footer { padding: 8px 6px; background-color: #800000; color: #ffffff; text-align: center; font-size: 13px; line-height: 1.8; }
.footer a { color: #ffffff; }

/* ===== ページトップへ戻るボタン（全画面で表示・少しスクロールすると出現） ===== */
#page-top-fixed {
  position: fixed; right: 16px; bottom: 16px; z-index: 100;
  width: 52px; height: 52px; border-radius: 50%;
  background-color: #027eb4; color: #ffffff; text-decoration: none; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
#page-top-fixed.visible { opacity: .92; visibility: visible; }
#page-top-fixed:hover, #page-top-fixed:focus { background-color: #015a80; opacity: 1; color: #ffffff; }
#page-top-fixed .arrow { font-size: 18px; line-height: 1; }
#page-top-fixed .label { font-size: 10px; font-weight: bold; letter-spacing: .04em; line-height: 1.2; }

/* ===== スマートフォン・タブレット (600px以下) ===== */
@media only screen and (max-width: 600px) {
  body { background-color: #ffffff; }
  .wrapper { border: solid 2px #cdcdcd; }
  #main { padding: 4px 10px 20px; }
  #nav_all a { flex: 1 1 calc(50% - 4px); }
  #nav_all a:first-child { flex-basis: calc(100% - 2px); }
  .nav-btn { height: 32px; font-size: 13px; }
  .room-card { width: calc(50% - 4px); }
  .event-item { width: 100%; }
  .link-grid img { width: 145px; height: 46px; }
  table.fee { font-size: 10px; }
  table.fee th, table.fee td { padding: 2px 3px; }
  table.info th { white-space: normal; width: 34%; }
}
@media only screen and (max-width: 480px) {
  .room-card { width: 100%; }
}

/* ===== バリアフリーページ ===== */
table.info.bf th { width: 34%; white-space: normal; }
p.to-top { text-align: right; margin: 4px 0 0; font-size: 13px; }
.photo-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.photo-item { width: calc(50% - 5px); margin: 0; }
.photo-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid #ccc; }
.photo-item figcaption { font-size: 12px; margin-top: 2px; }
@media only screen and (max-width: 600px) { .photo-item { width: 100%; } table.info.bf th { width: 38%; } }

/* ===== お申し込み前の確認 ===== */
.notice-box { margin: 14px 0 8px; border: 3px solid #800000; background-color: #fff8e1; }
.notice-box h2 { margin: 0; padding: 6px 10px; background-color: #800000; color: #ffffff; font-size: 17px; }
.notice-points { margin: 0; padding: 8px 12px 4px 36px; }
.notice-points li { margin: 8px 0; padding-left: 4px; }
.notice-points li > b { color: #800000; font-size: 15px; }
.notice-points p { margin: 3px 0; }
.notice-foot { margin: 0; padding: 6px 12px 8px; border-top: 1px dashed #c9a24a; font-size: 13px; }

/* ===== 図書館共通 追加分 ===== */
.latest-grid { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 10px; }
.latest-card { width: calc(33.333% - 7px); border: 1px solid #ccc; background-color: #ffffff; padding: 6px; text-align: center; position: relative; }
.latest-card a.thumb { display: block; }
.latest-card img { display: block; width: 100%; height: 220px; object-fit: contain; background-color: #f4f4f4; border: 1px solid #ddd; }
.latest-card .badge { position: absolute; top: 2px; left: 2px; background-color: #cc0000; color: #ffffff; font-size: 11px; font-weight: bold; padding: 0 8px; }
.latest-card .title { font-weight: bold; margin: 6px 0 2px; color: #003366; }
.latest-card .sub { margin: 0; font-size: 13px; }
.latest-note { font-size: 13px; margin: 4px 0; }
.program-table th { width: 30%; }
.event-item[hidden] { display: none; }
.event-state { display: inline-block; background: #cc0000; color: #fff; font-size: 12px; font-weight: bold; padding: 0 8px; margin-right: 6px; }
.sns-links { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sns-links a { display: inline-block; background-color: #027eb4; color: #ffffff; text-decoration: none; padding: 8px 18px; border-radius: 4px; font-weight: bold; }
.sns-links a:hover { background-color: #015a80; }
.arch-list { margin: 4px 0 12px; padding: 0; list-style: none; }
.arch-list li { padding: 3px 0 3px 16px; position: relative; border-bottom: 1px dashed #ddd; }
.arch-list li::before { content: '・'; position: absolute; left: 0; }
.arch-year { font-weight: bold; color: #003366; margin: 12px 0 2px; }
.arch-note { background-color: #fff8e1; border: 1px solid #e0c36a; padding: 8px 12px; margin: 8px 0 14px; }
.video-wrap iframe { display: block; width: 350px; max-width: 100%; height: 250px; border: 0; margin: 6px 0; }
@media only screen and (max-width: 600px) {
  .latest-card { width: calc(50% - 5px); }
  .latest-card img { height: 180px; }
}
@media only screen and (max-width: 480px) {
  .latest-card { width: calc(50% - 5px); }
  .latest-card img { height: 150px; }
  .latest-card .title { font-size: 13px; }
}

/* ===== 図書館 追加(2) ===== */
.quick { margin: 12px 0 6px; }
.quick-main, .quick-main:link, .quick-main:visited { display: block; background-color: #027eb4; color: #ffffff; text-decoration: none; text-align: center; font-weight: bold; font-size: 17px; padding: 12px 10px; border-radius: 6px; box-shadow: 0 2px 5px rgba(0,0,0,.25); }
.quick-main:hover, .quick-main:active { background-color: #015a80; color: #ffffff; }
.quick-main small { display: block; font-weight: normal; font-size: 12px; opacity: .9; }
.quick-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.quick-row a { flex: 1 1 140px; text-align: center; text-decoration: none; font-weight: bold; padding: 10px 6px; border-radius: 6px; border: 2px solid #027eb4; background-color: #ffffff; color: #003366; }
.quick-row a:hover { background-color: #e8f2fa; }
.quick-row a small { display: block; font-weight: normal; font-size: 11px; color: #333; }
.notice-slot { margin: 12px 0 4px; }
.notice-slot .notice-item { border: 3px solid #800000; background-color: #fff8e1; padding: 8px 12px; margin: 0 0 8px; }
.notice-slot .notice-item h2 { margin: 0 0 4px; font-size: 16px; color: #800000; }
.next-date { display: block; margin-top: 4px; font-weight: bold; color: #800000; }
.next-date small { font-weight: normal; color: #444; }

/* ===== これからのイベント（カード） ===== */
.ev-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 10px 0; }
.ev-card { display: flex; gap: 0; background: #ffffff; border: 1px solid #cfd8e3; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.12); transition: box-shadow .15s, transform .15s; }
.ev-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.2); transform: translateY(-2px); }
.ev-card[hidden] { display: none; }
.ev-date { flex: 0 0 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(160deg, #027eb4, #01527a); color: #ffffff; text-align: center; padding: 6px 2px; line-height: 1.1; }
.ev-date.sat { background: linear-gradient(160deg, #2a8fd6, #1a5fa3); }
.ev-date.sun { background: linear-gradient(160deg, #d9534f, #a8322f); }
.ev-date .m { font-size: 12px; opacity: .95; }
.ev-date .d { font-size: 30px; font-weight: bold; letter-spacing: -1px; }
.ev-date .w { font-size: 12px; font-weight: bold; background: rgba(255,255,255,.25); border-radius: 10px; padding: 0 8px; margin-top: 2px; }
.ev-body { flex: 1; padding: 8px 10px; min-width: 0; }
.ev-title { margin: 0 0 2px; font-size: 14px; line-height: 1.4; color: #003366; border: 0; padding: 0; }
.ev-time { margin: 0; font-size: 12.5px; color: #333; font-weight: bold; }
.ev-place { font-weight: normal; color: #555; }
.ev-chips { margin: 4px 0 2px; display: flex; flex-wrap: wrap; gap: 4px; }
.ev-chip { font-size: 11px; font-weight: bold; padding: 0 8px; border-radius: 10px; background: #eef2f6; color: #234; border: 1px solid #cfd8e3; }
.ev-chip.open { background: #e6f6ea; color: #157a3a; border-color: #9fd6b0; }
.ev-chip.soon { background: #fff3d6; color: #8a5a00; border-color: #e8c877; }
.ev-chip.need { background: #fdeceb; color: #a02d28; border-color: #efb1ae; }
.ev-chip.closed { background: #eeeeee; color: #666; }
.ev-desc { margin: 2px 0 4px; font-size: 12.5px; line-height: 1.55; color: #333; }
.ev-link { margin: 0; font-size: 12px; text-align: right; }
.ev-more { margin: 6px 0 10px; }
.ev-more summary { cursor: pointer; font-weight: bold; color: #027eb4; padding: 6px 10px; border: 1px dashed #027eb4; border-radius: 6px; background: #f4fafd; }
@media only screen and (max-width: 600px) { .ev-grid { grid-template-columns: 1fr; } }


/* ===== 豊田地域文化広場 追加分 ===== */
[hidden] { display: none !important; }
h1, h2, h3, h4 { line-height: 1.5; }
header h1 { font-weight: normal; }
#pool-status { margin: 10px 0 14px; }
#pool-status table { max-width: 100%; }
.news-list { list-style: none; margin: 6px 0 10px; padding: 0; }
.news-list li { padding: 6px 0 6px 18px; position: relative; border-bottom: 1px dashed #ccc; }
.news-list li::before { content: '■'; position: absolute; left: 0; color: #027eb4; font-size: 11px; top: 9px; }
.news-list li small { display: block; color: #444; }
.news-entry { margin: 4px 0 10px; padding: 8px 12px; border: 1px solid #cfd8e3; border-left: 5px solid #027eb4; background-color: #f7fafc; }
.news-entry h3 { margin: 0 0 4px; font-size: 15px; color: #003366; border: 0; padding: 0; }
.news-entry p { margin: 3px 0; }
.news-entry .date { margin: 0 0 2px; font-weight: bold; }
.season-now { display: inline-block; background-color: #cc0000; color: #ffffff; font-size: 11px; font-weight: bold; padding: 0 8px; margin-left: 6px; border-radius: 3px; vertical-align: middle; }
details.past { margin: 10px 0; }
details.past summary { cursor: pointer; font-weight: bold; color: #027eb4; padding: 6px 10px; border: 1px dashed #027eb4; border-radius: 6px; background: #f4fafd; }
.class-card { display: flex; gap: 12px; border: 1px solid #cccccc; background-color: #ffffff; padding: 8px; margin: 10px 0; }
.class-card .thumb { flex: 0 0 150px; }
.class-card .thumb img { display: block; width: 100%; border: 1px solid #dddddd; }
.class-card .thumb small { display: block; text-align: center; font-size: 11px; }
.class-body { flex: 1; min-width: 0; }
.class-body h4 { margin: 0 0 4px; font-size: 15px; color: #003366; }
table.class-info { border-collapse: collapse; width: 100%; margin: 4px 0; font-size: 13px; }
table.class-info th, table.class-info td { border: 1px solid #aaaaaa; padding: 3px 8px; text-align: left; vertical-align: top; }
table.class-info th { background-color: #dce8f5; width: 5.6em; white-space: nowrap; font-weight: bold; }
.apply-line { display: block; }
.room-group { margin: 16px 0 4px; font-weight: bold; color: #ffffff; background-color: #1a4e8a; padding: 2px 10px; font-size: 14px; }
.room-card .room-body .cap { margin: 2px 0; }
table.hours { border-collapse: collapse; width: 100%; margin: 6px 0 12px; font-size: 13px; }
table.hours th, table.hours td { border: 1px solid #aaaaaa; padding: 5px 8px; text-align: left; vertical-align: top; }
table.hours th { background-color: #dce8f5; width: 30%; }
table.hours td.closed { color: #cc0000; }
ol.steps { list-style: none; counter-reset: st; margin: 6px 0 10px; padding: 0; }
ol.steps li { counter-increment: st; position: relative; padding: 4px 0 4px 34px; margin: 4px 0; }
ol.steps li::before { content: counter(st); position: absolute; left: 0; top: 4px; width: 24px; height: 24px; border-radius: 50%; background-color: #027eb4; color: #ffffff; text-align: center; line-height: 24px; font-weight: bold; font-size: 13px; }
.use-box { border: 1px solid #cfd8e3; background-color: #f7fafc; padding: 6px 12px 8px; margin: 8px 0 14px; }
.use-box h3 { margin: 4px 0 6px; font-size: 15px; color: #003366; }
.small-note { font-size: 12.5px; color: #333333; margin: 2px 0; }
table.fee td.num { text-align: right; padding-right: 10px; }
table.fee td.left { text-align: left; }
.reserve-chip { display: inline-block; background-color: #fff3d6; border: 1px solid #e8c877; color: #6a4a00; font-weight: bold; font-size: 12px; padding: 0 8px; margin: 0 0 4px; border-radius: 10px; }
.faq dt { font-weight: bold; color: #003366; margin: 12px 0 2px; padding-left: 28px; position: relative; }
.faq dd { margin: 2px 0 4px; padding-left: 28px; position: relative; }
.faq dt::before, .faq dd::before { position: absolute; left: 0; width: 22px; height: 22px; border-radius: 50%; text-align: center; line-height: 22px; font-size: 12px; font-weight: bold; color: #ffffff; }
.faq dt::before { content: 'Q'; background-color: #027eb4; }
.faq dd::before { content: 'A'; background-color: #cc3333; }
.group-list { margin: 4px 0 12px; padding: 0; list-style: none; }
.group-list li { border-bottom: 1px dashed #cccccc; padding: 6px 4px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.group-list .gname { font-weight: bold; flex: 1 1 14em; }
.group-list .gcont { flex: 1 1 12em; color: #333333; font-size: 13px; }
.group-list .gdetail { flex: 0 0 auto; }
.group-list .gdetail a { display: inline-block; background-color: #027eb4; color: #ffffff; text-decoration: none; font-size: 12px; padding: 0 12px; border-radius: 3px; }
.kana-title { margin: 14px 0 2px; padding: 2px 10px; background-color: #1a4e8a; color: #ffffff; font-weight: bold; }
.tab-links { display: flex; gap: 8px; margin: 8px 0; }
.tab-links a { flex: 1; text-align: center; padding: 6px; border: 2px solid #027eb4; border-radius: 6px; text-decoration: none; font-weight: bold; color: #003366; }
.tab-links a.on { background-color: #027eb4; color: #ffffff; }
.job { margin: 12px 0 18px; }
.job h3 { margin: 0; padding: 4px 10px; background-color: #1a4e8a; color: #ffffff; font-size: 15px; }
.back-link { margin: 14px 0 0; }
@media only screen and (max-width: 600px) {
  .class-card { flex-direction: column; }
  .class-card .thumb { flex-basis: auto; max-width: 240px; }
  table.class-info th { white-space: normal; width: 5em; }
  table.hours th { width: 34%; }
  #pool-status td { padding-left: 6px; }
}
