:root {
  --bg: #f2fbf5;
  --bg-soft: #e2f4e7;
  --text: #163024;
  --muted: rgba(22, 48, 36, 0.68);
  --accent: #6acb8c;
  --accent-2: #cce98b;
  --accent-3: #3c9f6f;
  --card: rgba(255, 255, 255, 0.78);
  --card-strong: rgba(255, 255, 255, 0.92);
  --outline: rgba(22, 48, 36, 0.12);
  --shadow: 0 18px 40px rgba(30, 70, 48, 0.18);
  --radius: 20px;
  --font-title: "Fraunces", "Times New Roman", serif;
  --font-body: "Quicksand", "Trebuchet MS", sans-serif;
  --ambient-heart: rgba(106, 203, 140, 0.25);
  --ambient-snow: rgba(255, 255, 255, 0.8);
  --phone-wallpaper: url("/background/princesa.jpg");
  --phone-header: rgba(15, 44, 28, 0.92);
  --phone-me: #1f6b48;
  --phone-them: #0f1c16;
  --phone-text: #e9f7ef;
}

body.theme-dark {
  --bg: #0b0f0c;
  --bg-soft: #121a15;
  --text: #e3f2ea;
  --muted: rgba(227, 242, 234, 0.6);
  --accent: #3f8f64;
  --accent-2: #1f5f3d;
  --accent-3: #6acb8c;
  --card: rgba(16, 22, 18, 0.82);
  --card-strong: rgba(18, 28, 22, 0.92);
  --outline: rgba(255, 255, 255, 0.08);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --ambient-heart: rgba(90, 160, 120, 0.4);
  --ambient-snow: rgba(200, 230, 214, 0.35);
  --phone-header: rgba(10, 20, 15, 0.96);
  --phone-me: #1a5b3e;
  --phone-them: #0b1410;
  --phone-text: #e3f2ea;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
}

html,
body {
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font-family: inherit;
}

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

.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border: none;
  color: #113024;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 24px rgba(106, 203, 140, 0.25);
}

.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(60, 159, 111, 0.25);
}

.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--outline);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.app {
  background: radial-gradient(circle at top, #f4fcf7, #dff2e6 65%);
}

body.theme-dark.app {
  background: radial-gradient(circle at top, #0b0f0c, #111a15 70%);
}

.app::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(
      circle at 12% 18%,
      rgba(106, 203, 140, 0.16),
      transparent 45%
    ),
    radial-gradient(circle at 80% 0%, rgba(204, 233, 139, 0.24), transparent 40%),
    radial-gradient(circle at 70% 78%, rgba(60, 159, 111, 0.16), transparent 50%);
  opacity: 0.7;
  z-index: -3;
  animation: drift 18s ease-in-out infinite;
}

body.theme-dark.app::before {
  background-image: radial-gradient(
      circle at 12% 18%,
      rgba(63, 143, 100, 0.18),
      transparent 45%
    ),
    radial-gradient(circle at 80% 0%, rgba(31, 95, 61, 0.25), transparent 40%),
    radial-gradient(circle at 70% 78%, rgba(106, 203, 140, 0.12), transparent 50%);
  opacity: 0.6;
}

.video-layer {
  position: fixed;
  inset: 0;
  z-index: -4;
  overflow: hidden;
}

.video-layer video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(242, 251, 245, 0.6),
    rgba(226, 244, 231, 0.78)
  );
}

body.theme-dark .video-overlay {
  background: linear-gradient(180deg, rgba(11, 15, 12, 0.6), rgba(11, 15, 12, 0.85));
}

.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 6vw;
  background: rgba(242, 251, 245, 0.92);
  border-bottom: 1px solid var(--outline);
  backdrop-filter: blur(12px);
}

body.theme-dark .nav {
  background: rgba(11, 15, 12, 0.9);
}

.nav-brand {
  font-family: var(--font-title);
  font-size: 20px;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a {
  position: relative;
  padding-bottom: 4px;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--text);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 999px;
}

.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 6px;
  padding: 10px 6vw calc(12px + env(safe-area-inset-bottom));
  background: rgba(242, 251, 245, 0.94);
  border-top: 1px solid var(--outline);
  backdrop-filter: blur(14px);
  box-shadow: 0 -12px 24px rgba(30, 70, 48, 0.16);
}

body.theme-dark .mobile-nav {
  background: rgba(11, 15, 12, 0.95);
  box-shadow: 0 -12px 24px rgba(0, 0, 0, 0.4);
}

.mobile-nav a {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 6px 4px;
  border-radius: 14px;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: inherit;
}

.mobile-nav-icon svg {
  width: 20px;
  height: 20px;
}

.mobile-nav a.active,
.mobile-nav a:hover {
  color: var(--text);
  background: rgba(106, 203, 140, 0.12);
}

.mobile-nav a.active .mobile-nav-icon {
  color: var(--accent-3);
}

.page {
  padding: 32px 8vw 72px;
  display: grid;
  gap: 28px;
}

.hero-card {
  background: linear-gradient(135deg, var(--card-strong), var(--card));
  border-radius: var(--radius);
  border: 1px solid var(--outline);
  padding: 28px;
  box-shadow: var(--shadow);
}

.love-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.love-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(106, 203, 140, 0.25), transparent 70%);
  filter: blur(2px);
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--muted);
}

.hero-text h1 {
  font-family: var(--font-title);
  font-size: clamp(32px, 4vw, 48px);
  margin: 10px 0 12px;
  color: var(--text);
}

.hero-text h1 span {
  color: var(--accent-2);
}

.hero-subtitle {
  max-width: 560px;
  color: var(--muted);
}

.hero-side {
  display: grid;
  gap: 16px;
}

.love-card {
  background: var(--card-strong);
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(106, 203, 140, 0.25);
  box-shadow: 0 14px 28px rgba(30, 70, 48, 0.12);
  display: grid;
  gap: 10px;
}

body.theme-dark .love-card {
  background: rgba(16, 22, 18, 0.88);
  border-color: rgba(106, 203, 140, 0.32);
}

.love-label {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  color: var(--muted);
}

.love-value {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-title);
  color: var(--accent-3);
}

.love-value span {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 600;
}

.love-value small {
  font-size: 14px;
  color: var(--muted);
}

.love-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.time-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 10px;
}

.time-pill {
  background: rgba(106, 203, 140, 0.14);
  border-radius: 14px;
  padding: 10px;
  text-align: center;
  border: 1px solid rgba(106, 203, 140, 0.2);
}

.time-pill span {
  display: block;
  font-weight: 600;
  font-size: 18px;
  color: var(--accent-3);
}

.time-pill small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.hero-dates {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.hero-dates span {
  color: var(--muted);
  font-size: 13px;
}

.hero-dates strong {
  display: block;
  color: var(--text);
  font-size: 16px;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.tile {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--outline);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile h2 {
  margin: 0;
  font-family: var(--font-title);
  font-size: 20px;
}

.tile p {
  margin: 0;
  color: var(--muted);
}

.tile-meta {
  color: var(--muted);
  font-size: 14px;
}

.tile-link {
  align-self: flex-start;
  padding: 8px 16px;
  background: rgba(22, 48, 36, 0.06);
  border-radius: 999px;
  border: 1px solid var(--outline);
}

body.theme-dark .tile-link {
  background: rgba(255, 255, 255, 0.08);
}

.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(30, 70, 48, 0.2);
}

.page-header {
  max-width: 720px;
}

.page-kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--muted);
}

.page-header h1 {
  font-family: var(--font-title);
  margin: 8px 0 12px;
  font-size: clamp(28px, 3vw, 40px);
}

.page-header p {
  color: var(--muted);
}

.page-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.page-grid.two {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.page-grid.one {
  grid-template-columns: minmax(0, 1fr);
}

.panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--outline);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.panel.highlight {
  background: linear-gradient(135deg, var(--card-strong), rgba(106, 203, 140, 0.16));
  border-color: rgba(106, 203, 140, 0.3);
}

.panel h2 {
  margin-top: 0;
  font-family: var(--font-title);
  font-size: 20px;
}

.panel:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 32px rgba(30, 70, 48, 0.18);
}

.panel-subtitle {
  color: var(--muted);
  margin-top: -4px;
}

.form {
  display: grid;
  gap: 12px;
  margin: 12px 0 18px;
}

.form input,
.form select {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--outline);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
}

body.theme-dark .form input,
body.theme-dark .form select {
  background: rgba(18, 28, 22, 0.9);
  color: #e3f2ea;
}

.form input::placeholder {
  color: rgba(22, 48, 36, 0.45);
}

body.theme-dark .form input::placeholder {
  color: rgba(227, 242, 234, 0.55);
}

body.theme-dark .form select option {
  background: #0f1612;
  color: #e3f2ea;
}

.form select option {
  background: #f2fbf5;
  color: #163024;
}

.list {
  display: grid;
  gap: 12px;
}

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

.story-summary {
  text-align: right;
  font-size: 13px;
  color: var(--muted);
}

.story-summary strong {
  display: block;
  font-size: 22px;
  color: var(--text);
}

.story-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.story-card {
  background: var(--card-strong);
  border-radius: 18px;
  padding: 12px;
  border: 1px solid var(--outline);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.story-media {
  width: 100%;
  border-radius: 14px;
  background: #0b0f0c;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.story-info h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.story-info small {
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}

.story-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.story-duration {
  background: rgba(106, 203, 140, 0.18);
  color: #1b5135;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
}

body.theme-dark .story-duration {
  background: rgba(106, 203, 140, 0.2);
  color: #d7f5e4;
}

.story-upload-status {
  min-height: 18px;
  color: var(--muted);
}

.story-upload-status.is-error {
  color: #b93b3b;
}

.story-upload-status.is-success {
  color: #1f6b48;
}

.form input[type="file"] {
  padding: 10px;
}

.call-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  align-items: start;
}

.call-panel {
  display: grid;
  gap: 16px;
}

.call-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.call-room {
  font-family: var(--font-title);
  font-size: 20px;
  display: block;
}

.call-room-sub {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.call-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(106, 203, 140, 0.18);
  color: #1b5135;
  font-size: 12px;
  font-weight: 600;
}

body.theme-dark .call-pill {
  background: rgba(106, 203, 140, 0.2);
  color: #d7f5e4;
}

.call-stage {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #0b0f0c;
  border: 1px solid var(--outline);
  aspect-ratio: 16 / 9;
}

.call-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.call-self {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: min(30%, 220px);
  min-width: 140px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
  background: #0b0f0c;
}

.call-self-label {
  position: absolute;
  left: 10px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
}

.call-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  background: linear-gradient(
    120deg,
    rgba(15, 25, 20, 0.9),
    rgba(5, 12, 9, 0.95)
  );
}

.call-placeholder.hidden {
  opacity: 0;
  pointer-events: none;
}

.call-controls {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.call-btn {
  border-radius: 999px;
  border: 1px solid var(--outline);
  padding: 10px 16px;
  background: rgba(22, 48, 36, 0.06);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.theme-dark .call-btn {
  background: rgba(255, 255, 255, 0.08);
}

.call-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(30, 70, 48, 0.2);
}

.call-btn.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border: none;
  color: #113024;
  font-weight: 600;
}

.call-btn.danger {
  border-color: rgba(185, 59, 59, 0.45);
  color: #b93b3b;
}

.call-status {
  min-height: 18px;
  color: var(--muted);
}

.call-status.is-error {
  color: #b93b3b;
}

.call-status.is-success {
  color: #1f6b48;
}

.call-sidebar h2 {
  margin-top: 0;
  font-family: var(--font-title);
  font-size: 20px;
}

.call-participants {
  display: grid;
  gap: 12px;
}

.call-person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--card-strong);
  border: 1px solid var(--outline);
}

.call-person.is-offline {
  opacity: 0.7;
}

.call-person span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.call-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(106, 203, 140, 0.2);
  color: #1b5135;
  font-weight: 600;
}

.call-avatar.is-muted {
  background: rgba(185, 59, 59, 0.15);
  color: #b93b3b;
}

.call-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.item {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--card-strong);
  border: 1px solid var(--outline);
}

.item h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.item small {
  color: var(--muted);
}

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

.tag {
  background: rgba(106, 203, 140, 0.18);
  color: #1b5135;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.timeline .item {
  border-left: 3px solid var(--accent-3);
}

.chat {
  display: grid;
  gap: 12px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 6px;
}

.chat .item {
  max-width: 80%;
}

.chat .item.jonathan {
  margin-left: auto;
  border-radius: 16px 16px 4px 16px;
}

.chat .item.nathalia {
  margin-right: auto;
  border-radius: 16px 16px 16px 4px;
}

.login {
  background: #ecf8ef;
  overflow: hidden;
}

body.theme-dark.login {
  background: #0b0f0c;
}

#qm-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  background: radial-gradient(circle at top, #f6fff8, #d8f0e0);
}

body.theme-dark #qm-bg {
  background: radial-gradient(circle at top, #0b0f0c, #111a15);
}

#qm-bg span {
  position: absolute;
  color: rgba(22, 48, 36, 0.22);
  font-family: var(--font-title);
  animation: float 12s ease-in-out infinite;
  text-shadow: 0 0 10px rgba(106, 203, 140, 0.35);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(4deg);
  }
}

.login-shell {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px 16px;
}

.login-card {
  width: min(420px, 92vw);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

body.theme-dark .login-card {
  background: rgba(12, 18, 15, 0.92);
}

.login-title {
  font-family: var(--font-title);
  font-size: 28px;
  letter-spacing: 0.06em;
}

.login-title span {
  color: var(--accent-2);
}

.login-subtitle {
  margin: 8px 0 16px;
  color: var(--muted);
}

.login-hint {
  background: rgba(106, 203, 140, 0.18);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  color: #1e4c36;
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 12px 0 20px;
}

.pin-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--outline);
  background: rgba(255, 255, 255, 0.7);
  transition: background 0.2s ease;
}

.pin-dots .dot.active {
  background: var(--accent);
  border-color: var(--accent);
}

.pin-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.keypad button {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--outline);
  color: var(--text);
  padding: 16px 0;
  border-radius: 12px;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

body.theme-dark .keypad button {
  background: rgba(18, 28, 22, 0.9);
}

.keypad button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.95);
}

body.theme-dark .keypad button:hover {
  background: rgba(28, 40, 32, 0.92);
}

.login-error {
  min-height: 18px;
  margin-top: 10px;
  color: #c85663;
  font-size: 14px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(22, 48, 36, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

.modal.active {
  display: flex;
}

.modal-card {
  background: var(--card-strong);
  border-radius: var(--radius);
  padding: 24px;
  width: min(420px, 92vw);
  box-shadow: var(--shadow);
  border: 1px solid var(--outline);
  position: relative;
}

body.theme-dark .modal-card {
  background: rgba(12, 18, 15, 0.96);
  border-color: rgba(106, 203, 140, 0.28);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

.quiz-question {
  margin-top: 8px;
  font-size: 18px;
}

.quiz-options {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.quiz-options button {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--outline);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
}

body.theme-dark .quiz-options button {
  background: rgba(18, 28, 22, 0.9);
  color: #e3f2ea;
  border-color: rgba(106, 203, 140, 0.28);
}

.quiz-options button.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: rgba(106, 203, 140, 0.18);
}

body.theme-dark .quiz-options button.active {
  background: rgba(63, 143, 100, 0.35);
}

.quiz-footer {
  margin-top: 16px;
}

.quiz-hint {
  margin-top: 10px;
  color: #1d5c3f;
}

body.theme-dark .quiz-hint {
  color: #bfe6d4;
}

.quiz-hint.error {
  color: #c85663;
}

.quiz-progress {
  margin: 4px 0 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.time-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--outline);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
  box-shadow: 0 10px 20px rgba(30, 70, 48, 0.12);
  animation: floatSoft 6s ease-in-out infinite;
}

body.theme-dark .time-card {
  background: rgba(16, 22, 18, 0.85);
  border-color: rgba(106, 203, 140, 0.3);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.45);
}

.time-card:nth-child(2) {
  animation-delay: 0.4s;
}

.time-card:nth-child(3) {
  animation-delay: 0.8s;
}

.time-card:nth-child(4) {
  animation-delay: 1.2s;
}

.time-card span {
  display: block;
  font-size: 28px;
  font-weight: 600;
  color: var(--accent-3);
}

.time-card small {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

body.theme-dark .time-card span {
  color: #9ee3bf;
}

body.theme-dark .time-card small {
  color: rgba(227, 242, 234, 0.7);
}


.progress-message {
  margin-top: 14px;
  color: var(--muted);
}

.goal-list {
  display: grid;
  gap: 14px;
}

.goal {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  padding: 14px;
  border: 1px solid var(--outline);
}

body.theme-dark .goal {
  background: rgba(16, 22, 18, 0.85);
  border-color: rgba(106, 203, 140, 0.26);
}

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

.goal-date {
  font-size: 12px;
  color: var(--muted);
}

body.theme-dark .goal-date {
  color: rgba(227, 242, 234, 0.7);
}

.goal-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

body.theme-dark .goal-meta {
  color: rgba(227, 242, 234, 0.7);
}

.progress {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(22, 48, 36, 0.08);
  overflow: hidden;
}

body.theme-dark .progress {
  background: rgba(255, 255, 255, 0.08);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  transition: width 0.6s ease;
  position: relative;
}

body.theme-dark .progress-fill {
  background: linear-gradient(120deg, #5db383, #2f6f4a);
}

.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: translateX(-100%);
  animation: shimmer 3s ease-in-out infinite;
}

.progress-fill.done {
  background: linear-gradient(120deg, var(--accent-3), var(--accent));
}

body.theme-dark .progress-fill.done {
  background: linear-gradient(120deg, #7fe0b0, #3a8f64);
}

.next-milestone {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(106, 203, 140, 0.16);
  color: #1e4c36;
  font-size: 13px;
}

body.theme-dark .next-milestone {
  background: rgba(63, 143, 100, 0.25);
  color: #cfeede;
}


.is-hidden {
  display: none;
}

.page > * {
  animation: rise 0.8s ease both;
}

.page > *:nth-child(2) {
  animation-delay: 0.08s;
}

.page > *:nth-child(3) {
  animation-delay: 0.16s;
}

.princess-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, var(--card-strong), rgba(106, 203, 140, 0.16));
  border-radius: var(--radius);
  border: 1px solid rgba(106, 203, 140, 0.3);
  padding: 26px;
  box-shadow: var(--shadow);
}

.princess-info h1 {
  font-family: var(--font-title);
  font-size: clamp(32px, 4vw, 44px);
  margin: 10px 0 8px;
}

.princess-bio {
  color: var(--muted);
  max-width: 520px;
}

.princess-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.princess-status {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.princess-status[data-tone="error"] {
  color: #c85663;
}

.princess-status[data-tone="warning"] {
  color: #9b7b2f;
}

.princess-portrait {
  position: relative;
  display: grid;
  place-items: center;
}

.princess-portrait img {
  width: min(220px, 70vw);
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 18px 32px rgba(30, 70, 48, 0.18);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.portrait-ring {
  position: absolute;
  width: min(240px, 75vw);
  height: min(240px, 75vw);
  border-radius: 28px;
  border: 2px dashed rgba(106, 203, 140, 0.6);
  animation: spin 16s linear infinite;
}

.highlight-grid,
.feed-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.feed-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.media-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--outline);
  box-shadow: 0 12px 24px rgba(30, 70, 48, 0.12);
  aspect-ratio: 1 / 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 32px rgba(30, 70, 48, 0.18);
}

.media-card.skeleton {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.65), rgba(226, 244, 231, 0.85), rgba(255, 255, 255, 0.65));
  background-size: 200% 100%;
  animation: shimmerPulse 2.4s ease-in-out infinite;
}

.empty-note {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(106, 203, 140, 0.12);
  color: #1e4c36;
  font-size: 13px;
}

.media-modal {
  position: fixed;
  inset: 0;
  background: rgba(22, 48, 36, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 30;
}

.media-modal.active {
  display: flex;
}

.media-modal-card {
  position: relative;
  max-width: min(920px, 92vw);
  max-height: 88vh;
  background: var(--card-strong);
  border-radius: 22px;
  border: 1px solid var(--outline);
  padding: 18px;
  box-shadow: 0 24px 40px rgba(30, 70, 48, 0.25);
  display: grid;
  gap: 12px;
}

.record-controls {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(180px, 1.1fr) minmax(180px, 1.1fr) minmax(140px, 0.8fr);
  align-items: end;
  margin-top: 16px;
}

.record-status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.record-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 1fr);
  align-items: start;
}

.record-panel {
  position: relative;
  background: linear-gradient(140deg, var(--card-strong), rgba(106, 203, 140, 0.08));
}

.record-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.record-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.record-input {
  display: grid;
  gap: 6px;
}

.record-input label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.record-input input {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--outline);
}

.record-summary {
  background: rgba(106, 203, 140, 0.18);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  color: #1e4c36;
}

.record-summary strong {
  display: block;
  font-size: 28px;
}

.record-summary span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.phone-panel {
  display: grid;
  place-items: center;
  padding: 18px;
}

.phone-shell {
  width: min(580px,92vw);
  border-radius: 42px;
  padding: 14px;
  background: linear-gradient(160deg, rgba(12, 20, 15, 0.96), rgba(6, 12, 9, 0.96));
  border: 1px solid rgba(106, 203, 140, 0.4);
  box-shadow: 0 30px 60px rgba(10, 18, 12, 0.45);
  position: relative;
}

body.theme-dark .phone-shell {
  background: linear-gradient(160deg, rgba(8, 12, 10, 0.98), rgba(4, 8, 6, 0.98));
}

body.theme-dark .record-panel {
  background: linear-gradient(140deg, rgba(16, 22, 18, 0.95), rgba(63, 143, 100, 0.08));
}

body.theme-dark .record-summary {
  background: rgba(63, 143, 100, 0.26);
  color: #d8f4e6;
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 20px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 2;
}

.phone-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 12px;
  border-radius: 24px;
  background: var(--phone-header);
  color: var(--phone-text);
  font-size: 14px;
  margin-top: 12px;
}

.phone-header span {
  display: block;
  font-size: 11px;
  opacity: 0.8;
}

.phone-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-image: var(--phone-wallpaper);
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.phone-screen {
  margin-top: 12px;
  border-radius: 28px;
  min-height: 540px;
  max-height: 65vh;
  overflow: hidden;
  background-image: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.2),
      rgba(0, 0, 0, 0.35)
    ),
    var(--phone-wallpaper);
  background-size: cover;
  background-position: center;
  display: grid;
}

.chat-messages {
  padding: 16px;
  display: grid;
  gap: 10px;
  overflow-y: auto;
  max-height: 62vh;
}

.chat-day {
  justify-self: center;
  background: rgba(0, 0, 0, 0.45);
  color: #f1f7f3;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.chat-empty {
  background: rgba(0, 0, 0, 0.45);
  color: #f1f7f3;
  padding: 10px 12px;
  border-radius: 12px;
  text-align: center;
  font-size: 13px;
}

.chat-bubble {
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 18px;
  color: var(--phone-text);
  position: relative;
  display: grid;
  gap: 6px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.2);
  word-break: break-word;
  min-width: 0;
}

.chat-bubble.from-me {
  justify-self: end;
  background: var(--phone-me);
  border-radius: 18px 18px 6px 18px;
}

.chat-bubble.from-them {
  justify-self: start;
  background: var(--phone-them);
  border-radius: 18px 18px 18px 6px;
}

.chat-text strong {
  display: block;
  margin-bottom: 2px;
}

.chat-text {
  min-width: 0;
}

.chat-audio {
  width: 100%;
  margin-top: 6px;
}

.chat-audio-element {
  display: none;
}

.chat-audio-player {
  margin-top: 6px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.chat-bubble.from-them .chat-audio-player {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.08);
}

.audio-play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  color: #1f6b48;
  display: grid;
  place-items: center;
  font-size: 14px;
  cursor: pointer;
}

.audio-play.is-playing {
  background: #1f6b48;
  color: #ffffff;
}

.audio-play:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.audio-wave {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
  cursor: pointer;
}

.audio-wave::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.65) 0 2px,
    transparent 2px 4px
  );
  opacity: 0.6;
}

.audio-wave-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: rgba(255, 255, 255, 0.55);
  mix-blend-mode: screen;
  transition: width 0.1s linear;
}

.audio-time {
  font-size: 11px;
  min-width: 42px;
  text-align: right;
  opacity: 0.85;
}

.chat-audio-warning {
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.75;
}

.chat-audio-warning a {
  color: inherit;
  text-decoration: underline;
}

.chat-image {
  width: 100%;
  margin-top: 6px;
  max-width: 100%;
  border-radius: 12px;
  display: block;
}

.chat-caption {
  display: block;
  margin-top: 4px;
}

.chat-meta {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  font-size: 10px;
  opacity: 0.8;
}

.chat-checks {
  color: #b7f5d2;
}

@media (max-width: 900px) {
  .record-layout {
    grid-template-columns: 1fr;
  }

  .record-controls {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .record-header {
    flex-direction: column;
  }

  .phone-panel {
    margin-top: 12px;
  }
}

.login-theme {
  margin: 10px 0 14px;
  display: flex;
  justify-content: center;
}

.ambient-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  overflow: hidden;
}

.ambient-layer .heart,
.ambient-layer .snowflake {
  position: absolute;
  left: var(--left);
  width: var(--size);
  height: var(--size);
  animation-duration: var(--duration);
  animation-delay: var(--delay);
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  opacity: 0.7;
}

.ambient-layer .heart {
  background: var(--ambient-heart);
  transform: rotate(45deg);
  animation-name: heartFloat;
}

.ambient-layer .heart::before,
.ambient-layer .heart::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: 50%;
}

.ambient-layer .heart::before {
  top: -50%;
  left: 0;
}

.ambient-layer .heart::after {
  left: -50%;
  top: 0;
}

.ambient-layer .snowflake {
  border-radius: 999px;
  background: var(--ambient-snow);
  animation-name: snowFall;
}

@keyframes heartFloat {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(45deg) scale(0.8);
  }
  100% {
    transform: translate3d(var(--drift), 110vh, 0) rotate(45deg) scale(1.1);
  }
}

@keyframes snowFall {
  0% {
    transform: translate3d(0, -10vh, 0);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  100% {
    transform: translate3d(var(--drift), 110vh, 0);
    opacity: 0;
  }
}

.media-modal-card img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 16px;
}

.media-caption {
  color: var(--muted);
  font-size: 13px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

body.modal-open {
  overflow: hidden;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes shimmerPulse {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-12px) scale(1.02);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes floatSoft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}


@media (max-width: 900px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .call-layout {
    grid-template-columns: 1fr;
  }

  .page {
    padding: 24px 6vw 56px;
  }
}

@media (max-width: 720px) {
  .nav {
    padding: 12px 4vw;
    align-items: center;
    flex-direction: row;
    gap: 10px;
  }

  .page {
    padding: 20px 4vw calc(230px + env(safe-area-inset-bottom));
    gap: 20px;
  }

  .nav-brand {
    font-size: 18px;
  }

  .nav-links {
    display: none;
  }

  .nav-actions {
    width: auto;
    justify-content: flex-end;
    margin-left: auto;
  }

  .nav-actions .ghost {
    padding: 8px 12px;
    font-size: 12px;
  }

  .mobile-nav {
    display: grid;
  }

  .call-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .call-self {
    width: 36%;
  }

  .hero-card,
  .panel {
    padding: 18px;
  }

  .hero-dates {
    grid-template-columns: 1fr;
  }

  .tile-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .record-layout {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .record-controls {
    grid-template-columns: 1fr;
  }

  .record-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .phone-shell {
    width: min(520px, 100%);
    margin: 0 auto;
    padding: 12px;
  }

  .phone-screen {
    min-height: 480px;
    max-height: 68vh;
  }

  .chat-messages {
    padding: 12px 12px 16px;
    max-height: 64vh;
  }

  .chat-bubble {
    font-size: 12px;
    padding: 8px 10px;
    max-width: 90%;
  }

  .chat-meta {
    font-size: 9px;
  }
}

@media (max-width: 520px) {
  .phone-panel {
    padding: 8px 6px;
  }

  .phone-shell {
    width: 100%;
    padding: 8px;
    border-radius: 26px;
  }

  .phone-screen {
    min-height: 64vh;
    max-height: 72vh;
    border-radius: 22px;
  }

  .chat-messages {
    max-height: 68vh;
    padding: 12px 10px 16px;
  }

  .chat-bubble {
    max-width: 96%;
    font-size: 12.5px;
  }

  .phone-header {
    padding: 12px 12px 10px;
    margin-top: 14px;
  }

  .phone-notch {
    width: 100px;
  }

  .chat-audio {
    min-height: 44px;
    height: 44px;
  }

  .chat-audio-player {
    padding: 8px 10px;
    gap: 8px;
  }

  .audio-play {
    width: 36px;
    height: 36px;
  }

  .audio-time {
    min-width: 36px;
    font-size: 10px;
  }

  .call-self {
    width: 44%;
    bottom: 10px;
    right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
