:root {
  --background: #F5F7FA;
  --surface: #FFFFFF;
  --navy: #1B3A5C;
  --accent: #2F6FED;
  --text: #1A2733;
  --muted: #5A6B7B;
  --tag-background: #EAF1FB;
  --success: #1E9E6A;
  --danger: #C63D4E;
  --border: #DCE3EB;
  --radius: 12px;
  --shadow: 0 5px 18px rgba(27, 58, 92, 0.07);
  --shadow-hover: 0 12px 28px rgba(27, 58, 92, 0.13);
  --font: "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  --transition: 0.15s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

button,
select,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

[hidden] {
  display: none !important;
}

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

.site-header {
  position: relative;
  z-index: 20;
  height: 70px;
  background: var(--surface);
  border-bottom: 1px solid rgba(220, 227, 235, 0.75);
}

.header-inner,
.hero-inner,
.content-shell,
.page-shell,
.form-shell,
.footer-inner {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--navy);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.logo-mark {
  width: 15px;
  height: 15px;
  background: var(--accent);
  border-radius: 3px;
  box-shadow: 6px 6px 0 rgba(47, 111, 237, 0.18);
  transform: rotate(45deg);
}

.demo-label {
  padding: 5px 12px;
  color: var(--muted);
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 64px;
  background: var(--navy);
  color: #fff;
}

.hero::before,
.hero::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.hero::before {
  top: -160px;
  right: -80px;
  width: 430px;
  height: 430px;
}

.hero::after {
  right: 160px;
  bottom: -250px;
  width: 390px;
  height: 390px;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  margin: 0 0 7px;
  color: #AFCBFF;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.hero h1 {
  margin: 0 0 30px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.4;
  letter-spacing: 0.03em;
}

.mobile-break {
  display: none;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 1px minmax(180px, 0.45fr) auto;
  align-items: center;
  max-width: 950px;
  padding: 7px;
  background: var(--surface);
  border-radius: 999px;
  box-shadow: 0 14px 36px rgba(5, 22, 39, 0.23);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 18px;
  color: var(--muted);
}

.search-field svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.search-field input,
.search-field select {
  width: 100%;
  height: 46px;
  padding: 0;
  background: transparent;
  border: 0;
  outline: 0;
}

.search-field input::placeholder {
  color: #8795A3;
}

.search-field select {
  cursor: pointer;
}

.search-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 700;
  line-height: 1.4;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.button-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 5px 14px rgba(47, 111, 237, 0.24);
}

.button-primary:hover {
  background: #245FD3;
  box-shadow: 0 8px 18px rgba(47, 111, 237, 0.32);
  transform: translateY(-1px);
}

.button-outline {
  color: var(--accent);
  background: var(--surface);
  border-color: var(--accent);
}

.button-outline:hover {
  background: var(--tag-background);
}

.search-button {
  min-width: 132px;
  height: 50px;
  border-radius: 999px;
}

.content-shell {
  padding-top: 40px;
  padding-bottom: 80px;
  scroll-margin-top: 16px;
}

.search-layout {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.filter-toggle {
  display: none;
}

.filter-panel {
  position: sticky;
  top: 24px;
  padding: 24px 22px;
  background: var(--surface);
  border: 1px solid rgba(220, 227, 235, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.filter-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.filter-heading-row h2 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
}

.text-button {
  padding: 3px 0;
  color: var(--accent);
  background: none;
  border: 0;
  font-size: 12px;
  font-weight: 700;
}

.text-button:hover {
  text-decoration: underline;
}

.filter-group {
  margin: 0;
  padding: 22px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
}

.filter-group:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.filter-group legend,
.filter-label {
  display: block;
  margin-bottom: 12px;
  padding: 0;
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
}

.checkbox-list {
  display: grid;
  gap: 9px;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #3E4D5B;
  cursor: pointer;
  font-size: 14px;
}

.check-label input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent);
}

.filter-select,
.sort-control select {
  width: 100%;
  height: 42px;
  padding: 0 34px 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  cursor: pointer;
}

.filter-select:focus,
.sort-control select:focus,
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  margin-bottom: 18px;
}

.result-count {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.result-count strong {
  margin-right: 4px;
  color: var(--navy);
  font-size: 18px;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.sort-control select {
  width: 160px;
}

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

.job-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  background: var(--surface);
  border: 1px solid rgba(220, 227, 235, 0.82);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.job-card:hover {
  border-color: #C8D6E6;
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 15px 18px 0;
}

.posted-label {
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
}

.favorite-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #82909E;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

.favorite-button svg {
  width: 18px;
  height: 18px;
}

.favorite-button:hover {
  color: #D04D66;
  background: #FFF2F4;
  transform: scale(1.06);
}

.favorite-button.is-favorite {
  color: #D04D66;
  background: #FFF2F4;
  border-color: #F2C7CF;
}

.favorite-button.is-favorite svg {
  fill: currentColor;
}

.job-card-link {
  display: flex;
  flex-direction: column;
  min-height: 270px;
  padding: 6px 20px 20px;
}

.job-card h3 {
  margin: 5px 0 15px;
  color: var(--navy);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: 0.01em;
}

.company-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.company-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff;
  background: var(--avatar-color);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 16px 0 13px;
  color: var(--muted);
  font-size: 13px;
}

.job-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.job-meta svg {
  width: 15px;
  height: 15px;
}

.job-meta .salary {
  color: var(--navy);
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 2px 9px;
  color: #315B88;
  background: var(--tag-background);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.detail-link {
  align-self: flex-end;
  margin-top: auto;
  padding-top: 16px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 70px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  color: var(--accent);
  background: var(--tag-background);
  border-radius: 50%;
}

.empty-icon svg {
  width: 27px;
  height: 27px;
}

.empty-state h3 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 19px;
}

.empty-state p {
  margin: 0 0 22px;
  color: var(--muted);
}

.page-shell,
.form-shell {
  max-width: 900px;
  padding-top: 38px;
  padding-bottom: 80px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.back-link:hover {
  text-decoration: underline;
}

.detail-card,
.apply-card,
.success-card {
  padding: clamp(28px, 5vw, 52px);
  background: var(--surface);
  border: 1px solid rgba(220, 227, 235, 0.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.category-label {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.detail-header h1,
.apply-heading h1,
.success-card h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.45;
  letter-spacing: 0.02em;
}

.detail-company {
  margin-top: 18px;
  color: var(--text);
  font-size: 15px;
}

.company-avatar-large {
  width: 40px;
  height: 40px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 32px 0 18px;
  padding: 20px 0;
  background: var(--background);
  border-radius: 10px;
}

.summary-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 24px;
  border-right: 1px solid var(--border);
}

.summary-grid > div:last-child {
  border-right: 0;
}

.summary-grid span {
  color: var(--muted);
  font-size: 12px;
}

.summary-grid strong {
  color: var(--navy);
  font-size: 16px;
}

.detail-tags {
  margin-bottom: 35px;
}

.detail-section {
  padding: 30px 0;
  border-top: 1px solid var(--border);
}

.detail-section h2 {
  position: relative;
  margin: 0 0 16px;
  padding-left: 14px;
  color: var(--navy);
  font-size: 19px;
}

.detail-section h2::before {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  width: 4px;
  content: "";
  background: var(--accent);
  border-radius: 4px;
}

.detail-section p {
  margin: 0;
  color: #3D4B58;
  line-height: 2;
}

.detail-section ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.detail-section li {
  position: relative;
  padding-left: 24px;
}

.detail-section li::before {
  position: absolute;
  top: 0;
  left: 2px;
  color: var(--success);
  content: "✓";
  font-weight: 800;
}

.apply-area {
  padding-top: 30px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.apply-button {
  min-width: min(100%, 340px);
  min-height: 58px;
  font-size: 16px;
}

.apply-area p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.mobile-apply-bar {
  display: none;
}

.form-shell {
  max-width: 760px;
}

.apply-heading {
  padding-bottom: 27px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.apply-heading h1 {
  font-size: clamp(22px, 3.4vw, 29px);
}

.apply-heading p {
  margin: 9px 0 0;
  color: var(--muted);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--navy);
  font-weight: 700;
}

.required {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  color: #fff;
  background: var(--danger);
  border-radius: 4px;
  font-size: 10px;
  vertical-align: 2px;
}

.form-group input,
.form-group textarea {
  display: block;
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid #C9D3DE;
  border-radius: 8px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input {
  height: 50px;
}

.form-group textarea {
  resize: vertical;
  line-height: 1.7;
}

.form-group .has-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(198, 61, 78, 0.1);
}

.field-error {
  min-height: 21px;
  margin: 3px 0 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

.demo-note {
  margin: 4px 0 22px;
  padding: 11px 14px;
  color: var(--muted);
  background: var(--background);
  border-radius: 7px;
  font-size: 12px;
}

.submit-button {
  width: 100%;
  min-height: 56px;
}

.success-card {
  padding-top: 75px;
  padding-bottom: 75px;
  text-align: center;
}

.success-icon {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 23px;
  color: #fff;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(30, 158, 106, 0.23);
}

.success-icon svg {
  width: 40px;
  height: 40px;
  stroke-width: 2.2;
}

.success-eyebrow {
  margin: 0 0 5px !important;
  color: var(--success) !important;
  font-size: 11px !important;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.success-card p {
  margin: 16px 0 28px;
  color: var(--muted);
}

.success-card p strong {
  color: var(--text);
}

.site-footer {
  padding: 35px 0;
  color: #D5DFE9;
  background: #142F4B;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.logo-footer {
  color: #fff;
  font-size: 17px;
}

.footer-inner p {
  margin: 0;
  font-size: 12px;
}

.footer-inner small {
  justify-self: end;
  color: #9DB0C3;
  font-size: 11px;
}

@media (max-width: 959px) {
  .search-layout {
    display: block;
  }

  .filter-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    margin-bottom: 18px;
    color: var(--navy);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 9px;
    font-weight: 700;
  }

  .filter-toggle svg {
    width: 20px;
    height: 20px;
  }

  .filter-count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    color: #fff;
    background: var(--accent);
    border-radius: 999px;
    font-size: 11px;
  }

  .filter-panel {
    position: static;
    display: none;
    margin-bottom: 22px;
  }

  .filter-panel.is-open {
    display: block;
  }

  #filter-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .filter-group,
  .filter-group:last-child {
    padding: 20px 0 0;
    border-bottom: 0;
  }

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

  .job-card-link {
    min-height: 245px;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 14px;
  }

  .header-inner,
  .hero-inner,
  .content-shell,
  .page-shell,
  .form-shell,
  .footer-inner {
    width: min(100% - 28px, 1160px);
  }

  .site-header {
    height: 62px;
  }

  .logo {
    gap: 9px;
    font-size: 18px;
  }

  .logo-mark {
    width: 13px;
    height: 13px;
  }

  .demo-label {
    display: none;
  }

  .hero {
    padding: 39px 0 43px;
  }

  .hero h1 {
    margin-bottom: 24px;
    font-size: 29px;
  }

  .mobile-break {
    display: block;
  }

  .search-panel {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 8px;
    border-radius: var(--radius);
  }

  .search-field {
    padding: 0 12px;
  }

  .search-field input,
  .search-field select {
    height: 47px;
  }

  .search-divider {
    width: calc(100% - 24px);
    height: 1px;
    margin: 0 auto;
  }

  .search-button {
    width: 100%;
    margin-top: 5px;
    border-radius: 8px;
  }

  .content-shell {
    padding-top: 25px;
    padding-bottom: 55px;
  }

  #filter-controls {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .filter-group,
  .filter-group:last-child {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
  }

  .filter-group:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .results-toolbar {
    align-items: flex-end;
  }

  .result-count strong {
    display: block;
    line-height: 1.3;
  }

  .sort-control {
    display: block;
  }

  .sort-control span {
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
  }

  .sort-control select {
    width: 142px;
    height: 40px;
  }

  .job-card-link {
    min-height: 265px;
  }

  .page-shell,
  .form-shell {
    padding-top: 24px;
    padding-bottom: 55px;
  }

  .detail-card,
  .apply-card {
    padding: 25px 20px;
  }

  .detail-header {
    display: block;
  }

  .detail-header > .posted-label {
    display: inline-block;
    margin-top: 16px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 5px 18px;
  }

  .summary-grid > div {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .summary-grid > div:last-child {
    border-bottom: 0;
  }

  .apply-area {
    display: none;
  }

  .mobile-apply-bar {
    position: fixed;
    z-index: 50;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    padding: 10px 14px max(10px, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 20px rgba(27, 58, 92, 0.1);
    backdrop-filter: blur(8px);
  }

  .mobile-apply-bar .apply-button {
    width: 100%;
    min-height: 52px;
  }

  body.has-mobile-apply .site-footer {
    margin-bottom: 73px;
  }

  .success-card {
    padding: 55px 20px;
  }

  .success-icon {
    width: 68px;
    height: 68px;
  }

  .footer-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .footer-inner small {
    align-self: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
