/* newBLACK 公式サイト共通スタイル。ライト/ダーク両対応・モバイルファースト */

:root {
  color-scheme: light dark;

  --accent: #a1d251;
  --accent-ink: #1a1600;

  --bg: #ffffff;
  --bg-elev: #f5f5f7;
  --text: #101014;
  --text-muted: #5c5c66;
  --border: rgba(16, 16, 20, 0.12);
  --card-shadow: 0 1px 3px rgba(16, 16, 20, 0.08), 0 8px 24px rgba(16, 16, 20, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0d;
    --bg-elev: #17171b;
    --text: #f2f2f5;
    --text-muted: #a2a2ad;
    --border: rgba(255, 255, 255, 0.14);
    --card-shadow: none;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* ============ ランディング ============ */

.landing {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  text-align: center;
  padding: 88px 0 64px;
}

.hero__logo {
  font-size: clamp(40px, 9vw, 68px);
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0;
}

.hero__logo-mark {
  color: var(--accent);
}

.hero__lead {
  margin: 20px auto 0;
  max-width: 32em;
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--text-muted);
}

.hero__cta {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* App Store バッジのプレースホルダ枠 */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 200px;
  padding: 14px 24px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
}

.hero__age {
  font-size: 13px;
  color: var(--text-muted);
}

/* セクション共通 */
.section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}

.section__title {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  margin: 0 0 8px;
}

.section__intro {
  color: var(--text-muted);
  margin: 0 0 32px;
  max-width: 40em;
}

/* 機能カード */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.feature {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--card-shadow);
}

.feature__name {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}

.feature__desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* チケット販売案内 */
.ticket {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--card-shadow);
}

.ticket__accent {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

.ticket__points {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.ticket__points li {
  padding-left: 24px;
  position: relative;
}

.ticket__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

/* フッター */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 56px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.site-footer__nav {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
}

.site-footer__nav a {
  text-decoration: none;
}

.site-footer__nav a:hover {
  text-decoration: underline;
}

.site-footer__copyright {
  font-size: 12px;
  opacity: 0.7;
}

/* ============ 法務ページ ============ */

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 96px;
  font-size: 15px;
}

.legal__back {
  display: inline-block;
  margin-bottom: 32px;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
}

.legal__back:hover {
  text-decoration: underline;
}

.legal__title {
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 800;
  margin: 0 0 6px;
}

.legal__date {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 40px;
}

.legal__text {
  margin: 0 0 16px;
}

.legal__heading {
  font-size: 20px;
  font-weight: 800;
  margin: 44px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--text);
}

.legal__subheading {
  font-size: 16px;
  font-weight: 700;
  margin: 28px 0 10px;
}

.legal__list {
  margin: 0 0 16px;
  padding-left: 22px;
}

.legal__list li {
  margin-bottom: 8px;
}

/* 補足を添える一覧。行が 2 段になるので間を広く取る。 */
.legal__list--loose li {
  margin-bottom: 14px;
}

.legal__list--loose li:last-child {
  margin-bottom: 0;
}

/* 項目名に添える補足。本文より一段小さく、色を落とす。 */
.legal__hint {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--text-muted);
}

/* 冒頭の要点。四角い印を頭に置いて 1 行ずつ読ませる。 */
.legal__facts {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.legal__facts li {
  position: relative;
  padding-left: 20px;
}

.legal__facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 8px;
  height: 8px;
  background: currentColor;
}

/* 読む部分を枠で囲み、下の入力欄と切り分ける。表示専用なので影は付けない。 */
.legal__panel {
  margin: 28px 0;
  padding: 20px;
  border: 1px solid var(--sq-border, var(--border));
}

.legal__panel > .legal__heading:first-child {
  margin-top: 0;
}

.legal__panel > :last-child {
  margin-bottom: 0;
}

/* 特商法テーブル */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 15px;
}

.spec-table th,
.spec-table td {
  border: 1px solid var(--border);
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

.spec-table th {
  width: 34%;
  background: var(--bg-elev);
  font-weight: 700;
  white-space: nowrap;
}

.spec-table__todo {
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 560px) {
  .spec-table,
  .spec-table tbody,
  .spec-table tr,
  .spec-table th,
  .spec-table td {
    display: block;
    width: 100%;
  }

  .spec-table th {
    border-bottom: none;
    white-space: normal;
  }

  .spec-table td {
    border-top: none;
  }
}

/* ============ 申し込みページ（アプリの Squared に揃える） ============
   角丸なし・1px の枠・右下へ 4px ずらした影・見出しは地に対して反転。色はアプリのアセットと同じ値。 */

body:has(.legal--listing) {
  --sq-bg: #ffffff;
  --sq-card: #ffffff;
  --sq-field: #ffffff;
  --sq-border: #000000;
  --sq-shadow: #000000;
  --sq-accent: #ff3132;
  --sq-muted-text: #333333;
  --sq-placeholder: #9a9a9a;
}

.legal--listing {
  overflow-x: hidden;
}

/* display を指定した要素でも hidden 属性を必ず効かせる（写真を選ぶボタン・切り取り画面）。 */
.legal--listing [hidden],
.cropper-modal-host[hidden],
.loading-veil[hidden] {
  display: none !important;
}

@media (prefers-color-scheme: dark) {
  body:has(.legal--listing) {
    --sq-bg: #000000;
    --sq-card: #1c1c1c;
    --sq-field: #000000;
    --sq-border: #3a3a3a;
    --sq-shadow: #3a3a3a;
    --sq-accent: #ff6364;
    --sq-muted-text: #cecece;
    --sq-placeholder: #6a6a6a;
  }
}

.legal--listing .legal__heading {
  display: inline-block;
  margin-top: 36px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--text);
}

.form {
  margin-top: 32px;
}

.form__field {
  margin-bottom: 20px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

.form__row > .form__field {
  min-width: 0;
}

.form__label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.form__required {
  margin-left: 4px;
  color: var(--sq-accent);
}

.form__count {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--sq-muted-text);
}

.form__input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--sq-border);
  border-radius: 0;
  background: var(--sq-field);
  color: var(--text);
  font: inherit;
  /* iOS の Safari は 16px 未満の入力欄にフォーカスすると画面を拡大する。本文の 15px を継がせない。 */
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.form__input::placeholder {
  color: var(--sq-placeholder);
}

.form__input:focus {
  outline: 2px solid var(--text);
  outline-offset: 0;
}

/* iOS の日付・時刻入力は自前の幅を持ち width: 100% を無視して列からはみ出す。 */
.form__input[type="time"],
.form__input[type="date"] {
  display: block;
}

select.form__input {
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

/* 申し込みフォームの住所欄の下に出す地図。ピンが建物に載っているかを見るだけなので小さくてよい。 */
.listing__map {
  height: 240px;
  border: 1px solid var(--sq-border);
  background: var(--sq-field);
}

.form__note {
  font-size: 13px;
  color: var(--sq-muted-text);
}

/* チェックとラジオは、アプリの絞り込みチップと同じ「枠だけ／選ぶと反転塗り」にする。 */
.form__checks,
.form__radios {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.form__check {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--sq-border);
  background: var(--sq-field);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.form__check input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.form__check:has(input:checked) {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.form__check:has(input:focus-visible) {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* ボタン。白い面に枠と影。 */
.legal--listing .badge,
.cropper-modal-host .badge {
  position: relative;
  min-width: 0;
  padding: 10px 18px;
  border: 1px solid var(--sq-border);
  border-radius: 0;
  background: var(--sq-card);
  color: var(--text);
  box-shadow: 4px 4px 0 0 var(--sq-shadow);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.legal--listing .badge:active,
.cropper-modal-host .badge:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

/* 申し込むボタンだけ赤い塗りで大きく。 */
.legal--listing .form__submit {
  min-height: 56px;
  padding: 0 16px;
  border: 0;
  background: var(--sq-accent);
  color: #ffffff;
  box-shadow: none;
  font-size: 18px;
  font-weight: 800;
}

.legal--listing .form__submit:active {
  transform: none;
}

.form__submit:disabled {
  opacity: 0.5;
  cursor: default;
}

.form__status {
  min-height: 1.8em;
  margin-top: 12px;
  font-size: 14px;
}

/* 写真のサムネイル。角丸なし・枠付き。 */
.photos {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.photos__item {
  position: relative;
  width: 96px;
  height: 96px;
}

.photos__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--sq-border);
}

.photos__remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border: 1px solid var(--bg);
  background: var(--text);
  color: var(--bg);
  font: inherit;
  line-height: 22px;
  cursor: pointer;
}

/* 切り取りのモーダル。 */
.cropper-modal-host[hidden] {
  display: none;
}

.cropper-modal-host {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.7);
}

/* 表示専用の面。影は押せる印なので付けない。 */
.cropper-modal-host__panel {
  width: min(100%, 520px);
  padding: 16px;
  background: var(--sq-card);
  border: 1px solid var(--sq-border);
}

.cropper-modal-host__title {
  margin: 0 0 12px;
  font-weight: 700;
}

.cropper-modal-host__stage {
  height: min(70vh, 480px);
  background: var(--sq-field);
}

.cropper-modal-host__stage img {
  display: block;
  max-width: 100%;
}

.cropper-modal-host__actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.cropper-modal-host__actions .badge {
  flex: 1;
  padding: 14px 12px;
}

/* タグの入力と、最寄駅の手入力欄。 */
.tags__open {
  width: 100%;
  margin-bottom: 8px;
}

.tags__entry {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.tags__entry .form__input {
  flex: 1;
}

.legal--listing .tags__confirm {
  flex: none;
  min-height: 48px;
  padding: 0 16px;
}

.tags__suggestions {
  margin-top: 12px;
}

.tags__suggestions:empty,
.tags__list:empty {
  display: none;
}

.tags__list .tags__chip {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.form__input--follow {
  margin-top: 8px;
}

/* 2 択はアプリのセグメントと同じ形。枠の中で等分し、選んだ側だけ反転塗りにする（見出しの面と区別する）。 */
.form__radios {
  display: flex;
  gap: 0;
  padding: 2px;
  border: 1px solid var(--sq-border);
  background: var(--sq-field);
}

.form__radios .form__check {
  flex: 1;
  justify-content: center;
  border: 0;
  background: transparent;
}

.form__radios .form__check:has(input:checked) {
  background: var(--text);
  color: var(--bg);
}

/* タグ候補のグループ見出し（チップの行の前に小さく置く）。 */
.tags__group {
  flex-basis: 100%;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--sq-muted-text);
}

/* タグ候補のモーダル（切り取りと同じ土台）。候補が多いので中身だけスクロールさせる。 */
.tags__modal-body {
  max-height: min(60vh, 420px);
  overflow-y: auto;
  margin-bottom: 0;
}


/* 送信前の確認画面。項目名と内容を 1 行ずつ、角丸なしの枠で並べる。 */
.confirm {
  margin-top: 24px;
  border: 1px solid var(--sq-border);
}

.confirm__row {
  display: grid;
  grid-template-columns: 8em 1fr;
  gap: 0 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--sq-border);
}

.confirm__row:last-child {
  border-bottom: 0;
}

.confirm__key {
  font-size: 13px;
  font-weight: 700;
}

.confirm__value {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.confirm__value--empty {
  color: var(--sq-placeholder);
}

.confirm__photos {
  margin-bottom: 0;
}

.confirm__actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.confirm__actions .badge {
  flex: 1;
  padding: 16px 12px;
}

.confirm__actions .badge:disabled {
  opacity: 0.5;
  cursor: default;
}

@media (max-width: 520px) {
  .confirm__row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* 却下後の再開リンク・運営からの招待リンクで開いたときの案内。 */
/* 表示専用の案内。影は押せる印なので付けない（枠線だけで面を立てる）。 */
.form__notice {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--sq-border);
  background: var(--sq-card);
}

.form__notice p {
  margin: 0;
}

/* 掲載のご案内ページの選択肢。文言が長いので縦に並べる。 */
.invite__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}

.invite__actions .badge {
  padding: 16px 24px;
}

.invite__actions .badge:disabled {
  opacity: 0.5;
  cursor: default;
}

/* 読み込み中・送信中に画面を覆う。文字は出さず、四角が回るだけ。 */
.loading-veil {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sq-bg);
  background: color-mix(in srgb, var(--sq-bg) 85%, transparent);
}

.loading-veil__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border: 1px solid var(--sq-border);
  background: var(--sq-card);
}

.loading-veil__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--sq-border);
  border-top-color: transparent;
  animation: loading-veil-spin 0.8s linear infinite;
}

@keyframes loading-veil-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-veil__spinner {
    animation-duration: 2.4s;
  }
}
