:root {
  --ink: #202a34;
  --ink-soft: #64707b;
  --paper: #f2f0ec;
  --card: #fffdfa;
  --line: #d8d3ca;
  --line-dark: #a8afb8;
  --green: #475d78;
  --green-dark: #24344d;
  --green-pale: #e1e8f0;
  --blue: #6877a5;
  --blue-pale: #e5e8f4;
  --clay: #c35f4b;
  --clay-pale: #f4e2dc;
  --amber: #d3a345;
  --amber-pale: #f5ebcf;
  --shadow: 0 16px 36px rgb(32 42 52 / 9%);
  font-family: Inter, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
}

a {
  color: var(--green-dark);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.site-header {
  align-items: center;
  background: rgb(246 243 237 / 94%);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 62px;
  padding: 0 4vw;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 800;
  gap: 0.68rem;
  text-decoration: none;
}

.brand-mark {
  align-items: flex-end;
  border: 1px solid var(--green-dark);
  display: flex;
  gap: 2px;
  height: 26px;
  padding: 4px;
  width: 28px;
}

.brand-mark i {
  background: var(--green);
  display: block;
  flex: 1;
}

.brand-mark i:nth-child(1) {
  height: 45%;
}

.brand-mark i:nth-child(2) {
  height: 80%;
}

.brand-mark i:nth-child(3) {
  height: 60%;
}

.site-header nav {
  display: flex;
  gap: 1rem;
}

.site-header nav a {
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 0 4vw 5rem;
}

.hero-shell {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 7vw, 6rem);
  grid-template-columns: minmax(0, 0.92fr) minmax(380px, 1.08fr);
  min-height: 540px;
  padding: 4.6rem 0;
}

.period-label,
.section-kicker {
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.35rem);
  letter-spacing: -0.035em;
  line-height: 1.38;
  margin: 0;
}

h2 {
  font-size: clamp(1.22rem, 2vw, 1.62rem);
  letter-spacing: -0.02em;
  line-height: 1.4;
  margin: 0;
}

h3 {
  font-size: 1rem;
  margin: 0;
}

.lead {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.9;
  margin: 1.15rem 0 0;
  max-width: 34rem;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.hero-facts span {
  align-items: baseline;
  background: var(--card);
  border: 1px solid var(--line);
  display: inline-flex;
  font-size: 0.75rem;
  gap: 0.35rem;
  padding: 0.52rem 0.68rem;
}

.hero-facts b {
  color: var(--green-dark);
  font-size: 0.95rem;
}

.journey-desk {
  align-items: center;
  background: #e2e5e9;
  border: 1px solid #adb5bf;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(130px, 1fr) minmax(90px, 0.75fr) minmax(130px, 1fr);
  min-height: 390px;
  overflow: hidden;
  padding: 4.7rem 2rem 2rem;
  position: relative;
}

.journey-desk::before {
  border: 1px solid #b1b8c0;
  bottom: 16px;
  content: "";
  left: 16px;
  pointer-events: none;
  position: absolute;
  right: 16px;
  top: 16px;
}

.desk-labels {
  display: flex;
  justify-content: space-between;
  left: 2rem;
  position: absolute;
  right: 2rem;
  top: 2rem;
}

.desk-labels span {
  background: var(--green-dark);
  color: white;
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.7rem;
}

.journey-card {
  align-content: start;
  background: var(--card);
  border: 1px solid var(--green-dark);
  box-shadow: 5px 5px 0 rgb(36 52 77 / 11%);
  display: grid;
  gap: 0.55rem;
  min-height: 190px;
  padding: 1rem;
  position: relative;
  z-index: 2;
}

.journey-card::before,
.journey-card::after {
  border-top: 1px solid currentcolor;
  content: "";
  opacity: 0.22;
}

.journey-card small {
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.journey-card strong {
  font-size: 1.34rem;
  font-variant-numeric: tabular-nums;
}

.journey-card span {
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.5;
}

.application-card {
  color: #3f5877;
}

.placement-card {
  color: #8b493c;
}

.placement-card::after {
  border: 3px double var(--clay);
  color: var(--clay);
  content: "確認";
  display: grid;
  font-size: 0.7rem;
  font-weight: 900;
  height: 44px;
  opacity: 1;
  place-items: center;
  position: absolute;
  right: 0.8rem;
  top: 0.8rem;
  transform: rotate(-8deg);
  width: 44px;
}

.journey-track {
  align-items: center;
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(3, 1fr);
  position: relative;
  z-index: 2;
}

.journey-track::before {
  background: var(--green-dark);
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
  top: 12px;
}

.journey-track i {
  background: var(--amber-pale);
  border: 2px solid var(--green-dark);
  height: 24px;
  position: relative;
  width: 24px;
}

.journey-track b {
  background: var(--green-dark);
  color: white;
  font-size: 0.78rem;
  grid-column: 1 / -1;
  justify-self: center;
  padding: 0.38rem 0.55rem;
}

.occupation-picker,
.compare-panel,
.finder {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 1.2rem;
  padding: clamp(1.1rem, 3vw, 1.8rem);
}

.section-heading,
.compare-heading,
.results-heading,
.place-heading,
.compare-title {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}

.section-heading > p,
#occupation-status,
#data-status {
  color: var(--ink-soft);
  font-size: 0.7rem;
  margin: 0;
}

.occupation-controls,
.metric-controls,
.controls {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.1rem;
}

.occupation-controls {
  grid-template-columns: minmax(220px, 2fr) minmax(180px, 1fr);
}

.metric-controls {
  grid-template-columns: repeat(2, minmax(170px, 1fr));
}

.controls {
  grid-template-columns: minmax(230px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr);
}

label {
  display: grid;
  gap: 0.35rem;
}

label > span {
  color: var(--ink-soft);
  font-size: 0.69rem;
  font-weight: 800;
}

input,
select {
  background: white;
  border: 1px solid var(--line-dark);
  color: var(--ink);
  min-height: 42px;
  padding: 0.58rem 0.68rem;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgb(77 104 124 / 28%);
  outline-offset: 2px;
}

button {
  background: var(--green-dark);
  border: 1px solid var(--green-dark);
  color: white;
  font-size: 0.76rem;
  font-weight: 800;
  min-height: 38px;
  padding: 0.58rem 0.78rem;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.occupation-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
  max-height: 350px;
  overflow: auto;
  padding-right: 0.25rem;
}

.occupation-option {
  align-items: flex-start;
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
  display: grid;
  min-height: 91px;
  padding: 0.7rem;
  position: relative;
  text-align: left;
}

.occupation-option > span {
  color: var(--ink-soft);
  font-size: 0.58rem;
  padding-right: 2.8rem;
}

.occupation-option > strong {
  font-size: 0.75rem;
  line-height: 1.45;
  margin-top: 0.28rem;
}

.occupation-option > i {
  color: var(--green);
  font-size: 0.58rem;
  font-style: normal;
  position: absolute;
  right: 0.65rem;
  top: 0.65rem;
}

.occupation-option.is-selected {
  background: var(--green-pale);
  border-color: var(--green-dark);
  box-shadow: inset 4px 0 var(--green-dark);
}

.no-occupations {
  border: 1px dashed var(--line-dark);
  display: grid;
  gap: 0.4rem;
  grid-column: 1 / -1;
  padding: 1.4rem;
  text-align: center;
}

.no-occupations span {
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.compare-actions {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}

.compare-actions > span {
  background: var(--green-pale);
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 850;
  padding: 0.48rem 0.58rem;
}

.metric-note {
  color: var(--ink-soft);
  font-size: 0.73rem;
  line-height: 1.7;
  margin: 0.75rem 0 1rem;
}

.empty-compare {
  background: var(--paper);
  border: 1px dashed var(--line-dark);
  color: var(--ink-soft);
  font-size: 0.8rem;
  padding: 1.35rem;
  text-align: center;
}

.compare-list {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compare-card {
  border: 1px solid var(--line);
  min-width: 0;
  padding: 0.8rem;
}

.compare-title span {
  color: var(--ink-soft);
  display: block;
  font-size: 0.58rem;
}

.compare-title strong {
  font-size: 0.9rem;
}

.compare-title button {
  background: transparent;
  border: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  min-height: 26px;
  padding: 0 0.2rem;
}

.compare-value {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0.25rem;
  margin-top: 0.75rem;
  padding-bottom: 0.65rem;
}

.compare-value span {
  color: var(--ink-soft);
  font-size: 0.59rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-value b {
  color: var(--clay);
  font-size: 0.92rem;
}

.year-strip {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 0.62rem;
}

.year-cell {
  background: var(--paper);
  display: grid;
  gap: 0.18rem;
  padding: 0.38rem 0.22rem;
  text-align: center;
}

.year-cell span {
  color: var(--ink-soft);
  font-size: 0.5rem;
}

.year-cell b {
  font-size: 0.56rem;
  font-variant-numeric: tabular-nums;
}

.year-cell small {
  color: var(--ink-soft);
  font-size: 0.42rem;
  line-height: 1.35;
}

.year-cell.is-current {
  background: var(--blue-pale);
  box-shadow: inset 0 -2px var(--blue);
}

.count-pair {
  display: grid;
  gap: 0.3rem;
  grid-template-columns: repeat(2, 1fr);
  margin: 0.62rem 0 0;
}

.count-pair div {
  min-width: 0;
}

.count-pair dt,
.place-counts dt {
  color: var(--ink-soft);
  font-size: 0.56rem;
}

.count-pair dd,
.place-counts dd {
  font-size: 0.65rem;
  font-weight: 800;
  margin: 0.18rem 0 0;
}

.results-section {
  margin-top: 1.8rem;
}

.results-heading {
  margin-bottom: 0.85rem;
}

.results-heading > div > p,
.results-heading > p {
  color: var(--ink-soft);
  font-size: 0.72rem;
  margin: 0.32rem 0 0;
}

.results-heading b {
  color: var(--ink);
  font-size: 1rem;
}

.place-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.place-card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 7px 18px rgb(39 48 43 / 5%);
  min-width: 0;
  padding: 0.9rem;
}

.place-card.is-over {
  border-color: #d6a093;
  box-shadow: inset 0 3px var(--clay);
}

.place-heading p {
  color: var(--ink-soft);
  font-size: 0.58rem;
  margin: 0 0 0.16rem;
}

.place-heading h3 {
  font-size: 0.96rem;
}

.place-heading > strong {
  color: var(--clay);
  font-size: 0.9rem;
  max-width: 48%;
  text-align: right;
}

.journey-meter {
  background: var(--paper);
  border: 1px solid var(--line);
  height: 25px;
  margin-top: 1rem;
  overflow: hidden;
  position: relative;
}

.journey-meter > span {
  background: var(--blue-pale);
  border-right: 3px solid var(--blue);
  bottom: 0;
  left: 0;
  position: absolute;
  top: 0;
}

.journey-meter > span > i {
  background: var(--blue);
  height: 5px;
  position: absolute;
  right: -4px;
  top: 9px;
  width: 8px;
}

.journey-meter > b {
  color: var(--ink-soft);
  font-size: 0.5rem;
  line-height: 23px;
  position: absolute;
  right: 0.4rem;
  z-index: 2;
}

.journey-meter.is-over {
  border-color: var(--clay);
  box-shadow: inset 3px 0 var(--clay);
}

.journey-meter.is-over > span {
  background: var(--clay-pale);
  border-color: var(--clay);
}

.journey-meter.is-over > span > i {
  background: var(--clay);
}

.journey-meter.is-over > b {
  color: #7e3f34;
  font-weight: 850;
}

.journey-meter.is-missing,
.journey-meter.is-zero {
  align-items: center;
  color: var(--ink-soft);
  display: flex;
  font-size: 0.64rem;
  justify-content: center;
  text-align: center;
}

.ratio-sentence,
.coverage-note {
  color: var(--ink-soft);
  font-size: 0.58rem;
  line-height: 1.5;
  margin: 0.42rem 0 0;
}

.coverage-note {
  border-top: 1px dashed var(--line);
  padding-top: 0.5rem;
}

.place-counts {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, 1fr);
  margin: 0.75rem 0 0;
  padding-top: 0.65rem;
}

.place-counts dd {
  text-align: right;
}

.compare-button {
  margin-top: 0.75rem;
  width: 100%;
}

.compare-button.is-selected {
  background: var(--green-pale);
  color: var(--green-dark);
}

.no-results {
  background: var(--card);
  border: 1px dashed var(--line-dark);
  grid-column: 1 / -1;
  padding: 2rem;
  text-align: center;
}

.no-results > span {
  color: var(--clay);
  font-size: 1.9rem;
  font-weight: 850;
}

.no-results p {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.boundary {
  align-items: center;
  background: var(--clay-pale);
  border: 1px solid #d4aa96;
  display: grid;
  gap: 1rem;
  grid-template-columns: 42px 1fr;
  margin-top: 1.6rem;
  padding: 1rem;
}

.boundary > span {
  align-items: center;
  background: var(--clay);
  color: white;
  display: flex;
  font-weight: 850;
  height: 42px;
  justify-content: center;
}

.boundary strong {
  font-size: 0.84rem;
}

.boundary p {
  color: #684f43;
  font-size: 0.73rem;
  line-height: 1.7;
  margin: 0.28rem 0 0;
}

.text-page {
  max-width: 920px;
  min-height: 70vh;
  padding-top: 4rem;
}

.page-intro {
  margin-bottom: 2rem;
}

.page-intro > p:last-child {
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.8;
  margin: 0.85rem 0 0;
}

.rate-guide {
  margin-bottom: 1rem;
}

.formula-card {
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  padding: 1rem;
}

.formula-card > div {
  display: grid;
  gap: 0.3rem;
}

.formula-card span {
  color: var(--ink-soft);
  font-size: 0.65rem;
}

.formula-card strong {
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.formula-card > b,
.formula-card > i {
  color: var(--ink-soft);
  font-size: 1rem;
  font-style: normal;
}

.formula-card .formula-result {
  background: var(--clay-pale);
  padding: 0.7rem;
}

.guide-grid,
.privacy-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, 1fr);
}

.guide-grid article,
.privacy-grid article,
.note-panel,
.source-grid article,
.source-detail,
.prose-section {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1rem;
}

.guide-grid article > span {
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 800;
}

.guide-grid h2,
.privacy-grid h2 {
  font-size: 0.98rem;
  margin-top: 0.32rem;
}

.guide-grid p,
.privacy-grid p {
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.75;
}

.note-panel,
.source-detail,
.prose-section {
  margin-top: 0.75rem;
}

.note-panel h2,
.prose-section h2 {
  font-size: 1.04rem;
}

.note-panel p,
.prose-section p,
.prose-section li {
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.8;
}

.note-panel a {
  font-size: 0.76rem;
  font-weight: 750;
}

.source-grid {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, 1fr);
}

.source-grid article > span {
  color: var(--clay);
  font-size: 0.68rem;
  font-weight: 850;
}

.source-grid h2 {
  font-size: 1rem;
  margin-top: 0.35rem;
}

.source-grid p,
.source-grid a,
.source-detail dd,
.link-row a {
  font-size: 0.76rem;
  line-height: 1.75;
}

.source-grid p,
.source-detail dd {
  color: var(--ink-soft);
}

.source-detail h2 {
  font-size: 1.04rem;
}

.source-detail dl {
  margin: 0.65rem 0 0;
}

.source-detail dl > div {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 76px 1fr;
  padding: 0.65rem 0;
}

.source-detail dt {
  font-size: 0.68rem;
  font-weight: 850;
}

.source-detail dd {
  margin: 0;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 1rem;
}

footer {
  align-items: center;
  background: var(--green-dark);
  color: white;
  display: flex;
  justify-content: space-between;
  padding: 2rem 4vw;
}

footer strong {
  font-size: 0.87rem;
}

footer p {
  color: #bdc9c3;
  font-size: 0.67rem;
  margin: 0.4rem 0 0;
}

.footer-links {
  display: flex;
  gap: 0.8rem;
}

.footer-links a {
  color: #e5ece8;
  font-size: 0.69rem;
}

@media (max-width: 900px) {
  .hero-shell {
    grid-template-columns: 1fr;
    padding: 3.5rem 0;
  }

  .journey-desk {
    justify-self: center;
    max-width: 680px;
    width: 100%;
  }

  .occupation-grid,
  .place-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compare-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 0 1rem;
  }

  .site-header nav {
    gap: 0.55rem;
  }

  .site-header nav a {
    font-size: 0.67rem;
  }

  main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .journey-desk {
    gap: 0.55rem;
    grid-template-columns: minmax(92px, 1fr) 62px minmax(92px, 1fr);
    min-height: 320px;
    padding: 4.5rem 1.25rem 1.5rem;
  }

  .journey-card {
    min-height: 160px;
    padding: 0.65rem;
  }

  .journey-card strong {
    font-size: 1rem;
  }

  .journey-card span {
    font-size: 0.58rem;
  }

  .placement-card::after {
    height: 34px;
    opacity: 0.72;
    width: 34px;
  }

  .occupation-controls,
  .metric-controls,
  .controls,
  .occupation-grid,
  .place-grid,
  .compare-list,
  .rate-guide,
  .guide-grid,
  .privacy-grid,
  .source-grid {
    grid-template-columns: 1fr;
  }

  .formula-card {
    grid-template-columns: 1fr auto 1fr;
  }

  .formula-card > i,
  .formula-result {
    grid-column: 1 / -1;
    text-align: center;
  }

  .occupation-grid {
    max-height: 390px;
  }

  .compare-heading,
  .results-heading {
    gap: 0.8rem;
  }

  .source-detail dl > div {
    grid-template-columns: 64px 1fr;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }
}
