.landing-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

/* Hiragana */
.landing-bg--kana {
    background: #faf8f5;
}

.landing-bg--kana span {
    position: absolute;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 700;
    color: #1a2332;
    opacity: 0.03;
    user-select: none;
}

.landing-bg--kana span:nth-child(1) { top: 8%;  right: 6%;  font-size: clamp(6rem, 18vw, 14rem); }
.landing-bg--kana span:nth-child(2) { bottom: 12%; left: 4%;  font-size: clamp(5rem, 14vw, 11rem); }
.landing-bg--kana span:nth-child(3) { top: 42%;  left: 55%; font-size: clamp(4rem, 10vw, 8rem); opacity: 0.02; }

/* Kanji */
.landing-bg--kanji {
    background: linear-gradient(165deg, #f7f4ef 0%, #ebe4d8 55%, #f3ede4 100%);
}

.landing-bg--kanji span {
    position: absolute;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 700;
    color: #2c1810;
    opacity: 0.045;
    user-select: none;
}

.landing-bg--kanji span:nth-child(1) { top: 6%;  left: 8%;  font-size: clamp(5.5rem, 16vw, 13rem); }
.landing-bg--kanji span:nth-child(2) { bottom: 10%; right: 5%; font-size: clamp(6rem, 17vw, 14rem); opacity: 0.035; }
.landing-bg--kanji span:nth-child(3) { top: 38%;  right: 42%; font-size: clamp(4rem, 11vw, 9rem); opacity: 0.025; }

/* Sakura */
.landing-bg--sakura {
    background:
        radial-gradient(ellipse 120% 80% at 50% 100%, rgba(232, 180, 184, 0.35) 0%, transparent 55%),
        radial-gradient(circle at 15% 20%, rgba(255, 183, 197, 0.25) 0%, transparent 35%),
        radial-gradient(circle at 85% 15%, rgba(255, 200, 210, 0.2) 0%, transparent 30%),
        radial-gradient(circle at 70% 75%, rgba(255, 170, 185, 0.18) 0%, transparent 28%),
        linear-gradient(180deg, #fdf8f6 0%, #f9eef0 45%, #f5e8ec 100%);
}

.landing-bg--sakura::before,
.landing-bg--sakura::after {
    content: "";
    position: absolute;
    border-radius: 50% 0 50% 50%;
    background: rgba(255, 183, 197, 0.12);
    transform: rotate(25deg);
}

.landing-bg--sakura::before {
    width: clamp(3rem, 8vw, 5rem);
    height: clamp(3rem, 8vw, 5rem);
    top: 18%;
    right: 22%;
    box-shadow:
        -4rem 3rem 0 -0.5rem rgba(255, 183, 197, 0.1),
        5rem 8rem 0 -0.75rem rgba(255, 200, 210, 0.08),
        -6rem 12rem 0 -1rem rgba(255, 170, 185, 0.07);
}

.landing-bg--sakura::after {
    width: clamp(2.5rem, 6vw, 4rem);
    height: clamp(2.5rem, 6vw, 4rem);
    bottom: 25%;
    left: 12%;
    opacity: 0.85;
    box-shadow:
        3rem -2rem 0 -0.4rem rgba(255, 183, 197, 0.09),
        -2rem 5rem 0 -0.6rem rgba(255, 200, 210, 0.07);
}

/* Torii */
.landing-bg--torii {
    background:
        linear-gradient(180deg, #f8f0e8 0%, #f3e4d4 35%, #e8c9a8 70%, #d4a574 100%);
}

.landing-bg--torii::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(92vw, 520px);
    height: clamp(8rem, 22vh, 14rem);
    background:
        linear-gradient(#c0392b, #c0392b) 0 18% / 100% 8% no-repeat,
        linear-gradient(#a93226, #a93226) 12% 26% / 76% 6% no-repeat,
        linear-gradient(#c0392b, #922b21) 22% 32% / 12% 68% no-repeat,
        linear-gradient(#c0392b, #922b21) 66% 32% / 12% 68% no-repeat;
    opacity: 0.14;
    border-radius: 2px 2px 0 0;
}

.landing-bg--torii::after {
    content: "鳥居";
    position: absolute;
    top: 12%;
    right: 8%;
    font-family: "Noto Sans JP", sans-serif;
    font-size: clamp(3rem, 9vw, 7rem);
    font-weight: 700;
    color: #5c2e1a;
    opacity: 0.04;
    user-select: none;
}

/* Seigaiha waves */
.landing-bg--waves {
    background-color: #f0f4f8;
    background-image:
        radial-gradient(circle at 100% 150%, #b8cfe0 22%, transparent 23%),
        radial-gradient(circle at 0% 150%, #b8cfe0 22%, transparent 23%),
        radial-gradient(circle at 50% 100%, #c5d9e8 22%, transparent 23%),
        radial-gradient(circle at 25% 150%, #a8c4d8 22%, transparent 23%),
        radial-gradient(circle at 75% 150%, #a8c4d8 22%, transparent 23%);
    background-size: 80px 40px;
    background-position: 0 0;
    opacity: 1;
}

.landing-bg--waves::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(250, 248, 245, 0.92) 0%, rgba(250, 248, 245, 0.55) 40%, rgba(250, 248, 245, 0.75) 100%);
}

.landing-bg--waves span {
    position: absolute;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 500;
    color: #1a4a6e;
    opacity: 0.04;
    font-size: clamp(3rem, 8vw, 6rem);
    user-select: none;
}

.landing-bg--waves span:nth-child(1) { top: 10%; left: 10%; }
.landing-bg--waves span:nth-child(2) { bottom: 20%; right: 12%; }

/* Montañas (estilo sumi-e) */
.landing-bg--mountains {
    background:
        radial-gradient(ellipse 90% 50% at 50% 85%, rgba(200, 210, 220, 0.5) 0%, transparent 55%),
        linear-gradient(180deg, #dce6f0 0%, #c5d4e3 38%, #d8cfc0 72%, #c9b89a 100%);
}

.landing-bg--mountains::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: -5%;
    width: 110%;
    height: 52%;
    background: rgba(88, 108, 128, 0.16);
    clip-path: polygon(0% 100%, 8% 58%, 18% 72%, 32% 38%, 46% 55%, 58% 24%, 72% 42%, 86% 18%, 100% 32%, 100% 100%);
}

.landing-bg--mountains::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 20%;
    width: min(42vw, 280px);
    height: clamp(10rem, 26vh, 18rem);
    background: rgba(70, 90, 110, 0.12);
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.landing-bg--mountains span {
    position: absolute;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 700;
    color: #3d5266;
    opacity: 0.045;
    user-select: none;
    font-size: clamp(2.5rem, 7vw, 5rem);
}

.landing-bg--mountains span:nth-child(1) { top: 8%; right: 10%; }
.landing-bg--mountains span:nth-child(2) { bottom: 28%; left: 8%; opacity: 0.03; }

/* Bosque */
.landing-bg--forest {
    background:
        radial-gradient(ellipse 80% 45% at 50% 100%, rgba(160, 185, 150, 0.35) 0%, transparent 60%),
        linear-gradient(180deg, #e6eee3 0%, #d4e2cf 55%, #b8ccb0 100%);
}

.landing-bg--forest::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 38%;
    background:
        linear-gradient(180deg, transparent 0%, rgba(55, 75, 48, 0.08) 100%),
        radial-gradient(ellipse 18% 85% at 12% 100%, rgba(45, 65, 40, 0.22) 0%, transparent 70%),
        radial-gradient(ellipse 22% 90% at 28% 100%, rgba(50, 72, 44, 0.2) 0%, transparent 68%),
        radial-gradient(ellipse 16% 80% at 44% 100%, rgba(42, 62, 38, 0.18) 0%, transparent 65%),
        radial-gradient(ellipse 24% 95% at 62% 100%, rgba(48, 68, 42, 0.21) 0%, transparent 70%),
        radial-gradient(ellipse 18% 82% at 78% 100%, rgba(40, 58, 36, 0.19) 0%, transparent 66%),
        radial-gradient(ellipse 20% 88% at 92% 100%, rgba(46, 66, 40, 0.17) 0%, transparent 68%);
}

.landing-bg--forest::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 22%;
    background: linear-gradient(180deg, transparent, rgba(90, 110, 75, 0.12));
}

.landing-bg--forest span {
    position: absolute;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, rgba(55, 70, 45, 0) 0%, rgba(55, 70, 45, 0.25) 35%, rgba(45, 58, 38, 0.3) 100%);
    border-radius: 2px 2px 0 0;
    transform-origin: bottom center;
}

.landing-bg--forest span::before {
    content: "";
    position: absolute;
    bottom: 55%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: clamp(0.75rem, 2.2vw, 1.35rem) solid transparent;
    border-right: clamp(0.75rem, 2.2vw, 1.35rem) solid transparent;
    border-bottom: clamp(1.4rem, 4vw, 2.6rem) solid rgba(48, 68, 42, 0.22);
    filter: drop-shadow(0 -1.1rem 0 rgba(48, 68, 42, 0.14)) drop-shadow(0 -2.2rem 0 rgba(48, 68, 42, 0.1));
}

.landing-bg--forest span:nth-child(1) { left: 18%; height: 32%; transform: rotate(-3deg); }
.landing-bg--forest span:nth-child(2) { left: 34%; height: 42%; width: 4px; }
.landing-bg--forest span:nth-child(3) { left: 52%; height: 36%; transform: rotate(2deg); }
.landing-bg--forest span:nth-child(4) { left: 71%; height: 45%; width: 4px; transform: rotate(-1.5deg); }
.landing-bg--forest span:nth-child(5) { left: 86%; height: 30%; transform: rotate(4deg); }

/* Atardecer */
.landing-bg--sunset {
    background:
        radial-gradient(circle at 72% 22%, rgba(255, 210, 150, 0.55) 0%, rgba(255, 180, 120, 0.2) 18%, transparent 42%),
        radial-gradient(ellipse 120% 80% at 50% 0%, rgba(255, 195, 160, 0.35) 0%, transparent 55%),
        linear-gradient(180deg, #f8dcc8 0%, #f0c4a8 28%, #e8a890 52%, #c88878 78%, #8a6a62 100%);
}

.landing-bg--sunset::before {
    content: "";
    position: absolute;
    top: 14%;
    right: 18%;
    width: clamp(3.5rem, 10vw, 6rem);
    height: clamp(3.5rem, 10vw, 6rem);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 230, 180, 0.65) 0%, rgba(255, 200, 130, 0.35) 55%, transparent 70%);
    box-shadow: 0 0 clamp(2rem, 8vw, 5rem) rgba(255, 190, 120, 0.35);
}

.landing-bg--sunset::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: -8%;
    width: 116%;
    height: 40%;
    background: rgba(70, 50, 45, 0.18);
    clip-path: polygon(0% 100%, 0% 55%, 12% 48%, 24% 62%, 38% 42%, 52% 58%, 66% 38%, 80% 52%, 94% 35%, 100% 45%, 100% 100%);
}

.landing-bg--sunset span {
    position: absolute;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 500;
    color: #5c3a30;
    opacity: 0.05;
    user-select: none;
    font-size: clamp(2.5rem, 7vw, 5rem);
}

.landing-bg--sunset span:nth-child(1) { bottom: 22%; left: 12%; }

/* Bambú */
.landing-bg--bamboo {
    background:
        radial-gradient(ellipse 70% 50% at 30% 100%, rgba(170, 200, 160, 0.25) 0%, transparent 55%),
        linear-gradient(180deg, #eef4ea 0%, #dce8d4 45%, #c8d8bc 100%);
}

.landing-bg--bamboo::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 11%,
            rgba(70, 110, 55, 0.06) 11%,
            rgba(70, 110, 55, 0.06) 11.4%,
            transparent 11.4%,
            transparent 22%
        );
    mask-image: linear-gradient(180deg, transparent 5%, black 25%, black 95%, transparent 100%);
}

.landing-bg--bamboo span {
    position: absolute;
    bottom: -5%;
    width: clamp(3px, 0.5vw, 5px);
    background: linear-gradient(180deg, rgba(80, 120, 60, 0.05) 0%, rgba(65, 100, 50, 0.28) 30%, rgba(55, 85, 42, 0.32) 100%);
    border-radius: 3px 3px 0 0;
}

.landing-bg--bamboo span::before,
.landing-bg--bamboo span::after {
    content: "";
    position: absolute;
    left: -120%;
    width: 340%;
    height: 2px;
    background: rgba(55, 85, 42, 0.22);
    border-radius: 1px;
}

.landing-bg--bamboo span::before { top: 28%; }
.landing-bg--bamboo span::after { top: 58%; }

.landing-bg--bamboo span:nth-child(1) { left: 14%; height: 78%; transform: rotate(-2deg); }
.landing-bg--bamboo span:nth-child(2) { left: 26%; height: 92%; width: clamp(4px, 0.6vw, 6px); }
.landing-bg--bamboo span:nth-child(3) { left: 38%; height: 70%; transform: rotate(1.5deg); opacity: 0.85; }
.landing-bg--bamboo span:nth-child(4) { left: 52%; height: 88%; width: clamp(4px, 0.6vw, 6px); transform: rotate(-1deg); }
.landing-bg--bamboo span:nth-child(5) { left: 66%; height: 75%; transform: rotate(2deg); }
.landing-bg--bamboo span:nth-child(6) { left: 80%; height: 95%; width: clamp(4px, 0.6vw, 6px); transform: rotate(-1.5deg); opacity: 0.9; }

/* Ilustraciones (imagen) */
.landing-bg--mountains-paint,
.landing-bg--forest-sunset-paint {
    background-color: #f0ebe4;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.landing-bg--mountains-paint {
    background-image: url('/assets/images/backgrounds/mountains.jpg');
}

.landing-bg--forest-sunset-paint {
    background-image: url('/assets/images/backgrounds/forest-sunset.jpg');
}

.landing-bg--mountains-paint::after,
.landing-bg--forest-sunset-paint::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(250, 248, 245, 0.2) 0%,
        rgba(250, 248, 245, 0.08) 35%,
        rgba(250, 248, 245, 0.25) 100%
    );
}

/* Compat: vistas antiguas */
.bg-kanji {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.bg-kanji span {
    position: absolute;
    font-family: "Noto Sans JP", sans-serif;
    font-weight: 700;
    color: #1a2332;
    opacity: 0.03;
    user-select: none;
}

.bg-kanji span:nth-child(1) { top: 8%;  right: 6%;  font-size: clamp(6rem, 18vw, 14rem); }
.bg-kanji span:nth-child(2) { bottom: 12%; left: 4%;  font-size: clamp(5rem, 14vw, 11rem); }
.bg-kanji span:nth-child(3) { top: 42%;  left: 55%; font-size: clamp(4rem, 10vw, 8rem); opacity: 0.02; }

/* Miniaturas en admin (res-landings) */
.apj-bg-preview-wrap .landing-bg,
.apj-bg-preview-random .landing-bg {
  position: absolute !important;
  overflow: hidden;
  z-index: 0;
}

.apj-bg-preview-wrap > .landing-bg {
  width: 420px;
  height: 280px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.36);
  transform-origin: center center;
}

.apj-bg-preview-random > div {
  position: relative;
  overflow: hidden;
}

.apj-bg-preview-random .landing-bg {
  width: 220px;
  height: 150px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.52);
  transform-origin: center center;
}
