/* 介護ジョブス UI v2 — AI-first.
   Scoped to html[data-ui="2"]; the original design (v1) is untouched.
   Roll back instantly with ?ui=1, or by checking out the git tag `kaigo-ui-v1`. */
.ai-card { display: none; } /* shown only in v2 */

html[data-ui="2"] {
  --v2-ink: #10202b;
  --v2-muted: #56656f;
  --v2-line: #e3e9ee;
  --v2-mint: #dff5ec;
  --v2-sky: #dceffa;
  --v2-lav: #e9e5fb;
  --v2-ai-grad: linear-gradient(135deg, #58c9a6 0%, #5aa9e6 52%, #8b7cf0 100%);
  --v2-shadow: 0 1px 2px rgb(16 32 43 / 5%), 0 12px 32px rgb(16 32 43 / 8%);
  --canvas: #f7fafb;
  --ink: #10202b;
  --accent: #12303f;
  --accent-dark: #0a202b;
}
html[data-ui="2"] body { -webkit-font-smoothing: antialiased; }
html[data-ui="2"] h1, html[data-ui="2"] h2, html[data-ui="2"] h3 { letter-spacing: -0.02em; }

/* header */
html[data-ui="2"] .site-header { background: rgb(255 255 255 / 78%); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom-color: rgb(16 32 43 / 6%); }
html[data-ui="2"] .header-inner { min-height: 68px; }
html[data-ui="2"] .brand b { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 7px; border-radius: 9px; background: var(--v2-ai-grad); color: #fff; font-size: 0.85rem; }
html[data-ui="2"] .primary-nav a { padding: 8px 14px; border-radius: 999px; }
html[data-ui="2"] .primary-nav a:hover { background: var(--v2-sky); color: var(--v2-ink); }
html[data-ui="2"] .primary-nav [aria-current="page"] { background: var(--v2-mint); color: var(--v2-ink); }
html[data-ui="2"] .header-cta, html[data-ui="2"] .button { border-radius: 999px; }
html[data-ui="2"] .header-cta { background: var(--v2-ai-grad); box-shadow: 0 8px 20px rgb(90 169 230 / 30%); }
html[data-ui="2"] .header-cta:hover { background: var(--v2-ai-grad); filter: brightness(0.96); }
html[data-ui="2"] .button-primary { background: #12303f; box-shadow: 0 8px 20px rgb(18 48 63 / 22%); }
html[data-ui="2"] .button-primary:hover { background: #0a202b; }
html[data-ui="2"] .button-secondary { border-color: #cfe0e8; }
html[data-ui="2"] .button-secondary:hover { background: var(--v2-sky); border-color: #5aa9e6; }

/* hero: text + AI card (photo becomes a soft backdrop tile below on wide screens) */
html[data-ui="2"] .hero { position: relative; isolation: isolate; min-height: 0; margin-top: 8px; padding-block: 56px; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; border-radius: 32px; background: radial-gradient(520px 320px at 10% 0%, var(--v2-mint), transparent 70%), radial-gradient(520px 340px at 92% 0%, var(--v2-lav), transparent 70%), radial-gradient(480px 300px at 60% 100%, var(--v2-sky), transparent 70%); }
html[data-ui="2"] .hero h1 { font-size: clamp(2.1rem, 3.6vw, 3.3rem); letter-spacing: -0.04em; }
html[data-ui="2"] .hero-lead { color: var(--v2-muted); }
html[data-ui="2"] .hero-image { display: none; }
html[data-ui="2"] .ai-card { display: block; position: relative; padding: 26px; border-radius: 28px; background: #fff; border: 1px solid rgb(16 32 43 / 6%); box-shadow: var(--v2-shadow); z-index: 1; }
html[data-ui="2"] .ai-card::before { content: ""; position: absolute; z-index: -1; inset: -2px; border-radius: 30px; background: var(--v2-ai-grad); opacity: 0.55; }
html[data-ui="2"] .ai-card::after { content: ""; position: absolute; z-index: -1; inset: 1px; border-radius: 27px; background: #fff; }
html[data-ui="2"] .ai-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
html[data-ui="2"] .ai-card-head strong { display: block; }
html[data-ui="2"] .ai-card-head small { color: var(--v2-muted); font-size: 0.82rem; }
html[data-ui="2"] .ai-avatar { display: inline-grid; flex: 0 0 auto; width: 40px; height: 40px; place-items: center; border-radius: 14px; background: var(--v2-ai-grad); color: #fff; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.04em; }
html[data-ui="2"] .bubble { display: inline-block; max-width: 92%; margin: 0 0 18px; padding: 14px 18px; border-radius: 6px 20px 20px 20px; background: #eef5f8; font-weight: 600; }
html[data-ui="2"] .chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
html[data-ui="2"] .ai-chip { display: inline-flex; align-items: center; min-height: 46px; padding: 10px 18px; border: 1.5px solid #cfe0e8; border-radius: 999px; background: #fff; color: var(--v2-ink); font-weight: 700; text-decoration: none; transition: transform 120ms ease, border-color 120ms ease, background 120ms ease; }
html[data-ui="2"] .ai-chip:hover { transform: translateY(-1px); border-color: #5aa9e6; background: var(--v2-sky); }
html[data-ui="2"] .ai-card-note { margin: 18px 0 0; color: var(--v2-muted); font-size: 0.8rem; }

/* sections */
html[data-ui="2"] .eyebrow { color: #2b7f9e; }
html[data-ui="2"] .matching-steps li > span { background: var(--v2-ai-grad); color: #fff; }
html[data-ui="2"] .taxonomy-list a { border-radius: 16px; border-color: var(--v2-line); transition: transform 120ms ease, box-shadow 120ms ease; }
html[data-ui="2"] .taxonomy-list a:hover { transform: translateY(-2px); box-shadow: var(--v2-shadow); background: #fff; border-color: #cfe0e8; }
html[data-ui="2"] .employer-callout { border-radius: 24px; background: linear-gradient(135deg, #eefaf5, #eef5fd 55%, #f1eefd); }
html[data-ui="2"] .search-panel, html[data-ui="2"] .search-form { border-radius: 24px; }

/* cards */
html[data-ui="2"] .job-row, html[data-ui="2"] .facility-row, html[data-ui="2"] .match-result { border-color: var(--v2-line); border-radius: 20px; }
html[data-ui="2"] .job-row:hover { border-color: #cfe0e8; box-shadow: var(--v2-shadow); }
html[data-ui="2"] .job-row h3 a { color: var(--v2-ink); }
html[data-ui="2"] .job-row h3 a:hover { color: #0b57a4; }
html[data-ui="2"] .job-salary, html[data-ui="2"] .match-salary { color: #0f5e8f !important; }

/* AI match wizard */
html[data-ui="2"] .wizard { border-radius: 28px; border-color: var(--v2-line); box-shadow: var(--v2-shadow); }
html[data-ui="2"] .progress-track { height: 8px; background: #e8eef2; }
html[data-ui="2"] .progress-track span { background: var(--v2-ai-grad); }
html[data-ui="2"] .choice-row { min-height: 54px; border-width: 1.5px; border-color: var(--v2-line); border-radius: 16px; }
html[data-ui="2"] .choice-row:hover { border-color: #5aa9e6; background: #fff; }
html[data-ui="2"] .choice-row:has(input:checked) { border-color: #2b9b78; background: #eefaf5; box-shadow: none; }
html[data-ui="2"] .choice-row input, html[data-ui="2"] .toggle-row input { accent-color: #2b9b78; }
html[data-ui="2"] .toggle-row { border-radius: 14px; }
html[data-ui="2"] .match-score { border-radius: 16px; background: linear-gradient(135deg, #e6f7f0, #e8f2fc); }
html[data-ui="2"] .match-reasons { border-radius: 14px; background: #eefaf5; }

/* footer */
html[data-ui="2"] .site-footer { background: #0f2430; border-top: 0; color: #d5e3ea; }
html[data-ui="2"] .site-footer a { color: #fff; }

@media (max-width: 900px) {
  html[data-ui="2"] .hero { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-block: 34px; border-radius: 24px; }
}
@media (prefers-reduced-motion: reduce) { html[data-ui="2"] * { transition: none !important; } }

/* v2 photos: the hero photo returns as a wide banner, and job cards carry a photo */
html[data-ui="2"] .hero-image { display: block; grid-column: 1 / -1; min-height: clamp(200px, 26vw, 320px); margin: 6px 0 0; border-radius: 24px; box-shadow: var(--v2-shadow); }
html[data-ui="2"] .job-thumb { display: block; width: calc(100% + 48px); max-width: none; height: 150px; margin: -24px -24px 14px; object-fit: cover; border-radius: 20px 20px 0 0; background: #eef3f4; }
html[data-ui="2"] .job-row { overflow: hidden; }
html[data-ui="2"] .pref-grid a:hover { border-color: #5aa9e6; }

/* v2: the AI button is the first and biggest thing on the page */
html[data-ui="2"] .hero-copy { display: flex; flex-direction: column; }
html[data-ui="2"] .hero-actions { order: -1; flex-direction: column; align-items: stretch; gap: 12px; margin: 0 0 22px; max-width: 600px; }
html[data-ui="2"] .hero-actions .button-primary { min-height: 84px; font-size: clamp(1.5rem, 3.6vw, 2rem); font-weight: 800; letter-spacing: -0.01em; background: var(--v2-ai-grad); border: 0; box-shadow: 0 16px 36px rgb(90 169 230 / 38%); }
html[data-ui="2"] .hero-actions .button-primary:hover { filter: brightness(.96); background: var(--v2-ai-grad); }
html[data-ui="2"] .hero-actions .button-secondary { min-height: 50px; }
html[data-ui="2"] .header-cta { min-height: 48px; padding-inline: 22px; font-size: 1rem; }
html[data-ui="2"] .header-biz { border-color: #12303f; }
html[data-ui="2"] .biz-strip { border-radius: 22px; background: linear-gradient(135deg, #eefaf5, #eef5fd 55%, #f1eefd); }
