/* ==========================================================================
   Trample Studio Contact Form（Cloudflare Pages 版 /contact）
   apps-script/contact-form/Styles.html と同じデザイン（Red / Cream / Charcoal）。
   ページの枠（ヘッダー・ページヘッド・フッター）は style.css、フォーム本体はここ。
   ========================================================================== */

.ts-page {
  --tsc-red: var(--ts-red, #ed0709);
  --tsc-red-dark: var(--ts-red-dark, #b80608);
  --tsc-cream: var(--ts-cream, #fff8e8);
  --tsc-off-white: #fbf1dd;
  --tsc-charcoal: var(--ts-charcoal, #1f1b18);
  --tsc-muted: #6b625a;
  --tsc-border: #d9cfbd;
  --tsc-white: #ffffff;
}

.tsc-wrap {
  max-width: 720px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.7;
  color: var(--tsc-charcoal);
}

/* ---- Form ---- */
.tsc-form {
  border-top: 3px solid var(--tsc-red);
  padding-top: 20px;
}
.tsc-required-note {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--tsc-muted);
}
.tsc-req { color: var(--tsc-red); font-weight: 800; }
.tsc-sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.tsc-field { margin-bottom: 20px; }
.tsc-label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 800;
}
.ts-page .tsc-input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 2px solid var(--tsc-charcoal);
  border-radius: 4px;
  background: var(--tsc-white);
  color: var(--tsc-charcoal);
  font: inherit;
  font-size: 16px; /* iOS の入力時ズームを防ぐため 16px 以上 */
  line-height: 1.5;
  transition: box-shadow 160ms ease, border-color 160ms ease;
}
.ts-page .tsc-input::placeholder { color: #9a9087; }
.ts-page .tsc-input:focus {
  outline: none;
  border-color: var(--tsc-red);
  box-shadow: 4px 4px 0 var(--tsc-red);
}
.ts-page .tsc-input:focus-visible { outline: 3px solid var(--tsc-red); outline-offset: 2px; }
.ts-page .tsc-input[aria-invalid="true"] { border-color: var(--tsc-red-dark); }
.ts-page .tsc-textarea { resize: vertical; min-height: 120px; }
.ts-page .tsc-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%231f1b18' stroke-width='2.2' stroke-linecap='square' d='M3 6l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.tsc-help {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--tsc-muted);
}
.tsc-error {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--tsc-red-dark);
}
.tsc-static {
  margin: 0;
  padding: 10px 0;
  font-weight: 700;
}

/* ---- Optional block ---- */
.tsc-optional {
  margin: 4px 0 24px;
  border: 2px solid var(--tsc-border);
  border-radius: 4px;
  background: var(--tsc-off-white);
}
.tsc-optional__summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 800;
  font-size: 15px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tsc-optional__summary::-webkit-details-marker { display: none; }
.tsc-optional__summary::before {
  content: "+";
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 2px solid var(--tsc-red);
  border-radius: 3px;
  color: var(--tsc-red);
  font-weight: 900;
  line-height: 18px;
  text-align: center;
}
.tsc-optional[open] .tsc-optional__summary::before { content: "−"; }
.tsc-optional__summary:focus-visible { outline: 3px solid var(--tsc-red); outline-offset: 2px; }
.tsc-optional__body { padding: 4px 16px 4px; }
.tsc-grid { display: grid; gap: 0 16px; grid-template-columns: 1fr; }

/* ---- Honeypot（画面外。アクセシビリティツリーからも除外） ---- */
.tsc-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Actions ---- */
.tsc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.ts-page .tsc-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 4px 4px 4px 14px;
  background: var(--tsc-red);
  color: var(--tsc-white);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}
.ts-page .tsc-btn:hover { background: var(--tsc-red-dark); transform: translateY(-2px); }
.ts-page .tsc-btn:focus-visible { outline: 3px solid var(--tsc-charcoal); outline-offset: 3px; }
.ts-page .tsc-btn[disabled] { opacity: 0.6; cursor: default; transform: none; }
.tsc-btn__arrow { font-size: 18px; line-height: 1; }
.tsc-status {
  margin: 0;
  flex: 1 1 240px;
  font-size: 15px;
  font-weight: 700;
  min-height: 1.5em;
}
.tsc-status.is-success { color: var(--tsc-charcoal); }
.tsc-status.is-error { color: var(--tsc-red-dark); }
.tsc-status__sub {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--tsc-muted);
}

/* ---- Footer note ---- */
.tsc-foot {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--tsc-border);
  font-size: 14px;
  color: var(--tsc-muted);
}
.tsc-foot p { margin: 0 0 6px; }
.ts-page .tsc-foot a { color: var(--tsc-red-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ts-page .tsc-foot a:focus-visible { outline: 3px solid var(--tsc-red); outline-offset: 2px; }
.tsc-foot__small { font-size: 13px; }

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

@media (prefers-reduced-motion: reduce) {
  .ts-page .tsc-input, .ts-page .tsc-btn { transition: none; }
  .ts-page .tsc-btn:hover { transform: none; }
}
