/* ══════════════════════════════════════════════════════════════
   نقشهٔ مجمع‌الجزایر (خانه)
   ══════════════════════════════════════════════════════════════ */

.home__head {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(38px, 8vw, 76px) 22px 26px;
  text-align: center;
}

.crest {
  width: 70px;
  height: 70px;
  margin: 0 auto 18px;
  color: var(--accent);
  filter: drop-shadow(0 0 26px color-mix(in srgb, var(--accent) 45%, transparent));
  animation: crestFloat 9s ease-in-out infinite alternate;
}

@keyframes crestFloat {
  from { transform: translateY(-3px); opacity: 0.85; }
  to   { transform: translateY(3px); opacity: 1; }
}

.home__title {
  margin: 6px 0 12px;
  font-size: clamp(2.35rem, 10vw, 3.9rem);
  line-height: 1.25;
  background: linear-gradient(180deg, #fff 30%, color-mix(in srgb, var(--accent) 72%, white));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home__lede {
  max-width: 46ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.95;
}

/* ───────── کارت امتیاز کل ───────── */

.home__score {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  padding: 12px 18px 12px 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  backdrop-filter: blur(12px);
  text-align: start;
}

.home__score .ring span {
  font-size: 0.82rem;
}

.home__score-text {
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

.home__score-text strong {
  font-size: 0.9rem;
  font-weight: 600;
}

.home__score-text span {
  font-size: 0.76rem;
  color: var(--muted);
}

/* ───────── ادامهٔ سفر ───────── */

.continue {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 18px;
  border-radius: 16px;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  font-size: 0.85rem;
  transition: background 0.3s, border-color 0.3s;
}

.continue:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: var(--accent);
}

.continue__label {
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: color-mix(in srgb, var(--accent) 90%, white);
  font-size: 0.72rem;
  white-space: nowrap;
}

.continue__title {
  color: var(--ink);
  opacity: 0.9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.continue__title b {
  opacity: 0.4;
  font-weight: 400;
}

.continue__arrow {
  margin-inline-start: auto;
  color: var(--accent);
}

/* ───────── شبکهٔ کارت‌های جزیره ───────── */

.isles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 18px 34px;
}

@media (min-width: 620px) {
  .isles { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (min-width: 1000px) {
  .isles { grid-template-columns: repeat(4, 1fr); padding-inline: 26px; }
}

.isle {
  --c: var(--accent);
  --c2: var(--accent2);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  box-shadow: var(--shadow);
  isolation: isolate;
  animation: cardIn 0.85s var(--ease) both;
  animation-delay: calc(var(--i) * 90ms + 120ms);
  transition: transform 0.45s var(--ease), border-color 0.45s, box-shadow 0.45s;
}

@keyframes cardIn {
  from { opacity: 0; translate: 0 22px; }
  to   { opacity: 1; translate: 0 0; }
}

.isle--tawhid { --c: #f3d9a4; --c2: #8fe3d2; }
.isle--ahkam  { --c: #e9c79a; --c2: #a8c9b4; }
.isle--gharb  { --c: #9fd8ff; --c2: #c9a8ff; }
.isle--zan    { --c: #ffd9e4; --c2: #ffcf9e; }

.isle:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--c) 42%, transparent);
  box-shadow: 0 34px 70px -30px color-mix(in srgb, var(--c) 35%, #000);
}

.isle__art {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);
  mask-image: linear-gradient(180deg, #000 72%, transparent);
}

.isle__art .scene {
  position: absolute;
  inset: 0;
  transition: scale 0.9s var(--ease);
}

.isle:hover .isle__art .scene,
.isle:hover .isle__art .artimg {
  scale: 1.045;
}

.isle__glow {
  position: absolute;
  inset-inline: -15%;
  bottom: 34%;
  height: 46%;
  z-index: 0;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 30%, transparent), transparent);
  filter: blur(22px);
  opacity: 0.45;
  transition: opacity 0.5s;
  pointer-events: none;
}

.isle:hover .isle__glow {
  opacity: 0.85;
}

.isle__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 2px 17px 17px;
  margin-top: -26px;
}

.isle__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.isle__kicker {
  font-size: 0.71rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--c) 82%, white);
  opacity: 0.92;
}

.isle__pct {
  font-size: 0.68rem;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.isle__name {
  font-size: 1.16rem;
  letter-spacing: -0.01em;
}

.isle__tag {
  font-size: 0.79rem;
  line-height: 1.7;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.isle__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--faint);
}

.isle__meta .dot {
  opacity: 0.5;
}

.isle__go {
  margin-inline-start: auto;
  color: color-mix(in srgb, var(--c) 70%, white);
  font-weight: 600;
  transition: translate 0.35s var(--ease);
}

.isle:hover .isle__go {
  translate: -3px 0;
}

.isle__bar {
  height: 3px;
  margin-top: 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.085);
  overflow: hidden;
}

.isle__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--c2), var(--c));
  transition: width 0.8s var(--ease);
}

/* ───────── پانویس ───────── */

.home__foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 22px 56px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--faint);
}

.home__foot .muted {
  max-width: 44ch;
  color: color-mix(in srgb, var(--ink) 32%, transparent);
  font-size: 0.74rem;
}

.home__head > * {
  animation: headIn 0.7s var(--ease) both;
}

.home__head > *:nth-child(2) { animation-delay: 0.05s; }
.home__head > *:nth-child(3) { animation-delay: 0.1s; }
.home__head > *:nth-child(4) { animation-delay: 0.16s; }
.home__head > *:nth-child(5) { animation-delay: 0.24s; }
.home__head > *:nth-child(6) { animation-delay: 0.3s; }

@keyframes headIn {
  from { opacity: 0; translate: 0 14px; }
  to   { opacity: 1; translate: 0 0; }
}

/* ───────── کارت دانلود نسخهٔ اندروید ───────── */

.apkcard {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--accent2) 34%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent2) 12%, transparent), rgba(255, 255, 255, 0.02));
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}

.apkcard:hover {
  border-color: color-mix(in srgb, var(--accent2) 65%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent2) 18%, transparent), rgba(255, 255, 255, 0.04));
  transform: translateY(-1px);
}

.apkcard__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent2) 40%, transparent);
  background: color-mix(in srgb, var(--accent2) 14%, transparent);
  color: color-mix(in srgb, var(--accent2) 90%, white);
}

.apkcard__icon svg {
  width: 19px;
  height: 19px;
}

.apkcard__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: start;
}

.apkcard__text b {
  font-size: 0.86rem;
}

.apkcard__text i {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--muted);
}

.apkcard__go {
  margin-inline-start: auto;
  padding: 6px 13px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent2) 88%, white);
  color: #06231f;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════
   جزایر گنج — هیرو، نقشه و مرحله‌ها
   ══════════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  max-width: var(--maxw);
  margin: 12px auto 0;
  min-height: 260px;
  border-radius: 26px;
  overflow: hidden;
  isolation: isolate;
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 70px -40px #000;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 16, 24, 0.35) 0%, rgba(4, 16, 24, 0.1) 35%, rgba(4, 16, 24, 0.85) 100%),
    linear-gradient(270deg, rgba(4, 16, 24, 0.7), transparent 60%);
}

.hero__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: flex-end;
  min-height: 260px;
  padding: 20px clamp(16px, 4vw, 26px) 20px;
}

.hero__title {
  font-size: clamp(2rem, 8.5vw, 3.1rem);
  line-height: 1.25;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
}

.hero__lede {
  max-width: 44ch;
  font-size: 0.9rem;
  line-height: 1.9;
  color: color-mix(in srgb, var(--ink) 88%, transparent);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.hero__score {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  align-self: flex-start;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(6, 22, 32, 0.6);
  backdrop-filter: blur(10px);
}

.hero__score .ring span {
  font-size: 0.78rem;
}

.hero__score div {
  display: flex;
  flex-direction: column;
  line-height: 1.55;
}

.hero__score strong {
  font-size: 0.84rem;
}

.hero__score span {
  font-size: 0.72rem;
  color: var(--muted);
}

/* ───────── نقشه ───────── */

.mapsec {
  max-width: 760px;
  margin: 18px auto 0;
  padding: 0 clamp(10px, 3vw, 18px);
}

.mapsec__head {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 0 4px 10px;
}

.mapsec__head h2 {
  font-size: 1.02rem;
}

.mapsec__head p {
  font-size: 0.74rem;
  color: var(--muted);
}

.mapsec__hint {
  margin-inline-start: auto;
  font-size: 0.68rem;
  color: var(--faint);
  white-space: nowrap;
}

.map {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 70px -40px #000, inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.map__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map__route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* گرهٔ جزیره */
.node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% -50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  z-index: 3;
}

.node__pin {
  position: relative;
  width: clamp(46px, 13vw, 66px);
  height: clamp(46px, 13vw, 66px);
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  background: #071a26;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.85), 0 0 0 5px rgba(255, 201, 74, 0.18);
  transition: transform 0.28s var(--ease), box-shadow 0.28s;
}

.node__pin img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.node__pin.is-complete {
  border-color: var(--ok);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.85), 0 0 0 5px rgba(53, 208, 127, 0.28);
}

.node:hover .node__pin {
  transform: scale(1.08) rotate(-2deg);
}

.node__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 4px 9px;
  border-radius: 10px;
  background: rgba(4, 16, 24, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  text-align: center;
  max-width: 44vw;
}

.node__label b {
  font-size: 0.72rem;
  white-space: nowrap;
}

.node__label i {
  font-style: normal;
  font-size: 0.6rem;
  color: var(--muted);
  white-space: nowrap;
}

/* نقطهٔ مرحله */
.stage {
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.75);
  background: rgba(6, 22, 32, 0.82);
  color: rgba(255, 255, 255, 0.85);
  font-size: 9px;
  font-weight: 700;
  z-index: 2;
  animation: stageIn 0.5s var(--ease) both;
  animation-delay: var(--d, 0ms);
  transition: transform 0.2s var(--ease), box-shadow 0.2s;
}

.stage:hover {
  transform: scale(1.35);
  z-index: 5;
}

.stage.is-done {
  border-color: var(--ok);
  background: var(--ok);
  color: #05251a;
  box-shadow: 0 0 14px rgba(53, 208, 127, 0.6);
}

.stage.is-partial {
  border-color: var(--accent);
  background: rgba(255, 201, 74, 0.85);
  color: #241a06;
}

@keyframes stageIn {
  from { opacity: 0; scale: 0.4; }
  to { opacity: 1; scale: 1; }
}

/* صندوق گنج */
.chest {
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% -50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  z-index: 3;
}

.chest img {
  width: clamp(48px, 14vw, 72px);
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.6));
  animation: chestFloat 5s ease-in-out infinite alternate;
}

@keyframes chestFloat {
  from { transform: translateY(-2px); }
  to { transform: translateY(3px); }
}

.chest__label {
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--accent);
  color: #241a06;
  font-size: 0.62rem;
  font-weight: 700;
}

/* فهرست فشردهٔ جزیره‌ها */
.islandrows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 760px;
  margin: 16px auto 0;
  padding: 0 clamp(10px, 3vw, 18px);
}

.irow {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: var(--surface);
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}

.irow:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  background: var(--surface-2);
  transform: translateX(-2px);
}

.irow__thumb {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
}

.irow__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.irow__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.irow__main b {
  font-size: 0.86rem;
}

.irow__main i {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--faint);
}

.irow__bar {
  display: block;
  height: 3px;
  margin-top: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.irow__bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
}

.irow__pct {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}

.continue.is-hidden {
  display: none;
}

@media (min-width: 760px) {
  .map {
    aspect-ratio: 3 / 3.4;
  }
  .node__label b {
    font-size: 0.8rem;
  }
  .stage {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }
}

/* ───────── مرحلهٔ قفل روی نقشه ───────── */

.stage.is-locked {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(6, 16, 24, 0.9);
  color: rgba(255, 255, 255, 0.55);
  font-size: 8px;
  filter: saturate(0.4);
}

.stage.is-locked:hover {
  transform: none;
  cursor: not-allowed;
}
