/* DeliciousWorker 求職者会員 共通スタイル
 * SSR側(dw_ssr.js BASE_CSS)とトーン統一: 白ベース + アクセント #E8552D
 * なぜ変数化するか: 3年後/後任が色を1箇所で追えるように。上積み改修前提。
 * ES5対応の素CSS。スマホファースト。 */

:root {
  --accent: #E8552D;
  --accent-dark: #C23E1B;
  --accent-tint: #fff7f2;
  --accent-line: #f2c9b8;
  --ink: #1a1a1a;
  --muted: #666;
  --muted-2: #8a8a8a;
  --line: #e3e3e3;
  --line-soft: #eef0f2;
  --chip: #eef3f5;
  --chip-ink: #1a6b8a;
  --ok: #2e7d54;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 6px 20px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.7; color: var(--ink); background: #f6f7f8;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--chip-ink); text-decoration: none; }
a:hover { color: #0f4a61; }
img { max-width: 100%; }

/* ---- ヘッダー共通 ---- */
header.site {
  position: sticky; top: 0; z-index: 30;
  background: #fff; border-bottom: 2px solid var(--accent);
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
header.site .b { font-weight: 800; font-size: 1.12rem; color: var(--ink); }
header.site .b span { color: var(--accent); }
header.site nav { display: flex; align-items: center; gap: 14px; font-size: .9rem; }
header.site nav a { color: #444; font-weight: 700; }
header.site nav a:hover { color: var(--accent); }
.hdr-user { display: flex; align-items: center; gap: 7px; font-size: .84rem; color: var(--muted); }
.hdr-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-size: .82rem;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }

h1 { font-size: 1.3rem; margin: 6px 0 4px; }
h2 { font-size: 1.05rem; margin: 4px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.tiny { font-size: .74rem; }
.center { text-align: center; }

/* ---- タブ ---- */
.tabs {
  display: flex; gap: 4px; background: #fff; border-radius: var(--radius);
  padding: 5px; box-shadow: var(--shadow); position: sticky; top: 54px; z-index: 20;
  margin-bottom: 14px;
}
.tab {
  flex: 1; text-align: center; padding: 10px 6px; border-radius: 9px;
  font-weight: 700; font-size: .92rem; color: var(--muted); cursor: pointer;
  border: none; background: none; position: relative; transition: color .15s, background .15s;
}
.tab:hover { color: var(--ink); }
.tab.on { color: #fff; background: var(--accent); }
.tab .badge {
  position: absolute; top: 3px; right: 8px; min-width: 17px; height: 17px;
  border-radius: 999px; background: #d33; color: #fff; font-size: .68rem;
  line-height: 17px; padding: 0 4px; font-weight: 800;
}
.tab.on .badge { background: #fff; color: var(--accent); }

/* ---- カード汎用 ---- */
.card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin: 0 0 14px;
}
.card > h2:first-child { margin-top: 0; }
.card-h {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 1.02rem; margin-bottom: 10px;
}
.card-h .ico { color: var(--accent); }

/* ---- 性格・特性カード(目玉) ---- */
.karte {
  border-radius: 16px; overflow: hidden; margin-bottom: 16px;
  box-shadow: 0 4px 22px rgba(0,0,0,.08); background: #fff;
  opacity: 0; transform: translateY(8px);
  animation: karteIn .5s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes karteIn { to { opacity: 1; transform: none; } }
.karte-band {
  padding: 20px 18px 18px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}
.karte-band.g-EARTH { background: linear-gradient(135deg, #3f9d6d, #216b48); }
.karte-band.g-MOON  { background: linear-gradient(135deg, #4a86c5, #2b5c93); }
.karte-band.g-SUN   { background: linear-gradient(135deg, #f0973a, #d8641f); }
.karte-band::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,.10);
}
.karte-grp {
  display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .1em;
  background: rgba(255,255,255,.22); padding: 3px 10px; border-radius: 999px;
}
.karte-name { font-size: 1.7rem; font-weight: 900; margin: 8px 0 2px; line-height: 1.2; }
.karte-catch { font-size: .96rem; opacity: .95; position: relative; z-index: 1; }
.karte-body { padding: 16px 18px 12px; }
.karte-sec { margin-bottom: 14px; }
.karte-sec > .lbl {
  font-size: .8rem; font-weight: 800; color: var(--muted); margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.karte-sec > .lbl .ico { color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block; background: var(--chip); color: var(--chip-ink);
  border-radius: 999px; padding: 4px 12px; font-size: .82rem; font-weight: 600;
}
.strength-list { list-style: none; margin: 0; padding: 0; }
.strength-list li {
  position: relative; padding: 4px 0 4px 24px; font-size: .92rem;
}
.strength-list li::before {
  content: "✓"; position: absolute; left: 2px; top: 4px;
  color: var(--ok); font-weight: 900;
}
.karte-advice {
  background: var(--accent-tint); border: 1px solid var(--accent-line);
  border-radius: 10px; padding: 10px 12px; font-size: .88rem; color: #7a3a12;
}
/* お客様との相性 top3 */
.compat-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.compat-rank {
  width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800; font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
}
.compat-main { flex: 1; min-width: 0; }
.compat-name { font-weight: 700; font-size: .9rem; }
.compat-note { font-size: .78rem; color: var(--muted); }
.compat-bar { height: 6px; border-radius: 999px; background: var(--line-soft); margin-top: 4px; overflow: hidden; }
.compat-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; width: 0; transition: width .8s ease .2s; }
.karte-disc {
  font-size: .72rem; color: var(--muted-2); line-height: 1.6;
  border-top: 1px solid var(--line-soft); margin-top: 4px; padding: 10px 18px 14px;
}

/* 性格カード未登録の誘導 */
.karte-empty {
  border-radius: 16px; overflow: hidden; margin-bottom: 16px;
  background: linear-gradient(135deg, #fff2ea, #ffe6d7);
  border: 1px solid var(--accent-line); padding: 22px 18px; text-align: center;
  box-shadow: var(--shadow);
}
.karte-empty .ke-emoji { font-size: 2rem; }
.karte-empty h3 { margin: 8px 0 4px; font-size: 1.12rem; color: var(--accent-dark); }
.karte-empty p { margin: 0 0 14px; font-size: .9rem; color: #8a4a2a; }
.ke-form { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ke-form input[type="date"] {
  font-size: 1rem; padding: 10px 12px; border: 1px solid var(--accent-line);
  border-radius: 10px; background: #fff;
}

/* ---- 完成度バー ---- */
.score-wrap { margin: 4px 0 12px; }
.score-top { display: flex; align-items: baseline; justify-content: space-between; }
.score-num { font-weight: 900; font-size: 1.5rem; color: var(--accent); }
.score-num small { font-size: .9rem; font-weight: 700; }
.score-bar { height: 12px; border-radius: 999px; background: var(--line-soft); overflow: hidden; margin: 6px 0; }
.score-bar > i {
  display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, #f0973a, var(--accent));
  transition: width 1s cubic-bezier(.2,.7,.3,1);
}
.score-hint { font-size: .82rem; color: var(--muted); }
.score-hint b { color: var(--accent-dark); }

/* ---- アコーディオン ---- */
.acc { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; overflow: hidden; background: #fff; }
.acc-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 13px 14px; cursor: pointer; font-weight: 700; font-size: .95rem;
  background: #fff; border: none; width: 100%; text-align: left; color: var(--ink);
}
.acc-head:hover { background: #fafbfc; }
.acc-head .st { font-size: .74rem; font-weight: 700; color: var(--muted-2); }
.acc-head .st.done { color: var(--ok); }
.acc-head .chev { transition: transform .2s; color: var(--muted-2); }
.acc.open .acc-head .chev { transform: rotate(90deg); }
.acc-body { display: none; padding: 4px 14px 16px; }
.acc.open .acc-body { display: block; }

/* ---- フォーム ---- */
label.field { display: block; font-weight: 700; font-size: .84rem; margin: 12px 0 4px; }
label.field .opt { color: var(--muted-2); font-weight: 600; font-size: .76rem; }
input.inp, select.inp, textarea.inp {
  width: 100%; font-size: 1rem; padding: 10px 12px;
  border: 1px solid #ccc; border-radius: 10px; background: #fff; color: var(--ink);
  font-family: inherit;
}
input.inp:focus, select.inp:focus, textarea.inp:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,85,45,.14);
}
textarea.inp { min-height: 84px; resize: vertical; }
.row2 { display: flex; gap: 10px; flex-wrap: wrap; }
.row2 > * { flex: 1; min-width: 130px; }

/* ---- ボタン ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; border: none; font-weight: 700;
  cursor: pointer; padding: 11px 18px; border-radius: 10px; font-size: 1rem;
  font-family: inherit; transition: background .15s, transform .05s;
}
.btn:hover:not(:disabled) { background: var(--accent-dark); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.ghost { background: #fff; color: var(--accent); border: 2px solid var(--accent); }
.btn.ghost:hover:not(:disabled) { background: var(--accent-tint); }
.btn.sm { padding: 7px 13px; font-size: .86rem; border-radius: 9px; }
.btn.block { width: 100%; }

/* ---- トグルスイッチ ---- */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.toggle-row:last-child { border-bottom: none; }
.toggle-row .tl { font-size: .92rem; font-weight: 700; }
.toggle-row .td { font-size: .78rem; color: var(--muted); }
.switch { position: relative; width: 48px; height: 28px; flex: 0 0 48px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .sl {
  position: absolute; inset: 0; background: #cfd4d8; border-radius: 999px;
  transition: background .2s; cursor: pointer;
}
.switch .sl::before {
  content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.switch input:checked + .sl { background: var(--accent); }
.switch input:checked + .sl::before { transform: translateX(20px); }

/* ---- 求人カード ---- */
.job {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px; margin: 0 0 10px; position: relative; transition: box-shadow .15s, border-color .15s;
}
.job:hover { box-shadow: var(--shadow); border-color: #d7dade; }
.job .jt { font-weight: 700; font-size: 1rem; color: var(--ink); padding-right: 40px; }
.job .js { font-size: .84rem; color: var(--muted); margin-top: 1px; }
.job .jw { font-weight: 800; color: var(--accent); font-size: .98rem; margin-top: 5px; }
.job .jtags { margin-top: 6px; }
.job .jtags span {
  display: inline-block; background: var(--chip); color: var(--chip-ink);
  border-radius: 999px; padding: 2px 10px; font-size: .76rem; margin: 3px 4px 0 0;
}
/* お気に入り♡ */
.fav {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px;
  border-radius: 50%; border: none; background: #f4f5f6; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
  color: #bcbcbc; transition: transform .12s, background .15s, color .15s;
}
.fav:hover { background: #ffe9e0; color: var(--accent); }
.fav.on { color: var(--accent); background: #ffe4d9; }
.fav.pop { animation: favPop .3s ease; }
@keyframes favPop { 0%{transform:scale(1)} 40%{transform:scale(1.35)} 100%{transform:scale(1)} }

/* ---- 検索フォーム ---- */
.search-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 14px; }
.search-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.search-grid > * { flex: 1 1 140px; }
.search-grid .full { flex: 1 1 100%; }

/* ---- 空状態・状態表示 ---- */
.empty { text-align: center; color: var(--muted); padding: 30px 16px; }
.empty .em-emoji { font-size: 1.8rem; }
.empty p { margin: 8px 0; font-size: .92rem; }
.state { text-align: center; color: var(--muted); padding: 22px; font-size: .9rem; }
.state.err { color: #a33; }

/* 未ログイン導入画面 */
.login-hero {
  max-width: 380px; margin: 40px auto; background: #fff; border-radius: 16px;
  box-shadow: var(--shadow); padding: 30px 24px; text-align: center;
}
.login-hero .lh-emoji { font-size: 2.4rem; }
.login-hero h1 { font-size: 1.32rem; margin: 10px 0 6px; }
.login-hero p { color: var(--muted); font-size: .92rem; margin: 0 0 20px; }
.sso-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; min-height: 52px; padding: 0 16px;
  border-radius: 12px; border: 2px solid var(--line);
  background: #fff; color: var(--ink); font-size: 1.02rem; font-weight: 700; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.sso-btn:hover:not(:disabled) { border-color: var(--accent); background: #f9fafb; }
.sso-btn:disabled { opacity: .6; cursor: progress; }
.sso-btn svg { width: 22px; height: 22px; flex: 0 0 22px; }
.login-note { margin-top: 16px; font-size: .8rem; color: var(--muted); line-height: 1.7; }

/* スピナー */
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
.spin.big { width: 28px; height: 28px; border-width: 3px; color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

/* トースト */
#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: #23272b; color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: .88rem; font-weight: 600; box-shadow: 0 6px 24px rgba(0,0,0,.25);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 60; max-width: 90vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* メッセージスレッド */
.thread-list .thr {
  display: flex; align-items: center; gap: 10px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px;
  cursor: pointer; width: 100%; text-align: left; transition: border-color .15s;
}
.thread-list .thr:hover { border-color: #d7dade; }
.thr .thr-av { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; background: var(--chip); color: var(--chip-ink); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.thr .thr-main { flex: 1; min-width: 0; }
.thr .thr-name { font-weight: 700; font-size: .92rem; }
.thr .thr-last { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thr .thr-meta { text-align: right; }
.thr .thr-at { font-size: .72rem; color: var(--muted-2); }
.thr .thr-un { display: inline-block; min-width: 18px; height: 18px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .7rem; line-height: 18px; padding: 0 5px; font-weight: 800; margin-top: 3px; }

.msg-view { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.msg-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.msg-head .back { background: none; border: none; color: var(--accent); font-weight: 700; cursor: pointer; padding: 4px 6px; font-size: .9rem; }
.msg-scroll { padding: 14px; max-height: 52vh; overflow-y: auto; background: #fafbfc; }
.bubble { max-width: 78%; padding: 9px 13px; border-radius: 14px; margin: 6px 0; font-size: .9rem; word-break: break-word; }
.bubble.them { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.me { background: var(--accent); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.bubble .bt { font-size: .7rem; opacity: .7; margin-top: 3px; text-align: right; }
.msg-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line-soft); }
.msg-input textarea { flex: 1; min-height: 42px; max-height: 120px; }

footer.site { text-align: center; color: var(--muted-2); font-size: .78rem; padding: 24px 16px 40px; }

/* PC幅では少し広げる（求人サイトらしい2カラム感は将来上積み） */
@media (min-width: 760px) {
  .wrap { max-width: 760px; }
}

.btn-ghost{background:#fff;color:#E8552D;border:2px solid #E8552D;border-radius:8px;padding:6px 12px;font-weight:700;cursor:pointer}
.btn-ghost:hover{background:#fff4ef}
