/* 起動の守りの見た目：案内板（#board）と、中身の点検（?check の .check-view）。
   案内板は、公園が開けないとき（html[data-boot='failed']。boot.js）と、JavaScript が無いとき（html.no-js）だけ出る。
   main.css が届かなくても読めるよう、ここだけで組む。色は palette.css の変数だけ（無ければ字は黒・地は白のまま） */

.board { display: none; }
html.no-js .board,
html[data-boot='failed'] .board {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(28px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(36px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: var(--paper);
  color: var(--ink);
}
/* 案内板のあいだは、動かない公園と紙を見せない（読み上げも、案内板から始まる） */
html.no-js .skip, html[data-boot='failed'] .skip,
html.no-js .mast, html.no-js main, html.no-js .status, html.no-js .cursor-tool,
html[data-boot='failed'] .mast, html[data-boot='failed'] main, html[data-boot='failed'] .status,
html[data-boot='failed'] .cursor-tool, html[data-boot='failed'] .sheet, html[data-boot='failed'] .ride,
html[data-boot='failed'] .veil { display: none !important; }

.board-card { width: min(100%, 540px); text-align: center; }
.board-art { display: block; width: min(100%, 300px); height: auto; margin: 0 auto 6px; overflow: visible; }
.board-art .ink { fill: none; stroke: var(--c-ink); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.board-art .thin { stroke-width: .9; }
.board-art .wood { fill: var(--c-wood); }
.board-art .wood-sh { fill: var(--c-wood-sh); }
.board-art .paper { fill: var(--c-paper); }
.board-art .pin { fill: var(--c-coral); }
.board-art .lawn { fill: var(--c-lawn); }
.board-title {
  margin: 10px 0 12px;
  font-family: var(--f-serif, serif);
  font-weight: 400;
  font-size: clamp(21px, 5.6vw, 30px);
  line-height: 1.5;
  letter-spacing: .04em;
}
.board-title:focus { outline: none; }
.board-title:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.board .noscript { padding: 0; } /* main.css の .noscript（前の置き方の余白）を消す */
.board-text, .board .noscript p { margin: 0 auto 8px; max-width: 30em; font-size: 15px; line-height: 1.85; text-wrap: pretty; }
.board .noscript b { font-family: var(--f-serif, serif); font-weight: 600; font-size: 18px; }
html.no-js .board-text, html.no-js .board-reload { display: none; }
.board-ways { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; margin: 22px 0 0; }
.board-ways a, .board-ways button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.board-ways a:hover, .board-ways button:hover { background: var(--paper-2); }
.board-ways a:focus-visible, .board-ways button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ?check のときだけ、案内板に出す理由の 1 行（どのファイルの何行目か） */
.board-why {
  margin: 4px auto 0;
  max-width: 34em;
  padding: 6px 10px;
  border: 1px dashed var(--ink-2);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  color: var(--ink-2);
}

/* ---------- 遅いときの小さな知らせ（起動から 8 秒。boot.js が足して、ready() か案内板でしまう） ---------- */
.boot-slow {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 95;
  transform: translateX(-50%);
  width: min(440px, calc(100vw - 32px));
  padding: 10px 14px 12px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}
.boot-slow p { margin: 0; }
.boot-slow-ways { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; margin-top: 6px !important; }
.boot-slow-ways a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
}
.boot-slow-ways a:hover { background: var(--paper-2); }
.boot-slow-ways a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
html[data-boot='failed'] .boot-slow { display: none; }

/* ---------- 中身の点検（index.html?check） ---------- */
.check-view {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 400;
  width: min(580px, calc(100vw - 24px));
  max-height: min(72vh, 680px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px 18px 16px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
}
.check-view h2 { margin: 0 52px 2px 0; font-family: var(--f-serif, serif); font-weight: 600; font-size: 18px; letter-spacing: .03em; }
.check-view .check-sum { margin: 0 0 10px; color: var(--ink-2); }
.check-view ol { margin: 0; padding: 0; list-style: none; }
.check-view li { padding: 9px 0; border-top: 1px solid var(--hair); }
.check-view .check-lv { display: inline-block; margin-right: 8px; padding: 0 7px; border: 1px solid currentColor; border-radius: 4px; font-size: 12px; line-height: 1.6; }
.check-view .check-lv[data-lv='bad'] { color: var(--coral-2); }
.check-view .check-at { font-weight: 600; }
.check-view .check-what { display: block; margin-top: 2px; }
.check-view .check-how { display: block; color: var(--ink-2); }
.check-view .check-sub { margin: 16px 0 2px; font-size: 15px; font-weight: 600; }
.check-view .check-lv[data-lv='tidy'] { color: var(--ink-2); }
.check-view .check-close {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.check-view .check-close:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }

@media print { .board, .check-view, .boot-slow { display: none !important; } }
