/* ------------------------------
   カラーパレット（白背景＋青ボタン）
------------------------------ */
:root {
  --bg: #ffffff;         /* 背景白 */
  --card: #ffffff;       
  --text: #000033;       /* 濃い青文字 */
  --muted: #555577;      /* 補助テキスト */
  --line: #aaccee;       /* 境界線 */
  --brand: #3399ff;      /* ボタン・タグブランド色 */
  --brand-soft: #d6e6ff; /* ブランドソフト */
  --warn: #ff5555;       /* 警告色 */
  --warn-soft: #ffe6e6;  /* 警告ソフト */
}

/* ------------------------------
   基本設定
------------------------------ */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  text-align: center;
  overflow-x: hidden;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

/* ------------------------------
   ヘッダー・フッター
------------------------------ */
.site-header {
  padding: 2.5rem 0 1.5rem;
  background: var(--card);
}

.site-header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 600;
}

.subtitle {
  margin-top: 0.6rem;
  color: var(--muted);
}

.site-footer {
  padding: 2rem 0;
  color: var(--muted);
}

/* ------------------------------
   パネル・フォーム
------------------------------ */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.2rem;
  margin-bottom: 1rem;
}

.login-panel {
  width: min(360px, 92vw);
  margin: 5rem auto 0;
  display: grid;
  gap: 1rem;
  justify-items: center;
}

.login-title {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 600;
}

.login-form-min {
  width: 100%;
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}

.login-form-min label {
  width: 100%;
}

.login-form-min input,
.login-form-min button {
  width: 100%;
}

.hidden {
  display: none;
}

.muted {
  margin-top: 0.4rem;
  color: var(--muted);
}

.auth-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.form-card {
  display: grid;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  background: var(--card);
  justify-items: center;
}

.single-form {
  max-width: 420px;
  margin: 0 auto;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  justify-items: center;
  text-align: center;
}

input,
select,
button,
textarea {
  font: inherit;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
  background: #ffffff; /* 白背景に変更 */
  color: var(--text);
  text-align: center;
}

button {
  border: 1px solid var(--brand);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  background: var(--brand); /* 青ボタン維持 */
  color: #fff;
  font: inherit;
  transition: background 0.15s, color 0.15s;
}

button:hover:not(:disabled) {
  background: #0066cc; /* 濃い青に変化 */
  color: #fff;
}

button[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ------------------------------
   レイアウトユーティリティ
------------------------------ */
.jobs-header,
.job-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.jobs-header {
  flex-direction: row;
  text-align: center;
  gap: 0.8rem;
  margin-bottom: 0.45rem;
}

.jobs-header h2 {
  margin: 0;
}

.jobs-subtitle {
  margin: 0;
  color: var(--muted);
}

.jobs-pagination {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

/* スマートフォン版（デフォルト） */
.filters {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  align-items: flex-start;
  text-align: center;
  width: 100%;
  padding: 0.5rem 0;
}

.filters label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  min-width: auto;
  flex: 1 1 auto;
  min-width: 140px;
}

.keyword-filter {
  flex: 0 1 auto;
}

.keyword-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: auto;
  justify-content: center;
}

.keyword-row input {
  flex: 1;
  max-width: 150px;
  min-width: 100px;
}

.keyword-row button {
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.filters select {
  width: 100%;
  min-width: 120px;
}

.wage-filter {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  flex: 1 1 auto;
  min-width: 140px;
}

.wage-filter select {
  width: auto;
}

/* PC版（768px以上） */
@media (min-width: 768px) {
  .filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
  }

  .filters label {
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    flex: 0 1 auto;
    min-width: auto;
  }

  .keyword-filter {
    flex: 0 1 auto;
    min-width: 0;
  }

  .keyword-row {
    width: auto;
  }

  .keyword-row input {
    max-width: 160px;
    min-width: 120px;
  }

  .filters select {
    width: auto;
    min-width: 120px;
  }

  .wage-filter {
    flex: 0 1 auto;
    min-width: 0;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
  }

  .wage-filter select {
    width: auto;
  }
}

.system-message {
  min-height: 1.2rem;
  margin-top: 0.5rem;
  color: var(--muted);
}

body[data-page="login"] .system-message {
  min-height: 0;
}

.system-message:empty {
  display: none;
}

.system-message.error {
  color: var(--warn);
}

.system-message.success {
  color: var(--brand);
}

.jobs-list {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.5rem;
  justify-items: center;
}

.job-card-link {
  width: min(960px, 100%);
  margin: 0 auto;
  text-decoration: none;
  color: inherit;
  display: block;
}

.job-card-link .job-card {
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s;
}

.job-card-link:hover .job-card {
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}


/* ------------------------------
   job-card
------------------------------ */
.job-card {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0.75rem 1rem;
  background: var(--card);
  color: var(--text);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.job-card__header {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.job-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.job-card__tags {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--brand);
  font-size: 0.75rem;
  color: var(--brand);
  background: var(--brand-soft);
}

.job-card__body {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.job-card__body p {
  margin: 0;
}

.job-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.job-card__meta-label {
  font-weight: 600;
  color: #222;
}

.job-card__meta-value {
  color: var(--muted);
}

.job-card__deadline .job-card__meta-label,
.job-card__deadline .job-card__meta-value {
  color: #d32424;
}

.job-card__footer {
  display: flex;
  justify-content: center;
}

.details-button {
  border: 1px solid #000;
  border-radius: 10px;
  padding: 0.55rem 1.4rem;
  cursor: pointer;
  background: #ffffff;
  color: #000000;
  font: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.details-button:hover {
  background: #f2f2f2;
  color: #000000;
}

.apply-button {
  border: 1px solid var(--brand);
  border-radius: 10px;
  padding: 0.6rem 1.8rem;
  cursor: pointer;
  background: var(--brand); /* 青ボタン維持 */
  color: #fff;
  font: inherit;
  transition: background 0.15s, color 0.15s;
}

.apply-button:hover:not(:disabled) {
  background: #0066cc; /* 濃い青に変化 */
  color: #fff;
}

.apply-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.jobs-pagination {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

.jobs-pagination button {
  padding: 0.6rem 0.9rem;
  font-size: 1rem;
}

/* ------------------------------
   旧クラス（後方互換）
------------------------------ */
.job-head,
.job-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.job-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid var(--brand);
}

.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.job-meta {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.6rem 0;
  text-align: center;
}

.job-description {
  margin: 0.6rem 0 0.9rem;
  white-space: pre-wrap;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
}

.tag {
  border-radius: 999px;
  border: 1px solid var(--brand);
  padding: 0.18rem 0.55rem;
  font-size: 0.78rem;
  color: var(--brand);
  background: var(--brand-soft);
}

@media (max-width: 720px) {
  .job-actions {
    align-items: center;
  }

  .job-actions button,
  .apply-button {
    width: auto;
  }

  body[data-page="jobs"] .filters {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
  }

  body[data-page="jobs"] .keyword-filter,
  body[data-page="jobs"] .wage-filter {
    width: min(44vw, 200px);
    min-width: 0;
  }

  body[data-page="jobs"] .keyword-filter {
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
  }

  body[data-page="jobs"] .keyword-row {
    width: 100%;
  }

  body[data-page="jobs"] .keyword-row input {
    flex: 1;
    min-width: 0;
    max-width: none;
    height: 38px;
  }

  body[data-page="jobs"] .keyword-row input::placeholder {
    color: #8a8aa5;
    opacity: 0.9;
  }

  body[data-page="jobs"] .keyword-row button {
    height: 38px;
    padding: 0 0.7rem;
    flex: 0 0 auto;
  }

  body[data-page="jobs"] .wage-filter {
    align-self: auto;
    justify-content: space-between;
    gap: 0.5rem;
  }

  body[data-page="jobs"] .wage-filter > label {
    white-space: nowrap;
  }

  body[data-page="jobs"] .wage-filter > select {
    flex: 1;
    min-width: 0;
    height: 38px;
  }

  .wage-range {
    max-width: 100%;
  }
}

.job-card__deadline {
  color: var(--warn); /* 赤色 */
  font-weight: 600;
}
/* ------------------------------
   時給フィルター
------------------------------ */
.wage-filter {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: auto;
  padding: 0;
  width: auto;
  flex-shrink: 0;
}

.wage-filter > label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
}

.wage-filter > select {
  width: auto;
}

.wage-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: center;
}

.wage-inputs input[type="number"] {
  width: 100px;
  text-align: center;
}

.wage-inputs span {
  color: var(--muted);
}

.wage-range {
  width: 150px;
  position: relative;
  height: 32px;
  display: flex;
  align-items: center;
}

.wage-range::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  z-index: 1;
}

.wage-range-track {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  background: var(--brand);
  border-radius: 3px;
  z-index: 2;
  transition: left 0.1s, width 0.1s;
}

.wage-range input[type="range"] {
  position: absolute;
  width: 100%;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
  margin: 0;
  z-index: 3;
}

.wage-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  pointer-events: all;
  border: 2px solid var(--brand);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s;
}

.wage-range input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.wage-range input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.25);
}

.wage-range input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  pointer-events: all;
  border: 2px solid var(--brand);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s;
}

.wage-range input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.15);
}

.wage-range input[type="range"]::-moz-range-thumb:active {
  transform: scale(1.25);
}

.wage-range input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: transparent;
  border: none;
}

.wage-range input[type="range"]::-moz-range-track {
  width: 100%;
  height: 6px;
  background: transparent;
  border: none;
}

.wage-display {
  font-size: 0.75rem;
  color: var(--text);
  text-align: center;
  font-weight: 500;
  white-space: nowrap;
  min-width: 140px;
}

.job-card__wage {
  color: var(--brand);
  font-weight: 600;
}

/* ===============================
   Jobs List Page (jobs.md)
=============================== */
body[data-page="jobs"] {
  background: #ffffff;
  font-size: 15px;
}

body[data-page="jobs"] .jobs-shell {
  display: grid;
  gap: 20px;
}

body[data-page="jobs"] .jobs-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
  padding: 24px;
  text-align: left;
}

body[data-page="jobs"] .jobs-hero::after {
  content: none;
}

body[data-page="jobs"] .jobs-hero__eyebrow {
  margin: 0 0 10px;
  color: #0e5ab8;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}

body[data-page="jobs"] .jobs-header h2,
body[data-page="jobs"] .jobs-subtitle {
  margin: 0;
  color: var(--text);
}

body[data-page="jobs"] .jobs-header {
  justify-content: flex-start;
  align-items: flex-start;
  flex-direction: column;
  gap: 10px;
}

body[data-page="jobs"] .jobs-header h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

body[data-page="jobs"] .jobs-subtitle {
  max-width: 52ch;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.7;
  color: #555577;
}

body[data-page="jobs"] .jobs-count {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.65rem 1rem;
  border: 1px solid #e5e5e5;
  background: #ffffff;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}

body[data-page="jobs"] .jobs-toolbar {
  border: 1px solid #e5e5e5;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
  padding: 16px 18px;
}

body[data-page="jobs"] .filters {
  gap: 0.9rem 1rem;
  justify-content: flex-start;
}

body[data-page="jobs"] .jobs-filter-label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}

body[data-page="jobs"] .jobs-list {
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  align-items: stretch;
  gap: 1.1rem;
}

body[data-page="jobs"] .job-card-link {
  width: 100%;
  margin: 0;
  transform: translateY(0);
  transition: transform 0.18s ease;
}

body[data-page="jobs"] .job-card-link:hover {
  transform: translateY(-3px);
}

body[data-page="jobs"] .filters label {
  font-size: 0.9rem;
  align-items: start;
  justify-items: start;
  text-align: left;
}

body[data-page="jobs"] input,
body[data-page="jobs"] select {
  font-size: 0.9rem;
  text-align: left;
}

body[data-page="jobs"] .job-card {
  padding: 0;
  gap: 0;
  height: 100%;
  overflow: hidden;
  text-align: left;
  border: 1px solid #e5e5e5;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.06);
}

body[data-page="jobs"] .job-card__eyecatch {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  overflow: hidden;
}

body[data-page="jobs"] .job-card__eyecatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body[data-page="jobs"] .job-card__eyecatch iframe,
body[data-page="jobs"] .job-card__eyecatch video {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  display: block;
}

body[data-page="jobs"] .job-card__eyecatch--placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

body[data-page="jobs"] .job-card__header {
  justify-content: flex-start;
  align-items: flex-start;
  padding: 0.95rem 1rem 0.45rem;
}

body[data-page="jobs"] .job-card__header-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

body[data-page="jobs"] .job-card__category,
body[data-page="jobs"] .job-card__remaining {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.28rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

body[data-page="jobs"] .job-card__category {
  background: #ffffff;
  border: 1px solid rgba(51, 153, 255, 0.28);
  color: #0e5ab8;
}

body[data-page="jobs"] .job-card__remaining {
  background: rgba(211, 36, 36, 0.08);
  color: #d32424;
}

body[data-page="jobs"] .job-card__body {
  justify-content: flex-start;
  gap: 0.45rem;
  padding: 0 1rem 1rem;
  display: grid;
}

body[data-page="jobs"] .job-card__body p {
  width: 100%;
  text-align: left;
  margin: 0;
}

body[data-page="jobs"] .job-card__meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px dashed #dddddd;
}

body[data-page="jobs"] .job-card__meta-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

body[data-page="jobs"] .job-card__meta-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

body[data-page="jobs"] .job-card__meta-value {
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 700;
  text-align: right;
}

body[data-page="jobs"] .job-card__title,
body[data-page="jobs"] .job-title {
  font-size: 1.18rem;
  line-height: 1.3;
  color: var(--text);
}

body[data-page="jobs"] .job-card__tags,
body[data-page="jobs"] .tag,
body[data-page="jobs"] .badge {
  font-size: 0.8rem;
}

body[data-page="jobs"] .job-card__body,
body[data-page="jobs"] .job-meta {
  font-size: 0.9rem;
}

body[data-page="jobs"] .job-card__footer {
  padding: 0 1rem 1rem;
  display: flex;
  justify-content: flex-end;
}

body[data-page="jobs"] .job-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #0e5ab8;
  font-size: 0.88rem;
  font-weight: 700;
}

body[data-page="jobs"] .job-card__cta::after {
  content: "→";
}

body[data-page="jobs"] .details-button,
body[data-page="jobs"] .apply-button {
  font-size: 0.9rem;
  padding: 0.55rem 1.3rem;
}

@media (max-width: 480px) {
  body[data-page="jobs"] {
    font-size: 14px;
  }

  body[data-page="jobs"] .jobs-header {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  body[data-page="jobs"] .jobs-hero {
    padding: 18px;
  }

  body[data-page="jobs"] .jobs-header h2,
  body[data-page="jobs"] .jobs-subtitle {
    margin: 0;
  }

  body[data-page="jobs"] .jobs-header h2 {
    font-size: 1.8rem;
  }

  body[data-page="jobs"] .jobs-subtitle {
    font-size: 0.92rem;
  }

  body[data-page="jobs"] .jobs-count {
    font-size: 0.85rem;
    margin: 0;
    padding: 0.55rem 0.8rem;
  }

  body[data-page="jobs"] .jobs-toolbar {
    padding: 14px;
  }

  body[data-page="jobs"] .jobs-list {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  body[data-page="jobs"] .filters label {
    font-size: 0.8rem;
  }

  body[data-page="jobs"] .filters {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.7rem;
  }

  body[data-page="jobs"] .keyword-filter {
    width: 100%;
  }

  body[data-page="jobs"] .keyword-row {
    width: 100%;
  }

  body[data-page="jobs"] .keyword-row input {
    flex: 1;
    min-width: 0;
    max-width: none;
    height: 36px;
    font-size: 0.8rem;
  }

  body[data-page="jobs"] .keyword-row button {
    height: 36px;
    font-size: 0.8rem;
    padding: 0 0.65rem;
  }

  body[data-page="jobs"] .wage-filter {
    width: 100%;
    flex-direction: row;
    align-self: auto;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  body[data-page="jobs"] .wage-filter > label {
    white-space: nowrap;
  }

  body[data-page="jobs"] .wage-filter > select {
    flex: 1;
    min-width: 0;
    height: 36px;
  }

  body[data-page="jobs"] .wage-range {
    width: 100%;
    height: 28px;
  }

  body[data-page="jobs"] .wage-display {
    font-size: 0.7rem;
    width: 100%;
    min-width: auto;
  }

  body[data-page="jobs"] input,
  body[data-page="jobs"] select {
    font-size: 0.8rem;
  }

  body[data-page="jobs"] .job-card {
    padding: 0;
    gap: 0;
  }

  body[data-page="jobs"] .job-card__header {
    padding: 0.85rem 0.85rem 0.35rem;
  }

  body[data-page="jobs"] .job-card__header-top {
    margin-bottom: 0.45rem;
  }

  body[data-page="jobs"] .job-card__body {
    padding: 0 0.85rem 0.85rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.38rem;
  }

  body[data-page="jobs"] .job-card__footer {
    padding: 0 0.85rem 0.9rem;
  }

  body[data-page="jobs"] .job-card__category,
  body[data-page="jobs"] .job-card__remaining {
    font-size: 0.7rem;
  }

  body[data-page="jobs"] .job-card__title,
  body[data-page="jobs"] .job-title {
    font-size: 1.02rem;
  }

  body[data-page="jobs"] .job-card__tags,
  body[data-page="jobs"] .tag,
  body[data-page="jobs"] .badge {
    font-size: 0.75rem;
  }

  body[data-page="jobs"] .job-card__body,
  body[data-page="jobs"] .job-meta {
    font-size: 0.85rem;
  }

  body[data-page="jobs"] .job-card__meta-label {
    font-size: 0.77rem;
  }

  body[data-page="jobs"] .job-card__meta-value {
    font-size: 0.84rem;
  }

  body[data-page="jobs"] .details-button,
  body[data-page="jobs"] .apply-button {
    font-size: 0.9rem;
    padding: 0.6rem 1.4rem;
  }
}

@media (max-width: 360px) {
  body[data-page="jobs"] {
    font-size: 13px;
  }

  body[data-page="jobs"] .jobs-header {
    flex-direction: column;
    gap: 0.2rem;
  }

  body[data-page="jobs"] .jobs-header h2,
  body[data-page="jobs"] .jobs-subtitle {
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
  }

  body[data-page="jobs"] .filters {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
  }

  body[data-page="jobs"] .filters label {
    font-size: 0.75rem;
  }

  body[data-page="jobs"] .filters > label:not(.keyword-filter) {
    justify-content: center;
  }

  body[data-page="jobs"] .keyword-filter,
  body[data-page="jobs"] .wage-filter {
    width: min(46vw, 160px);
    flex-basis: auto;
    min-width: 0;
  }

  body[data-page="jobs"] .wage-filter {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.2rem;
  }

  body[data-page="jobs"] .wage-range {
    width: 100%;
    height: 26px;
  }

  body[data-page="jobs"] .keyword-row input {
    max-width: 120px;
    height: 34px;
    font-size: 0.75rem;
  }

  body[data-page="jobs"] .keyword-row button {
    height: 34px;
    font-size: 0.75rem;
    padding: 0 0.6rem;
  }

  body[data-page="jobs"] .wage-filter > select {
    height: 34px;
  }

  body[data-page="jobs"] input,
  body[data-page="jobs"] select {
    font-size: 0.75rem;
  }

  body[data-page="jobs"] .job-card__title {
    font-size: 0.95rem;
  }

  body[data-page="jobs"] .job-card__meta-label {
    font-size: 0.75rem;
  }

  body[data-page="jobs"] .job-card__meta-value {
    font-size: 0.78rem;
  }
}

/* ===============================
   Job Detail Page (job.html)
=============================== */
body[data-page="job"] {
  background: #ffffff;
  color: var(--text);
  font-size: 15px;
  overflow-x: hidden;
}

.job-page {
  width: min(1160px, 96vw);
  margin: 28px auto 72px;
  padding: 0 16px;
  max-width: 100%;
  box-sizing: border-box;
  display: grid;
  gap: 24px;
}

.job-thumbnail-wrap {
  width: 100%;
  margin: 0;
}

.job-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid #e5e5e5;
  border-radius: 0;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.06);
}

.job-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.job-thumbnail video,
.job-thumbnail iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #000;
}

.job-thumbnail video {
  object-fit: contain;
}

.job-thumbnail--placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
}

.job-hero {
  display: flex;
}

.job-hero__panel {
  width: 100%;
  border: 1px solid #e5e5e5;
  border-radius: 0;
  padding: 28px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
  text-align: left;
  display: grid;
  align-content: start;
  gap: 18px;
}

.job-kicker {
  margin: 0;
  color: #0e5ab8;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
}

.job-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
  color: var(--text);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.job-hero-summary {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 48ch;
}

.job-highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.job-highlight-card {
  border-radius: 0;
  padding: 14px 16px;
  border: 1px solid #e5e5e5;
  background: #ffffff;
  display: grid;
  gap: 6px;
}

.job-highlight-card__label {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.job-highlight-card__value {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

#job-hero-remaining,
#job-remaining-days {
  color: #d32424;
}

.job-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.job-content {
  display: grid;
  gap: 18px;
}

.job-section-card {
  border: 1px solid #e5e5e5;
  border-radius: 0;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
  padding: 24px;
  text-align: left;
}

.job-section-heading {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.job-section-heading__eyebrow {
  margin: 0;
  color: #0e5ab8;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.job-section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.job-detail-list {
  display: grid;
  gap: 12px;
}

.job-detail-item {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  align-items: start;
  text-align: left;
  color: var(--text);
  font-size: 0.98rem;
  padding: 16px 18px;
  border: 1px solid #e5e5e5;
  border-radius: 0;
  background: #ffffff;
  gap: 16px;
}

.job-detail-label {
  display: inline-flex;
  align-items: center;
  min-height: 1.8em;
  font-weight: 600;
  text-align: left;
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}

.job-detail-item > :not(.job-detail-label) {
  display: block;
  text-align: left;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.75;
  min-width: 0;
}

.job-detail-item span,
.job-detail-item a {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  display: inline;
}

.job-applicants-list {
  white-space: pre-line;
  overflow-wrap: anywhere;
  text-align: left;
}

.job-apply {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 6px 0 0;
}

.job-consent-links {
  width: min(560px, 100%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.policy-link {
  color: var(--brand);
  text-decoration: underline;
  font-size: 14px;
}

.policy-link:hover {
  color: #0066cc;
}

.job-consents {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 12px;
  background: #ffffff;
  display: grid;
  gap: 8px;
}

.job-consent {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  text-align: left;
  font-size: 14px;
  color: #1f2d3d;
}

.job-consent input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.apply-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
}

.apply-confirm-modal.hidden {
  display: none;
}

.apply-confirm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.apply-confirm-modal__panel {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 24px));
  max-height: 90vh;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 16px;
  display: grid;
  gap: 10px;
  text-align: left;
  overflow-y: auto;
}

.apply-confirm-modal__panel h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text);
}

.apply-confirm-modal__text {
  margin: 0;
  color: var(--muted);
}

.apply-confirm-modal__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.apply-confirm-modal__pdf-frame {
  width: 100%;
  height: auto;
  min-height: 400px;
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #f5f5f5;
}

.apply-confirm-modal__pdf-frame iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.back-link {
  color: #0e5ab8;
  text-decoration: none;
  font-weight: 700;
  word-break: break-word;
}

.back-link--button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.78rem 1.3rem;
  border: 1px solid #e5e5e5;
  border-radius: 0;
  background: #ffffff;
}

#apply-button,
#apply-button-bottom {
  border: 1px solid var(--brand);
  border-radius: 10px;
  padding: 0.88rem 1.8rem;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
  min-width: 180px;
  box-shadow: none;
}

#apply-button:hover:not(:disabled),
#apply-button-bottom:hover:not(:disabled) {
  background: #0066cc;
  color: #fff;
}

#apply-button:disabled,
#apply-button-bottom:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

@media (max-width: 768px) {
  body[data-page="job"] {
    font-size: 15px;
  }

  .job-page {
    padding: 0 12px;
    margin: 20px auto 52px;
    gap: 20px;
  }

  .job-hero__panel,
  .job-section-card {
    padding: 20px;
  }

  .job-hero h1 {
    font-size: clamp(1.75rem, 5vw, 2.4rem);
  }

  .job-highlight-grid {
    grid-template-columns: 1fr 1fr;
  }

  .job-detail-item {
    grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
    padding: 14px 16px;
  }

  .job-detail-label {
    font-size: 0.82rem;
  }

  .job-apply {
    gap: 10px;
  }

  .policy-link {
    font-size: 13px;
  }

  .job-consent {
    font-size: 13px;
  }

  #apply-button,
  #apply-button-bottom,
  .back-link--button {
    width: 100%;
    max-width: none;
  }

  .apply-confirm-modal__panel {
    width: min(90vw, 500px);
    padding: 12px;
  }

  .apply-confirm-modal__pdf-frame {
    height: 350px;
  }
}

@media (max-width: 480px) {
  body[data-page="job"] {
    font-size: 14px;
  }

  .job-page {
    padding: 0 10px;
    margin: 14px auto 28px;
    width: 100%;
  }

  .job-thumbnail {
    border-radius: 0;
  }

  .job-hero h1 {
    font-size: clamp(1.6rem, 7vw, 2rem);
  }

  .job-hero__panel,
  .job-section-card {
    padding: 16px;
  }

  .job-highlight-grid {
    grid-template-columns: 1fr;
  }

  .job-detail-item {
    grid-template-columns: 1fr;
    padding: 13px 14px;
    gap: 6px;
  }

  .job-detail-label {
    min-height: auto;
    font-size: 0.78rem;
  }

  .job-apply {
    gap: 10px;
  }

  .job-consent-links {
    gap: 8px;
  }

  .policy-link {
    font-size: 12px;
  }

  .job-consents {
    padding: 10px;
  }

  .job-consent {
    font-size: 12px;
    gap: 7px;
  }

  .back-link {
    font-size: 13px;
  }

  .apply-confirm-modal__panel {
    width: min(95vw, 100%);
    padding: 10px;
  }

  .apply-confirm-modal__pdf-frame {
    height: 300px;
  }
}

@media (max-width: 360px) {
  body[data-page="job"] {
    font-size: 13px;
  }

  .job-page {
    padding: 0 6px;
    margin: 12px auto 20px;
  }

  .job-hero h1 {
    font-size: 1.45rem;
  }

  .job-detail-item {
    padding: 12px;
  }

  .job-detail-label {
    font-size: 0.74rem;
  }

  #apply-button,
  #apply-button-bottom,
  .back-link--button {
    padding: 0.78rem 1rem;
    font-size: 0.95rem;
  }
}

/* ===============================
   Cancel Policy Page
=============================== */
body[data-page="cancel-policy"] .policy-page {
  width: min(980px, 100%);
  margin: 20px auto;
  display: grid;
  gap: 14px;
}

body[data-page="cancel-policy"] .policy-header {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #f9fcff;
}

body[data-page="cancel-policy"] .policy-header h2 {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: clamp(18px, 2.5vw, 24px);
}

body[data-page="cancel-policy"] .policy-header p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

body[data-page="cancel-policy"] .policy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body[data-page="cancel-policy"] .policy-pdf-frame {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
}

body[data-page="cancel-policy"] .policy-pdf-frame iframe {
  width: 100%;
  height: min(78vh, 860px);
  border: 0;
}

/* ------------------------------
   Jobs Mobile Filter Final Override
------------------------------ */
@media (max-width: 720px) {
  body[data-page="jobs"] .filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    column-gap: 0.5rem;
    row-gap: 0.5rem;
    width: 100%;
  }

  body[data-page="jobs"] .keyword-filter {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
  }

  body[data-page="jobs"] .keyword-row {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.4rem;
  }

  body[data-page="jobs"] .keyword-row input {
    flex: 1;
    min-width: 0;
    height: 36px;
  }

  body[data-page="jobs"] .keyword-row button {
    height: 36px;
    padding: 0 0.65rem;
    flex: 0 0 auto;
  }

  body[data-page="jobs"] .wage-filter {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    margin: 0;
    gap: 0.4rem;
  }

  body[data-page="jobs"] .wage-filter > label {
    display: inline-block;
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    padding: 0;
    margin: 0;
    line-height: 1;
    white-space: nowrap;
  }

  body[data-page="jobs"] .wage-filter > select {
    flex: 1;
    min-width: 0;
    height: 36px;
  }
}

@media (max-width: 400px) {
  body[data-page="jobs"] .filters {
    column-gap: 0.35rem;
  }

  body[data-page="jobs"] .keyword-row input,
  body[data-page="jobs"] .keyword-row button,
  body[data-page="jobs"] .wage-filter > select {
    height: 34px;
  }
}
