:root {
  --navy: #16324f;
  --blue: #2d6f8f;
  --green: #5b7c62;
  --ink: #1d2730;
  --muted: #5f6d78;
  --line: #d8e0e6;
  --bg: #f4f7f8;
  --soft: #e8f0ef;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(22, 50, 79, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.8;
  background: var(--white);
}

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

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 300px;
}

.brand-main,
.brand-sub {
  display: block;
}

.brand-main {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.08rem;
  line-height: 1.35;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.94rem;
  white-space: nowrap;
}

.nav a {
  padding: 8px 0;
}

.nav-contact {
  color: var(--navy);
  font-weight: 700;
}

.section {
  padding: 88px 0;
}

section[id],
main[id] {
  scroll-margin-top: 104px;
}

.hero {
  padding-top: 72px;
  background:
    linear-gradient(110deg, rgba(22, 50, 79, 0.92), rgba(45, 111, 143, 0.78)),
    linear-gradient(0deg, #e8f0ef, #e8f0ef);
  color: var(--white);
}

.hero-grid,
.two-column,
.access-grid,
.contact-grid,
.policy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-copy h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(2.15rem, 3.4vw, 3.45rem);
  line-height: 1.28;
  letter-spacing: 0;
  word-break: keep-all;
  line-break: strict;
}

.hero-title-line {
  display: block;
  white-space: nowrap;
}

.no-break {
  white-space: nowrap;
}

.lead {
  margin: 24px 0 0;
  max-width: 680px;
  font-size: 1.08rem;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 700;
}

.hero .eyebrow {
  color: #cde5de;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 12px 22px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
}

.button.primary {
  background: var(--green);
  color: var(--white);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.38);
}

.hero-visual {
  min-height: 390px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.hero-visual img {
  display: block;
  width: 100%;
  max-width: 620px;
  height: auto;
  border-radius: 8px;
}

h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.45rem, 1.85vw, 1.9rem);
  line-height: 1.6;
  letter-spacing: 0;
  word-break: keep-all;
  line-break: strict;
}

h3 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 1.16rem;
  line-height: 1.5;
}

p {
  margin: 0;
}

.text-block p + p,
.contact-grid p + p {
  margin-top: 18px;
}

.about,
.fees,
.cases,
.policy {
  background: var(--bg);
}

.principle-box {
  margin-top: 34px;
  padding: 26px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(22, 50, 79, 0.06);
}

.principle-box p {
  color: var(--muted);
}

.section-heading {
  max-width: 960px;
  margin-bottom: 34px;
}

.section-heading p:not(.eyebrow) {
  margin-top: 12px;
  color: var(--muted);
}

.service-grid,
.fee-layout,
.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.service-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 28px;
  box-shadow: 0 8px 28px rgba(22, 50, 79, 0.06);
}

.card-links {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.card-links a {
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 700;
}

.card-links a::after {
  content: " →";
}

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 22px;
  margin-top: 8px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.82em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.note {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.93rem;
}

.strong-note {
  color: var(--navy);
  font-weight: 700;
}

.quiet-note {
  font-size: 0.86rem;
}

.fee-pending {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--navy);
  font-weight: 700;
}

.notice-box {
  margin-top: 24px;
  padding: 26px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: var(--soft);
}

.temporary-table {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(180px, 1.2fr);
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.temporary-table div {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}

.temporary-table div:nth-child(1),
.temporary-table div:nth-child(2) {
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
}

.temporary-table div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.fee-table,
.info-table {
  width: 100%;
  border-collapse: collapse;
  overflow-wrap: break-word;
  word-break: normal;
}

.fee-table th,
.fee-table td,
.info-table th,
.info-table td {
  border: 1px solid var(--line);
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
}

.fee-table th {
  background: var(--navy);
  color: var(--white);
}

.info-table th {
  width: 250px;
  background: #eef3f4;
  color: var(--navy);
}

.center-note {
  text-align: center;
}

.flow-list {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-list li {
  min-height: 150px;
  padding: 18px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-weight: 700;
}

.flow-list span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 0.88rem;
}

.case-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.case-grid div {
  min-height: 92px;
  display: flex;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-weight: 700;
}

.info-table-wrap {
  overflow-x: auto;
}

.contact-policy {
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--navy);
  font-weight: 700;
}

.access-grid {
  align-items: start;
}

.access-media {
  display: grid;
  gap: 18px;
}

.office-photo {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 8px 28px rgba(22, 50, 79, 0.06);
}

.office-photo img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: 70% 46%;
  transform: scale(1.55);
  transform-origin: 70% 46%;
}

.office-photo figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.map-placeholder {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed var(--blue);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(45, 111, 143, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(45, 111, 143, 0.08) 1px, transparent 1px),
    #f8fbfb;
  background-size: 32px 32px;
  color: var(--navy);
  text-align: center;
  font-weight: 700;
}

.map-embed {
  min-height: 0;
  height: 320px;
  padding: 0;
  border-style: solid;
  background: var(--white);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-placeholder small {
  color: var(--muted);
  font-weight: 400;
}

.contact-grid {
  align-items: start;
}

.contact-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.form-row {
  margin-bottom: 16px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #c8d3da;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
  background: var(--white);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(45, 111, 143, 0.18);
  border-color: var(--blue);
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0 18px;
}

.consent input {
  width: 18px;
  min-height: 18px;
  margin-top: 6px;
}

.form-button {
  width: 100%;
}

.form-status {
  display: none;
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--navy);
  font-weight: 700;
}

.form-status.is-visible {
  display: block;
}

.policy-grid {
  align-items: start;
}

.policy article {
  border-top: 3px solid var(--green);
  padding-top: 18px;
}

.policy article p + p {
  margin-top: 14px;
}

.subpage-hero {
  padding-top: 54px;
}

.subpage h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.2rem);
  line-height: 1.35;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.38fr);
  gap: 42px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 24px;
}

.detail-main h2 {
  font-size: clamp(1.3rem, 1.7vw, 1.72rem);
}

.detail-main p {
  color: var(--muted);
}

.detail-side {
  position: sticky;
  top: 112px;
}

.compact-flow {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-footer {
  padding: 28px 0;
  background: var(--navy);
  color: var(--white);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero-grid,
  .two-column,
  .access-grid,
  .contact-grid,
  .policy-grid,
  .detail-layout,
  .fee-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }

  .service-grid.three,
  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  html {
    scroll-padding-top: 132px;
  }

  section[id],
  main[id] {
    scroll-margin-top: 132px;
  }

  .container {
    width: min(100% - 28px, 1120px);
  }

  .section {
    padding: 58px 0;
  }

  .hero {
    padding-top: 48px;
  }

  .brand {
    min-width: 0;
  }

  .brand-main {
    font-size: 0.95rem;
  }

  .brand-sub {
    font-size: 0.72rem;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .hero-copy h1 {
    font-size: clamp(1.72rem, 8vw, 2.05rem);
    line-height: 1.34;
  }

  .hero-title-line {
    display: block;
  }

  h2 {
    font-size: 1.38rem;
    word-break: normal;
    overflow-wrap: normal;
  }

  .no-break {
    white-space: normal;
  }

  .hero-visual {
    min-height: 270px;
    padding: 12px;
  }

  .office-photo img {
    height: 240px;
    object-position: 70% 46%;
  }

  .map-embed {
    height: 260px;
  }

  .service-grid,
  .service-grid.three,
  .case-grid,
  .compact-flow,
  .flow-list {
    grid-template-columns: 1fr;
  }

  .card,
  .contact-form {
    padding: 22px;
  }

  .temporary-table,
  .fee-table,
  .info-table {
    font-size: 0.92rem;
  }

  .temporary-table {
    grid-template-columns: 1fr;
  }

  .temporary-table div:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .info-table th,
  .info-table td {
    display: block;
    width: 100%;
  }

  .info-table td {
    border-top: 0;
  }

  .footer-inner {
    flex-direction: column;
  }
}
