/* 会員の入口の画面だけが読む CSS。font.css と entry.css の後に読む (specs/member-billing/design-look.md)。
   検証環境の入口 (proofread-web-proto) はこのファイルを読まないので、そちらの色は変わらない */

/* 色: LP (gojimiru-lp の public/index.html の :root) の値に置き換える。
   --blue は entry.css が「主な操作と選んだ状態の色」に使っている名前。会員の入口では LP の「申し込む」と同じ墨を入れる */
:root {
  --ink: #111214; --sub: #3b3d40; --soft: #e9eae8; --ground: #f3f4f2; --sel: #f3f4f2; --line: #cfd1cd;
  --blue: #111214; --stop: #b32111;
  --paper-2: #dcdedb; --red: #dc2c1a; --field-line: #8d908b; --ink-hover: #2a2c30; --stop-soft: #fbf1ef;
}
::selection { background: var(--red); color: #fff; }
a { color: inherit; text-underline-offset: 0.2em; }

/* entry.css が色を直に書いている所 */
#app-header { border-bottom-color: var(--ink); }
/* 使えない時は entry.css の #start-button:disabled の色のままにする (カーソルを乗せても濃くしない) */
#start-button:hover:not(:disabled), #leave-back:hover { background: var(--ink-hover); }
.drop-or { font-size: 14px; }
.progress-seg { background: var(--paper-2); }
.progress-seg[data-mark="current"] { background: linear-gradient(90deg, var(--ink) 0 50%, var(--paper-2) 50%); background-size: 200% 100%; }
#drop-zone.is-over::before { background: var(--paper-2); }
#leave-dialog::backdrop { background: rgba(17, 18, 20, .4); }
.btn { border-color: var(--field-line); }

/* 上の帯の右 */
.header-link { flex: none; display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
/* 狭い幅では、ロゴより先に表示用の名前を縮めて「…」で省く。名前は押せない字で、メニューはその右のボタンで開く */
#header-service { flex: 1 1 auto; }
#header-user { flex: 0 50 auto; min-width: 0; max-width: 16em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--ink); }
#member-menu { position: relative; flex: none; }
#menu-button { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--field-line); border-radius: 6px; background: #fff; cursor: pointer; list-style: none; }
#menu-button::-webkit-details-marker { display: none; }
#menu-button:hover, #member-menu[open] #menu-button { background: var(--ground); }
#menu-button::before { content: ""; width: 18px; height: 2px; background: var(--ink); box-shadow: 0 -6px 0 var(--ink), 0 6px 0 var(--ink); }
.menu-panel { position: absolute; z-index: 10; top: calc(100% + 8px); right: 0; width: max-content; min-width: 14rem; max-width: calc(100vw - 32px); padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 2px 10px rgba(0, 0, 0, .14); }
#header-sign-out { margin: 0; }
.menu-item { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: 15px; text-align: left; text-decoration: none; cursor: pointer; }
.menu-item:hover { background: var(--ground); }

/* 入力の画面 (会員登録・ログイン・パスワードを忘れたとき・プランを選ぶ・退会の案内): 机の上の白い用紙 1 枚 */
.member-page { flex: 1; min-height: 0; overflow: auto; display: flex; justify-content: center; align-items: flex-start; padding: clamp(16px, 3vh, 28px) var(--edge); }
.sheet { width: 100%; max-width: 30rem; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .14); padding: clamp(20px, 5vw, 32px); }
.sheet-wide { max-width: 44rem; }
.sheet-title { font-size: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.sheet-lead { margin-top: 14px; font-size: 15px; line-height: 1.7; color: var(--sub); word-break: auto-phrase; text-wrap: pretty; }

.form { display: grid; gap: 18px; margin-top: 20px; }
.field { display: grid; gap: 6px; }
.field > label { font-size: 15px; }
.hint { font-size: 14px; color: var(--sub); }
.hint, .error, .check label, .form-alert, .form-done { word-break: auto-phrase; text-wrap: pretty; }
.field input:not([type="checkbox"], [type="radio"]) { font: inherit; width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--field-line); border-radius: 6px; background: #fff; color: var(--ink); caret-color: var(--ink); transition: border-color .15s; }
.field input:not([type="checkbox"], [type="radio"]):hover { border-color: var(--ink); }
.field input:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.field[data-invalid] input:not([type="checkbox"], [type="radio"]) { border-color: var(--stop); }
.error { font-size: 14px; line-height: 1.6; color: var(--stop); }
.error:empty, .form-alert:empty { display: none; }
.form-alert { padding: 12px 14px; border: 1px solid var(--stop); border-radius: 6px; background: var(--stop-soft); color: var(--stop); font-size: 15px; line-height: 1.6; }
.form-done { padding: 12px 14px; border: 1px solid var(--ink); border-radius: 6px; font-size: 15px; line-height: 1.6; }

/* パスワードの欄と「表示」のボタン */
.with-toggle { position: relative; }
/* .field input:not(...) より詳細度を高くして、右の余白を「表示」のボタンの幅にする */
.field .with-toggle input:not([type="checkbox"], [type="radio"]) { padding-right: 76px; }
.toggle { position: absolute; top: 2px; right: 2px; bottom: 2px; min-width: 64px; padding: 0 12px; border: 0; border-radius: 6px; background: none; color: var(--sub); font: inherit; font-size: 14px; cursor: pointer; }
.toggle:hover { background: var(--ground); color: var(--ink); }

.check label { display: flex; gap: 12px; font-size: 15px; line-height: 1.6; cursor: pointer; }
.check[data-invalid] input { outline: 2px solid var(--stop); outline-offset: 1px; }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); cursor: pointer; }

.btn-primary { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; padding: 8px 16px; border: 0; border-radius: 6px; background: var(--ink); color: #fff; font: inherit; font-size: 16px; text-decoration: none; cursor: pointer; transition: background-color .15s; }
.btn-primary:hover { background: var(--ink-hover); }
.btn-primary:disabled { background: var(--soft); color: var(--sub); cursor: not-allowed; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.form-links { margin-top: 20px; font-size: 15px; color: var(--sub); text-align: center; }
.form-links a { color: var(--ink); }
.form-links + .form-links { margin-top: 8px; }
.form > .btn { justify-self: start; }

/* PDF を選ぶ画面: 契約中の人の 3 つの数と、契約中でない人の案内 (PDF を送らずに出す) */
#check-screen[data-state="setup"][data-step="guide"] [data-panel="guide"] { display: block; }
.guide:not([hidden]) { display: grid; gap: 14px; }
.guide-text { font-size: 18px; line-height: 1.6; word-break: auto-phrase; text-wrap: pretty; }
.guide-text:focus { outline: none; }
.guide-actions { display: grid; gap: 10px; }
.guide-actions .btn { min-height: 44px; }
#guide-name:empty { display: none; }
.quote { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 15px; font-variant-numeric: tabular-nums; }
.quote dt { color: var(--sub); }
.quote dd { margin: 0; text-align: right; }
.quote-short { display: grid; gap: 10px; color: var(--stop); font-size: 15px; line-height: 1.6; word-break: auto-phrase; }
.quote-short[hidden] { display: none; }
/* ブラウザに残した結果を開く所 (specs/browser-keep/design.md の 5) */
#keep[hidden] { display: none; }
#keep-name { flex: 1; min-width: 0; }
/* 幅が狭い時に、PDF を選ぶ画面の題「どの PDF をチェックしますか」を 1 行に収める */
@media (max-width: 480px) { #check-screen .step-question { font-size: 24px; } }

/* プランを選ぶ画面: 3 つを縦に並べた行。選んだ行は薄い地と墨の枠。
   選んだ行の丸と名前の下の線は LP の赤 (design-look.md の 6.1 の案 A)。枠は墨のままにし、誤りの欄の --stop の枠と見分ける */
.plans { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.plan-row { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "mark name price" "mark credits price"; align-items: center; gap: 2px 14px; padding: 14px 16px; border: 1px solid var(--field-line); border-radius: 6px; background: #fff; cursor: pointer; font-variant-numeric: tabular-nums; transition: background-color .15s, border-color .15s; }
.plan-row:hover { background: var(--ground); }
.plan-row:has(input:checked) { background: var(--sel); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.plan-row input { grid-area: mark; width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.plan-row:has(input:checked) input { accent-color: var(--red); }
/* 線を字の幅だけに引くため、名前を字の幅に縮める。線の太さと位置は LP の .mk と同じ */
.plan-name { grid-area: name; justify-self: start; font-size: 18px; transition: box-shadow .15s; }
.plan-row:has(input:checked) .plan-name { box-shadow: inset 0 -0.14em 0 var(--red); }
.plan-credits { grid-area: credits; font-size: 15px; color: var(--sub); }
.plan-price { grid-area: price; font-size: 16px; text-align: right; }
@media (max-width: 480px) {
  .plan-row { grid-template-areas: "mark name" "mark credits" "mark price"; grid-template-columns: auto 1fr; }
  .plan-price { text-align: left; }
}
/* 退会の案内のメールアドレス: 押すと全部が選ばれ、写せる */
.contact-mail { padding: 12px 14px; border: 1px solid var(--field-line); border-radius: 6px; font-size: 18px; overflow-wrap: anywhere; user-select: all; }
/* モックだけが出す支払いと契約の画面 */
.mock-actions { display: grid; gap: 10px; }
.mock-actions form, .form > form { display: grid; }

/* モックだけが出す受信箱 (/dev/mailbox)。本物では Firebase がメールを送る */
.mailbox { margin-top: 12px; }
.mail { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mail-subject { margin: 0; font-size: 18px; }
.mail-body { font-size: 15px; line-height: 1.7; }
.mail-link { font-size: 14px; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  .field input, .btn-primary, .plan-row, .plan-name { transition: none; }
}
