/* Layout: 案aの履歴書（罫線の表）をそのまま骨組みにし、角丸・淡い罫線・項目名セルの水色・丸いタグで細部だけやわらかく */
:root {
  --bg: #eef6fb;
  --paper: #ffffff;
  --ink: #23384a;
  --muted: #5f7587;
  --crystal: #3a9fd1;
  --crystal-soft: #dcEFF9;
  --rule: #c6dceb;
  --label-bg: #f1f8fc;
  --self: #e9f1d9;
  --self-ink: #4c6a22;
  --record-ink: #1f6f9e;
  --shadow: rgba(40,110,150,.14);
  --font-head: "Shippori Mincho", "Yu Mincho", serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --r: 12px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0f1c26; --paper: #172833; --ink: #e3eef5; --muted: #9ab0bf;
  --crystal: #6cc2ec; --crystal-soft: #1f3c4e; --rule: #33515f; --label-bg: #1b303d;
  --self: #2a3a1c; --self-ink: #c3df95; --record-ink: #8fd0f2; --shadow: rgba(0,0,0,.35); color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0f1c26; --paper: #172833; --ink: #e3eef5; --muted: #9ab0bf;
  --crystal: #6cc2ec; --crystal-soft: #1f3c4e; --rule: #33515f; --label-bg: #1b303d;
  --self: #2a3a1c; --self-ink: #c3df95; --record-ink: #8fd0f2; --shadow: rgba(0,0,0,.35); color-scheme: dark }

body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.7;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 20px 48px; }
.wrap { max-width: 640px; margin: 0 auto; display: grid; gap: 14px; }

button:focus-visible, a:focus-visible { outline: 2px solid var(--crystal); outline-offset: 2px; }

.site { display: grid; gap: 2px; }
.tagline { margin: 0; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.meta { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.updated { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.site .logo { font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: .08em; color: var(--crystal); }

.sheet { background: var(--paper); border-radius: 18px; padding: 24px 22px 26px; display: grid; gap: 22px;
  box-shadow: 0 0 0 1px var(--rule), 0 16px 36px -24px var(--shadow); }
.src { display: inline-block; font-size: 11px; font-weight: 500; letter-spacing: .06em; padding: 1px 10px; border-radius: 999px; }
.src.self { background: var(--self); color: var(--self-ink); }
.src.rec { background: var(--crystal-soft); color: var(--record-ink); }

/* 罫線の表：外枠を角丸にするため border-collapse は使わず、セル側の線で組む */
.grid { border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }

/* 上段：氏名欄＋写真 */
.namebox { min-width: 0; }
.namebox .row { display: grid; grid-template-columns: 6.6em 1fr; }
.namebox .row + .row { border-top: 1px solid var(--rule); }
.namebox .row.furi + .row { border-top-style: dashed; }
.lbl { background: var(--label-bg); color: var(--crystal); font-size: 12px; letter-spacing: .08em; white-space: nowrap; padding: 8px 12px; border-right: 1px solid var(--rule); display: flex; align-items: center; }
.val { padding: 8px 12px; min-width: 0; }
.furi .val { font-size: 13px; letter-spacing: .15em; padding-block: 4px; color: var(--muted); }
.furi .lbl { padding-block: 4px; font-size: 11px; }
.fullname { overflow-wrap: anywhere; margin: 0; font-family: var(--font-head); font-size: 28px; font-weight: 700; line-height: 1.3; letter-spacing: .03em; padding-block: 10px; }
/* スクショ：カード上部に横長 */
.banner { display: block; width: calc(100% + 44px); max-width: none; margin: -24px -22px 0; aspect-ratio: 21 / 9;
  object-fit: cover; object-position: 40% 32%; border-radius: 18px 18px 0 0; }

/* 項目表 */
.form { margin: 0; }
.form .item { display: grid; grid-template-columns: 6.6em 1fr; }
.form .item + .item { border-top: 1px solid var(--rule); }
.form dt { background: var(--label-bg); color: var(--crystal); font-size: 12px; letter-spacing: .08em; white-space: nowrap; padding: 10px 12px; border-right: 1px solid var(--rule); }
.form dd { margin: 0; min-width: 0; padding: 9px 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* 過去の所属チーム：新しい順に、1行に1チーム */
.past-teams { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
/* 6チーム目からは折りたたむ。「ほか○チーム」を押すと開き、押した場所は下に移って「閉じる」になる */
.past-more { display: flex; flex-direction: column-reverse; }
.past-more > summary { list-style: none; cursor: pointer; justify-self: start; align-self: flex-start; margin-top: 6px;
  font-size: 12.5px; color: var(--crystal); padding: 2px 12px; border: 1px solid var(--rule); border-radius: 999px; }
.past-more > summary::-webkit-details-marker { display: none; }
.past-more > summary:hover { border-color: var(--crystal); }
.past-more .pm-close, .past-more[open] .pm-open { display: none; }
.past-more[open] .pm-close { display: inline; }
.past-more > .past-teams { margin-top: 2px; }
.chip { font-size: 13px; padding: 0 11px; border-radius: 999px; background: var(--crystal-soft); }
.links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.links a { color: var(--record-ink); text-decoration: none; font-size: 14px; }
.links a:hover { text-decoration: underline; }
.none { color: var(--muted); font-size: 13px; }
.hitokoto { margin: 0; }

.block { display: grid; gap: 8px; }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.block-head h2 { margin: 0; font-family: var(--font-head); font-size: 16px; font-weight: 700; letter-spacing: .1em; }

/* 出場記録：履歴書の「学歴・職歴」欄 */
table.hist { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
table.hist th, table.hist td { padding: 8px 10px; text-align: left; vertical-align: top; border-top: 1px solid var(--rule); }
table.hist th + th, table.hist td + td { border-left: 1px solid var(--rule); }
table.hist thead th { border-top: 0; background: var(--label-bg); color: var(--crystal); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-align: center; }
table.hist td.y { width: 4.2em; text-align: center; color: var(--muted); }
table.hist td.r { width: 6.5em; text-align: center; font-size: 13px; }
table.hist td.t, table.hist td.r { overflow-wrap: anywhere; }
table.hist td.t a { color: var(--record-ink); text-decoration: none; font-weight: 500; }
table.hist td.t small { display: block; color: var(--muted); font-size: 12px; }
table.hist td.empty { text-align: center; color: var(--muted); font-size: 13px; padding: 16px; }
.tl-name { margin: 0; font-size: 12px; color: var(--muted); }
.sample-note { font-size: 11px; color: var(--muted); }
.loading { color: var(--muted); font-size: 13px; text-align: center; padding: 40px 0; }
.site a { text-decoration: none; }

.foot { font-size: 12px; color: var(--muted); text-align: center; }
.foot a { color: var(--muted); }

@media (max-width: 480px) {
  .sheet { padding: 16px 14px 20px; border-radius: 16px; }
  .namebox .row { grid-template-columns: 5.6em 1fr; }
  .lbl { padding-inline: 8px; font-size: 11px; letter-spacing: 0; }
  .val { padding-inline: 8px; }
  .fullname { font-size: 22px; }
  .banner { width: calc(100% + 28px); margin: -16px -14px 0; border-radius: 16px 16px 0 0; }
  .form .item { grid-template-columns: 5.6em 1fr; }
  .form dt { padding: 9px 8px; font-size: 11px; letter-spacing: 0; }
  .form dd { padding: 8px; }
  /* 狭い画面では表の幅を決め打ちにして、はみ出し（右端の見切れ）を防ぐ */
  table.hist { table-layout: fixed; }
  table.hist th, table.hist td { padding: 8px 6px; }
  table.hist thead th { font-size: 11px; letter-spacing: 0; }
  /* table-layout: fixed では1行目（thead）の幅が列幅になる */
  table.hist thead th:first-child { width: 3.1em; }
  table.hist thead th:last-child { width: 6.4em; }
  table.hist td.y { width: auto; font-size: 13px; }
  table.hist td.r { width: auto; white-space: normal; font-size: 12px; }
}


/* トップの一覧 */
.people { display: grid; gap: 10px; }
.person { display: flex; align-items: center; gap: 14px; background: var(--paper); border-radius: 14px; padding: 10px;
  color: var(--ink); text-decoration: none; box-shadow: 0 0 0 1px var(--rule); }
.person:hover { box-shadow: 0 0 0 2px var(--crystal); }
.person img, .person .noimg { width: 112px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; flex: none; }
.person .noimg { background: var(--crystal-soft); }
.person b { font-family: var(--font-head); font-size: 18px; display: block; line-height: 1.3; overflow-wrap: anywhere; }
.person span { font-size: 12px; color: var(--muted); }

/* トップ：掲載希望への入口（人が増えても探さなくていいように、一覧の上に置く） */
.entry-cta { display: block; text-align: center; background: var(--crystal); color: #fff; text-decoration: none;
  border-radius: 999px; padding: 13px 24px; font-size: 15px; font-weight: 500; letter-spacing: .04em; margin-top: 2px; }
.entry-cta:hover { filter: brightness(1.08); }
/* ボタンのすぐ上の一文。「自分なんかが載っていいのかな」と迷う方に向けたもの。
   折り返すときは行の長さをそろえる（text-wrap）。最後の1語だけが次の行に落ちるのを防ぐため */
.cta-lead { margin: 0 0 -4px; font-size: 13px; line-height: 1.9; color: var(--ink); text-align: center;
  text-wrap: balance; }
/* 掲載希望への入口と、一覧との区切り */
.sep { border: 0; border-top: 1px solid var(--rule); margin: 4px 0 0; }

/* 1人ずつのページの下。見に来た方が、そのままフォームへ行けるように */
.page-cta { margin: 0; text-align: center; }
.page-cta a { display: inline-block; text-decoration: none; color: var(--crystal); font-size: 13.5px;
  border: 1px solid var(--crystal); border-radius: 999px; padding: 9px 22px; }
.page-cta a:hover { background: var(--crystal-soft); }

/* 利用についての注意書き */
.notice { background: var(--paper); border-radius: 14px; padding: 16px 18px; display: grid; gap: 8px;
  box-shadow: 0 0 0 1px var(--rule); }
.notice h2 { margin: 0; font-family: var(--font-head); font-size: 14px; font-weight: 700; letter-spacing: .1em; }
.notice p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.8; }

/* ===== トップ（2026年11月10日に作り替え） ===== */
/* トップだけ横幅を広げる（1人ずつのページとフォームは今までの幅のまま） */
.wrap.wide { max-width: 960px; gap: 16px; grid-template-columns: minmax(0, 1fr); }
/* 列の幅を画面の幅に固定する。これがないと、iPhone で中身（検索欄など）に押されて列が広がり、右の余白がなくなる */
.wrap.wide > * { min-width: 0; }

/* いちばん上の大きな見出し。画像は app/top.js が、載っている方の中から1枚えらんで入れる。
   画像が入るまで（と、入らなかったとき）は水色の地のまま */
/* 高さはウィンドウの高さに合わせる（パソコンで見出しだけで画面が埋まらず、下のカードが少し見えるように） */
.hero { position: relative; border-radius: 22px; overflow: hidden; min-height: clamp(280px, 44vh, 400px); display: grid; align-items: end;
  color: #fff; background: linear-gradient(135deg, #3a9fd1, #1f6f9e); box-shadow: 0 10px 30px var(--shadow); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; animation: hero-in .5s ease both; }
@keyframes hero-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hero-img { animation: none; } }
.hero.has-img::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,28,40,.10) 0%, rgba(12,28,40,.25) 45%, rgba(12,28,40,.86) 100%); }
.hero-in { position: relative; z-index: 1; padding: 22px 28px 22px; display: grid; gap: 6px; }
.hero h1 { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 34px; line-height: 1.3; letter-spacing: .1em;
  text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.hero p { margin: 0; font-size: 13.5px; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.hero-row { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.hero-btn { background: #3a9fd1; color: #fff; text-decoration: none; border-radius: 999px; padding: 10px 24px;
  font-size: 14.5px; font-weight: 500; letter-spacing: .04em; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.hero-btn:hover { filter: brightness(1.08); }
.hero-num { font-size: 13px; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.hero-credit { position: absolute; z-index: 2; top: 14px; right: 16px; font-size: 11px; color: #fff; text-decoration: none;
  background: rgba(12,28,40,.55); padding: 3px 11px; border-radius: 999px; }
.hero-credit:hover { background: rgba(12,28,40,.75); }

.sec { margin: 6px 0 -4px; font-family: var(--font-head); font-size: 16px; font-weight: 700; letter-spacing: .12em; }

/* 探す欄と、関わり方のボタン */
.finder { display: flex; gap: 12px; align-items: center; border-top: 1px solid var(--rule); padding-top: 16px; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: var(--paper); border-radius: 999px;
  padding: 0 16px; box-shadow: 0 0 0 1px var(--rule); color: var(--muted); }
.search:focus-within { box-shadow: 0 0 0 2px var(--crystal); }
.search svg { flex: none; }
.search input { flex: 1; min-width: 0; width: 100%; -webkit-appearance: none; appearance: none; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit;
  font-size: 16px; padding: 9px 0; }   /* 16px：スマホで入力のときに画面が勝手に拡大されないように */
.count { font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { font: inherit; font-size: 12px; padding: 4px 12px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--paper); color: var(--muted); box-shadow: 0 0 0 1px var(--rule); }
.filters button:hover { box-shadow: 0 0 0 1px var(--crystal); }
.filters button.on { background: var(--crystal); color: #fff; box-shadow: none; }

/* 画像が主役のカード */
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pcard { display: block; background: var(--paper); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink);
  box-shadow: 0 0 0 1px var(--rule), 0 6px 18px var(--shadow); }
.pcard[hidden] { display: none; }
.pcard:hover { box-shadow: 0 0 0 2px var(--crystal), 0 6px 18px var(--shadow); }
.pim { display: block; position: relative; aspect-ratio: 21 / 9; background: var(--crystal-soft); }
.pim img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pim .noimg { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-head); font-size: 18px;
  letter-spacing: .3em; color: var(--crystal); opacity: .55;
  background: linear-gradient(135deg, var(--crystal-soft), var(--label-bg)); }
.ptx { display: grid; gap: 6px; padding: 11px 16px 14px; }
.pyomi { font-size: 11px; color: var(--muted); letter-spacing: .08em; margin-bottom: -4px; }
.pcard b { font-family: var(--font-head); font-size: 20px; line-height: 1.3; letter-spacing: .02em; overflow-wrap: anywhere; }
.pchips { display: flex; gap: 5px; flex-wrap: wrap; }
.pchips span { font-size: 11px; padding: 1px 9px; border-radius: 999px; background: var(--label-bg); color: var(--muted);
  box-shadow: 0 0 0 1px var(--rule); }
.nohit { margin: 0; text-align: center; color: var(--muted); font-size: 13px; padding: 20px 0; }

@media (max-width: 640px) {
  .pgrid { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 330px; border-radius: 18px; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 14px; }
  .hero-in { padding: 20px; gap: 10px; }
  .hero-btn { padding: 12px 28px; font-size: 15px; }
}
