/* Vanmates Relocation: client portal + staff workspace. Same palette as the partner portal. */
:root {
  --cream: #faf5ed; --card: #fffdf8; --cream-deep: #efe7d4; --red: #b94a3f; --red-hover: #a13a30; --red-soft: #f7e3df;
  --ink: #2b211a; --ink-2: #54463b; --muted: #7a6b5c; --line: #e4dbc9; --ok: #2e6b34; --ok-soft: #e3f1e2;
  --warn: #8a5a00; --warn-soft: #fbf0d9; --info: #2f5d8a; --info-soft: #e2ecf6; --focus: #2f5d8a;
  --shadow: 0 2px 8px rgba(43, 33, 26, .05); --radius: 10px; --gutter: 16px;
  --font: "Plus Jakarta Sans", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Playfair Display", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", Georgia, serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.55 var(--font); overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
:lang(ja) body, body:lang(ja) { line-break: strict; word-break: normal; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.08rem; font-family: var(--font); font-weight: 700; }
a { color: var(--red); }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 680px; }

/* header */
.top { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand img { height: 26px; }
.brand span { font-family: var(--font-display); font-size: 1.05rem; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button { border: 0; background: transparent; padding: 6px 10px; font: inherit; font-size: .85rem; cursor: pointer; color: var(--ink-2); }
.lang button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* cards + layout */
main { padding: 24px 0 64px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.hero { padding: 8px 0 18px; }
.hero p { color: var(--ink-2); max-width: 60ch; }

/* forms */
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=datetime-local], input[type=url], select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); min-height: 44px;
}
textarea { min-height: 88px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.invalid { border-color: var(--red) !important; background: var(--red-soft) !important; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; border-radius: 8px; padding: 10px 16px; min-height: 44px;
  border: 1px solid var(--red); background: var(--red); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--red-hover); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--cream-deep); }
.btn.small { min-height: 34px; padding: 6px 10px; font-size: .88rem; }
.btn.ok { background: var(--ok); border-color: var(--ok); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.steps { display: flex; gap: 6px; margin-bottom: 14px; }
.steps i { flex: 1; height: 4px; background: var(--line); border-radius: 4px; }
.steps i.on { background: var(--red); }

/* notices */
.note { border-radius: 8px; padding: 10px 12px; margin: 10px 0; font-size: .93rem; }
.note.err { background: var(--red-soft); color: #7a2a22; }
.note.ok { background: var(--ok-soft); color: var(--ok); }
.note.info { background: var(--info-soft); color: var(--info); }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.pill { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--cream-deep); color: var(--ink-2); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.red { background: var(--red-soft); color: #7a2a22; }
.pill.info { background: var(--info-soft); color: var(--info); }

/* quote */
table.kv { width: 100%; border-collapse: collapse; }
table.kv td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.kv td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
table.kv tr.total td { font-weight: 700; font-size: 1.05rem; }

/* tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 16px; scrollbar-width: none; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--ink); border-color: var(--red); }
.tabs .count { margin-left: 4px; }

/* property cards */
.props { display: grid; gap: 16px; }
@media (min-width: 760px) { .props { grid-template-columns: 1fr 1fr; } }
.prop { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.prop .photo { aspect-ratio: 16 / 9; background: var(--cream-deep); display: block; width: 100%; object-fit: cover; }
.prop .body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.prop .price { font-size: 1.25rem; font-weight: 700; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: .9rem; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; }
.reasons { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.reasons li { font-size: .8rem; background: var(--info-soft); color: var(--info); border-radius: 999px; padding: 2px 8px; }
.reasons li.neg { background: var(--warn-soft); color: var(--warn); }
.prop .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }

/* timeline + messages */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--line); position: relative; font-size: .92rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.timeline time { display: block; color: var(--muted); font-size: .8rem; }
.msgs { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 85%; padding: 10px 12px; border-radius: 12px; background: var(--cream-deep); white-space: pre-wrap; }
.msg.mine { align-self: flex-end; background: var(--info-soft); }
.msg small { display: block; color: var(--muted); font-size: .75rem; margin-top: 4px; }

/* dialogs */
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(43, 33, 26, .45); }
dialog .dlg { padding: 20px; overflow: auto; }

/* staff workspace */
.staff main { padding-top: 16px; }
.staff .wrap { max-width: 1320px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--card); }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: normal; word-break: normal; }
.tbl th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--cream); position: sticky; top: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--cream); }
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.split { display: grid; gap: 16px; }
@media (min-width: 1000px) { .split { grid-template-columns: 340px 1fr; } }
.kv2 { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: .9rem; margin: 0; }
.kv2 dt { color: var(--muted); }
.kv2 dd { margin: 0; }
.cand { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; background: var(--card); margin-bottom: 10px; }
.cand.published { border-color: var(--ok); }
.cand.rejected, .cand.withdrawn { opacity: .6; }
.audit { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; max-height: 340px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.audit div { padding: 2px 0; border-bottom: 1px dashed var(--line); }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 50; max-width: calc(100vw - 32px); }
.foot { color: var(--muted); font-size: .82rem; padding: 24px 0; border-top: 1px solid var(--line); }

/* journey v2 */
.hint { font-size: .84rem; color: var(--muted); margin-top: 4px; }
.ferr { font-size: .84rem; color: #9b2c22; font-weight: 600; margin-top: 4px; min-height: 0; }
.ferr:empty { display: none; }
.price-line { font-weight: 600; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: inline-block; }
.btn.big { min-height: 52px; font-size: 1.05rem; padding: 12px 22px; }
.btn.block { width: 100%; }
.form-title { font-size: 1.5rem; }
.steps-list { padding-left: 1.3em; margin: 0; }
.steps-list li { margin: 0 0 8px; padding-left: 4px; }
.ticks { list-style: none; padding: 0; margin: 0 0 12px; }
.ticks li { padding: 4px 0 4px 26px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 4px; color: var(--ok); font-weight: 700; }
details.faq { border-top: 1px solid var(--line); padding: 10px 0; }
details.faq summary { cursor: pointer; font-weight: 600; }
details.faq p { margin: 8px 0 0; color: var(--ink-2); }
.choice { display: grid; gap: 8px; }
.choice-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; cursor: pointer; font-weight: 500; }
.choice-card:has(input:checked) { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.choice-card input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.choice-card > span { display: flex; flex-direction: column; gap: 2px; }
/* progress tracker */
.track { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; list-style: none; padding: 0; margin: 8px 0 4px; }
.track li { font-size: .7rem; text-align: center; color: var(--muted); }
.track li::before { content: ""; display: block; height: 6px; border-radius: 6px; background: var(--line); margin-bottom: 4px; }
.track li.done::before { background: var(--ok); }
.track li.now { color: var(--ink); font-weight: 700; }
.track li.now::before { background: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-weight: 500; font-size: .9rem; background: #fff; margin: 0; }
.chips label:has(input:checked) { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slot { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 10px; background: #fff; }
.terms h2 { margin-top: 1.4em; font-size: 1.15rem; }
.terms li { margin-bottom: 6px; }
@media (max-width: 600px) {
  .top .wrap { gap: 8px; min-height: 52px; padding-top: 6px; padding-bottom: 6px; }
  .brand span { font-size: .95rem; }
  .brand img { height: 22px; }
  .lang button { padding: 5px 8px; }
  .tabs { flex-wrap: wrap; overflow: visible; border-bottom: 0; gap: 6px; }
  .tabs a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .9rem; }
  .tabs a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
}
.actions-bar { align-items: center; padding: 12px 16px; }
.warn-text { color: var(--warn); font-weight: 600; }
input.pick { width: 18px; height: 18px; }

.track li { overflow-wrap: normal; word-break: keep-all; }
.track-now { font-weight: 700; margin: 4px 0 0; }
@media (max-width: 600px) { .track li { font-size: 0; } .track li::before { margin-bottom: 0; } }
.checklist li.todo { color: var(--muted); }
.checklist li.todo::before { content: "○"; color: var(--muted); }
.ok-text { color: var(--ok); font-weight: 600; }
.linkish { background: none; border: 0; color: var(--red); text-decoration: underline; cursor: pointer; font: inherit; font-size: .85rem; padding: 0; }
.kpi { font-size: 1.5rem; font-weight: 700; font-family: var(--font-display); }
