:root {
  color-scheme: light;
  --ink: #213845;
  --muted: #718188;
  --paper: #fff8ef;
  --surface: #ffffff;
  --line: #eaded0;
  --blue: #2f6878;
  --orange: #d77961;
  --yellow: #e3bf78;
  --required: #9f5c50;
  --required-bg: #f8ebe5;
  --green: #4c8275;
  --peach: #f6dfcf;
  --sky: #dcecf0;
  --dusk: #efe2d8;
  --tide: #e7f1f1;
  --shadow: 0 18px 46px rgba(82, 72, 63, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f6efe7 0%, #fffaf3 46%, #f6fcfb 100%),
    var(--paper);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Hiragino Sans",
    "Yu Gothic",
    sans-serif;
  line-height: 1.65;
}

button,
select,
textarea {
  font: inherit;
}

.hero {
  position: relative;
  min-height: clamp(420px, 42vw, 620px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  background: #e9d6c8;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -28px;
  background: url("./assets/hero.jpg?v=20260810-2") center / cover no-repeat;
  filter: blur(18px);
  opacity: 0.32;
  transform: scale(1.04);
  z-index: -3;
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image {
  object-fit: cover;
  object-position: center;
  z-index: -2;
}

.hero__shade {
  background:
    linear-gradient(180deg, rgba(255, 248, 239, 0) 0%, rgba(255, 248, 239, 0) 76%, rgba(255, 248, 239, 0.55) 100%);
  z-index: -1;
}

.page-title {
  margin: 0 0 28px;
  padding: 0 2px;
}

.page-title p {
  margin: 0 0 8px;
  color: var(--orange);
  font-weight: 800;
  letter-spacing: 0;
  font-size: clamp(0.8rem, 2vw, 1rem);
}

.page-title h1 {
  margin: 0;
  font-size: clamp(1.95rem, 4.8vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.page-title span {
  display: block;
  max-width: 610px;
  margin: 12px 0 0;
  font-size: clamp(0.96rem, 2.2vw, 1.08rem);
  font-weight: 650;
}

main {
  width: min(1040px, calc(100% - 28px));
  margin: 0 auto;
  padding: clamp(34px, 6vw, 72px) 0 88px;
}

.intro {
  margin: 0 0 24px;
  border-left: 4px solid rgba(47, 104, 120, 0.62);
  padding: 22px 24px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.intro h2,
.intro p {
  margin: 0;
}

.intro h2 {
  font-size: 1.08rem;
}

.intro p {
  color: var(--muted);
  margin-top: 4px;
}

.survey {
  display: grid;
  gap: 24px;
}

.section {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(234, 222, 208, 0.95);
  border-radius: 8px;
  padding: clamp(20px, 4.3vw, 36px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, rgba(47, 104, 120, 0.5), rgba(227, 191, 120, 0.34), rgba(215, 121, 97, 0.26));
}

.section__head {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 14px;
}

.section__head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(47, 104, 120, 0.28), rgba(227, 191, 120, 0.18), rgba(220, 236, 240, 0));
}

.section__head span {
  position: relative;
  display: inline-block;
  min-width: 34px;
  padding-top: 3px;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1;
}

.section__head span::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-top: 8px;
  background: linear-gradient(90deg, rgba(47, 104, 120, 0.82), rgba(227, 191, 120, 0.42));
}

.section__head h2 {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  letter-spacing: 0;
  line-height: 1.28;
}

.section__note {
  margin: -8px 0 18px;
  color: var(--muted);
}

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

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field--full {
  margin-top: 20px;
}

.field span,
.checkbox-group legend {
  color: var(--ink);
  font-weight: 760;
  line-height: 1.5;
}

.field b,
.checkbox-group b {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 7px;
  border: 1px solid rgba(159, 92, 80, 0.16);
  border-radius: 999px;
  color: var(--required);
  background: var(--required-bg);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
  margin-left: 4px;
  vertical-align: 1px;
}

select,
textarea {
  width: 100%;
  border: 1px solid #d6c7ba;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  outline: none;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

select {
  min-height: 48px;
  padding: 0 42px 0 14px;
}

textarea {
  resize: vertical;
  min-height: 118px;
  padding: 12px 14px;
}

select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(50, 118, 154, 0.13);
}

.checkbox-group {
  border: 0;
  padding: 0;
}

.checks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid #cbd8d9;
  border-radius: 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.8);
  font-weight: 700;
}

.checks input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
  flex: 0 0 auto;
}

.branch {
  display: grid;
  gap: 18px;
}

.branch[hidden] {
  display: none;
}

.empty-state {
  border: 1px dashed #cdbbae;
  color: var(--muted);
  padding: 18px;
  border-radius: 8px;
  background: rgba(248, 251, 250, 0.82);
}

.submit-area {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
  padding: 12px 0 0;
}

.submit-area p {
  margin: 0;
  color: var(--muted);
}

button[type="submit"] {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  padding: 0 28px;
  color: #fff;
  background: var(--orange);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(196, 104, 70, 0.24);
}

button[type="submit"]:hover {
  background: #d86945;
}

button[type="submit"]:disabled {
  cursor: progress;
  opacity: 0.74;
}

#formMessage {
  min-height: 28px;
  color: var(--green);
  font-weight: 800;
}

.is-invalid {
  border-color: var(--orange);
}

.review-toolbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 10000;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(33, 56, 69, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 36px rgba(45, 51, 54, 0.18);
  backdrop-filter: blur(12px);
}

.review-toolbar strong {
  font-size: 0.86rem;
}

.review-toolbar span {
  color: var(--muted);
  display: block;
  font-size: 0.74rem;
  line-height: 1.4;
}

.review-toolbar button,
.review-note button {
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
  font-weight: 800;
}

.review-toolbar button {
  min-height: 38px;
  padding: 0 12px;
}

.review-toolbar button[data-review-clear],
.review-note button {
  background: var(--orange);
}

.review-layer {
  position: absolute;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
}

.review-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.review-svg line {
  stroke: var(--orange);
  stroke-width: 3;
  stroke-linecap: round;
}

.review-svg circle {
  fill: var(--orange);
  stroke: #fff;
  stroke-width: 3;
}

.review-note {
  position: absolute;
  width: min(260px, calc(100vw - 24px));
  padding: 10px;
  border: 2px solid var(--orange);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(45, 51, 54, 0.18);
  pointer-events: auto;
}

.review-note textarea {
  min-height: 88px;
  padding: 8px 10px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.review-note__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  cursor: grab;
  user-select: none;
}

.review-note__head span {
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
}

.review-note button {
  min-height: 30px;
  padding: 0 8px;
  font-size: 0.76rem;
}

.is-adding-review {
  cursor: crosshair;
}

.is-adding-review .review-toolbar {
  outline: 3px solid rgba(228, 120, 82, 0.26);
}

.lottery-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(36, 20, 15, 0.72);
}

.lottery-modal {
  width: min(100%, 440px);
  max-height: calc(100svh - 36px);
  overflow: auto;
  border: 1px solid rgba(255, 216, 130, 0.7);
  border-radius: 8px;
  background: #fff8ed;
  color: var(--ink);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

.lottery-stage,
.lottery-result {
  padding: 22px;
  text-align: center;
}

.lottery-kicker {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
}

.lottery-modal h2 {
  margin: 0 0 16px;
  font-size: 1.45rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.lottery-chest {
  display: grid;
  place-items: center;
  width: min(100%, 300px);
  margin: 0 auto 12px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 16px 20px rgba(36, 20, 15, 0.2));
  animation: lotteryPulse 1.4s ease-in-out infinite;
}

.lottery-chest img {
  display: block;
  width: 100%;
  height: auto;
}

.lottery-note,
.lottery-result p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.lottery-result-image {
  display: block;
  width: min(100%, 320px);
  max-height: 46svh;
  object-fit: contain;
  margin: 0 auto 12px;
  border-radius: 8px;
  background: #fff;
}

.lottery-close {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  border: 0;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.lottery-coupon-link {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.line-open-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(36, 20, 15, 0.72);
}

.line-open-modal {
  width: min(100%, 420px);
  padding: 24px;
  border: 1px solid rgba(6, 199, 85, 0.4);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

.line-open-kicker {
  margin: 0 0 8px;
  color: #06c755;
  font-size: 0.78rem;
  font-weight: 900;
}

.line-open-modal h2 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  line-height: 1.35;
}

.line-open-modal p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.75;
}

.line-open-button {
  display: inline-flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #06c755;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.line-open-modal .line-open-note {
  margin: 14px 0 0;
  font-size: 0.9rem;
}

.answered-overlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(36, 20, 15, 0.72);
}

.answered-modal {
  width: min(100%, 440px);
  max-height: calc(100svh - 36px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(255, 216, 130, 0.7);
  border-radius: 8px;
  background: #fff8ed;
  color: var(--ink);
  text-align: center;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
}

.answered-kicker {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 900;
}

.answered-modal h2 {
  margin: 0 0 16px;
  font-size: 1.45rem;
  line-height: 1.35;
}

.answered-modal p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.answered-result-image {
  display: block;
  width: min(100%, 300px);
  max-height: 42svh;
  object-fit: contain;
  margin: 0 auto 12px;
  border-radius: 8px;
  background: #fff;
}

.answered-coupon-link {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.answered-note {
  font-size: 0.88rem;
}

@keyframes lotteryPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-6px) scale(1.03);
  }
}

@media (max-width: 780px) {
  .hero {
    min-height: clamp(360px, 52svh, 460px);
    align-items: center;
  }

  .hero__image {
    width: calc(100% + 10px);
    object-fit: cover;
    object-position: 46% center;
    transform: translateX(-5px);
  }

  main {
    width: min(100% - 20px, 1040px);
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 430px) {
  .hero {
    min-height: clamp(340px, 52svh, 440px);
  }

  .page-title p {
    font-size: 0.74rem;
  }

  .page-title h1 {
    font-size: 2rem;
  }

  .checks {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 16px;
  }

  .section__head span {
    min-width: 32px;
    height: auto;
  }

  .review-toolbar {
    grid-template-columns: 1fr auto auto;
    gap: 6px;
  }

  .review-toolbar span {
    display: none;
  }

  .review-toolbar button {
    min-height: 34px;
    padding: 0 8px;
    font-size: 0.78rem;
  }
}
