/* Contact: reply sequence shown only after a successful "営業・サービスのご提案" submission. */
.sales-reply {
  --sr-serif: "Noto Serif JP", "Hiragino Mincho ProN", serif;
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
  opacity: 0;
  overflow: hidden;
  color: var(--text-primary);
  font-feature-settings: "palt" 1;
}
.sales-reply__bg { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 60% at 50% 45%, #15120b 0%, #050505 55%, #000 100%); }
.sales-reply__grain {
  position: absolute;
  inset: -50%;
  opacity: 0.06;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: sales-reply-grain 1s steps(6) infinite;
}
@keyframes sales-reply-grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}
.sales-reply canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sales-reply__skip {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: 16px;
  z-index: 5;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.4);
  color: var(--text-secondary);
  border: 1px solid var(--line-default);
  font: inherit;
  font-size: 13px;
}
.sales-reply__skip:hover { color: var(--text-primary); border-color: var(--gold-line); }

.sales-reply__letter {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 360px;
  height: 225px;
  margin: -112.5px 0 0 -180px;
  border-radius: 12px;
  padding: 22px 24px;
  background: linear-gradient(160deg, #17150f, #0c0c0c 60%);
  border: 1px solid var(--gold-line);
  box-shadow: 0 0 0 1px rgba(214, 173, 85, 0.08), 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(214, 173, 85, 0.12);
  visibility: hidden;
  overflow: hidden;
}
.sales-reply__meta { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--gold); }
.sales-reply__from { margin: 12px 0 10px; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sales-reply__body { margin: 0; font-size: 12px; line-height: 1.75; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.sales-reply__letter::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(236, 210, 143, 0.18) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: sales-reply-sheen 2.4s 0.6s ease infinite;
}
@keyframes sales-reply-sheen {
  0% { transform: translateX(-120%); }
  60%, 100% { transform: translateX(120%); }
}

.sales-reply__caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: max(12vh, 64px);
  z-index: 3;
  margin: 0;
  text-align: center;
  font-family: var(--sr-serif);
  font-weight: 300;
  font-size: clamp(17px, 2.2vw, 24px);
  letter-spacing: 0.08em;
}

.sales-reply__message {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 96px);
  max-height: calc(100svh - 96px);
  overflow-y: auto;
}
.sales-reply__to { font-family: var(--sr-serif); font-size: 14px; letter-spacing: 0.06em; color: var(--gold); margin: 0 0 18px; min-height: 1em; }
.sales-reply__rule-wrap { height: 1px; margin: 0 0 32px; }
.sales-reply__rule { height: 1px; background: linear-gradient(90deg, var(--gold-bright), var(--gold) 60%, rgba(214, 173, 85, 0)); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 12px rgba(236, 210, 143, 0.6); }
.sales-reply__message h2 { font-family: var(--sr-serif); font-weight: 300; font-size: clamp(24px, 3.6vw, 38px); line-height: 1.55; margin: 0 0 28px; letter-spacing: 0.02em; }
.sales-reply__message p { font-family: var(--sr-serif); font-weight: 300; font-size: clamp(15px, 1.7vw, 18px); line-height: 2; color: var(--text-secondary); margin: 0 0 14px; }
.sales-reply__message p.is-em { color: var(--text-primary); font-weight: 400; }
.sales-reply__message p.is-signal { color: var(--gold-bright); margin-top: 26px; }
.sales-reply .sr-ch { display: inline-block; opacity: 0; white-space: pre; }
.sales-reply__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; opacity: 0; }
.sales-reply__actions a,
.sales-reply__actions button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.sales-reply__actions a { background: var(--gold); color: #111; font-weight: 700; border: 0; }
.sales-reply__actions a:hover { background: var(--gold-bright); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(214, 173, 85, 0.25); }
.sales-reply__actions button { background: transparent; color: var(--text-secondary); border: 1px solid var(--line-default); }
.sales-reply__actions button:hover { color: var(--text-primary); border-color: var(--gold-line); }
.sales-reply__note { margin: 22px 0 0; font-size: 12px; color: var(--text-tertiary); opacity: 0; }
.sales-reply .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.sales-reply :focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

@media (max-width: 860px) {
  .sales-reply__letter { width: 300px; height: 200px; margin: -100px 0 0 -150px; padding: 18px 20px; }
  .sales-reply__message h2 { margin-bottom: 20px; font-size: calc((100vw - 32px) / 17.5); }
  /* 右上の閉じるボタンと宛名が重ならないよう、本文を下げて高さを抑える */
  .sales-reply__message { top: calc(50% + 24px); max-height: calc(100vh - 136px); max-height: calc(100svh - 136px); }
}
@media (prefers-reduced-motion: reduce) {
  .sales-reply__grain,
  .sales-reply__letter::after { animation: none; }
}
