/* 合同会社まちあい — 事務所サイト（架空） */
:root {
  --bg: #fffdf8;
  --surface: #ffffff;
  --surface-2: #f6f1e7;
  --ink: #1e1b22;
  --sub: #565059;
  --line: #e8e1d3;
  --ops: #2f6f8f;
  --ops-bg: #f3f7f9;
  --ops-line: #cfdde5;
  --c-R: #d9433e;
  --c-B: #2f6fd9;
  --c-V: #7b4fd1;
  --c-Y: #c99a12;
  --c-G: #3e9e63;
  --font: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --font-num: "Space Grotesk", "Zen Old Mincho", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
html, body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.85;
  letter-spacing: 0.02em;
  -webkit-text-size-adjust: 100%;
}
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg) url("/assets/wall/plain.webp") center top / cover no-repeat;
  opacity: 0.55;
  pointer-events: none;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--ops); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
.num { font-family: var(--font-num); font-feature-settings: "tnum"; letter-spacing: 0.04em; }

/* Day による差し替え：既定は5名版。day>=4 のとき html.d4 が付く */
.v4 { display: none; }
html.d4 .v4 { display: revert; }
html.d4 .v5 { display: none; }
[hidden] { display: none !important; }

/* ヘッダー */
.site-head { background: rgba(255, 253, 248, 0.92); border-bottom: 1px solid var(--line); }
.site-head .in { max-width: 720px; margin: 0 auto; padding: 12px 16px 6px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.brand b { font-size: 17px; letter-spacing: 0.12em; font-weight: 700; }
.nav { display: flex; flex-wrap: wrap; gap: 2px 18px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 14px; }
.nav a { display: inline-block; padding: 6px 0; color: var(--sub); text-decoration: none; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ops); }

/* 本文 */
main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 22px 16px 40px; }
.sheet {
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 18px;
}
.sheet + .sheet { margin-top: 16px; }
h1 { font-size: 24px; line-height: 1.5; letter-spacing: 0.08em; font-weight: 700; margin-bottom: 14px; }
h2 { font-size: 18px; line-height: 1.6; letter-spacing: 0.08em; font-weight: 700; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
h3 { font-size: 16px; line-height: 1.7; font-weight: 700; letter-spacing: 0.06em; margin: 0 0 4px; }
p + p { margin-top: 0.8em; }
.lead { font-size: 15px; color: var(--sub); }
.muted { color: var(--sub); }
.small { font-size: 13px; }
.stack > * + * { margin-top: 22px; }

/* ヒーロー */
.hero h1 { font-size: 27px; margin-bottom: 12px; }
.cta { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.btn {
  display: inline-block;
  min-height: 46px;
  padding: 10px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--ops);
  color: #fff;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #265c78; }
.btn[aria-disabled="true"] { background: #8aa9b9; cursor: default; }

.unit { display: flex; gap: 14px; align-items: center; }
.unit img { width: 72px; height: 72px; flex: none; object-fit: contain; }
.unit .d { font-size: 15px; }

ol.rules { padding-left: 1.4em; }
ol.rules li + li { margin-top: 0.6em; }
dl.faq dt { font-weight: 700; margin-top: 16px; }
dl.faq dt:first-child { margin-top: 0; }
dl.faq dd { margin-top: 2px; }

/* 規約 */
.terms h3 { margin-top: 20px; }
.terms h3:first-of-type { margin-top: 8px; }
.terms ol { padding-left: 1.6em; }
.terms .rev { color: var(--sub); font-size: 14px; margin-bottom: 4px; }
.terms .fusoku { margin-top: 22px; color: var(--sub); font-size: 14px; }

/* 審査要項 */
dl.spec { display: grid; grid-template-columns: 1fr; gap: 0; }
dl.spec dt { font-weight: 700; margin-top: 14px; color: var(--ops); font-size: 14px; letter-spacing: 0.08em; }
dl.spec dt:first-child { margin-top: 0; }

/* お知らせ */
.news-item { padding: 14px 0; border-top: 1px solid var(--line); }
.news-item:first-of-type { border-top: 0; padding-top: 0; }
.news-item time { display: block; font-size: 13px; color: var(--sub); }
.news-item h3 { margin-bottom: 4px; }
details.archive { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
details.archive summary { cursor: pointer; color: var(--ops); font-weight: 700; letter-spacing: 0.08em; padding: 6px 0; list-style: none; }
details.archive summary::-webkit-details-marker { display: none; }
details.archive summary::after { content: " \25BC"; font-size: 12px; }
details.archive[open] summary::after { content: " \25B2"; }
details.archive .news-item:first-of-type { padding-top: 12px; }

/* メンバー */
table.members { width: 100%; border-collapse: collapse; font-size: 15px; }
table.members th { text-align: left; font-size: 12px; color: var(--sub); font-weight: 500; padding: 0 6px 6px; border-bottom: 1px solid var(--line); letter-spacing: 0.08em; }
table.members td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; line-height: 1.6; }
table.members .ic { width: 52px; }
table.members .ic img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); object-fit: cover; }
table.members tr[data-c="R"] .ic img { border-color: var(--c-R); }
table.members tr[data-c="B"] .ic img { border-color: var(--c-B); }
table.members tr[data-c="V"] .ic img { border-color: var(--c-V); }
table.members tr[data-c="Y"] .ic img { border-color: var(--c-Y); }
table.members tr[data-c="G"] .ic img { border-color: var(--c-G); }
table.members .nm { font-weight: 700; white-space: nowrap; }
table.members .nm small { display: block; font-weight: 500; font-size: 12px; color: var(--sub); }
table.members .qt { color: var(--sub); }
.note { margin-top: 14px; color: var(--sub); font-size: 14px; }
@media (max-width: 480px) {
  table.members .role { display: none; }
  table.members .rolehd { display: none; }
}
@media (min-width: 481px) {
  table.members .nm small { display: none; }
}
.profile { display: flex; gap: 16px; align-items: center; }
.profile img { width: 84px; height: 84px; border-radius: 50%; border: 2px solid var(--c-V); object-fit: cover; flex: none; }

/* フォーム */
.field { margin-top: 16px; }
.field label, .field .lb { display: block; font-weight: 700; font-size: 14px; letter-spacing: 0.06em; margin-bottom: 4px; }
input[type="text"], textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  padding: 10px 12px;
}
input[type="text"]:focus, textarea:focus, .btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--ops); outline-offset: 2px; }
textarea { min-height: 150px; resize: vertical; line-height: 1.7; }
.readonly { display: inline-block; min-width: 3.5em; padding: 6px 14px; border: 1px dashed var(--ops-line); border-radius: 8px; background: var(--ops-bg); color: var(--ink); font-size: 18px; }
.help { font-size: 13px; color: var(--sub); margin-top: 4px; }
.submit { margin-top: 20px; }

.reply { background: var(--ops-bg); border: 1px solid var(--ops-line); border-radius: 10px; padding: 16px; margin-top: 14px; }
.reply .subj { font-size: 14px; color: var(--sub); margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--ops-line); word-break: break-word; }
.reply .body { white-space: pre-wrap; word-break: break-word; margin: 0; font: inherit; }

/* フッター */
.site-foot { border-top: 1px solid var(--line); background: rgba(255, 253, 248, 0.92); }
.site-foot .in { max-width: 720px; margin: 0 auto; padding: 18px 16px 28px; font-size: 13px; color: var(--sub); line-height: 1.8; }
.site-foot ul { list-style: none; margin: 8px 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 0 16px; }
.site-foot a { color: var(--sub); }
.site-foot .fic { font-weight: 700; color: var(--ink); margin-top: 6px; }

@media (min-width: 720px) {
  main { padding-top: 36px; }
  .sheet { padding: 30px 34px; }
  h1 { font-size: 28px; }
  .hero h1 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
