:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --ink: #1c2230;
  --ink-soft: #545b69;
  --line: #e2ddd2;
  --accent: #1f3a5f;
  --accent-soft: #e8edf4;
  --gold: #a8874a;
  --danger: #a33a2b;
  --ok: #2f6b45;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", "Noto Sans JP", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
}
a { color: var(--accent); }

/* ===== 公開ページ ===== */
.hero {
  background: var(--accent);
  color: #fff;
  padding: 88px 16px 80px;
  text-align: center;
}
.hero .eyebrow {
  font-size: 13px;
  letter-spacing: 0.28em;
  color: #d9c79f;
  margin: 0 0 18px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 7vw, 56px);
  letter-spacing: 0.06em;
  margin: 0 0 20px;
  line-height: 1.3;
}
.hero .lead {
  font-size: clamp(16px, 3.6vw, 19px);
  margin: 0 auto 36px;
  max-width: 36em;
  color: #eef1f6;
}
.btn {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: 0.6; cursor: default; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
section.block { padding: 64px 0 8px; }
section.block h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.06em;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
section.block h2 small {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 4px;
}
.principle {
  background: var(--surface);
  border-left: 3px solid var(--gold);
  padding: 20px 24px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 2;
  margin: 0 0 20px;
}
.host {
  display: flex;
  gap: 16px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 14px;
}
.host strong { font-family: var(--serif); font-size: 20px; color: var(--ink); font-weight: 600; }

dl.facts { margin: 0; display: grid; grid-template-columns: 7em 1fr; border-top: 1px solid var(--line); }
dl.facts dt, dl.facts dd { padding: 16px 0; border-bottom: 1px solid var(--line); margin: 0; }
dl.facts dt { font-weight: 600; color: var(--accent); }
dl.facts dd .note { display: block; color: var(--ink-soft); font-size: 14px; }
ul.dates { list-style: none; padding: 0; margin: 8px 0 4px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 12px; font-size: 15px; }
@media (max-width: 420px) { ul.dates { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  dl.facts { grid-template-columns: 1fr; }
  dl.facts dt { padding-bottom: 0; border-bottom: 0; }
}

ol.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: s; }
ol.steps li {
  counter-increment: s;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px 14px 56px;
  position: relative;
}
ol.steps li::before {
  content: counter(s);
  position: absolute; left: 16px; top: 14px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 14px; line-height: 26px; text-align: center; font-weight: 600;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px 20px;
}
.field { margin-bottom: 20px; }
.field > label, .field > .label { display: block; font-weight: 600; margin-bottom: 6px; }
.req, .opt {
  font-size: 11px; font-weight: 600; border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px;
}
.req { background: var(--accent); color: #fff; }
.opt { background: var(--line); color: var(--ink-soft); }
.hint { color: var(--ink-soft); font-size: 13px; margin: 4px 0 0; line-height: 1.6; }
input[type="text"], input[type="email"], input[type="number"], input[type="url"], input[type="password"], textarea, select {
  width: 100%;
  font: inherit;
  font-size: 16px;
  padding: 11px 12px;
  border: 1px solid #cfc8b9;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
textarea { min-height: 120px; resize: vertical; }
.choices label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 6px 0; cursor: pointer; }
.choices input { margin-top: 7px; }
.agree { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.agree input { margin-top: 7px; }
.privacy { font-size: 13px; color: var(--ink-soft); background: var(--bg); border-radius: 8px; padding: 12px 14px; margin: 0 0 12px; line-height: 1.7; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error { color: var(--danger); font-weight: 600; }
.referrer-banner { background: var(--accent-soft); border-radius: 8px; padding: 10px 14px; margin-bottom: 20px; font-size: 14px; }
.done { text-align: center; padding: 24px 8px; }
.done h3 { font-family: var(--serif); font-size: 22px; margin: 0 0 12px; }
.center { text-align: center; }

footer.site { text-align: center; color: var(--ink-soft); font-size: 13px; padding: 56px 16px 40px; }

/* ===== 管理画面 ===== */
.admin-header {
  background: var(--accent); color: #fff;
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.admin-header h1 { font-size: 17px; margin: 0; font-weight: 600; }
.admin-header button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 6px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.admin-main { max-width: 960px; margin: 0 auto; padding: 16px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button { background: none; border: 0; padding: 10px 14px; font: inherit; cursor: pointer; color: var(--ink-soft); border-bottom: 3px solid transparent; }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.app-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.app-card .top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.app-card .who { font-size: 18px; font-weight: 600; }
.app-card .meta { color: var(--ink-soft); font-size: 14px; }
.app-card .motive { white-space: pre-wrap; background: var(--bg); border-radius: 6px; padding: 8px 10px; margin: 8px 0; font-size: 14px; line-height: 1.7; }
.app-card .row { font-size: 14px; }
.app-card .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.app-card .actions input { flex: 1 1 200px; font-size: 14px; padding: 6px 8px; }
.small-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer; }
.small-btn.approve { background: var(--ok); color: #fff; border-color: var(--ok); }
.small-btn.decline { color: var(--danger); border-color: var(--danger); }
.badge { display: inline-block; font-size: 12px; border-radius: 4px; padding: 0 8px; font-weight: 600; }
.badge.pending { background: #fdf1d8; color: #8a5a00; }
.badge.approved { background: #e2f1e7; color: var(--ok); }
.badge.declined { background: #f3e3e0; color: var(--danger); }
.badge.warn { background: #f3e3e0; color: var(--danger); margin-left: 6px; }
.empty { color: var(--ink-soft); padding: 24px 0; text-align: center; }
table.refs { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
table.refs th, table.refs td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
table.refs td.url { word-break: break-all; }
.inline-form { display: flex; gap: 8px; margin: 12px 0 20px; flex-wrap: wrap; }
.inline-form input { flex: 1 1 200px; }

.tabs { align-items: center; flex-wrap: wrap; }
.tab-link { margin-left: auto; font-size: 14px; font-weight: 600; text-decoration: none; padding: 8px 4px; }
.caution { background: #fdf1d8; border: 1px solid #ecd9a8; border-radius: 8px; padding: 10px 14px; font-size: 13px; line-height: 1.7; margin-bottom: 14px; }
.caution p { margin: 2px 0; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 6px; }
@media (max-width: 640px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.tile-label { font-size: 12px; color: var(--ink-soft); }
.tile-value { font-size: 26px; font-weight: 700; line-height: 1.3; color: var(--accent); }
.tile-sub { font-size: 11px; color: var(--ink-soft); line-height: 1.4; }
.search { width: 100%; font: inherit; font-size: 16px; padding: 9px 12px; border: 1px solid #cfc8b9; border-radius: 8px; margin-bottom: 6px; background: #fff; }
.answers { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 4px; }
.app-card.person { padding: 10px 14px; margin-bottom: 8px; }
.app-card.person .who { font-size: 16px; }
.badge.member-declined, .badge.member-ineligible { background: #f3e3e0; color: var(--danger); }
.badge.member-director { background: var(--accent-soft); color: var(--accent); }
.badge.member-guest { background: #efe6d2; color: #7a5a1d; }
.badge.member-member, .badge.member-member_or_pending { background: #eef0ec; color: var(--ink-soft); }

/* ===== 受付表（スマホで片手操作） ===== */
.rc-header { position: sticky; top: 0; z-index: 2; background: var(--accent); color: #fff; padding: 10px 16px 12px; }
.rc-header .rc-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rc-header h1 { font-size: 16px; margin: 0; }
.rc-header a { color: #d9e3f0; font-size: 13px; }
.rc-logout { background: none; border: 0; color: #d9e3f0; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 0; }
.login-note { font-size: 14px; color: var(--ink-soft); margin: 0 0 16px; }
.rc-count { font-size: 30px; font-weight: 700; line-height: 1.2; }
.rc-count small { font-size: 14px; font-weight: 400; opacity: 0.85; }
.rc-header .search { margin: 8px 0 0; border: 0; }
.rc-main { max-width: 640px; margin: 0 auto; padding: 8px 12px 80px; }
.rc-section h2 { font-size: 14px; color: var(--ink-soft); margin: 18px 4px 6px; font-weight: 600; }
.rc-person {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 6px; font: inherit; color: inherit; cursor: pointer;
}
.rc-person .mark { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #cfc8b9; display: grid; place-items: center; font-weight: 700; color: #fff; }
.rc-person.done { background: #e9f4ec; border-color: #bcdcc6; }
.rc-person.done .mark { background: var(--ok); border-color: var(--ok); }
.rc-person .body { flex: 1; min-width: 0; }
.rc-person .nm { font-size: 17px; font-weight: 600; }
.rc-person .sub { font-size: 12px; color: var(--ink-soft); line-height: 1.5; overflow-wrap: anywhere; }
.rc-person .sub.note { color: #8a5a00; }
.rc-person .time { flex: none; font-size: 13px; color: var(--ok); font-weight: 600; }
.rc-walkin { background: var(--surface); border: 1px dashed #cfc8b9; border-radius: 10px; padding: 12px; display: grid; gap: 8px; }
.rc-walkin input { font: inherit; font-size: 16px; padding: 9px 10px; border: 1px solid #cfc8b9; border-radius: 8px; width: 100%; }

.login-main { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px 24px; width: 100%; max-width: 380px; }
.login-card h1 { font-family: var(--serif); font-size: 22px; margin: 0 0 20px; text-align: center; }
.login-card label { display: block; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.login-card button { width: 100%; }
