/* オリーブ帖 共通（色・文字・寸法は design_handoff_olive_cho/README.md 4章） */
:root {
  --ground: #F5F0E3;
  --surface: #FBF8F0;
  --surface-strong: #ECE4D0;
  --white: #FFFFFF;
  --text: #2B2A22;
  --text-sub: #4A4536;
  --text-note: #6B6552;
  --rule: #D6CCB2;
  --rule-dot: #CFC4A8;
  --input-border: #B9AE90;
  --olive: #556B2F;
  --olive-dark: #3F5121;
  --band-sub: #E4E9D2;
  --harvest-bg: #E2E6C8;
  --cancel: #9A4A32;
  --cancel-bg: #F4E6DE;
  --cancel-bar: #B9A79C;
  --reserve-border: #8A7A55;
  --reserve-text: #5E4F2E;
  --reserve-bg: repeating-linear-gradient(135deg, #FBF8F0 0 7px, #EFE7D3 7px 9px);
  --bar-bg: #E6DDC6;
  --sunday: #9A4A32;
  --saturday: #3E5A78;
  --out-date: #BDB397;
  --disabled: #B9B29C;
  --shade: rgba(43, 42, 34, .55);
  --good-ring: #B9C29A;
  --font: 'BIZ UDPGothic', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: normal;
  touch-action: manipulation;
}

button, input, textarea, select { font-family: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--olive-dark); }

:focus-visible { outline: 3px solid #2B2A22; outline-offset: 2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- 見出しの帯 ---------- */
.band { background: var(--olive); color: #fff; }
.band__app { font-size: 24px; font-weight: 700; letter-spacing: .08em; line-height: 1.3; }
.band__sub { font-size: 13px; color: var(--band-sub); }
.band__link {
  min-height: 44px; display: inline-flex; align-items: center; padding: 0;
  background: none; border: none; color: #fff; font-size: 14px; text-decoration: underline;
  white-space: nowrap;
}
.band__back {
  min-height: 48px; padding: 0 6px; background: none; border: none; color: #fff;
  font-size: 16px; font-weight: 700; white-space: nowrap;
}
.band__name {
  font-size: 18px; font-weight: 700; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.band__name small { font-size: 15px; font-weight: 400; }

/* ---------- 左上の英字のロゴ（山旅帖の「YAMATABI-CHO」と同じ作り。飾りなので読み上げには出さない） ---------- */
.brand {
  position: absolute; top: 8px; left: 20px; z-index: 4; pointer-events: none;
  font-family: 'Noto Sans JP', 'Hiragino Sans', sans-serif; font-weight: 400; font-style: normal;
  font-size: 9px; line-height: 1; letter-spacing: .18em; color: rgba(255, 255, 255, .5);
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 52px; padding: 0 16px; border-radius: 4px;
  font-size: 16px; font-weight: 700; line-height: 1.3; text-align: center;
}
.btn--block { display: flex; width: 100%; }
.btn--primary { background: var(--olive); color: #fff; border: none; }
.btn--primary:disabled, .btn--danger:disabled { background: var(--disabled); }
.btn--secondary { background: #fff; color: var(--text); border: 1.5px solid var(--input-border); }
.btn--danger { background: var(--cancel); color: #fff; border: none; }
.btn--danger-outline { background: #fff; color: var(--cancel); border: 1.5px solid var(--cancel); }
.btn--dashed {
  background: none; border: 1.5px dashed var(--reserve-border); border-radius: 6px;
  color: var(--olive-dark); font-size: 17px; min-height: 56px;
}
.btn--text {
  min-height: 48px; background: none; border: none; color: var(--olive-dark);
  font-size: 15px; font-weight: 700; text-decoration: underline;
}

/* 選ぶボタン（選ばれたら緑地・白文字） */
.choice {
  min-height: 56px; padding: 6px 8px; border-radius: 4px;
  background: #fff; color: var(--text); border: 1.5px solid var(--input-border);
  font-size: 17px; font-weight: 700; line-height: 1.3;
}
.choice[aria-pressed="true"] { background: var(--olive); color: #fff; border: 2px solid var(--olive); }

/* ---------- 入力欄 ---------- */
.label { font-size: 15px; font-weight: 700; }
.label small { font-size: 15px; font-weight: 400; color: var(--text-note); }
.input {
  width: 100%; min-height: 52px; padding: 0 14px;
  font-size: 17px; background: #fff; color: var(--text);
  border: 1.5px solid var(--input-border); border-radius: 4px;
}
.input--large { min-height: 56px; font-size: 18px; }
.input[aria-invalid="true"] { border-color: var(--cancel); }
.error-text { font-size: 14px; color: var(--cancel); font-weight: 700; margin-top: 6px; }

/* ---------- 札 ---------- */
.tag {
  display: inline-block; font-weight: 700; line-height: 1; white-space: nowrap; border-radius: 2px;
  font-size: 14px; padding: 3px 8px;
}
.tag--confirmed { background: var(--olive); color: #fff; border: 1px solid var(--olive); }
.tag--canceled { background: #fff; color: var(--cancel); border: 1px solid var(--cancel); }
.tag--recorded { background: #fff; color: var(--olive-dark); border: 1px solid var(--olive); }
.tag--reserve { background: var(--surface); color: var(--reserve-text); border: 1px dashed var(--reserve-border); }

/* ---------- グッドマーク ---------- */
.good {
  flex: none; display: inline-grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 1px solid var(--good-ring);
}
.good svg { width: 72%; height: 72%; }

/* ---------- カード ---------- */
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; }

/* ---------- トースト ---------- */
.toast {
  position: fixed; top: 70px; left: 16px; right: 16px; margin: 0 auto; width: max-content; z-index: 60;
  display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px);
  padding: 10px 18px 10px 12px; background: var(--text); color: #fff; border-radius: 999px;
  font-size: 16px; font-weight: 700; box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
}
.toast .good { width: 24px; height: 24px; }
.toast[hidden] { display: none; }

/* ---------- 確認シート ---------- */
.sheet-shade {
  position: fixed; inset: 0; z-index: 50; background: var(--shade);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto;
  background: var(--surface); border-radius: 14px 14px 0 0; padding: 24px 20px 20px;
}
.sheet__title { font-size: 20px; font-weight: 700; line-height: 1.5; margin: 0; }
@media (min-width: 768px) {
  .sheet-shade { align-items: center; }
  .sheet { border-radius: 8px; }
}

/* ---------- 読み込み・失敗 ---------- */
.state-box { padding: 40px 16px; text-align: center; color: var(--text-sub); font-size: 16px; line-height: 1.7; }
.state-box .btn { margin-top: 16px; }

/* ---------- 時間帯ごとの人数 ---------- */
.slots { display: flex; align-items: flex-end; gap: 2px; height: 72px; border-bottom: 1px solid var(--text); }
.slots > div { flex: 1; background: var(--olive); }
.slots-axis {
  display: grid; grid-template-columns: repeat(10, minmax(0, 1fr));
  font-size: 12px; color: var(--text-note); margin-top: 4px;
}

/* ---------- 人の一覧（ボランティア画面と管理者画面で共通） ---------- */
.slots-title { font-size: 16px; font-weight: 700; margin: 0; }
.nowrap { white-space: nowrap; }
.slots-peak { font-size: 14px; color: var(--text-sub); margin: 2px 0 8px; }
.empty-note { padding: 12px 0; font-size: 15px; color: var(--text-note); border-top: 1px solid var(--rule); }
.person {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 0; border-bottom: 1px dotted var(--rule-dot);
}
.person__main { min-width: 0; }
.person__name { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 6px; min-width: 0; }
.person__name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person__memo { font-size: 14px; color: var(--text-sub); overflow-wrap: anywhere; }
.person__time { font-size: 15px; white-space: nowrap; }
.people__empty { padding: 12px 0; font-size: 15px; color: var(--text-note); }

/* 画面に残るお知らせ（エラーなど。トーストのように消えない） */
.alert-box {
  margin-top: 12px; padding: 10px 12px; border: 1.5px solid var(--cancel); border-radius: 4px;
  background: #fff; color: var(--cancel); font-size: 15px; font-weight: 700; line-height: 1.6;
}
