/* forms.css — the real /contact/ and /consultation/ forms (2026-10-24), from the design Keeyo approved
 * (mockups/mockup.css, kept unchanged for reference). Loaded only by those two pages, on top of the theme
 * sheets + contact.css; mobile-first. The mk- class names come from the mockup so both stay comparable.
 * Added for the real build: inline field errors, the form-level alert, sending state, file status. */

.mk-page {
  --mk-ink: #222a42;          /* brand dark (theme text colour) */
  --mk-ink-hover: #313b5c;
  --mk-red: #be1e2d;          /* brand accent, used sparingly */
  --mk-text-2: #4f5468;       /* secondary text, 6.9:1 on the page tint */
  --mk-muted: #5f6475;        /* help text, 5.9:1 on white */
  --mk-bg: #f7f6f3;           /* page tint behind the form card */
  --mk-card: #fff;
  --mk-line: #e6e2da;         /* warm hairline (decorative rules, card edges) */
  --mk-field: #97918a;        /* field / chip edge, >=3:1 on white (WCAG 1.4.11) */
  --mk-tint: #f3f1ec;         /* quiet fills */
  --mk-ring: rgba(34, 42, 66, .16);
  --mk-shadow: 0 1px 2px rgba(34, 42, 66, .04), 0 18px 40px -22px rgba(34, 42, 66, .22);
  --mk-r-field: 6px;
  --mk-r-card: 12px;
}

/* Page frame: a calm tint so the white form card can float on it */
.mk-page .article-container { display: flow-root; background: var(--mk-bg); }
.mk-wrap {
  width: 100%;
  max-width: 672px;
  margin: 44px auto 72px;
  padding: 0 16px;
  color: var(--mk-ink);
  font-size: 15px;
  line-height: 1.8;
}
@media screen and (min-width: 769px) {
  .mk-wrap { margin-top: 72px; margin-bottom: 112px; }
}

/* Title block (theme classes, tuned for the tinted page) */
.mk-wrap .contact-title { margin-top: 30px; letter-spacing: .02em; }
.mk-wrap .mk-title-consult:before { content: "CAREER CONSULTATION"; white-space: nowrap; }
.mk-wrap .contact-subtitle { margin-top: 10px; font-weight: 400; }
.mk-wrap .contact-description {
  max-width: 34em;
  margin-top: 18px;
  opacity: 1;                 /* theme uses opacity .6 (fails AA on the tint) */
  color: var(--mk-text-2);
  font-size: 15px;
  line-height: 1.85;
}
.mk-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 3px 12px 3px 10px;
  border: 1px solid var(--mk-line);
  border-radius: 999px;
  background: var(--mk-card);
  color: var(--mk-text-2);
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: .04em;
}
.mk-time:before {
  content: "";
  width: 13px;
  height: 13px;
  background: no-repeat center / 13px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234f5468' stroke-width='1.3' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6.5'/%3E%3Cpath d='M8 4.6V8l2.3 1.5'/%3E%3C/svg%3E");
}

/* Wrong-door pointer: one quiet line under the time pill, linking to the other form (2026-10-25) */
.mk-door {
  margin-top: 14px;
  color: var(--mk-text-2);
  font-size: 13px;
  line-height: 1.75;
}
.mk-door a { color: var(--mk-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.mk-door a:hover { text-decoration-thickness: 2px; }

/* The form card */
.mk-form {
  margin-top: 32px;
  padding: 32px 20px 28px;
  border: 1px solid var(--mk-line);
  border-radius: var(--mk-r-card);
  background: var(--mk-card);
  box-shadow: var(--mk-shadow);
}
@media screen and (min-width: 640px) {
  .mk-form { padding: 48px 48px 40px; }
}

/* Steps */
.mk-step { margin-top: 52px; }
.mk-form > .mk-step:first-child, .mk-form > section.mk-step:first-of-type { margin-top: 0; }   /* hidden inputs come first in the real forms */
.mk-step[hidden], .mk-field[hidden], .mk-note[hidden], .mk-msg[hidden] { display: none !important; }
.mk-step-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--mk-line);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .04em;
}
.mk-step-no {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--mk-ink);
  border-radius: 50%;
  color: var(--mk-ink);
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: lining-nums;
}

/* Fields */
.mk-field { margin-top: 26px; }
.mk-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .03em;
}
/* 必須 / 任意: understated text badges; 必須 keeps the brand red so it stays obvious */
.mk-req, .mk-opt {
  display: inline-block;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: .12em;
  vertical-align: middle;
}
.mk-req { background: #fbeff0; color: #a51a27; }
.mk-opt { background: var(--mk-tint); color: var(--mk-muted); }
.mk-help {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--mk-muted);
}
.mk-row { display: flex; gap: 12px; }
.mk-row > * { flex: 1 1 0; min-width: 0; }
.mk-input, .mk-select, .mk-textarea {
  display: block;
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--mk-field);
  border-radius: var(--mk-r-field);
  background: #fff;
  color: var(--mk-ink);
  font-size: 16px; /* 16px stops iOS zoom on focus */
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.mk-input:hover, .mk-select:hover, .mk-textarea:hover { border-color: #6f6a63; }
.mk-input:focus, .mk-select:focus, .mk-textarea:focus {
  border-color: var(--mk-ink);
  box-shadow: 0 0 0 3px var(--mk-ring);
  outline: none;
}
.mk-select {
  -webkit-appearance: none !important;
  appearance: none !important;
  padding-right: 42px;
  background: #fff no-repeat right 16px center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23222a42' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
  cursor: pointer;
}
.mk-textarea { height: 148px; padding: 12px 14px; line-height: 1.75; resize: vertical; }
.mk-input::placeholder, .mk-textarea::placeholder { color: #9b968e; }

/* Chips (radio / checkbox styled as pills; the input stays focusable).
 * Selected = brand dark fill + white check. Horizontal padding is rebalanced when the
 * check appears so the chip keeps its width (no reflow of the row). */
.mk-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.mk-chip { position: relative; margin: 0; }
.mk-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.mk-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--mk-field);
  border-radius: 999px;
  background: #fff;
  color: var(--mk-ink);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: .03em;
  cursor: pointer;
  user-select: none;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.mk-chip span:before {
  content: "";
  flex: none;
  width: 0;
  height: 12px;
  background: no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.2 6.3 4.8 8.8 9.8 3.4'/%3E%3C/svg%3E");
}
.mk-chip:hover span { border-color: var(--mk-ink); }
.mk-chip input:checked + span {
  padding-left: 12px;
  padding-right: 10px;
  border-color: var(--mk-ink);
  background: var(--mk-ink);
  color: #fff;
}
.mk-chip input:checked + span:before { width: 12px; margin-right: 6px; }
.mk-chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--mk-ring); border-color: var(--mk-ink); }
.mk-chip-muted span { border-style: dashed; color: var(--mk-muted); }
/* Two-column intent chips (employer step 1): same pill language, centred labels */
.mk-chips-col { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 10px; }
.mk-chips-col .mk-chip { min-width: 0; }
.mk-chips-col .mk-chip span {
  display: flex;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 52px;
  padding: 8px 14px;
  text-align: center;
  line-height: 1.45;
}
.mk-chips-col .mk-chip input:checked + span { padding-left: 8px; padding-right: 8px; }

/* Notes (vendor note, autofill note) */
.mk-note {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--mk-tint);
  color: var(--mk-text-2);
  font-size: 14px;
  line-height: 1.8;
}
.mk-note:before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 4px;
  background: no-repeat center / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234f5468' stroke-width='1.3'%3E%3Ccircle cx='8' cy='8' r='6.5'/%3E%3Cpath d='M8 7.2v4M8 4.8v.1' stroke-linecap='round'/%3E%3C/svg%3E");
}
#mk-autofill-note { margin-top: 20px; background: #fbf6e9; color: #5a4600; }

/* Consent */
.mk-consent { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--mk-line); }
.mk-consent label { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.6; cursor: pointer; }
.mk-consent input[type="checkbox"] {
  -webkit-appearance: checkbox !important;
  appearance: auto !important;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--mk-ink);
}
.mk-consent a { color: var(--mk-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.mk-consent .mk-help { margin-left: 30px; }

/* Primary button */
.mk-submit { margin-top: 28px; text-align: center; }
.mk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 56px;
  border: none;
  border-radius: var(--mk-r-field);
  background: var(--mk-ink);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .16em;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(34, 42, 66, .2);
  transition: background-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.mk-btn:after {
  content: "";
  width: 18px;
  height: 10px;
  background: no-repeat center / 18px 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 10' fill='none' stroke='%23fff' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 5h15.5M12.5 1l4 4-4 4'/%3E%3C/svg%3E");
  transition: transform .15s ease;
}
.mk-btn:hover { background: var(--mk-ink-hover); box-shadow: 0 8px 20px -10px rgba(34, 42, 66, .55); }
.mk-btn:hover:after { transform: translateX(3px); }
.mk-btn:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(34, 42, 66, .2); }
.mk-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--mk-ink); }
@media screen and (min-width: 640px) {
  .mk-btn { width: 360px; }
}
.mk-btn[disabled] { opacity: .65; cursor: progress; }
.mk-btn[disabled]:after { display: none; }

/* Form-level alert under the button (send failed / fix the marked fields). Inputs are never cleared. */
.mk-msg {
  max-width: 100%;
  margin: 16px auto 0;
  padding: 12px 16px;
  border: 1px solid #efc7cb;
  border-radius: 8px;
  background: #fbeff0;
  color: #8f1621;
  font-size: 14px;
  line-height: 1.75;
  text-align: left;
}

/* Inline field errors (linked with aria-describedby) */
.mk-err { margin-top: 8px; color: #a51a27; font-size: 13px; line-height: 1.7; }
.mk-err[hidden] { display: none; }
.mk-input[aria-invalid="true"], .mk-select[aria-invalid="true"], .mk-textarea[aria-invalid="true"] { border-color: #be1e2d; }
.mk-chips[aria-invalid="true"] .mk-chip span { border-color: #be1e2d; }
.mk-consent input[aria-invalid="true"] { outline: 2px solid #be1e2d; outline-offset: 2px; }

/* Honeypot: off-screen, not announced */
.hp-field { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Trust panel beneath the button */
.mk-trust {
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
  padding: 20px;
  border-radius: 10px;
  background: var(--mk-tint);
  color: var(--mk-text-2);
  font-size: 13px;
  line-height: 1.7;
  text-align: left;
}
.mk-trust li { display: flex; align-items: flex-start; gap: 12px; margin: 0; }
.mk-trust svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--mk-ink); }
@media screen and (min-width: 640px) {
  .mk-trust { grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 22px 24px; }
  .mk-trust li { flex-direction: column; align-items: center; gap: 8px; text-align: center; }
}

/* Candidate: start options (two cards) */
.mk-starts { display: grid; gap: 12px; margin-top: 32px; }
@media screen and (min-width: 640px) {
  .mk-starts { grid-template-columns: 1fr 1fr; gap: 16px; }
}
.mk-start {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 14px;
  align-content: start;
  width: 100%;
  padding: 20px 18px;
  border: 1px solid var(--mk-line);
  border-radius: var(--mk-r-card);
  background: var(--mk-card);
  color: var(--mk-ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(34, 42, 66, .04);
  transition: border-color .15s ease, box-shadow .2s ease, transform .2s ease;
}
.mk-start:hover { border-color: #cfc9be; box-shadow: var(--mk-shadow); transform: translateY(-1px); }
.mk-start:focus-within, .mk-start:focus-visible { outline: none; border-color: var(--mk-ink); box-shadow: 0 0 0 3px var(--mk-ring); }
.mk-start-icon {
  grid-row: 1 / span 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--mk-tint);
  color: var(--mk-ink);
}
.mk-start-icon svg { width: 22px; height: 22px; }
.mk-start-primary .mk-start-icon { background: var(--mk-ink); color: #fff; }
.mk-start-title { display: block; font-size: 16px; font-weight: 600; line-height: 1.5; letter-spacing: .03em; }
.mk-start-sub { display: block; margin-top: 4px; font-size: 13px; line-height: 1.7; color: var(--mk-muted); }
.mk-start-meta { display: block; margin-top: 6px; font-size: 12px; line-height: 1.6; color: var(--mk-muted); letter-spacing: .02em; }
.mk-start-status { display: block; margin-top: 8px; font-size: 13px; color: var(--mk-ink); font-weight: 600; }
.mk-start-status:empty { display: none; }
.mk-start-status.is-error { color: #a51a27; }
.mk-start input[type="file"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
@media screen and (min-width: 640px) {
  .mk-start { grid-template-columns: 1fr; padding: 24px 22px 22px; }
  .mk-start-icon { grid-row: auto; margin-bottom: 14px; }
}

/* Autofill highlight */
.mk-filled { background-color: #fffaeb !important; border-color: #c99a00 !important; }
.mk-chip input:checked + span.mk-filled { background-color: var(--mk-ink) !important; box-shadow: 0 0 0 3px #f1d77a; }

/* Disclosure 「さらに詳しく（任意）」 */
.mk-more {
  margin-top: 44px;
  border: 1px solid var(--mk-line);
  border-radius: 10px;
  background: #fcfbf9;
}
.mk-more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  cursor: pointer;
  list-style: none;
}
.mk-more summary::-webkit-details-marker { display: none; }
.mk-more summary:focus-visible { box-shadow: 0 0 0 3px var(--mk-ring); }
.mk-more summary:after {
  content: "";
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--mk-field);
  border-radius: 50%;
  background: no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' stroke='%23222a42' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M6 1.5v9M1.5 6h9'/%3E%3C/svg%3E");
}
.mk-more[open] summary:after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' stroke='%23222a42' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M1.5 6h9'/%3E%3C/svg%3E");
}
.mk-more-body { padding: 4px 18px 24px; }
.mk-more-body > .mk-field:first-child { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .mk-page * { transition: none !important; }
}

/* The fixed mobile CTA bar in the footer competes with the form (08 §rules) — hidden on the form pages */
.mk-page .footer-button { display: none; }
