@charset "UTF-8";

/* =========================================
 * さくさく履歴書  ─  落ち着いた紺×グレー／ヒラギノ
 * 3カラム（左：ブランド/テンプレ/助言・中：フォーム・右：プレビュー）
 * DOM契約・状態クラスは共有エンジン(app.js v30)と同一。配色/レイアウトのみ本ファイルで定義。
 * ========================================= */

:root {
  --navy: #26324f;
  --navy-2: #1b2439;
  --accent: #3a5a8c;
  --accent-soft: #e9eff7;
  --ink: #2b3040;
  --muted: #6f7889;
  --bg: #eef0f3;
  --bg-2: #e7eaef;
  --paper: #ffffff;
  --line: #dde1e8;
  --line-strong: #cbd1dc;
  --danger: #b5544f;
  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
}

body {
  margin: 0; padding: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* =========================================
 * Layout（3カラム）
 * ========================================= */
.layout { display: flex; height: 100vh; overflow: hidden; }

.side { width: 344px; flex-shrink: 0; height: 100vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff; }
.side__inner { padding: 34px 28px 40px; display: flex; flex-direction: column; gap: 26px; }

.center-col { flex: 1; min-width: 0; height: 100vh; overflow-y: auto; background: var(--bg); }
.center-inner { max-width: 740px; margin: 0 auto; padding: 44px 40px 72px; }

.preview-col { width: 412px; flex-shrink: 0; height: 100vh; overflow-y: auto;
  background: var(--bg-2); border-left: 1px solid var(--line); padding: 44px 32px 60px; }

@media (max-width: 1180px) {
  .layout { flex-direction: column; height: auto; overflow: visible; }
  .side, .center-col, .preview-col { width: auto; height: auto; }
  .preview-col { border-left: none; border-top: 1px solid var(--line); }
  .center-inner { padding: 32px 22px 56px; }
}

/* =========================================
 * 左サイドバー
 * ========================================= */
.authbar { display: flex; gap: 14px; align-items: center; justify-content: flex-end; font-size: 12.5px; }
.authbar a { color: rgba(255,255,255,.85); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.35); padding-bottom: 1px; }
.authbar a:hover { color: #fff; border-color: #fff; }
.authbar__btn { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); color: #fff; padding: 7px 16px; border-radius: 7px; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 700; transition: background .15s; }
.authbar__btn:hover { background: rgba(255,255,255,.2); }

.brand { margin-top: 4px; }
.brand__logo { font-size: 34px; font-weight: 800; letter-spacing: .04em; margin: 0 0 14px; line-height: 1.1; }
.brand__logo span { font-weight: 400; color: rgba(255,255,255,.72); }
.brand__logo img { display: block; width: 240px; max-width: 100%; height: auto; }
.brand__copy { font-size: 13.5px; line-height: 1.9; color: rgba(255,255,255,.82); border-left: 3px solid rgba(255,255,255,.3); padding-left: 12px; margin: 0; }

/* 書類切替トグル */
.doctoggle { display: inline-flex; align-items: center; gap: 12px; }
.doctoggle__label { font-size: 13.5px; font-weight: 700; color: rgba(255,255,255,.5); cursor: pointer; white-space: nowrap; transition: color .15s; }
.doctoggle__label.is-active { color: #fff; }
.doctoggle__sw { width: 48px; height: 26px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; position: relative; cursor: pointer; padding: 0; transition: background .15s; }
.doctoggle__knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform .18s; }
[data-doc="career"] .doctoggle__sw { background: var(--accent); border-color: var(--accent); }
[data-doc="career"] .doctoggle__knob { transform: translateX(22px); }

/* サイドブロック（テンプレ・アドバイス） */
.side-block__title { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; color: rgba(255,255,255,.55); margin-bottom: 12px; }

.variant { display: flex; flex-direction: column; gap: 10px; }
.variant__btn { display: flex; flex-direction: column; gap: 3px; text-align: left; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); color: #fff; padding: 13px 15px; border-radius: 10px; cursor: pointer; font-family: inherit; transition: background .15s, border-color .15s; }
.variant__btn:hover { background: rgba(255,255,255,.13); }
.variant__name { font-size: 14.5px; font-weight: 700; }
.variant__desc { font-size: 11.5px; color: rgba(255,255,255,.6); line-height: 1.5; }
.variant__btn.is-active { background: #fff; border-color: #fff; color: var(--navy); box-shadow: 0 6px 16px rgba(0,0,0,.22); }
.variant__btn.is-active .variant__desc { color: var(--muted); }

.advice { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 16px 18px; }
.advice__text { margin: 0; font-size: 13px; line-height: 1.9; color: rgba(255,255,255,.9); }

.side-foot { font-size: 11px; line-height: 1.8; color: rgba(255,255,255,.5); margin: 0; padding-top: 4px; border-top: 1px solid rgba(255,255,255,.12); }

/* =========================================
 * 中央：進捗・フォーム
 * ========================================= */
.progress { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.progress__step { background: #fff; border: 1px solid var(--line); padding: 7px 14px; font-size: 12px; font-weight: 700; color: var(--muted); border-radius: 999px; }
.progress__step.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.progress__step.is-done { background: var(--accent-soft); color: var(--accent); border-color: #cfdcee; }

.form-wrapper { }

.step { display: none; }
.step.is-active { display: block; animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.step__title { font-size: 24px; font-weight: 800; letter-spacing: .01em; margin: 0 0 8px; color: var(--ink); }
.step__lead { font-size: 13px; color: var(--muted); margin: 0 0 28px; line-height: 1.85; }

/* フィールド */
.grid-brutal { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
@media (max-width: 600px) { .grid-brutal { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 18px; }

.field label { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .01em; }
.field input, .field select, .field textarea {
  background: #fff; border: 1px solid var(--line-strong); border-radius: 9px; padding: 12px 14px; font-size: 15px; font-family: inherit; color: var(--ink); outline: none; transition: border-color .12s, box-shadow .12s; width: 100%;
}
.field textarea { line-height: 1.85; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input::placeholder, .field textarea::placeholder { color: #aeb5c2; }

/* 証明写真 */
.photo { display: flex; gap: 18px; align-items: center; }
.photo__thumb { width: 96px; height: 120px; border: 1px solid var(--line-strong); border-radius: 8px; background: #f7f8fa; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.photo__thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo__thumb img:not([src]) { display: none; }
#photoPlaceholder { font-size: 12px; color: #aeb5c2; }
.photo__actions { display: flex; flex-direction: column; gap: 10px; }

/* ボタン */
.btn, .ai-btn, .photo__btn, .addrow, .edu-autocalc-btn, .example-btn {
  background: #fff; border: 1px solid var(--line-strong); color: var(--ink); padding: 11px 20px; font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; border-radius: 9px; transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn:hover, .ai-btn:hover, .photo__btn:hover, .addrow:hover, .edu-autocalc-btn:hover, .example-btn:hover { border-color: var(--accent); }
.ai-btn { background: var(--accent-soft); border-color: #cfdcee; color: var(--accent); margin-top: 12px; }
.ai-btn:hover { background: #dfe9f6; }
.btn--next { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--next:hover { background: #33507d; border-color: #33507d; }
.btn--preview { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn--preview:hover { background: #1f2a44; }

.subhead--toggle { font-weight: 700; font-size: 14px; cursor: pointer; border: 1px solid var(--line-strong); padding: 14px 16px; background: #fff; border-radius: 10px; margin-top: 18px; color: var(--ink); transition: border-color .12s; }
.subhead--toggle:hover { border-color: var(--accent); }
.collapse { display: none; padding-top: 22px; }

/* 動的行 */
.items { display: flex; flex-direction: column; gap: 18px; margin-bottom: 18px; }
.item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; position: relative; box-shadow: 0 2px 10px rgba(30,40,70,.05); }
.item__del { position: absolute; top: 14px; right: 14px; background: transparent; color: var(--danger); border: none; font-weight: 700; font-size: 12.5px; padding: 4px 8px; cursor: pointer; border-radius: 6px; }
.item__del:hover { background: #f7ecec; }
.chip-chk { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink); margin-top: 6px; cursor: pointer; }
.addrow { display: inline-block; }
.edu-autocalc-btn { display: inline-block; margin-bottom: 18px; }
.example-btn { margin-top: 10px; background: var(--accent-soft); border-color: #cfdcee; color: var(--accent); }
.final-edu-note { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }

/* アルバイト様式 */

.days { display: flex; gap: 6px; }
.day { width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; cursor: pointer; background: #fff; color: var(--muted); }
.day.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* 提出日 */
.submitdate { margin-top: 34px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; box-shadow: 0 2px 10px rgba(30,40,70,.05); }
.submitdate__row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.submitdate__row input { width: 88px; }
.submitdate__row input[data-f="date_m"], .submitdate__row input[data-f="date_d"] { width: 72px; }
.submitdate__row .ai-btn { margin-top: 0; }

/* ナビ */
.nav { display: flex; justify-content: space-between; align-items: center; margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); }
.nav__btns { display: flex; gap: 12px; align-items: center; margin-left: auto; }
.btn--prev.is-hidden { display: none; }
.saved { background: var(--accent-soft); color: var(--accent); padding: 6px 12px; font-weight: 700; font-size: 12.5px; border-radius: 999px; display: none; align-items: center; gap: 6px; }
.saved .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }

.legal-wrap { margin-top: 34px; }
.legal-link { font-weight: 700; color: var(--accent); text-decoration: none; font-size: 13.5px; border-bottom: 1px solid var(--accent); padding-bottom: 1px; }
.legal-link:hover { color: #33507d; }

/* =========================================
 * 右：プレビュー
 * ========================================= */
.preview-zone { position: sticky; top: 0; }
.pane__head { font-size: 13px; font-weight: 700; letter-spacing: .1em; color: var(--muted); margin-bottom: 16px; }
.preview { }
.paper { background: #fff; width: 100%; aspect-ratio: 1 / 1.414; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 30px rgba(30,40,70,.12); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #aeb5c2; padding: 30px; text-align: center; }
.paper strong { font-size: 15px; color: #9aa3b2; font-weight: 700; }
.paper__hint { font-size: 12px; line-height: 1.8; color: #b6bdc9; }
#previewSaveNote { font-size: 12.5px; color: var(--accent); margin: 0 0 12px; }
.data-clear__btn { display: block; margin: 18px auto 0; background: none; border: none; font-weight: 700; font-size: 12.5px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.data-clear__btn:hover { color: var(--danger); }

/* =========================================
 * 書き方ガイド（SEO）
 * ========================================= */
.seo-content { margin-top: 48px; padding: 30px 30px 34px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 10px rgba(30,40,70,.05); }
.seo-content h2 { font-size: 19px; font-weight: 800; color: var(--ink); margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.seo-content h3 { font-size: 15px; font-weight: 700; color: var(--accent); margin: 28px 0 10px; padding-left: 12px; border-left: 3px solid var(--accent); }
.seo-content p { font-size: 13.5px; color: var(--ink); line-height: 1.95; margin: 0 0 14px; }
.seo-content dl { margin-top: 24px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 10px; background: #f8f9fb; }
.seo-content dt { font-weight: 700; color: var(--ink); font-size: 14px; margin: 16px 0 6px; }
.seo-content dt:first-child { margin-top: 0; }
.seo-content dd { margin: 0 0 4px; color: var(--muted); font-size: 13px; line-height: 1.9; }

/* 例文データ（#jobSamples）＝モーダルのデータ源。視覚的に非表示（SEOテキストとして残置） */
.seo-samples { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* =========================================
 * モーダル（共通の表示ロジックはエンジン契約どおり）
 * ========================================= */

.authm, .pmodal, .modal, .edu-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.authm__backdrop, .pmodal__backdrop, .modal__backdrop { position: absolute; inset: 0; background: rgba(20,26,40,.55); backdrop-filter: blur(2px); }
.authm__box, .pmodal__box, .modal__box, .edu-modal__box { background: #fff; border-radius: 16px; padding: 34px; width: 90%; max-width: 480px; box-shadow: 0 24px 60px rgba(15,20,35,.35); position: relative; }
.authm__x, .pmodal__x, .modal__close, .edu-modal__x { position: absolute; top: 16px; right: 16px; background: #f1f3f6; color: var(--muted); border: none; width: 34px; height: 34px; border-radius: 50%; font-size: 18px; font-weight: 700; cursor: pointer; line-height: 1; transition: background .12s; }
.authm__x:hover, .pmodal__x:hover, .modal__close:hover, .edu-modal__x:hover { background: #e4e7ec; color: var(--ink); }

/* 認証モーダルのモード出し分け */

.authm__title { font-size: 20px; font-weight: 800; color: var(--ink); text-align: center; margin: 0 0 8px; }
.authm__lead { font-size: 12.5px; color: var(--muted); text-align: center; margin: 0 0 22px; line-height: 1.8; }
.authm__box .field { margin-bottom: 14px; }
.authm__box .field label { font-size: 12.5px; }
.authm__consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.7; color: var(--ink); margin: 8px 0 16px; }

.authm__consent a { color: var(--accent); }
.authm__optin { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); font-weight: 700; margin: 10px 0 4px; cursor: pointer; }
.authm__optin-desc { font-size: 12.5px; color: var(--accent); font-weight: 700; line-height: 1.7; text-align: center; margin: 2px 0 8px; }
.authm__note { font-size: 11px; color: var(--muted); line-height: 1.75; margin: 0 0 16px; }
.authm__forgot { text-align: right; font-size: 12px; margin: -4px 0 14px; }
.authm__forgot a { color: var(--accent); font-weight: 700; text-decoration: none; }
.authm__forgot-lead { font-size: 12px; color: var(--muted); line-height: 1.75; margin: 0 0 16px; }
.authm__switch { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 20px; line-height: 1.9; }
.authm__switch a { color: var(--accent); font-weight: 700; text-decoration: none; }
.authm__msg { color: var(--danger); font-weight: 600; font-size: 13px; margin: 8px 0; text-align: center; }
.authm__msg.is-ok { color: #3a7d55; }
.authm__submit { width: 100%; background: var(--accent); color: #fff; padding: 15px; border: none; border-radius: 10px; font-weight: 700; font-size: 15px; margin-top: 18px; cursor: pointer; font-family: inherit; transition: background .12s; }
.authm__submit:hover { background: #33507d; }
.authm__skip { display: block; width: 100%; margin-top: 12px; background: #fff; border: 1px solid var(--line-strong); color: var(--ink); padding: 14px; font-size: 14px; font-weight: 700; border-radius: 10px; cursor: pointer; font-family: inherit; }
.authm__skip:hover { border-color: var(--accent); }
.legal-links { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.legal-links a { color: var(--accent); font-weight: 700; text-decoration: none; border: 1px solid var(--line-strong); border-radius: 10px; padding: 13px 16px; text-align: center; transition: border-color .12s; }
.legal-links a:hover { border-color: var(--accent); }

/* 規約/プラポリ内の補助リンク（運営会社・お問い合わせ）＝テキストリンク */
.legal-sub { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin: 16px 0 0; font-size: 13px; }
.legal-sub a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; transition: color .12s, border-color .12s; }
.legal-sub a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* AIモーダル */

.modal__head { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 16px; margin-bottom: 16px; }
.modal__head button[data-close] { background: none; border: none; color: var(--muted); font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; padding: 0 4px; }
.modal__body { font-size: 14px; line-height: 1.85; }
.modal__foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.modal__foot button, .pm-btn, #pmCropRetry, #pmCropConfirm, .edu-modal__apply, .edu-modal__cancel, #mpLogout {
  background: #fff; border: 1px solid var(--line-strong); color: var(--ink); padding: 11px 20px; cursor: pointer; font-weight: 700; font-size: 14px; font-family: inherit; border-radius: 9px; transition: border-color .12s, background .12s;
}
.modal__foot button:hover, .pm-btn:hover, #mpLogout:hover { border-color: var(--accent); }
.pm-btn--prim, #pmCropConfirm, #modalAction, .edu-modal__apply, #exBtnApply {
  background: var(--accent); border: 1px solid var(--accent); color: #fff;
}
.pm-btn--prim:hover, #pmCropConfirm:hover, #modalAction:hover, .edu-modal__apply:hover, #exBtnApply:hover { background: #33507d; border-color: #33507d; }

/* 学歴自動計算モーダル */
.edu-modal__box { max-width: 420px; }
.edu-modal__box h3 { font-size: 18px; font-weight: 800; margin: 0 0 18px; }
.edu-modal__box > label { display: block; margin-bottom: 12px; font-size: 13.5px; font-weight: 600; color: var(--ink); }

.edu-modal__box select, .edu-modal__box input[type="number"] {
  background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; padding: 11px 13px; font-size: 14px; font-family: inherit; color: var(--ink);
}

.edu-modal__box select:focus, .edu-modal__box input[type="number"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.edu-sub-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; color: var(--ink); }

.edu-sub-row input[type="number"] { width: 84px; }
.edu-sub-hint { color: var(--muted); font-size: 12px; }

/* 写真モーダル */
.pm-sec { text-align: center; }
.pm-sec h3 { font-size: 16px; font-weight: 800; margin: 0 0 16px; }
.pm-btn { margin: 6px; }
#pmCanvas { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; }
/* サイズは下の「証明写真モーダル（レイアウト）」側で決める（ID指定だと勝ってしまい 3:4 が崩れる） */
#pmPreviewImg, #pmAiOrig, #pmAiResult { border-radius: 8px; border: 1px solid var(--line); }
.pm-pick { background: none; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px; margin: 6px; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; font-family: inherit; font-weight: 700; font-size: 12.5px; color: var(--ink); }
.pm-pick:hover { border-color: var(--accent); }

/* 破壊的アクション */
#mpDelete { background: none; border: none; color: var(--muted); font-size: 12px; cursor: pointer; font-family: inherit; text-decoration: underline; padding: 0; }
#mpDelete:hover { color: var(--danger); }
#mpDelete:disabled { opacity: .6; cursor: default; }

/* 例文モーダル */
.modal--ex { display: none; }
.modal--ex.is-open { display: flex !important; }
.modal--ex .modal__box { max-width: 600px; }
.modal--ex .modal__head { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.exsel { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-bottom: 14px; }
@media (max-width: 520px) { .exsel { grid-template-columns: 1fr; } }
.excard { display: grid; grid-template-columns: auto minmax(0,1fr) auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; row-gap: 10px; }
.excard__arrow { grid-row: 1; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); width: 38px; height: 76px; border-radius: 8px; font-size: 14px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color .12s, background .12s; }
.excard__arrow:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.excard__arrow:disabled { opacity: .3; cursor: default; }
.excard__main { grid-column: 2; grid-row: 1; min-width: 0; }
.excard__label { font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 6px; min-height: 15px; }
.excard__text { background: #f8f9fb; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; font-size: 13px; line-height: 1.9; color: var(--ink); white-space: pre-wrap; word-break: break-word; height: 300px; overflow-y: auto; }
.excard__count { grid-column: 1 / -1; grid-row: 2; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.excard__empty { display: block; color: var(--muted); font-size: 13px; text-align: center; padding: 52px 12px; }
.exconfirm { font-size: 12.5px; font-weight: 700; color: var(--danger); margin-right: auto; align-self: center; line-height: 1.5; }
.modal--ex .modal__foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
#exBtnOverwrite { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
#exBtnOverwrite:hover { background: var(--accent-soft); }

/* マイページ */

.mpm__logout { border: none !important; background: none !important; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 13px; font-family: inherit; padding: 0; }
.mpm__email { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mpm__item { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

.mpm__type { display: inline-block; font-weight: 700; font-size: 11.5px; color: var(--accent); border: 1px solid #cfdcee; border-radius: 999px; padding: 1px 9px; margin-bottom: 4px; }
.mpm__fmt { font-weight: 700; color: var(--ink); font-size: 13.5px; }
.mpm__date { font-size: 12px; color: var(--muted); margin-top: 2px; }
.mpm__btn { display: inline-block; padding: 8px 14px; border-radius: 9px; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; font-family: inherit; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); transition: border-color .12s; }
.mpm__btn:hover { border-color: var(--accent); }
.mpm__btn--dl, .mpm__btn--edit { background: var(--accent); color: #fff; border-color: var(--accent); }
.mpm__empty { font-size: 13.5px; color: var(--muted); line-height: 1.8; }
.mpm__empty a { color: var(--accent); font-weight: 700; }

.mpm__new { display: inline-block; font-size: 13px; color: var(--accent); font-weight: 700; text-decoration: none; }

.mpm__foot { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); text-align: right; }

/* =========================================
 * 書類切替（data-doc × data-only）
 * ========================================= */
[data-doc="resume"] [data-only="career"] { display: none !important; }
[data-doc="career"] [data-only="resume"] { display: none !important; }

/* =========================================
 * 証明写真モーダル（レイアウト）
 * 本体 rirekisy.jp と同一のクラス契約。囲み（.pm-choose/.pm-canvas-wrap/
 * .pm-actions/.pm-preview/.pm-compare）ごとに並びを決める。これが無いと
 * canvas と同じ行にボタンが流れ込み、「選び直す」が写真の右へ回り込む。
 * ========================================= */
.pm-sec[hidden] { display: none; }
.pmodal__box { max-height: calc(100vh - 36px); overflow-y: auto; }
.pmodal__title { font-size: 17px; font-weight: 800; color: var(--ink); text-align: center; margin: 0 0 4px; }
.pmodal__lead { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.7; margin: 0 0 16px; }

.pm-choose { display: flex; flex-direction: column; gap: 10px; }

.pm-canvas-wrap { display: flex; justify-content: center; margin: 4px 0 14px; }
#pmCanvas { width: 270px; height: 360px; max-width: 100%; touch-action: none; cursor: grab; }

.pm-actions { display: flex; gap: 10px; margin-top: 4px; }
.pm-actions .pm-btn { flex: 1; width: auto; }
.pm-actions--col { flex-direction: column; }
.pm-actions--col .pm-btn { width: 100%; }

.pm-preview { display: flex; justify-content: center; margin-bottom: 14px; }
.pm-preview img { width: 180px; height: 240px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

.pm-gender { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 14px; font-size: 13px; color: var(--ink); }
.pm-gender__label { font-weight: 700; font-size: 12px; color: var(--muted); }
.pm-gender label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }

.pm-note { font-size: 11px; color: var(--muted); line-height: 1.7; margin: 12px 0 0; text-align: left; }

.pm-loading { text-align: center; padding: 30px 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.pm-spinner { width: 40px; height: 40px; border: 4px solid var(--line); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 16px; animation: pmspin .9s linear infinite; }
@keyframes pmspin { to { transform: rotate(360deg); } }

.pm-compare { display: flex; gap: 12px; margin-bottom: 16px; }
.pm-compare .pm-pick { flex: 1; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; background: var(--paper); border: 2px solid var(--line); border-radius: 10px; cursor: pointer; font-family: inherit; }
.pm-compare .pm-pick img { width: 100%; max-width: none; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px; display: block; }
.pm-compare .pm-pick span { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.pm-compare .pm-pick.is-active { border-color: var(--accent); }

.pm-btn--ai { background:var(--accent);color:#fff;border-color:var(--accent); }
.pm-btn--ghost { background: none; border: none; color: var(--muted); text-decoration: underline; font-size: 12.5px; padding: 6px; box-shadow: none; }

/* 狭い画面でも canvas(270x360) を縮めない。photo.js はドラッグ量を canvas の
 * 実ピクセルとして扱うため、CSSで縮小すると操作量と表示がずれ、3:4も崩れる。
 * そこでキャンバスではなくモーダル側の幅・余白で270pxを確保する。 */
@media (max-width: 460px) {
  .pmodal__box { width: calc(100% - 16px); padding-left: 14px; padding-right: 14px; }
}
