:root {
  --font-brand:
    "Yu Gothic Medium",
    "Yu Gothic",
    "Hiragino Kaku Gothic ProN",
    Meiryo,
    sans-serif;

  --font-body:
    -apple-system,
    BlinkMacSystemFont,
    "Hiragino Kaku Gothic ProN",
    Meiryo,
    sans-serif;
}

body {
  font-family: var(--font-body);
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.8;
  color: #333;
}

body.menu-open {
  overflow: hidden;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fff;
  z-index: 1000;
  background: #DCE4D0 url("../img/seigaiha.png") repeat;
}

.header img {
  background: transparent;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
}

.menu-toggle {
  display: none;
}

.site-title {
  margin: 0;
  line-height: 1.5;
}

.tel-icon {
  display: none;
}

.nav {
  background: #4A5A3A;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  position: fixed;
  top: 80px;
  left: 0;
  width: 100%;
  height: 65px;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  line-height: 1;
  padding: 0;
  margin: 10px 25px 0;
  color: #fff;
  text-decoration: none;
  position: relative;
}

.nav a i {
  font-size: 0.7rem;
  margin-left: 6px;
}

.nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transition: 0.25s;
  overflow: hidden;
  z-index: 2000;
}

.dropdown a {
  display: block;
  padding: 14px 18px;
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
  margin: 0;
  height: auto;
  background: #fff;
  transition: background 0.2s;
}

.dropdown a:hover {
  background: #F2F5ED url("../img/seigaiha.png") repeat;
  color: #4A5A3A;
  padding-left: 24px;
  border-left: 4px solid #4A5A3A;
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
}

.main {
  max-width: 1000px;
  margin: 50px auto 130px;
  padding: 0 15px;
}

.footer {
  background: #E4E6E3 url("../img/seigaiha.png") repeat;
  padding: 14px 16px;
  font-size: 0.85rem;
  border-top: 1px solid #ddd;
}

.footer img {
  background: transparent;
  margin: 5px 0 15px;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  line-height: 1.4;
}

.footer-copy {
  font-size: 0.7rem;
  color: #777;
  white-space: nowrap;
}

.hero {
  position: relative;
  width: 100%;
  height: 400px;
  margin-top: 145px;
  background: #E4E6E3;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.hero img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.image-wrapper {
  position: relative;
  display: inline-block;
}

.zoom-tip {
  position: absolute;
  top: 10px;
  right: 10px;

  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 20px;

  pointer-events: none;
  z-index: 10;
}

.greeting-inner {
  display: flex;
  gap: 50px;
  margin-top: 20px;
}

.greeting-image {
  flex: 0 0 350px;
}

.greeting-image img {
  width: 100%;
  border-radius: 8px;
}

.greeting-text {
  flex: 1;
  margin-top: 30px;
}

.service-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.service-links a,
.btn-link {
  display: inline-block;
  padding: 10px 18px;
  background: #F2F5ED;
  border: 1px solid #4A5A3A;
  color: #4A5A3A;
  text-decoration: none;
  border-radius: 999px;
  font-weight: bold;
  font-size: 0.98rem;
  transition: 0.2s;
  box-shadow: 0 4px 0 #38452C;
  transition: all 0.15s ease;
}

.service-links a:hover,
.btn-link:hover {
  background: #667A4A;
  color: #fff;
}

.service-links a:active,
.btn-link:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #38452C;
}

.btn-link.mini {
  padding: 6px 18px;
  font-size: 0.8rem;
  background: #F6F1E7;
  color: #8A6A38;
  border: 1px solid #8A6A38;
  box-shadow: 0 4px 0 #6B522C;
}

.btn-link.mini:hover {
  background: #8A6A38;
  color: #fff;
  border-color: #8A6A38;
}

.btn-link.mini:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #6B522C;
}

#build .btn-link {
  margin-top: 18px;
}

.worry-inner {
  display: flex;
  gap: 50px;
  align-items: center;
}

.worry-image {
  flex: 0 0 300px;
}

.worry-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

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

.check-list li {
  position: relative;
  padding-left: 1.6em;
  margin-bottom: 0.8em;
}

.check-list li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #4A5A3A;
  position: absolute;
  left: 0;
}

.etc-note {
  text-align: right;
  margin: -40px 100px 0 0;
}

.worry-note {
  margin-top: 25px;
  padding: 16px;
  text-align: center;
  background: #F2F5ED url("../img/seigaiha.png") repeat;
  color: #4A5A3A;
  font-weight: bold;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 101, 76, 0.1);
}

.company-inner {
  display: flex;
  gap: 50px;
  align-items: center;
}

.company-image {
  flex: 0 0 400px;
}

.company-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.company-text {
  flex: 1;
}

.contact-link {
  text-align: center;
  margin-top: 5rem;
}

.contact-link p {
  font-size: 1.15rem;
  font-weight: bold;
}

.contact-link span {
  display: block;
  margin: 5px auto 20px;
  font-size: 0.98rem;
  font-weight: normal;
}

.preview-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.preview-item {
  position: relative;
}

.preview-item img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ff4d4f;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 14px;
  cursor: pointer;
}

.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.8);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
}

.loading.active {
  display: flex;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #ccc;
  border-top: 4px solid #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

.working-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 420px));
  gap: 15px;
}

.working-item img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
  border-radius: 10px;
}

.working-item p {
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #555;
}

.works-photo {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.works-photo img {
  width: 40%;
  height: auto;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

.photo-item {
  position: relative;
  width: 40%;
}

.photo-item img {
  width: 100%;
}

.content-box {
  position: relative;
  margin: 40px 0;
  padding: 28px;
  background: #f9f9f9;
  border-left: 6px solid #4A5A3A;
  border-radius: 10px;
  scroll-margin-top: 160px;

  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.content-box h3 {
  margin-bottom: 12px;
  color: #4A5A3A;
}

.content-box p {
  margin: 0;
  line-height: 1.9;
}

/* flowページのみ矢印表示 */
.flow-page .content-box::after {
  content: "▼";
  position: absolute;
  left: 50%;
  bottom: -28px;
  transform: translateX(-50%);
  color: #4A5A3A;
  font-size: 1.2rem;
}

.flow-page .content-box:last-of-type::after {
  display: none;
}

.case-block {
  margin-top: 30px;
}

.case-title {
  font-size: 18px;
  margin-bottom: 15px;
  color: #3c3c3c;
}

.case-problem {
  margin-bottom: 15px;
}

.case-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  overflow: visible;
}

.case-item {
  position: relative;
  text-align: center;
  overflow: visible;
}

.case-item img {
  width: 100%;
  height: 220px;
  cursor: zoom-in;
  display: block;
  border-radius: 10px;
  object-fit: cover;
}

.case-item span {
  display: block;
  font-size: 12px;
  margin-top: 5px;
}

/* 矢印 */
.case-item.arrow::after {
  content: "";
  position: absolute;
  right: -25px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  background: no-repeat center / contain url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>\
<polygon points='8,5 18,12 8,19' fill='%234A5A3A'/>\
</svg>");
}

.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.25s;
  z-index: 99999;
  cursor: zoom-out;
}

.image-modal.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.image-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  transform: scale(0.92);
  transition: 0.25s;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.company-table th,
.company-table td {
  border: 1px solid #ddd;
  padding: 10px;
  vertical-align: top;
}

.company-table th {
  width: 25%;
  background: #f5f5f5;
  text-align: left;
}

.map {
  margin: 1rem;
}

.map iframe {
  width: 100%;
  height: 400px;
  border-radius: 8px;
}

.parking-info {
  margin-top: 12px;
  padding: 12px 16px;
  background: #F2F5ED url("../img/seigaiha.png") repeat;
  border-left: 10px solid #4A5A3A;
  font-weight: bold;
  color: #4A5A3A;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 3px;
}

.parking-info i {
  font-size: 1.2rem;
}

.btn-link-center {
  margin-top: 20px;
  text-align: center;
}

.contact-form p {
  margin: 0 0 30px;
}

.contact-form label {
  font-size: 1.2rem;
}

.contact-form input,
.contact-form textarea {
  font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #4A5A3A;
  box-shadow: 0 0 0 2px rgba(0, 101, 76, 0.2);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #aaa;
}

.contact-form input:focus::placeholder,
.contact-form textarea:focus::placeholder {
  color: #ccc;
}

.required::after {
  content: "必須";
  background-color: #d2691e;
  color: #fff;
  font-size: 15px;
  min-width: 10px;
  padding: 4px 7px 2.5px;
  font-weight: normal;
  margin: 0 10px 3px;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
  text-align: center;
  border-radius: 8px;
  display: inline-block;
}

#greeting,
#flow,
#profile {
  margin-top: 80px;
}

section {
  margin: 100px 10px 0;
  scroll-margin-top: 160px; /* ヘッダー高さ分 */
}

h2 {
  font-weight: bold;
  margin: 0;
  position: relative;
  display: inline-block;
}

h3 {
  font-weight: bold;
  margin: 0;
  position: relative;
  display: inline-block;
  font-size: 1.3rem;
}

textarea {
  width: 100%;
  min-height: 200px;
  max-width: 100%;
  box-sizing: border-box;
}

label {
  font-weight: bold;
}

input {
  width: 100%;
  max-width: 400px;
  padding: 8px;
  box-sizing: border-box;
}

img {
  display: block;
  background-color: #f5f5f5;
}

.sp-text {
  display: none;
}

/* フォント調整 */
.footer {
  font-family: var(--font-brand);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .pc-text {
    display: none;
  }

  .sp-text {
    display: inline;
  }

  section {
    margin: 50px 10px 0;
  }

  .header {
    background: #4A5A3A url("../img/seigaiha_sp.png") repeat;
  }

  .header-inner {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
  }

  .site-title {
    width: 220px;
  }

  .site-title img {
    width: 100%;
    height: auto;
    display: block;
  }

  .menu-toggle {
    top: 13px;
    left: 13px;
    border: none;
    border-radius: 8px;
    font-size: 1.4rem;
    cursor: pointer;
  }

  .tel-label {
    display: none;
  }

  .tel-icon {
    top: 13px;
    right: 13px;
    border-radius: 8px;
    font-size: 1.2rem;
    text-decoration: none;
  }

  .menu-toggle,
  .tel-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    width: 28px;
    height: 28px;
    z-index: 3000;
    color: #fff;
    background: transparent;
  }

  .menu-toggle i,
  .tel-icon i {
    line-height: 1;
    position: relative;
  }

  .nav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    padding-top: 70px;
    background: #4A5A3A url("../img/seigaiha_sp.png") repeat;
    display: block;
    transition: left .3s ease;
    z-index: 2000;
    overflow-y: auto;
  }

  .nav.open {
    left: 0;
  }

  .nav-item {
    display: block;
    height: auto;
  }

  .nav-item > a {
    display: block;
    padding: 16px 20px;
    margin: 0;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.15);
  }

  .dropdown {
    display: none;
    position: static;
    transform: none;
    min-width: auto;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border-radius: 0;
    overflow: hidden;
  }

  .nav-item.open .dropdown {
    display: block;
  }

  .dropdown a {
    display: block;
    margin: 0;
    padding: 12px 20px 12px 40px;
    height: auto;
    background: #4A5A3A url("../img/seigaiha_sp.png") repeat;
    color: #fff;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  .dropdown a:hover {
    background: #F2F5ED;
    color: #4A5A3A;
    padding-left: 40px;
    border-left: none;
  }

  .has-submenu i {
    float: right;
    margin-top: 2px;
    transition: transform .3s;
  }

  .has-submenu.open i {
    transform: rotate(180deg);
  }

  .menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    z-index: 1500;
  }

  .menu-overlay.show {
    opacity: 1;
    visibility: visible;
  }

  .hero {
    height: 180px;
    margin-top: 55px;
    margin-bottom: -30px;
  }

  .hero img {
    height: 100%;
    width: 100%;
    object-fit: cover;
  }

  .main {
    margin: 0 0 80px;
  }

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

  .footer-inner img {
    width: 300px;
  }

  .footer-copy {
    margin-top: 10px;
  }

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

  .greeting-image {
    width: 100%;
    max-width: 200px;
    flex: none;
    margin: 0 auto -50px;
  }

  .service-links {
    margin-bottom: 60px;
  }

  .worry-inner {
    flex-direction: column;
    text-align: left;
  }

  .worry-image {
    width: 100%;
    max-width: 200px;
    flex: none;
    margin: 30px auto -20px;
  }

  .check-list {
    padding: 0;
  }

  .check-list li {
    margin-bottom: 0.1em;
  }

  .etc-note {
    margin: 5px 0 0;
  }

  .photo-item {
    width: 100%;
  }

  .company-inner {
    flex-direction: column;
    margin-bottom: -200px;
  }

  .company-image {
    width: 100%;
    max-width: 320px;
    margin-top: -30px
  }

  .contact-link span {
    font-size: 0.9rem;
  }

  .map iframe {
    height: 300px;
  }

  .works-photo {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  .works-photo img {
    width: 100%;
  }

  .case-images {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 5px;
  }

  .case-item span {
    margin: 2px 0 0;
  }

  .case-item.arrow::after {
    display: none;
  }

  .case-item.arrow {
    position: relative;
  }

  .case-item.arrow::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -30px;
    transform: translateX(-50%);
    width: 38px;
    height: 38px;
    z-index: 10;
    background: no-repeat center / contain url("data:image/svg+xml;utf8,\
  <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'>\
  <polygon points='5,8 12,18 19,8' fill='%234A5A3A'/>\
  </svg>");
  }

  .case-title {
    margin: 0 0 3px;
  }

  .case-problem {
    margin: 0 0 10px;
  }

  .contact-form input:focus,
  .contact-form textarea:focus {
    outline: none;
    border-color: #4A5A3A;
    box-shadow: 0 0 0 1.5px rgba(0, 101, 76, 0.25);
  }
  
  .working-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .working-item img {
    height: 240px;
    object-fit: cover;
  }

  .working-item p {
    margin-bottom: 0;
    line-height: 1;
  }

  .service-page .hero,
  .works-page .hero,
  .contact-page .hero {
    margin-bottom: 50px;
  }
}
