:root {
  --paper-base: #ffffff;
  --paper-dot: rgba(120, 113, 108, 0.16);
  --glass-light: rgba(245, 241, 234, 0.9);
  --glass-dark: rgba(28, 25, 23, 0.72);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Manrope, ui-sans-serif, system-ui;
}

.paper-bg {
  background-color: var(--paper-base);
  background-image:
    radial-gradient(var(--paper-dot) 0.8px, transparent 0.8px),
    linear-gradient(135deg, rgba(15, 118, 110, 0.03), rgba(120, 53, 15, 0.02));
  background-size: 18px 18px, cover;
}

.dark .paper-bg {
  background-color: #1c1917;
  background-image:
    radial-gradient(rgba(214, 211, 209, 0.12) 0.8px, transparent 0.8px),
    linear-gradient(120deg, rgba(15, 118, 110, 0.1), rgba(127, 29, 29, 0.08));
}

.glass-card {
  border: 1px solid rgba(120, 113, 108, 0.14);
  border-radius: 1.25rem;
  background: var(--glass-light);
  padding: 1rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(41, 37, 36, 0.08);
}

.dark .glass-card {
  border-color: rgba(214, 211, 209, 0.14);
  background: var(--glass-dark);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
}

.pill {
  border: 1px solid rgba(120, 113, 108, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.36rem 0.8rem;
  font-weight: 700;
}

.topbar {
  border-bottom: 1px solid rgba(120, 113, 108, 0.2);
  background: rgba(245, 241, 234, 0.9);
  backdrop-filter: blur(12px);
}

.dark .topbar {
  border-color: rgba(214, 211, 209, 0.16);
  background: rgba(28, 25, 23, 0.9);
}

.top-nav-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  border-radius: 0.8rem;
  min-width: 4.1rem;
  height: 2.9rem;
  padding: 0.3rem 0.45rem;
  color: #57534e;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.top-nav-item:hover {
  background: rgba(13, 148, 136, 0.08);
  color: #0f766e;
}

.top-nav-item-active {
  background: rgba(13, 148, 136, 0.12);
  color: #0f766e;
}

.top-nav-label {
  max-width: none;
  opacity: 1;
  white-space: nowrap;
  transform: none;
  font-size: 0.62rem;
  line-height: 1;
}

.dark .top-nav-item {
  color: #d6d3d1;
}

.dark .top-nav-item:hover,
.dark .top-nav-item-active {
  background: rgba(45, 212, 191, 0.12);
  color: #99f6e4;
}

.profile-trigger {
  border-radius: 0.8rem;
  color: #44403c;
  transition: all 0.2s ease;
}

.profile-trigger:hover {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.08);
}

.dark .profile-trigger {
  color: #e7e5e4;
}

.dark .profile-trigger:hover {
  color: #99f6e4;
  background: rgba(45, 212, 191, 0.12);
}

.profile-drawer {
  transition: transform 0.28s ease;
}

.profile-drawer.profile-drawer-open {
  transform: translateX(0);
}

.bottom-nav {
  border-top: 1px solid rgba(120, 113, 108, 0.22);
  background: rgba(245, 241, 234, 0.95);
  backdrop-filter: blur(12px);
}

.bottom-nav-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  border-radius: 0.7rem;
  padding: 0.35rem 0.2rem;
  color: #57534e;
  text-decoration: none;
  font-size: 0.64rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.bottom-nav-item-active,
.bottom-nav-item:hover {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.1);
}

.dark .bottom-nav {
  border-color: rgba(214, 211, 209, 0.2);
  background: rgba(28, 25, 23, 0.95);
}

.dark .bottom-nav-item {
  color: #d6d3d1;
}

.dark .bottom-nav-item-active,
.dark .bottom-nav-item:hover {
  color: #99f6e4;
  background: rgba(45, 212, 191, 0.12);
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.note-postit {
  border: 1px solid;
  border-radius: 0;
  padding: 0.9rem;
  box-shadow: 0 10px 18px rgba(41, 37, 36, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.note-postit:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 24px rgba(41, 37, 36, 0.14);
}

.note-drop-placeholder {
  opacity: 0.55;
  outline: 2px dashed rgba(15, 118, 110, 0.45);
  outline-offset: -2px;
  transform: scale(0.985);
  pointer-events: none;
}

.note-color-dot {
  justify-self: center;
  height: 1.25rem;
  width: 1.25rem;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.note-color-dot:hover {
  transform: scale(1.08);
}

.note-color-dot:focus-visible,
.event-icon-dot:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.8);
  outline-offset: 2px;
}

.note-color-dot-active {
  border-color: #0f766e;
}

.event-color-dot-active {
  border-color: #0f766e;
}

.event-icon-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  justify-self: center;
  border-radius: 0.55rem;
  border: 1px solid rgba(120, 113, 108, 0.35);
  background: rgba(255, 255, 255, 0.8);
  color: #78716c;
  transition: all 0.15s ease;
}

.event-icon-dot svg {
  width: 1.1rem;
  height: 1.1rem;
}

.event-icon-dot:hover {
  border-color: rgba(15, 118, 110, 0.55);
  color: #0f766e;
}

.event-icon-dot-active {
  border-color: #0f766e;
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
}

.event-chip-custom {
  background: var(--event-chip-bg);
  color: var(--event-chip-text);
}

.event-chip-button {
  border: 0;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.event-chip-button:hover {
  transform: translateY(-1px);
}

.event-chip-placeholder {
  opacity: 0.52;
  pointer-events: none;
}

.event-details-panel.event-details-panel-open {
  animation: eventDetailsIn 0.24s ease-out;
}

.home-note-mini {
  position: relative;
}

.home-note-pop {
  position: absolute;
  left: 50%;
  top: calc(100% + 0.3rem);
  transform: translateX(-50%) translateY(-4px);
  min-width: 10rem;
  max-width: min(16rem, calc(100vw - 1rem));
  border-radius: 0;
  border: 1px solid rgba(120, 113, 108, 0.25);
  background: var(--mini-note-color);
  padding: 0.4rem 0.55rem;
  font-size: 0.72rem;
  line-height: 1.25;
  color: #292524;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 10;
}

.home-note-mini:hover .home-note-pop {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.home-note-pop.home-note-pop-left {
  left: auto;
  right: 0;
  transform: translateY(-4px);
}

.home-note-mini:hover .home-note-pop.home-note-pop-left {
  transform: translateY(0);
}

.home-note-pop.home-note-pop-right {
  left: 0;
  transform: translateY(-4px);
}

.home-note-mini:hover .home-note-pop.home-note-pop-right {
  transform: translateY(0);
}

.dark .home-note-pop {
  border-color: rgba(120, 113, 108, 0.45);
  color: #292524;
}

.home-habit-mini {
  display: grid;
  grid-template-rows: 1.8rem auto;
  justify-items: center;
  align-items: end;
  gap: 0.28rem;
  width: 4.9rem;
}

.home-habit-mini-title {
  width: 100%;
  min-height: 1.8rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 0.67rem;
  line-height: 1.15;
  font-weight: 700;
  text-align: center;
  color: #57534e;
  cursor: pointer;
}

.home-habit-mini-title:hover,
.home-habit-mini-title:focus-visible {
  color: #292524;
}

.home-habit-mini-btn {
  position: relative;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 9999px;
  border: 1px solid rgba(120, 113, 108, 0.38);
  background: rgba(255, 255, 255, 0.84);
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.home-habit-mini-btn:hover {
  transform: translateY(-1px);
}

.home-habit-mini-btn-empty {
  background: rgba(255, 255, 255, 0.7);
}

.home-habit-mini-btn-done {
  border-color: transparent;
}

.dark .home-habit-mini-title {
  color: #a8a29e;
}

.dark .home-habit-mini-btn-empty {
  background: transparent;
  border-color: rgba(87, 83, 78, 0.62);
}

@keyframes eventDetailsIn {
  from {
    opacity: 0;
    transform: translateX(-22%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.dark .event-chip-custom {
  background: var(--event-chip-bg-dark);
  color: var(--event-chip-text-dark);
}

.habit-day {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  height: 1.9rem;
  width: 1.9rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.habit-day-empty {
  border-color: rgba(120, 113, 108, 0.35);
  background: rgba(255, 255, 255, 0.7);
}

.dark .habit-day-empty {
  background: transparent;
}

.habit-day-empty:hover {
  border-color: rgba(13, 148, 136, 0.55);
  background: rgba(240, 253, 250, 0.95);
}

.habit-day-done {
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(41, 37, 36, 0.15);
}
