* { box-sizing: border-box; }
body {
  margin: 0;
  background: #F2F5F1;
  font-family: 'Noto Sans JP', sans-serif;
  color: #1F3536;
}
.page {
  min-height: 100vh;
  padding-bottom: 48px;
}
.hero {
  background: linear-gradient(180deg, #1F3536 0%, #2C4A47 100%);
  color: #F2F5F1;
  padding: 28px 20px 32px;
}
.hero-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px 0;
}
.hero-sub {
  font-size: 13px;
  opacity: 0.85;
}
.section {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 18px 0;
}
.card {
  background: #fff;
  border: 1px solid #E1E7E2;
  border-radius: 10px;
  padding: 20px;
}
.card + .card { margin-top: 16px; }
.card-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 14px 0;
}
.field-row { margin-bottom: 14px; }
.field-label {
  font-size: 12.5px;
  color: #5B655F;
  margin-bottom: 6px;
  display: block;
}
.field-row input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #D6DED8;
  border-radius: 6px;
  font-size: 14px;
}
.password-field-wrap {
  position: relative;
}
.password-field-wrap input {
  padding-right: 64px;
}
.password-toggle-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #4C7A64;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 8px;
  cursor: pointer;
}
.btn-primary {
  width: 100%;
  padding: 12px;
  border: none;
  background: #1F3536;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 6px;
}
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.link-row {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: #5B655F;
}
.link-row a { color: #4C7A64; font-weight: 500; text-decoration: none; }
.helper-text {
  font-size: 11.5px;
  color: #6E7873;
  line-height: 1.6;
  margin-bottom: 14px;
}
.msg {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
}
.msg.error { background: #FBEEEA; color: #B0503F; }
.msg.success { background: #EAF7EE; color: #1F5C33; }
.loading-text { text-align: center; padding: 60px 0; color: #6E7873; font-size: 13px; }

/* エリア候補・対応内容などのリスト編集UI（areas.html / services.html 共通） */
.area-option-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.area-option-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: #F6F1E7; border-radius: 6px; font-size: 13px; }
.area-option-name { color: #1F3536; }
.area-option-furi { font-size: 11px; color: #6E7873; margin-left: 4px; }
.area-option-btn { font-size: 11.5px; border: 1px solid #D6DED8; background: #fff; border-radius: 5px; padding: 4px 8px; cursor: pointer; color: #5B655F; margin-left: 6px; }
.area-option-edit-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 10px 12px; background: #EAF2EC; border-radius: 6px; }
.area-option-edit-row input { flex: 1; min-width: 100px; padding: 7px 9px; border: 1px solid #D6DED8; border-radius: 5px; font-size: 12.5px; }
.area-option-edit-row button { border: none; border-radius: 5px; padding: 7px 12px; font-size: 12px; cursor: pointer; background: #1F3536; color: #fff; }
.inline-add-row-2 { display: flex; gap: 6px; flex-wrap: wrap; }
.inline-add-row-2 input { flex: 1; min-width: 110px; padding: 9px 10px; border: 1px solid #D6DED8; border-radius: 6px; font-size: 13px; }
.inline-add-row-2 button { border: none; background: #1F3536; color: #fff; border-radius: 6px; padding: 0 16px; font-size: 12.5px; cursor: pointer; }

/* 並び替えボタン（services.html） */
.reorder-btn { border: 1px solid #D6DED8; background: #fff; border-radius: 5px; width: 28px; height: 28px; font-size: 12px; cursor: pointer; color: #5B655F; padding: 0; flex-shrink: 0; }
.reorder-btn:disabled { opacity: 0.3; cursor: default; }
.service-edit-row { display: flex; gap: 6px; margin-bottom: 8px; align-items: center; }
.service-edit-row input { flex: 1; padding: 9px 10px; border: 1px solid #D6DED8; border-radius: 6px; font-size: 13px; }
.service-edit-row button.delete-btn { border: none; background: #E7DED0; color: #7A5A2E; border-radius: 6px; padding: 0 12px; cursor: pointer; font-size: 12px; height: 36px; }

/* 週間スケジュールグリッド（availability.html） */
.grid-wrap { width: 100%; }
table.schedule { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 11px; }
table.schedule th { font-weight: 500; color: #5B655F; padding: 4px 2px; text-align: center; font-size: 10.5px; }
table.schedule th.time-col, table.schedule td.time-col { width: 15%; text-align: left; color: #5B655F; padding-left: 2px; font-size: 9.5px; line-height: 1.25; }
table.schedule td { padding: 2px; text-align: center; vertical-align: top; }
.cell { border-radius: 5px; padding: 5px 2px; font-size: 13px; font-weight: 600; user-select: none; min-height: 38px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; overflow: hidden; }
.cell .area-tag { font-size: 8px; font-weight: 400; line-height: 1.1; word-break: break-all; }
.overlay { position: fixed; inset: 0; background: rgba(20,30,28,0.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.sheet { width: 100%; max-width: 480px; background: #fff; border-radius: 16px; padding: 20px 18px 26px; max-height: 86vh; overflow-y: auto; }
.sheet-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sheet-title { font-family: 'Shippori Mincho', serif; font-size: 16px; font-weight: 700; }
.sheet-close { background: none; border: none; font-size: 18px; color: #6E7873; cursor: pointer; }
.slot-detail { background: #EAF2EC; border-radius: 10px; padding: 14px; margin-bottom: 16px; }
.slot-detail-day { font-size: 15px; font-weight: 700; color: #1F3536; }
.edit-toggle-pair { display: flex; gap: 8px; }
.edit-toggle-pair button { flex: 1; padding: 9px; border-radius: 8px; border: 1px solid #C9D6CC; background: #fff; font-size: 13px; cursor: pointer; }
.edit-toggle-pair button.on.active { background: #6B9080; border-color: #6B9080; color: #fff; }
.edit-toggle-pair button.off.active { background: #9A938E; border-color: #9A938E; color: #fff; }
.edit-toggle-pair button.consult.active { background: #D9A838; border-color: #D9A838; color: #fff; }
.area-tag-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.area-tag-option { font-size: 12.5px; padding: 7px 12px; border-radius: 999px; border: 1px solid #C9D6CC; background: #fff; color: #3D5A50; cursor: pointer; }
.area-tag-option.selected { background: #6B9080; border-color: #6B9080; color: #fff; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #4A5450; }
.legend-swatch { width: 12px; height: 12px; border-radius: 3px; }
.add-service-btn { font-size: 12px; color: #3D5A50; background: #EAF2EC; border: 1px dashed #B9CCBE; padding: 10px; border-radius: 6px; cursor: pointer; margin: 4px 0 10px; width: 100%; }
.card.warn { background: #FBEEEA; border-color: #E8C3B2; }
.field-row textarea { width: 100%; padding: 10px 12px; border: 1px solid #D6DED8; border-radius: 6px; font-size: 14px; font-family: inherit; resize: vertical; }
