/* サクッと履歴書 — すっきりした今どきのアプリの見た目。
   色: 明るいグレーの地＋白いカード＋明るい青1色（黒の面は使わない）。
   角丸: カード20px・ボタンと入力14px・チップは丸。文字は端末のゴシック（太字は700〜800）。 */
:root {
  --bg: #f2f4f6;
  --surface: #ffffff;
  --surface-2: #f2f4f6;
  --text: #191f28;
  --text-2: #4e5968;
  --mute: #8b95a1;
  --line: #e5e8eb;
  --primary: #3182f6;
  --primary-press: #1b64da;
  --primary-soft: #e8f3ff;
  --primary-ink: #1957c2;
  --ok: #03b26c;
  --warn: #f04452;
  --r-card: 20px;
  --r-btn: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", "Segoe UI", sans-serif;
  --w: 680px;
  --tabbar: 62px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17171c;
    --surface: #202027;
    --surface-2: #2c2c35;
    --text: #e4e4e5;
    --text-2: #b0b0b8;
    --mute: #7e7e87;
    --line: #2c2c35;
    --primary: #3182f6;
    --primary-press: #4b93f8;
    --primary-soft: #1d2a40;
    --primary-ink: #8ab9ff;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.75; -webkit-font-smoothing: antialiased; padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
body.app { padding-bottom: 0; }
a { color: var(--primary-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-weight: 800; line-height: 1.4; letter-spacing: -.01em; color: var(--text); }
h1 { font-size: 1.6rem; margin: .2em 0 .45em; }
h2 { font-size: 1.25rem; margin: 2em 0 .7em; }
h3 { font-size: 1.05rem; font-weight: 700; margin: 1.6em 0 .5em; }
p { margin: 0 0 1em; }
strong { font-weight: 700; color: var(--text); }
small, .note { color: var(--mute); font-size: .86rem; }
.inner, main { max-width: var(--w); margin: 0 auto; padding: 0 20px; }
main { padding-bottom: 40px; }
main.wide { max-width: 1240px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }

/* ---- ヘッダー ---- */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); }
.site-header .inner { display: flex; align-items: center; gap: 10px; height: 56px; max-width: 1240px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.04rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .chip { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--primary); color: #fff; font-size: .95rem; }
.brand b { font-weight: 800; color: var(--primary); }
.gnav { margin-left: auto; display: none; gap: 2px; }
.gnav a { padding: 7px 13px; font-size: .9rem; font-weight: 600; color: var(--text-2); text-decoration: none; border-radius: 10px; white-space: nowrap; }
.gnav a.active, .gnav a:hover { background: var(--surface); color: var(--text); }
.head-cta { margin-left: auto; }
@media (min-width: 1024px) { .gnav { display: flex; } .head-cta { margin-left: 8px; } }

/* ---- 下のタブバー（スマホ） ---- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; text-decoration: none; color: var(--mute); font-size: .66rem; font-weight: 600; }
.tabbar a i { font-size: 1.5rem; line-height: 1.1; }
.tabbar a.on { color: var(--primary); }
@media (min-width: 1024px) { .tabbar { display: none; } body { padding-bottom: 0; } }
body.app .tabbar { display: none; }

.crumbs { font-size: .78rem; color: var(--mute); margin: 8px 0 0; }
.crumbs a { color: var(--mute); }

/* ---- 冒頭 ---- */
.hero { padding: 12px 0 4px; }
.kicker { display: inline-block; font-size: .78rem; font-weight: 700; color: var(--primary-ink); background: var(--primary-soft); padding: 3px 10px; border-radius: 8px; margin-bottom: 8px; }
.hero .lead { color: var(--text-2); }
.answer { background: var(--surface); border-radius: var(--r-card); padding: 18px 20px 6px; margin: 12px 0 18px; }
.answer::before { content: "ポイント"; display: block; font-size: .78rem; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
.updated { font-size: .78rem; color: var(--mute); }

/* ---- 部品 ---- */
.card { background: var(--surface); border-radius: var(--r-card); padding: 18px; margin: 0 0 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 20px; background: var(--primary); color: #fff; border: 0; border-radius: var(--r-btn); font: 700 1rem var(--font); text-decoration: none; cursor: pointer; min-height: 50px; transition: transform .12s var(--ease), background .15s; white-space: nowrap; }
.btn:hover { background: var(--primary-press); color: #fff; text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn i { font-size: 1.15rem; }
.btn.soft, .btn.ghost { background: var(--primary-soft); color: var(--primary-ink); }
.btn.soft:hover, .btn.ghost:hover { background: color-mix(in srgb, var(--primary-soft) 80%, var(--primary)); color: var(--primary-ink); }
.btn.gray { background: var(--surface-2); color: var(--text-2); }
.btn.small { padding: 7px 13px; font-size: .86rem; min-height: 36px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: wait; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.badge { display: inline-block; font-size: .76rem; font-weight: 600; padding: 3px 10px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); }
.linkbtn { background: none; border: 0; color: var(--primary-ink); cursor: pointer; font: inherit; padding: 0 0 0 6px; font-weight: 600; }

/* 入力欄 */
.field { margin: 0 0 14px; display: grid; gap: 6px; }
.field > label, .field > .lbl { font-size: .84rem; font-weight: 600; color: var(--text-2); }
.field input[type=text], .field input[type=date], .field input[type=email], .field input[type=tel], .field input[type=number], .field select, .field textarea, .b-rows .r input, select#edu-last {
  width: 100%; font: 400 1rem var(--font); color: var(--text); background: var(--surface-2); border: 1.5px solid transparent; border-radius: 12px; padding: 12px 14px; outline: none; transition: border-color .15s, background .15s; }
.field textarea { line-height: 1.7; resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus, .b-rows .r input:focus { border-color: var(--primary); background: var(--surface); }
::placeholder { color: var(--mute); }
.field .hint { font-size: .78rem; color: var(--mute); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.row3 { display: grid; grid-template-columns: 1.3fr .85fr .85fr; gap: 0 10px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { font: 600 .88rem var(--font); background: transparent; border: 0; padding: 7px 14px; color: var(--text-2); cursor: pointer; border-radius: 10px; min-height: 36px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button, .chips a { font: 600 .86rem var(--font); border: 0; background: var(--surface); color: var(--text-2); padding: 8px 14px; cursor: pointer; text-decoration: none; border-radius: 999px; transition: transform .12s var(--ease), background .15s; }
.chips button:hover, .chips a:hover { background: var(--primary-soft); color: var(--primary-ink); text-decoration: none; }
.chips button:active { transform: scale(.96); }
.chips button.on { background: var(--primary); color: #fff; }

/* 表 */
table.rk, .prose table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border-radius: 16px; overflow: hidden; margin: 8px 0 18px; font-size: .93rem; }
table.rk th, table.rk td, .prose th, .prose td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
table.rk tr:last-child td, table.rk tr:last-child th, .prose tr:last-child td { border-bottom: 0; }
table.rk thead th, .prose thead th { background: var(--surface); font-size: .8rem; font-weight: 700; color: var(--mute); }
table.rk td.num, table.rk th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.rk tr.hl td { background: var(--primary-soft); color: var(--primary-ink); font-weight: 600; }
.tscroll { overflow-x: auto; }
.prose blockquote { margin: 12px 0; padding: 14px 16px; background: var(--surface); border-radius: 16px; color: var(--text-2); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose ol, .prose ul { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--primary); }

/* 例文 */
.ex { background: var(--surface); border-radius: var(--r-card); margin: 0 0 12px; overflow: hidden; }
.ex-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 16px 18px 0; }
.ex-head b { font-size: 1rem; white-space: nowrap; }
.ex-head .who { color: var(--mute); font-size: .78rem; }
.ex-head .btn { margin-left: auto; white-space: nowrap; }
.ex-body { padding: 10px 18px 16px; white-space: pre-wrap; line-height: 1.9; color: var(--text); }
.ex-foot { padding: 0 18px 16px; font-size: .84rem; }
@media (max-width: 420px) { .ex-head .who { flex-basis: 100%; order: 3; } }

/* ツールのカード */
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 24px; }
@media (min-width: 720px) { .tools { grid-template-columns: repeat(4, 1fr); } }
.tool { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border-radius: var(--r-card); padding: 16px; text-decoration: none; color: var(--text); transition: transform .15s var(--ease); min-height: 128px; }
.tool:hover { text-decoration: none; transform: translateY(-2px); }
.tool:active { transform: scale(.98); }
.tool .k { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-size: 1.3rem; }
.tool.main { background: var(--primary); color: #fff; grid-column: span 2; }
.tool.main .k { background: rgba(255,255,255,.2); color: #fff; }
.tool.main span { color: rgba(255,255,255,.85); }
.tool b { display: block; font-size: .95rem; line-height: 1.4; }
.tool span { display: block; color: var(--mute); font-size: .8rem; line-height: 1.55; }

/* リンクの一覧 */
.links { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; margin: 8px 0 20px; }
.links a { display: block; background: var(--surface); border-radius: 12px; padding: 9px 14px; text-decoration: none; color: var(--text); font-size: .9rem; font-weight: 600; line-height: 1.45; }
.links a:hover { background: var(--primary-soft); color: var(--primary-ink); text-decoration: none; }
.links a small { display: block; font-size: .74rem; font-weight: 400; }
.links.stack { display: grid; gap: 1px; background: var(--line); border-radius: var(--r-card); overflow: hidden; }
.links.stack a { border-radius: 0; padding: 15px 18px; }

/* FAQ・出典 */
.faq details { background: var(--surface); border-radius: 16px; margin: 0 0 8px; }
.faq summary { cursor: pointer; padding: 15px 44px 15px 18px; font-weight: 700; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--mute); border-bottom: 2px solid var(--mute); transform: translateY(-70%) rotate(45deg); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details > div { padding: 0 18px 6px; color: var(--text-2); }
.sources { font-size: .8rem; color: var(--mute); padding-left: 1.2em; }

.result { background: var(--surface); border-radius: var(--r-card); padding: 20px; margin: 16px 0; }
.result .big { font-size: 1.9rem; font-weight: 800; color: var(--primary); }

/* AI */
.ai-box { background: var(--surface); border-radius: var(--r-card); padding: 20px; margin: 16px 0; }
.ai-out .ex { background: var(--surface-2); }
.ai-meta { font-size: .84rem; color: var(--text-2); margin: 10px 0 12px; }
.ai-note { font-size: .78rem; color: var(--mute); margin-top: 8px; }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 誘導 */
.cta { background: var(--primary-soft); border-radius: 24px; padding: 22px 20px; margin: 28px 0; }
.cta p { margin: 0 0 14px; color: var(--text-2); }
.cta b { font-size: 1.15rem; color: var(--text); }

/* フッター */
.site-footer { padding: 28px 0 36px; font-size: .86rem; }
.site-footer .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (min-width: 720px) { .site-footer .cols { grid-template-columns: repeat(3, 1fr); } }
.site-footer .h { font-weight: 700; margin-bottom: 6px; color: var(--text); }
.site-footer a { display: block; color: var(--text-2); padding: 3px 0; }
.site-footer .legal { color: var(--mute); font-size: .76rem; margin-top: 22px; line-height: 1.7; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 18px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px); background: #333d4b; color: #fff; padding: 12px 18px; border-radius: 14px; font-size: .88rem; font-weight: 600; opacity: 0; transition: .25s var(--ease); z-index: 90; pointer-events: none; max-width: calc(100% - 40px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
body.app .toast { bottom: 100px; }

/* ================= トップ ================= */
.home-hero { display: grid; gap: 24px; padding: 18px 0 8px; }
.home-hero h1 { font-size: 2rem; line-height: 1.3; margin: 0; }
.home-hero h1 em { font-style: normal; color: var(--primary); }
.home-hero .lead { color: var(--text-2); margin: 12px 0 0; max-width: 34em; }
@media (min-width: 900px) { .home-hero { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; padding-top: 40px; } .home-hero h1 { font-size: 2.6rem; } }
.demo { background: var(--surface); border-radius: 28px; padding: 18px; display: flex; flex-direction: column; gap: 10px; min-height: 300px; }
@media (prefers-reduced-motion: no-preference) {
  .demo .msg { opacity: 0; transform: translateY(10px); animation: pop .5s var(--ease) forwards; }
  .demo .msg:nth-child(1) { animation-delay: .2s; }
  .demo .msg:nth-child(2) { animation-delay: 1s; }
  .demo .msg:nth-child(3) { animation-delay: 2s; }
  .demo .msg:nth-child(4) { animation-delay: 2.9s; }
}
@keyframes pop { to { opacity: 1; transform: none; } }
.demo .msg.ai { background: var(--surface-2); }
.demo .paper { background: #fff; color: #191f28; border-radius: 12px; padding: 10px 12px; font-size: .8rem; line-height: 1.7; margin-top: 8px; }
.demo .paper b { display: block; font-size: .72rem; color: #8b95a1; font-weight: 600; }

/* 型の横スクロール */
.tpl-scroll { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 20px 8px; margin: 0 -20px; scrollbar-width: none; }
.tpl-scroll::-webkit-scrollbar { display: none; }
.tpl-card { scroll-snap-align: start; flex: none; width: 148px; background: var(--surface); border-radius: var(--r-card); padding: 16px 14px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 8px; border: 2px solid transparent; font: inherit; text-align: left; cursor: pointer; transition: transform .15s var(--ease), border-color .15s; }
.tpl-card:hover { text-decoration: none; }
.tpl-card:active { transform: scale(.97); }
.tpl-card i { font-size: 1.4rem; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.tpl-card b { font-size: .92rem; line-height: 1.35; }
.tpl-card small { font-size: .74rem; line-height: 1.45; }
.tpl-card.on { border-color: var(--primary); background: var(--primary-soft); }
.tpl-card.on b { color: var(--primary-ink); }
.tpl-card.on i { background: var(--primary); color: #fff; }

/* ================= 作成ツール（チャット） ================= */
.app-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.app-head h1 { font-size: 1.3rem; margin: 0; }
.import-card { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--surface); border: 0; border-radius: var(--r-card); padding: 14px 16px; cursor: pointer; font: inherit; color: var(--text); text-align: left; margin: 6px 0 12px; transition: transform .12s var(--ease); }
.import-card:active { transform: scale(.99); }
.import-card i { font-size: 1.35rem; width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.import-card b { display: block; font-size: .95rem; }
.import-card small { display: block; }
.import-card::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--mute); border-top: 2px solid var(--mute); transform: rotate(45deg); flex: none; }
.b-tabs { position: sticky; top: 56px; z-index: 20; display: flex; background: var(--surface-2); border-radius: 14px; padding: 4px; margin: 0 0 12px; box-shadow: 0 0 0 6px var(--bg); }
.b-tabs button { flex: 1; font: 700 .9rem var(--font); background: none; border: 0; padding: 9px 0; color: var(--mute); cursor: pointer; border-radius: 11px; }
.b-tabs button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.b-pane { display: none; }
.b-pane.on { display: block; }
.b-preview { display: none; }
.b-preview.on { display: block; }
.builder { display: block; }
@media (min-width: 1080px) {
  .builder { display: grid; grid-template-columns: minmax(0, 1fr) 560px; gap: 28px; align-items: start; }
  .b-tabs .sp-only { display: none; }
  .b-preview { display: block; position: sticky; top: 72px; }
}

/* チャット */
.chat { display: flex; flex-direction: column; min-height: calc(100dvh - 300px); }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 4px 0 12px; }
.msg { max-width: 84%; padding: 11px 15px; font-size: .95rem; line-height: 1.65; border-radius: 20px; scroll-margin-bottom: 170px; }
.msg.me { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 6px; }
.msg.ai { align-self: flex-start; background: var(--surface); color: var(--text); border-bottom-left-radius: 6px; }
.msg .chg { margin: 8px 0 0; font-size: .78rem; color: var(--ok); font-weight: 700; }
.msg-new { animation: pop .4s var(--ease) both; }
.typing { display: inline-flex; gap: 4px; padding: 15px 16px; }
.typing span { width: 7px; height: 7px; border-radius: 999px; background: var(--mute); animation: blink 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .typing span, .msg-new, .demo .msg { animation: none !important; opacity: 1 !important; transform: none !important; } .tool, .btn, .tpl-card { transition: none; } }
.chat-sugg { display: flex; gap: 8px; overflow-x: auto; flex-wrap: nowrap; padding: 2px 20px 10px; margin: 0 -20px; scrollbar-width: none; }
.chat-sugg::-webkit-scrollbar { display: none; }
.chat-sugg button { flex: none; font-size: .84rem; padding: 8px 14px; color: var(--primary-ink); background: var(--surface); }
.composer { position: sticky; bottom: 0; z-index: 15; background: linear-gradient(to top, var(--bg) 84%, transparent); padding: 12px 0 calc(10px + env(safe-area-inset-bottom)); }
.chat-in { display: flex; gap: 8px; align-items: flex-end; background: var(--surface); border-radius: 22px; padding: 6px 6px 6px 10px; border: 1.5px solid var(--line); }
.chat-in:focus-within { border-color: var(--primary); }
.chat-in textarea { flex: 1; font: 400 1rem var(--font); color: var(--text); background: transparent; border: 0; outline: none; padding: 9px 6px; resize: none; min-height: 42px; max-height: 160px; line-height: 1.5; }
.send { flex: none; width: 42px; height: 42px; border-radius: 999px; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 1.15rem; cursor: pointer; transition: transform .12s var(--ease); }
.send:active { transform: scale(.92); }
.send[disabled] { opacity: .45; }
.composer .ai-note { margin: 6px 4px 0; }

/* 入力フォーム */
.b-form .sec { background: var(--surface); border-radius: var(--r-card); padding: 18px 18px 6px; margin-bottom: 12px; }
.b-form .sec > h2 { font-size: 1.02rem; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.b-form .sec > h2 .n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); font-size: .76rem; font-weight: 800; }
.b-rows .r { display: grid; grid-template-columns: 76px 54px 1fr 32px; gap: 6px; align-items: center; margin-bottom: 8px; }
.b-rows .r input { padding: 10px; font-size: .94rem; }
.b-rows .r .del { border: 0; background: var(--surface-2); color: var(--mute); width: 32px; height: 32px; border-radius: 10px; cursor: pointer; font-size: 1rem; }
.photo-drop { display: flex; gap: 14px; align-items: center; }
.photo-drop .ph { width: 72px; height: 96px; border-radius: 12px; background: var(--surface-2) center/cover no-repeat; display: grid; place-items: center; font-size: .7rem; color: var(--mute); flex: none; text-align: center; }
.sugg { position: relative; }
.sugg-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border-radius: 14px; z-index: 30; max-height: 260px; overflow-y: auto; box-shadow: 0 12px 32px rgba(0,0,0,.14); padding: 6px; }
.sugg-list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 10px; font: 600 .88rem var(--font); cursor: pointer; color: var(--text); border-radius: 10px; }
.sugg-list button:hover { background: var(--primary-soft); }
.sugg-list button small { display: block; font-weight: 400; }
.li-card { background: var(--surface-2); border-radius: 16px; padding: 12px 12px 2px; margin-bottom: 10px; }
.li-card .field input, .li-card .field textarea { background: var(--surface); }
.li-head { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.li-head b { margin-right: auto; font-size: .9rem; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); padding: 8px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .9rem; }
.days input { accent-color: var(--primary); }
.saved { font-size: .78rem; color: var(--ok); font-weight: 700; }
.edu-auto { background: var(--primary-soft); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.edu-auto p { margin: 0 0 8px; font-size: .88rem; color: var(--primary-ink); }
.edu-auto select#edu-last { background: var(--surface); }

/* プレビュー */
.prev-head { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: .82rem; color: var(--mute); }
.prev-head b { color: var(--text); }
.prev-head i { color: var(--primary); font-size: 1.1rem; }
.sheets-wrap { overflow: hidden; border-radius: 12px; }
.sheets { transform-origin: top left; }
.fab { position: sticky; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; justify-content: center; margin-top: 12px; z-index: 15; }
.fab .btn { box-shadow: 0 8px 24px rgba(49, 130, 246, .35); padding: 12px 26px; }
.after-tool { margin-top: 36px; }

/* 作成画面の型は、スマホでは小さな横長のチップにして縦を取らない */
@media (max-width: 1079px) {
  .tpl-scroll.compact .tpl-card { width: auto; flex-direction: row; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; }
  .tpl-scroll.compact .tpl-card i { width: 30px; height: 30px; border-radius: 999px; font-size: 1.05rem; }
  .tpl-scroll.compact .tpl-card b { font-size: .86rem; white-space: nowrap; }
  .tpl-scroll.compact .tpl-card small { display: none; }
  .app-head { margin: 4px 0 6px; }
  .app-head h1 { font-size: 1.15rem; }
  .import-card { padding: 11px 14px; }
  .import-card i { width: 36px; height: 36px; font-size: 1.15rem; }
}

/* ================= 履歴書の紙面（書類なので明朝・罫線のまま。PDFになる部分） ================= */
/* A4 シート（厚生労働省 履歴書様式例に沿った配置） */
.sheet {
  width: 210mm;
  height: 297mm;
  padding: 12mm 13mm 10mm;
  background: #fff;
  color: #000;
  margin: 0 0 6mm;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Shippori Mincho", serif;
  font-size: 10.5pt;
  line-height: 1.4;
  position: relative;
  overflow: hidden;
}
.sheet table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.sheet td,
.sheet th {
  border: 0.3mm solid #000;
  padding: 1mm 2mm;
  vertical-align: middle;
  font-weight: 400;
}
.sheet .outer {
  border: 0.6mm solid #000;
}
.sheet .t-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2mm;
  padding-right: 34mm;
}
.sheet .t-title h3 {
  font-size: 20pt;
  letter-spacing: 0.6em;
  margin: 0;
  font-family: inherit;
  font-weight: 700;
  border: 0;
}
.sheet .t-title .date {
  font-size: 10pt;
}
.sheet .photo {
  position: absolute;
  right: 13mm;
  top: 12mm;
  width: 30mm;
  height: 40mm;
  border: 0.3mm dashed #000;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 6.5pt;
  line-height: 1.5;
  color: #333;
  background: center/cover no-repeat;
}
.sheet .photo.has {
  border-style: solid;
}
.sheet .lab {
  font-size: 7.5pt;
  display: block;
  line-height: 1.2;
}
.sheet .kana {
  font-size: 8.5pt;
}
.sheet .name {
  font-size: 20pt;
  letter-spacing: 0.1em;
  padding: 1mm 0 2mm;
}
.sheet .ln td {
  border-top-style: dashed;
}
.sheet .hist td {
  height: 8.1mm;
}
.sheet .hist .y {
  width: 15mm;
  text-align: center;
}
.sheet .hist .m {
  width: 9mm;
  text-align: center;
}
.sheet .hist th {
  font-size: 8pt;
  text-align: center;
  height: 6.5mm;
}
.sheet .hist .c {
  text-align: center;
}
.sheet .hist .rt {
  text-align: right;
}
.sheet .box {
  border: 0.6mm solid #000;
  margin-top: 4mm;
}
.sheet .box .bh {
  font-size: 8pt;
  padding: 1mm 2mm;
  border-bottom: 0.3mm solid #000;
}
.sheet .box .bb {
  padding: 2mm 3mm;
  white-space: pre-wrap;
  overflow: hidden;
  line-height: 1.65;
}
.sheet .foot {
  font-size: 7pt;
  margin-top: 2mm;
  line-height: 1.5;
}
.sheet .contact td {
  font-size: 9.5pt;
}


/* シートの中の表 */
.sheet table.inner { width: 100%; border-collapse: collapse; }
.sheet table.inner th, .sheet table.inner td { border: .3mm solid #000; padding: 1.2mm 2mm; font-size: 9.5pt; height: 8mm; }
.sheet table.inner th { width: 24mm; font-weight: 400; font-size: 8.5pt; background: #fafafa; }
.sheet table.inner td.c { text-align: center; line-height: 1.3; }
.sheet .box table.inner { border: 0; }
.sheet .box table.inner tr:first-child th, .sheet .box table.inner tr:first-child td { border-top: 0; }
.sheet .box table.inner th:first-child { border-left: 0; }
.sheet .box table.inner td:last-child { border-right: 0; }
.sheet .box table.inner tr:last-child th, .sheet .box table.inner tr:last-child td { border-bottom: 0; }
.sheet .two { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; }
/* 流し込みの書類（職務経歴書・スキルシート・英文レジュメ） */
.doc { width: 210mm; min-height: 297mm; padding: 14mm 14mm 16mm; background: #fff; color: #111; box-shadow: 0 1px 4px rgba(0,0,0,.18); font-family: "Hiragino Mincho ProN", "Yu Mincho", "Shippori Mincho", serif; font-size: 10pt; line-height: 1.65; }
.doc .doc-t { text-align: center; font-size: 16pt; letter-spacing: .3em; margin: 0 0 4mm; border: 0; font-family: inherit; }
.doc .doc-r { text-align: right; margin: 0 0 4mm; font-size: 9.5pt; }
.doc h4 { font-size: 11pt; margin: 6mm 0 2mm; padding: 0 0 1mm; border-bottom: .4mm solid #111; font-family: inherit; break-after: avoid; }
.doc p { margin: 0 0 2mm; }
.doc ul { margin: 0 0 2mm; padding-left: 5mm; }
.doc li { margin: 0; }
.doc .co { margin: 0 0 4mm; break-inside: avoid; }
.doc .co-h { display: flex; gap: 4mm; background: #eee; padding: 1mm 2mm; font-size: 10pt; }
.doc .co-meta { font-size: 9pt; color: #333; margin: 1mm 0; }
.doc .mini { font-size: 9pt; margin: 1mm 0 0; }
.doc .doc-end { text-align: right; margin-top: 4mm; }
.doc table.grid { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 9pt; }
.doc table.grid th, .doc table.grid td { border: .3mm solid #111; padding: 1.2mm 1.6mm; vertical-align: top; word-break: break-word; }
.doc table.grid th { background: #eee; font-weight: 700; text-align: center; }
.doc table.grid tr { break-inside: avoid; }
.doc table.grid td.c { text-align: center; }
.doc.en { font-family: "Helvetica Neue", Arial, sans-serif; font-size: 10pt; line-height: 1.45; }
.doc.en .en-name { font-size: 20pt; text-align: center; margin: 0; letter-spacing: .02em; border: 0; font-family: inherit; }
.doc.en .en-head { text-align: center; margin: 1mm 0 0; font-size: 11pt; color: #333; }
.doc.en .en-contact { text-align: center; font-size: 9pt; color: #333; margin: 1mm 0 3mm; }
.doc.en h4 { font-size: 10.5pt; letter-spacing: .06em; margin: 5mm 0 2mm; }
.doc.en .en-item { margin: 0 0 3mm; break-inside: avoid; }
.doc.en .en-row { display: flex; gap: 3mm; }
.doc.en .en-row span { margin-left: auto; white-space: nowrap; font-size: 9.5pt; }
.doc.en .en-loc { font-size: 9pt; color: #444; font-style: italic; }
.doc.en ul { margin: 1mm 0 0; }

.doc .ph-name { color: #aaa; font-weight: 400; font-size: 14pt; }
.doc .ph-name { color: #aaa; font-weight: 400; font-size: 14pt; }

@media print {
  body { background: #fff; padding: 0; }
  .site-header, .site-footer, .tabbar, .crumbs, .hero, .app-head, .tpl-scroll, .import-card, #imp-panel, .b-tabs, .b-main, .prev-head, .fab, .after-tool, .no-print, .toast { display: none !important; }
  main, main.wide { max-width: none; padding: 0; }
  .builder { display: block; }
  .b-preview { display: block !important; position: static; }
  .sheets-wrap { overflow: visible; height: auto !important; border-radius: 0; }
  .sheets { transform: none !important; }
  .sheet { margin: 0; box-shadow: none; page-break-after: always; break-after: page; }
  .sheet:last-child { page-break-after: auto; break-after: auto; }
  .doc { box-shadow: none; padding: 0; min-height: 0; width: auto; }
}

/* 細部 */
.nw { white-space: nowrap; }
input[type=file] { font: 400 .86rem var(--font); color: var(--mute); max-width: 100%; }
input[type=file]::file-selector-button { font: 600 .86rem var(--font); background: var(--primary-soft); color: var(--primary-ink); border: 0; border-radius: 10px; padding: 8px 14px; margin-right: 10px; cursor: pointer; }
