/* Mania BOX 投稿ページ（/box）専用の追加スタイル。
   app/globals.css（LP本体）は無改変のため、このファイルを site.css の後に読み込む。
   色の変数は globals.css の :root で定義済みのものをそのまま流用する。
   基準幅はスマートフォン375px。 */

.box-page {
  padding: 72px clamp(20px, 6vw, 92px) 120px;
  max-width: 720px;
  margin: 0 auto;
}

.box-heading p {
  margin: 0 0 14px;
  color: var(--coral);
  font: 800 11px/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.18em;
}

.box-heading h1 {
  margin: 0 0 40px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  font-weight: 700;
  font-size: clamp(27px, 4.4vw, 40px);
  line-height: 1.45;
  letter-spacing: -0.02em;
}

/* ── 説明文 ── */

.box-lead {
  padding-bottom: 44px;
  border-bottom: 1px solid var(--line);
}

.box-lead p {
  margin: 0 0 18px;
  color: var(--mist);
  font-size: 15px;
  line-height: 1.9;
}

.box-lead-quote {
  padding-left: 16px;
  border-left: 3px solid var(--green);
  color: var(--paper) !important;
  font-size: 17px !important;
  font-weight: 700;
}

.box-notes {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.box-notes li {
  margin-bottom: 6px;
  color: var(--mist);
  font-size: 13px;
  line-height: 1.8;
  opacity: 0.82;
}

/* ── フォーム ── */

.box-form {
  margin-top: 46px;
}

.box-section {
  margin: 0 0 12px;
  padding: 0;
  border: none;
}

.box-section legend {
  display: block;
  width: 100%;
  margin-bottom: 26px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--deep-line);
  color: var(--green);
  font: 800 11px/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0.14em;
}

.box-field {
  margin-bottom: 38px;
}

.box-field-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.box-field-no {
  color: var(--coral);
  font: 700 12px/1 ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.box-field-label {
  color: var(--paper);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}

.box-req,
.box-opt {
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.box-req {
  background: var(--coral);
  color: var(--ink);
}

.box-opt {
  border: 1px solid var(--line);
  color: var(--mist);
}

.box-hint {
  margin: 0 0 12px;
  color: var(--mist);
  font-size: 13px;
  line-height: 1.8;
  opacity: 0.85;
}

.box-input,
.box-textarea {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
  color: var(--paper);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.8;
}

.box-textarea {
  min-height: 132px;
  resize: vertical;
}

.box-input:focus,
.box-textarea:focus {
  border-color: var(--green);
  outline: none;
}

.box-count {
  margin: 6px 0 0;
  color: var(--mist);
  font-size: 12px;
  text-align: right;
  opacity: 0.65;
}

.box-choices {
  display: grid;
  gap: 8px;
}

.box-choice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
  color: var(--paper);
  font-size: 14.5px;
  line-height: 1.65;
  cursor: pointer;
}

.box-choice:hover {
  border-color: var(--mist);
}

.box-choice input {
  flex: none;
  margin: 4px 0 0;
  accent-color: var(--green);
  width: 16px;
  height: 16px;
}

.box-choice:has(input:checked) {
  border-color: var(--green);
  background: var(--panel-light);
}

.box-consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
  color: var(--paper);
  font-size: 14px;
  line-height: 1.85;
  cursor: pointer;
}

.box-consent input {
  flex: none;
  margin: 5px 0 0;
  accent-color: var(--green);
  width: 16px;
  height: 16px;
}

.box-consent:has(input:checked) {
  border-color: var(--green);
}

/* エラー表示 */
.box-error,
.box-form-error {
  margin: 8px 0 0;
  color: var(--coral);
  font-size: 13px;
  line-height: 1.7;
}

.box-error:empty,
.box-form-error:empty {
  display: none;
}

.box-form-error {
  margin: 22px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--coral);
  border-radius: 3px;
}

/* honeypot（人間には見えない） */
.box-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* 公開・利用同意文 */
.box-consent-text {
  margin-top: 8px;
  padding: 22px 20px;
  border: 1px solid var(--deep-line);
  border-radius: 3px;
  background: rgba(15, 29, 42, 0.6);
}

.box-consent-text h2 {
  margin: 0 0 14px;
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.box-consent-text p {
  margin: 0 0 14px;
  color: var(--mist);
  font-size: 13px;
  line-height: 1.9;
}

.box-consent-text p:last-child {
  margin-bottom: 0;
}

.box-consent-text a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.box-submit-row {
  margin-top: 34px;
}

.box-submit-row .button {
  width: 100%;
  justify-content: center;
}

.box-branch-guide {
  margin: 26px 0 0;
  color: var(--mist);
  font-size: 13px;
  opacity: 0.75;
}

/* ── 送信完了 ── */

.box-complete {
  margin-top: 44px;
  padding: 34px 26px;
  border: 1px solid var(--green);
  border-radius: 3px;
  background: var(--panel);
}

.box-complete p {
  margin: 0 0 18px;
  color: var(--mist);
  font-size: 15px;
  line-height: 1.95;
}

.box-complete-closing {
  color: var(--paper) !important;
  font-size: 17px !important;
  font-weight: 700;
}

.box-complete .button {
  margin-top: 8px;
}

@media (max-width: 420px) {
  .box-page {
    padding-top: 52px;
  }

  .box-field {
    margin-bottom: 32px;
  }
}
