:root {
  --bg-1: #ffe6ee;
  --bg-2: #ffd3e2;
  --card: rgba(255, 255, 255, 0.85);
  --text: #3a0f1c;
  --accent: #d6336c;
  --yes: #2f9e44;
  --no: #e03131;
  --shadow: 0 14px 35px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Nunito", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, var(--bg-2), var(--bg-1));
  overflow: hidden;
}

.card {
  position: relative;
  z-index: 2;
  width: min(92vw, 420px);
  padding: 28px 22px 30px;
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  text-align: center;
}

.hero {
  display: grid;
  gap: 14px;
  justify-items: center;
}

.hero-gif {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

h1 {
  font-family: "Parisienne", cursive;
  font-size: 2.25rem;
  margin: 0;
  color: var(--accent);
}

.subtext {
  margin: 0;
  font-size: 1rem;
  opacity: 0.85;
}

.actions {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.btn {
  border: none;
  padding: 14px 18px;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
  width: 100%;
}

.btn-yes {
  background: var(--yes);
  color: #fff;
  box-shadow: 0 12px 20px rgba(47, 158, 68, 0.3);
}

.btn-no {
  background: var(--no);
  color: #fff;
  box-shadow: 0 12px 20px rgba(224, 49, 49, 0.3);
}

.btn:active {
  transform: scale(0.98);
}

.bg-emojis {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  filter: blur(2px);
  opacity: 0.45;
}

.bg-emojis span {
  position: absolute;
  font-size: 1.8rem;
  animation: floatUp 14s linear infinite;
}

.bg-emojis span:nth-child(1) {
  left: 10%;
  top: 110%;
  animation-duration: 16s;
}

.bg-emojis span:nth-child(2) {
  left: 25%;
  top: 120%;
  animation-duration: 18s;
  animation-delay: -4s;
}

.bg-emojis span:nth-child(3) {
  left: 42%;
  top: 115%;
  animation-duration: 15s;
  animation-delay: -8s;
}

.bg-emojis span:nth-child(4) {
  left: 58%;
  top: 130%;
  animation-duration: 19s;
  animation-delay: -6s;
}

.bg-emojis span:nth-child(5) {
  left: 72%;
  top: 125%;
  animation-duration: 17s;
  animation-delay: -2s;
}

.bg-emojis span:nth-child(6) {
  left: 85%;
  top: 118%;
  animation-duration: 20s;
  animation-delay: -10s;
}

.bg-emojis span:nth-child(7) {
  left: 35%;
  top: 132%;
  animation-duration: 21s;
  animation-delay: -12s;
}

.bg-emojis span:nth-child(8) {
  left: 50%;
  top: 128%;
  animation-duration: 22s;
  animation-delay: -14s;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(0.9);
    opacity: 0;
  }
  10% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-140vh) scale(1.2);
    opacity: 0;
  }
}

.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 6, 10, 0.55);
  backdrop-filter: blur(4px);
  z-index: 10;
}

.modal.hidden {
  display: none;
}

.modal-card {
  position: relative;
  width: min(92vw, 380px);
  background: #fff7fb;
  color: var(--text);
  border-radius: 22px;
  padding: 26px 22px 22px;
  box-shadow: var(--shadow);
  text-align: center;
  display: grid;
  gap: 14px;
}

.modal-card h2 {
  margin: 0;
  font-family: "Parisienne", cursive;
  color: var(--accent);
}

.modal-card p {
  margin: 0;
  line-height: 1.4;
}

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

@media (min-width: 700px) {
  .card {
    padding: 36px 30px 34px;
  }

  h1 {
    font-size: 2.6rem;
  }
}

.password-game {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.password-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.slot {
  min-width: 28px;
  padding: 8px 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  font-size: 1.05rem;
  text-align: center;
  box-shadow: 0 6px 14px rgba(214, 51, 108, 0.12);
}

.slot-space {
  background: transparent;
  box-shadow: none;
}

.input-row {
  display: grid;
  gap: 10px;
}

.guess-input {
  width: 100%;
  border: 2px solid rgba(214, 51, 108, 0.2);
  border-radius: 18px;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: "Nunito", sans-serif;
}

.guess-input:focus {
  outline: none;
  border-color: rgba(214, 51, 108, 0.5);
  box-shadow: 0 0 0 3px rgba(214, 51, 108, 0.15);
}

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

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.7);
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(214, 51, 108, 0.12);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.tab:hover {
  transform: translateY(-1px);
}

.tab-active {
  background: var(--accent);
  color: #fff;
}

.tab-locked {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: auto;
}

.puzzle {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  width: min(86vw, 340px);
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 16px;
  overflow: hidden;
}

.tile {
  border-radius: 0;
  background-repeat: no-repeat;
  box-shadow: none;
  cursor: grab;
  border: 1px solid rgba(255, 255, 255, 0.4);
  touch-action: none;
  user-select: none;
}

.tile:active {
  cursor: grabbing;
}

.tile-dragging {
  opacity: 0.6;
}

.tile-selected {
  outline: 3px solid rgba(214, 51, 108, 0.6);
  transform: scale(1.03);
}

.tile-locked {
  box-shadow: none;
  border: 3px solid #ff4d8d;
  cursor: default;
}

.puzzle-win {
  margin-top: 18px;
  display: grid;
  gap: 16px;
  justify-items: center;
}

.puzzle-full {
  width: min(86vw, 340px);
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.inbox-card {
  padding: 20px 16px 16px;
}

.crane-machine {
  position: relative;
  width: min(82vw, 260px);
  height: 320px;
  margin: 0 auto;
  background: linear-gradient(180deg, #f8f8f8 0%, #e8e8e8 60%, #d0d0d0 100%);
  border-radius: 16px 16px 4px 4px;
  border: 4px solid #888;
  border-bottom: 6px solid #666;
  overflow: hidden;
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,0.8),
    inset 0 -2px 4px rgba(0,0,0,0.1),
    0 8px 20px rgba(0,0,0,0.15);
}

.crane-pole {
  position: absolute;
  top: 0;
  left: 50%;
  width: 12px;
  height: 100%;
  background: linear-gradient(90deg, #999, #ccc, #999);
  transform: translateX(-50%);
  z-index: 1;
}

.crane-rail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 36px;
  background: linear-gradient(180deg, #555, #777);
  border-bottom: 4px solid #444;
  z-index: 2;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.crane-arm {
  position: absolute;
  top: 10px;
  width: 60px;
  height: auto;
  transition: left 0.06s linear, top 0.5s ease;
  transform: translateX(-50%);
  z-index: 3;
}

.crane-line {
  width: 3px;
  height: 50px;
  background: linear-gradient(90deg, #666, #999, #666);
  margin: 0 auto;
  transition: height 0.5s ease;
}

.claw {
  position: relative;
  width: 60px;
  height: 35px;
  display: flex;
  justify-content: center;
}

.claw-left,
.claw-right {
  width: 22px;
  height: 28px;
  border: 4px solid #aaa;
  border-top: none;
  border-radius: 0 0 20px 20px;
  background: transparent;
  position: absolute;
  bottom: 0;
}

.claw-left {
  left: 2px;
  transform: rotate(-20deg);
  transform-origin: top right;
  animation: clawOpen 0.8s ease infinite alternate;
}

.claw-right {
  right: 2px;
  transform: rotate(20deg);
  transform-origin: top left;
  animation: clawOpen 0.8s ease infinite alternate-reverse;
}

.claw-center {
  width: 8px;
  height: 20px;
  background: linear-gradient(180deg, #999, #777);
  position: absolute;
  bottom: 0;
  border-radius: 0 0 6px 6px;
}

@keyframes clawOpen {
  0% { transform: rotate(-15deg); }
  100% { transform: rotate(-25deg); }
}

@keyframes clawOpenReverse {
  0% { transform: rotate(15deg); }
  100% { transform: rotate(25deg); }
}

.claw.closed .claw-left,
.claw.closed .claw-right {
  animation: none;
  transform: rotate(-8deg);
}

.claw.closed .claw-right {
  transform: rotate(8deg);
}

.grabbed-heart {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
}

.grabbed-heart::before,
.grabbed-heart::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 22px;
  border-radius: 14px 14px 0 0;
  background: #e03131;
  top: 0;
}

.grabbed-heart::before {
  left: 14px;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}

.grabbed-heart::after {
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

.glass-container {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: min(74vw, 220px);
  height: 160px;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.12) 0%,
    rgba(255,255,255,0.08) 25%,
    rgba(200,220,255,0.1) 50%,
    rgba(255,255,255,0.05) 75%,
    rgba(255,255,255,0.1) 100%);
  border: 3px solid rgba(255,255,255,0.35);
  border-radius: 10px 10px 0 0;
  backdrop-filter: blur(3px);
  overflow: hidden;
  z-index: 1;
  box-shadow:
    inset 0 0 30px rgba(255,255,255,0.1),
    0 0 0 1px rgba(255,255,255,0.1);
}

.glass-shine {
  position: absolute;
  top: 0;
  left: 8%;
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.25) 0%,
    rgba(255,255,255,0.1) 50%,
    transparent 100%);
  pointer-events: none;
}

.hearts-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.heart {
  position: absolute;
  width: 30px;
  height: 30px;
  z-index: 1;
}

.heart::before,
.heart::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 22px;
  border-radius: 15px 15px 0 0;
  background: inherit;
  top: 0;
}

.heart::before {
  left: 15px;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}

.heart::after {
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

.gray-heart {
  background: #9ca3af;
}

.red-heart {
  background: #ef4444;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.drop-zone {
  position: absolute;
  bottom: -55px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 55px;
  background: linear-gradient(180deg, #555, #333);
  border-radius: 0 0 10px 10px;
  border: 3px solid #222;
  border-top: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.drop-zone::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.drop-zone span {
  color: #fca5a5;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.drop-btn {
  margin-top: 45px;
  width: min(70vw, 180px);
  font-size: 1.2rem;
  padding: 14px 28px;
  background: linear-gradient(180deg, #4ade80, #22c55e);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

.drop-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #9ca3af;
  box-shadow: none;
}

.drop-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.win-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 6, 10, 0.9);
  backdrop-filter: blur(8px);
  z-index: 20;
  animation: fadeIn 0.4s ease;
}

.win-content {
  text-align: center;
  animation: popIn 0.5s ease;
}

.celebration-hearts {
  font-size: 2.8rem;
  margin-bottom: 8px;
}

.celebration-hearts span {
  display: inline-block;
  margin: 0 3px;
  animation: heartPop 0.6s ease infinite;
}

.celebration-hearts span:nth-child(2) { animation-delay: 0.1s; }
.celebration-hearts span:nth-child(3) { animation-delay: 0.2s; }
.celebration-hearts span:nth-child(4) { animation-delay: 0.3s; }

.win-content h1 {
  font-size: 2.2rem;
  margin: 12px 0;
}

.win-content .subtext {
  margin-bottom: 24px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes heartPop {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.15) rotate(5deg); }
}

@media (min-width: 500px) {
  .crane-machine {
    width: 260px;
    height: 340px;
  }

  .glass-container {
    width: 220px;
    height: 180px;
  }

  .heart {
    width: 34px;
    height: 34px;
  }

  .heart::before,
  .heart::after {
    width: 17px;
    height: 26px;
    border-radius: 17px 17px 0 0;
  }

  .heart::before {
    left: 17px;
  }

  .grabbed-heart {
    width: 32px;
    height: 32px;
  }

  .grabbed-heart::before,
  .grabbed-heart::after {
    width: 16px;
    height: 24px;
    border-radius: 16px 16px 0 0;
  }

  .grabbed-heart::before {
    left: 16px;
  }
}

.inbox-game-card {
  width: min(94vw, 430px);
  padding: 24px 18px 20px;
}

.love-machine {
  margin-top: 8px;
  border-radius: 22px;
  padding: 12px 12px 14px;
  background: linear-gradient(165deg, #fef4f9 0%, #ffe1ec 45%, #ffcddf 100%);
  border: 2px solid rgba(214, 51, 108, 0.2);
  box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.55), 0 10px 24px rgba(214, 51, 108, 0.15);
}

.love-machine__rail {
  position: relative;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, #d5d8e2, #b9bfce);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.65);
}

.love-machine__carriage {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  display: grid;
  justify-items: center;
  transition: left 0.08s linear;
  z-index: 3;
}

.love-machine__head {
  width: 38px;
  height: 11px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7b8190, #5d6472);
}

.love-machine__cable {
  width: 2px;
  height: 42px;
  margin-top: -1px;
  background: linear-gradient(180deg, #777, #9aa0ab);
  transition: height 0.5s ease;
}

.love-machine__cable--down {
  height: 130px;
}

.love-machine__claw {
  position: relative;
  width: 26px;
  height: 12px;
  margin-top: -1px;
  border-radius: 6px;
  background: linear-gradient(180deg, #868b96, #656b79);
}

.love-machine__claw::before,
.love-machine__claw::after {
  content: "";
  position: absolute;
  top: 10px;
  width: 10px;
  height: 15px;
  border: 3px solid #666c79;
  border-top: none;
  border-radius: 0 0 10px 10px;
}

.love-machine__claw::before {
  left: 1px;
  transform: rotate(14deg);
}

.love-machine__claw::after {
  right: 1px;
  transform: rotate(-14deg);
}

.love-machine__playfield {
  position: relative;
  margin-top: 8px;
  height: 170px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.25), rgba(241, 208, 224, 0.45));
  overflow: hidden;
}

.love-machine__playfield::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.2) 5%, rgba(255, 255, 255, 0.02) 45%, rgba(255, 255, 255, 0.2) 95%);
  pointer-events: none;
}

.scrap-heart,
.target-heart {
  position: absolute;
  width: 18px;
  height: 16px;
  transform: translate(-50%, -50%);
  user-select: none;
}

.scrap-heart::before,
.scrap-heart::after,
.target-heart::before,
.target-heart::after {
  content: "";
  position: absolute;
  top: 0;
  width: 9px;
  height: 14px;
  border-radius: 9px 9px 0 0;
}

.scrap-heart {
  opacity: 0.75;
  transform: translate(-50%, -50%) scale(0.95) rotate(-8deg);
}

.scrap-heart::before,
.scrap-heart::after {
  background: #b2b8c3;
}

.scrap-heart::before {
  left: 9px;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}

.scrap-heart::after {
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

.target-heart {
  width: 22px;
  height: 20px;
  filter: drop-shadow(0 4px 9px rgba(224, 49, 49, 0.4));
  animation: targetPulse 1s ease-in-out infinite;
  z-index: 2;
}

.target-heart::before,
.target-heart::after {
  width: 11px;
  height: 17px;
  background: #ef4444;
}

.target-heart::before {
  left: 11px;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}

.target-heart::after {
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

.target-heart--caught {
  opacity: 0;
  transform: translate(-50%, -60%) scale(0.5);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.inbox-status {
  margin-top: 12px;
  min-height: 24px;
}

.inbox-actions {
  margin-top: 12px;
}

.love-machine__carriage--success {
  filter: drop-shadow(0 0 10px rgba(255, 77, 141, 0.35));
}

@keyframes targetPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.08);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

.mailbox-card {
  width: min(95vw, 460px);
  padding: 10px 10px 14px;
  text-align: left;
}

.mail-appbar {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 10px;
  padding: 6px 4px 8px;
}

.mail-appbar h1 {
  margin: 0;
  text-align: center;
  font-size: 2rem;
}

.icon-btn {
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #7a1e42;
  font-size: 1rem;
  cursor: pointer;
}

.mail-search {
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(214, 51, 108, 0.14);
  border-radius: 999px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mail-search p {
  margin: 0;
  opacity: 0.62;
}

.mail-search__icon {
  opacity: 0.6;
}

.mail-cats {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.mail-cat {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #9b2755;
  font-weight: 700;
  white-space: nowrap;
}

.mail-cat--active {
  background: #d6336c;
  color: #fff;
}

.mailbox-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.mail-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 10px 9px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(214, 51, 108, 0.12);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.mail-item:hover {
  transform: translateY(-1px);
}

.mail-item--unread {
  border-color: rgba(214, 51, 108, 0.35);
  background: rgba(255, 255, 255, 0.96);
}

.mail-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #d6336c;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.86rem;
  font-weight: 800;
  margin-top: 2px;
}

.mail-avatar--alt {
  background: #f3b8cd;
  color: #862449;
}

.mail-main {
  display: grid;
  gap: 2px;
}

.mail-from,
.mail-subject,
.mail-preview {
  margin: 0;
}

.mail-from {
  font-size: 0.9rem;
  opacity: 0.72;
}

.mail-subject {
  font-weight: 800;
  font-size: 1.02rem;
}

.mail-preview {
  font-size: 0.9rem;
  opacity: 0.75;
}

.mail-time {
  font-size: 0.8rem;
  opacity: 0.6;
  padding-top: 1px;
}

.mail-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.mail-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ff4d8d;
  box-shadow: 0 0 0 4px rgba(255, 77, 141, 0.18);
}

.mail-compose {
  margin-top: 12px;
  margin-left: auto;
  display: block;
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: #d6336c;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(214, 51, 108, 0.3);
}

.page-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(214, 51, 108, 0.2);
  color: #8d234f;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.mailbox-back {
  text-decoration: none;
  display: grid;
  place-items: center;
}

.message-card {
  width: min(92vw, 430px);
}

.message-body {
  margin-top: 16px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.mail-read-card {
  width: min(96vw, 560px);
  padding: 10px 10px 14px;
  text-align: left;
}

.mail-read-topbar {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 10px;
  padding: 2px 2px 10px;
}

.mail-read-folder {
  margin: 0;
  text-align: center;
  font-weight: 700;
  color: #8a2450;
}

.mail-read-back {
  text-decoration: none;
  display: grid;
  place-items: center;
}

.mail-read-header {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(214, 51, 108, 0.18);
  padding: 12px 12px 10px;
}

.mail-read-header h1 {
  margin: 0;
  font-size: 2rem;
}

.mail-read-meta {
  margin-top: 10px;
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
  opacity: 0.76;
}

.mail-read-body {
  margin-top: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(214, 51, 108, 0.16);
  padding: 14px 12px;
  line-height: 1.6;
  font-size: 0.96rem;
  max-height: 62vh;
  overflow: auto;
}

.mail-read-body p {
  margin: 0 0 14px;
}

.mail-read-body p:last-child {
  margin-bottom: 0;
}

.memory-card {
  width: min(95vw, 560px);
  padding: 18px 14px 18px;
}

body.memory-page {
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 0 28px;
}

.memory-page .card {
  margin: 0 auto;
}

body.gallery-page {
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 0 24px;
}

.gallery-page .card {
  margin: 0 auto;
}

.memory-folders {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.memory-folder {
  border-radius: 16px;
  border: 1px solid rgba(214, 51, 108, 0.25);
  background: rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

.memory-folder__tab {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  cursor: pointer;
  font-weight: 800;
  color: #8f2150;
  background: linear-gradient(180deg, #ffe3ef, #ffd3e4);
}

.memory-folder__tab::-webkit-details-marker {
  display: none;
}

.memory-folder__icon {
  width: 18px;
  height: 14px;
  border-radius: 3px 3px 2px 2px;
  background: #f2b94e;
  position: relative;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.07);
}

.memory-folder__icon::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 2px;
  width: 9px;
  height: 4px;
  border-radius: 2px 2px 0 0;
  background: #ffd57a;
}

.memory-folder__content {
  padding: 12px;
  display: grid;
  gap: 12px;
}

.memory-photo {
  display: block;
  width: 100%;
  border-radius: 12px;
  background: #f3dce6;
  box-shadow: 0 10px 20px rgba(214, 51, 108, 0.14);
}

.memory-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.memory-carousel::-webkit-scrollbar {
  height: 8px;
}

.memory-carousel::-webkit-scrollbar-thumb {
  background: rgba(214, 51, 108, 0.35);
  border-radius: 999px;
}

.memory-photo--slide {
  min-width: 100%;
  scroll-snap-align: center;
}

.memory-swipe {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #92214f;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(214, 51, 108, 0.16);
}

.memory-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(214, 51, 108, 0.14);
  color: #5a1830;
  font-size: 0.98rem;
  line-height: 1.55;
}
