:root {
  color-scheme: light;
  --bg: #fff8f5;
  --paper: #ffffff;
  --ink: #3f3134;
  --muted: #7a686c;
  --rose: #f2aabe;
  --rose-soft: #f8dce5;
  --leaf: #77a878;
  --leaf-deep: #4f815f;
  --cream: #fff4d7;
  --gold: #dfab49;
  --line: rgba(103, 78, 83, 0.14);
  --shadow: 0 22px 52px rgba(117, 73, 85, 0.16);
  --radius: 8px;
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 248, 245, 0.92), rgba(247, 253, 242, 0.96)),
    #fff8f5;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100svh;
  margin: 0 auto;
  background: linear-gradient(180deg, #fffafb 0%, #f8fff2 100%);
  box-shadow: 0 0 0 1px rgba(103, 78, 83, 0.06);
  position: relative;
  overflow-x: hidden;
}

.gate-screen {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 241, 203, 0.9) 0 11%, transparent 12%),
    linear-gradient(180deg, #fff7f9 0%, #fbfff3 100%);
}

.gate-card {
  width: min(100%, 380px);
  padding: 30px 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.garden-mark {
  height: 94px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.garden-mark span {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fff5bc 0 14%, transparent 15%),
    radial-gradient(circle at 50% 15%, #f5b1c4 0 21%, transparent 22%),
    radial-gradient(circle at 85% 50%, #f5b1c4 0 21%, transparent 22%),
    radial-gradient(circle at 50% 85%, #f5b1c4 0 21%, transparent 22%),
    radial-gradient(circle at 15% 50%, #f5b1c4 0 21%, transparent 22%);
  position: relative;
  box-shadow: 0 10px 18px rgba(229, 147, 166, 0.24);
}

.garden-mark span::after {
  content: "";
  position: absolute;
  left: 23px;
  top: 44px;
  width: 3px;
  height: 38px;
  background: var(--leaf);
  border-radius: 999px;
}

.garden-mark span:nth-child(2) {
  transform: translateY(-18px);
  background:
    radial-gradient(circle at 50% 50%, #f8d466 0 14%, transparent 15%),
    radial-gradient(circle at 50% 15%, #ffffff 0 21%, transparent 22%),
    radial-gradient(circle at 85% 50%, #ffffff 0 21%, transparent 22%),
    radial-gradient(circle at 50% 85%, #ffffff 0 21%, transparent 22%),
    radial-gradient(circle at 15% 50%, #ffffff 0 21%, transparent 22%);
}

.garden-mark span:nth-child(3) {
  background:
    radial-gradient(circle at 50% 50%, #f8d466 0 14%, transparent 15%),
    radial-gradient(circle at 50% 15%, #b7d7f3 0 21%, transparent 22%),
    radial-gradient(circle at 85% 50%, #b7d7f3 0 21%, transparent 22%),
    radial-gradient(circle at 50% 85%, #b7d7f3 0 21%, transparent 22%),
    radial-gradient(circle at 15% 50%, #b7d7f3 0 21%, transparent 22%);
}

.overline {
  margin: 0 0 8px;
  color: var(--leaf-deep);
  font-size: 0.78rem;
  font-weight: 700;
}

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

h1 {
  margin-bottom: 10px;
  font-size: 2.35rem;
  line-height: 1.05;
  font-weight: 800;
}

.gate-copy {
  margin-bottom: 24px;
  color: var(--muted);
  line-height: 1.7;
}

.gate-form label {
  display: block;
  margin-bottom: 8px;
  color: #604f53;
  font-weight: 700;
}

.gate-form.is-loading {
  display: none;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.input-row input {
  min-width: 0;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 13px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.input-row input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(242, 170, 190, 0.24);
}

.gate-form.has-error input {
  border-color: #d94961;
  box-shadow: 0 0 0 3px rgba(217, 73, 97, 0.16);
}

.input-row button,
.letter-controls button,
.quick-actions button,
.coupon-card button {
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  background: #4f815f;
  color: #fff;
  font-weight: 800;
}

.input-row button {
  min-width: 72px;
  padding: 0 18px;
}

.gate-error {
  min-height: 22px;
  margin: 10px 0 0;
  color: #aa3549;
  font-size: 0.92rem;
  line-height: 1.45;
}

.entry-loading {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px 12px 4px;
  text-align: center;
}

.entry-loading[hidden] {
  display: none;
}

.entry-loading-scene {
  width: 118px;
  height: 84px;
  position: relative;
  display: grid;
  place-items: start center;
}

.entry-loading-sun {
  width: 64px;
  height: 64px;
  position: relative;
  z-index: 2;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, #fff9d0 0 13%, #ffe58a 14% 32%, #ffc857 33% 68%, #dc9730 100%);
  clip-path: polygon(
    50% 0%,
    59% 22%,
    80% 8%,
    72% 34%,
    100% 36%,
    76% 53%,
    91% 76%,
    65% 69%,
    50% 100%,
    35% 69%,
    9% 76%,
    24% 53%,
    0% 36%,
    28% 34%,
    20% 8%,
    41% 22%
  );
  filter: drop-shadow(0 10px 18px rgba(222, 151, 48, 0.24));
  animation: loadingSun 1500ms ease-in-out infinite;
}

.entry-loading-scene span {
  width: 18px;
  height: 18px;
  position: absolute;
  bottom: 8px;
  border-radius: 50% 50% 50% 0;
  background: #f2aabe;
  box-shadow:
    0 0 0 6px rgba(242, 170, 190, 0.16),
    0 10px 18px rgba(117, 73, 85, 0.12);
  transform: rotate(-35deg);
  animation: loadingPetal 1800ms ease-in-out infinite;
}

.entry-loading-scene span:nth-child(2) {
  left: 18px;
  background: #ffffff;
  animation-delay: 120ms;
}

.entry-loading-scene span:nth-child(3) {
  left: 50px;
  background: #b7d7f3;
  animation-delay: 260ms;
}

.entry-loading-scene span:nth-child(4) {
  right: 18px;
  background: #ffe49b;
  animation-delay: 420ms;
}

.entry-loading p {
  margin: 4px 0 0;
  color: var(--leaf-deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.entry-loading strong {
  color: var(--ink);
  font-size: 1.1rem;
}

.entry-loading span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.entry-loading-bar {
  width: min(220px, 86%);
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(119, 168, 120, 0.16);
}

.entry-loading-bar::before {
  content: "";
  display: block;
  width: 46%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #77a878, #ffd35a, #f2aabe);
  animation: loadingBar 1200ms ease-in-out infinite;
}

.garden-app,
.admin-app {
  min-height: 100svh;
  padding: max(14px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
}

.garden-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 2px 14px;
}

.garden-header h2 {
  margin: 0;
  font-size: 1.58rem;
  line-height: 1.15;
}

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

.icon-text-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--leaf-deep);
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(83, 116, 87, 0.1);
}

.bgm-toggle.is-muted {
  background: #f5f1ed;
  color: #8a7d7d;
}

.welcome-strip {
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(79, 129, 95, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.welcome-strip p {
  margin: 0;
  color: #5e5153;
  line-height: 1.65;
  font-size: 0.96rem;
}

.flower-progress {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.flower-progress span {
  color: var(--leaf-deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(119, 168, 120, 0.18);
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #77a878, #f2aabe);
  transition: width 220ms ease;
}

.garden-scene {
  width: 100%;
  aspect-ratio: 864 / 1821;
  height: auto;
  min-height: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(79, 129, 95, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 246, 249, 0.08), rgba(245, 251, 236, 0.06)),
    url("../assets/generated/garden-bg.png") center / 100% 100% no-repeat;
  box-shadow: 0 16px 34px rgba(103, 78, 83, 0.12);
}

.garden-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 248, 245, 0.1)),
    radial-gradient(circle at 50% 48%, transparent 0 32%, rgba(255, 255, 255, 0.16) 62%, rgba(255, 255, 255, 0.24) 100%);
  pointer-events: none;
}

.garden-path {
  display: none;
}

.memory-flowers {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.flower-button {
  width: 76px;
  min-height: 54px;
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  border: 0;
  background: transparent;
  padding: 0;
  color: #493f40;
  text-align: center;
  pointer-events: auto;
}

.flower-button:focus-visible {
  outline: 3px solid rgba(79, 129, 95, 0.34);
  outline-offset: 4px;
  border-radius: var(--radius);
}

.flower-button::before {
  content: "";
  width: 10px;
  height: 10px;
  position: absolute;
  right: 12px;
  top: 2px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e54f65;
  box-shadow: 0 0 0 4px rgba(229, 79, 101, 0.16);
  opacity: 0;
  transform: scale(0.72);
}

.flower-button::after {
  content: "";
  width: 22px;
  height: 22px;
  position: absolute;
  left: 50%;
  top: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: radial-gradient(circle at 38% 32%, #fff8c7 0 18%, #ffd85f 19% 62%, #d99a20 100%);
  transform: translateX(-50%);
  box-shadow:
    0 0 0 7px rgba(255, 224, 112, 0.24),
    0 8px 18px rgba(103, 78, 83, 0.18);
}

.flower-button.is-unread::before {
  opacity: 1;
  transform: scale(1);
}

.flower-button.is-unread::after {
  animation: hotspotPulse 1500ms ease-in-out infinite;
}

.stem {
  display: none;
}

.stem::before,
.stem::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 14px;
  top: 28px;
  border-radius: 100% 0;
  background: var(--leaf);
}

.stem::before {
  right: 2px;
  transform: rotate(-28deg);
}

.stem::after {
  left: 2px;
  transform: rotate(28deg) scaleX(-1);
}

.bloom {
  display: none;
}

.flower-button[data-tone="pink"] {
  --petal: #f1a4b9;
}

.flower-button[data-tone="white"] {
  --petal: #ffffff;
}

.flower-button[data-tone="blue"] {
  --petal: #a9cfee;
}

.flower-button[data-tone="yellow"] {
  --petal: #ffe49b;
}

.flower-label {
  width: auto;
  min-width: 58px;
  max-width: 78px;
  margin-top: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(103, 78, 83, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: #4c4142;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
  box-shadow: 0 8px 18px rgba(103, 78, 83, 0.1);
}

.garden-object {
  width: 82px;
  min-height: 54px;
  position: absolute;
  z-index: 7;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0;
  border: 0;
  background: transparent;
  color: #42383a;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0;
  border-radius: var(--radius);
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.88);
  transform: translate(-50%, -50%);
}

.garden-object > * {
  pointer-events: none;
}

.garden-object::before {
  content: "";
  width: 22px;
  height: 22px;
  position: absolute;
  left: 50%;
  top: 0;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fff8c7 0 18%, #ffd85f 19% 62%, #d99a20 100%);
  transform: translateX(-50%);
  box-shadow:
    0 0 0 7px rgba(255, 224, 112, 0.24),
    0 8px 18px rgba(103, 78, 83, 0.18);
}

.garden-object > span:first-child {
  display: none;
}

.garden-object.has-unread::after {
  content: "";
  width: 10px;
  height: 10px;
  position: absolute;
  right: 16px;
  top: 1px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e54f65;
  box-shadow: 0 0 0 4px rgba(229, 79, 101, 0.16);
}

.garden-object.has-unread::before {
  animation: hotspotPulse 1500ms ease-in-out infinite;
}

.sun-object.has-unread::before,
.video-object.has-unread::before {
  animation: none;
}

.garden-object > span:last-child {
  min-width: 58px;
  max-width: 82px;
  margin-top: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(103, 78, 83, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: #4c4142;
  line-height: 1.25;
  box-shadow: 0 8px 18px rgba(103, 78, 83, 0.1);
}

.sun-object {
  left: 15%;
  top: 15%;
  width: 112px;
  min-height: 96px;
  color: #654618;
}

.sun-object::before {
  width: 58px;
  height: 58px;
  top: 0;
  background:
    radial-gradient(circle at 38% 32%, #fff8cd 0 12%, #ffe990 13% 28%, #ffd35a 29% 66%, #dd9824 100%);
  clip-path: polygon(
    50% 0%,
    58% 23%,
    79% 9%,
    72% 34%,
    100% 36%,
    76% 52%,
    92% 75%,
    65% 69%,
    50% 100%,
    35% 69%,
    8% 75%,
    24% 52%,
    0% 36%,
    28% 34%,
    21% 9%,
    42% 23%
  );
  box-shadow:
    0 0 0 10px rgba(255, 216, 107, 0.24),
    0 0 24px rgba(255, 197, 75, 0.42),
    0 10px 20px rgba(103, 78, 83, 0.16);
}

.sun-object::after {
  right: 24px;
  top: 5px;
}

.sun-object.has-unread::before {
  filter: drop-shadow(0 0 12px rgba(255, 208, 83, 0.62));
}

.sun-object > span:last-child {
  margin-top: 68px;
  background: rgba(255, 250, 224, 0.82);
  color: #654618;
}

.letter-object {
  left: 59%;
  top: 60.5%;
}

.basket-object {
  left: 72%;
  top: 93%;
}

.jar-object {
  left: 72%;
  top: 48%;
}

.video-object {
  left: 40%;
  top: 50%;
  width: 106px;
  min-height: 86px;
  color: #49346c;
}

.video-object::before {
  display: none;
}

.video-object::after {
  right: 23px;
  top: 3px;
}

.garden-object.video-object > .music-icon {
  width: 62px;
  height: 54px;
  position: absolute;
  left: 50%;
  top: -2px;
  display: grid;
  place-items: center;
  color: #5f4a8c;
  font-size: 2.45rem;
  font-weight: 900;
  line-height: 1;
  transform: translateX(-50%);
  text-shadow:
    0 2px 0 rgba(255, 255, 255, 0.92),
    0 8px 18px rgba(86, 58, 112, 0.24);
}

.video-object.has-unread > .music-icon {
  animation: musicFloat 1600ms ease-in-out infinite;
}

.video-object > span:last-child {
  margin-top: 58px;
  background: rgba(250, 247, 255, 0.84);
  color: #49346c;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 8px;
  padding-top: 12px;
}

.quick-actions button {
  position: relative;
  padding: 0 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--leaf-deep);
  font-size: 0.86rem;
  line-height: 1.25;
  box-shadow: 0 8px 18px rgba(103, 78, 83, 0.08);
}

.quick-actions button.has-unread::after {
  content: "";
  width: 10px;
  height: 10px;
  position: absolute;
  right: 9px;
  top: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e54f65;
  box-shadow: 0 0 0 4px rgba(229, 79, 101, 0.16);
}

.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(55, 43, 46, 0.32);
  z-index: 20;
}

.bottom-sheet {
  width: min(100%, 520px);
  max-height: min(82svh, 680px);
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  transform: translateX(-50%);
  overflow-y: auto;
  padding: 20px 18px max(22px, env(safe-area-inset-bottom));
  border-radius: 8px 8px 0 0;
  background: #fff;
  box-shadow: 0 -22px 50px rgba(58, 45, 48, 0.22);
}

.bottom-sheet::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f2aabe, #fff4d7, #77a878);
}

.sheet-flower {
  background:
    radial-gradient(circle at 20% 0%, rgba(242, 170, 190, 0.18), transparent 34%),
    #ffffff;
}

.sheet-letter {
  background:
    linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)),
    repeating-linear-gradient(180deg, transparent 0 28px, rgba(223, 171, 73, 0.1) 29px),
    #fffaf0;
}

.sheet-basket {
  background:
    radial-gradient(circle at 70% 0%, rgba(223, 171, 73, 0.2), transparent 34%),
    #ffffff;
}

.garden-effect {
  width: 1px;
  height: 1px;
  position: absolute;
  z-index: 8;
  pointer-events: none;
}

.garden-effect span {
  width: 9px;
  height: 14px;
  position: absolute;
  left: -4px;
  top: -7px;
  border-radius: 70% 30% 70% 30%;
  background: #f2aabe;
  opacity: 0;
  transform: rotate(var(--angle)) translateY(0) scale(0.7);
  animation: petalBurst 980ms ease-out var(--delay) forwards;
}

.garden-effect-flower span:nth-child(3n) {
  background: #fff4d7;
}

.garden-effect-flower span:nth-child(3n + 1) {
  background: #ffffff;
}

.garden-effect-letter span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dfab49;
}

.garden-effect-basket span:nth-child(2n) {
  background: #b7d7f3;
}

.garden-effect-soft span {
  background: rgba(255, 255, 255, 0.92);
}

.sheet-close {
  width: 42px;
  height: 42px;
  position: absolute;
  right: 12px;
  top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: #604f53;
  font-size: 1.45rem;
  line-height: 1;
}

.music-toggle {
  min-width: 54px;
  height: 42px;
  position: absolute;
  right: 62px;
  top: 12px;
  border: 1px solid rgba(79, 129, 95, 0.2);
  border-radius: var(--radius);
  background: #f3f8ed;
  color: var(--leaf-deep);
  font-weight: 900;
}

.memory-gallery {
  margin: 32px 0 16px;
}

.memory-image {
  min-height: 240px;
  aspect-ratio: 4 / 3;
  margin: 0;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 44%, #ffd86b 0 13px, transparent 14px),
    radial-gradient(circle at 50% 24%, #f3b1c3 0 18px, transparent 19px),
    radial-gradient(circle at 72% 42%, #f3b1c3 0 18px, transparent 19px),
    radial-gradient(circle at 50% 66%, #f3b1c3 0 18px, transparent 19px),
    radial-gradient(circle at 28% 42%, #f3b1c3 0 18px, transparent 19px),
    linear-gradient(180deg, #fff7f9 0%, #eff9e8 100%);
  border: 1px solid var(--line);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #fffaf7;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.memory-image::before {
  content: "美图正在路上哦";
  padding: 8px 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: #6f5c60;
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(103, 78, 83, 0.1);
}

.memory-image.has-image::before {
  display: none;
}

.memory-image-caption {
  min-height: 24px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.memory-gallery-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.memory-gallery-controls button {
  min-height: 40px;
  border: 1px solid rgba(79, 129, 95, 0.2);
  border-radius: var(--radius);
  background: #f3f8ed;
  color: var(--leaf-deep);
  font-weight: 900;
}

.memory-gallery-controls button:disabled {
  background: #eee8e2;
  color: #a79b9b;
  cursor: default;
}

.memory-gallery-controls span {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.memory-tag {
  display: inline-flex;
  max-width: calc(100% - 52px);
  min-height: 28px;
  align-items: center;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: var(--radius);
  background: #f3f8ed;
  color: var(--leaf-deep);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.bottom-sheet h3 {
  margin: 0 48px 8px 0;
  font-size: 1.38rem;
  line-height: 1.25;
}

.memory-date {
  margin-bottom: 12px;
  color: var(--gold);
  font-weight: 800;
}

.memory-text,
.letter-body {
  margin-bottom: 0;
  color: #5c4f52;
  line-height: 1.85;
}

.letter-body {
  min-height: 190px;
  padding: 18px;
  border: 1px solid rgba(223, 171, 73, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.74)),
    repeating-linear-gradient(180deg, transparent 0 30px, rgba(223, 171, 73, 0.14) 31px);
  font-size: 1.02rem;
}

.letter-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.letter-controls button {
  padding: 0 12px;
}

.letter-controls button:disabled {
  background: #d8d2cc;
  color: #fff;
  cursor: default;
}

.letter-controls span {
  color: var(--muted);
  font-weight: 800;
}

.wheel-wrap {
  width: min(100%, 310px);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  margin: 18px auto 16px;
}

.wheel-pointer {
  width: 0;
  height: 0;
  position: absolute;
  top: -3px;
  z-index: 2;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 22px solid #4f815f;
  filter: drop-shadow(0 4px 4px rgba(63, 49, 52, 0.18));
}

.coupon-wheel {
  width: 100%;
  height: 100%;
  position: relative;
  border: 10px solid #fff;
  border-radius: 50%;
  background: var(--wheel-gradient, conic-gradient(#f2aabe, #fff4d7, #b9d9bb, #f2aabe));
  box-shadow:
    0 16px 34px rgba(103, 78, 83, 0.14),
    inset 0 0 0 1px rgba(103, 78, 83, 0.1);
  transition: transform 1800ms cubic-bezier(0.15, 0.78, 0.18, 1);
}

.coupon-wheel::after {
  content: "";
  position: absolute;
  inset: 42%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
}

.coupon-wheel-labels {
  position: absolute;
  inset: 0;
}

.wheel-label {
  width: 34px;
  height: 34px;
  position: absolute;
  left: calc(50% - 17px);
  top: calc(50% - 17px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: #4f815f;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(103, 78, 83, 0.12);
}

.wheel-center {
  width: 82px;
  height: 82px;
  position: absolute;
  z-index: 3;
  border: 6px solid #fff;
  border-radius: 50%;
  background: #4f815f;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(79, 129, 95, 0.28);
}

.wheel-center:disabled {
  background: #b5c9b9;
  cursor: default;
}

.coupon-result {
  margin-top: 10px;
  padding: 16px;
  border: 1px solid rgba(223, 171, 73, 0.28);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff9e8, #ffffff);
}

.coupon-result p {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 900;
}

.coupon-result h4 {
  margin: 0 0 8px;
  color: #493d3f;
  font-size: 1.12rem;
  line-height: 1.35;
}

.coupon-result span {
  color: var(--muted);
  line-height: 1.55;
}

.secondary-button {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border: 1px solid rgba(79, 129, 95, 0.2);
  border-radius: var(--radius);
  background: #f3f8ed;
  color: var(--leaf-deep);
  font-weight: 900;
}

.danger-button {
  margin-top: 0;
  border-color: rgba(179, 73, 73, 0.24);
  background: #fff4f2;
  color: #9e3d3d;
}

.danger-button:focus-visible,
.danger-button:hover {
  border-color: rgba(179, 73, 73, 0.44);
  background: #ffece8;
}

.daily-sheet .memory-text {
  padding: 16px;
  border: 1px solid rgba(242, 170, 190, 0.26);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff7f9, #ffffff);
}

.video-sheet video {
  width: 100%;
  max-height: 62svh;
  display: block;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #16120f;
  box-shadow: 0 14px 28px rgba(63, 49, 52, 0.14);
}

.admin-block textarea,
.jar-sheet textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  color: var(--ink);
  outline: none;
  line-height: 1.65;
}

.admin-block textarea:focus,
.jar-sheet textarea:focus {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(119, 168, 120, 0.2);
}

.jar-saved-text {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-line;
}

.admin-panel {
  display: grid;
  gap: 12px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.admin-stat,
.admin-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 18px rgba(103, 78, 83, 0.08);
}

.admin-stat {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px;
  text-align: center;
}

.admin-stat strong {
  color: var(--leaf-deep);
  font-size: 1.25rem;
}

.admin-stat span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-block {
  padding: 14px;
}

.admin-block h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.admin-list {
  display: grid;
  gap: 8px;
}

.admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius);
  background: #f8fbf4;
  color: #514649;
  line-height: 1.35;
}

.admin-item span:last-child {
  flex: 0 0 auto;
  color: var(--leaf-deep);
  font-weight: 900;
}

.admin-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.admin-sync-status {
  min-height: 22px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.admin-sync-status.is-warning {
  color: #a95748;
}

.admin-sync-status.is-ok {
  color: var(--leaf-deep);
}

.toast {
  min-width: 220px;
  max-width: min(90%, 440px);
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 40;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: rgba(63, 49, 52, 0.94);
  color: #fff;
  text-align: center;
  line-height: 1.45;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

[hidden] {
  display: none !important;
}

@media (max-width: 370px) {
  .gate-card {
    padding-inline: 16px;
  }

  h1 {
    font-size: 2rem;
  }

  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .garden-scene {
    min-height: 0;
  }

  .flower-button {
    width: 82px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .gate-card {
    animation: rise 420ms ease-out both;
  }

  .bloom {
    transition: transform 160ms ease;
  }

  .garden-object:active {
    transform: translate(-50%, -50%) scale(0.96);
  }

  .flower-button:active {
    transform: translate(-50%, -50%) scale(0.96);
  }

  .bottom-sheet {
    animation: sheetIn 260ms ease-out both;
  }

  .sheet-flower {
    animation: sheetBloom 320ms ease-out both;
  }

  .sheet-letter {
    animation: sheetUnfold 340ms ease-out both;
  }

  .sheet-basket {
    animation: sheetLift 320ms ease-out both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sheetIn {
  from {
    transform: translate(-50%, 14px);
  }

  to {
    transform: translate(-50%, 0);
  }
}

@keyframes sheetBloom {
  from {
    opacity: 0;
    transform: translate(-50%, 22px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes sheetUnfold {
  from {
    opacity: 0;
    transform: translate(-50%, 18px) rotateX(8deg);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0) rotateX(0);
  }
}

@keyframes sheetLift {
  from {
    opacity: 0;
    transform: translate(-50%, 26px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes petalBurst {
  0% {
    opacity: 0;
    transform: rotate(var(--angle)) translateY(0) scale(0.5);
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: rotate(var(--angle)) translateY(calc(-1 * var(--distance))) scale(1) rotate(120deg);
  }
}

@keyframes bloomPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-3px) scale(1.05);
  }
}

@keyframes hotspotPulse {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
    box-shadow:
      0 0 0 7px rgba(255, 224, 112, 0.24),
      0 8px 18px rgba(103, 78, 83, 0.18);
  }

  50% {
    transform: translateX(-50%) scale(1.16);
    box-shadow:
      0 0 0 12px rgba(255, 224, 112, 0.15),
      0 10px 22px rgba(103, 78, 83, 0.22);
  }
}

@keyframes basketPulse {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

@keyframes musicFloat {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateX(-50%) translateY(-4px) rotate(3deg);
  }
}

@keyframes loadingSun {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(9deg) scale(1.06);
  }
}

@keyframes loadingBar {
  0% {
    transform: translateX(-110%);
  }

  100% {
    transform: translateX(230%);
  }
}

@keyframes loadingPetal {
  0%,
  100% {
    transform: translateY(0) rotate(-35deg) scale(1);
  }

  50% {
    transform: translateY(-8px) rotate(-18deg) scale(1.08);
  }
}
