/* 求人赤信号チェッカー 共通スタイル */
:root {
  color-scheme: dark;
  --ground: #140a09;
  --ground-2: #1f1210;
  --line: #3a2522;
  --yellow: #ffd537;
  --red: #c82a1c;
  --white: #f6f2ee;
  --body: #e2d8d4;
  --muted: #b9a9a4;
  --paper: #f7f6f1;
  --paper-rule: #d6dfe8;
  --ink: #1c1a19;
  --pen: #d42a1d;
  --ok: #7f9f72;
  --sans: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --pen-font: "Klee One", "Hiragino Maru Gothic ProN", "Yu Gothic", cursive;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--white);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* PR表記（config.jsで表示） */
.pr-bar {
  background: #000;
  color: var(--muted);
  font-size: 11px;
  padding: 6px 16px;
  text-align: center;
  letter-spacing: .04em;
}
.pr-bar b { color: var(--yellow); margin-right: .5em; }

/* ヘッダー */
.site-header {
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}
.site-header .in {
  max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap;
}
.logo { font-weight: 900; font-size: 18px; letter-spacing: .02em; text-decoration: none; line-height: 1.2; }
.logo span { color: var(--yellow); }
.site-nav { display: flex; gap: 14px; font-size: 13px; font-weight: 700; }
.site-nav a { text-decoration: none; color: var(--muted); padding-block: 4px; }
.site-nav a[aria-current] { color: var(--white); border-bottom: 2px solid var(--yellow); }

main { max-width: 640px; margin: 0 auto; padding: 28px 16px 56px; display: flex; flex-direction: column; gap: 40px; }

/* テロップ風見出し */
.telop {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .08em;
  padding: 3px 10px 3px 12px;
  transform: skewX(-8deg);
  text-decoration: none;
}
.telop > span { display: inline-block; transform: skewX(8deg); }
h1, h2, h3 { font-weight: 900; line-height: 1.4; margin: 8px 0 0; text-wrap: balance; word-break: auto-phrase; }
h1.word-title { font-size: 25px; }
h1, h2 { color: var(--yellow); }
h1 { font-size: 28px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; color: var(--white); }
.lead { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.hero-sub { font-size: 20px; font-weight: 900; line-height: 1.5; margin: 6px 0 0; }
.prose p { margin: 12px 0 0; color: var(--body); }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 900 16px var(--sans);
  background: var(--yellow); color: #1a1200;
  border: 2px solid var(--yellow); border-radius: 3px;
  padding: 13px 20px; width: 100%;
  cursor: pointer; text-decoration: none; text-align: center; line-height: 1.4;
}
.btn.ghost { background: transparent; color: var(--yellow); }
.btn.small { width: auto; font-size: 13px; padding: 7px 12px; border-width: 1px; }
.btn.plain { background: transparent; color: var(--muted); border-color: var(--line); }
.link-btn { background: none; border: 0; padding: 0; font: 700 14px var(--sans); color: var(--yellow); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.toast { font-size: 13px; color: var(--yellow); min-height: 1.5em; margin: 8px 0 0; }

/* 入力画面 */
.input-area textarea {
  display: block; width: 100%; min-height: 220px; margin-top: 18px;
  font: 400 16px/1.7 var(--sans);
  background: var(--paper); color: var(--ink);
  border: 0; border-radius: 2px; padding: 14px;
  resize: vertical;
}
.input-area textarea::placeholder { color: #8a8580; }
.input-area .btn { margin-top: 12px; }
.input-sub { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; font-size: 12px; color: var(--muted); }
.error { color: #ff8a7a; font-size: 13px; font-weight: 700; margin: 8px 0 0; }

.steps { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }
.steps li { border-bottom: 1px solid var(--line); padding: 12px 0; display: grid; grid-template-columns: 5.5em 1fr; gap: 12px; font-size: 14px; color: var(--body); }
.steps b { color: var(--yellow); font-weight: 900; }

.word-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.word-chips a {
  font-size: 13px; font-weight: 700; text-decoration: none;
  border: 1px solid var(--line); background: var(--ground-2);
  padding: 6px 10px; border-radius: 2px;
}
.word-chips a:hover { border-color: var(--yellow); }
.more { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--yellow); text-underline-offset: 3px; }

/* 結果：要約 */
.summary { display: flex; gap: 10px; margin-top: 16px; }
.summary div { flex: 1; border: 1px solid var(--line); background: var(--ground-2); padding: 10px 12px; }
.summary b { display: block; font-size: 30px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.summary div:first-child b { color: var(--yellow); }
.summary span { font-size: 12px; color: var(--muted); }

/* 添削された求人票 */
.paper-wrap { position: relative; }
.paper-label { font-size: 11px; color: var(--muted); margin: 0 0 6px; }
.paper {
  background: var(--paper);
  color: var(--ink);
  padding: 14px 16px 18px;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, var(--paper-rule) 31px, var(--paper-rule) 32px);
  background-position: 0 14px;
  line-height: 32px;
  font-size: 14.5px;
  overflow-wrap: anywhere;
}
.paper.clamped { max-height: 560px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
.paper p { margin: 0; min-height: 32px; }
.paper-more { margin-top: 8px; }
mark { background: none; color: inherit; padding: 0 2px; }
mark.flag {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M1 5 C 20 2, 35 7, 55 4 S 85 3, 99 5' stroke='%23d42a1d' stroke-width='2.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 7px;
  background-position: 0 100%;
}
mark.circle {
  border: 2px solid var(--pen);
  border-radius: 48% 52% 44% 56% / 58% 42% 60% 40%;
  padding: 0 4px;
}
.no { font-family: var(--pen-font); color: var(--pen); font-size: 12px; vertical-align: super; line-height: 0; margin-left: 1px; }
.note {
  display: block;
  font-family: var(--pen-font);
  color: var(--pen);
  font-size: 14.5px;
  padding-left: 1.2em;
  transform: rotate(-1.2deg);
  transform-origin: left;
}
.note::before { content: "↳ "; }

/* 結果：リスト */
.items { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }
.items > li { border-bottom: 1px solid var(--line); padding: 16px 0; }
.items p { margin: 6px 0 0; color: var(--body); font-size: 14px; }
.word { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.word .no { font-size: 15px; vertical-align: baseline; line-height: 1; }
.word strong { font-size: 17px; font-weight: 900; }
.empty { color: var(--body); font-size: 14px; border: 1px dashed var(--line); padding: 14px; margin-top: 16px; }

.missing li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: baseline; padding: 12px 0; }
.missing .name { font-weight: 700; font-size: 15px; }
.missing .st { font-size: 12px; font-weight: 700; white-space: nowrap; }
.missing .st.ng { color: var(--white); background: var(--red); padding: 1px 8px; }
.missing .st.ok, .missing .st.na { color: var(--muted); }
.missing .st.ok::before { content: "✓ "; color: var(--ok); }
.missing p { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--body); }
.missing p a { color: var(--yellow); font-weight: 700; }
.missing li.done .name { color: var(--muted); font-weight: 400; }
.caveat { font-size: 12px; color: var(--muted); margin: 10px 0 0; }

.qs li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 14px 0; }
.qs input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--yellow); }
.qs label { font-size: 15px; font-weight: 700; line-height: 1.6; cursor: pointer; }
.qs small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* 保存フォーム */
.panel { background: var(--ground-2); border: 1px solid var(--line); padding: 18px 16px; }
.panel label { font-size: 13px; font-weight: 700; display: block; margin-bottom: 6px; }
.field {
  width: 100%; font: 400 16px var(--sans);
  background: var(--ground); color: var(--white);
  border: 1px solid #5a403b; border-radius: 3px; padding: 11px 12px;
}
.panel .btn { margin-top: 10px; }
.warn { font-size: 12px; color: var(--muted); margin: 12px 0 0; padding-left: 10px; border-left: 2px solid var(--yellow); }
.warn .link-btn { font-size: 12px; }

.again { display: grid; gap: 10px; }

/* 広告枠（config.jsで表示） */
.ad { border: 2px solid var(--red); padding: 18px 16px; position: relative; }
.ad .tag { position: absolute; top: -10px; left: 12px; background: var(--ground); color: var(--muted); font-size: 11px; padding: 0 6px; letter-spacing: .08em; }
.ad p { margin: 0 0 14px; font-size: 15px; font-weight: 700; }
.ad p span { color: var(--yellow); }

/* スクショ用 */
.shot {
  position: fixed; inset: 0; z-index: 10;
  background: var(--paper); color: var(--ink);
  overflow-y: auto;
  padding: calc(env(safe-area-inset-top, 0px) + 20px) 20px calc(env(safe-area-inset-bottom, 0px) + 24px);
}
.shot .in { max-width: 520px; margin: 0 auto; }
.shot h2 { color: var(--ink); font-size: 20px; margin: 0; border-bottom: 3px solid var(--red); padding-bottom: 6px; }
.shot .meta { font-size: 12px; color: #6b6560; margin: 6px 0 0; }
.shot ol { margin: 16px 0 0; padding-left: 1.4em; display: grid; gap: 12px; }
.shot li { font-size: 15px; font-weight: 700; line-height: 1.6; }
.shot li small { display: block; font-weight: 400; font-size: 12px; color: #6b6560; }
.shot .foot { margin-top: 20px; font-size: 11px; color: #6b6560; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.shot .close { background: var(--ink); color: var(--paper); border: 0; font: 700 13px var(--sans); padding: 8px 14px; border-radius: 3px; cursor: pointer; }

/* 保存した求人 */
.saved-list { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--line); }
.saved-list > li { border-bottom: 1px solid var(--line); padding: 14px 0; }
.saved-row { display: grid; grid-template-columns: 1fr 4.2em 4.2em; gap: 10px; align-items: center; }
.saved-row .nm { font-weight: 900; font-size: 16px; overflow-wrap: anywhere; }
.saved-row .dt { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.saved-row .n { text-align: center; font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.1; }
.saved-row .n.y { color: var(--yellow); }
.saved-head { display: grid; grid-template-columns: 1fr 4.2em 4.2em; gap: 10px; font-size: 11px; color: var(--muted); margin-top: 16px; }
.saved-head span { text-align: center; line-height: 1.3; }
.saved-ops { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.saved-detail { margin-top: 10px; font-size: 13px; color: var(--body); }
.saved-detail ul { margin: 4px 0 0; padding-left: 1.2em; }
.confirm { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; margin-top: 10px; color: var(--white); }

/* 解説ページ */
.crumbs { font-size: 12px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.point { font-size: 16px; font-weight: 700; color: var(--white); border-left: 3px solid var(--red); padding-left: 12px; margin: 16px 0 0; }
.kw { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.kw span { font-size: 13px; background: var(--paper); color: var(--ink); padding: 2px 8px; }
.cta { display: grid; gap: 10px; }
.cat-group + .cat-group { margin-top: 28px; }
.flag-list { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--line); }
.flag-list li { border-bottom: 1px solid var(--line); }
.flag-list a { display: block; padding: 12px 0; text-decoration: none; }
.flag-list strong { display: block; font-size: 16px; font-weight: 900; }
.flag-list span { display: block; font-size: 13px; color: var(--muted); }
.flag-list a:hover strong { color: var(--yellow); }

/* 表組み（運営者情報など） */
.info { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.info th, .info td { text-align: left; vertical-align: top; padding: 12px 0; border-bottom: 1px solid var(--line); }
.info th { width: 7em; color: var(--muted); font-weight: 700; padding-right: 12px; }
.prose h2 { font-size: 18px; margin-top: 28px; }
.prose ul { color: var(--body); padding-left: 1.2em; }

/* フッター */
.site-footer { border-top: 1px solid var(--line); padding: 24px 16px 40px; font-size: 12px; color: var(--muted); }
.site-footer .in { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.site-footer p { margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  mark.flag { animation: draw .6s ease-out both; }
  @keyframes draw { from { background-size: 0 7px; } }
}
