:root {
  --primary-pink: #eecbc4;
  --bg-cream: #fdfbf7;
  --text-main: #5e5e5e;
  --text-accent: #8d7b68;
  --line-soft: #ead8d3;
  --surface-soft: rgba(255, 255, 255, 0.8);
  --glass-bg: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(255, 255, 255, 0.4);
  --font-serif: 'Noto Serif SC', serif;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-serif);
  color: var(--text-main);
  background: linear-gradient(180deg, #fdfbf7 0%, #fff5f0 100%);
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 20px rgba(31, 38, 135, 0.08);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}

.topbar h1 {
  margin: 0;
  color: var(--text-accent);
  font-size: 1.2rem;
}

.back-link,
.ghost-btn {
  border: none;
  background: transparent;
  color: var(--text-accent);
  text-decoration: none;
  font-size: 0.95rem;
  cursor: pointer;
}

.page {
  width: min(960px, 92%);
  margin: 24px auto 48px;
}

.panel {
  padding: 22px;
  border-radius: 16px;
  margin-bottom: var(--space-md);
}

.panel h2 {
  margin: 0 0 10px;
  color: var(--text-accent);
  font-size: 1.15rem;
}

#gate-section {
  text-align: center;
}

#gate-section,
#app-section {
  transition: opacity 0.36s ease, transform 0.36s ease;
}

#gate-section.section-enter,
#app-section.section-enter {
  opacity: 0;
  transform: translateY(8px);
}

#gate-section.section-enter.section-enter-active,
#app-section.section-enter.section-enter-active {
  opacity: 1;
  transform: translateY(0);
}

#gate-section.section-leave-active,
#app-section.section-leave-active {
  opacity: 0;
  transform: translateY(-8px);
}

#gate-section .stack {
  width: min(420px, 100%);
  margin: 0 auto;
}

#gate-form .primary-btn {
  justify-self: center;
}

.gate-note {
  display: inline-block;
  margin: 0 0 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 205, 225, 0.28);
  border: 1px solid rgba(236, 166, 198, 0.45);
  color: #b45f8a;
  font-size: 0.82rem;
  letter-spacing: 0.2px;
  line-height: 1.2;
}

.gate-playground {
  position: relative;
  overflow: hidden;
  min-height: clamp(210px, 34vh, 290px);
  margin-top: var(--space-sm);
  border-radius: 18px;
  border: 1px solid rgba(226, 187, 198, 0.5);
  background:
    radial-gradient(circle at 16% 14%, rgba(255, 255, 255, 0.65) 0 14%, transparent 15%),
    radial-gradient(circle at 85% 18%, rgba(255, 244, 248, 0.52) 0 10%, transparent 11%),
    linear-gradient(180deg, rgba(255, 238, 244, 0.78) 0%, rgba(255, 247, 236, 0.9) 58%, rgba(255, 233, 223, 0.86) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52), inset 0 -14px 24px rgba(228, 170, 165, 0.15);
}

.gate-playground::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 52% 26%, rgba(255, 255, 255, 0.3), transparent 46%);
  pointer-events: none;
}

.gate-playground::after {
  content: '';
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: 0;
  height: 50px;
  border-radius: 100% 100% 0 0;
  background: linear-gradient(180deg, rgba(232, 195, 177, 0.5), rgba(226, 170, 154, 0.58));
}

.gate-cloud {
  position: absolute;
  width: 72px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 4px 12px rgba(190, 143, 148, 0.2);
}

.gate-cloud::before,
.gate-cloud::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.gate-cloud::before {
  width: 26px;
  height: 26px;
  left: 11px;
  top: -11px;
}

.gate-cloud::after {
  width: 30px;
  height: 30px;
  right: 9px;
  top: -13px;
}

.cloud-left {
  top: 17%;
  left: 6%;
  animation: cloud-drift-left 12s linear infinite;
}

.cloud-mid {
  top: 9%;
  left: 50%;
  transform: translateX(-50%);
  animation: cloud-drift-mid 13.5s ease-in-out infinite;
}

.cloud-right {
  top: 16%;
  right: 6%;
  animation: cloud-drift-right 14s linear infinite;
}

.gate-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 240, 178, 0.95);
  box-shadow: 0 0 9px rgba(255, 222, 130, 0.78), 0 0 16px rgba(255, 236, 170, 0.54);
  opacity: 0;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-name: firefly-glow, firefly-path-a;
  animation-duration: 2.9s, 10.5s;
  animation-delay: 0.3s, 0s;
}

.sparkle:nth-child(1) {
  top: 27%;
  left: 22%;
  animation-name: firefly-glow, firefly-path-a;
  animation-duration: 2.6s, 9.8s;
  animation-delay: 0.1s, -1s;
}

.sparkle:nth-child(2) {
  top: 19%;
  left: 66%;
  animation-name: firefly-glow, firefly-path-b;
  animation-duration: 3.2s, 11.2s;
  animation-delay: 0.6s, -2.6s;
}

.sparkle:nth-child(3) {
  top: 33%;
  left: 46%;
  animation-name: firefly-glow, firefly-path-c;
  animation-duration: 2.8s, 9.4s;
  animation-delay: 1.1s, -0.8s;
}

.sparkle:nth-child(4) {
  top: 25%;
  left: 80%;
  animation-name: firefly-glow, firefly-path-b;
  animation-duration: 3s, 10.8s;
  animation-delay: 1.5s, -3.5s;
}

.sparkle:nth-child(5) {
  top: 38%;
  left: 28%;
  animation-name: firefly-glow, firefly-path-c;
  animation-duration: 2.7s, 9.7s;
  animation-delay: 0.9s, -1.8s;
}

.sparkle:nth-child(6) {
  top: 30%;
  left: 60%;
  animation-name: firefly-glow, firefly-path-a;
  animation-duration: 3.3s, 11.5s;
  animation-delay: 2s, -4.4s;
}

.pet-stage {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(10px, 3.6vw, 34px);
  z-index: 2;
}

.pet {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
}

.pet-svg {
  width: 88px;
  height: 78px;
  overflow: visible;
  filter: drop-shadow(0 6px 10px rgba(126, 90, 81, 0.22));
  animation: pet-bounce 2.6s ease-in-out infinite;
  transform-origin: center 68%;
}

.pet-svg .pet-eye {
  fill: #4b352f;
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 0.6;
  transform-box: fill-box;
  transform-origin: center center;
}

.pet-svg .pet-nose {
  fill: #7a564b;
}

.pet-svg .pet-mouth {
  fill: none;
  stroke: #6b4f45;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.pet-svg .pet-cheek {
  fill: rgba(246, 165, 179, 0.52);
}

.pet-shadow {
  width: 52px;
  height: 10px;
  border-radius: 50%;
  background: rgba(125, 88, 79, 0.2);
  animation: pet-shadow-pulse 2.6s ease-in-out infinite;
}

.pet-cat {
  transform-origin: center bottom;
  animation: cat-nuzzle 4.8s ease-in-out infinite;
}

.pet-cat-svg .pet-head {
  fill: #ffd9cf;
  stroke: rgba(118, 77, 63, 0.35);
  stroke-width: 2;
}

.pet-cat-svg .cat-ear {
  fill: #ffd9cf;
  stroke: rgba(118, 77, 63, 0.35);
  stroke-width: 1.8;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.pet-cat-svg .pet-muzzle {
  fill: #f8e3d9;
}

.pet-cat-svg .pet-whisker {
  fill: none;
  stroke: rgba(107, 79, 69, 0.6);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.pet-cat .pet-svg {
  animation-delay: -0.3s;
}

.pet-cat-svg .pet-eye {
  animation: eye-blink-cat 7.4s linear infinite;
}

.pet-cat-svg .cat-ear.left {
  animation: ear-twitch-cat-left 8.6s ease-in-out infinite;
}

.pet-cat-svg .cat-ear.right {
  animation: ear-twitch-cat-right 8.6s ease-in-out infinite 0.35s;
}

.pet-dog {
  transform-origin: center bottom;
  animation: dog-nuzzle 4.8s ease-in-out infinite 0.35s;
}

.pet-dog-svg .pet-head {
  fill: #ffe2d3;
  stroke: rgba(118, 77, 63, 0.3);
  stroke-width: 2;
}

.pet-dog-svg .dog-ear {
  fill: #d4a084;
  stroke: rgba(118, 77, 63, 0.3);
  stroke-width: 1.8;
  transform-box: fill-box;
  transform-origin: 50% 20%;
}

.pet-dog-svg .dog-muzzle {
  fill: #f7e0d1;
}

.pet-dog .pet-svg {
  animation-duration: 2.45s;
}

.pet-dog-svg .pet-eye {
  animation: eye-blink-dog 6.6s linear infinite 0.5s;
}

.pet-dog-svg .dog-ear.left {
  animation: ear-twitch-dog-left 6.9s ease-in-out infinite 0.4s;
}

.pet-dog-svg .dog-ear.right {
  animation: ear-twitch-dog-right 6.9s ease-in-out infinite;
}

.pet-cat-svg {
  transform: rotate(-6deg);
}

.pet-dog-svg {
  transform: rotate(6deg);
}

.paw-trail {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}

.paw {
  position: relative;
  width: 14px;
  height: 11px;
  display: inline-block;
  opacity: 0.18;
  animation: paw-twinkle 3.2s ease-in-out infinite;
}

.paw::before {
  content: '';
  position: absolute;
  left: 3px;
  bottom: 0;
  width: 8px;
  height: 6px;
  border-radius: 55% 55% 65% 65%;
  background: #a5776c;
}

.paw::after {
  content: '';
  position: absolute;
  left: 1px;
  top: 0;
  width: 3px;
  height: 4px;
  border-radius: 50%;
  background: #a5776c;
  box-shadow: 4px -1px 0 #a5776c, 8px 0 0 #a5776c;
}

.paw-trail .paw:nth-child(2) {
  animation-delay: 0.2s;
}

.paw-trail .paw:nth-child(3) {
  animation-delay: 0.4s;
}

.paw-trail .paw:nth-child(4) {
  animation-delay: 0.6s;
}

.paw-trail .paw:nth-child(5) {
  animation-delay: 0.8s;
}

.gate-playground-note {
  margin: 11px 0 0;
  font-size: 0.84rem;
  color: #9f7a72;
}

.gate-playground:hover .pet-svg {
  filter: drop-shadow(0 8px 13px rgba(126, 90, 81, 0.28));
}

.gate-playground:active .pet-svg {
  filter: drop-shadow(0 9px 14px rgba(126, 90, 81, 0.3));
}

.gate-fun-line {
  margin: 10px 0 0;
  min-height: 1.4em;
  color: #8f6b63;
  font-size: 0.86rem;
  letter-spacing: 0.1px;
}

.motion-toggle-btn {
  margin-top: 8px;
  border: 1px solid rgba(165, 118, 106, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #7f5f57;
  font: inherit;
  font-size: 0.82rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.15s ease;
}

.motion-toggle-btn:hover {
  filter: brightness(1.02);
}

.motion-toggle-btn:active {
  transform: translateY(1px);
}

.motion-toggle-btn:focus-visible {
  outline: 2px solid rgba(180, 95, 138, 0.45);
  outline-offset: 2px;
}

body.motion-paused .gate-playground *,
body.motion-paused .gate-playground::after {
  animation: none !important;
}

body.motion-paused .paw {
  opacity: 0.5;
}

@keyframes cloud-drift-left {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(12px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes cloud-drift-right {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(-14px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes cloud-drift-mid {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-4px);
  }
}

@keyframes firefly-glow {
  0%,
  100% {
    opacity: 0.08;
    transform: scale(0.7);
  }
  35% {
    opacity: 0.9;
    transform: scale(1);
  }
  65% {
    opacity: 0.45;
    transform: scale(0.82);
  }
}

@keyframes firefly-path-a {
  0% {
    transform: translate(0, 0);
  }
  30% {
    transform: translate(14px, -9px);
  }
  58% {
    transform: translate(-7px, 6px);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes firefly-path-b {
  0% {
    transform: translate(0, 0);
  }
  28% {
    transform: translate(-10px, -11px);
  }
  62% {
    transform: translate(11px, 4px);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes firefly-path-c {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(7px, -8px);
  }
  55% {
    transform: translate(-12px, 2px);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes pet-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-7px);
  }
}

@keyframes pet-shadow-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.26;
  }
  40% {
    transform: scale(0.85);
    opacity: 0.16;
  }
}

@keyframes eye-blink-cat {
  0%,
  6%,
  33%,
  35%,
  63%,
  65%,
  100% {
    transform: scaleY(1);
  }
  34%,
  64% {
    transform: scaleY(0.08);
  }
}

@keyframes eye-blink-dog {
  0%,
  9%,
  41%,
  43%,
  78%,
  80%,
  100% {
    transform: scaleY(1);
  }
  42%,
  79% {
    transform: scaleY(0.08);
  }
}

@keyframes ear-twitch-cat-left {
  0%,
  20%,
  100% {
    transform: rotate(0deg);
  }
  22% {
    transform: rotate(-10deg);
  }
  24% {
    transform: rotate(4deg);
  }
  26% {
    transform: rotate(0deg);
  }
}

@keyframes ear-twitch-cat-right {
  0%,
  22%,
  100% {
    transform: rotate(0deg);
  }
  24% {
    transform: rotate(10deg);
  }
  26% {
    transform: rotate(-4deg);
  }
  28% {
    transform: rotate(0deg);
  }
}

@keyframes ear-twitch-dog-left {
  0%,
  55%,
  100% {
    transform: rotate(0deg);
  }
  57% {
    transform: rotate(-8deg);
  }
  60% {
    transform: rotate(3deg);
  }
  63% {
    transform: rotate(0deg);
  }
}

@keyframes ear-twitch-dog-right {
  0%,
  58%,
  100% {
    transform: rotate(0deg);
  }
  60% {
    transform: rotate(8deg);
  }
  63% {
    transform: rotate(-3deg);
  }
  66% {
    transform: rotate(0deg);
  }
}

@keyframes cat-nuzzle {
  0%,
  100% {
    transform: translateX(0) rotate(-2deg);
  }
  35% {
    transform: translateX(6px) rotate(-5deg);
  }
  70% {
    transform: translateX(1px) rotate(-1deg);
  }
}

@keyframes dog-nuzzle {
  0%,
  100% {
    transform: translateX(0) rotate(2deg);
  }
  35% {
    transform: translateX(-6px) rotate(5deg);
  }
  70% {
    transform: translateX(-1px) rotate(1deg);
  }
}

@keyframes paw-twinkle {
  0%,
  100% {
    opacity: 0.2;
    transform: translateY(0) scale(1);
  }
  45% {
    opacity: 0.75;
    transform: translateY(-3px) scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gate-playground *,
  .gate-playground::after {
    animation: none !important;
  }

  .paw {
    opacity: 0.5;
  }

}

.stack {
  display: grid;
  gap: var(--space-sm);
}

input[type="password"],
textarea {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-main);
  font: inherit;
  padding: 10px 12px;
}

textarea {
  min-height: 130px;
  line-height: 1.7;
}

input[type="password"]:focus,
textarea:focus {
  outline: 2px solid rgba(180, 95, 138, 0.25);
  border-color: rgba(180, 95, 138, 0.5);
}

.file-label {
  margin: 0;
  font-size: 0.9rem;
  color: #7f6f66;
  text-align: center;
}

.upload-card {
  display: grid;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border-radius: 14px;
  border: 1px solid rgba(229, 198, 191, 0.65);
  background: linear-gradient(145deg, rgba(255, 251, 250, 0.72), rgba(255, 247, 244, 0.6));
}

.upload-hint {
  margin: -4px 0 0;
  font-size: 0.8rem;
  color: #9b8d84;
  text-align: center;
}

.file-picker-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  text-align: center;
}

.file-pick-btn {
  border: 1px solid #e5c6bf;
  border-radius: 999px;
  background: linear-gradient(135deg, #f7ddd6 0%, #efd0c8 100%);
  color: #6e5248;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 8px 14px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(166, 123, 103, 0.18);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.file-pick-btn:hover {
  filter: brightness(1.02);
  box-shadow: 0 6px 14px rgba(166, 123, 103, 0.24);
}

.file-pick-btn:active {
  transform: translateY(1px);
}

.file-pick-btn:focus-visible {
  outline: 2px solid rgba(180, 95, 138, 0.55);
  outline-offset: 2px;
}

.file-picked-summary {
  font-size: 0.84rem;
  color: #7d6d63;
  text-align: center;
}

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.record-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.small-btn {
  border: 1px solid #e6ccc6;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #8a6f64;
  font: inherit;
  font-size: 0.86rem;
  padding: 7px 12px;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.15s ease;
}

.small-btn:hover {
  filter: brightness(1.02);
}

.small-btn:active {
  transform: translateY(1px);
}

.record-status {
  font-size: 0.84rem;
  color: #8d7b68;
}

.record-status.recording {
  color: #c0392b;
  font-weight: 600;
}

.primary-btn {
  width: fit-content;
  border: none;
  border-radius: 999px;
  background: var(--primary-pink);
  color: #4f413b;
  font: inherit;
  padding: 10px 18px;
  cursor: pointer;
}

#entry-form .primary-btn {
  justify-self: center;
  margin-top: 2px;
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.message {
  min-height: 1.2em;
  margin: var(--space-xs) 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  border-radius: 10px;
  padding: 0;
  transition: all 0.2s ease;
}

.message:not(:empty) {
  padding: 8px 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.62);
}

.message.error {
  color: #c0392b;
  border-color: rgba(192, 57, 43, 0.2);
  background: rgba(241, 148, 138, 0.12);
}

.message.success {
  color: #2e7d32;
  border-color: rgba(46, 125, 50, 0.2);
  background: rgba(129, 199, 132, 0.12);
}

.preview-grid,
.entry-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.preview-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid rgba(234, 216, 211, 0.95);
  box-shadow: 0 6px 12px rgba(84, 67, 57, 0.08);
}

.entry-media-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid rgba(234, 216, 211, 0.95);
  box-shadow: 0 6px 12px rgba(84, 67, 57, 0.08);
}

.preview-grid img,
.preview-grid video,
.entry-images img,
.entry-images video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0;
  border: 0;
}

.preview-grid video,
.entry-images video {
  background: #000;
}

.entry-images img {
  cursor: zoom-in;
}

.media-kind-tag {
  position: absolute;
  left: 6px;
  top: 6px;
  z-index: 2;
  font-size: 0.72rem;
  line-height: 1;
  color: #fff;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(46, 42, 39, 0.55);
  backdrop-filter: blur(2px);
}

.preview-item.kind-image .media-kind-tag,
.entry-media-item.kind-image .media-kind-tag {
  background: rgba(180, 95, 138, 0.72);
}

.preview-item.kind-video .media-kind-tag,
.entry-media-item.kind-video .media-kind-tag {
  background: rgba(86, 127, 171, 0.72);
}

.preview-item.kind-audio .media-kind-tag,
.entry-media-item.kind-audio .media-kind-tag {
  background: rgba(90, 138, 109, 0.72);
}

.preview-audio,
.entry-media-audio {
  display: grid;
  gap: 6px;
  min-height: 110px;
  align-content: center;
  background: rgba(255, 255, 255, 0.72);
  padding: 8px;
}

.preview-audio-name,
.entry-media-label {
  font-size: 0.78rem;
  color: #8d7b68;
  word-break: break-all;
}

.preview-audio audio,
.entry-media-audio audio {
  width: 100%;
}

.preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.preview-remove:hover {
  background: rgba(0, 0, 0, 0.72);
}

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

.entry-card {
  border: 1px solid #ecdcd7;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  padding: 12px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.entry-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(84, 67, 57, 0.12);
}

.entry-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: #897b74;
}

.entry-text {
  white-space: pre-wrap;
  line-height: 1.7;
  margin-bottom: 10px;
}

.danger-btn {
  border: none;
  border-radius: 999px;
  background: #f3dfda;
  color: #8a4b45;
  font: inherit;
  padding: 6px 12px;
  cursor: pointer;
}

.empty {
  color: #9a8c84;
  font-size: 0.95rem;
}

.entry-image-modal {
  position: fixed;
  inset: 0;
  background: rgba(16, 14, 14, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: 18px;
}

.entry-image-modal.active {
  display: flex;
}

.entry-image-modal-content {
  position: relative;
  width: min(900px, 96vw);
  max-height: 92vh;
  background: linear-gradient(145deg, rgba(255, 247, 250, 0.18), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.entry-image-modal-content img {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  user-select: none;
  -webkit-user-drag: none;
  touch-action: pan-y;
}

.entry-image-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.entry-image-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: none;
}

.entry-image-modal-nav.show {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.entry-image-modal-nav.prev {
  left: 12px;
}

.entry-image-modal-nav.next {
  right: 12px;
}

.entry-image-modal-caption {
  margin: 0;
  color: #f8eef1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  font-size: 0.88rem;
  text-align: center;
  word-break: break-word;
}

.entry-image-modal-counter {
  margin: 0;
  color: rgba(255, 239, 245, 0.88);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  font-size: 0.8rem;
  text-align: center;
}

@media (max-width: 640px) {
  .panel {
    padding: 14px;
  }

  .gate-playground {
    min-height: 200px;
  }

  .pet-stage {
    gap: 12px;
    bottom: 18px;
  }

  .pet-svg {
    width: 74px;
    height: 66px;
  }

  .preview-grid,
  .entry-images {
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  }

  .file-picker-row {
    gap: 8px;
  }

  .file-picked-summary {
    width: 100%;
    text-align: center;
  }

  .entry-image-modal-nav {
    width: 38px;
    height: 38px;
    font-size: 28px;
  }
}
