body {
      font-family: system-ui, sans-serif;
      margin: 0;
      background: #f7f3ee;
      color: #333;
    }

    .app {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 90px;
}

    h1 {
      font-size: 24px;
    }

    .past-card {
      background: #fff;
      border-radius: 16px;
      padding: 14px;
      margin-bottom: 14px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .tabs {
      display: flex;
      gap: 8px;
      margin-bottom: 14px;
      overflow-x: auto;
    }

    .tab {
      border: none;
      border-radius: 999px;
      padding: 10px 16px;
      background: #e8dfd3;
      font-size: 15px;
      white-space: nowrap;
    }

    .tab.active {
      background: #333;
      color: #fff;
    }

    .card {
      background: #fff;
      border-radius: 18px;
      padding: 16px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    }

    label {
      display: block;
      font-weight: 700;
      margin: 16px 0 6px;
    }

    input, textarea {
      width: 100%;
      box-sizing: border-box;
      border: 1px solid #ddd;
      border-radius: 12px;
      padding: 12px;
      font-size: 16px;
      background: #fff;
    }

    textarea {
      min-height: 160px;
      resize: vertical;
    }

    .buttons {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .choice {
      border: 1px solid #ddd;
      border-radius: 999px;
      background: #fff;
      padding: 8px 12px;
      font-size: 18px;
    }

    .choice.selected {
      background: #333;
      color: #fff;
    }

    .status {
      margin-top: 12px;
      font-size: 13px;
      color: #777;
    }

    .tag-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.tag-chip {
  border-radius: 999px;
  background: #e8dfd3;
  padding: 7px 12px;
  font-size: 14px;
  cursor: pointer;
}

.header {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1;
}

.header-action {
  height: 40px;
  min-width: 64px;
  border: none;
  border-radius: 999px;
  background: transparent;
  font-size: 18px;
  color: #666;
}

.record-notice {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f1eadf;
  font-size: 14px;
  color: #666;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.record-notice button {
  border: none;
  background: transparent;
  color: #333;
  font-size: 14px;
}


.missing-bar {
  display: flex;
  align-items: center;
  gap: 10px;

  margin: 16px 0;
  padding: 12px 0;

  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}

.missing-label {
  color: #333;
  font-size: 14px;
  font-weight: 600;
   margin-left: 10px;
}

.missing-bar button {
  border: none;
  border-radius: 999px;
  background: #e8dfd3;

  padding: 6px 12px;

  font-size: 14px;
  color: #333;

  cursor: pointer;
}

.missing-bar button.active {
  background: #333;
  color: #fff;
}

.missing-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
}

.missing-label {
  white-space: nowrap;
}

.tag-suggestions {
  position: relative;
  margin-bottom: 0;
}

#tagSuggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 12px 12px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tag-suggestion-item {
  padding: 12px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.15s;
}

.tag-suggestion-item:last-child {
  border-bottom: none;
}

.tag-suggestion-item:hover,
.tag-suggestion-item.active {
  background-color: #f5f1e8;
}

.tag-suggestion-item.active {
  background-color: #e8dfd3;
}

#tagInput {
  border-radius: 12px 12px 0 0;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal {
  width: min(92vw, 380px);
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.16);
}

.modal h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

.modal label {
  margin: 12px 0 6px;
}

.modal .error {
  color: #b00020;
  font-size: 14px;
  margin-top: 8px;
}

.modal .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.modal .modal-actions button {
  border-radius: 999px;
  border: none;
  padding: 10px 14px;
  cursor: pointer;
}

.modal .modal-actions button.cancel {
  background: #f1f1f1;
  color: #333;
}

.modal .modal-actions button.confirm {
  background: #333;
  color: #fff;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;

  height: 64px;

  background: #fff;
  border-top: 1px solid #ddd;

  display: flex;
  z-index: 300;
}

.bottom-nav button {
  flex: 1;
  border: none;
  background: transparent;

  font-size: 15px;
  color: #666;
}

.bottom-nav button.active {
  color: #000;
  font-weight: 700;
}

.record-month-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
}

#recordSearchArea {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 16px;
  background: #f7f3ee;
  border: 1px solid #e5ded4;
}

#recordSearchInput {
  width: 100%;
  box-sizing: border-box;

  padding: 10px 12px;

  border: 1px solid #ddd;
  border-radius: 10px;

  font-size: 16px;
}

.record-search-filters {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.search-filter {
  flex: 1;
  border: none;
  border-radius: 999px;
  background: #e8dfd3;
  color: #555;
  padding: 10px 0;
  font-size: 14px;
}

.search-filter.active {
  background: #8a7d70;
  color: #fff;
}

.record-month-nav button {
  border: none;
  background: transparent;
  font-size: 18px;
  color: #333;
}

#currentMonthBtn {
  font-weight: 700;
  min-width: 130px;
}

.record-month-nav button:disabled {
  opacity: 0.25;
}