/* 共通ログインの画面。色は会社のロゴ（明るい緑 #92D49C から青緑 #36A286）から取る。
   画面に CSS を直接書かない（CSP の style-src 'self'）。外のフォント・画像は読まない。
   文字は本文16px・最小14px（デジタル庁）、文字の色は背景と4.5:1以上、入力欄の枠は3:1以上（WCAG 1.4.3・1.4.11）。
   数えて確かめる：tools/contrast_check.py */
:root {
  --bg: #f2f6f4;
  --glow-1: rgba(146, 212, 156, 0.42);
  --glow-2: rgba(54, 162, 134, 0.20);
  --card: #ffffff;
  --card-edge: rgba(16, 40, 34, 0.07);
  --text: #12201c;
  --sub: #4b5d57;
  --line: #879892;
  --line-hover: #5f716b;
  --hair: #e4ebe8;
  --accent: #0f7462;
  --accent-top: #137f69;
  --accent-press: #0b5e50;
  --on-accent: #ffffff;
  --link: #0d6b5a;
  --ring: rgba(54, 162, 134, 0.38);
  --err: #a4231a;
  --err-bg: #fdf1f0;
  --err-edge: #efb7b1;
  --info: #0b6448;
  --info-bg: #eefaf3;
  --info-edge: #a9e1c3;
  --shadow: 0 1px 2px rgba(16, 40, 34, 0.05), 0 18px 48px -18px rgba(16, 40, 34, 0.28);
  --btn-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 8px 18px -8px rgba(15, 116, 98, 0.65);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1311;
    --glow-1: rgba(146, 212, 156, 0.12);
    --glow-2: rgba(54, 162, 134, 0.16);
    --card: #111c19;
    --card-edge: rgba(230, 245, 240, 0.08);
    --text: #e8f2ee;
    --sub: #a6b8b2;
    --line: #6f837c;
    --line-hover: #93a7a0;
    --hair: #22312d;
    --accent: #3fc3a1;
    --accent-top: #55d1b0;
    --accent-press: #33a98a;
    --on-accent: #04140f;
    --link: #6fd9bc;
    --ring: rgba(63, 195, 161, 0.40);
    --err: #ffb4ab;
    --err-bg: #3a1714;
    --err-edge: #7a2f28;
    --info: #9be6c3;
    --info-bg: #0f2a20;
    --info-edge: #2a5d47;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 48px -18px rgba(0, 0, 0, 0.7);
    --btn-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 8px 18px -8px rgba(63, 195, 161, 0.45);
  }
}

* { box-sizing: border-box; }
/* ★hidden の付いた物は必ず隠す（.alert の display:flex などが hidden を上書きして、空の枠が見えていた・2026-10-22） */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  color: var(--text);
  background:
    radial-gradient(1100px 640px at 8% -12%, var(--glow-1), transparent 62%),
    radial-gradient(900px 560px at 108% 112%, var(--glow-2), transparent 60%),
    var(--bg);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  /* 日本語を文節の途中で折り返さない（対応していないブラウザは今までどおり折り返す） */
  word-break: auto-phrase;
  line-break: strict;
}
.shell { width: 100%; max-width: 420px; }

/* ロゴと名前 */
.brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 20px; }
.brand img { width: 44px; height: 44px; display: block; filter: drop-shadow(0 4px 10px rgba(16, 40, 34, 0.18)); }
.brand .name { font-size: 18px; font-weight: 700; letter-spacing: 0.04em; line-height: 1.3; font-feature-settings: "palt" 1; }
.brand .tag { font-size: 14px; color: var(--sub); line-height: 1.4; }

/* 札 */
.card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 18px;
  padding: 34px 32px 28px;
  box-shadow: var(--shadow);
  animation: rise 0.38s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
/* 札の上の細い帯（ロゴの明るい緑から青緑） */
.card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, #92d49c, #36a286);
}
h1 { font-size: 24px; line-height: 1.35; margin: 0 0 6px; letter-spacing: 0.02em; font-feature-settings: "palt" 1; }
p { margin: 0 0 12px; }
.lead, .sub { color: var(--sub); font-size: 14px; margin: 0 0 24px; }
.note { color: var(--sub); font-size: 14px; }
.note.center { text-align: center; margin: 14px 0 0; }

/* 入力 */
.field { margin: 0 0 18px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.control { position: relative; }
input[type="text"], input:not([type]), input[type="password"], input[type="email"] {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[readonly] { background: transparent; border-style: dashed; }
input:hover { border-color: var(--line-hover); }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.control input[type="password"], .control input.revealed { padding-right: 72px; }
.reveal {
  position: absolute; right: 6px; top: 6px;
  height: 36px; padding: 0 12px;
  font: inherit; font-size: 14px; font-weight: 600;
  color: var(--sub); background: transparent;
  border: 0; border-radius: 8px; cursor: pointer;
}
.reveal:hover { color: var(--text); background: var(--hair); }
.reveal:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.hint { font-size: 14px; color: var(--sub); margin: 6px 0 0; }
.caps { color: var(--err); font-weight: 600; }

/* チェック */
.check { display: flex; gap: 10px; align-items: flex-start; margin: 2px 0 20px; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--accent); flex: none; }
.check .hint { display: block; font-weight: 400; margin-top: 2px; }

/* ボタン */
.btn {
  width: 100%; height: 50px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-size: 16px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--on-accent);
  background: linear-gradient(180deg, var(--accent-top), var(--accent));
  border: 0; border-radius: 12px;
  box-shadow: var(--btn-shadow);
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.06s ease, box-shadow 0.15s ease;
}
a.btn { text-decoration: none; }
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:active { transform: translateY(1px); background: var(--accent-press); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring), var(--btn-shadow); }
.btn:disabled { cursor: progress; filter: saturate(0.85); }
.btn .spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.7s linear infinite; display: none;
}
.btn.busy .spin { display: inline-block; }

/* 2つめの道（会社のメールが無い方）：上の線で分け、ボタンは枠だけ（主のボタンと並べて、どちらが先かを見せる） */
.alt { margin: 28px 0 0; padding: 22px 0 0; border-top: 1px solid var(--hair); }
h2 { font-size: 16px; line-height: 1.4; margin: 0 0 6px; letter-spacing: 0.02em; font-feature-settings: "palt" 1; }
.alt .note { margin: 0 0 16px; }
.btn.btn-sub { color: var(--accent); background: transparent; border: 1px solid var(--accent); box-shadow: none; }
.btn.btn-sub:hover { background: var(--info-bg); filter: none; }
.btn.btn-sub:active { background: var(--info-bg); }
.btn.btn-sub:focus-visible { box-shadow: 0 0 0 4px var(--ring); }

/* 知らせ */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; margin: 0 0 22px;
  font-size: 14px; line-height: 1.6;
  border: 1px solid; border-radius: 12px;
}
.alert::before { content: "!"; flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 14px; font-weight: 800; line-height: 1; margin-top: 1px; }
.alert.err, .err { color: var(--err); background: var(--err-bg); border-color: var(--err-edge); }
.alert.err::before { background: var(--err); color: var(--err-bg); }
.alert.info, .info { color: var(--info); background: var(--info-bg); border-color: var(--info-edge); }
.alert.info::before { content: "✓"; background: var(--info); color: var(--info-bg); }

/* 下の案内 */
.links { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--hair); text-align: center; font-size: 14px; }
a { color: var(--link); font-weight: 600; text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: none; border-radius: 4px; box-shadow: 0 0 0 3px var(--ring); }
.foot { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--sub); }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  * { transition: none !important; }
  .btn .spin { animation-duration: 2s; }
}
@media (max-width: 480px) {
  body { padding: 28px 16px; place-items: start center; }
  .card { padding: 28px 20px 24px; border-radius: 16px; }
  h1 { font-size: 22px; }
}
