/* ============================================================================
   buy2026.css — 売買(buy)サイト共通レイヤ（JP/EN 共有 1 ファイル）
   ----------------------------------------------------------------------------
   方針（2026-11 ユーザー指示に基づく）:
   - 現行の視覚デザイン（header画像・navタイル・sidebar・カード・footer 等）は
     維持する。見た目本体は legacy CSS（new.min.css 等・本ファイルより先に読まれる）
     が提供する。本ファイルでは見た目を複製・置換しない。
   - レイアウト機構だけを現行技術に更新:
       * shell は 1000px を数値固定 + margin:auto でセンター化（fr 不使用）
       * #upContent の2カラムは grid（legacy の float を置換）
       * mobile (≤740px) は単一カラム
   - 各テンプレートの inline 上書き（タイトルバー / パンくず / 検索窓）を
     ここに統合（テンプレート側の重複削除）。
   - legacy より後に読まれるため、同・低 specificity は本ファイル側が勝つ。
     !important は「legacy の 2-id セレクタに実際に勝てない」箇所のみ使用。
   - 賃貸(1200px)サイトは本ファイルを読まないため影響なし。
   ========================================================================== */

/* ---------- 0. ベースフォントサイズ（サイト全体で統一） ----------
   legacy の競合宣言（2026-11-18 実測）:
   - default.css:      html { font-size: 100% }                → 16px
   - new.min/smart2:   html { font-size: calc(100% + .5vw) }   → 16px+0.5vw（ビューポート幅で変化！）
   - process/suzuki:   body { font-size: 14px; line-height: 20px }
   - 他ページ:         body 未設定（html ≈ 16px を継承）
   → 全ページ共通: html = 16px 固定（vw 要素を排除）/ body = 16px（現行大多数ページの基準）。
   本ファイルは全 legacy より後に読まれるため、同一 specificity（要素セレクタ）で後勝ち。 */
html { font-size: 16px; }
body { font-size: 16px; }

/* ---------- 1. shell: 1000px 固定 + 中央揃え（PC のみ） ----------
   legacy（componenttest.css 等）は `position:absolute; left:50%; margin-left:-500px` + float の
   センター化ハックを使うページがある。margin だけを margin:0 auto で上書きすると
   left:50% が生き残って shell が半分しか見えないため、position/left/float も一緒に無効化する。 */
@media (min-width: 741px) {
    body {
        /* !important: レガシーCSS（componenttest.css 等の absolute 系ハック）が
           SPA 経由で後に挿入されても shell が壊れないよう保険 */
        position: static !important;
        left: auto !important;
        float: none !important;
        width: 1000px !important;
        margin: 0 auto !important;
    }
}

/* ---------- 2. #upContent ＝ SPA差し替えラッパー（レイアウト無害化） ----------
   2カラムの組立は legacy の float そのものに委ねる（＝本番の body 子要素レイアウトと同一構造）:
   - basic.css:             #globalLeft2 { width: 203px; float: left; margin: 0 8px; ... }
   - componenttest/new.min: #globalRight { float: left; width: 745px; margin-right: 16px }
   #upContent は素の block（width: body の 1000px に従う）で、float レイアウトに一切関与しない。
   ※ かつて #upContent:has(> article#globalLeft*) で grid 化していたが、
     :has() 非対応環境で無効化され legacy float と干渉するため廃止（2026-11-18）。
   ※ mobile (≤740px) は legacy smart2.css が担当（現行のまま）。 */
#upContent {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* ---------- 3. list ページ: 本文カラムをフル幅に（legacy 745px 固定を解除） ----------
   !important: EN list の 2-id 上書き（width:745px 等）に勝つため（現行 shared block と同一） */
article#globalRight > article.searchContainer {
    float: none !important;
    width: 100% !important;
}
article#globalRight dl#list {
    width: 100%;
    max-width: 100%;
    flex: none;
    margin: 0 0 16px;
    box-sizing: border-box;
}

/* ---------- 4. タイトルバー（緑グラデ + 文字表示＝現行） ----------
   legacy の header#type* / header#area* は 2-id で勝つため background に !important */
article#globalRight > article.searchContainer > header {
    float: none;
    width: 100%;
    height: auto;
    min-height: 46px;
    margin: 0 0 14px;
    padding: 10px 16px 10px 46px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
    color: #fff;
    text-indent: 0;
    letter-spacing: 0.02em;
    border-radius: 4px;
    background: linear-gradient(135deg, #4d8f4d 0%, #2f6f2f 100%) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    position: relative;
}
article#globalRight > article.searchContainer > header::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    width: 14px;
    height: 14px;
    transform: translateY(-50%);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.10), 0 0 0 8px rgba(255, 255, 255, 0.05);
}

/* ---------- 5. パンくず（テキスト + ">"＝現行） ---------- */
article#globalRight > nav#breadcrumbs {
    background: none;
    width: auto;
    margin: 0 0 12px;
    padding: 0 0 8px;
    border-bottom: 1px solid #e6e6e6;
}
article#globalRight > nav#breadcrumbs ul,
article#globalRight > nav#breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
article#globalRight > nav#breadcrumbs li {
    display: inline-flex;
    align-items: center;
}
article#globalRight > nav#breadcrumbs li + li::before {
    content: ">";
    margin-right: 8px;
    color: #a3a3a3;
}
article#globalRight > nav#breadcrumbs a {
    background: none !important;      /* legacy は 2-id・5-elem（background画像等）で勝つため */
    color: #3a5f8a !important;
    text-decoration: none !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
    font-weight: 400 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline;
}
article#globalRight > nav#breadcrumbs li:last-child a {
    color: #333 !important;
    font-weight: 700 !important;
}

/* ---------- 6. メインナビ + 検索バー（現行） ---------- */
nav#globalNav ol li a {
    font-size: 24px;
    line-height: 1.4;
}

/* 検索フォーム: 1つのピル。入力 + 右=丸ボタン（枠の内側、虫眼鏡SVG）。
   2026-11-18: 従来は入力ピルとsubmitピルが別枠で隣接 → 1枠に統合。
   2026-11-20: 左の装飾用虫眼鏡を撤去（右ボタンの虫眼鏡と重複して不自然だった。
              EN賃貸=左アイコン+テキストボタンの「1アイコン」構成に揃える）。
   legacy new.min の検索背景(searchBack.png等)は background-image:none で明示無効化。 */
section#globalSns {
    width: 1000px;
    height: 69px;
    padding: 15px 16px;
    box-sizing: border-box;
    overflow: hidden;
}
section#globalSns ul.snsb {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px 16px;
}
section#globalSns ul.snsb > li {
    float: none;
    margin: 0;
}
#pc-search form,
section#globalSns ul.snsb li form {
    position: relative;
    display: block;
    width: 330px;
    height: 44px;
    margin: 0;
    padding: 0 4px 0 14px;
    box-sizing: border-box;
    border: 0.5px solid rgba(0, 115, 0, 1);
    border-radius: 100px;
    background-color: #fff;
    background-image: none;
    overflow: hidden;
}
#pc-search input[type="text"],
#pc-search input[type="search"],
section#globalSns input#search2,
section#globalSns ul.snsb li form input[type="text"],
section#globalSns ul.snsb li form input[type="search"] {
    width: 268px;
    height: 42px;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    font-size: 16px;
    line-height: 1.4;
    color: #333;
    outline: 0;
    -webkit-appearance: none;
    appearance: none;
}
#pc-search input[type="search"]::-webkit-search-decoration,
#pc-search input[type="search"]::-webkit-search-cancel-button,
section#globalSns input[type="search"]::-webkit-search-decoration,
section#globalSns input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}
/* submit: 枠内右の丸ボタン（テキストは非表示、SVGのみ表示） */
#pc-search input[type="submit"],
section#globalSns form input[type="submit"] {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    height: 36px;
    width: 36px;
    min-width: 36px;
    margin: 0;
    padding: 0;
    border: 0.5px solid rgba(0, 115, 0, 1);
    border-radius: 50%;
    background-image: url(images/search.svg), linear-gradient(180deg, #f4fae8 0%, #e4f0cf 100%);
    background-size: 20px 20px, auto;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    color: transparent;
    font-size: 0;
    cursor: pointer;
}
#pc-search input[type="submit"]:hover,
section#globalSns form input[type="submit"]:hover {
    background-image: url(images/search.svg), linear-gradient(180deg, #eaf5d8 0%, #d8e9b8 100%);
    background-size: 20px 20px, auto;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
}

/* share / 言語切替リンク */
section#globalSns ul.snsb > li > a {
    font-size: 15px;
    line-height: 1.4;
    white-space: nowrap;
}

/* ---------- 7. 2カラム幾何・共通chrome 統一ピン（2026-11-18 決断: サイト内で1つのレイアウト） ----------
   背景: ページごとに legacy スタックが異なり（list系=new.min のみ / prev系=reset+basic+
   componenttest+smart2/3）、共通部分（#globalNav / #globalHead / サイドバー / メインカラム）の
   定義がページ間で分かれていた。今後は全ページで同一スタック（layout 常駐）を読み、
   ここ（buy2026 = 常に最後）で幾何を 1 つに固定する。
   - サイドバー (#globalLeft=JP / #globalLeft2=EN): 203px float
   - メインカラム (#globalRight): 745px float  → 合計 1000px shell
   - home（サイドバー無し）は home.latte の content 側で 1000px にピン（SPA 安全: content 追従）
   - legacy の float ハック（componenttest: body/header の float、absolute 系）は無効化済み
     （§1 の body ピン + 本節の header/nav ピン）。 */
@media (min-width: 741px) {
    article#globalLeft,
    article#globalLeft2 {
        float: left;
        width: 203px;
        margin: 0 8px 0 0;
        padding: 0;
        box-sizing: border-box;
    }
    article#globalRight {
        float: left;
        width: 745px;
        margin: 0 0 16px;
        padding: 0;
        box-sizing: border-box;
    }
    header#globalHead {
        float: none;
    }
    nav#globalNav {
        float: none;
        width: 1000px;
    }
    /* パンくず: legacy の float 745x30+背景 を無効化（2026-11-19）。
       legacy が float だと H1(.prevTitle) がパンくずの横に回り込む → H1が1行目にならない */
    article#globalRight>nav#breadcrumbs {
        float: none;
        width: 100%;
        height: auto;
        margin: 0 0 10px;
        background: none;
    }
    /* 問い合わせフォームページ: legacy の float を無効化（2026-11-20）。
       legacy (component10/new.min): section.contact { float:left; width:745px }
                                    section.contact header { float:left; 745x30 画像バー
                                                             (pcContactHeadBg.png, text 隠し) }
       header が float だと最初の li（Contractor's name）が緑バー右側へ回り込む →
       カラム外へ飛び出し + namePair 入力が極小になる。
       float を外し通常フローに戻す: 緑バー1行目 → その下にフォーム（＝JP賃貸の大枠grid/
       各パート flex 方針に合わせる float 排除） */
    article#globalRight>section.contact {
        float: none;
        width: 100%;
    }
    article#globalRight>section.contact>header {
        float: none;
        width: 100%;
    }
}

