.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}

.btn.secondary {
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--border);
}

.btn.ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--border);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 10px 28px rgba(18, 63, 73, 0.06);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(23, 79, 93, 0.1);
  color: var(--brand);
  font-weight: 900;
}

.service-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 12px;
}

.service-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.service-card.is-open {
  grid-column: 1 / -1;
}

.service-card.is-open .btn {
  margin-top: 0;
}

.service-detail {
  width: 100%;
  margin-top: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.service-detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, 0.9fr);
  gap: 26px;
  align-items: start;
}

.service-detail-layout.no-side-media {
  grid-template-columns: minmax(0, 760px);
}

.service-detail-copy {
  max-width: 760px;
}

.service-detail-body {
  max-width: 66ch;
  overflow-wrap: anywhere;
  white-space: normal;
}

.service-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 22px 22px 22px 56px;
  box-shadow: 0 14px 34px rgba(18, 63, 73, 0.12);
}

.form {
  display: grid;
  gap: 14px;
}

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

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 13px 15px;
  background: #fff;
  color: var(--ink);
}

.textarea {
  min-height: 140px;
  resize: vertical;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow);
}

.chat-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 110;
}

.chat-launch {
  box-shadow: var(--shadow);
}

.chat-launch-icon {
  position: relative;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.chat-launch-icon::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -4px;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 0 0 7px 0;
  transform: rotate(18deg);
}

.chat-panel {
  width: min(390px, calc(100vw - 32px));
  max-height: min(640px, calc(100svh - 42px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-header {
  background: var(--brand);
  color: #fff;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.chat-header div {
  min-width: 0;
}

.chat-header span {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
}

.chat-body {
  padding: 16px;
  display: grid;
  gap: 12px;
  overflow: auto;
}

.chat-agreement {
  display: grid;
  gap: 10px;
}

.chat-agreement p,
.chat-agreement li {
  color: var(--muted);
}

.chat-agreement ul {
  margin: 0;
  padding-left: 18px;
}

.chat-agreement-proof {
  padding: 12px 14px;
  border: 1px solid rgba(217, 183, 95, 0.34);
  border-radius: 16px;
  background: rgba(217, 183, 95, 0.11);
}

.chat-agreement-notice {
  margin: 0;
  color: var(--danger);
  font-weight: 800;
}

.chat-agreement-actions,
.chat-compose-form {
  display: grid;
  gap: 10px;
}

.chat-message-list {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
  padding-right: 3px;
}

.chat-message {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: #eef5f6;
  overflow-wrap: anywhere;
}

.chat-message-staff {
  background: rgba(23, 79, 93, 0.12);
}

.sns-links,
.contact-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.sns-links a,
.contact-method {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.contact-method {
  flex-direction: column;
  align-items: flex-start;
  min-width: 170px;
  border-radius: 18px;
  background: #fff;
}

.contact-method span {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 680px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .toast {
    left: 14px;
    right: 14px;
    bottom: 14px;
    max-width: none;
  }

  .chat-widget {
    right: 14px;
    bottom: 14px;
    max-width: calc(100vw - 28px);
  }

  .chat-launch {
    width: 50px;
    height: 50px;
    min-height: 50px;
    padding: 0;
    border-radius: 50%;
  }

  .chat-launch span:not(.chat-launch-icon) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .chat-panel {
    width: calc(100vw - 28px);
    max-height: calc(100svh - 28px);
  }

  .contact-method {
    width: 100%;
  }

  .service-detail-layout,
  .service-detail-layout.no-side-media {
    grid-template-columns: 1fr;
  }
}
