@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Noto+Sans+KR:wght@400;500;600&display=swap');

body.m3-app.my-forest-page {
  font-family: 'Inter', 'Noto Sans KR', system-ui, sans-serif;
  background: #0a0a0a;
  padding-bottom: 88px;
}

.my-forest-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.my-forest-toolbar input,
.my-forest-toolbar select {
  flex: 1;
  min-width: 140px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e3de;
  font-size: 14px;
}

.my-forest-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 720px) {
  .my-forest-layout {
    grid-template-columns: 200px 1fr;
    align-items: start;
  }
}

.my-forest-palette {
  display: flex;
  flex-direction: row;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}

@media (min-width: 720px) {
  .my-forest-palette {
    flex-direction: column;
    overflow-x: visible;
    max-height: 70vh;
    overflow-y: auto;
  }
}

.palette-card {
  flex: 0 0 88px;
  width: 88px;
  cursor: grab;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 24, 20, 0.8);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

.palette-card:active {
  cursor: grabbing;
}

.palette-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}

.palette-card span {
  display: block;
  font-size: 10px;
  padding: 4px 6px;
  text-align: center;
  color: #9aa89a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-forest-canvas-wrap {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  min-height: 420px;
  aspect-ratio: 4/5;
  max-height: 75vh;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.my-forest-canvas {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.my-forest-canvas.theme-moss {
  background-image: linear-gradient(165deg, #0d1a12 0%, #1a3324 45%, #0a120d 100%);
}

.my-forest-canvas.theme-dawn {
  background-image: linear-gradient(180deg, #2a2438 0%, #5c4a6a 35%, #1a2830 100%);
}

.my-forest-canvas.theme-dusk {
  background-image: linear-gradient(200deg, #3d1f2a 0%, #5a3d28 40%, #1a1510 100%);
}

.my-forest-canvas.theme-rain {
  background-image: linear-gradient(180deg, #1a2228 0%, #2a3540 50%, #121820 100%);
}

.my-forest-canvas.theme-rain::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    105deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.03) 2px,
    rgba(255, 255, 255, 0.03) 4px
  );
  pointer-events: none;
}

.my-forest-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.synergy-line {
  stroke: rgba(159, 216, 159, 0.85);
  stroke-width: 2.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(159, 216, 159, 0.6));
  animation: synergy-pulse 2s ease-in-out infinite;
}

@keyframes synergy-pulse {
  0%, 100% { stroke-opacity: 0.65; }
  50% { stroke-opacity: 1; }
}

.placed-card {
  position: absolute;
  width: 72px;
  transform: translate(-50%, -50%);
  z-index: 3;
  cursor: grab;
  touch-action: none;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.15);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.placed-card.synergy-active {
  border-color: rgba(159, 216, 159, 0.9);
  box-shadow: 0 0 20px rgba(159, 216, 159, 0.35);
}

.placed-card img {
  width: 100%;
  border-radius: 8px;
  display: block;
  pointer-events: none;
}

.placed-card .remove-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: #3a1212;
  color: #ffc8c8;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
}

.my-forest-hint {
  font-size: 12px;
  color: #8a928a;
  margin: 0 0 12px;
}

.my-forest-login-gate {
  text-align: center;
  padding: 48px 24px;
}