.pinboard-page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  min-height: 400px;
}

.pin {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  cursor: default;
}
.pin::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--pin-color, radial-gradient(circle at 35% 30%, #ff6666, #cc1111 60%, #7a0000));
  box-shadow: 0 2px 5px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.4);
}
.pin::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 75%;
  width: 2px;
  height: 10px;
  background: linear-gradient(to bottom, rgba(180,180,180,0.9), rgba(100,100,100,0.4));
  transform: translateX(-50%);
  border-radius: 0 0 1px 1px;
  box-shadow: 1px 0 2px rgba(0,0,0,0.3);
}

.pin-red   { --pin-color: radial-gradient(circle at 35% 30%, #ff7070, #dd1111 60%, #880000); }
.pin-blue  { --pin-color: radial-gradient(circle at 35% 30%, #5599ff, #1144cc 60%, #002288); }
.pin-yellow{ --pin-color: radial-gradient(circle at 35% 30%, #ffe066, #ddb800 60%, #886600); }
.pin-green { --pin-color: radial-gradient(circle at 35% 30%, #66dd77, #118833 60%, #005511); }
.pin-white { --pin-color: radial-gradient(circle at 35% 30%, #ffffff, #cccccc 60%, #888888); }

.photo {
  position: absolute;
  left: var(--x, 10%);
  top:  var(--y, 10%);
  transform: rotate(var(--rot, 0deg));
  background: #fff;
  padding: 8px 8px 32px;
  box-shadow: 2px 3px 10px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 8;
}
.photo .pin {
  top: -8px;
  left: 50%;
  z-index: 1;
}
.photo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.photo.loading-photo {
  position: relative;
  overflow: hidden;
}
.photo.loading-photo .photo-img {
  position: absolute;
  top: 8px;
  left: 8px;
  width: calc(100% - 16px);
  height: calc(100% - 40px);
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s;
  z-index: 4;
}
.photo.loading-photo .photo-img.loaded {
  opacity: 1;
}
.photo .caption {
  font-family: 'Segoe Script', 'Patrick Hand', cursive;
  font-size: 11px;
  color: #333;
  text-align: center;
  margin-top: 6px;
}

.card-scene {
  width: 100%;
  height: 100%;
  min-height: 160px;
  background: #87ceeb;
  position: relative;
  overflow: hidden;
}

.card-scene .sun {
  position: absolute;
  width: 40px;
  height: 40px;
  background: #ffe987;
  border-radius: 50%;
  top: 20px;
  right: 15px;
  box-shadow: 0 0 40px #ffe987;
}

.card-scene .mountains {
  position: absolute;
  bottom: 70px;
  width: 100%;
  height: 80px;
}

.card-scene .mountain1 {
  position: absolute;
  bottom: 0;
  left: -20%;
  width: 70%;
  height: 100%;
  background: linear-gradient(45deg, #4a6363 30%, #6a8d8d);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.card-scene .mountain2 {
  position: absolute;
  bottom: 0;
  right: -20%;
  width: 70%;
  height: 80%;
  background: linear-gradient(45deg, #3d5252 30%, #5c7f7f);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.card-scene .lake {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 70px;
  background: linear-gradient(
    180deg,
    rgba(95, 158, 160, 0.9) 0%,
    rgba(74, 127, 128, 0.95) 100%
  );
  overflow: hidden;
}

.card-scene .lake::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(74, 99, 99, 0.4) 0%,
    rgba(106, 141, 141, 0.2) 100%
  );
  transform: scale(1, -1);
  opacity: 0.5;
}

.card-scene .water-surface {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 45%,
    rgba(255, 255, 255, 0.1) 55%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: cardWaterFlow 4s infinite linear;
}

.card-scene .water-ripples {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.08) 20%,
    rgba(255, 255, 255, 0.03) 40%,
    rgba(255, 255, 255, 0.08) 60%,
    rgba(255, 255, 255, 0.03) 80%
  );
  animation: cardRippleFlow 8s infinite linear;
}

.card-scene .water-sparkles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.8) 0%, transparent 100%),
    radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 40%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 60%, rgba(255,255,255,0.7) 0%, transparent 100%);
  animation: cardSparkle 3s infinite;
}

@keyframes cardWaterFlow {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes cardRippleFlow {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes cardSparkle {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.card-scene .trees {
  position: absolute;
  bottom: 70px;
  width: 100%;
  height: 50px;
}

.card-scene .tree {
  position: absolute;
  bottom: 0;
  width: 16px;
  height: 35px;
  background: linear-gradient(to top, #1a472a, #2d5a3f);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.card-scene .tree:nth-child(1) { left: 8%; height: 25px; }
.card-scene .tree:nth-child(2) { left: 14%; height: 35px; }
.card-scene .tree:nth-child(3) { left: 20%; height: 30px; }
.card-scene .tree:nth-child(4) { right: 8%; height: 38px; }
.card-scene .tree:nth-child(5) { right: 14%; height: 30px; }

.card-scene .cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50px;
  animation: cardFloat 20s infinite linear;
}

.card-scene .cloud:nth-child(1) {
  width: 50px;
  height: 18px;
  top: 25px;
  left: -50px;
}

.card-scene .cloud:nth-child(2) {
  width: 35px;
  height: 13px;
  top: 45px;
  left: -35px;
  animation-delay: -10s;
}

@keyframes cardFloat {
  from { transform: translateX(0); }
  to { transform: translateX(350px); }
}

.card-scene .dust {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(#000 1px, transparent 1px),
    radial-gradient(#000 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: 0 0, 25px 25px;
  opacity: 0.03;
  pointer-events: none;
  z-index: 3;
}

.card-scene .scratches {
  position: absolute;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(45deg, transparent 45%, rgba(0,0,0,0.05) 46%, transparent 47%) 0 0,
    linear-gradient(-45deg, transparent 45%, rgba(0,0,0,0.05) 46%, transparent 47%) 0 0;
  background-size: 200px 200px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 3;
}

.card-scene .photo-shine {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.4) 32%,
    rgba(255, 255, 255, 0) 35%
  );
  animation: cardShine 3s infinite;
  z-index: 2;
}

@keyframes cardShine {
  0% { transform: translateX(-100%) rotate(120deg); }
  20%, 100% { transform: translateX(100%) rotate(120deg); }
}

@media (max-width: 640px) {
  .pinboard-page {
    padding: 0.5rem 0.25rem;
  }
}
