/* ReCode プロフィールサイト
   スマホで見られることを前提にした最小限のスタイル。
   色を変えたいときは :root の変数だけ触れば全体が変わる。 */

:root {
  --bg:        #f6f7f9;
  --surface:   #ffffff;
  --text:      #1b1f24;
  --muted:     #6b7280;
  --border:    #e4e7eb;
  --accent:    #2f6df6;
  --accent-bg: #eef3ff;
  --radius:    14px;
  --shadow:    0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #14171c;
    --surface:   #1c2027;
    --text:      #e8eaed;
    --muted:     #9aa3af;
    --border:    #2b313a;
    --accent:    #7aa2ff;
    --accent-bg: #212a3d;
    --shadow:    0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Kaku Gothic ProN",
               "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.8;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 56px;
}

/* --- ヘッダー --- */
.hero {
  background: linear-gradient(160deg, var(--accent) 0%, #1b3fa8 100%);
  color: #fff;
  padding: 40px 16px 32px;
  text-align: center;
}
.hero__inner { max-width: 720px; margin: 0 auto; }
.avatar {
  width: 88px; height: 88px; margin: 0 auto 14px;
  display: grid; place-items: center;
  font-size: 44px; line-height: 1;
  background: rgba(255, 255, 255, .18);
  border: 2px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
}
.hero__name  { margin: 0; font-size: 26px; letter-spacing: .02em; }
.hero__title { margin: 6px 0 0; opacity: .9; font-size: 15px; }

/* --- カード --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.card--accent { background: var(--accent-bg); border-color: transparent; }
.card--empty  { text-align: center; color: var(--muted); }
.card__title {
  margin: 0 0 12px;
  font-size: 13px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.prose { margin: 0; }

/* --- スキル --- */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.chip {
  background: var(--accent-bg); color: var(--accent);
  border-radius: 999px; padding: 4px 13px;
  font-size: 14px; font-weight: 600;
}

/* --- 経歴 --- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline__item {
  display: flex; gap: 14px;
  padding: 0 0 18px 16px;
  border-left: 2px solid var(--border);
  position: relative;
}
.timeline__item:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline__item::before {
  content: ""; position: absolute; left: -6px; top: 9px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
}
.timeline__year { flex: 0 0 auto; min-width: 3.6em; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline__body { flex: 1 1 auto; }
.timeline__head { margin: 0; font-weight: 600; }
.timeline__note { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

/* --- リンク --- */
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.link { color: var(--accent); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }

.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 0 16px 40px; }
.foot p { margin: 4px 0; }

/* --- 名簿 --- */
.roster { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .roster { grid-template-columns: 1fr 1fr; } }
.person {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  text-decoration: none; color: inherit;
  transition: transform .12s ease;
}
.person:hover { transform: translateY(-2px); }
.person__icon {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  font-size: 26px; line-height: 1;
  background: var(--accent-bg); border-radius: 50%;
}
.person__body   { min-width: 0; }
.person__name   { display: block; font-weight: 700; }
.person__title  { display: block; color: var(--muted); font-size: 14px; line-height: 1.5; }
.person__skills { display: block; margin-top: 6px; color: var(--accent); font-size: 13px; font-weight: 600; line-height: 1.5; }

.page-head { text-align: center; padding: 36px 16px 8px; }
.page-head h1 { margin: 0; font-size: 24px; }
.page-head p  { margin: 6px 0 0; color: var(--muted); }

/* --- フォーム --- */
.admin { background: var(--bg); }
.bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.bar__title   { font-weight: 700; }
.bar__actions { display: flex; gap: 14px; font-size: 14px; }

.field { display: block; margin-bottom: 18px; }
.field__label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.input {
  width: 100%; padding: 11px 12px;
  font: inherit; font-size: 16px;   /* iOS で拡大されないよう 16px 以上 */
  line-height: 1.7;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.input--narrow { width: 6em; }
textarea.input { resize: vertical; }

.btn {
  width: 100%; padding: 13px 20px;
  font: inherit; font-size: 16px; font-weight: 700;
  color: #fff; background: var(--accent);
  border: 0; border-radius: 10px; cursor: pointer;
}
.btn:hover { filter: brightness(1.07); }

.alert { padding: 12px 14px; border-radius: 10px; margin: 0 0 16px; font-size: 15px; }
.alert--ok    { background: #e7f6ec; color: #1a6b39; }
.alert--error { background: #fdeceb; color: #a1281f; }
@media (prefers-color-scheme: dark) {
  .alert--ok    { background: #17301f; color: #79d19b; }
  .alert--error { background: #351d1c; color: #f09a92; }
}
