:root {
  --bg: #eef6f7;
  --bg-soft: #f7fbfc;
  --card: rgba(255, 255, 255, 0.9);
  --primary: #2f7a74;
  --text: #163132;
  --muted: #5f7a7c;
  --border: #d6e8e7;
  --danger: #b64141;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Comfortaa", "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, #f7fcfd, #e6f1f3 62%);
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 44px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  gap: 12px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.alert-btn {
  width: auto;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(180deg, #f5b75d, #e5922b);
}

.reminders-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.back-btn {
  width: auto;
  padding: 8px 10px;
  background: #f0f8f7;
  color: #2c615e;
  border: 1px solid #cfe4e2;
}

.dismiss-reminder {
  width: auto;
  padding: 6px 9px;
  border-radius: 10px;
  background: #fff4e8;
  color: #8a4a05;
  border: 1px solid #f0d3b3;
}

h1 {
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.subtitle,
.today,
.hint {
  color: var(--muted);
  margin-top: 6px;
}

.menu-wrapper {
  position: relative;
}

.menu-toggle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.menu-dropdown {
  position: absolute;
  top: 48px;
  right: 0;
  min-width: 160px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(20, 50, 52, 0.12);
  padding: 6px;
  display: none;
  gap: 4px;
  z-index: 20;
}

.menu-dropdown.open {
  display: grid;
}

.menu-item {
  background: #f5fbfa;
  color: #254f4d;
  border: 1px solid #d9ecea;
  text-align: left;
  width: 100%;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.tab {
  border: 1px solid #cfe4e2;
  background: #f3faf9;
  color: #2c615e;
  border-radius: 12px;
  padding: 11px 12px;
  font-weight: 700;
}

.tab.active {
  background: linear-gradient(180deg, #398983, #2f7a74);
  color: #ffffff;
  border-color: #2f7a74;
  box-shadow: 0 8px 20px rgba(47, 122, 116, 0.25);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(4px);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: 0 12px 30px rgba(35, 78, 77, 0.1);
}

.range-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

form {
  display: grid;
  gap: 8px;
}

label {
  font-weight: 650;
  margin-top: 6px;
}

select,
textarea,
input,
button {
  font: inherit;
}

select,
textarea,
input {
  width: 100%;
  padding: 11px;
  border-radius: 12px;
  border: 1px solid #cfe1e0;
  background: var(--bg-soft);
  color: var(--text);
}

select:focus,
textarea:focus,
input:focus {
  outline: 2px solid #b9e3df;
  outline-offset: 1px;
}

button {
  border: 0;
  background: linear-gradient(180deg, #3f958d, var(--primary));
  color: #fff;
  border-radius: 12px;
  padding: 11px 12px;
  font-weight: 650;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 10px;
}

.item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: #ffffff;
}

.item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.entry-date {
  color: #4d6c6d;
  margin-bottom: 4px;
}

.tag {
  display: inline-block;
  font-size: 12px;
  border-radius: 999px;
  padding: 4px 9px;
  margin-bottom: 2px;
  font-weight: 700;
}

.tag.gratitude {
  color: #1a5d34;
  background: #d8f5e4;
}

.tag.stress {
  color: #852828;
  background: #fde5e5;
}

.delete-entry {
  background: #fff;
  color: var(--danger);
  border: 1px solid #efcaca;
  border-radius: 10px;
  padding: 6px 9px;
  font-size: 13px;
  font-weight: 700;
  width: auto;
}

.delete-entry:hover {
  background: #fff5f5;
}

.day-chip {
  background: #f4fbfa;
}

.empty {
  color: var(--muted);
  font-style: italic;
}

#stress-dialog {
  border: 0;
  border-radius: 16px;
  max-width: 420px;
  width: 90%;
  padding: 16px;
}

#stress-dialog::backdrop {
  background: rgba(17, 24, 39, 0.45);
}

#stress-dialog p {
  margin: 10px 0 14px;
  line-height: 1.5;
}
