/*
  static/css/app.css
  人事書類 申請フォームの全画面の見た目。
  モチーフは「回覧ルート」：書類が 入力 → 承認 → 保存 → 対応 の駅を進む路線図。
  色は深緑の墨（ink）と、承認印の朱（seal）。他の社内システム（青・暖色・紫・茶金）と被らない組み合わせ。
*/
:root {
  --paper: #eef1ef;
  --surface: #ffffff;
  --surface-2: #f6f8f7;
  --ink: #13231f;
  --ink-2: #4b5c57;
  --ink-3: #7d8c87;
  --line: #d6dedb;
  --route: #0e7c66;
  --route-soft: #dcefe8;
  --seal: #d1432b;
  --seal-soft: #fbe7e2;
  --amber: #a86a12;
  --amber-soft: #fbf0dc;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(19, 35, 31, .06), 0 8px 24px rgba(19, 35, 31, .06);
  --font: "Zen Kaku Gothic New", "BIZ UDPGothic", "Yu Gothic UI", "Meiryo", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Consolas", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.7;
}
a { color: var(--route); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.35; margin: 0; font-weight: 700; letter-spacing: .02em; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* ---- ヘッダー ---------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--ink); color: #e8efec;
}
.topbar-in {
  max-width: 1080px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 24px; height: 60px;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 700; letter-spacing: .06em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 46px; height: 18px; }
.brand small { display: block; font-size: 10px; font-weight: 500; color: #9fb5ae; letter-spacing: .18em; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  color: #cfdbd7; padding: 8px 12px; border-radius: 999px; font-size: 14px; position: relative;
}
.nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; color: #fff; }
.nav a.on { background: rgba(255,255,255,.12); color: #fff; }
.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--seal); color: #fff; font-size: 12px; font-weight: 700;
  font-family: var(--mono); margin-left: 4px;
}
.user-chip { font-size: 13px; color: #9fb5ae; display: flex; align-items: center; gap: 8px; }
.user-chip form { margin: 0; }
.linklike { background: none; border: 0; color: #9fb5ae; cursor: pointer; font: inherit; padding: 0; }
.linklike:hover { color: #fff; }

/* ---- レイアウト -------------------------------------------------------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 20px 96px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; }
.page-head .sub { color: var(--ink-3); font-size: 13px; }
.section { margin-top: 34px; }
.section-title {
  display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: var(--ink-2);
  margin-bottom: 14px;
}
.section-title .num {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink); color: #fff; font-family: var(--mono); font-size: 13px;
}
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---- メッセージ ----------------------------------------------------------- */
.flash { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.flash li { padding: 12px 16px; border-radius: 10px; font-size: 14px; border: 1px solid; }
.flash .success { background: var(--route-soft); border-color: #b5ddd0; color: #0b5747; }
.flash .error { background: var(--seal-soft); border-color: #f1c2b8; color: #8f2615; }
.flash .info, .flash .warning { background: var(--amber-soft); border-color: #ecd3a6; color: #6e450b; }

/* ---- 回覧ルート（路線図） -------------------------------------------------- */
.route { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; margin: 6px 0 4px; }
.route::before {
  content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 11px; height: 4px;
  background: var(--line); border-radius: 2px;
}
.route .rail {
  position: absolute; left: 12.5%; top: 11px; height: 4px; background: var(--route); border-radius: 2px;
  width: calc(var(--done, 0) * 25%); transition: width .6s ease;
}
.station { position: relative; text-align: center; font-size: 12px; color: var(--ink-3); }
.station .dot {
  display: block; width: 26px; height: 26px; margin: 0 auto 4px; border-radius: 50%;
  background: var(--surface); border: 4px solid var(--line); position: relative; z-index: 1;
}
.station.passed .dot { border-color: var(--route); background: var(--route); }
.station.passed { color: var(--ink-2); }
.station.now .dot { border-color: var(--seal); background: var(--surface); }
.station.now .dot::after {
  content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--seal);
  opacity: 0; animation: ping 2.4s ease-out infinite;
}
.station.now { color: var(--seal); font-weight: 700; }
@keyframes ping { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.25); opacity: 0; } }
.route.compact { margin: 0; }
.route.compact .station { font-size: 0; }
.route.compact .dot { width: 14px; height: 14px; border-width: 3px; margin: 0 auto; }
.route.compact::before, .route.compact .rail { top: 5px; height: 3px; }
.route.compact .station.now .dot::after { inset: -6px; }

/* ---- ボタン・入力 ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink);
  color: #fff; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; letter-spacing: .04em;
  transition: transform .12s ease, background .2s ease;
}
.btn:hover { text-decoration: none; background: #24413a; }
.btn:active { transform: translateY(1px); }
.btn.seal { background: var(--seal); border-color: var(--seal); }
.btn.seal:hover { background: #b5361f; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.route-btn { background: var(--route); border-color: var(--route); }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.field { margin-bottom: 18px; }
.field > label, .field-label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field .req { color: var(--seal); font-size: 11px; margin-left: 6px; font-weight: 500; }
.field .help { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.field .err { font-size: 12px; color: var(--seal); margin-top: 4px; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=month],
input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); font: inherit; color: var(--ink); transition: border-color .15s, background .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--route); background: #fff; box-shadow: 0 0 0 3px var(--route-soft);
}
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row label {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; font-size: 14px; font-weight: 500;
}
.radio-row input { accent-color: var(--seal); margin: 0; }
.radio-row label:has(input:checked) { border-color: var(--seal); background: var(--seal-soft); color: #8f2615; font-weight: 700; }
.fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.fields-grid .wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .fields-grid { grid-template-columns: 1fr; } }
.form-errors { background: var(--seal-soft); color: #8f2615; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
.form-errors ul { margin: 0; padding-left: 18px; }

/* ---- ① 書類を選ぶ ------------------------------------------------------------ */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.doc-tile {
  display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); position: relative;
  transition: border-color .2s, transform .2s, box-shadow .2s; min-height: 132px;
}
a.doc-tile:hover { text-decoration: none; border-color: var(--route); transform: translateY(-2px); box-shadow: var(--shadow); }
.doc-tile .cat { font-size: 11px; letter-spacing: .14em; color: var(--route); font-weight: 700; }
.doc-tile .wish { font-size: 16px; font-weight: 700; line-height: 1.45; }
.doc-tile .title { font-size: 12px; color: var(--ink-3); margin-top: auto; }
.doc-tile .depts { display: flex; gap: 4px; }
.doc-tile .arrow { position: absolute; right: 16px; top: 16px; color: var(--line); transition: color .2s, transform .2s; }
a.doc-tile:hover .arrow { color: var(--route); transform: translateX(3px); }
.doc-tile.planned { background: transparent; border-style: dashed; color: var(--ink-3); min-height: 0; }
.doc-tile.planned .wish { font-size: 14px; font-weight: 500; }
.chip {
  display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}
.chip.hr { background: #e7eef8; border-color: #c9d7ec; color: #2c4a74; }
.chip.keiri { background: #eef3e2; border-color: #d4e0b8; color: #4d5f1c; }
.chip.soon { background: transparent; }

/* ---- あなたの番 ---------------------------------------------------------- */
.turns { display: grid; gap: 10px; }
.turn {
  display: grid; grid-template-columns: 6px 1fr auto; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px 14px 0;
  color: var(--ink); overflow: hidden;
}
.turn:hover { text-decoration: none; border-color: var(--seal); }
.turn .bar { align-self: stretch; background: var(--seal); border-radius: 0 3px 3px 0; }
.turn.dept .bar { background: var(--route); }
.turn .what { font-weight: 700; }
.turn .who { font-size: 13px; color: var(--ink-3); }
.turn .go { font-size: 13px; font-weight: 700; color: var(--seal); white-space: nowrap; }
.turn.dept .go { color: var(--route); }
.empty-turn { color: var(--ink-3); font-size: 14px; padding: 16px 0; }

/* ---- 対象者を選ぶ ------------------------------------------------------------ */
.picker { position: relative; }
.picker-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); max-height: 320px; overflow: auto;
}
.picker-results button {
  display: flex; width: 100%; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 0;
  background: none; text-align: left; font: inherit; cursor: pointer; border-bottom: 1px solid var(--surface-2);
}
.picker-results button:hover, .picker-results button:focus { background: var(--route-soft); outline: none; }
.picker-results .meta { font-size: 12px; color: var(--ink-3); }
.person {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px;
  background: var(--route-soft); border: 1px solid #b5ddd0;
}
.person .avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--route); color: #fff; display: grid;
  place-items: center; font-weight: 700;
}
.person .name { font-weight: 700; font-size: 16px; }
.person .meta { font-size: 12px; color: var(--ink-2); }
.person .change { margin-left: auto; }

.origin-field { margin: 16px 0 0; max-width: 420px; }
.origin-warn {
  margin-top: 8px; padding: 8px 12px; border-radius: 10px; font-size: 13px;
  background: var(--amber-soft); color: #6e450b; border: 1px solid #ecd3a6;
}

/* ---- 応援の日別表 ----------------------------------------------------------- */
.days { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.days th { font-size: 12px; color: var(--ink-3); font-weight: 500; text-align: left; padding: 6px 8px; }
.days td { padding: 4px 6px; border-top: 1px solid var(--surface-2); }
.days td.day { white-space: nowrap; font-family: var(--mono); width: 92px; }
.days td.day .wd { color: var(--ink-3); margin-left: 4px; }
.days td.day .wd.sun { color: var(--seal); }
.days td.day .wd.sat { color: #2c4a74; }
.days tr.none { opacity: .3; }
.days tr.filled td { background: var(--route-soft); }
.days input { padding: 6px 8px; }
.days td.worked { font-family: var(--mono); width: 70px; text-align: right; color: var(--route); font-weight: 700; }
.days-wrap { max-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.days-wrap thead th { position: sticky; top: 0; background: #fff; z-index: 1; }
.total-line { text-align: right; margin-top: 8px; font-size: 14px; }

/* ---- 送信バー ------------------------------------------------------------- */
.submit-bar {
  position: sticky; bottom: 16px; margin-top: 22px; display: flex; align-items: center; gap: 14px;
  background: var(--ink); color: #dce6e2; border-radius: 999px; padding: 10px 10px 10px 22px; box-shadow: var(--shadow);
}
.submit-bar .note { font-size: 13px; flex: 1; }
.submit-bar .btn.seal { box-shadow: 0 0 0 3px rgba(209, 67, 43, .25); }

/* ---- 詳細 ---------------------------------------------------------------- */
.status {
  display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.status.pending { background: var(--seal-soft); color: #8f2615; border-color: #f1c2b8; }
.status.returned, .status.save_failed { background: var(--amber-soft); color: #6e450b; border-color: #ecd3a6; }
.status.saved { background: var(--route-soft); color: #0b5747; border-color: #b5ddd0; }
.kv { width: 100%; border-collapse: collapse; }
.kv th { width: 34%; text-align: left; font-weight: 500; color: var(--ink-3); font-size: 13px; padding: 10px 12px 10px 0; vertical-align: top; }
.kv td { padding: 10px 0; border-bottom: 1px solid var(--surface-2); }
.side-block + .side-block { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--surface-2); }
.side-block h3 { font-size: 12px; color: var(--ink-3); font-weight: 500; letter-spacing: .1em; margin-bottom: 6px; }
.side-block .big { font-size: 16px; font-weight: 700; }
.path { font-family: var(--mono); font-size: 12px; word-break: break-all; color: var(--ink-2); }
.action-card { border: 2px solid var(--seal); }
.action-card h2 { font-size: 16px; margin-bottom: 4px; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
details.return-box { margin-top: 14px; }
details.return-box summary { cursor: pointer; color: var(--ink-2); font-size: 14px; }
.dept-state { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 13px; }
.timeline li::before {
  content: ""; position: absolute; left: 4px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--route);
}
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .when { font-family: var(--mono); color: var(--ink-3); font-size: 12px; }

/* ---- 一覧 ---------------------------------------------------------------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters select, .filters input { width: auto; min-width: 150px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--surface-2); vertical-align: middle; }
.table tr:hover td { background: var(--surface-2); }
.table .route.compact { width: 110px; }
.table-wrap { overflow-x: auto; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }

/* ---- 画面内のお知らせ ------------------------------------------------------ */
.toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 10px; z-index: 60; width: min(360px, calc(100vw - 36px)); }
.toast {
  background: var(--ink); color: #e8efec; border-radius: 14px; padding: 14px 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  border-left: 5px solid var(--seal); animation: slide .35s ease;
}
.toast.dept { border-left-color: #3fbf9f; }
.toast .t { font-weight: 700; font-size: 14px; }
.toast .b { font-size: 12px; color: #9fb5ae; margin: 2px 0 10px; }
.toast .acts { display: flex; gap: 8px; }
.toast .btn { padding: 6px 14px; font-size: 12px; }
.toast .btn.ghost { color: #e8efec; border-color: #3a524b; }
@keyframes slide { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.notify-hint {
  display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px dashed var(--route);
  border-radius: 12px; padding: 12px 16px; margin-bottom: 20px; font-size: 14px;
}
.notify-hint .btn { margin-left: auto; }

/* ---- 慶弔：葬儀の電話アラートと規程の目安 ------------------------------------------ */
.alarm {
  border: 2px solid var(--seal); background: var(--seal-soft); border-radius: 14px; padding: 16px 18px; margin: 4px 0 20px;
  animation: alarm-in .3s ease;
}
.alarm-head { display: flex; gap: 14px; align-items: center; color: #7a1f10; }
.alarm-mark {
  width: 44px; height: 44px; border-radius: 50%; background: var(--seal); color: #fff; display: grid; place-items: center;
  font-size: 22px; flex: none; animation: ring 1.6s ease-in-out infinite;
}
.alarm-tel {
  display: block; margin: 12px 0 10px; padding: 12px 16px; border-radius: 10px; background: #fff; color: var(--seal);
  font-size: 20px; font-weight: 700; text-align: center; border: 1px solid #f1c2b8;
}
a.alarm-tel:hover { text-decoration: none; background: #fff6f4; }
.alarm .alarm-check { margin: 0; }
.alarm .alarm-flowers { margin: 14px 0 4px; }
.alarm .alarm-flowers .radio-row label { background: #fff; font-size: 15px; padding: 9px 22px; }
@keyframes ring { 0%, 70%, 100% { transform: rotate(0); } 75% { transform: rotate(-14deg); } 85% { transform: rotate(12deg); } 92% { transform: rotate(-6deg); } }
@keyframes alarm-in { from { transform: scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .alarm-mark { animation: none; } }
label.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
label.check input { width: 18px; height: 18px; accent-color: var(--seal); }
.rule-box { border: 1px solid #b5ddd0; background: var(--route-soft); border-radius: 12px; padding: 14px 16px; margin: 4px 0 18px; }
.rule-title { font-size: 13px; font-weight: 700; color: #0b5747; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rule-figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0 6px; }
.rule-figs > div { background: #fff; border-radius: 10px; padding: 8px 12px; }
.rule-figs .k { display: block; font-size: 11px; color: var(--ink-3); }
.rule-figs .v { font-size: 17px; font-weight: 700; }
.rule-notes { margin: 6px 0 0; padding-left: 18px; font-size: 12px; color: var(--ink-2); }
.leave-row { display: grid; grid-template-columns: 160px 1fr 1fr; gap: 0 18px; }
.urgent-tag { display: inline-block; background: var(--seal); color: #fff; border-radius: 6px; padding: 0 8px; font-size: 12px; font-weight: 700; margin-right: 6px; }
@media (max-width: 640px) { .rule-figs { grid-template-columns: 1fr; } .leave-row { grid-template-columns: 1fr; } }

/* ---- スマホ幅（店主がスマホで承認する場面） ------------------------------------- */
.nav a { white-space: nowrap; }
@media (max-width: 720px) {
  .topbar-in { gap: 8px; padding: 0 12px; }
  .brand > span, .user-chip > span { display: none; }
  .nav { gap: 0; }
  .nav a { padding: 6px 9px; font-size: 13px; }
  .wrap { padding: 20px 14px 80px; }
  .page-head h1 { font-size: 19px; }
  .card { padding: 16px; }
  .kv th { width: 30%; }
  .route .station { font-size: 11px; }
  .submit-bar { border-radius: 16px; flex-direction: column; align-items: stretch; padding: 12px; }
  .turn { grid-template-columns: 6px 1fr; }
  .turn .go { grid-column: 2; }
  .days td.day { width: 70px; }
}

/* ---- ログイン ------------------------------------------------------------- */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--ink); }
.login {
  width: min(400px, 100%); background: var(--paper); border-radius: 22px; padding: 34px 30px 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.login-route { width: 100%; height: 64px; display: block; margin-bottom: 18px; }
.login-route .track { stroke: var(--line); stroke-width: 4; stroke-linecap: round; }
.login-route .lit { stroke: var(--route); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 300; stroke-dashoffset: 300;
  animation: lit 6s ease-in-out infinite; }
.login-route .stn { fill: var(--paper); stroke: var(--line); stroke-width: 3.5; }
.login-route .stn.on { animation: stn 6s ease-in-out infinite; }
.login-route .seal { fill: var(--seal); opacity: 0; animation: seal 6s ease-in-out infinite; transform-origin: 110px 32px; transform-box: view-box; }
.login-route .doc { animation: travel 6s ease-in-out infinite; }
@keyframes lit { 0% { stroke-dashoffset: 300; } 70%, 88% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes travel { 0% { transform: translateX(0); } 70%, 88% { transform: translateX(240px); } 100% { transform: translateX(240px); opacity: 0; } }
@keyframes seal { 0%, 22% { opacity: 0; transform: scale(1.6); } 28%, 90% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .login-route .lit, .login-route .doc, .login-route .seal, .station.now .dot::after { animation: none; }
  .login-route .lit { stroke-dashoffset: 0; }
}
.login h1 { font-size: 20px; letter-spacing: .08em; }
.login .lead { font-size: 12px; color: var(--ink-3); letter-spacing: .2em; margin: 2px 0 24px; }
.login .error { background: var(--seal-soft); color: #8f2615; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.login .btn { width: 100%; margin-top: 6px; padding: 13px; }
.login .foot { margin-top: 18px; font-size: 12px; color: var(--ink-3); text-align: center; }

/* ---- 操作ガイド（static/js/guide.js） ---------------------------------------- */
.guide-start {
  background: transparent; border: 1px solid #3a524b; color: #cfdbd7; border-radius: 999px;
  padding: 3px 11px; font: inherit; font-size: 12px; cursor: pointer;
}
.guide-start:hover { background: rgba(255,255,255,.08); color: #fff; }
.guide-veil { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.guide-veil[hidden] { display: none; }
.guide-spot {
  position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(10, 20, 17, .62);
  outline: 2px solid #3fbf9f; outline-offset: 2px; transition: all .25s ease;
}
.guide-balloon {
  position: fixed; width: min(360px, calc(100vw - 24px)); pointer-events: auto;
  background: var(--surface); border-radius: 16px; padding: 16px 18px 14px; box-shadow: 0 18px 50px rgba(0,0,0,.35);
  border-top: 4px solid var(--route);
}
.guide-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.guide-title { font-weight: 700; font-size: 14px; }
.guide-count { font-size: 12px; color: var(--ink-3); }
.guide-dots { display: flex; gap: 4px; margin: 8px 0 2px; }
.guide-dots i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.guide-dots i.on { background: var(--route); }
.guide-dots i.now { background: var(--seal); }
.guide-text { font-size: 14px; line-height: 1.75; margin: 10px 0 14px; }
.guide-foot { display: flex; gap: 6px; align-items: center; }
@media (max-width: 720px) { .guide-start { padding: 3px 8px; } }
@media (prefers-reduced-motion: reduce) { .guide-spot { transition: none; } }

/* ---- 使い方ページ ----------------------------------------------------------- */
.help-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.help-tabs a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 700; }
.help-tabs a:hover { border-color: var(--route); text-decoration: none; }
.help-role { scroll-margin-top: 80px; margin-bottom: 22px; }
.help-role h2 { font-size: 18px; display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.help-role .who { font-size: 13px; color: var(--ink-3); margin: 0 0 14px; }
.help-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.help-steps li { position: relative; padding: 0 0 16px 44px; counter-increment: step; }
.help-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: #fff; display: grid; place-items: center; font-family: var(--mono); font-size: 13px;
}
.help-steps li::after { content: ""; position: absolute; left: 13px; top: 30px; bottom: 4px; width: 2px; background: var(--line); }
.help-steps li:last-child::after { display: none; }
.help-steps strong { display: block; }
.help-steps span { font-size: 14px; color: var(--ink-2); }
.help-faq dt { font-weight: 700; margin-top: 14px; }
.help-faq dd { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }

/* ---- 本人が署名する書類（印刷用）・アップロード・保存した書類の一覧 ------------------- */
.print-kit { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.print-item {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
}
.print-item:hover { border-color: var(--route); text-decoration: none; background: #fff; }
.print-item.agree { border-style: dashed; border-color: var(--route); }
.print-icon {
  width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center;
  font-size: 18px; flex: none;
}
.upload-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.upload-form input[type=text] { width: 200px; }
.upload-form input[type=file] { flex: 1; min-width: 220px; font: inherit; font-size: 13px; }
.file-list { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; }
.file-list li { padding: 3px 0 3px 16px; position: relative; word-break: break-all; }
.file-list li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 6px; height: 6px; border-radius: 2px; background: var(--route); }
.file-list li.att::before { background: var(--seal); border-radius: 50%; }
.new-person { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .new-person { grid-template-columns: 1fr; } }
