/* トップ（/）にポータルを入れたときだけの見た目（2026-11-05）。index.html だけが読む
   ・診断の前の画面：上のバーの下にカテゴリのメニュー・検索の帯、左に「ここから診断する」（AI間取り診断のタブの中は今までの入力欄）ほか、右に数・計算ツールなど
   ・診断中・結果・結果を開くリンク（html.hp-deep）・英語など：ポータルの部品（.hp-only）を出さず、今までどおりの1列 */
.hp-embed { background: transparent; }
.hp-embed .hp-navrow { background: #fff; border-bottom: 1px solid var(--line, #E7E5E0); }
.hp-embed .hp-navrow .hd-nav { margin: 0; padding: 0 2px; }
.hp-embed .band .in { padding-top: 16px; padding-bottom: 14px; }
.hp-embed .lay { margin-top: 14px; }
/* 「ここから診断する」の中の入力欄：外の枠は箱にまかせる */
html:not(.hp-deep) .hp-embed #try .hp-panel .frame { border: 0; box-shadow: none; padding: 0; background: none; }
html:not(.hp-deep) .hp-embed #try .hp-panel .corner { display: none; }
html:not(.hp-deep) .hp-embed #try #view-form .kicker { display: none; }
html:not(.hp-deep) .hp-embed #try #view-form .hero-h { font-size: clamp(21px, 5.4vw, 26px); margin: 2px 0 8px; }
html:not(.hp-deep) .hp-embed #try #view-form .lead { font-size: 13.5px; margin: 0 0 12px; }
html:not(.hp-deep) .hp-embed #try #view-form .trust-chips { margin: 0 0 14px; }

/* AI間取り診断のタブの中は /home と同じくすっきり（2026-11-05 ユーザー：home のトップのほうが整理されていい・そこに LINE と詳しく伝えるを）
   見出し・説明・特長の印・累計は出さず（累計は右の「数」にある）、図面のアップロード → 詳しく伝える → 診断ボタン → LINE でも、の順に */
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form { display: flex !important; flex-direction: column; } /* 画面の切りかえで style="display:block" が付いても、この並びのまま */
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form[style*="none"] { display: none !important; }
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > .kicker,
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form .lh-or { display: none !important; }
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > #lineEntry { order: 10; margin: 16px 0 0; }
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > #capHint { order: 9; }
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > #dropZone { margin-top: 0; }

/* 診断中・結果・結果を開くリンク・英語などでは、ポータルの部品を出さず今までどおりに */
body:has(#view-form[style*="none"]) .hp-only, html.hp-deep .hp-only, html:not([lang="ja"]) .hp-only { display: none !important; }
body:has(#view-form[style*="none"]) .hp-embed .lay, html.hp-deep .hp-embed .lay, html:not([lang="ja"]) .hp-embed .lay { display: block; max-width: 720px; margin: 0 auto; padding: 0 20px; }
body:has(#view-form[style*="none"]) .hp-embed #try, html.hp-deep .hp-embed #try, html:not([lang="ja"]) .hp-embed #try { background: none; border: 0; padding: 0; border-radius: 0; }
body:has(#view-form[style*="none"]) .hp-embed #try .hp-panel .frame:not(.showing-result), html.hp-deep .hp-embed #try .hp-panel .frame:not(.showing-result), html:not([lang="ja"]) .hp-embed #try .hp-panel .frame:not(.showing-result) { /* 結果の画面（showing-result）は今までどおり外の枠なし */ border: 1px solid #E7E5E0; border-radius: 14px; box-shadow: var(--nd-shadow); padding: 28px 22px 26px; background: #fff; }
html:not([lang="ja"]) .hp-embed #try #view-form .kicker { display: revert; }
/* 結果のあいだは、上のすき間も今までどおり */
body:has(#view-form[style*="none"]) .hp-embed .lay { margin-top: 20px; }
@media (max-width: 480px) {
  body:has(#view-form[style*="none"]) .hp-embed .lay, html.hp-deep .hp-embed .lay { padding: 0 12px; }
}
/* 下の案内（WHY・使い方・よくある質問）は、ポータルの下に今までどおり */
/* 上のバーの幅も、ポータルのときはポータルにそろえる */
html:not(.hp-deep):lang(ja) body:not(:has(#view-form[style*="none"])) .nd-topbar div { max-width: 1120px; padding-left: 14px; padding-right: 14px; }
/* 下の「AI間取り診断について」（前のトップの説明。押すと開く）と、ほかのサービスの欄（ポータルと重なるので出さない） */
.hp-about { max-width: 1120px; margin: 0 auto; }
.hp-about-s { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; background: #fff; border: 1px solid #E7E5E0; border-radius: 16px; font-size: 14.5px; font-weight: 700; color: #2B2F33; }
.hp-about-s::-webkit-details-marker { display: none; }
.hp-about-s::after { content: '＋'; color: #1F7F73; font-weight: 900; }
.hp-about[open] > .hp-about-s::after { content: '−'; }
.hp-about[open] { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; } /* 列の幅を中身に合わせて広げない（開くと横にはみ出していた・英語の版は開いたままなのでページごと広がっていた） */
html:not([lang="ja"]) .hp-about-s { display: none; }
html:lang(ja) body:not(:has(#view-form[style*="none"])) #xsell { display: none !important; }

/* 2026-11-05 6人の議論で直したところ */
/* 何がもらえるかを1行（タブのすぐ下）。特長の印と累計は診断ボタンの下に小さく */
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > .lead { order: -1; margin: 0 0 12px; font-size: 14px; font-weight: 700; color: #2B2F33; }
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > .trust-chips { order: 9; margin: 10px 0 0; justify-content: center; }
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > .hero-count { order: 9; margin: 6px 0 0; text-align: center; }
/* 図面を選ぶ前は「まず図面を選ぶ」（押すとファイルを選ぶ）。灰色の押せないボタンは出さない */
.hp-embed #hpPick { display: none; }
html:not(.hp-deep):lang(ja) .hp-embed #try #submitBtn:disabled { display: none; }
html:not(.hp-deep):lang(ja) .hp-embed #try #submitBtn:disabled + #hpPick { display: block; order: 8; }
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > #submitBtn { order: 8; }
/* 図面がまだない人の逃げ道 */
.hp-embed .hp-nofile { margin: 12px 0 0; text-align: center; font-size: 13px; color: #6B6F76; }
.hp-embed .hp-nofile a { color: #1F7F73; font-weight: 700; }
html.hp-deep .hp-embed .hp-nofile { display: none; }
/* 診断ボタンの下は小さな文字2行だけ（2026-11-05 ユーザー：印・枠・文が3段でださい） */
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > .trust-chips { order: 9; margin: 12px 0 0; gap: 0; justify-content: center; flex-wrap: wrap; }
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > .trust-chips li { background: none; padding: 0; border-radius: 0; font-size: 12px; font-weight: 500; color: #6B6F76; }
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > .trust-chips li::before { content: none; }
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > .trust-chips li + li::before { content: '・'; margin: 0 4px; }
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > #capHint { display: none; }
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > .hero-count { order: 9; margin: 4px 0 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; text-align: center; font-size: 12px; font-weight: 500; color: #6B6F76; }
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > .hero-count b { font-size: 13px; color: #1F7F73; }
.hp-embed .hp-nofile a { white-space: nowrap; }
/* パソコンでは、診断のボタンを横いっぱいにしない（重たく見えるため） */
@media (min-width: 960px) {
  html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > #submitBtn, html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > #hpPick { width: 100%; max-width: 420px; align-self: center; }
}
/* パソコンの右の列は、スクロールしてもついてくる（/home と同じ）。トップでは右の列を .hp-only の箱で包んでいるので、その箱をついてこさせる */
@media (min-width: 960px) {
  html:not(.hp-deep):lang(ja) .hp-embed .lay > .hp-only { position: sticky; top: 16px; align-self: start; }
  html:not(.hp-deep):lang(ja) .hp-embed .lay > .hp-only > .side { position: static; }
}
@media (min-width: 960px) {
  html:not(.hp-deep):lang(ja) .hp-embed .lay > .hp-only { max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: thin; overscroll-behavior: contain; border-radius: 16px; }
}
/* 上のメニューに「みんなの間取り」があるので、ログインのとなりの「みんマド」は出さない（2026-11-05 ユーザー）。診断中・結果では今までどおり */
html:not(.hp-deep):lang(ja) #mmTopLink { display: none !important; }
/* 帯は検索欄だけ。見出しは「ここから診断する」の中の問いかけ（h1）を出す（2026-11-05 ユーザー：「家づくりの迷うところ、ここでまとめて。」はださい） */
html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > .hero-h { order: -2; display: block; margin: 0 0 6px !important; font-size: clamp(20px, 5.2vw, 24px) !important; line-height: 1.45 !important; }
/* 見出しは2行に決めておく（サイトの文字が読みこまれると幅が変わり、2行→1行に縮んで下がガクッと動いていた。2026-11-05） */
@media (min-width: 640px) { html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > .hero-h br { display: none; } }
/* 「詳しく伝える」の説明も、スマホは2行分の高さを先に取る（同じ理由で1行→2行に伸びていた） */
@media (max-width: 639px) { html:not(.hp-deep):lang(ja) .hp-embed #try #view-form > #optToggle { min-height: 82px; } }
/* AIっぽさを抜く：トップの中の箱も角を小さく・スマホは端から端まで */
@media (max-width: 959px) { html:not(.hp-deep):lang(ja) .hp-embed .lay { padding: 0; } }
html:not(.hp-deep):lang(ja) .hp-embed .hp-navrow { border-bottom: 0; }
