@charset "utf-8";
@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@700;900&family=Share+Tech+Mono&family=Zen+Kaku+Gothic+New:wght@400;700&display=swap");

/* ===========================================================================
   Postmail 用スタイル — SHOのサイト（ネオンブルー / SF テーマ）

   入力画面(index.html)だけでなく、CGI が出力する確認・エラー・完了画面の
   テンプレートもこのファイルを読むため、Postmail 標準のセレクタ
   (#head, #body, h2, #form, p.btn, p.msg, span.msg, form.back) を
   そのまま使ってデザインしている。セレクタ名は変えないこと。
   =========================================================================== */

:root {
  --bg: #04060d;
  --bg-2: #070b17;
  --panel: rgba(10, 20, 40, 0.72);
  --line: rgba(0, 200, 255, 0.22);
  --line-strong: rgba(0, 220, 255, 0.55);
  --neon: #00d9ff;
  --neon-soft: #7fe9ff;
  --magenta: #ff3dcb;
  --warn: #ff6b8b;
  --ok: #3dffb0;
  --text: #d9e7ff;
  --text-dim: #8a9cc0;
  --text-faint: #56668a;
  --glow: 0 0 6px rgba(0, 217, 255, 0.8), 0 0 18px rgba(0, 217, 255, 0.45);
  --font-display: "Orbitron", "Zen Kaku Gothic New", sans-serif;
  --font-mono: "Share Tech Mono", ui-monospace, "Cascadia Mono", monospace;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0, 140, 255, 0.28), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(255, 61, 203, 0.08), transparent 70%),
    linear-gradient(var(--bg), var(--bg-2));
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.02em;
  overflow-x: hidden;
}

/* 奥へ流れる床のグリッド */
body::before {
  content: "";
  position: fixed;
  inset: auto 0 0 0;
  height: 40vh;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 200, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 255, 0.16) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(420px) rotateX(62deg);
  transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 85%);
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 85%);
  animation: grid-scroll 6s linear infinite;
}

/* スキャンライン */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

@keyframes grid-scroll {
  to { background-position: 0 48px, 0 0; }
}

a { color: var(--neon-soft); text-decoration: none; transition: color 0.2s, text-shadow 0.2s; }
a:hover, a:focus-visible { color: #fff; text-shadow: var(--glow); }
a:focus-visible { outline: 1px solid var(--neon); outline-offset: 3px; }

::selection { background: rgba(0, 217, 255, 0.35); color: #fff; }

/* ------------------------------------------------------------ header */

/* テンプレート側は空の <div id="head"></div> なので、ロゴは疑似要素で描く */
#head {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(4, 6, 13, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  color: #fff;
}

#head::before {
  content: "SHO";
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.18em;
  text-shadow: var(--glow);
}

#head::after {
  content: "CONTACT";
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

/* ------------------------------------------------------------ body */

#body {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 8px clamp(16px, 4vw, 40px) 72px;
}

/* 入力画面だけにある導入部 */
.crumb {
  margin: 28px 0 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}

.page-title {
  margin: 10px 0 4px;
  font-family: var(--font-display);
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 0 12px var(--neon), 0 0 40px #3d7bff;
}

.page-sub {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.3em;
  color: var(--neon);
}

/* ------------------------------------------------------------ headings */

h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2.4em 0 1em;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  border: 0;
  text-align: left;
}

h2::before {
  content: "//";
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--neon);
}

h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

ol, ul { margin: 0 0 1em; padding-left: 1.4em; color: var(--text-dim); }
ol li::marker { color: var(--neon); font-family: var(--font-mono); }

/* ------------------------------------------------------------ form table */

#form {
  width: 100%;
  margin: 1em 0;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 0 24px rgba(0, 120, 255, 0.08) inset;
  position: relative;
}

#form th,
#form td {
  padding: 16px 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  vertical-align: top;
  text-align: left;
}

#form tr:last-child th,
#form tr:last-child td { border-bottom: 0; }

#form th {
  width: 11em;
  white-space: nowrap;
  font-weight: 700;
  font-size: 15px;
  color: var(--neon-soft);
  background: rgba(0, 60, 120, 0.18);
}

#form td { color: var(--text); word-break: break-all; }

/* 必須マーク（入力画面） */
#form th .req {
  display: inline-block;
  margin-left: 8px;
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  line-height: 1.6;
  color: var(--magenta);
  border: 1px solid currentColor;
  border-radius: 2px;
  vertical-align: 2px;
}

/* ------------------------------------------------------------ inputs */

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px; /* iOS で拡大されないように */
  color: #fff;
  background: rgba(2, 8, 20, 0.85);
  border: 1px solid var(--line);
  border-radius: 3px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"] + br + input[type="text"],
input[type="email"] + br + input[type="email"],
.field + .field { margin-top: 8px; }

textarea { min-height: 11em; resize: vertical; line-height: 1.7; }

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 1px var(--neon), 0 0 16px rgba(0, 217, 255, 0.35);
}

::placeholder { color: var(--text-faint); }

.hint {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-faint);
}

/* ラジオボタン（入力画面ではチップ状に並べる） */
input[type="radio"] { accent-color: var(--neon); }

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choices label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 8, 20, 0.6);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.choices label:hover { border-color: var(--line-strong); }

.choices label:has(input:checked) {
  border-color: var(--neon);
  background: rgba(0, 120, 200, 0.22);
  box-shadow: 0 0 12px rgba(0, 217, 255, 0.3);
  color: #fff;
}

.choices label:has(input:focus-visible) { outline: 1px solid var(--neon); outline-offset: 2px; }

/* ------------------------------------------------------------ buttons */

p.btn {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 28px 0;
}

p.btn input,
form.back input,
form.back button {
  min-width: 150px;
  height: 46px;
  padding: 0 24px;
  font: 700 15px var(--font-body);
  letter-spacing: 0.12em;
  color: var(--neon-soft);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s, border-color 0.2s;
}

/* 送信（1つ目のボタン）を主ボタンにする */
p.btn input[type="submit"] {
  color: #001018;
  background: linear-gradient(180deg, #5ff0ff, var(--neon));
  border-color: var(--neon);
  box-shadow: 0 0 18px rgba(0, 217, 255, 0.45);
}

p.btn input:hover,
p.btn input:focus-visible,
form.back input:hover,
form.back input:focus-visible,
form.back button:hover {
  color: #fff;
  border-color: var(--neon);
  background: rgba(0, 150, 255, 0.15);
  box-shadow: 0 0 16px rgba(0, 217, 255, 0.35);
  outline: none;
}

p.btn input[type="submit"]:hover,
p.btn input[type="submit"]:focus-visible {
  color: #001018;
  background: linear-gradient(180deg, #9ff7ff, #33e2ff);
  box-shadow: 0 0 28px rgba(0, 217, 255, 0.7);
}

form.back {
  margin-top: 2em;
  text-align: center;
}

/* ------------------------------------------------------------ messages */

p.msg {
  margin: 1.6em 0;
  padding: 16px 20px;
  color: #fff;
  background: rgba(10, 20, 40, 0.72);
  border: 1px solid var(--line);
  border-left: 3px solid var(--neon);
  border-radius: 3px;
}

span.msg { color: var(--warn); font-weight: 700; }
/* エラー画面のメッセージ（テンプレートは <li class="msg"> を使う） */
li.msg {
  list-style: none;
  margin: 1.6em 0;
  margin-left: -1.4em;
  padding: 16px 20px;
  color: #fff;
  background: rgba(10, 20, 40, 0.72);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: 3px;
}


/* ------------------------------------------------------------ footer */

.foot {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}

/* ------------------------------------------------------------ smartphone */

@media only screen and (max-width: 600px) {
  #form th,
  #form td {
    display: block;
    width: 100%;
  }

  #form th {
    padding: 12px 14px 6px;
    border-bottom: 0;
    background: transparent;
  }

  #form td { padding: 0 14px 16px; }

  #form tr { display: block; border-bottom: 1px solid var(--line); }
  #form tr:last-child { border-bottom: 0; }
  #form tbody { display: block; }
  #form th, #form td { border-bottom: 0; }

  p.btn input { flex: 1 1 40%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  * { transition: none !important; }
}
