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

:root {
  --ink: #171311;
  --muted: #5b514d;
  --accent: #e95f86;
  --accent-deep: #bf3e62;
  --line: rgba(236, 231, 226, 0.96);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Meiryo", "Yu Gothic", "YuGothic", sans-serif;
  background-color: #fffdf9;
  background-image:
    radial-gradient(circle, rgba(233, 95, 134, 0.17) 0 1.35px, transparent 1.65px),
    radial-gradient(circle, rgba(245, 202, 91, 0.15) 0 1.25px, transparent 1.55px),
    radial-gradient(circle, rgba(143, 198, 221, 0.2) 0 1.35px, transparent 1.65px);
  background-position: 0 0, 16px 16px, 32px 0;
  background-size: 64px 64px;
}

.contact-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  height: 68px;
  padding: 0 clamp(18px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.brand {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 900;
  text-decoration: none;
}

.contact-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) 20px 72px;
}

.contact-hero {
  margin-bottom: 28px;
}

.section-label {
  margin: 0 0 14px;
  color: var(--accent-deep);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  padding-left: 18px;
  border-left: 4px solid var(--ink);
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-weight: 900;
  line-height: 1.18;
}

.contact-hero p:last-child {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.9;
}

.contact-card {
  overflow: hidden;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 244, 249, 0.9)),
    radial-gradient(circle at 92% 10%, rgba(233, 95, 134, 0.13), transparent 30%);
  box-shadow: 0 22px 58px rgba(23, 19, 17, 0.1);
}

form {
  display: grid;
  gap: 24px;
}

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

label,
fieldset {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
}

fieldset {
  padding: 0;
  border: 0;
}

label > span,
legend {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
}

small {
  color: #9b8a84;
  font-size: 0.72rem;
}

input[type="text"],
textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(210, 190, 184, 0.86);
  border-radius: 14px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

textarea {
  resize: vertical;
  line-height: 1.7;
}

input:focus,
textarea:focus {
  border-color: rgba(233, 95, 134, 0.72);
  box-shadow: 0 0 0 4px rgba(233, 95, 134, 0.12);
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-grid label {
  display: block;
}

.chip-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-grid span {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border: 1px solid rgba(210, 190, 184, 0.86);
  border-radius: 999px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
}

.chip-grid input:checked + span {
  border-color: rgba(233, 95, 134, 0.62);
  background: rgba(255, 235, 243, 0.96);
  color: var(--accent-deep);
  box-shadow: 0 10px 26px rgba(233, 95, 134, 0.12);
}

.submit-button {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #f05f8c, #cf4f7b);
  color: #fff;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(233, 95, 134, 0.24);
}

.submit-button:disabled {
  cursor: progress;
  opacity: 0.72;
}

.form-message {
  min-height: 1.5em;
  margin: 0;
  color: var(--accent-deep);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.6;
}

.form-message.is-error {
  color: #b42318;
}

@media (max-width: 640px) {
  .field-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    border-radius: 18px;
  }
}
