/* ギルド・ライル・ルーン・バク・ゴルム・設定などの仕上げ（2026-10-07 卓馬「他の開発部分の完成度を上げる」）。
   広告（ad-rikuto.css）・LP（lp-*）の見た目とぶつけないよう、この1枚に分けた。
   色は google.css の --g-* を使う（画面ごとに青が違うと、押せる物の見分けがつかない） */

/* ── ライル（2026-10-08 phase 2 A・卓馬「根底から完成度を上げる」）。値は tokens.css だけ ── */
/* 最初の一歩「ホームページのURLから読み取る」 */
.intake-dialog .intake-site{display:grid;gap:var(--ds-sp-3);margin:0 0 var(--ds-sp-4);border-color:var(--ds-accent-border);background:var(--ds-accent-softer)}
.intake-dialog .intake-site-head{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ds-sp-3)}
.intake-dialog .intake-site-title{margin:0;font:var(--ds-fw-bold) var(--ds-fs-lg)/1.4 var(--ds-font);color:var(--ds-text)}
.intake-dialog .intake-site-text{margin:0;font-size:var(--ds-fs-sm);line-height:var(--ds-lh);color:var(--ds-text-2)}
.intake-dialog .intake-site-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ds-sp-3)}
.intake-dialog .intake-site-url{flex:1 1 320px;width:auto;min-width:0}
.intake-dialog .intake-site-said{margin:0;font-size:var(--ds-fs-sm);line-height:1.6;color:var(--ds-text-2)}
.intake-dialog .intake-site-said:empty{display:none}
/* ホームページから入れた欄（確かめてほしい欄） */
.intake-dialog .intake-cell[data-from-site="true"]{border-radius:var(--ds-r-md);box-shadow:0 0 0 2px var(--ds-warning-border);background:var(--ds-warning-bg)}
/* 下の帯：主なボタンは最後の1つ（広告をつくる／足りない欄を入れる）。ほかは2番目以下の見た目 */
.intake-footer>button.intake-make-sub{background:var(--ds-surface)!important;color:var(--ds-accent)!important;border:1px solid var(--ds-border-strong)!important;box-shadow:none!important;flex:0 0 auto}
.intake-footer>button.intake-sub-ghost{background:transparent!important;color:var(--ds-accent)!important;border-color:transparent!important;box-shadow:none!important}
.intake-footer>button.intake-sub-ghost:hover:not(:disabled){background:var(--ds-accent-soft)!important}
.intake-score-next .intake-score-next-sub{background:var(--ds-surface);color:var(--ds-accent);border:1px solid var(--ds-border-strong)}
/* スマホ：Lv の説明を数字の下へ（数字の横で縦に細く折れていた・監査） */
@media(max-width:640px){
 .intake-dialog .intake-score-top{grid-template-columns:minmax(0,1fr)!important;justify-items:center}
 .intake-dialog .intake-score-side{max-width:none;text-align:center;justify-self:stretch}
 .intake-dialog .intake-site-row .ds-btn{flex:1 1 auto}
 .intake-dialog .intake-site-row .ds-cost{flex-basis:100%;justify-content:center}
 /* たたんだ帯は主なボタン1つだけ */
 .intake-footer[data-open=false]>.intake-make-sub{display:none}
}

/* ライル満点のときの次の一手（入力画面の「次にやること」）。一覧は格子なので、1行ぶん全体を使う */
.intake-score-list>.intake-score-empty{grid-column:1/-1}
.intake-score-next{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;grid-column:1/-1}
.intake-score-next .intake-score-next-main{background:var(--g-primary,#0b57d0);color:#fff;border-color:transparent}
.intake-score-next .intake-score-next-main:hover:not(:disabled){background:var(--g-primary-hover,#0842a0)}

/* 依頼画面：できあがったもの（読む・持ち出す・次の仲間）。#request-guide のボタンは全部青で塗られるので、ここで主従を付け直す */
#request-guide .core-result{margin-top:18px;padding:16px 18px;border:1px solid #c2e7ff;background:#fff;border-radius:12px}
#request-guide .core-result h3{font-size:16px;margin:0 0 6px}
#request-guide .core-result p{font-size:13px;color:#444746}
#request-guide .core-result-actions,#request-guide .core-result-next{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;align-items:center}
#request-guide .core-result button{background:#fff;color:var(--g-primary,#0b57d0);border:1px solid var(--g-outline-2,#c4c7c5);font-size:13px;padding:9px 16px}
#request-guide .core-result button.core-result-main{background:var(--g-primary,#0b57d0);color:#fff;border-color:transparent}
#request-guide .core-result-next strong{font-size:12px;color:#444746;margin-right:4px}
#request-guide .request-materials-fold{margin-top:16px}
#request-guide .request-materials-fold>summary{cursor:pointer;font-size:13px;color:#444746}

/* 全文を読む画面：1行を短くして読みやすくする（横幅いっぱいの行は目で追えない） */
dialog.core-reader{width:min(900px,calc(100vw - 32px));max-height:calc(100vh - 32px);padding:0;border:0;border-radius:16px;box-shadow:var(--g-elev-3,0 4px 8px 3px rgba(60,64,67,.15))}
dialog.core-reader::backdrop{background:rgba(32,33,36,.45)}
.core-reader-head{position:sticky;top:0;z-index:1;display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;padding:14px 20px;background:#fff;border-bottom:1px solid #e1e3e1}
.core-reader-head h2{margin:0;font-size:18px}
.core-reader-tools{display:flex;flex-wrap:wrap;gap:8px}
.core-reader-note{margin:14px 24px 0;padding:10px 14px;border-radius:10px;background:#fef7e0;color:#5f4b00;font-size:13px}
.core-reader-body.document{margin:14px auto 24px;max-width:72ch;border:0;padding:8px 24px;font-size:15px;box-sizing:content-box}
@media(max-width:600px){
 .core-reader-head{padding:12px 16px}
 /* スマホ：「閉じる」が2行目に1つだけ落ちて迷子に見えた（2026-10-10 390px確認）。見出しの右上に置く */
 .core-reader-head h2{padding-right:72px}
 .core-reader-tools .ds-btn--ghost:last-child{position:absolute;top:10px;right:12px}
 .core-reader-note{margin:12px 16px 0}
 .core-reader-body.document{margin:12px 0 20px;font-size:14px;padding:0 16px;box-sizing:border-box;max-width:none}
 #request-guide .core-result button{flex:1 1 100%}
}

/* ゴルム：仕事の一覧の上の帯（2026-10-07） */
#production-queue-dialog .golum-bar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between;margin:0 0 16px;padding:14px 16px;border-radius:12px;background:#f0f4f9;border:1px solid #d3e3fd}
#production-queue-dialog .golum-bar div{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1 1 260px}
#production-queue-dialog .golum-bar strong{font-size:14px}
#production-queue-dialog .golum-bar span{font-size:13px;color:#444746;line-height:1.7}
@media(max-width:600px){#production-queue-dialog .golum-bar button{width:100%}}

/* 入力画面：作るボタンの直前の一言（費用がかかるか／準備中か） */
.intake-footer .intake-make-hint{flex-basis:100%;margin:0;font-size:12px;color:#444746}

/* ギルドのカード：スマホ（390px）で3列だと1枚が約100pxになり、錠前の文字と「鍵を開ける」が折り返して名前を隠していた（2026-10-07） */
@media(max-width:520px){
 .studio-specialists{grid-template-columns:repeat(2,minmax(0,1fr))}
 .studio-specialists .agent-lock-title{font-size:13px;line-height:1.4}
 .studio-specialists .agent-lock-say{font-size:11px;line-height:1.4}
 .studio-specialists .agent-lock-open{font-size:13px;padding:6px 14px;white-space:nowrap}
}

/* 依頼の画面のかたまり（2026-10-07）。長い1枚に並んでいたボタンと欄を、よく使う順に畳んだ。
   一番上＝今の状況とできあがり（主な操作1つ）、その下は押すと開く見出しだけ */
#request-dialog .request-group{margin:10px 0;padding:0;border:1px solid #e1e3e1;border-radius:12px;background:#fff}
#request-dialog .request-group>summary{cursor:pointer;padding:14px 18px;font-size:15px;font-weight:600;color:#1f1f1f}
#request-dialog .request-group[open]>summary{border-bottom:1px solid #e1e3e1}
#request-dialog .request-group>:not(summary){margin-left:18px;margin-right:18px}
#request-dialog .request-group>#proposal-section,#request-dialog .request-group>#work-delivery-section{border:0;margin:0;padding:16px 18px}
#request-dialog .request-tools-list{display:flex;flex-wrap:wrap;gap:8px;padding:14px 0}
#request-dialog #request-instructions .request-note{margin-top:14px}
#request-dialog #request-more>details,#request-dialog #request-more>.scope-entry{margin-bottom:14px}

/* できあがりの枠：主な操作「全文を読む」＋「ほかの操作」のメニュー */
#request-guide .core-result-actions{align-items:flex-start}
#request-guide .core-result-more{margin:0;padding:0;border:0;background:none}   /* ダイアログ共通の details の枠を外す */
#request-guide .core-result-more>summary{cursor:pointer;list-style:none;padding:9px 16px;border:1px solid var(--g-outline-2,#c4c7c5);border-radius:999px;font-size:13px;color:var(--g-primary,#0b57d0);background:#fff}
#request-guide .core-result-more>summary::-webkit-details-marker{display:none}
#request-guide .core-result-more>summary::after{content:' ▾'}
#request-guide .core-result-menu{display:flex;flex-direction:column;gap:2px;min-width:240px;margin-top:6px;padding:6px;border:1px solid #e1e3e1;border-radius:12px;background:#fff}
#request-guide .core-result-menu button{border:0;border-radius:8px;text-align:left;width:100%}
#request-guide .core-result-menu button:hover:not(:disabled){background:#f0f4f9}

/* スマホ（390px）：見出しが大きく、題名が3行・セクションの帯が2段になって画面の4割を使っていた（2026-10-07） */
@media(max-width:600px){
 #request-title{font-size:19px;line-height:1.35}
 #request-dialog #request-meta{font-size:12px!important;line-height:1.5;margin:8px 0}   /* style.css の「dialog form > p{16px!important}」に負けるので important */
 #request-section-nav{flex-wrap:nowrap}
 #request-section-nav button{min-height:34px;font-size:12px;padding:6px 10px}
 #request-guide h3,#request-dialog #proposal-section>h3,#request-dialog #work-delivery-section>h3,#request-dialog .scope-entry h3{font-size:16px}
 #request-guide .core-result h3{font-size:15px}
 #request-dialog .request-group>summary{font-size:14px;padding:12px 14px}
 #request-dialog .request-group>:not(summary){margin-left:14px;margin-right:14px}
 #request-dialog .request-group>#proposal-section,#request-dialog .request-group>#work-delivery-section{padding:14px}
 #request-guide .core-result-more{flex:1 1 100%}
 #request-guide .core-result-more>summary{text-align:center}
}

/* 新しい作業場の「最初にやること」（2026-10-08 安全な既定）。自社の名前が無いときだけ出す */
.office-onboarding{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 14px;padding:14px 18px;border:1px solid #c6dafc;border-radius:12px;background:#e8f0fe;color:#1f1f1f}
.office-onboarding[hidden]{display:none}
.office-onboarding strong{display:block;font-size:16px;margin:2px 0 4px}
.office-onboarding p{margin:0;font-size:13px;line-height:1.6;color:#444746}
.office-onboarding-step{font-size:11px;font-weight:700;letter-spacing:.06em;color:#0b57d0}
.office-onboarding button{flex:none;border:0;border-radius:20px;padding:10px 18px;background:#0b57d0;color:#fff;font-size:14px;font-weight:600;cursor:pointer}
.office-onboarding button:hover{background:#0842a0}
@media(max-width:600px){.office-onboarding{flex-direction:column;align-items:stretch}.office-onboarding button{width:100%}}
