/* Dream Taken · 梦境群岛：一块海，很多岛 */

.arch {
  --arch-water: #071018;
  --arch-foam: rgba(232, 212, 168, 0.22);
  --arch-gold: #c9a962;
  --arch-blue: #3d6fd9;
  --arch-violet: #6b5b95;
  background:
    radial-gradient(ellipse 80% 50% at 20% 30%, rgba(201, 169, 98, 0.1), transparent 55%),
    radial-gradient(ellipse 70% 60% at 78% 24%, rgba(61, 111, 217, 0.16), transparent 50%),
    radial-gradient(ellipse 60% 50% at 72% 78%, rgba(107, 91, 149, 0.18), transparent 48%),
    linear-gradient(180deg, #0a121c 0%, #070b12 42%, #0c0a08 100%);
  border: 1px solid rgba(201, 169, 98, 0.22);
  border-radius: 1.75rem;
  box-shadow:
    0 28px 80px rgba(8, 6, 4, 0.22),
    inset 0 1px 0 rgba(232, 212, 168, 0.14);
  color: #f0e0bc;
  margin: 1.15rem auto 0.4rem;
  max-width: calc(var(--max-w) - 3rem);
  overflow: hidden;
  padding: 1.15rem 1.2rem 1.05rem;
  position: relative;
  scroll-margin-top: calc(var(--header-h) + 0.8rem);
  width: calc(100% - 3rem);
  z-index: 2;
}

.arch__glint {
  animation: arch-glint 16s ease-in-out infinite;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1), transparent 42%);
  inset: 0;
  pointer-events: none;
  position: absolute;
}

@keyframes arch-glint {
  0%, 100% { opacity: 0.35; transform: translate3d(0, 0, 0); }
  50% { opacity: 0.7; transform: translate3d(8%, 4%, 0); }
}

.arch__head {
  position: relative;
  z-index: 3;
}

.arch__kicker {
  color: rgba(232, 212, 168, 0.55);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.38em;
}

.arch__title {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 0.28rem;
}

.arch__lead {
  color: rgba(232, 212, 168, 0.48);
  font-size: 0.88rem;
  margin-top: 0.28rem;
}

.arch__bay {
  height: 36rem;
  margin-top: 0.35rem;
  overflow: hidden;
  perspective: 1600px;
  position: relative;
  z-index: 2;
}

.arch__routes {
  inset: 8% 6% 12% 6%;
  opacity: 0.45;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

.arch__routes path {
  fill: none;
  stroke: rgba(201, 169, 98, 0.45);
  stroke-dasharray: 5 9;
  stroke-width: 1.2;
}

.arch__world {
  height: 100%;
  position: relative;
  transform: rotateX(var(--tilt-x, 10deg)) rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}

.isle {
  --w: 7.4rem;
  --cliff: 18px;
  --hue: #c4a36a;
  color: inherit;
  display: block;
  height: calc(var(--w) * 0.78);
  position: absolute;
  text-decoration: none;
  transform: translate(-50%, -50%);
  width: var(--w);
  z-index: 2;
}

.isle--rock {
  pointer-events: none;
  --w: 2.1rem;
  --cliff: 6px;
}

.isle__3d {
  animation: isle-bob 5.4s ease-in-out infinite alternate;
  display: block;
  height: 100%;
  position: relative;
  transform: rotateX(54deg) rotateZ(-8deg);
  transform-style: preserve-3d;
  width: 100%;
}

.isle:nth-child(3n) .isle__3d { animation-duration: 6.4s; animation-delay: -1.2s; }
.isle:nth-child(4n) .isle__3d { animation-duration: 4.6s; animation-delay: -2.1s; }
.isle:nth-child(5n) .isle__3d { animation-duration: 7s; animation-delay: -0.6s; }

@keyframes isle-bob {
  from { transform: rotateX(54deg) rotateZ(-8deg) translateZ(0); }
  to { transform: rotateX(54deg) rotateZ(-8deg) translateZ(12px); }
}

.isle__shadow {
  background: rgba(0, 0, 0, 0.38);
  border-radius: 50%;
  filter: blur(10px);
  height: 34%;
  left: 12%;
  pointer-events: none;
  position: absolute;
  top: 58%;
  width: 76%;
}

.isle__top {
  background: var(--hue);
  border-radius: 46% 54% 44% 56% / 52% 46% 54% 48%;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 3px 0 rgba(20, 14, 8, 0.35),
    0 7px 0 rgba(12, 10, 8, 0.55),
    0 12px 0 rgba(6, 6, 8, 0.75),
    0 var(--cliff) 0 #050508,
    0 26px 32px rgba(0, 0, 0, 0.45);
  display: block;
  height: 100%;
  overflow: hidden;
  position: relative;
  transform: translateZ(1px);
  width: 100%;
}

.isle__top::after {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.28), transparent 46%);
  border-radius: inherit;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.isle__foam {
  border: 1.5px solid var(--arch-foam);
  border-radius: inherit;
  inset: -0.45rem;
  pointer-events: none;
  position: absolute;
}

.isle__top img,
.isle__top .isle__cgi {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.isle__top .isle__cgi {
  background: #0c0c10;
  object-fit: contain;
}

.isle__flag {
  left: 50%;
  margin-top: 0;
  pointer-events: none;
  position: absolute;
  text-align: center;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  top: calc(100% + 0.42rem);
  transform: translateX(-50%);
  white-space: nowrap;
  width: max-content;
}

.isle__flag b {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.isle__flag i {
  color: rgba(232, 212, 168, 0.7);
  display: block;
  font-size: 0.72rem;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  margin-top: 0.08rem;
}

.isle__flag em {
  background: var(--arch-gold);
  border-radius: 99rem;
  color: #1a1408;
  font-size: 0.52rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-left: 0.28rem;
  padding: 0.06rem 0.32rem;
  vertical-align: middle;
}

.isle--mother {
  --w: 11.2rem;
  --cliff: 24px;
}

.isle--mother .isle__flag {
  top: 76%;
  text-shadow: 0 2px 10px #000, 0 10px 24px rgba(0, 0, 0, 0.8);
}

.isle--mother .isle__flag b {
  font-size: 1.05rem;
}

.isle--motion {
  --w: 8.4rem;
  --cliff: 28px;
}

.isle--ads,
.isle--std,
.isle--full {
  --hue: #3a5aa8;
}

.isle--vis,
.isle--still,
.isle--video {
  --hue: #5a4a7a;
}

.isle--tpl { --hue: #d7c7a0; }
.isle--shop { --hue: #c9a962; }
.isle--film { --hue: #8a7340; }
.isle--motion { --hue: #16120c; }

.isle--build { left: 22%; top: 52%; z-index: 5; }
.isle--tpl { left: 8%; top: 66%; z-index: 6; --w: 5.8rem; }
.isle--shop { left: 22%; top: 78%; z-index: 7; --w: 6.2rem; }
.isle--film { left: 36%; top: 66%; z-index: 6; --w: 6.2rem; }
.isle--motion { left: 37%; top: 34%; z-index: 8; }

.isle--ads { left: 74%; top: 30%; z-index: 4; }
.isle--std { left: 62%; top: 22%; z-index: 5; --w: 5.8rem; }
.isle--full { left: 86%; top: 22%; z-index: 5; --w: 6rem; }

.isle--vis { left: 74%; top: 68%; z-index: 5; }
.isle--still { left: 61%; top: 80%; z-index: 6; --w: 5.8rem; }
.isle--video { left: 87%; top: 78%; z-index: 6; --w: 6.1rem; }

.isle--rock-1 { left: 12%; top: 22%; --hue: #4a3f32; z-index: 1; }
.isle--rock-2 { left: 48%; top: 14%; --w: 1.6rem; --hue: #3a4558; z-index: 1; }
.isle--rock-3 { left: 92%; top: 48%; --w: 2.4rem; --hue: #3d3348; z-index: 2; }
.isle--rock-4 { left: 46%; top: 88%; --w: 1.8rem; --hue: #2a241c; z-index: 2; }
.isle--rock-5 { left: 4%; top: 44%; --w: 1.4rem; --hue: #4a5568; z-index: 1; }

.isle:hover,
.isle.is-aim,
.isle:focus-visible {
  z-index: 20;
}

.isle:hover .isle__3d,
.isle.is-aim .isle__3d,
.isle:focus-visible .isle__3d {
  animation: none;
  transform: rotateX(54deg) rotateZ(-8deg) translateZ(26px) scale(1.08);
}

.isle:hover .isle__flag,
.isle.is-aim .isle__flag {
  transform: translateX(-50%) translateY(-4px);
}

.isle:focus-visible {
  outline: none;
}

.isle:focus-visible .isle__top {
  box-shadow:
    0 0 0 2px #f0e0bc,
    0 var(--cliff) 0 #0a0806,
    0 18px 28px rgba(0, 0, 0, 0.4);
}

.isle--motion .isle__top {
  box-shadow:
    inset 0 1px 0 rgba(232, 212, 168, 0.35),
    0 4px 0 #3a3228,
    0 9px 0 #2a241c,
    0 15px 0 #16120c,
    0 var(--cliff) 0 #050506,
    0 32px 36px rgba(201, 169, 98, 0.28);
}

.isle--ads .isle__top,
.isle--std .isle__top,
.isle--full .isle__top {
  background:
    radial-gradient(circle at 38% 28%, rgba(170, 196, 255, 0.5), transparent 52%),
    repeating-linear-gradient(115deg, transparent 0 10px, rgba(255, 255, 255, 0.04) 10px 11px),
    #2a4a8a;
}

.isle--vis .isle__top {
  background:
    radial-gradient(circle at 60% 30%, rgba(196, 181, 232, 0.4), transparent 52%),
    #3a2e52;
}

.arch__dock {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 0.2rem;
  position: relative;
  z-index: 3;
}

.arch__chip {
  align-items: baseline;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(232, 212, 168, 0.16);
  border-radius: 99rem;
  color: rgba(240, 224, 188, 0.88);
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 700;
  gap: 0.4rem;
  padding: 0.32rem 0.72rem;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.arch__chip:hover,
.arch__chip.is-on {
  background: rgba(201, 169, 98, 0.18);
  border-color: rgba(201, 169, 98, 0.42);
  transform: translateY(-1px);
}

.arch__chip--ads:hover,
.arch__chip--ads.is-on {
  background: rgba(61, 111, 217, 0.22);
  border-color: rgba(122, 166, 255, 0.42);
}

.arch__chip--vis:hover,
.arch__chip--vis.is-on {
  background: rgba(107, 91, 149, 0.28);
  border-color: rgba(196, 181, 232, 0.4);
}

.arch__chip i {
  color: rgba(232, 212, 168, 0.55);
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

html[data-theme="dark"] .arch {
  border-color: rgba(201, 169, 98, 0.16);
}

@media (max-width: 64rem) {
  .arch__bay {
    height: 30rem;
  }

  .isle--mother { --w: 9.4rem; }
}

@media (max-width: 52rem) {
  .arch {
    padding: 1rem 0.7rem 0.95rem;
    width: calc(100% - 2rem);
  }

  .arch__bay {
    height: 22.5rem;
    mask-image: linear-gradient(90deg, #000 0%, #000 88%, transparent 100%);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .arch__world {
    height: 22.5rem;
    min-width: 56rem;
    transform: rotateX(8deg);
  }

  .arch__bay::after {
    color: rgba(232, 212, 168, 0.42);
    content: "左右滑 · 看完三座群岛";
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    pointer-events: none;
    position: absolute;
    right: 0.8rem;
    top: 0.6rem;
  }

  .arch__title {
    font-size: 1.32rem;
  }

  .arch__dock {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .isle__3d,
  .arch__glint,
  .arch__world {
    animation: none;
    transition: none;
  }
}
