body {
  font-family: -apple-system, "Hiragino Sans", "Yu Gothic Medium", sans-serif;
  background: #f1eae0;
  color: #221e1b;
  max-width: 960px;
  margin: 40px auto 120px;
  padding: 0 20px;
  line-height: 1.8;
}

h1 {
  font-size: 20px;
}

#zone-title {
  margin-bottom: 4px;
}

#user-email {
  color: #6b6259;
  font-size: 14px;
}

.feature {
  background: #faf7f1;
  border: 1px solid #d8cfc0;
  padding: 16px 20px;
  margin: 20px 0;
}

.feature h3 {
  margin-top: 0;
}

.feature form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.feature input,
.feature textarea,
.feature select {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid #221e1b;
  background: #fff;
}

.feature textarea {
  width: 100%;
}

.feature ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature li {
  border-top: 1px solid #d8cfc0;
  padding: 10px 0;
}

.feature li:first-child {
  border-top: none;
}

.feature li.due {
  color: #b23a2a;
}

.feature li.resolved {
  color: #6b6259;
}

.feature .meta {
  font-size: 13px;
  color: #6b6259;
}

button {
  font: inherit;
  padding: 8px 16px;
  border: 1px solid #221e1b;
  background: #faf7f1;
  cursor: pointer;
}

button:hover {
  background: #e9e1d3;
}

.link-button {
  border: none;
  background: none;
  text-decoration: underline;
  padding: 0;
  font-size: 13px;
  color: #6b6259;
}

.link-button:hover {
  background: none;
  color: #b23a2a;
}

#notification-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

#notification-toggles li {
  border-top: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.subtabs {
  display: flex;
  gap: 2px;
  margin: 20px 0 0;
}

.subtabs button {
  background: #e9e1d3;
  border: 1px solid #d8cfc0;
  border-bottom: none;
  padding: 8px 16px;
  cursor: pointer;
  color: #6b6259;
  font-weight: bold;
}

.subtabs button.active {
  background: #f1eae0;
  color: #221e1b;
  box-shadow: inset 0 2px 0 #b23a2a;
}

.subtab-panel {
  display: none;
  border-top: 1px solid #d8cfc0;
  padding-top: 4px;
}

.subtab-panel.active {
  display: block;
}

.inner-tabs {
  display: flex;
  gap: 2px;
  margin: 16px 0 0;
}

.inner-tabs button {
  background: #f1eae0;
  border: 1px solid #d8cfc0;
  border-bottom: none;
  padding: 6px 14px;
  cursor: pointer;
  color: #6b6259;
  font-size: 13px;
}

.inner-tabs button.active {
  background: #faf7f1;
  color: #221e1b;
  box-shadow: inset 0 2px 0 #6e93b4;
}

.inner-tab-panel {
  display: none;
  border-top: 1px solid #d8cfc0;
}

.inner-tab-panel.active {
  display: block;
}

.grid-2col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 4px;
}

.grid-2col .feature {
  margin: 10px 0;
}

/* ボタンや入力欄が多いパネルは横に並べず、幅いっぱいに縦積みする
   (前田さんの要望: ボタンが増えて縦長パネルが窮屈になったため)。 */
.panel-stack .feature {
  margin: 12px 0;
}

.feature form label {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: #6b6259;
}

.ghost {
  border: 1px solid #d8cfc0;
  background: none;
  color: #6b6259;
}

.ghost:hover {
  background: #e9e1d3;
  color: #221e1b;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.calendar-header h3 {
  margin: 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #d8cfc0;
  border: 1px solid #d8cfc0;
}

.calendar-weekday {
  background: #e9e1d3;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  padding: 6px 0;
}

.calendar-cell {
  background: #faf7f1;
  min-height: 110px;
  padding: 6px;
}

.calendar-cell.outside {
  background: #f1eae0;
  color: #a79c8c;
}

.calendar-cell.today {
  box-shadow: inset 0 0 0 2px #b23a2a;
}

.calendar-date {
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 4px;
}

.calendar-gomi {
  font-size: 11px;
  color: #6b6259;
  margin-bottom: 3px;
  overflow-wrap: break-word;
}

.calendar-deadline {
  font-size: 11px;
  color: #b23a2a;
  margin-bottom: 3px;
  overflow-wrap: break-word;
}

.calendar-event {
  font-size: 12px;
  background: #e9e1d3;
  padding: 2px 5px;
  margin-bottom: 3px;
  overflow-wrap: break-word;
}

.calendar-event-title[data-edit] {
  cursor: pointer;
}

.calendar-event-title[data-edit]:hover {
  text-decoration: underline;
}

.calendar-event-remove {
  border: none;
  background: none;
  padding: 0;
  font-size: 12px;
  color: #6b6259;
  cursor: pointer;
}

.calendar-event-remove:hover {
  color: #b23a2a;
}
