/* shared/base.css — 3デザイン共通の最小ベース（リセット/アクセシビリティ/ハニーポット）。
   視覚は各デザインの styles.css が全面的に上書きする。 */

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

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

body {
  margin: 0;
  min-height: 100vh;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, p, dl, dd, figure, ol, ul { margin: 0; }

/* 長い連続文字での溢れ防止（render側の文字単位<wbr>に依存しない） */
h1, h2, h3, h4, p, dd, dt, span, a, li { overflow-wrap: break-word; }

/* 日本語見出しの単語途中分断を防ぐ：render側が句/語境界に挿入した <wbr> でのみ折返し、
   CJK文字間では折返さない（word-break:keep-all）。overflow-wrap:anywhere は
   「分割点の無い単一語が行幅を超える」最終手段のみ発火。class詳細度で上の break-word に勝つ。 */
.jp-phrase { word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }

/* 本文（和文主体・長文）の単語途中分断を抑止：render側が句読点/助詞境界に入れた <wbr> でのみ折返し。
   分割点の無い長句が行幅を超える時のみ overflow-wrap:anywhere が最終手段で折る（横溢れ0を担保）。 */
.jp-flow { word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }

/* ヒーロー見出しの reveal 構造（出現アニメの transition は各デザインの styles.css が定義）。
   3デザインで句グループ(reveal-word)の nowrap 挙動を揃えるため共通化（a-forgeと同値）。 */
.reveal-char { display: inline-block; }
.reveal-word { display: inline-block; white-space: nowrap; }

/* キーボード操作のフォーカス可視化（デザインで色は上書き可） */
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* スクリーンリーダー専用 */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* ハニーポット：人間には見えず、botのみ入力する隠しフィールド */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* === 簡易アクセスゲート（公開サイト＋admin 共通。視覚はここに集約＝JSは classList 操作のみ） === */
.site-gate-lock { overflow: hidden; }
.site-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 28%, rgba(226, 52, 29, .18), transparent 60%),
    #08080a;
}
.site-gate-card {
  width: min(420px, 100%);
  padding: 36px 30px 30px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: #14161a;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  text-align: center;
}
.site-gate-brand {
  font: 900 1.9rem/1 "Anton", system-ui, sans-serif;
  letter-spacing: .12em;
  color: #f4f4f5;
}
.site-gate-note {
  margin-top: 12px;
  color: #b6bcc4;
  font: 500 .92rem/1.7 system-ui, sans-serif;
}
.site-gate-form { display: grid; gap: 12px; margin-top: 22px; text-align: left; }
.site-gate-label { color: #fff; font: 700 .82rem/1 system-ui, sans-serif; }
.site-gate-input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 4px;
  background: #0d0e10;
  color: #f4f4f5;
  font: 500 1rem/1.5 system-ui, sans-serif;
}
.site-gate-input:focus {
  outline: 2px solid #ff6a2b;
  outline-offset: 2px;
  border-color: rgba(255, 106, 43, .7);
}
.site-gate-error { margin: 0; color: #ffb3a8; font: 700 .85rem/1.5 system-ui, sans-serif; }
.site-gate-btn {
  min-height: 46px;
  margin-top: 4px;
  border: 1px solid rgba(255, 106, 43, .7);
  border-radius: 4px;
  background: linear-gradient(135deg, #e2341d, #ff6a2b);
  color: #fff;
  font: 900 .95rem/1 system-ui, sans-serif;
  letter-spacing: .04em;
  cursor: pointer;
}
.site-gate.is-error .site-gate-card { animation: site-gate-shake .4s ease; }
@keyframes site-gate-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}

/* 動きを抑える設定のユーザーには演出を無効化 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
