/* ============================================================
   Keepleai Admin — 共有デザインシステム
   admin.css  v1.0
   Google Fonts CDN で Fraunces / Zen Old Mincho / Noto Sans JP を
   index.html 側の <link> タグで読み込むこと。
   ============================================================ */

/* ============================================================
   DESIGN TOKENS（styles.css と同一ブランドトークン）
   ============================================================ */
:root {
  /* ---- Brand colors ---- */
  --navy:        #0b1f33;
  --navy2:       #132d47;
  --navy3:       #1e3a56;
  --off:         #faf8f4;
  --cream:       #f5f0e8;
  --ink:         #1a2230;
  --orange:      #ea580c;
  --orange-br:   #f97316;
  --orange-lt:   #fb923c;
  --orange-dp:   #c2410c;
  --orange-tint: #fff4ec;

  /* ---- Line / surface ---- */
  --line:        rgba(15,30,45,.10);
  --line-md:     rgba(15,30,45,.15);
  --line-light:  rgba(255,255,255,.10);
  --surface:     #fff;

  /* ---- Admin-specific colors ---- */
  --sidebar-bg:  #0b1f33;
  --sidebar-w:   240px;
  --topbar-h:    60px;

  /* ---- Typography ---- */
  --font-display: 'Fraunces', serif;
  --font-jp:      'Zen Old Mincho', serif;
  --font-body:    'Noto Sans JP', sans-serif;

  /* ---- Spacing ---- */
  --sp-xs: .375rem;
  --sp-sm: .75rem;
  --sp-md: 1.25rem;
  --sp-lg: 2rem;
  --sp-xl: 3rem;

  /* ---- Radius ---- */
  --r-xs:   4px;
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   14px;
  --r-xl:   20px;
  --r-pill: 999px;

  /* ---- Shadow ---- */
  --shadow-card:   0 2px 12px rgba(11,31,51,.07);
  --shadow-hover:  0 6px 28px rgba(11,31,51,.12);
  --shadow-orange: 0 4px 18px rgba(234,88,12,.28);
  --shadow-modal:  0 16px 64px rgba(11,31,51,.22);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body.admin-body {
  background: var(--off);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  word-break: auto-phrase;
  line-break: strict;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
input, select, textarea { font-family: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ============================================================
   ADMIN LAYOUT — SIDEBAR + MAIN
   ============================================================ */
.admin-layout {
  display: block;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.admin-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform .35s cubic-bezier(.76,0,.24,1);
}

/* Sidebar Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--line-light);
  flex-shrink: 0;
  text-decoration: none;
}
.sidebar-logo__wordmark {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  letter-spacing: -.025em;
  line-height: 1;
}
.sidebar-logo__dot {
  width: 7px; height: 7px;
  background: var(--orange-br);
  border-radius: 50%;
  flex-shrink: 0;
  margin-left: .1rem;
}
.sidebar-logo__badge {
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--orange-br);
  background: rgba(249,115,22,.14);
  padding: .15rem .45rem;
  border-radius: var(--r-xs);
  margin-left: auto;
  white-space: nowrap;
}

/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  padding: .875rem 0;
}
.sidebar-nav__section {
  padding: 0 .75rem;
  margin-bottom: .25rem;
}
.sidebar-nav__section-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: .875rem .625rem .375rem;
  display: block;
}
.sidebar-nav__item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .625rem .875rem;
  border-radius: var(--r-md);
  color: rgba(255,255,255,.62);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background .18s, color .18s;
  text-decoration: none;
  position: relative;
  white-space: nowrap;
}
.sidebar-nav__item svg { flex-shrink: 0; }
.sidebar-nav__item:hover {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.9);
}
.sidebar-nav__item.is-active {
  background: rgba(234,88,12,.2);
  color: var(--orange-br);
}
.sidebar-nav__item.is-active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--orange-br);
  border-radius: 0 2px 2px 0;
}
.sidebar-nav__badge {
  margin-left: auto;
  min-width: 20px; height: 20px;
  background: var(--orange);
  color: #fff;
  border-radius: var(--r-pill);
  font-size: .7rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 .4rem;
  flex-shrink: 0;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem .75rem;
  border-top: 1px solid var(--line-light);
  flex-shrink: 0;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem .625rem;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background .18s;
}
.sidebar-user:hover { background: rgba(255,255,255,.07); }
.sidebar-user__avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--orange);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: .875rem;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar-user__avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-user__info { flex: 1; min-width: 0; }
.sidebar-user__name {
  font-size: .8125rem;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user__role {
  font-size: .7rem;
  color: rgba(255,255,255,.35);
  white-space: nowrap;
}

/* ---- Main Content Column ---- */
.admin-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-left: var(--sidebar-w);
}

/* ============================================================
   TOPBAR
   ============================================================ */
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: rgba(250,248,244,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.75rem;
}
.topbar-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 2px;
}
.topbar-hamburger span {
  display: block; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.topbar-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.topbar-hamburger.open span:nth-child(2) { opacity: 0; }
.topbar-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.topbar-page-title {
  flex: 1;
  font-family: var(--font-jp);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: .625rem;
  flex-shrink: 0;
}
.topbar-icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: rgba(11,31,51,.55);
  background: transparent;
  transition: background .18s, color .18s;
  position: relative;
}
.topbar-icon-btn:hover {
  background: var(--cream);
  color: var(--navy);
}
.topbar-icon-btn .notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--orange);
  border-radius: 50%;
  border: 2px solid var(--off);
}

/* ============================================================
   PAGE CONTENT AREA
   ============================================================ */
.admin-content {
  flex: 1;
  padding: 1.75rem;
  max-width: 1280px;
  width: 100%;
}

/* Page header row */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.page-header__left { display: flex; flex-direction: column; gap: .25rem; }
.page-header__eyebrow {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange);
}
.page-header__title {
  font-family: var(--font-jp);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  word-break: auto-phrase;
  line-break: strict;
}
.page-header__sub {
  font-size: .8125rem;
  color: rgba(11,31,51,.5);
  margin-top: .125rem;
}
.page-header__actions {
  display: flex;
  align-items: center;
  gap: .625rem;
  flex-shrink: 0;
}

/* ============================================================
   KPI TILES
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}
@media (max-width: 1024px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .kpi-grid { grid-template-columns: 1fr; } }

.kpi-tile {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.375rem 1.125rem;
  display: flex;
  flex-direction: column;
  gap: .375rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow .22s, transform .22s;
  position: relative;
  overflow: hidden;
}
.kpi-tile::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--kpi-accent, var(--line));
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.kpi-tile:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.kpi-tile--orange { --kpi-accent: var(--orange); }
.kpi-tile--navy   { --kpi-accent: var(--navy); }
.kpi-tile--green  { --kpi-accent: #16a34a; }
.kpi-tile--amber  { --kpi-accent: #d97706; }

.kpi-tile__label {
  font-size: .75rem;
  font-weight: 700;
  color: rgba(11,31,51,.5);
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: .375rem;
}
.kpi-tile__label svg { color: var(--kpi-accent, var(--navy)); }

.kpi-tile__value {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.03em;
  line-height: 1.1;
}
.kpi-tile__unit {
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 500;
  color: rgba(11,31,51,.4);
  margin-left: .2em;
}
.kpi-tile__delta {
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: .2em;
  margin-top: .125rem;
}
.kpi-tile__delta--up   { color: #16a34a; }
.kpi-tile__delta--down { color: #dc2626; }
.kpi-tile__delta--same { color: rgba(11,31,51,.4); }

/* ============================================================
   CARD
   ============================================================ */
.admin-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.admin-card--no-pad { padding: 0; }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.375rem;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.card-header__title {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.card-header__title svg { color: var(--orange); }
.card-header__actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.card-body { padding: 1.25rem 1.375rem; }
.card-footer {
  padding: .875rem 1.375rem;
  border-top: 1px solid var(--line);
  background: var(--off);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}

/* ============================================================
   DATA TABLE
   ============================================================ */
.data-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  white-space: nowrap;
}
.data-table th {
  text-align: left;
  padding: .625rem 1rem;
  background: var(--off);
  border-bottom: 1.5px solid var(--line);
  font-size: .75rem;
  font-weight: 700;
  color: rgba(11,31,51,.5);
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table td {
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(250,248,244,.8); }

/* Cell helpers */
.td-primary {
  font-weight: 700;
  color: var(--navy);
  word-break: auto-phrase;
  line-break: strict;
  white-space: normal;
  min-width: 160px;
}
.td-secondary {
  color: rgba(11,31,51,.5);
  font-size: .8125rem;
  white-space: normal;
}
.td-num {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 700;
  color: var(--navy);
  text-align: right;
}
.td-num--orange { color: var(--orange); }
.td-actions {
  display: flex;
  align-items: center;
  gap: .375rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */

/* Primary – orange fill */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .65rem 1.375rem;
  background: var(--orange);
  color: #fff;
  font-size: .875rem;
  font-weight: 700;
  border-radius: var(--r-sm);
  letter-spacing: .02em;
  white-space: nowrap;
  transition: background .18s, transform .14s, box-shadow .18s;
  cursor: pointer;
  border: none;
}
.btn-primary:hover {
  background: var(--orange-dp);
  transform: translateY(-1px);
  box-shadow: var(--shadow-orange);
}
.btn-primary:active { transform: translateY(0); box-shadow: none; }
.btn-primary--sm { padding: .45rem .875rem; font-size: .8rem; }
.btn-primary--lg { padding: .8rem 1.875rem; font-size: 1rem; }
.btn-primary--icon {
  padding: .65rem .875rem;
}

/* Ghost – outline on dark sidebar */
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .65rem 1.25rem;
  border: 1.5px solid rgba(11,31,51,.2);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 600;
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: border-color .18s, background .18s, color .18s;
  cursor: pointer;
  background: #fff;
}
.btn-ghost:hover {
  border-color: var(--navy);
  background: var(--off);
}
.btn-ghost--sm { padding: .4rem .875rem; font-size: .8rem; }

/* Danger */
.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .65rem 1.25rem;
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #b91c1c;
  font-size: .875rem;
  font-weight: 700;
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: background .18s, border-color .18s;
  cursor: pointer;
}
.btn-danger:hover {
  background: #fee2e2;
  border-color: #f87171;
}
.btn-danger--sm { padding: .4rem .875rem; font-size: .8rem; }

/* Icon-only circle button */
.btn-icon-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--line-md);
  color: rgba(11,31,51,.5);
  background: #fff;
  transition: border-color .18s, color .18s, background .18s;
  cursor: pointer;
  flex-shrink: 0;
}
.btn-icon-circle:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-tint);
}

/* Text link */
.btn-link {
  display: inline-flex; align-items: center; gap: .3em;
  color: var(--orange);
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
  background: none; border: none;
  transition: opacity .18s;
}
.btn-link:hover { opacity: .75; }

/* ============================================================
   BADGES — 状態（gen_status）
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: .3em;
  padding: .22rem .65rem;
  border-radius: var(--r-pill);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
  line-height: 1.4;
}
/* 生成状態バッジ */
.badge--pending {
  background: rgba(11,31,51,.08);
  color: rgba(11,31,51,.55);
}
.badge--generating {
  background: #eff6ff;
  color: #1d4ed8;
}
.badge--generating .spinner {
  width: 10px; height: 10px;
  border: 2px solid rgba(29,78,216,.25);
  border-top-color: #1d4ed8;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
.badge--ready {
  background: #f0fdf4;
  color: #15803d;
}
.badge--failed {
  background: #fef2f2;
  color: #b91c1c;
}

/* レビュー結果バッジ */
.badge--pass {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.badge--pending-rv {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.badge--reject {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* 面接タイプバッジ */
.badge--type-hire {
  background: var(--orange-tint);
  color: var(--orange-dp);
}
.badge--type-onboard {
  background: #eef2ff;
  color: #3730a3;
}
.badge--type-general {
  background: rgba(11,31,51,.07);
  color: rgba(11,31,51,.65);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-field {
  display: flex; flex-direction: column; gap: .375rem;
}
.form-label {
  font-size: .8125rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .02em;
}
.form-hint {
  font-size: .75rem;
  color: rgba(11,31,51,.45);
  margin-top: .125rem;
  line-height: 1.5;
}
.form-error {
  font-size: .75rem;
  color: #b91c1c;
  margin-top: .125rem;
  display: flex;
  align-items: center;
  gap: .3em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: .65rem 1rem;
  background: #fff;
  border: 1.5px solid rgba(11,31,51,.16);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
  appearance: none;
  -webkit-appearance: none;
}
.form-input::placeholder,
.form-textarea::placeholder { color: rgba(11,31,51,.35); }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(234,88,12,.1);
}
.form-input.is-error,
.form-select.is-error { border-color: #ef4444; }

.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6' fill='none' stroke='%230b1f33' stroke-opacity='.4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 2.5rem; }

.form-textarea { min-height: 110px; resize: vertical; padding: .75rem 1rem; line-height: 1.7; }

/* Range slider */
.form-range {
  width: 100%;
  height: 4px;
  appearance: none; -webkit-appearance: none;
  background: rgba(11,31,51,.12);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  accent-color: var(--orange);
}
.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--orange);
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 6px rgba(234,88,12,.4);
  cursor: pointer;
}
.form-range::-moz-range-thumb {
  width: 16px; height: 16px;
  background: var(--orange);
  border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer;
}

/* Toggle switch */
.form-toggle-wrap {
  display: flex;
  align-items: center;
  gap: .75rem;
  cursor: pointer;
  user-select: none;
}
.form-toggle {
  position: relative;
  width: 42px; height: 24px;
  flex-shrink: 0;
}
.form-toggle input {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.form-toggle__track {
  position: absolute; inset: 0;
  background: rgba(11,31,51,.18);
  border-radius: var(--r-pill);
  transition: background .2s;
}
.form-toggle input:checked ~ .form-toggle__track {
  background: var(--orange);
}
.form-toggle__thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: transform .2s;
}
.form-toggle input:checked ~ .form-toggle__thumb {
  transform: translateX(18px);
}
.form-toggle__label {
  font-size: .875rem;
  color: var(--ink);
}

/* Form grid */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) { .form-grid-2 { grid-template-columns: 1fr; } }

/* ============================================================
   STEP WIZARD INDICATOR
   ============================================================ */
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 1.25rem 1.375rem;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.step-indicator::-webkit-scrollbar { display: none; }

.step-item {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.step-item__inner {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .375rem .5rem;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background .18s;
}
.step-item__inner:hover { background: var(--cream); }
.step-item.is-current .step-item__inner { cursor: default; }

.step-item__num {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid rgba(11,31,51,.15);
  color: rgba(11,31,51,.4);
  background: #fff;
  transition: background .2s, border-color .2s, color .2s;
}
.step-item.is-done .step-item__num {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.step-item.is-current .step-item__num {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(234,88,12,.15);
}

.step-item__label {
  font-size: .8125rem;
  font-weight: 600;
  color: rgba(11,31,51,.4);
  white-space: nowrap;
  transition: color .2s;
}
.step-item.is-done    .step-item__label { color: var(--navy); }
.step-item.is-current .step-item__label { color: var(--navy); font-weight: 700; }

.step-connector {
  width: 32px; height: 1.5px;
  background: var(--line-md);
  flex-shrink: 0;
  margin: 0 .125rem;
}
.step-connector.is-done { background: var(--navy); }

/* ============================================================
   AVATAR PREVIEW
   ============================================================ */
.avatar-preview-frame {
  position: relative;
  aspect-ratio: 9/12;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--navy);
  border: 2px solid var(--line-md);
  box-shadow: var(--shadow-card);
}
.avatar-preview-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
}
.avatar-preview-frame__overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(11,31,51,.9) 0%, transparent 100%);
  display: flex;
  align-items: flex-end;
  gap: .5rem;
}
.avatar-preview-frame__name {
  font-size: .875rem;
  font-weight: 700;
  color: #fff;
}
.avatar-preview-frame__speaking {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
}
.avatar-preview-frame__speaking span {
  width: 3px; border-radius: 2px;
  background: var(--orange-br);
  animation: speakBar .6s ease-in-out infinite alternate;
}
.avatar-preview-frame__speaking span:nth-child(1) { height: 8px;  animation-delay: 0s; }
.avatar-preview-frame__speaking span:nth-child(2) { height: 14px; animation-delay: .1s; }
.avatar-preview-frame__speaking span:nth-child(3) { height: 10px; animation-delay: .2s; }
.avatar-preview-frame__speaking span:nth-child(4) { height: 18px; animation-delay: .15s; }
.avatar-preview-frame__speaking span:nth-child(5) { height: 7px;  animation-delay: .05s; }
.avatar-preview-frame__speaking.is-silent span { animation: none; height: 4px; opacity: .35; }

@keyframes speakBar {
  from { transform: scaleY(.5); }
  to   { transform: scaleY(1); }
}

/* Preset photo grid */
.avatar-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .625rem;
}
.avatar-preset {
  aspect-ratio: 1/1;
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: border-color .18s, box-shadow .18s;
}
.avatar-preset img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
}
.avatar-preset.is-selected {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(234,88,12,.2);
}
.avatar-preset:hover:not(.is-selected) {
  border-color: rgba(234,88,12,.45);
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(11,31,51,.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .22s;
}
.modal-overlay.is-open {
  opacity: 1; pointer-events: auto;
}
.modal {
  background: #fff;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px) scale(.98);
  transition: transform .22s cubic-bezier(.76,0,.24,1);
}
.modal-overlay.is-open .modal {
  transform: translateY(0) scale(1);
}
.modal--lg { max-width: 760px; }
.modal--sm { max-width: 380px; }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.375rem 1.5rem 1rem;
  border-bottom: 1px solid var(--line);
  gap: 1rem;
}
.modal-header__title {
  font-family: var(--font-jp);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--navy);
  word-break: auto-phrase;
  line-break: strict;
}
.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(11,31,51,.45);
  cursor: pointer;
  transition: background .18s, color .18s;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--cream); color: var(--navy); }
.modal-body  { padding: 1.375rem 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: .625rem;
}

/* ============================================================
   DRAWER (side panel)
   ============================================================ */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(11,31,51,.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 95vw);
  background: #fff;
  box-shadow: -4px 0 40px rgba(11,31,51,.15);
  z-index: 401;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.76,0,.24,1);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.drawer.is-open { transform: translateX(0); }

.drawer-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.375rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  gap: 1rem;
}
.drawer-header__title {
  font-family: var(--font-jp);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.375rem;
}
.drawer-footer {
  padding: 1rem 1.375rem;
  border-top: 1px solid var(--line);
  display: flex;
  gap: .625rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ============================================================
   QR PLACEHOLDER
   ============================================================ */
.qr-placeholder {
  width: 120px; height: 120px;
  border-radius: var(--r-md);
  background: var(--off);
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.qr-placeholder svg { display: block; }

/* Inline SVG QR dummy */
.qr-svg-dummy {
  width: 90px; height: 90px;
}

/* ============================================================
   CHART HELPERS — inline SVG / CSS
   ============================================================ */

/* Radar chart container */
.chart-radar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chart-radar svg { display: block; overflow: visible; }

/* Bar chart */
.chart-bar {
  display: flex;
  align-items: flex-end;
  gap: .5rem;
  height: 120px;
}
.chart-bar__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .375rem;
  flex: 1;
}
.chart-bar__fill {
  width: 100%;
  background: var(--orange);
  border-radius: var(--r-xs) var(--r-xs) 0 0;
  transition: height .4s cubic-bezier(.76,0,.24,1);
  min-height: 4px;
}
.chart-bar__fill--light { background: rgba(234,88,12,.28); }
.chart-bar__label {
  font-size: .65rem;
  font-weight: 700;
  color: rgba(11,31,51,.45);
  text-align: center;
  white-space: nowrap;
  word-break: auto-phrase;
  line-break: strict;
}
.chart-bar__val {
  font-size: .7rem;
  font-weight: 700;
  color: var(--navy);
}

/* Score gauge band */
.score-gauge {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.score-gauge__track {
  flex: 1;
  height: 8px;
  background: rgba(11,31,51,.08);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.score-gauge__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange-br) 100%);
  border-radius: var(--r-pill);
  transition: width .5s cubic-bezier(.76,0,.24,1);
}
.score-gauge__value {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 700;
  font-size: .9375rem;
  color: var(--orange);
  min-width: 2.5em;
  text-align: right;
}

/* ============================================================
   INTERVIEW SESSION CARD (dashboard)
   ============================================================ */
.interview-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  transition: box-shadow .22s, transform .22s;
  overflow: hidden;
}
.interview-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.interview-card__top {
  padding: 1.125rem 1.25rem .875rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: .875rem;
}
.interview-card__thumb {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--cream);
}
.interview-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.interview-card__info { flex: 1; min-width: 0; }
.interview-card__title {
  font-weight: 700;
  color: var(--navy);
  font-size: .9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: auto-phrase;
}
.interview-card__sub {
  font-size: .75rem;
  color: rgba(11,31,51,.45);
  margin-top: .125rem;
  display: flex; align-items: center; gap: .375rem; flex-wrap: wrap;
}
.interview-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.interview-card__stat {
  padding: .75rem .875rem;
  text-align: center;
  border-right: 1px solid var(--line);
}
.interview-card__stat:last-child { border-right: none; }
.interview-card__stat-val {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.interview-card__stat-val--alert { color: var(--orange); }
.interview-card__stat-label {
  font-size: .7rem;
  font-weight: 700;
  color: rgba(11,31,51,.4);
  letter-spacing: .04em;
  margin-top: .125rem;
  white-space: nowrap;
}
.interview-card__actions {
  padding: .875rem 1.125rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--off);
}
.interview-card__url {
  flex: 1;
  font-size: .7125rem;
  color: rgba(11,31,51,.4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: monospace;
}

/* ============================================================
   URL COPY ROW
   ============================================================ */
.url-copy-row {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.url-copy-row__field {
  flex: 1;
  padding: .55rem .875rem;
  border: 1.5px solid var(--line-md);
  border-radius: var(--r-sm);
  font-size: .8125rem;
  font-family: monospace;
  color: rgba(11,31,51,.6);
  background: var(--off);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
  user-select: all;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem;
  text-align: center;
  gap: .75rem;
}
.empty-state__icon {
  width: 56px; height: 56px;
  background: var(--cream);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: rgba(11,31,51,.3);
  margin-bottom: .25rem;
}
.empty-state__title {
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
}
.empty-state__desc {
  font-size: .875rem;
  color: rgba(11,31,51,.45);
  max-width: 340px;
  line-height: 1.65;
  word-break: auto-phrase;
}

/* ============================================================
   DIVIDER
   ============================================================ */
.admin-divider {
  width: 100%; height: 1px;
  background: var(--line);
  border: none;
  margin: 1.25rem 0;
}

/* ============================================================
   ALERT BANNER
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .875rem 1.125rem;
  border-radius: var(--r-md);
  font-size: .875rem;
  line-height: 1.6;
}
.alert svg { flex-shrink: 0; margin-top: .1em; }
.alert--info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.alert--warn {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.alert--success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.alert--error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* ============================================================
   SPINNER
   ============================================================ */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(11,31,51,.12);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
  vertical-align: middle;
}
.spinner--sm { width: 14px; height: 14px; border-width: 2px; }

/* ============================================================
   SECTION SEPARATOR
   ============================================================ */
.section-sep {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.5rem 0;
  color: rgba(11,31,51,.3);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.section-sep::before,
.section-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ============================================================
   RESPONSIVE — 375px MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }

  /* Sidebar becomes drawer */
  .admin-sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .admin-sidebar.drawer-open {
    transform: translateX(0);
    box-shadow: 4px 0 40px rgba(11,31,51,.2);
  }

  .admin-main { padding-left: 0; }
  .topbar-hamburger { display: flex; }

  .admin-content { padding: 1rem; }

  .kpi-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }

  .page-header { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .page-header__actions { width: 100%; }

  .interview-card__stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .avatar-preset-grid { grid-template-columns: repeat(3, 1fr); }
  .step-indicator { gap: 0; }
  .step-connector { width: 20px; }
}

@media (max-width: 375px) {
  body.admin-body { font-size: 14px; }
  .admin-content { padding: .875rem; }
  .topbar-page-title { font-size: .9375rem; }
  .kpi-tile__value { font-size: 1.875rem; }
}

/* ============================================================
   SIDEBAR MOBILE OVERLAY
   ============================================================ */
.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(11,31,51,.5);
  z-index: 199;
  display: none;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.sidebar-overlay.is-visible { display: block; }

/* ============================================================
   PREFERS-REDUCED-MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .avatar-preview-frame__speaking span { animation: none !important; }
}

/* ============================================================
   PLAN USAGE WIDGET  — プラン利用状況
   ============================================================ */
.plan-usage {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.plan-usage__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.375rem;
  border-bottom: 1px solid var(--line);
  gap: .75rem;
  flex-wrap: wrap;
}
.plan-usage__title {
  font-size: .875rem;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.plan-usage__title svg { color: var(--orange); }
.plan-usage__plan-badge {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--orange-dp);
  background: var(--orange-tint);
  border: 1px solid rgba(234,88,12,.2);
  padding: .2rem .5rem;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.plan-usage__body {
  padding: 1rem 1.375rem;
  display: flex;
  flex-direction: column;
  gap: .875rem;
}
.plan-usage__row {
  display: flex;
  flex-direction: column;
  gap: .375rem;
}
.plan-usage__row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
}
.plan-usage__label {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink);
}
.plan-usage__count {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: .9375rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.02em;
  white-space: nowrap;
}
.plan-usage__count--warn  { color: var(--orange); }
.plan-usage__count--full  { color: #dc2626; }

/* ============================================================
   QUOTA BAR  — 割合バー（再利用可能）
   ============================================================ */
.quota-bar {
  width: 100%;
  height: 7px;
  background: rgba(11,31,51,.08);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.quota-bar__fill {
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange-br) 100%);
  transition: width .5s cubic-bezier(.76,0,.24,1);
}
.quota-bar__fill--warn { background: linear-gradient(90deg, #d97706 0%, #f59e0b 100%); }
.quota-bar__fill--full { background: linear-gradient(90deg, #b91c1c 0%, #ef4444 100%); }

/* ============================================================
   UPGRADE PROMPT  — アップグレード導線バナー
   ============================================================ */
.upgrade-prompt {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .875rem 1.125rem;
  background: linear-gradient(135deg, var(--orange-tint) 0%, rgba(249,115,22,.06) 100%);
  border: 1.5px solid rgba(234,88,12,.25);
  border-radius: var(--r-md);
  flex-wrap: wrap;
}
.upgrade-prompt__icon {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  background: rgba(234,88,12,.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--orange);
  flex-shrink: 0;
}
.upgrade-prompt__text {
  flex: 1;
  min-width: 160px;
}
.upgrade-prompt__title {
  font-size: .8125rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  word-break: auto-phrase;
  line-break: strict;
}
.upgrade-prompt__desc {
  font-size: .75rem;
  color: rgba(11,31,51,.5);
  line-height: 1.5;
  margin-top: .1rem;
  word-break: auto-phrase;
  line-break: strict;
}
.upgrade-prompt__btn {
  display: inline-flex; align-items: center; gap: .35em;
  padding: .55rem 1rem;
  background: var(--orange);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s, transform .14s;
  flex-shrink: 0;
}
.upgrade-prompt__btn:hover {
  background: var(--orange-dp);
  transform: translateY(-1px);
}

/* ============================================================
   JOB LIST TABLE  — 求人一覧
   ============================================================ */
/* .data-table と .admin-card を流用。追加定義のみ */
.job-row { cursor: pointer; }
.job-row:hover td { background: rgba(234,88,12,.04) !important; }

.td-job-name {
  font-weight: 700;
  color: var(--navy);
  word-break: auto-phrase;
  line-break: strict;
  white-space: normal;
  min-width: 180px;
  line-height: 1.45;
}
.td-job-sub {
  font-size: .775rem;
  color: rgba(11,31,51,.45);
  margin-top: .1rem;
}

/* ステータス badge 拡張 */
.badge--status-open {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.badge--status-draft {
  background: rgba(11,31,51,.07);
  color: rgba(11,31,51,.55);
  border: 1px solid rgba(11,31,51,.12);
}
.badge--status-paused {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.badge--status-closed {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* AI面接あり/なし badge */
.badge--ai-on {
  background: rgba(234,88,12,.1);
  color: var(--orange-dp);
  border: 1px solid rgba(234,88,12,.25);
  display: inline-flex; align-items: center; gap: .3em;
}
.badge--ai-none {
  background: rgba(11,31,51,.05);
  color: rgba(11,31,51,.4);
  border: 1px solid rgba(11,31,51,.1);
  display: inline-flex; align-items: center; gap: .3em;
}

/* ============================================================
   JOB DETAIL HEAD  — 求人詳細ヘッダ
   ============================================================ */
.job-detail-head {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.job-detail-head__thumb {
  width: 68px; height: 68px;
  border-radius: var(--r-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--cream);
}
.job-detail-head__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.job-detail-head__info {
  flex: 1;
  min-width: 180px;
}
.job-detail-head__title {
  font-family: var(--font-jp);
  font-size: 1.3125rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  word-break: auto-phrase;
  line-break: strict;
}
.job-detail-head__meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .5rem;
}
.job-detail-head__actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
  align-self: flex-start;
}

/* 求人情報グリッド */
.job-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0;
}
.job-info-cell {
  padding: .875rem 1.125rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.job-info-cell:last-child,
.job-info-cell:nth-child(3n) { border-right: none; }
.job-info-cell__label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(11,31,51,.4);
  margin-bottom: .3rem;
}
.job-info-cell__value {
  font-size: .9rem;
  font-weight: 600;
  color: var(--navy);
  word-break: auto-phrase;
  line-break: strict;
}

/* ============================================================
   AI ATTACH CARD  — 既存AI面接が紐付いた状態
   ============================================================ */
.ai-attach-card {
  background: var(--surface);
  border: 1.5px solid rgba(234,88,12,.25);
  border-radius: var(--r-lg);
  box-shadow: 0 2px 16px rgba(234,88,12,.08);
  overflow: hidden;
}
.ai-attach-card__header {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: 1.125rem 1.375rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(234,88,12,.04) 0%, transparent 60%);
}
.ai-attach-card__avatar {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--cream);
  border: 2px solid rgba(234,88,12,.2);
}
.ai-attach-card__avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
}
.ai-attach-card__name {
  font-weight: 700;
  color: var(--navy);
  font-size: .9375rem;
}
.ai-attach-card__sub {
  font-size: .775rem;
  color: rgba(11,31,51,.5);
  margin-top: .125rem;
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
}
.ai-attach-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}
.ai-attach-card__stat {
  padding: .875rem 1rem;
  text-align: center;
  border-right: 1px solid var(--line);
}
.ai-attach-card__stat:last-child { border-right: none; }
.ai-attach-card__stat-val {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--navy);
  letter-spacing: -.02em;
  line-height: 1.1;
}
.ai-attach-card__stat-val--orange { color: var(--orange); }
.ai-attach-card__stat-label {
  font-size: .7rem;
  font-weight: 700;
  color: rgba(11,31,51,.4);
  letter-spacing: .04em;
  margin-top: .15rem;
}
.ai-attach-card__actions {
  padding: .875rem 1.25rem;
  background: var(--off);
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

/* ============================================================
   AI ATTACH EMPTY  — AI面接未作成の空状態
   ============================================================ */
.ai-attach-empty {
  border: 2px dashed rgba(234,88,12,.3);
  border-radius: var(--r-lg);
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .75rem;
  background: linear-gradient(135deg, rgba(234,88,12,.025) 0%, transparent 60%);
  transition: border-color .2s, background .2s;
}
.ai-attach-empty:hover {
  border-color: rgba(234,88,12,.5);
  background: rgba(234,88,12,.03);
}
.ai-attach-empty__icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--orange-tint);
  display: flex; align-items: center; justify-content: center;
  color: var(--orange);
  margin-bottom: .25rem;
}
.ai-attach-empty__title {
  font-weight: 700;
  color: var(--navy);
  font-size: 1rem;
}
.ai-attach-empty__desc {
  font-size: .875rem;
  color: rgba(11,31,51,.5);
  max-width: 360px;
  line-height: 1.65;
  word-break: auto-phrase;
  line-break: strict;
}
.ai-attach-empty__actions {
  display: flex;
  align-items: center;
  gap: .625rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: .25rem;
}

/* ============================================================
   SECTION TITLE ROW  — セクション見出し行
   ============================================================ */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin: 1.75rem 0 1rem;
  flex-wrap: wrap;
}
.section-title-row__title {
  font-family: var(--font-jp);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.section-title-row__title svg { color: var(--orange); }

/* ============================================================
   BACK LINK  — 戻るナビ
   ============================================================ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  font-size: .8125rem;
  font-weight: 600;
  color: rgba(11,31,51,.5);
  text-decoration: none;
  margin-bottom: 1rem;
  transition: color .18s;
}
.back-link:hover { color: var(--navy); }
.back-link svg { flex-shrink: 0; }

/* ============================================================
   CLONE SELECT LIST  — 複製用AI面接選択リスト (modal内)
   ============================================================ */
.clone-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-height: 320px;
  overflow-y: auto;
}
.clone-item {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .875rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .18s, background .18s;
  background: #fff;
}
.clone-item:hover {
  border-color: var(--orange);
  background: var(--orange-tint);
}
.clone-item.is-selected {
  border-color: var(--orange);
  background: var(--orange-tint);
  box-shadow: 0 0 0 3px rgba(234,88,12,.12);
}
.clone-item__avatar {
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--cream);
}
.clone-item__avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
}
.clone-item__info { flex: 1; min-width: 0; }
.clone-item__name {
  font-weight: 700;
  font-size: .875rem;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clone-item__meta {
  font-size: .75rem;
  color: rgba(11,31,51,.45);
  margin-top: .1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clone-item__check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(11,31,51,.2);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .18s, border-color .18s;
}
.clone-item.is-selected .clone-item__check {
  background: var(--orange);
  border-color: var(--orange);
}

/* ============================================================
   RESPONSIVE 追加 — 求人系
   ============================================================ */
@media (max-width: 768px) {
  .job-detail-head { padding: 1.125rem 1.25rem; gap: 1rem; }
  .job-info-grid   { grid-template-columns: repeat(2, 1fr); }
  .job-info-cell:nth-child(3n) { border-right: 1px solid var(--line); }
  .job-info-cell:nth-child(2n) { border-right: none; }
  .ai-attach-card__stats { grid-template-columns: repeat(3, 1fr); }
  .plan-usage__body { gap: .75rem; }
  .upgrade-prompt { gap: .625rem; }
}
@media (max-width: 480px) {
  .job-detail-head { flex-direction: column; }
  .job-detail-head__actions { width: 100%; }
  .ai-attach-card__stats { grid-template-columns: repeat(3, 1fr); }
  .ai-attach-empty { padding: 1.75rem 1rem; }
  .ai-attach-empty__actions { flex-direction: column; width: 100%; }
  .ai-attach-empty__actions .btn-primary,
  .ai-attach-empty__actions .btn-ghost { width: 100%; justify-content: center; }
  .job-info-grid { grid-template-columns: 1fr; }
  .job-info-cell { border-right: none !important; }
}
@media (max-width: 375px) {
  .job-detail-head__title { font-size: 1.125rem; }
  .upgrade-prompt { flex-direction: column; align-items: flex-start; }
}
