/* =========================================================
   BLUE STYLE COM リニューアル版 スタイル
   ・Colorlib テンプレートの style.css は使わない（このファイルと Bootstrap のグリッドだけ）
   ・色：濃紺 #0F1B2D／青 #1D4ED8／本文 #1F2A37／補足 #5B6776／背景 #F4F6F9
   ========================================================= */

:root {
	--rn-ink: #0F1B2D;
	--rn-text: #1F2A37;
	--rn-muted: #5B6776;
	--rn-blue: #1D4ED8;
	--rn-blue-dark: #1E3A8A;
	--rn-blue-soft: #EEF3FB;
	--rn-line: #E2E7EE;
	--rn-line-soft: #EEF1F5;
	--rn-bg: #F4F6F9;
	--rn-photo-bg: #EEF1F5;
	--rn-gutter: clamp(16px, 4vw, 24px);
	--rn-num: 'Barlow Condensed', 'Noto Sans JP', sans-serif;
}

html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--rn-bg);
	color: var(--rn-text);
	font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
	font-size: 15px;
	line-height: 1.7;
}
a { color: var(--rn-blue); text-decoration: none; }
a:hover, a:focus { color: var(--rn-blue-dark); text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: inherit; color: var(--rn-ink); line-height: 1.4; }
.rn-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- ヘッダー ---------- */
.rn-header { background: var(--rn-ink); color: #FFFFFF; }
.rn-header-inner {
	max-width: 1200px; margin: 0 auto; padding: 14px var(--rn-gutter);
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
}
.rn-logo { color: #FFFFFF; display: flex; flex-direction: column; line-height: 1.2; }
.rn-logo:hover, .rn-logo:focus { color: #FFFFFF; text-decoration: none; }
.rn-logo-name { font-family: var(--rn-num); font-weight: 700; font-size: 28px; letter-spacing: 0.06em; }
.rn-logo-sub { font-size: 12px; color: #B8C4D4; margin: 0; font-weight: 400; }
.rn-search { display: flex; flex: 0 1 360px; min-width: 240px; margin: 0; }
.rn-search input {
	flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 0; border-radius: 6px 0 0 6px;
	font-size: 15px; font-family: inherit; color: var(--rn-text);
}
.rn-search button {
	height: 44px; padding: 0 18px; border: 0; border-radius: 0 6px 6px 0;
	background: var(--rn-blue); color: #FFFFFF; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer;
}
.rn-search button:hover { background: var(--rn-blue-dark); }
.rn-nav { border-top: 1px solid rgba(255,255,255,0.12); }
.rn-nav-inner {
	max-width: 1200px; margin: 0 auto; padding: 0 8px;
	display: flex; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch;
}
.rn-nav a { color: #E5EDF7; padding: 12px; font-size: 14px; border-bottom: 3px solid transparent; }
.rn-nav a:hover, .rn-nav a:focus { color: #FFFFFF; text-decoration: none; border-bottom-color: rgba(96,165,250,0.6); }
/* 表示中のメニュー（body の class で切り替え） */
.rn-page-home .rn-nav-home,
.rn-page-database .rn-nav-database,
.rn-page-search .rn-nav-search,
.rn-page-map .rn-nav-map,
.rn-page-rireki .rn-nav-rireki,
.rn-page-tool .rn-nav-tool { color: #FFFFFF; font-weight: 700; border-bottom-color: #60A5FA; }

/* ---------- タイトル帯（トップ） ---------- */
.rn-hero {
	color: #FFFFFF;
	background-image: linear-gradient(rgba(15,27,45,0.45), rgba(15,27,45,0.8)), url(/images/header-img.jpg);
	background-size: cover; background-position: center 35%;
}
.rn-hero-inner { max-width: 1200px; margin: 0 auto; padding: clamp(20px, 4vw, 32px) var(--rn-gutter); }
.rn-hero h1 { margin: 0; color: #FFFFFF; font-size: clamp(20px, 4vw, 30px); font-weight: 700; }
.rn-hero p { margin: 4px 0 0; font-size: 14px; color: #E5EDF7; }

/* ---------- 本文＋サイドバー ---------- */
.rn-wrap {
	max-width: 1200px; margin: 0 auto; padding: 24px var(--rn-gutter) 64px;
	display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start;
}
.rn-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.rn-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* ---------- カード・見出し ---------- */
.rn-card { background: #FFFFFF; border: 1px solid var(--rn-line); border-radius: 12px; padding: clamp(16px, 4vw, 22px) clamp(16px, 4vw, 26px); }
.rn-card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 6px; }
.rn-card-head h2, .rn-h2 { margin: 0; font-size: clamp(19px, 4vw, 22px); font-weight: 700; }
.rn-card-head a { font-size: 14px; font-weight: 700; }
.rn-section { display: flex; flex-direction: column; gap: 12px; }
.rn-muted { color: var(--rn-muted); }

/* ---------- 写真（縦長・横長どちらも切らずに収める） ---------- */
.rn-thumb {
	display: block; flex: none; object-fit: contain; background: var(--rn-photo-bg); border-radius: 6px;
	width: 64px; height: 64px;
}
.rn-thumb-s { width: 48px; height: 48px; border-radius: 4px; }
.rn-thumb-m { width: 52px; height: 52px; border-radius: 5px; }
.rn-noimg { display: flex; align-items: center; justify-content: center; color: #8A97A8; }
.rn-noimg svg { width: 22px; height: 22px; }

/* ---------- 一覧（写真＋文字） ---------- */
.rn-list { list-style: none; margin: 0; padding: 0; }
.rn-list > li { border-top: 1px solid var(--rn-line-soft); }
.rn-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 0; color: var(--rn-text); }
.rn-item:hover, .rn-item:focus { text-decoration: none; }
.rn-item:hover .rn-item-title { text-decoration: underline; }
.rn-item-s { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; padding: 8px 0; }
.rn-item-body { display: flex; flex-direction: column; min-width: 0; }
.rn-item-date { font-size: 12px; color: var(--rn-muted); }
.rn-item-title { font-size: 15px; font-weight: 700; color: var(--rn-blue); line-height: 1.5; }
.rn-item-title.rn-plain { font-weight: 500; color: var(--rn-text); font-size: 14px; }
.rn-item-meta { font-size: 13px; color: var(--rn-muted); }
.rn-item-s .rn-item-title { font-size: 13px; }
.rn-item-s .rn-item-date { font-size: 11px; }

/* ---------- ブログ（2つ） ---------- */
.rn-blogs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.rn-blog { background: #FFFFFF; border: 1px solid var(--rn-line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.rn-blog-head { background: var(--rn-ink); color: #FFFFFF; padding: 12px 18px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.rn-blog-head.rn-blue { background: var(--rn-blue); }
.rn-blog-head h2, .rn-blog-head h3 { margin: 0; font-size: 15px; color: #FFFFFF; }
.rn-blog-head a { color: #FFFFFF; font-size: 13px; font-weight: 700; }
.rn-blog .rn-list { padding: 4px 18px 8px; }
.rn-blog .rn-item { align-items: start; }

/* ---------- 高さランキング TOP10 ---------- */
.rn-rank { list-style: none; margin: 0; padding: 0; }
.rn-rank li { display: grid; grid-template-columns: 28px 52px minmax(0, 1fr) 84px; gap: 4px 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--rn-line-soft); }
.rn-rank-no { font-family: var(--rn-num); font-weight: 700; font-size: 22px; color: var(--rn-blue); text-align: center; }
.rn-rank-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rn-rank-name { font-weight: 700; font-size: 15px; color: var(--rn-ink); }
.rn-rank-meta { font-size: 12px; color: var(--rn-muted); }
.rn-bar { display: block; height: 5px; background: var(--rn-line-soft); border-radius: 3px; }
.rn-bar span { display: block; height: 5px; border-radius: 3px; background: var(--rn-blue); }
.rn-rank-h { font-family: var(--rn-num); font-weight: 700; font-size: 24px; text-align: right; color: var(--rn-ink); white-space: nowrap; }
.rn-rank-h small, .rn-unit { font-size: 14px; margin-left: 2px; }

/* ---------- チップ（都道府県・区市町村・高さ） ---------- */
.rn-regions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.rn-region { background: #FFFFFF; border: 1px solid var(--rn-line); border-radius: 12px; padding: 14px 16px; }
.rn-region h3 { margin: 0 0 8px; font-size: 14px; color: var(--rn-muted); }
.rn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rn-chip, .rn-chips .main-link-list a {
	display: inline-block; padding: 6px 12px; border-radius: 6px; background: var(--rn-blue-soft);
	color: var(--rn-blue-dark); font-size: 13px; font-weight: 500; line-height: 1.5;
}
.rn-chip:hover, .rn-chips .main-link-list a:hover { background: #DCE7F9; text-decoration: none; }
/* area_view.php が出す「col-md-3 … main-link-list」をチップとして並べる */
.rn-chips > [class*="col-"] { float: none; width: auto; padding: 0; min-height: 0; }
.rn-chips .main-link-list { margin: 0; }
.rn-scales { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.rn-scales a { padding: 7px 8px; border: 1px solid #D5DDE8; border-radius: 6px; font-size: 13px; text-align: center; color: var(--rn-ink); background: #FFFFFF; }

/* ---------- サイドバー ---------- */
.rn-widget { background: #FFFFFF; border: 1px solid var(--rn-line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.rn-widget h2 { margin: 0; font-size: 15px; font-weight: 700; }
.rn-widget-sub { font-size: 12px; color: var(--rn-muted); }
.rn-widget-more { font-size: 13px; font-weight: 700; }
.rn-links { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.rn-links li { border-top: 1px solid var(--rn-line-soft); }
.rn-links a { display: block; padding: 9px 0; }
.rn-bloglinks a { display: flex; flex-direction: column; padding: 12px 14px; border-radius: 8px; background: var(--rn-ink); color: #FFFFFF; margin-top: 4px; }
.rn-bloglinks a.rn-blue { background: var(--rn-blue); }
.rn-bloglinks a:hover { text-decoration: none; opacity: 0.92; }
.rn-bloglinks strong { font-size: 14px; }
.rn-bloglinks span { font-size: 12px; color: #D5DEEA; }
.rn-sns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rn-sns a { display: flex; align-items: center; justify-content: center; gap: 6px; height: 44px; border-radius: 8px; color: #FFFFFF; font-size: 14px; font-weight: 700; }
.rn-sns a:hover { text-decoration: none; opacity: 0.9; }
.rn-sns .rn-x { background: #000000; }
.rn-sns .rn-yt { background: #C4302B; }
.rn-ad { text-align: center; min-height: 0; }

/* ---------- パンくず ---------- */
.rn-bc { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--rn-muted); }
.rn-bc li + li::before { content: "›"; margin-right: 8px; color: #9AA6B5; }

/* ---------- ページ見出し ---------- */
.rn-page-title { margin: 0; font-size: clamp(24px, 5vw, 32px); font-weight: 700; color: var(--rn-ink); }
.rn-lead { margin: 0; font-size: 16px; }

/* ---------- ビル詳細 ---------- */
.rn-admin { margin: 0; }
.rn-admin a { display: inline-block; padding: 4px 12px; border: 1px solid #C0392B; border-radius: 4px; color: #C0392B; font-weight: 700; font-size: 14px; }
.rn-admin small { color: #888888; font-size: 12px; }
.rn-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 1px; background: var(--rn-line); border: 1px solid var(--rn-line); border-radius: 12px; overflow: hidden; }
.rn-facts > div { background: #FFFFFF; padding: 12px 14px; }
.rn-facts dt { font-size: 12px; color: var(--rn-muted); font-weight: 400; }
.rn-facts dd { margin: 0; font-size: 16px; font-weight: 700; color: var(--rn-ink); line-height: 1.5; }
.rn-photo-row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.rn-photo { flex: 1 1 360px; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rn-photo img { width: 100%; height: auto; max-height: 620px; object-fit: contain; background: #E8EDF4; border-radius: 12px; display: block; }
.rn-photo figcaption { font-size: 13px; color: var(--rn-muted); }
.rn-desc { flex: 999 1 420px; min-width: 0; }
.rn-desc p { margin: 0; font-size: 15px; }
.rn-spec { margin: 0; display: grid; grid-template-columns: 120px minmax(0, 1fr); font-size: 14px; }
.rn-spec dt, .rn-spec dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--rn-line-soft); }
.rn-spec dt { color: var(--rn-muted); font-weight: 500; padding-right: 12px; }
.rn-spec dd { color: var(--rn-text); overflow-wrap: anywhere; }
.rn-maplinks { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; margin-top: 4px; }
.rn-map { height: 320px; border-radius: 10px; overflow: hidden; background: #E3E9F1; }
.rn-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 12px; }
.rn-gallery figure { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.rn-gallery img { width: 100%; height: 160px; object-fit: contain; background: var(--rn-photo-bg); border-radius: 8px; display: block; }
.rn-gallery figcaption { font-size: 12px; color: var(--rn-muted); }
.rn-related { display: flex; flex-wrap: wrap; gap: 8px; }
.rn-related a { padding: 8px 16px; border: 1px solid #D5DDE8; border-radius: 8px; font-size: 14px; background: #FFFFFF; }

/* ---------- 一覧表（都道府県ページ） ---------- */
.rn-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rn-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.rn-table th, .rn-table td { padding: 10px 8px; border-top: 1px solid var(--rn-line-soft); text-align: left; vertical-align: middle; font-weight: 400; }
.rn-table thead th { border-top: 0; color: var(--rn-muted); font-size: 12px; font-weight: 500; }
.rn-table .rn-num { text-align: right; white-space: nowrap; }
.rn-table .rn-no { font-family: var(--rn-num); font-weight: 700; font-size: 17px; color: var(--rn-blue); width: 44px; }
.rn-table .rn-name a { font-weight: 700; }
.rn-table tbody tr.clickable-row { cursor: pointer; }
.rn-table tbody tr:hover { background: #F8FAFD; }

/* ---------- ビルのカード一覧（市区町村ページ） ---------- */
.rn-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.rn-bcard { background: #FFFFFF; border: 1px solid var(--rn-line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.rn-bcard-img { display: block; background: var(--rn-photo-bg); }
.rn-bcard-img img { width: 100%; height: 200px; object-fit: contain; display: block; }
.rn-bcard-body { padding: 10px 14px 14px; font-size: 13px; color: var(--rn-muted); }
.rn-bcard-body h3 { margin: 0 0 4px; font-size: 15px; }

/* ---------- 地図（既存の Leaflet 地図） ---------- */
.rn-main .view_map { height: 420px; border-radius: 10px; overflow: hidden; }

/* ---------- 既存ページの中身（検索・プロフィール・FAQ など）を新デザインに合わせる ---------- */
.rn-legacy { background: #FFFFFF; border: 1px solid var(--rn-line); border-radius: 12px; padding: clamp(16px, 4vw, 26px); }
.rn-legacy .row { margin-left: 0; margin-right: 0; }
.rn-legacy [class*="col-md-"], .rn-legacy [class*="col-sm-"] { padding-left: 0; padding-right: 0; }
.rn-legacy .article, .rn-legacy article { margin-bottom: 20px; }
.rn-legacy .article-breadcrumb { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 13px; color: var(--rn-muted); }
.rn-legacy .article-breadcrumb li + li::before { content: "›"; margin-right: 8px; color: #9AA6B5; }
.rn-legacy h1, .rn-legacy .article-title { font-size: clamp(20px, 4.5vw, 26px); font-weight: 700; margin: 0 0 12px; }
.rn-legacy h2, .rn-legacy .section-title .title { font-size: clamp(18px, 4vw, 21px); font-weight: 700; margin: 20px 0 10px; }
.rn-legacy h3 { font-size: 17px; }
.rn-legacy .section-title { border: 0; margin: 0; }
.rn-legacy table { width: 100%; border-collapse: collapse; }
.rn-legacy table th, .rn-legacy table td { padding: 8px; border-top: 1px solid var(--rn-line-soft); vertical-align: middle; }
.rn-legacy input[type="text"], .rn-legacy input[type="search"], .rn-legacy select {
	height: 40px; padding: 0 10px; border: 1px solid #C9D3E0; border-radius: 6px; font-size: 15px; font-family: inherit; max-width: 100%;
}
.rn-legacy input[type="submit"], .rn-legacy button, .rn-legacy .btn {
	height: 40px; padding: 0 18px; border: 0; border-radius: 6px; background: var(--rn-blue); color: #FFFFFF; font-weight: 700; font-family: inherit; cursor: pointer;
}
.rn-legacy .article-meta { list-style: none; padding: 0; margin: 0; font-size: 13px; color: var(--rn-muted); }
.rn-legacy .article-img img { max-width: 100%; height: auto; object-fit: contain; background: var(--rn-photo-bg); }
.rn-legacy dl dt { color: var(--rn-muted); font-weight: 500; }
.rn-legacy dl dd { margin: 0 0 8px; }
.rn-legacy .bs-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; margin-bottom: 8px; }
.rn-legacy .view_map, .rn-legacy #view_map, .rn-legacy .map { min-height: 420px; }

/* ---------- フッター ---------- */
.rn-footer { background: var(--rn-ink); color: #CFD8E3; }
.rn-footer-inner { max-width: 1200px; margin: 0 auto; padding: 32px var(--rn-gutter) 12px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.rn-footer-name { font-family: var(--rn-num); font-weight: 700; font-size: 22px; letter-spacing: 0.06em; color: #FFFFFF; }
.rn-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; }
.rn-footer a { color: #CFD8E3; }
.rn-footer a:hover { color: #FFFFFF; }
.rn-copy { max-width: 1200px; margin: 0 auto; padding: 8px var(--rn-gutter) 24px; font-size: 12px; color: #9FB3CC; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.rn-copy a { color: #CFD8E3; }

@media (max-width: 600px) {
	.rn-rank li { grid-template-columns: 24px 48px minmax(0, 1fr) 70px; gap: 4px 10px; }
	.rn-rank-h { font-size: 20px; }
	.rn-spec { grid-template-columns: 96px minmax(0, 1fr); }
	.rn-search { flex-basis: 100%; }
}

/* ---------- お知らせ（管理画面で編集する部品） ---------- */
.rn-legacy-info .info-title h3, .rn-legacy-info .info-title .title { margin: 14px 0 2px; font-size: 13px; font-weight: 700; color: var(--rn-muted); }
.rn-legacy-info > div:not(.rn-card-head) { font-size: 14px; }

/* ---------- サイトマップ（都道府県の下に区市町村が入れ子になったリスト） ---------- */
.rn-legacy ul.info_list { padding-left: 20px; margin: 0 0 12px; }
.rn-legacy ul.info_list > li { margin: 2px 0; }
/* 区市町村のリストを包むだけの li には黒丸を付けない（黒丸が2つ並ぶのを防ぐ） */
.rn-legacy ul.info_list > li:has(> ul.nest) { list-style: none; }
.rn-legacy ul.nest { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 14px; }

/* ---------- 検索フォーム（ビル検索・地図検索） ---------- */
.rn-form-table { width: 100%; border-collapse: collapse; margin: 4px 0 0; }
.rn-legacy .rn-form-table th, .rn-legacy .rn-form-table td { border-top: 1px solid var(--rn-line-soft); padding: 12px 0; vertical-align: middle; }
.rn-legacy .rn-form-table th { width: 150px; padding-right: 16px; text-align: left; font-weight: 500; color: var(--rn-muted); white-space: nowrap; }
.rn-legacy .rn-form-table tr.detail-hide { display: none; }   /* 詳細検索項目は「表示」を押すまで隠す */
.rn-legacy .rn-input { width: 100%; max-width: 480px; height: 42px; padding: 0 12px; border: 1px solid #C9D3E0; border-radius: 6px; font-size: 15px; font-family: inherit; color: var(--rn-text); background: #FFFFFF; }
.rn-legacy .rn-input:focus { outline: 2px solid #93B4F5; outline-offset: 0; border-color: var(--rn-blue); }
.rn-legacy .rn-input-num { width: 96px; margin-right: 4px; }
.rn-checks { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.rn-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; cursor: pointer; }
.rn-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--rn-blue); }
.rn-detail-toggle { margin: 10px 0 0; }
.rn-legacy .rn-btn-link { height: auto; padding: 4px 0; border: 0; background: none; color: var(--rn-blue); font-weight: 700; font-size: 14px; cursor: pointer; }
.rn-legacy .rn-btn-link:hover { text-decoration: underline; background: none; }
.rn-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.rn-legacy .rn-form-actions .rn-detail-btn { margin-left: auto; padding: 8px 4px; font-size: 14px; }
@media (max-width: 480px) { .rn-legacy .rn-form-actions .rn-detail-btn { margin-left: 0; width: 100%; text-align: left; } }
.rn-legacy .rn-btn { height: 44px; padding: 0 26px; border: 1px solid var(--rn-blue); border-radius: 8px; background: var(--rn-blue); color: #FFFFFF; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; }
.rn-legacy .rn-btn:hover { background: var(--rn-blue-dark); border-color: var(--rn-blue-dark); }
.rn-legacy .rn-btn-secondary { background: #FFFFFF; color: var(--rn-text); border-color: #C9D3E0; font-weight: 500; }
.rn-legacy .rn-btn-secondary:hover { background: var(--rn-bg); border-color: #AEB9C8; color: var(--rn-ink); }
.rn-error { margin: 12px 0 4px; color: #B42318; font-weight: 700; }

/* ---------- 検索結果の一覧 ---------- */
.rn-result-count { margin: 4px 0 6px; font-size: 14px; color: var(--rn-muted); }
.rn-result-count strong { font-family: var(--rn-num); font-size: 22px; color: var(--rn-ink); margin: 0 2px; }
.rn-results { margin-bottom: 8px; }
.rn-item.rn-result { grid-template-columns: 80px minmax(0, 1fr); gap: 14px; padding: 12px 0; }
.rn-thumb-l { width: 80px; height: 80px; border-radius: 6px; }
.rn-result .rn-item-title { font-size: 16px; }
.rn-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 12px; border-top: 1px solid var(--rn-line-soft); font-size: 14px; color: var(--rn-muted); }
.rn-pager a { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px; border: 1px solid #C9D3E0; border-radius: 8px; background: #FFFFFF; color: var(--rn-blue); font-weight: 700; }
.rn-pager a:hover { background: var(--rn-blue-soft); text-decoration: none; }

@media (max-width: 600px) {
	.rn-legacy .rn-form-table tr { display: block; border-top: 1px solid var(--rn-line-soft); padding: 8px 0; }
	.rn-legacy .rn-form-table tr.detail-hide { display: none; }
	.rn-legacy .rn-form-table th, .rn-legacy .rn-form-table td { display: block; width: auto; border: 0; padding: 4px 0; }
}

/* ---------- 見出し（2026-11-24） ----------
   H1：淡い青の帯＋左に太い青線
   H2：左に青線（カードの見出し・本文の見出し） */
.rn-page-title,
.rn-legacy h1 {
	padding: 12px 16px 12px 16px;
	background: var(--rn-blue-soft);
	border-left: 6px solid var(--rn-blue);
	border-radius: 4px 10px 10px 4px;
	text-wrap: balance;
}
.rn-h2,
.rn-card-head h2,
.rn-legacy h2 {
	padding: 1px 0 1px 12px;
	border-left: 4px solid var(--rn-blue);
	line-height: 1.4;
}
/* 帯にしない見出し（ヒーロー・サイドバー・ブログの帯） */
.rn-hero h1 { padding: 0; background: none; border: 0; border-radius: 0; }
.rn-widget h2 { padding: 0; border: 0; }

/* 見出しの下線（左の線と同じ青） */
.rn-page-title,
.rn-legacy h1 {
	border-bottom: 2px solid var(--rn-blue);
	border-radius: 4px 10px 0 0;
}
.rn-h2,
.rn-card-head h2,
.rn-legacy h2 {
	padding-bottom: 6px;
	border-bottom: 2px solid var(--rn-blue);
}
.rn-card-head h2 { flex: 1 1 auto; }   /* 右側にリンクがあっても、下線は見出しの幅いっぱいに */
.rn-hero h1, .rn-widget h2 { border-bottom: 0; padding-bottom: 0; }

/* ---------- トップのお知らせ（日付のラベル＋読みやすい本文） ----------
   中身は管理画面の「お知らせ」が作る inc_write_parts_index_info.html（日付の div と本文の div が交互に並ぶ） */
.rn-legacy-info .info-title { padding-top: 14px; }
.rn-legacy-info .rn-card-head + .info-title { padding-top: 4px; }
.rn-legacy-info .info-title h3,
.rn-legacy-info .info-title .title {
	display: inline-block; margin: 0; padding: 2px 10px;
	background: var(--rn-blue-soft); color: var(--rn-blue-dark);
	border-radius: 999px; font-size: 13px; font-weight: 700;
	font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
}
.rn-legacy-info .info-title + div {
	padding-top: 6px; padding-bottom: 4px;
	font-size: 15px; line-height: 1.8; color: var(--rn-text);
}

/* ---------- ヘッダー（2026-11-24）：元サイトと同じく上段を白、メニュー行を黒に ---------- */
.rn-header { background: #FFFFFF; color: var(--rn-ink); border-bottom: 0; }
.rn-logo, .rn-logo:hover, .rn-logo:focus { color: var(--rn-ink); }
.rn-logo-sub { color: var(--rn-muted); }
.rn-search input { border: 1px solid #C9D3E0; border-right: 0; background: #FFFFFF; }
.rn-search input:focus { outline: 2px solid var(--rn-blue); outline-offset: -1px; }
.rn-nav { background: var(--rn-ink); border-top: 0; }
.rn-nav a { color: #E5EDF7; }
.rn-nav a:hover, .rn-nav a:focus { color: #FFFFFF; border-bottom-color: rgba(96,165,250,0.6); }
.rn-nav a:focus-visible { outline: 2px solid #93C5FD; outline-offset: -2px; }
.rn-logo-name { color: var(--rn-blue); }

/* メニュー行：PC はスクロールしても上に残す。狭い画面では「メニュー」ボタン（三本線）で開閉 */
.rn-nav { position: relative; z-index: 1100; }   /* 地図（Leaflet）のボタンより手前 */
.rn-nav-toggle { display: none; }
.rn-nav { position: sticky; top: 0; }   /* PC も狭い画面も、スクロールしても上に残す */
@media (max-width: 768px) {
	.rn-nav-toggle {
		display: flex; align-items: center; gap: 10px;
		width: 100%; margin: 0; padding: 12px var(--rn-gutter);
		background: none; border: 0; color: #FFFFFF; font: inherit; font-size: 15px; font-weight: 700; text-align: left; cursor: pointer;
	}
	.rn-nav-toggle:focus-visible { outline: 2px solid #93C5FD; outline-offset: -2px; }
	.rn-nav-bars, .rn-nav-bars::before, .rn-nav-bars::after {
		display: block; width: 20px; height: 2px; background: #FFFFFF; border-radius: 1px; transition: transform .2s, opacity .2s;
	}
	.rn-nav-bars { position: relative; }
	.rn-nav-bars::before, .rn-nav-bars::after { content: ""; position: absolute; left: 0; }
	.rn-nav-bars::before { top: -6px; }
	.rn-nav-bars::after { top: 6px; }
	.rn-nav.is-open .rn-nav-bars { background: transparent; }
	.rn-nav.is-open .rn-nav-bars::before { transform: translateY(6px) rotate(45deg); }
	.rn-nav.is-open .rn-nav-bars::after { transform: translateY(-6px) rotate(-45deg); }
	.rn-nav-inner { display: none; flex-direction: column; overflow: visible; padding: 0 0 8px; }
	.rn-nav.is-open .rn-nav-inner { display: flex; max-height: calc(100vh - 48px); overflow-y: auto; }   /* 開いたメニューが画面より長いときは中でスクロール */
	.rn-nav-inner a { padding: 12px var(--rn-gutter); border-bottom: 0; border-left: 4px solid transparent; border-top: 1px solid rgba(255,255,255,0.08); }
	.rn-page-home .rn-nav-home,
	.rn-page-database .rn-nav-database,
	.rn-page-search .rn-nav-search,
	.rn-page-map .rn-nav-map,
	.rn-page-tool .rn-nav-tool { border-left-color: #60A5FA; }
}
@media (prefers-reduced-motion: reduce) {
	.rn-nav-bars, .rn-nav-bars::before, .rn-nav-bars::after { transition: none; }
}

/* 推定高さ（トップのランキングの数字の前） */
.rn-est { font-family: 'Noto Sans JP', sans-serif; font-size: 11px; font-weight: 700; color: var(--rn-muted); margin-right: 3px; letter-spacing: 0; }

/* ---------- データベースのトップ（/database/） ---------- */
/* 高さ別：カードを並べ、下の青い棒で高さのイメージを出す */
.rn-db-section { margin-bottom: 24px; }
.rn-scale-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 720px) { .rn-scale-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rn-scale-grid a {
	display: flex; flex-direction: column; gap: 2px; height: 100%; box-sizing: border-box;
	padding: 12px 14px 14px; border: 1px solid var(--rn-line); border-radius: 10px; background: #FFFFFF;
	color: var(--rn-ink); transition: border-color .15s, box-shadow .15s;
}
.rn-scale-grid a:hover, .rn-scale-grid a:focus { border-color: var(--rn-blue); box-shadow: 0 2px 8px rgba(29, 78, 216, 0.12); text-decoration: none; color: var(--rn-ink); }
.rn-scale-h { font-family: var(--rn-num); font-weight: 700; font-size: 20px; white-space: nowrap; line-height: 1.1; color: var(--rn-blue-dark); font-variant-numeric: tabular-nums; }
.rn-scale-sub { font-size: 12px; color: var(--rn-muted); }
.rn-scale-bar { display: block; margin-top: auto; padding-top: 8px; }
.rn-scale-bar::before { content: ""; display: block; height: 5px; width: var(--w, 50%); border-radius: 3px; background: var(--rn-blue); opacity: .85; }

/* 都道府県別：都道府県ごとのカードを段組みで並べ、市区町村はチップに（中身は管理画面で作る inc_maked_parts_database.html） */
.rn-db-prefs { columns: 2 280px; column-gap: 12px; }
.rn-db-prefs .row.bottom30 {
	break-inside: avoid; display: block; margin: 0 0 12px; padding: 12px 14px 14px;
	border: 1px solid var(--rn-line); border-radius: 10px; background: #FFFFFF;
}
.rn-db-prefs [class*="col-"] { float: none; width: auto; padding: 0; min-height: 0; }
.rn-db-prefs .section-title { margin: 0 0 8px; }
.rn-legacy .rn-db-prefs .section-title .title { margin: 0; padding: 0; border: 0; background: none; font-size: 16px; }
.rn-db-prefs .section-title .title a { color: var(--rn-ink); }
.rn-db-prefs .section-title .title a::after { content: " ›"; color: var(--rn-blue); }
.rn-db-prefs .section-title .title a:hover { color: var(--rn-blue); }
.rn-legacy .rn-db-prefs article, .rn-db-prefs article { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.rn-db-prefs .main-link-list { margin: 0; }
.rn-db-prefs .main-link-list a {
	display: inline-block; padding: 4px 10px; border-radius: 6px; background: var(--rn-blue-soft);
	color: var(--rn-blue-dark); font-size: 13px; line-height: 1.5;
}
.rn-db-prefs .main-link-list a:hover { background: #DCE7F9; text-decoration: none; }

/* ビル一覧の表：階数・高さ・竣工は改行しない（ビル名・住所は折り返してよい） */
.rn-legacy table th.floor, .rn-legacy table th.height, .rn-legacy table th.completed,
.rn-legacy table td[aria-label="階数"], .rn-legacy table td[aria-label="高さ"], .rn-legacy table td[aria-label="竣工"],
table td.rn-num, table th.rn-num { white-space: nowrap; }
.rn-legacy table th.name { white-space: normal; overflow-wrap: anywhere; }
/* 住所は都道府県と市区町村の間だけで折り返す */
.rn-legacy table td[aria-label="住所"] { word-break: keep-all; }

/* ビルのページ：写真の右に「〇〇とは」と地図を縦に並べ、写真の高さまで地図を伸ばす */
.rn-photo-row { align-items: stretch; }
.rn-photo { align-self: flex-start; }
.rn-desc-col { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.rn-desc-col .rn-desc { flex: none; }
.rn-desc-col #rn-map-card { flex: 1 1 auto; display: flex; flex-direction: column; }
.rn-desc-col .rn-map { flex: 1 1 auto; height: auto; min-height: 260px; }

/* 建築計画のお知らせ：文字が読めるよう大きめに（1枚なら幅いっぱい、複数なら2列） */
.rn-gallery-lg { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }   /* 写真の記事と同じく中央に。1枚なら枠の半分の幅、複数なら2列 */
.rn-gallery-lg figure { flex: 0 1 calc(50% - 8px); min-width: min(100%, 300px); }
.rn-gallery-lg figcaption { text-align: center; }
.rn-gallery-lg img { height: auto; max-height: 480px; }
.rn-gallery-lg figcaption { font-size: 13px; }

/* ビルのページ：参考資料（管理画面で HTML のまま入力） */
.rn-reference { font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.rn-reference a { font-weight: 500; }

/* ビルのページ：このページの目次（章へのリンク）。左に「目次」のラベル、右に章の名前を区切り線で並べる */
.rn-toc { display: flex; align-items: stretch; margin-top: 14px; border: 1px solid var(--rn-line); border-radius: 10px; background: #FFFFFF; overflow: hidden; }
.rn-toc-label { flex: none; display: flex; align-items: center; gap: 6px; padding: 0 14px; background: var(--rn-ink); color: #FFFFFF; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; }
.rn-toc-label::before { content: ""; width: 12px; height: 9px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat; }
.rn-toc-links { display: flex; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.rn-toc-links a { display: flex; align-items: center; gap: 6px; padding: 10px 14px; color: var(--rn-ink); font-size: 13px; font-weight: 500; line-height: 1.4; border-right: 1px solid var(--rn-line-soft); border-bottom: 1px solid var(--rn-line-soft); margin-bottom: -1px; }
.rn-toc-links a::before { content: ""; flex: none; width: 6px; height: 6px; border-right: 2px solid var(--rn-blue); border-bottom: 2px solid var(--rn-blue); transform: translateY(-2px) rotate(45deg); }
.rn-toc-links a:hover, .rn-toc-links a:focus { background: var(--rn-blue-soft); color: var(--rn-blue-dark); text-decoration: none; }
.rn-toc-links a:focus-visible { outline: 2px solid var(--rn-blue); outline-offset: -2px; }
@media (max-width: 600px) {
	.rn-toc { flex-direction: column; }
	.rn-toc-label { padding: 8px 14px; }
	.rn-toc-links { display: grid; grid-template-columns: 1fr 1fr; }
	.rn-toc-links a { border-right: 1px solid var(--rn-line-soft); }
}
/* 章へ移動したとき、上に固定したメニューに見出しが隠れないように */
[id$="-title"] { scroll-margin-top: 64px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ビルのページ：写真の記事（その他の写真の章を文章で） */
.rn-article { font-size: 15px; line-height: 1.9; color: var(--rn-text); overflow-wrap: anywhere; }
.rn-article p { margin: 0 0 1em; }
.rn-article h3 { margin: 1.6em 0 0.6em; padding-left: 10px; border-left: 3px solid var(--rn-blue); font-size: 17px; line-height: 1.5; }
.rn-article ul, .rn-article ol { margin: 0 0 1em; padding-left: 1.4em; }
.rn-article-photo { margin: 1.2em 0 1.4em; }
.rn-article-photo img { display: block; width: auto; max-width: 100%; max-height: 560px; margin: 0 auto; border-radius: 8px; background: var(--rn-photo-bg); }
.rn-article-photo figcaption { margin-top: 6px; font-size: 13px; color: var(--rn-muted); text-align: center; }
.rn-article-rest-title { margin: 1.6em 0 0.8em; font-size: 15px; color: var(--rn-muted); }

/* ビルのページ：近くの超高層ビル（2列） */
.rn-nearby { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); column-gap: 18px; }
/* 写真に幅・高さの属性を付けたので、表示の大きさは CSS で決める（縦横比はそのまま） */
.rn-article-photo img { height: auto; }
.rn-gallery-lg img { height: auto; }

/* ページが見つからない（404） */
.rn-404 { text-align: center; padding-block: clamp(28px, 6vw, 48px); }
.rn-404-code { margin: 0; font-family: var(--rn-num); font-weight: 700; font-size: clamp(64px, 14vw, 104px); line-height: 1; color: var(--rn-blue); letter-spacing: 0.04em; }
.rn-404-title { margin: 8px 0 12px; font-size: clamp(22px, 5vw, 28px); color: var(--rn-ink); text-wrap: balance; }
.rn-404-text { margin: 0 auto 20px; max-width: 34em; color: var(--rn-muted); line-height: 1.8; }
.rn-404-search { display: flex; max-width: 440px; margin: 0 auto 24px; }
.rn-404-search input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; border: 1px solid #C9D3E0; border-right: 0; border-radius: 6px 0 0 6px; font-size: 15px; font-family: inherit; }
.rn-404-search input:focus { outline: 2px solid var(--rn-blue); outline-offset: -1px; }
.rn-404-search button { height: 46px; padding: 0 20px; border: 0; border-radius: 0 6px 6px 0; background: var(--rn-blue); color: #FFFFFF; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; }
.rn-404-search button:hover { background: var(--rn-blue-dark); }
.rn-404-links { list-style: none; margin: 0 auto; padding: 0; max-width: 560px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; text-align: left; }
.rn-404-links a { display: flex; flex-direction: column; gap: 2px; height: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--rn-line); border-radius: 10px; background: #FFFFFF; color: var(--rn-ink); }
.rn-404-links a:hover, .rn-404-links a:focus { border-color: var(--rn-blue); background: var(--rn-blue-soft); text-decoration: none; }
.rn-404-links strong { color: var(--rn-blue-dark); font-size: 15px; }
.rn-404-links span { font-size: 12px; color: var(--rn-muted); }
@media (max-width: 480px) { .rn-404-links { grid-template-columns: 1fr; } }

/* ---------- トップのヘッダー画像（管理画面で登録・一定間隔で切り替え） ---------- */
.rn-hero { position: relative; overflow: hidden; background: var(--rn-ink); }
.rn-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 35%; opacity: 0; transition: opacity 1.4s ease; }
.rn-hero-bg.is-show { opacity: 1; }
.rn-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(15,27,45,0.45), rgba(15,27,45,0.8)); pointer-events: none; }
.rn-hero-inner { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .rn-hero-bg { transition: none; } }

/* ビルのページ（2026-11-27）：「〇〇とは」の下にメイン写真を大きく表示（横長は本文の幅いっぱい、縦長は高さを抑えて中央）。地図は「その他の写真」の後ろの章 */
.rn-main > .rn-desc { flex: none; }   /* 以前の横並び用の flex 指定で高さが伸びないように */
.rn-photo-main { flex: none; margin: 0; align-self: center; align-items: center; max-width: 100%; }
.rn-photo-main > a { display: block; max-width: 100%; }
.rn-photo-main img { width: auto; max-width: 100%; height: auto; max-height: min(820px, 85vh); object-fit: contain; background: none; }
.rn-photo-main figcaption { align-self: flex-end; }

/* 広告（AdSense）の枠（template_res/rn_ad_*.html）。先に高さを取っておき、読み込み時にページが跳ねないようにする */
.rn-adslot { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rn-adslot-label { font-size: 11px; color: var(--rn-muted); letter-spacing: .05em; }
.rn-adslot-wide { min-height: 120px; }
.rn-adslot-related { min-height: 280px; }
.rn-adslot-side { min-height: 280px; }
@media (min-width: 992px) {
	/* PC：サイドバーの広告はスクロールしても画面に残す（ヘッダーのメニューの下） */
	.rn-adslot-side { position: sticky; top: 64px; }
}
/* 広告が出なかった枠は詰める */
.rn-adslot:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
