/* =========================================================
   tatemono.css（PC / モバイル 統合版）
   - css-pc.css と css-mb.css を1ファイルに統合
   - PC用ルールは @media (min-width:769px) に格納
   - モバイル用ルールは @media (max-width:768px) に格納
   - 各ブロック内の記述内容・順序は元ファイルのまま維持（挙動非変更）
========================================================= */

:root {
  --bg: #f6f5f2;
  --card: #ffffff;
  --text: #111111;
  --muted: #6b7280;
  --border: rgba(17,24,39,.10);
  --accent: #c0000a;
  --serif: "Noto Serif JP", "游明朝", Georgia, serif;
  --sans: "Noto Sans JP", system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  --radius: 12px;
}

/* =========================================================
   共通PC設定 (元 css-pc.css)
========================================================= */
@media (min-width: 769px) {
  /* =========================================================
     css-pc.css（ビル景JAPAN テイスト統合版）
     - PC用（HTML側で min-width:769px で読み込み）
  ========================================================= */


  /* --- 1. Reset --- */
  *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
  html { height: 100%; }
  img { max-width: 100%; height: auto; display: block; }
  .use-mb  { display: none; }
  .pc-none { display: none; }
  .ad-pc-only { display: block; }

  /* --- 2. Body & Background --- */
  body {
    height: 100%;
    min-height: 100%;
    font-family: var(--sans);
    background: #e8e7e4;
    color: var(--text);
    text-align: center;
  }

  /* --- 3. Outer Frame --- */
  #a00 {
    width: 915px;
    margin: 0 auto;
    padding: 0;
    text-align: left;
    background: var(--card);
    color: var(--text);
    min-height: 100%;
    box-shadow: 0 0 10px rgba(0,0,0,.12);
    font-family: var(--sans);
  }

  /* --- 4. Header エリア --- */
  #site-header {
    width: 915px;
    margin: 0 auto;
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid var(--border);
  }
  #site-header a {
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .15em;
    color: var(--text);
    text-decoration: none;
  }
  #site-header a .accent-char { color: var(--accent); }
  #site-header a:hover { opacity: .7; }

  #a03 {
    margin: 0 auto;
    width: 830px;
    background: var(--card);
  }

  /* --- 5. Typography --- */

  h1 {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .04em;
    color: var(--text);
    margin: 35px 0 28px 0;
    padding: 10px 14px;
    width: 700px;
    border-left: 5px solid var(--accent);
    position: relative;
  }
  h1::after {
    content: "";
    position: absolute;
    left: 14px; right: 0; bottom: -5px;
    height: 1px;
    background: rgba(192,0,10,.18);
  }

  #map h2, #a04 h2, .midashi {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    background: transparent;
    border-left: 5px solid var(--accent);
    padding: 10px 14px;
    margin: 24px 0 6px;
    position: relative;
    letter-spacing: .03em;
  }
  #map h2::after, #a04 h2::after, .midashi::after {
    content: "";
    position: absolute;
    left: 14px; right: 0; bottom: -5px;
    height: 1px;
    background: rgba(192,0,10,.15);
  }
  h2 span      { display: inline; }
  #map h2 span { display: none; }
  #map h2 {
    width: 90%;
    font-size: 16px;
    font-weight: 700;
    margin: 20px 0 5px;
    line-height: 1.0;
  }

  h3 {
    font-size: 14px;
    margin: 5px 5px 1px 0;
    color: #CC9966;
  }
  #map h3 {
    clear: both;
    font-size: 110%;
    margin: 5px 5px 1px 10px;
    color: #8B6914;
    font-weight: 700;
  }

  /* --- 6. Main Image (.kat) --- */
  .kat {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 0 0 8px;
    width: 520px;
    height: 520px;
  }
  .kat img, .main {
    max-width: 500px;
    max-height: 500px;
    width: auto;
    height: auto;
  }
  .main {
    margin: 0;
    border: 2px solid #CCCCCC;
  }

  .topimg-note {
    display: inline-block;
    box-sizing: border-box;
    max-width: 320px;
    margin: 12px 0 14px;
    padding: 10px 12px;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 14px;
    background: rgba(0,0,0,.02);
    font-size: 13px;
    line-height: 1.7;
    word-break: break-word;
  }
  .topimg-note .label { font-weight: 700; margin-right: 6px; }
  .topimg-note a { text-decoration: underline; }
  .topimg-note:has(.comment:empty) { display: none; }

  /* --- 7. Content Area (#a04 / #memu) --- */
  #a04 {
    margin: 20px 0 5px;
    padding: 5px 0 35px;
    width: 100%;
    overflow: visible;
    word-break: break-all;
  }
  #a04 h2 {
    font-size: 16px;
    margin: 20px 0 3px;
    clear: both;
    font-weight: 700;
  }

  /* #memu：deta と honbun を縦積み（旧来どおり） */
  #memu {
    border: 0;
    padding: 7px 0 0;
    margin-right: 2px;
    margin-bottom: 15px;
  }

  /* --- 8. Data Table (.deta) --- */
  .deta {
    width: auto;
    margin: 25px 0 30px;
    padding: 0 5px 0 0;
    border-left: 0px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    overflow: hidden;
    background: var(--card);
    font-size: 85%;
    color: var(--muted);
    line-height: 1.4;
    letter-spacing: .05em;
    box-shadow: 0 0px 0px rgba(0,0,0,.07);
    display: inline-block; /* テーブル幅に合わせて収縮 */
  }
  .deta table {
    max-width: 100%;
    width: 100%;
    border-collapse: collapse;
    font-size: 100%;
  }
  .deta table tr td {
    padding: 6px 10px;
    vertical-align: top;
  }
  .deta table tr > td:first-child {
    white-space: nowrap;
    font-weight: 700;
    color: #4b5563;
    background: #f3f4f6;
    border-bottom: 1px solid rgba(192,0,10,.10);
  }
  .deta table tr > td:nth-child(2) {
    font-weight: 400;
    padding: 6px 10px;
    color: var(--text);
    text-align: left;
    background: var(--card);
    border-bottom: 1px solid rgba(0,0,0,.05);
  }
  .deta table tr:has(> td:nth-child(2):empty) { display: none; }
  .deta table tr:has(> th + td:empty)          { display: none; }

  .deta .square_btn {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    margin: 4px 0 0 20px;
    min-height: 0;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    background: linear-gradient(180deg, #f7fee7, #d9f99d);
    border: 1px solid rgba(132,204,22,.40);
    color: #3f6212;
    text-decoration: none;
    white-space: nowrap;
  }

  /* --- 9. Body Text (#honbun) --- */
  /* deta が float:left なので honbun は自然に右へ回り込む */
  #honbun {
    overflow-x: auto;
    margin : 10px 0px 40px 0;
  }
  #honbun p {
    width: 670px;
    font-size: 110%;
    line-height: 1.8;
    letter-spacing: .04em;
    padding: 3px 30px 18px 20px;
    margin-bottom: 0;
    border-left: 1px solid rgba(192,0,10,.18);
    text-align: left;
    color: var(--text);
  }
  #honbun p a:before {
    content: url(https://bb-building.net/common/img/yajirushi1.png);
    margin: 4px 2px 0 3px;
  }
  #honbun strong { color: var(--accent); }

  #honbun table, #honbun ul {
    width: 720px;
    font-size: 85%;
    margin: 10px 0 30px;
  }
  #memu #honbun h3 {
    font-size: 100%;
    line-height: 1.4;
    letter-spacing: .04em;
    padding: 3px 30px 0 45px;
  }

  /* honbun テーブル */
  #honbun table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--sans);
  }
  #honbun table th {
    background: #f0f0f0;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
    text-align: left;
    padding: 8px;
  }
  #honbun table td {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 6px;
    text-align: left;
  }

  /* 補足ボックス */
  #honbun .honbun-note {
    margin: 20px 14px 20px;
    padding: 12px 14px;
    border: 1px solid #CCCCCC;
    border-radius: var(--radius);
    background: #fdf9f9;
  }
  #honbun .honbun-note-title {
    margin: 0 0 8px;
    padding: 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 15px;
    line-height: 1.45;
  }
  #honbun .honbun-note p {
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.75;
    border-left: none;
    width: auto;
  }

  /* honbun 内 figure */
  #honbun figure {
    margin: 1.2em 0;
    padding: 10px 12px;
    background: #f7f7f7;
    display: inline-block;
  }
  #honbun figure img {
    display: block;
    max-width: 320px;
    max-height: 320px;
    width: auto;
    height: auto;
  }
  #honbun figcaption {
    margin-top: 6px;
    max-width: 320px;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
  }

  /* --- 10. Buttons --- */
  .square_btn {
    position: relative;
    display: inline-block;
    padding: 10px 12px;
    text-decoration: none;
    border-radius: var(--radius);
    background: linear-gradient(180deg, #f7fee7, #d9f99d);
    border: 1px solid rgba(132,204,22,.40);
    color: #3f6212;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(132,204,22,.14);
    margin-right: 5px;
    transition: opacity .2s;
  }
  .square_btn:hover { opacity: .7; }
  .square_btn:active { transform: translateY(1px); box-shadow: none; }

  /* --- 11. Photo Gallery (#photo3) --- */
  #photo3 {
    width: 800px;
    margin: 24px auto 0;
  }
  #photo3 .photos {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 16px;
    align-items: start;
  }
  #photo3 .photo-item { margin: 0; }
  #photo3 .photo-fig {
    margin: 0;
    background: var(--card);
    border: 1px solid rgba(0,0,0,.08);
    border-top: 2px solid var(--accent);
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.07);
    transition: transform .18s ease, box-shadow .18s ease;
  }
  #photo3 .photo-fig:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(0,0,0,.11);
  }
  #photo3 img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 260px;
    object-fit: contain;
    background: rgba(0,0,0,.02);
  }
  #photo3 figcaption {
    margin: 0;
    padding: 10px 14px 14px;
    font-size: 13px;
    line-height: 1.7;
    word-break: break-word;
    color: var(--muted);
  }
  #photo3 figcaption a { text-decoration: underline; }

  /* --- 12. Map & Access --- */
  #map {
    clear: both;
    padding: 25px 12px 5px 3px;
    margin-top: 5px;
    text-align: left;
  }
  .gmap-wrap {
    position: relative;
    height: 0;
    padding-bottom: 75%;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0,0,0,.10);
    margin: 8px 0 12px;
  }
  .gmap-wrap iframe,
  .gmap-wrap object,
  .gmap-wrap embed {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-width: 0;
  }
  #map1 { margin: 30px 0 10px; }

  #location {
    margin: 8px 0 60px 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
  }
  #location span {
    width: 100%;
    padding-top: 10px;
    font-size: 90%;
    color: #555;
  }

  #map .access-title {
    display: block;
    margin: 22px 0 8px;
    padding: 0 0 6px 12px;
    border-left: 4px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
  }

  #eki {
    margin: 0 0 10px;
    max-width: 620px;
    border-left: 1px solid #CCCCCC;
  }
  .eki-list {
    list-style: none;
    max-width: 620px;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
  }
  .eki-list li {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-left: 3px solid rgba(192,0,10,.25);
    border-radius: var(--radius);
    background: var(--card);
  }
  .eki-main {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 4px;
  }
  .eki-main strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
  }
  .eki-main em {
    flex: 0 0 auto;
    font-style: normal;
    font-weight: 700;
    color: #8B6914;
    background: rgba(204,153,102,.14);
    border: 1px solid rgba(204,153,102,.28);
    border-radius: 999px;
    padding: 2px 10px;
    white-space: nowrap;
    margin-left: 10px;
  }
  .eki-line {
    display: block;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--muted);
  }
  .eki-note {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(37,99,235,.07);
    color: #1d4ed8;
    font-size: 11.5px;
    font-weight: 600;
  }

  /* --- 13. Footer & Others --- */
  #shita { clear: both; margin: 25px 0 0; padding-top: 0; background: var(--card); }
  #bottomtotop {
    width: 100%;
    background: #111111;
    color: #ffffff;
    clear: both;
    margin: 5px 0 0;
    font-size: 100%;
    padding: 20px 0 135px;
    border-top: 3px solid var(--accent);
  }
  .shintyaku { clear: both; margin: 45px 0 20px 5px; }
  .shintyaku li {
    margin: 0 0 8px 10px;
    font-size: 75%;
    width: 100px;
    list-style: none;
    line-height: 1.0;
    letter-spacing: .01em;
  }
  .shintyaku li img { border: 1px solid #0044cc; margin: 0 0 2px; transition: .3s; }
  .shintyaku li a { color: #0053F9; text-decoration: none; }
  #ad728 { clear: both; padding: 10px 0 15px 3px; text-align: center; min-height: 90px; }
  #ad-center { padding: 8px 0 18px; clear: both; margin: 65px 0 30px; text-align: left; width: 95%; }
  #ad-center-left { text-align: center; max-width: 336px; }
  #ad-center-right { float: left; padding-right: 10px; width: 300px; height: 250px; }
  .pr { display: inline-block; font-size: 10px; margin: 0 0 6px 2px; padding: 2px; background: #99CCFF; color: #FFF; float: right; }
  .midashi { clear: both; margin: 45px 0 25px; font-weight: bold; }
  .a03link  { display: none; }
  #logo-under { clear: both; color: #000030; margin: 10px 25px 0 10px; font-size: 93%; }
  #yahoo { font-size: 63%; color: #808080; padding: 2px 0 2px 10px; }
  #map-google { font-size: 80%; color: #777; margin: 3px 0 28px 45px; }
  #bbb { display: none; }
  #adress .square_btn { width: 100%; margin-top: 10px; }
  .next-bottan { margin-left: 85px; margin-top: 10px; }
  #ninki { font-size: 105%; }
  .open { margin: 15px 15px 10px 5px; font-weight: 500; background-color: #FFF; padding: 1px 5px; width: 300px; border-bottom: 1px dotted #CCC; }
  #side-basho { border: 0 solid #ccc; margin: 30px 0 20px; }
  #side-basho li { font-size: 85%; list-style: none; clear: both; margin: 5px 0 5px 20px; text-align: left; }
  #side-basho li a:before,
  #memu p a:before,
  .setsumei2 a:before { content: url(https://bb-building.net/common/img/yajirushi1.png); padding: 0 2px 0 0; }
  #a04 p strong { color: var(--accent); margin-right: 5px; font-size: 100%; }
  .next-0 {
    font-size: 100%; color: #FFF; background: #00CC33;
    border-width: 0; text-decoration: none;
    margin: 15px 0; padding: 8px 10px 8px 15px;
    font-weight: bold; letter-spacing: .03em; border-radius: 8px; opacity: .85;
  }
  .centeringTest:hover, .shintyaku a:hover, .next:hover, .square_btn:hover,
  .a03link a:hover { opacity: .5; transition: .3s; }

  /* --- 14. List Page (PC: 5列) --- */
  #list-main ul li a { text-decoration: none; }
  #list-main ul li a:hover { text-decoration: underline; }

  #list-page {
    --card-gap: 10px;
    --thumb: 120px;
  }
  #list-page h2, #list-page h3 {
    margin: 22px 16px 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: rgba(0,0,0,.06);
    position: static;
  }
  #list-page h3 { background: rgba(0,0,0,.04); }
  #list-page :is(h2,h3) + ul {
    list-style: none;
    padding: 0;
    margin: 0 16px 22px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--card-gap);
  }
  #list-page :is(h2,h3) + ul > li { margin: 0; }
  #list-page :is(h2,h3) + ul > li > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 10px 14px;
    border-radius: var(--radius);
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(0,0,0,.10);
    text-decoration: none;
    text-align: center;
    line-height: 1.35;
    overflow-wrap: anywhere;
    transition: background .12s;
  }
  #list-page :is(h2,h3) + ul > li > a:hover { background: rgba(255,255,255,.88); }
  #list-page :is(h2,h3) + ul > li > a > img {
    display: block;
    max-width: var(--thumb);
    max-height: var(--thumb);
    width: auto; height: auto;
    border-radius: 10px;
  }
  #list-page :is(h2,h3) + ul > li > a .thumb {
    width: var(--thumb); height: var(--thumb);
    display: grid; place-items: center;
    overflow: hidden; border-radius: 10px;
    background: rgba(0,0,0,.06);
  }
  #list-page :is(h2,h3) + ul > li > a .thumb img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
  }
  #list-page :is(h2,h3) + ul > li > a .name {
    font-size: 13px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }
  @media (max-width: 768px) {
    #list-page { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
    #list-page h2, #list-page h3 { margin: 18px 12px 8px; padding: 10px 12px; position: sticky; top: 0; z-index: 2; }
    #list-page h3 { margin-top: 14px; }
    #list-page :is(h2,h3) + ul { margin: 0 12px 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }

  /* ===== TOPロゴボタン (#top-logo-btn) ===== */
  #top-logo-btn {
    display: block;
    text-align: center;
    padding: clamp(40px, 10vw, 50px) 0 50px;
    clear: both;
  }
  #top-logo-btn a {
    display: inline-block;
    opacity: .75;
    transition: opacity .2s, transform .2s;
  }
  #top-logo-btn a:hover {
    opacity: 1;
    transform: translateY(-2px);
  }
  #top-logo-btn img {
    width: 200px;
    height: auto;
    display: block;
  }

  /* ===== おすすめ物件ウィジェット (#osusume) ===== */
  #osusume {
    margin: 70px 0 0 0;
    padding: 24px 0 32px;
    border-top: 1px solid var(--border);
  }
  .osusume-inner { width: 100%; }
  .osusume-title {
    font-family: var(--serif);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 16px;
    padding: 0 0 10px 4px;
  }
  .osusume-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
  }
  .osusume-list li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    letter-spacing: .02em;
    transition: color .15s;
  }
  .osusume-list li a:hover { color: var(--accent); opacity: 1; }
  .osusume-list li a img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    object-position: center center;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,.10);
    transition: transform .2s, box-shadow .2s;
    display: block;
    background: #f3f4f6;
  }
  .osusume-list li a:hover img {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,.15);
  }
  .osusume-list li a span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
}

/* =========================================================
   共通モバイル設定 (元 css-mb.css)
========================================================= */
@media (max-width: 768px) {
  :root {
    --shadow: 0 10px 26px rgba(17,24,39,.08);
    --radius: 16px;
    --brand: #16a34a;
    --brand-dark: #0e7a34;
    --blue-soft: #2563eb;
    --btn-light-green: #d9f99d;
  }

  /* =========================================================
     css-mb.css（最終統合・整理版）
     - モバイル用（HTML側で max-width:768px で読み込み）
     - 追記・修正をすべて統合し、構造を最適化
  ========================================================= */


  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

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

  body {
    min-height: 100%;
    width: 100%;
    font-family: var(--sans);
    background: #e8e7e4;
    color: var(--text);
    text-align: center;
    position: relative;
    isolation: isolate;
  }

  /* 背景をペーパートーンに */
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.15);
    z-index: 0;
    pointer-events: none;
  }

  img { max-width: 100%; height: auto; display: block; }
  .use-pc { display: none; }
  .use-mb { display: inline; }

  /* --- 2. Layout (Outer Frame) --- */
  #a00 {
    position: relative;
    z-index: 1;
    text-align: left;
    background: var(--card);
    width: min(100%, 820px);
    margin: 0 auto;
    min-height: 100svh;
    display: block;
    box-shadow: 0 18px 60px rgba(0,0,0,.22);
    border: 1px solid rgba(17,24,39,.08);
    border-radius: var(--radius);
    overflow: hidden;
  }

  @media (max-width: 480px) {
    #a00 { border-radius: 0; box-shadow: none; }
  }

  #a03 { width: 100%; padding: max(env(safe-area-inset-top), 10px) 0 10px; background: var(--card); }

  #site-header {
    padding: 14px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
  }
  #site-header a {
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--text);
    text-decoration: none;
  }
  #site-header a .accent-char { color: var(--accent); }

  /* --- 3. Typography (Headings) --- */

  /* 共通見出し設定 */
  h1, #map h2, #a04 h2, .midashi {
    margin: 15px 14px 20px;
    padding: 10px 12px;
    background: transparent;
    border-radius: 0;
    font-weight: 700;
    color: var(--text);
    letter-spacing: .02em;
    position: relative;
  }

  /* h1：ビル景JAPANテイスト */
  h1 {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-family: var(--serif);
    font-size: clamp(18px, 5vw, 22px);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    border-left: 4px solid var(--accent);
    padding-left: 12px;
  }
  h1::before {
    display: none; /* ファビコンアイコン非表示（ロゴで代替） */
  }

  /* h2, .midashi：左エンジ枠あり */
  #map h2, #a04 h2, .midashi, #sns-font {
    font-family: var(--serif);
    font-size: clamp(15px, 4.2vw, 18px);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    border-left: 4px solid var(--accent);
    background: transparent;
    margin-top: 20px;
  }

  /* 見出し下の赤ライン（ビル景JAPANの —— モチーフ） */
  h1::after, #map h2::after, #a04 h2::after, .midashi::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -6px;
    height: 1px;
    background: rgba(192,0,10,.20);
  }

  h2 span { display: inline; }
  #map h2 span { display: none; }
  h3 { font-size: 100%; margin: 5px 5px 1px 0; color: #CC9966; }
  #map h3 { margin: 14px 14px 6px; font-size: 14px; color: #8B6914; font-weight: 600; }

  /* --- 4. Content Modules --- */

  /* メイン画像 */
  .kat { width: 100%; padding: 0 12px 10px; margin: 0 auto; text-align: center; }
  .kat img {
    width: 100%;
    max-height: 500px;
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(17,24,39,.10);
    object-fit: contain;
    aspect-ratio: 1/1;
    background: #f3f4f6;
    margin: 0 auto;
  }

  /* ⑥ min-height → contain:layout でCLS対策 */
  #ad728 { contain: layout; min-height: 280px; margin: 12px 0; }

  /* 本文テキスト */
  #honbun p { margin: 12px 14px 16px; font-size: 16px; line-height: 1.8; letter-spacing: .02em; text-align: left;}
  #honbun p a:before {
    content: url(https://bb-building.net/common/img/yajirushi1.png);
    margin: 8px 2px 0 3px;
  }
  #honbun strong { color: var(--accent); }

  /* 本文内の補足・付録ボックス */
  #honbun .honbun-note {
    margin: 18px 14px 38px;
    padding: 12px 14px;
    border-left: 4px solid var(--accent);
    border: 1px solid #CCCCCC;
    border-left-width: 4px;
    border-radius: 12px;
    background: #fbf9f9;
  }

  #honbun .honbun-note-title {
    margin: 0 0 8px;
    padding: 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 15px;
    line-height: 1.45;
  }

  #honbun .honbun-note p {
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.75;
  }

  #honbun .honbun-note table {
    margin: 8px 0 0;
  }


  #honbun figure {
    margin: 1.2em 0;
    padding: 10px 12px;
    border-left: 0px solid #ccc;
    background: #f7f7f7;
    display: inline-block;
  }

  #honbun figure img {
    display: block;
    max-width: 320px;
    max-height: 320px;
    width: auto;
    height: auto;
  }

  #honbun figcaption {
    margin-top: 6px;
    max-width: 320px;
    font-size: 12px;
    line-height: 1.3;
    color: #555;
  }

  /* データテーブル (deta) */
  .deta {
    margin: 6px 14px 8px;
    padding: 2px 0;
    border: none;
    border-left: 0px solid var(--accent);
    border-radius: 0 8px 8px 0;
    overflow: hidden;
    background: #ffffff;
    color: var(--muted);
    font-size: 11.5px;
  }
  .deta table { width: 100%; border-collapse: collapse; }
  .deta table tr td { padding: 5px 8px; vertical-align: top; }
  .deta table tr > td:first-child {
    width: 23%;
    font-weight: 700;
    color: #4b5563;
    vertical-align: top;
    background: #f3f4f6;
    white-space: nowrap;
    border-bottom: 1px solid rgba(192,0,10,.12);
  }
  .deta table tr > td:nth-child(2) {
    color: var(--text);
    font-weight: 400;
    text-align: left;
    background: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,.06);
  }

  /* 空欄行の非表示 */
  .deta table tr:has(> td:nth-child(2):empty),
  .deta table tr:has(> th + td:empty) { display: none; }

  /* --- 5. Honbun Table (カスタム) --- */
  /* ④ -webkit-overflow-scrolling: touch 削除（iOS13以降不要） */
  #honbun { overflow-x: auto; }
  #honbun table {
    width: 100%;
    min-width: 520px; /* 3列以上の潰れ防止 */
    border-collapse: separate;
    border-spacing: 0;
    margin: 10px 0 14px;
    border: 1px solid rgba(17,24,39,.10);
    border-radius: 12px;
    overflow: hidden;
    font-size: 13px;
  }
  /* 2列テーブルの場合は最小幅を解除 */
  #honbun table:has(tr > td:nth-child(2):last-child) { min-width: 0; }

  #honbun table th, #honbun table td {
    padding: 10px;
    border-bottom: 1px solid rgba(17,24,39,.08);
    border-right: 1px solid rgba(17,24,39,.08);
    color: inherit;
    vertical-align: top;
    overflow-wrap: anywhere;
  }
  #honbun table thead th { background: rgba(37, 99, 235, .06); color: #1d4ed8; font-weight: 700; }
  #honbun table:not(:has(thead)) tr:nth-child(even) td { background: rgba(2, 6, 23, .02); }

  /* --- 6. Photo Gallery (photo3) --- */

  /* ⑤ width:100% を削除（親が全幅のため冗長） */
  #photo3 .photos {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2列固定 */
    gap: 16px 10px;
    align-items: start;
  }

  #photo3 .photo-item { margin: 0; }

  #photo3 .photo-fig {
    margin: 0;
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-top: 2px solid var(--accent);
    border-radius: 0 0 14px 14px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0,0,0,.06);
    transition: transform .18s ease, box-shadow .18s ease;
  }
  #photo3 .photo-fig:active {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,.10);
  }

  #photo3 img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 260px;   /* 縦がデカく見えるのを抑える（切らない） */
    object-fit: contain; /* 切らない */
    background: rgba(0,0,0,.02);
  }

  #photo3 figcaption {
    margin: 0;
    padding: 10px 12px 12px;
    font-size: clamp(12px, 3.5vw, 14px);
    line-height: 1.75;
    word-break: break-word;
  }

  #photo3 figcaption a { text-decoration: underline; }

  .topimg-note {
    display: inline-block;
    box-sizing: border-box;
    max-width: 80%;
    margin: 12px 0 14px;
    padding: 10px 12px;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 14px;
    background: rgba(0,0,0,.02);
    font-size: 12px;
    line-height: 1.7;
    word-break: break-word;
  }
  .topimg-note .label { font-weight: 700; margin-right: 6px; }
  .topimg-note a { text-decoration: underline; }
  /* コメントが空なら topimg-note 自体を非表示（Chrome等で有効） */
  .topimg-note:has(.comment:empty) { display: none; }

  /* --- 7. Buttons --- */

  /* 基本ボタン（緑） */
  .square_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(180deg, #f7fee7, #d9f99d);
    border: 1px solid rgba(132, 204, 22, .40);
    color: #3f6212;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(132, 204, 22, .14);
  }

  .deta .square_btn {
    display: flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    margin-top: 5px;
    padding: 3px 8px;
    min-height: 0;
    line-height: 1.3;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 8px;
  }

  .square_btn:active { transform: translateY(1px); opacity: 0.9; }

  /* --- 8. Map & Location --- */
  .gmap-wrap { margin: 8px 14px 10px; border-radius: 14px; overflow: hidden; box-shadow: 0 6px 16px rgba(17,24,39,.08); }
  .gmap-wrap iframe { width: 100%; aspect-ratio: 1/1; border: 0; display: block; }

  #location { margin: 0 14px 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  #location span { grid-column: 1/-1; font-size: 12px; color: var(--muted); margin-top: -8px; line-height: 1.2; }
  #location .square_btn:nth-child(n+3) { grid-column: 1/-1; }

  #adress .square_btn { width: 100%; margin-top: 10px; }

  #map .access-title {
    display: block;
    margin: 22px 14px 8px;
    padding: 0 0 6px 12px;
    border-left: 4px solid var(--accent);
    background: transparent;
    color: var(--accent);
    font-family: var(--serif);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
  }

  #eki {
    margin: 0 14px 10px;
  }

  .eki-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
  }

  .eki-list li {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
  }

  .eki-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
  }

  .eki-main strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
  }

  .eki-main em {
    flex: 0 0 auto;
    font-style: normal;
    font-weight: 700;
    color: #8B6914;
    background: rgba(204,153,102,.14);
    border: 1px solid rgba(204,153,102,.28);
    border-radius: 999px;
    padding: 2px 8px;
    white-space: nowrap;
  }

  .eki-line {
    display: block;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--muted);
  }

  .eki-note {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(37,99,235,.07);
    color: #1d4ed8;
    font-size: 11.5px;
    font-weight: 600;
  }


  /* --- 9. Footer & Others --- */
  #shita { padding: 10px 14px 18px; clear: both; margin-top: 30px; }
  #bottomtotop { width: 100%; background: #444; color: #FFF; padding: 16px 6px; clear: both; }
  .shintyaku { display: none; }

  /* --- 10. List Page --- */
  /* ① @media 囲いを明示。モバイル専用CSSだが、将来の混入防止のため構造を明確化 */
  #list-page {
    --card-gap: 10px;
    --thumb: 120px; /* サムネ長辺 */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  /* カテゴリ見出し（list-page内だけ） */
  #list-page h2,
  #list-page h3 {
    margin: 18px 12px 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0,0,0,.06);
    position: sticky;
    top: 0;
    z-index: 2;
  }
  #list-page h3 {
    margin-top: 14px;
    background: rgba(0,0,0,.04);
  }

  /* 見出し直後のリストを3列グリッドに */
  #list-page :is(h2,h3) + ul {
    list-style: none;
    padding: 0;
    margin: 0 12px 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--card-gap);
  }

  #list-page :is(h2,h3) + ul > li { margin: 0; }

  /* カード本体 */
  #list-page :is(h2,h3) + ul > li > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 8px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(0,0,0,.10);
    text-decoration: none;
    text-align: center;
    line-height: 1.35;
    overflow-wrap: anywhere;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  #list-page :is(h2,h3) + ul > li > a:focus-visible {
    outline: 2px solid rgba(0,0,0,.45);
    outline-offset: 2px;
  }

  /* サムネ */
  #list-page :is(h2,h3) + ul > li > a > img {
    display: block;
    max-width: var(--thumb);
    max-height: var(--thumb);
    width: auto;
    height: auto;
    border-radius: 10px;
  }

  /* 正方形枠（<span class="thumb"> を使う場合） */
  #list-page :is(h2,h3) + ul > li > a .thumb {
    width: var(--thumb);
    height: var(--thumb);
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(0,0,0,.06);
  }
  #list-page :is(h2,h3) + ul > li > a .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  /* タイトル行数制限（<span class="name"> を使う場合） */
  #list-page :is(h2,h3) + ul > li > a .name {
    font-size: 13px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  /* ===== TOPロゴボタン (#top-logo-btn) ===== */
  #top-logo-btn {
    display: block;
    text-align: center;
    padding: clamp(32px, 8vw, 60px) 0 16px;
    clear: both;
  }
  #top-logo-btn a {
    display: inline-block;
    opacity: .75;
    transition: opacity .2s;
  }
  #top-logo-btn a:active { opacity: 1; }
  #top-logo-btn img {
    width: 180px;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  /* ===== おすすめ物件ウィジェット (#osusume) ===== */
  #osusume {
    margin: 32px 0 0;
    padding: 20px 14px 28px;
    border-top: 1px solid var(--border);
  }
  .osusume-title {
    font-family: var(--serif);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .18em;
    color: var(--accent);
    margin: 0 0 14px;
  }
  .osusume-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .osusume-list li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
  }
  .osusume-list li a img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    object-position: center center;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,.10);
    display: block;
    background: #f3f4f6;
  }
  .osusume-list li a span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
}
