/* 掲載内容の修正受付 — 画面のスタイル */
:root {
    --bg: #f4f6f8;
    --panel: #fff;
    --line: #dde3e8;
    --ink: #1f2d3a;
    --sub: #5f7183;
    --brand: #0b6e6e;
    --brand-dark: #085656;
    --accent: #e8f4f4;
    --warn: #c0392b;
    --warn-bg: #fff4f2;
    --chip: #eef2f5;
    --done: #1a7f4b;      /* 新規参画社の「入力済み」（赤はエラーに見えるので緑） */
    --done-bg: #eef8f2;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
    color: var(--ink);
    font: 15px/1.6 -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
}

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

[hidden] {
    display: none !important;
}

/* ---- 上の帯 ---- */
.topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 9px 16px;
    background: var(--brand);
    color: #fff;
}

.topbar__title {
    margin: 0;
    font-size: 16px;
}

.topbar__company {
    font-size: 14px;
    font-weight: 700;
}

.topbar__spacer {
    flex: 1;
}

.topbar__badge {
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 14px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

.topbar__badge.is-off {
    background: rgba(0, 0, 0, .28);
}

.topbar__version {
    font-size: 11px;
    opacity: .8;
}

.topbar__account {
    display: inline-block;
    align-items: center;
    gap: 4px 10px;
    font-size: 12px;
}

.topbar__login {
    opacity: .85;
}

/* 使い方（マニュアル）の入口。小さな文字のリンクで見つけられなかったので、白いボタンにする（-247） */
.topbar__manual {
    padding: 4px 12px;
    border-radius: 999px;
    background: #fff;
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.topbar__manual:hover {
    background: var(--accent);
}

.topbar__link {
    padding: 2px 0;
    border: 0;
    background: none;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* ---- ログイン画面（ログインするまでは、ほかの部品を出さない） ---- */
body.is-login .topbar,
body.is-login .tabs,
body.is-login .layout,
body.is-login .actions {
    display: none;
}

.login {
    flex: 1;
    overflow: auto;
    padding: 48px 16px;
}

.login__card {
    max-width: 420px;
    margin: 0 auto;
    padding: 28px 28px 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
}

.login__title {
    margin: 0 0 8px;
    color: var(--brand-dark);
    font-size: 20px;
}

.login__lead,
.login__help {
    margin: 0 0 16px;
    color: var(--sub);
    font-size: 13px;
}

.login__help {
    margin: 16px 0 0;
}

.btn--wide {
    width: 100%;
    margin-top: 4px;
}

/* ---- スマホ用の切り替え ---- */
.tabs {
    display: none;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
}

.tabs__btn {
    flex: 1;
    padding: 10px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: none;
    font-weight: 700;
    cursor: pointer;
}

.tabs__btn.is-active {
    border-bottom-color: var(--brand);
    color: var(--brand);
}

.tabs__count {
    color: var(--warn);
    font-size: 12px;
}

/* ---- 2つの枠 ---- */
.layout {
    display: flex;
    flex: 1;
    min-height: 0;
}

.chat {
    display: flex;
    flex: 1 1 42%;
    flex-direction: column;
    min-width: 0;
    border-right: 1px solid var(--line);
    background: var(--panel);
}

.sheet {
    display: flex;
    flex: 1 1 58%;
    flex-direction: column;
    min-width: 0;
}

/* ---- やりとり（AIサポート） ---- */
.chat__head {
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--accent);
}

.chat__title {
    margin: 0;
    color: var(--brand-dark);
    font-size: 17px;
}

.chat__lead {
    margin: 2px 0 0;
    color: var(--sub);
    font-size: 12px;
    line-height: 1.5;
}

.chat__log {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 6px;
}

.msg {
    display: flex;
    margin-bottom: 12px;
}

.msg--user {
    justify-content: flex-end;
}

.msg__bubble {
    max-width: 88%;
    padding: 10px 13px;
    border-radius: 13px;
    white-space: pre-wrap;
    word-break: break-word;
}

.msg--ai .msg__bubble {
    border-top-left-radius: 3px;
    background: var(--accent);
}

.msg--user .msg__bubble {
    border-top-right-radius: 3px;
    background: var(--brand);
    color: #fff;
}

.msg.is-thinking .msg__bubble {
    color: var(--sub);
}

.card {
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--line);
    background: #fff !important;
    white-space: normal;
}

.card.is-done {
    opacity: .7;
}

.card__title {
    margin-bottom: 6px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
}

.card__item {
    display: flex;
    gap: 9px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
    cursor: pointer;
}

.card__item input {
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 3px;
}

.card__body {
    flex: 1;
    min-width: 0;
}

.card__label {
    font-size: 12px;
    font-weight: 700;
}

.card__old,
.diff__old {
    color: var(--sub);
    text-decoration: line-through;
    white-space: pre-wrap;
    word-break: break-word;
}

.card__new,
.diff__new {
    color: var(--warn);
    font-weight: 700;
    white-space: pre-wrap;
    word-break: break-word;
}

.diff__val {
    white-space: pre-wrap;
    word-break: break-word;
}

.card__warn {
    color: var(--warn);
    font-size: 12px;
}

.card__note {
    margin: -2px 0 8px;
    padding: 6px 8px;
    border-radius: 6px;
    background: var(--warn-bg);
    color: var(--warn);
    font-size: 12px;
}

.card__count {
    color: var(--sub);
    font-size: 12px;
}

.card__item.is-invalid .card__new {
    text-decoration: line-through;
    opacity: .6;
}

.chat__quick {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 0 16px 8px;
}

.quick {
    padding: 7px 13px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--chip);
    font-size: 13px;
    cursor: pointer;
}

.quick:hover {
    background: #e3eaef;
}

.quick--primary {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.quick--primary:hover {
    background: var(--brand-dark);
}

.chat__composer {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    padding: 10px 14px;
    border-top: 1px solid var(--line);
}

.chat__input {
    flex: 1;
    min-height: 44px;
    max-height: 140px;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    resize: none;
}

.chat__input:focus,
.row__input:focus,
.form__input:focus {
    border-color: var(--brand);
    outline: 2px solid rgba(11, 110, 110, .2);
}

.chat__send {
    height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

/* 申請してロック中・受付終了のときは押せないことが見て分かるように（.btn:disabled と同じ） */
.chat__send:disabled {
    opacity: .45;
    cursor: default;
}

/* ---- 掲載内容の表 ---- */
.sheet__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--panel);
}

.sheet__title {
    flex: 1;
    margin: 0;
    color: var(--brand-dark);
    font-size: 17px;   /* -247：見出しが弱く、どこが掲載内容か分かりにくかった */
}

.sheet__title small {
    margin-left: 6px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 400;
}

.sheet__filter {
    font-size: 13px;
    cursor: pointer;
}

/* 調達担当が編集を再開したときのお知らせ（AI を使う・使わないのどちらでも見えるよう、表の上に出す） */
/* ほかの画面で保存・申請されたときのお知らせ（-132 の横展開） */
.sheet__stale {
    margin: 8px 14px 0;
    padding: 10px 14px;
    border: 1px solid var(--warn);
    border-radius: 8px;
    background: var(--warn-bg);
    color: var(--warn);
    font-size: 13px;
    font-weight: 700;
}

.sheet__stale p {
    margin: 0 0 6px;
}

.sheet__stale .sheet__stale-sub {
    font-weight: 400;
}

.sheet__notice {
    margin: 10px 16px 0;
    padding: 12px 16px;
    border: 2px solid #e0a100;
    border-left-width: 8px;
    border-radius: 8px;
    background: #fff8e1;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.6;
}

/* 再開のお知らせの見出し（-234。ほかの帯と同じ色で目立たなかった） */
.sheet__notice-title {
    display: block;
    margin-bottom: 4px;
    color: #8a5a00;
    font-size: 15px;
    font-weight: 700;
}

.sheet__notice strong {
    display: block;
    color: var(--brand-dark);
}

.sheet__notice p {
    margin: 4px 0 0;
    white-space: pre-wrap;
}

.sheet__body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px 40px;
}

.sec {
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    background: var(--panel);
}

.sec__title {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 9px 14px;
    border-bottom: 1px solid var(--line);
    background: #eef3f5;
    font-size: 14px;
}

.sec__count {
    margin-left: auto;
    color: var(--warn);
    font-size: 12px;
}

.sec__note {
    margin: 0;
    padding: 7px 14px;
    border-bottom: 1px solid #f0f3f5;
    color: var(--sub);
    font-size: 12px;
}

.row {
    display: flex;
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 1px solid #f0f3f5;
}

.row:last-child {
    border-bottom: 0;
}

.row__label {
    flex: 0 0 168px;
    padding-top: 7px;
    color: var(--sub);
    font-size: 13px;
}

.row__tag {
    display: inline-block;
    margin-left: 6px;
    color: var(--warn);
    font-size: 11px;
    font-weight: 700;
}

/* 「必須」の印。初めて見る方にも気づきやすいよう赤で示す（2026-10-26 社内テスト -123） */
/* 「どちらか必須」の相手の項目（-211） */
.row__either {
    margin-top: 4px;
    color: var(--warn);
    font-size: 12px;
}

.row__req {
    display: inline-block;
    margin-left: 6px;
    padding: 0 4px;
    border: 1px solid var(--warn);
    border-radius: 4px;
    background: var(--warn-bg);
    color: var(--warn);
    font-size: 10px;
    font-weight: 700;
}

/* 載る先が片方だけの項目・節の印（Webページだけ／紙パンフレットだけ） */
.media-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 4px;
    background: #e6eef8;
    color: #2a5d8f;
    font-size: 10px;
    font-weight: 400;
    white-space: nowrap;
}

.media-tag--paper {
    background: #f6ece0;
    color: #8a5a1c;
}

.row__error {
    color: var(--warn);
    font-size: 12px;
    font-weight: 700;
}

.row__error:empty {
    display: none;
}

.row.is-invalid .row__input {
    border-color: var(--warn);
    background: var(--warn-bg);
}

.row__main {
    flex: 1;
    min-width: 0;
}

.row__input {
    width: 100%;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
}

/* プルダウンは中身に合った幅にする（-139：画面いっぱいの幅だと、Windows の Edge で一覧がはみ出し、選択肢の左側が切れた） */
select.row__input {
    width: auto;
    min-width: 12em;
    max-width: 100%;
}

textarea.row__input {
    display: block;
    min-height: 44px;
    resize: vertical;
    line-height: 1.6;
}

.row__readonly {
    padding: 7px 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.row__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    min-height: 4px;
    margin-top: 3px;
    font-size: 12px;
}

.row__hint,
.row__counter {
    color: var(--sub);
}

.row__note {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--sub);
}

.row__counter.is-over {
    color: var(--warn);
    font-weight: 700;
}

.row__polish,
.row__revert {
    padding: 2px 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--chip);
    font-size: 12px;
    cursor: pointer;
}

.row__revert {
    display: none;
}

.row__before {
    margin-top: 3px;
    color: var(--sub);
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* AI が自動で入れて、まだ確かめていない項目（-126） */
.row.is-ai-pending,
.check.is-ai-pending {
    background: #fffdf0;
}

.row__ai {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
    margin-bottom: 6px;
    padding: 6px 10px;
    border: 1px solid #e6c84f;
    border-radius: 6px;
    background: #fff8db;
    color: #6b5400;
    font-size: 12.5px;
}

.row__ai-btn {
    padding: 3px 12px;
    border: 1px solid #b38f00;
    border-radius: 14px;
    background: #fff;
    color: #6b5400;
    font-weight: 700;
    cursor: pointer;
}

.row.is-changed {
    background: var(--warn-bg);
}

.row.is-changed .row__label {
    color: var(--warn);
}

.row.is-changed .row__input {
    border-color: #e3a79f;
    color: var(--warn);
    font-weight: 700;
}

.row.is-changed .row__revert {
    display: inline-block;
}

.row.is-flash,
.check.is-flash {
    outline: 3px solid #f7b500;
    outline-offset: -3px;
}

/* 写真（昨年度の写真と、差し替え用にアップロードした写真を並べる） */
.photo__pics,
.diff__pics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pic {
    margin: 0;
    width: 180px;
    max-width: 100%;
}

.pic__link {
    display: block;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--chip);
    overflow: hidden;
}

.pic__img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: contain;
}

.pic__cap {
    margin-top: 3px;
    color: var(--sub);
    font-size: 12px;
}

.pic--new .pic__link {
    border: 2px solid var(--warn);
}

.pic--new .pic__cap {
    color: var(--warn);
    font-weight: 700;
}

.photo__none {
    color: var(--sub);
    font-size: 13px;
}

.photo__status {
    margin-top: 4px;
    font-size: 12px;
}

.photo__status.is-warn {
    padding: 6px 10px;
    border-radius: 6px;
    background: var(--warn-bg);
    color: var(--warn);
}

.photo__pick {
    padding: 4px 12px;
    border: 1px solid var(--brand);
    border-radius: 14px;
    background: var(--panel);
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.photo__pick:disabled {
    opacity: .5;
    cursor: wait;
}

.checks {
    padding: 8px 14px;
    border-bottom: 1px solid #f0f3f5;
}

.checks__title {
    margin-bottom: 4px;
    color: var(--sub);
    font-size: 12px;
}

.checks__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 2px 12px;
}

.check {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.check input {
    width: 17px;
    height: 17px;
}

.check.is-changed {
    background: var(--warn-bg);
    color: var(--warn);
    font-weight: 700;
}

.check.is-changed .check__label::after {
    content: "（変更）";
    font-size: 11px;
}

/* 「変更した項目だけ表示」 */
.is-only-changed .row:not(.is-changed),
.is-only-changed .check:not(.is-changed),
.is-only-changed .sec:not(.has-change),
.is-only-changed .sec__note {
    display: none;
}

.is-only-changed .checks:not(:has(.is-changed)) {
    display: none;
}

.is-ai-off .row__polish {
    display: none;
}

/* ---- 下の帯 ---- */
.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 9px 16px;
    border-top: 1px solid var(--line);
    background: var(--panel);
}

/* 常に画面の最下部に出す小さな注記（ログイン画面も含む） */
.security-note {
    flex: none;
    margin: 0;
    padding: 1px 16px;
    background: var(--bg);
    color: var(--sub);
    font-size: 10px;
    line-height: 1.6;
    text-align: right;
}

.actions__info {
    flex: 1;
    color: var(--sub);
    font-size: 12px;
}

.actions__info.is-error {
    color: var(--warn);
    font-weight: 700;
}

.actions__count {
    color: var(--warn);
    font-size: 13px;
    font-weight: 700;
}

/* 既存の会社：いまの変更での費用の見込み（税込）。「変更 N件」の左に出す */
.actions__fee {
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: help;
}

.btn {
    padding: 10px 18px;
    border: 0;
    border-radius: 9px;
    font-weight: 700;
    cursor: pointer;
}

.btn--ghost {
    background: var(--chip);
}

.btn--small {
    margin-top: 6px;
    padding: 5px 12px;
    font-size: 12px;
}

.btn--primary {
    background: var(--brand);
    color: #fff;
}

.btn--primary:hover {
    background: var(--brand-dark);
}

.btn:disabled {
    opacity: .45;
    cursor: default;
}

/* ---- ダイアログ ---- */
.modal {
    width: min(680px, calc(100vw - 24px));
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);   /* iPhone の Safari：ツールバーの分を除いた高さに収める（-144） */
    padding: 0;
    border: 0;
    border-radius: 14px;
}

.modal[open] {
    display: flex;
    flex-direction: column;
}

.modal::backdrop {
    background: rgba(20, 30, 40, .5);
}

.modal__title {
    margin: 0;
    padding: 15px 20px;
    border-bottom: 1px solid var(--line);
    font-size: 16px;
}

/* flex: 1（基準 0）だと、高さが決まっていない窓で Safari が本文を縮め、ほとんど見えなくなる（2026-10-27 社内テスト -144）。
   中身の高さを基準にして、窓に収まらない分だけ縮めてスクロールさせる */
.modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 20px;
}

.modal__body--center {
    text-align: center;
}

.modal__body p {
    margin: .4em 0;
}

.modal__list {
    margin: .5em 0;
    padding-left: 1.3em;
    font-size: 14px;
}

.modal__sub {
    color: var(--sub);
    font-size: 12.5px;
}

.modal__lead {
    font-weight: 700;
}

.modal__note {
    padding: 8px 12px;
    border-left: 3px solid var(--brand);
    border-radius: 4px;
    background: var(--accent);
    font-size: 13px;
}

.modal__warn {
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--warn-bg);
    color: var(--warn);
    font-size: 13px;
}

.modal__done {
    margin: 6px 0;
    color: var(--brand);
    font-size: 22px;
    font-weight: 700;
}

.modal__foot {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 12px 20px;
    border-top: 1px solid var(--line);
}

.modal__foot--stack {
    flex-direction: column;
}

.diff {
    margin: 8px 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.diff__row {
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.diff__row:last-child {
    border-bottom: 0;
}

.diff__label {
    font-size: 12px;
    font-weight: 700;
}

.form__field {
    display: block;
    margin-bottom: 9px;
}

.form__label {
    display: block;
    margin-bottom: 2px;
    font-size: 13px;
    font-weight: 700;
}

.form__input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.form__agree {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 10px 0 4px;
    font-weight: 700;
    cursor: pointer;
}

.form__agree input {
    width: 18px;
    height: 18px;
}

.form__error {
    min-height: 1.4em;
    margin: 4px 0;
    color: var(--warn);
    font-size: 13px;
    font-weight: 700;
}

/* ---- そのほか ---- */
.toast {
    position: fixed;
    bottom: 76px;
    left: 50%;
    z-index: 50;
    max-width: calc(100vw - 32px);
    padding: 10px 18px;
    border-radius: 10px;
    background: #1f2d3a;
    color: #fff;
    font-size: 13px;
    opacity: 0;
    transform: translateX(-50%) translateY(16px);
    transition: .25s;
    pointer-events: none;
}

.toast.is-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.is-fatal .tabs,
.is-fatal .layout,
.is-fatal .actions {
    display: none;
}

/* 申請を受け付けたあとの完了の画面（-206） */
.is-done .tabs,
.is-done .layout,
.is-done .actions,
.is-done .topbar__badge,
.is-done .topbar__link,
.is-done .topbar__manual,
.is-done .topbar__account {
    display: none;
}

.done {
    max-width: 600px;
    margin: 48px auto;
    padding: 28px 28px 24px;
    border-radius: 12px;
    background: var(--panel);
    text-align: center;
    line-height: 1.7;
}

.done__mark {
    width: 56px;
    height: 56px;
    margin: 0 auto 8px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-size: 30px;
    line-height: 56px;
}

.done__title {
    margin: 0 0 12px;
    font-size: 22px;
}

.done__number {
    margin: 12px 0;
    font-size: 18px;
    font-weight: 700;
}

.done__note {
    color: var(--muted, #555);
    font-size: 13px;
}

.done__foot {
    margin-top: 16px;
}

/* 画面の説明（チュートリアル -247） */
.tour {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.tour__spot {
    position: fixed;
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55);
    outline: 3px solid #ffd54f;
    pointer-events: none;
    transition: all .2s ease;
}

.tour__bubble {
    position: fixed;
    padding: 14px 16px 12px;
    border-radius: 12px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .3);
    line-height: 1.6;
}

.tour__count {
    color: var(--sub);
    font-size: 12px;
}

.tour__title {
    margin: 2px 0 6px;
    color: var(--brand-dark);
    font-size: 17px;
}

.tour__text {
    margin: 0;
    font-size: 14px;
}

.tour__foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.fatal {
    max-width: 560px;
    margin: 48px auto;
    padding: 24px;
    border-radius: 12px;
    background: var(--panel);
    text-align: center;
}

/* ---- 幅のせまい画面（スマホ）：2つの枠を切り替えて使う ---- */
@media (max-width: 860px) {
    .tabs {
        display: flex;
    }

    .layout[data-pane="chat"] .sheet,
    .layout[data-pane="table"] .chat {
        display: none;
    }

    .chat {
        border-right: 0;
    }

    .row {
        flex-direction: column;
        gap: 2px;
    }

    .row__label {
        flex: none;
        padding-top: 0;
    }

    .topbar__version {
        display: none;
    }

    /* ボタンは文字を折り返さず、1つ 40% 以上の幅にする。費用の見込みと件数が1行目、ボタンが次の行に並ぶ
       （費用の見込みを出したら、ボタンが縦長に押しつぶされたため。2026-10-26） */
    .actions .btn {
        flex: 1 1 40%;
        padding: 10px 8px;
        white-space: nowrap;
    }

    .actions__info {
        flex-basis: 100%;
    }

    .actions__count {
        flex-grow: 1;
    }
}

/* 新規参画社：入力した項目は緑で示す（赤はエラーのときだけ） */
.is-new .row.is-changed,
.is-new .check.is-changed {
    background: var(--done-bg);
    color: var(--ink);
}

.is-new .row.is-changed .row__label,
.is-new .row__tag,
.is-new .sec__count,
.is-new .card__new {
    color: var(--done);
}

.is-new .row.is-changed .row__input {
    border-color: #9fd3b4;
    color: var(--ink);
    font-weight: 400;
}

.is-new .check.is-changed {
    color: var(--done);
}

.is-new .check.is-changed .check__label::after {
    content: "（入力済み）";
}

.is-new .actions__count {
    color: var(--ink);
}

/* エラーの表示は新規でも赤のまま */
.is-new .row.is-invalid .row__input {
    border-color: var(--warn);
}

/* ---- AIを使わない設定：やりとりの枠を出さず、表を全幅にする（受付終了の会社は案内を見せるため対象外） ---- */
body.is-ai-off .chat,
body.is-ai-off .tabs {
    display: none;
}

body.is-ai-off .layout .sheet {
    display: flex;
}

/* 「まだ入っていない必須の項目を見る」は、チャットが無いとき（新規参画社・AIを使わない設定）だけ下の帯に出す */
#missingBtn {
    display: none;
}

body.is-new.is-ai-off #missingBtn {
    display: inline-block;
}

/* 今年の修正の予定（dialogs.js の openPlan） */
.plan__row {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.plan__label {
    padding: 0 4px;
    font-weight: 700;
}

.plan__option {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    margin-right: 20px;
    cursor: pointer;
}

/* 申請の前の確認：修正の費用の内訳と合計 */
.fee {
    margin: 12px 0;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.fee__title {
    margin-bottom: 4px;
    font-weight: 700;
}

.fee__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 0;
    font-size: 14px;
}

.fee__row--total {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid var(--line);
    font-weight: 700;
}

.fee__yen {
    white-space: nowrap;
}
