
/* =========================================================
   JUST US — ARUN × JENILIYA
   PART 2: MAIN STYLESHEET
   Theme: Pastel scrapbook, blush, cream, lavender
   ========================================================= */

/* 01. RESET AND DESIGN TOKENS */
:root {
  color-scheme: light;
  --bg: #fff9f7;
  --surface: #ffffff;
  --surface-soft: #fff2f0;
  --surface-pink: #ffe8e8;
  --surface-lavender: #f0ebff;
  --surface-yellow: #fff7d9;
  --text: #332b35;
  --text-soft: #776d79;
  --text-muted: #a49aa5;
  --primary: #c96d8c;
  --primary-dark: #a94d70;
  --primary-light: #f7dce6;
  --lavender: #8d7ac2;
  --border: #f0e3e6;
  --danger: #c64e5a;
  --success: #4f8b72;
  --shadow: 0 12px 36px rgba(85, 50, 70, 0.07);
  --shadow-small: 0 5px 18px rgba(85, 50, 70, 0.06);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --sidebar-width: 260px;
  --header-height: 82px;
  --content-width: 1180px;
  --font-body: "DM Sans", sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(201, 109, 140, 0.4);
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--primary-light);
  color: var(--text);
}

/* 02. AMBIENT BACKGROUND */
.ambient {
  position: fixed;
  z-index: -1;
  width: 360px;
  height: 360px;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.32;
}

.ambient-one {
  top: -160px;
  right: -90px;
  background: #f6cddd;
}

.ambient-two {
  bottom: -180px;
  left: 12%;
  background: #e4d9ff;
}

/* 03. TYPOGRAPHY */
h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.display-font {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.5rem, 2.7vw, 2.2rem);
  line-height: 1.25;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.35;
}

.eyebrow {
  margin-bottom: 9px;
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.muted {
  color: var(--text-soft);
}

.small-text {
  font-size: 12px;
}

.text-center {
  text-align: center;
}

.accent-text {
  color: var(--primary-dark);
}

/* 04. BUTTONS */
.button {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition:
    transform var(--transition),
    background var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 5px 14px rgba(201, 109, 140, 0.19);
}

.button-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: 0 8px 18px rgba(201, 109, 140, 0.23);
}

.button-soft {
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--text);
}

.button-soft:hover:not(:disabled) {
  border-color: var(--primary-light);
  background: var(--surface-pink);
}

.button-outline {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

.button-danger {
  background: var(--danger);
  color: #ffffff;
}

.button-full {
  width: 100%;
}

.icon-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  cursor: pointer;
  font-size: 19px;
  transition:
    background var(--transition),
    transform var(--transition);
}

.icon-button:hover {
  transform: translateY(-1px);
  background: var(--surface-soft);
}

/* 05. LOGIN SCREEN */
.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 18px;
}

.login-card {
  position: relative;
  width: min(100%, 440px);
  padding: 42px 38px 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: card-enter 550ms ease both;
}

.login-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: linear-gradient(
    90deg,
    #e7a5bd,
    #c9b9f0,
    #f5d5a1
  );
  content: "";
}

.brand-mark {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto 22px;
  place-items: center;
  border: 1px solid #f6d8e2;
  border-radius: 22px;
  background: #fff0f5;
  color: var(--primary-dark);
  font-size: 31px;
  animation: gentle-float 4s ease-in-out infinite;
}

.login-card > .eyebrow {
  text-align: center;
}

.login-title {
  margin-bottom: 12px;
  text-align: center;
  font-size: clamp(2.8rem, 9vw, 4rem);
}

.login-title span {
  color: var(--primary);
  font-style: italic;
}

.login-description {
  margin-bottom: 28px;
  color: var(--text-soft);
  text-align: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-form label,
.entry-form label,
.search-panel label {
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.login-form input,
.entry-form input,
.entry-form textarea,
.entry-form select,
.search-row input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  outline: none;
  background: #fffdfd;
  color: var(--text);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.login-form input:focus,
.entry-form input:focus,
.entry-form textarea:focus,
.entry-form select:focus,
.search-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(201, 109, 140, 0.09);
}

.login-form .button {
  margin-top: 12px;
  min-height: 49px;
}

.login-footnote {
  margin: 23px 0 0;
  color: var(--text-muted);
  text-align: center;
  font-size: 11px;
}

.form-error {
  min-height: 0;
  margin: 4px 0;
  color: var(--danger);
  font-size: 12px;
}

.form-error:empty {
  display: none;
}

/* 06. APP SHELL */
.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 27px 17px 18px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.83);
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 3px 8px 26px;
}

.brand-icon {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  background: var(--surface-pink);
  color: var(--primary-dark);
  font-size: 24px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  letter-spacing: 0.09em;
}

.brand small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.sidebar-caption {
  margin: 8px 10px 11px;
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  width: 100%;
  min-height: 43px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  transition:
    background var(--transition),
    color var(--transition),
    transform var(--transition);
}

.nav-link:hover {
  background: var(--surface-soft);
  color: var(--primary-dark);
}

.nav-link.active {
  border-color: #f5dce5;
  background: linear-gradient(100deg, #ffedf3, #fff6f7);
  color: var(--primary-dark);
}

.nav-icon {
  display: inline-grid;
  width: 22px;
  flex: 0 0 auto;
  place-items: center;
  font-size: 17px;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 24px;
}

.sidebar-note {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 15px;
  padding: 15px 12px;
  border: 1px solid #f3e3ec;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff3f7, #f7f2ff);
}

.sidebar-note p {
  margin: 0;
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.5;
}

.note-heart {
  color: var(--primary);
  font-size: 24px;
}

.theme-button,
.logout-button {
  min-height: 40px;
}

/* 07. MAIN CONTENT */
.main-area {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: var(--header-height);
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(240, 227, 230, 0.85);
  background: rgba(255, 249, 247, 0.85);
  backdrop-filter: blur(18px);
}

.topbar-heading {
  display: flex;
  flex-direction: column;
}

.topbar-kicker {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.35;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}

.online-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #76b99a;
  box-shadow: 0 0 0 4px rgba(118, 185, 154, 0.12);
}

.user-label {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
}

.menu-toggle {
  display: none;
}

.page-content {
  width: min(100%, var(--content-width));
  min-height: calc(100vh - var(--header-height) - 65px);
  margin: 0 auto;
  padding: 36px clamp(18px, 4vw, 48px) 54px;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 20px clamp(18px, 4vw, 48px);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 10px;
}

.app-footer span:first-child {
  font-weight: 700;
  letter-spacing: 0.08em;
}

.app-footer span:first-child span {
  color: var(--primary);
}

/* 08. PAGE HEADINGS */
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 27px;
}

.page-heading h1 {
  margin-bottom: 8px;
}

.page-heading p {
  max-width: 600px;
  margin-bottom: 0;
  color: var(--text-soft);
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 31px 0 17px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

/* 09. CARDS AND GRID LAYOUTS */
.grid {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-small);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
}

.card-hover:hover {
  transform: translateY(-3px);
  border-color: #ebc8d7;
  box-shadow: var(--shadow);
}

.card h2,
.card h3,
.card h4 {
  margin-bottom: 9px;
}

.card p:last-child {
  margin-bottom: 0;
}

.card-pink {
  border-color: #f4dce5;
  background: linear-gradient(145deg, #fff0f5, #ffffff);
}

.card-lavender {
  border-color: #e8e0fb;
  background: linear-gradient(145deg, #f5f1ff, #ffffff);
}

.card-yellow {
  border-color: #f3e8c6;
  background: linear-gradient(145deg, #fff9e4, #ffffff);
}

.card-soft {
  background: var(--surface-soft);
  box-shadow: none;
}

.stat-card {
  position: relative;
  min-height: 155px;
  overflow: hidden;
}

.stat-card::after {
  position: absolute;
  right: -20px;
  bottom: -35px;
  width: 115px;
  height: 115px;
  border: 1px solid rgba(201, 109, 140, 0.12);
  border-radius: 50%;
  content: "";
}

.stat-label {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
}

.stat-number {
  display: block;
  margin: 11px 0 5px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.7rem);
  line-height: 1.15;
}

.stat-footnote {
  color: var(--text-muted);
  font-size: 10px;
}

/* 10. WELCOME HERO */
.hero-card {
  position: relative;
  display: flex;
  min-height: 280px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
  padding: clamp(25px, 4vw, 48px);
  overflow: hidden;
  border: 1px solid #f0dce6;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 88% 15%, #f9d8e7 0, transparent 28%),
    radial-gradient(circle at 75% 90%, #e9e1ff 0, transparent 36%),
    linear-gradient(120deg, #fff0f5, #fffaf7 58%, #f7f1ff);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.hero-copy h1 {
  margin-bottom: 14px;
}

.hero-copy h1 span {
  color: var(--primary-dark);
  font-style: italic;
}

.hero-copy p {
  max-width: 500px;
  margin-bottom: 23px;
  color: var(--text-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-decoration {
  display: grid;
  width: 140px;
  height: 140px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(201, 109, 140, 0.18);
  border-radius: 42% 58% 58% 42% / 45% 43% 57% 55%;
  background: rgba(255, 255, 255, 0.65);
  color: var(--primary);
  font-size: 65px;
  animation: slow-rotate 24s linear infinite;
}

/* 11. TIMELINE */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 19px;
  padding-left: 25px;
}

.timeline::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 7px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--primary-light), #e7e0fb);
  content: "";
}

.timeline-item {
  position: relative;
  padding: 19px 21px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.timeline-item::before {
  position: absolute;
  top: 23px;
  left: -25px;
  width: 12px;
  height: 12px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-light);
  content: "";
}

.timeline-date {
  margin-bottom: 7px;
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.timeline-item h3 {
  margin-bottom: 8px;
}

.timeline-item p {
  color: var(--text-soft);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

/* 12. MEMORY CARDS */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.memory-card {
  position: relative;
  min-width: 0;
  padding: 19px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.memory-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #e9a7bf, #cbbcf1);
  content: "";
}

.memory-card h3 {
  margin-top: 12px;
}

.memory-card p {
  color: var(--text-soft);
  overflow-wrap: anywhere;
}

.memory-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.memory-date {
  color: var(--text-muted);
  font-size: 10px;
}

.memory-symbol {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 14px;
  background: var(--surface-pink);
  color: var(--primary-dark);
  font-size: 20px;
}

.favorite-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}

.favorite-button.is-favorite {
  border-color: #f3c9d7;
  background: #fff0f5;
  color: #c04e78;
}

/* 13. BADGES AND CHIPS */
.badge,
.chip {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
}

.badge-pink {
  border-color: #f3d6e1;
  background: #fff0f5;
  color: #a94d70;
}

.badge-lavender {
  border-color: #e4dbfb;
  background: #f4f0ff;
  color: #7764ad;
}

.badge-green {
  border-color: #d5ebdf;
  background: #effaf3;
  color: #427d61;
}

/* 14. SEARCH AND FILTERS */
.search-panel {
  position: relative;
  z-index: 15;
  margin: 18px clamp(18px, 4vw, 48px) 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.search-row input {
  flex: 1;
  min-width: 0;
}

.search-results {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.search-result {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.search-result strong {
  display: block;
  margin-bottom: 3px;
}

.search-result p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 19px;
}

.filter-chip {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}

.filter-chip.active {
  border-color: var(--primary);
  background: var(--surface-pink);
  color: var(--primary-dark);
}

/* 15. LETTERS */
.letter-card {
  position: relative;
  padding: 26px;
  border: 1px solid #f0dce5;
  border-radius: 8px 22px 22px 22px;
  background:
    repeating-linear-gradient(
      transparent,
      transparent 31px,
      rgba(201, 109, 140, 0.08) 32px
    ),
    #fffdfc;
}

.letter-card::before {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 22px;
  height: 22px;
  border-right: 1px solid #f0dce5;
  border-bottom: 1px solid #f0dce5;
  border-radius: 0 0 12px 0;
  background: var(--surface-pink);
  content: "";
}

.letter-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text-soft);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 2;
}

.letter-signature {
  margin-top: 22px;
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-size: 19px;
  font-style: italic;
}

/* 16. JOURNAL */
.journal-paper {
  padding: 25px;
  border: 1px solid #e7def7;
  border-radius: 18px;
  background:
    linear-gradient(90deg, transparent 35px, rgba(160, 135, 203, 0.14) 36px, transparent 37px),
    repeating-linear-gradient(transparent, transparent 30px, #e9e2f5 31px),
    #fbf9ff;
}

.journal-paper textarea {
  min-height: 210px;
  resize: vertical;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  line-height: 31px;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid #e5def7;
  border-radius: 14px;
  background: var(--surface-lavender);
  color: var(--text-soft);
  font-size: 11px;
}

/* 17. DATE PLANNER AND COUNTDOWNS */
.countdown-card {
  position: relative;
  padding: 22px;
  overflow: hidden;
  border: 1px solid #f0dce5;
  border-radius: 22px;
  background: linear-gradient(140deg, #fff0f5, #ffffff);
}

.countdown-value {
  display: block;
  margin: 10px 0;
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1.1;
}

.countdown-label {
  color: var(--text-soft);
  font-size: 11px;
}

.plan-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.plan-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  accent-color: var(--primary);
}

.plan-item h3 {
  margin-bottom: 4px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.plan-item p {
  margin-bottom: 0;
  color: var(--text-soft);
  font-size: 12px;
}

/* 18. MUSIC AND MOVIES */
.media-card {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 15px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.media-cover {
  display: grid;
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(135deg, #ffe1eb, #e8e0ff);
  font-size: 27px;
}

.media-details {
  min-width: 0;
  flex: 1;
}

.media-details h3 {
  margin-bottom: 5px;
  overflow-wrap: anywhere;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.media-details p {
  margin-bottom: 9px;
  color: var(--text-soft);
  font-size: 11px;
}

.external-link {
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 19. GAME CARDS */
.game-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 23px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.game-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 17px;
  place-items: center;
  border-radius: 18px;
  background: var(--surface-lavender);
  font-size: 25px;
}

.quiz-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  margin-top: 9px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
}

.quiz-option:hover {
  border-color: var(--primary-light);
  background: var(--surface-soft);
}

.quiz-option.selected {
  border-color: var(--primary);
  background: var(--surface-pink);
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-pink);
}

.quiz-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 250ms ease;
}

/* 20. SURPRISE CAPSULES */
.capsule-card {
  position: relative;
  padding: 25px;
  overflow: hidden;
  border: 1px solid #e9ddfa;
  border-radius: 23px;
  background:
    radial-gradient(circle at top right, #eadfff, transparent 48%),
    #fcfaff;
}

.capsule-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 17px;
  place-items: center;
  border-radius: 19px;
  background: #efe8ff;
  font-size: 27px;
}

.capsule-locked {
  filter: saturate(0.75);
}

.capsule-reveal {
  padding: 17px;
  border: 1px dashed #d7c6f4;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.7);
}

/* 21. FUTURE AND BUCKET LIST */
.future-card {
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(145deg, #ffffff, #fff6f9);
}

.future-symbol {
  color: var(--primary);
  font-size: 30px;
}

.bucket-progress {
  height: 7px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-pink);
}

.bucket-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--lavender));
}

/* 22. SETTINGS */
.settings-section {
  margin-bottom: 22px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 21px;
  background: var(--surface);
}

.settings-section h2 {
  margin-bottom: 6px;
  font-size: 21px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.settings-row:last-child {
  border-bottom: 0;
}

.settings-row h3 {
  margin-bottom: 3px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.settings-row p {
  margin-bottom: 0;
  color: var(--text-soft);
  font-size: 11px;
}

.toggle-switch {
  width: 44px;
  height: 25px;
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #e8e1e5;
  cursor: pointer;
  transition: background var(--transition);
}

.toggle-switch::before {
  display: block;
  width: 17px;
  height: 17px;
  margin: 3px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  content: "";
  transition: transform var(--transition);
}

.toggle-switch:checked {
  background: var(--primary);
}

.toggle-switch:checked::before {
  transform: translateX(19px);
}

/* 23. MODALS */
.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(39, 28, 40, 0.42);
  backdrop-filter: blur(7px);
  animation: fade-in 150ms ease both;
}

.modal-card {
  width: min(100%, 570px);
  max-height: min(88vh, 850px);
  padding: 25px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 25px;
  background: var(--surface);
  box-shadow: 0 24px 90px rgba(30, 15, 30, 0.2);
  animation: modal-enter 220ms ease both;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 23px;
}

.modal-header h2 {
  margin: 0;
  font-size: 25px;
}

.entry-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-fields {
  display: grid;
  gap: 13px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.entry-form textarea {
  min-height: 125px;
  resize: vertical;
}

.entry-form input[type="checkbox"] {
  width: auto;
  min-height: auto;
  accent-color: var(--primary);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 17px;
}

.confirm-card {
  width: min(100%, 390px);
  text-align: center;
}

.confirm-icon {
  display: grid;
  width: 56px;
  height: 56px;
  margin: 0 auto 15px;
  place-items: center;
  border-radius: 19px;
  background: var(--surface-pink);
  color: var(--primary-dark);
  font-size: 27px;
}

.confirm-card h2 {
  margin-bottom: 9px;
}

.confirm-card p {
  color: var(--text-soft);
}

.confirm-card .modal-actions {
  justify-content: center;
}

/* 24. TOASTS */
.toast-region {
  position: fixed;
  z-index: 200;
  right: 20px;
  bottom: 20px;
  display: flex;
  width: min(360px, calc(100vw - 40px));
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}

.toast {
  padding: 14px 17px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12px;
  animation: toast-enter 220ms ease both;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--danger);
}

/* 25. EMPTY, LOADING AND ERROR STATES */
.loading-state,
.empty-state,
.error-state {
  display: grid;
  min-height: 220px;
  place-content: center;
  justify-items: center;
  padding: 25px;
  border: 1px dashed var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
  text-align: center;
}

.loading-heart {
  color: var(--primary);
  font-size: 38px;
  animation: heartbeat 1.4s ease-in-out infinite;
}

.loading-state p,
.empty-state p,
.error-state p {
  max-width: 440px;
  margin: 8px 0 0;
  color: var(--text-soft);
}

.empty-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 20px;
  background: var(--surface-pink);
  font-size: 25px;
}

.noscript-message {
  position: fixed;
  z-index: 500;
  inset: 20px;
  height: max-content;
  padding: 20px;
  border-radius: 15px;
  background: #ffffff;
  color: #332b35;
}

/* 26. SIDEBAR OVERLAY */
.sidebar-overlay {
  position: fixed;
  z-index: 25;
  inset: 0;
  display: none;
  background: rgba(34, 24, 35, 0.36);
  backdrop-filter: blur(3px);
}

/* 27. ANIMATIONS */
@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gentle-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

@keyframes slow-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }

  15% {
    transform: scale(1.1);
  }

  30% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.08);
  }
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateX(10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 28. TABLET LAYOUT */
@media (max-width: 1100px) {
  :root {
    --sidebar-width: 230px;
  }

  .sidebar {
    padding-right: 12px;
    padding-left: 12px;
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3,
  .memory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-decoration {
    width: 110px;
    height: 110px;
    font-size: 48px;
  }
}

/* 29. MOBILE NAVIGATION */
@media (max-width: 760px) {
  :root {
    --header-height: 72px;
  }

  .sidebar {
    z-index: 40;
    width: min(290px, 86vw);
    transform: translateX(-105%);
    transition: transform 250ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-overlay.is-visible {
    display: block;
  }

  .main-area {
    margin-left: 0;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .topbar {
    gap: 12px;
    padding: 12px 16px;
  }

  .topbar-kicker {
    font-size: 8px;
  }

  .topbar-title {
    font-size: 18px;
  }

  .topbar-actions {
    gap: 7px;
  }

  .user-label,
  .online-indicator {
    display: none;
  }

  .page-content {
    padding: 25px 16px 38px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .page-heading h1 {
    font-size: 32px;
  }

  .hero-card {
    min-height: auto;
    padding: 28px 23px;
  }

  .hero-decoration {
    display: none;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .memory-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat-card {
    min-height: 125px;
  }

  .app-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
    padding: 18px 16px;
  }

  .search-panel {
    margin: 12px 16px 0;
    padding: 15px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 10px;
  }

  .modal-card {
    max-height: 90vh;
    padding: 21px;
    border-radius: 24px 24px 17px 17px;
  }

  .settings-row {
    align-items: flex-start;
  }
}

/* 30. SMALL MOBILE SCREENS */
@media (max-width: 420px) {
  .login-card {
    padding: 36px 23px 25px;
    border-radius: 25px;
  }

  .topbar-title {
    font-size: 16px;
  }

  .topbar-kicker {
    letter-spacing: 0.07em;
  }

  .icon-button {
    width: 37px;
    height: 37px;
  }

  .hero-copy h1 {
    font-size: 31px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .card {
    padding: 18px;
  }

  .search-row {
    align-items: stretch;
    flex-direction: column;
  }

  .search-row .button {
    width: 100%;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .button {
    width: 100%;
  }

  .countdown-value {
    font-size: 35px;
  }
}

/* 31. DARK MODE */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17141b;
  --surface: #211c25;
  --surface-soft: #2b222d;
  --surface-pink: #38232f;
  --surface-lavender: #2b243a;
  --surface-yellow: #352d21;
  --text: #f6edf3;
  --text-soft: #c5b6c5;
  --text-muted: #9c8e9e;
  --primary: #e29ab7;
  --primary-dark: #f0a9c4;
  --primary-light: #563246;
  --lavender: #b6a2ed;
  --border: #3b303d;
  --danger: #f08b96;
  --success: #8dd4b1;
  --shadow: 0 12px 36px rgba(0, 0, 0, 0.23);
  --shadow-small: 0 5px 18px rgba(0, 0, 0, 0.17);
}

html[data-theme="dark"] .sidebar {
  background: rgba(33, 28, 37, 0.95);
}

html[data-theme="dark"] .topbar {
  background: rgba(23, 20, 27, 0.92);
}

html[data-theme="dark"] .login-card {
  border-color: var(--border);
  background: rgba(33, 28, 37, 0.94);
}

html[data-theme="dark"] .login-form input,
html[data-theme="dark"] .entry-form input,
html[data-theme="dark"] .entry-form textarea,
html[data-theme="dark"] .entry-form select,
html[data-theme="dark"] .search-row input {
  border-color: var(--border);
  background: #19161d;
  color: var(--text);
}

html[data-theme="dark"] .hero-card {
  border-color: var(--border);
  background:
    radial-gradient(circle at 88% 15%, #402b3c 0, transparent 30%),
    radial-gradient(circle at 75% 90%, #2d2642 0, transparent 38%),
    #211c25;
}

html[data-theme="dark"] .card-pink,
html[data-theme="dark"] .countdown-card,
html[data-theme="dark"] .future-card {
  background: linear-gradient(145deg, #35232e, #211c25);
}

html[data-theme="dark"] .card-lavender,
html[data-theme="dark"] .capsule-card {
  background: linear-gradient(145deg, #2d263b, #211c25);
}

html[data-theme="dark"] .card-yellow {
  background: linear-gradient(145deg, #352d21, #211c25);
}

html[data-theme="dark"] .letter-card {
  background:
    repeating-linear-gradient(
      transparent,
      transparent 31px,
      rgba(226, 154, 183, 0.08) 32px
    ),
    #211c25;
}

html[data-theme="dark"] .journal-paper {
  background:
    repeating-linear-gradient(transparent, transparent 30px, #3b3047 31px),
    #211c25;
}

html[data-theme="dark"] .sidebar-note {
  border-color: var(--border);
  background: linear-gradient(135deg, #38232f, #2b243a);
}

html[data-theme="dark"] .nav-link.active {
  border-color: var(--border);
  background: #38232f;
}

html[data-theme="dark"] .hero-decoration {
  border-color: var(--border);
  background: rgba(33, 28, 37, 0.6);
}

html[data-theme="dark"] .quiz-option:hover,
html[data-theme="dark"] .search-result {
  background: var(--surface-soft);
}

html[data-theme="dark"] .ambient {
  opacity: 0.12;
}

/* 32. REDUCED MOTION ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* END OF PART 2 */
