/* Abyss Lure: the whole page is the deep sea. The hero shows the real tank running in a phone,
   and the bestiary lights up a shadow when it is tapped. */
.app-abyss-lure { --flow-bg: #031012; --glow: rgba(127, 232, 196, 0.5); --shine: #c8ffe9; --mq-dot: #7fe8c4; }
.app-abyss-lure ::selection { background: #7fe8c4; color: #04110f; }

/* ── Hero ── */
.al-hero .ap-icon { box-shadow: 0 0 0 1px rgba(127, 232, 196, 0.25), 0 18px 50px rgba(0, 0, 0, 0.6); }
.al-hero h1 { text-shadow: 0 0 40px rgba(127, 232, 196, 0.25); }
.al-hero .ap-tagline { color: #a6f3d8; }
.al-motes { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.al-motes i {
  position: absolute; left: var(--x); bottom: -12px; width: var(--s); height: var(--s); border-radius: 50%;
  background: #c8ffe9; box-shadow: 0 0 8px 2px rgba(127, 232, 196, 0.6); opacity: 0;
  animation: al-rise var(--t) linear var(--d) infinite;
}
@keyframes al-rise {
  0% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: var(--o); }
  70% { opacity: var(--o); }
  100% { transform: translate(18px, -105svh); opacity: 0; }
}

.al-stage { position: relative; display: grid; place-items: center; pointer-events: auto; }
.al-lampglow {
  position: absolute; left: 50%; top: 72%; width: min(130%, 720px); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle, rgba(160, 255, 220, 0.28) 0, rgba(79, 220, 176, 0.1) 35%, transparent 65%);
  pointer-events: none;
}
.al-phone {
  position: relative; width: min(330px, 78vw); aspect-ratio: 540 / 1170; margin: 0;
  border-radius: 46px; padding: 10px; background: #0b1416;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.6), 0 40px 90px rgba(0, 0, 0, 0.65), 0 0 120px rgba(79, 220, 176, 0.18);
}
.al-phone video { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 37px; background: #06181a; }

/* ── The bestiary: shadows that light up ── */
.al-dex-section {
  background:
    radial-gradient(ellipse 50% 40% at 50% 0, rgba(79, 220, 176, 0.08), transparent 70%),
    var(--paper);
}
.al-dex-wrap { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(20px, 3vw, 40px); align-items: start; margin-top: clamp(32px, 4vw, 56px); }
.al-dex { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(6px, 1vw, 12px); padding: 0; list-style: none; }
.al-shadow {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 1; padding: 8%;
  border: 0; border-radius: 18px; cursor: pointer;
  background: radial-gradient(circle at 50% 60%, rgba(127, 232, 196, 0.05), transparent 70%), #081619;
  box-shadow: inset 0 0 0 1px var(--rule);
  transition: box-shadow 300ms ease, background 600ms ease, transform 200ms var(--ease-spring);
}
.al-shadow img { width: 100%; height: auto; transition: filter 700ms ease, transform 700ms var(--ease-out); }
/* Until it is lit, a creature is only its outline in the dark (with no script, every creature shows) */
.js .al-shadow:not(.is-lit) img { filter: brightness(0) drop-shadow(0 0 1px rgba(127, 232, 196, 0.55)) drop-shadow(0 0 6px rgba(127, 232, 196, 0.15)); }
.al-shadow.is-lit { background: radial-gradient(circle at 50% 60%, rgba(127, 232, 196, 0.2), transparent 70%), #0b2024; }
.al-shadow.is-current { box-shadow: inset 0 0 0 2px #7fe8c4, 0 0 24px rgba(127, 232, 196, 0.25); }
@media (hover: hover) {
  .al-shadow:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(127, 232, 196, 0.5); }
  .al-shadow.is-current:hover { box-shadow: inset 0 0 0 2px #7fe8c4, 0 0 24px rgba(127, 232, 196, 0.25); }
  .js .al-shadow:not(.is-lit):hover img { filter: brightness(0) drop-shadow(0 0 1.5px rgba(127, 232, 196, 0.9)) drop-shadow(0 0 10px rgba(127, 232, 196, 0.35)); }
}
.al-shadow:active { transform: scale(0.95); }

.al-note { display: none; }
.js .al-note {
  display: block; position: sticky; top: 24px; padding: clamp(20px, 2.4vw, 30px); border-radius: 24px;
  background: radial-gradient(ellipse 80% 60% at 50% 20%, rgba(127, 232, 196, 0.1), transparent 70%), var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.al-count { display: inline-block; padding: 4px 12px; border-radius: 99px; background: rgba(127, 232, 196, 0.12); color: #a6f3d8; font-size: var(--t-small); font-weight: 800; font-variant-numeric: tabular-nums; }
.al-count.is-done { background: #7fe8c4; color: #04110f; }
.al-note-pic { width: min(180px, 70%); margin: 18px auto 4px; filter: drop-shadow(0 0 24px rgba(127, 232, 196, 0.35)); }
.al-note-pic[hidden] { display: none; }
.al-name { margin-top: 14px; font-family: var(--display); font-size: var(--t-h3); font-weight: 900; color: var(--ink); }
.al-desc { margin-top: 8px; color: var(--muted); }
.al-desc:empty { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .al-shadow.is-new img { animation: al-lit 900ms var(--ease-spring); }
  .al-shadow.is-new::after {
    content: ""; position: absolute; inset: 10%; border-radius: 50%; pointer-events: none;
    box-shadow: 0 0 0 2px rgba(200, 255, 233, 0.9); animation: al-ring 700ms var(--ease-out) forwards;
  }
  .al-note-pic.is-in { animation: al-rise-in 600ms var(--ease-out); }
}
@keyframes al-lit { 0% { transform: scale(0.8); } 45% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes al-ring { from { transform: scale(0.6); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
@keyframes al-rise-in { from { opacity: 0; transform: translateY(16px) scale(0.92); } }

/* ── Download ── */
.app-abyss-lure .dl-name {
  font-size: clamp(3rem, 1.4rem + 6.5vw, 8rem);
  /* The name is a gradient seen through transparent letters, so the page's soft text shadow would show
     through them and grey them out. A drop shadow sits behind the letters instead. */
  text-shadow: none; filter: drop-shadow(0 2px 16px rgba(2, 10, 10, 0.7));
}
.app-abyss-lure .ap-download { background: radial-gradient(ellipse 50% 70% at 85% 100%, rgba(79, 220, 176, 0.2), transparent 70%), #040c0f; }

@media (max-width: 900px) {
  .al-dex-wrap { grid-template-columns: 1fr; }
  .al-dex { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  /* On phones the note rides along at the bottom of the screen while the grid scrolls */
  .js .al-note { position: sticky; top: auto; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 78px); order: 2; padding: 16px 18px; box-shadow: inset 0 0 0 1px var(--rule), 0 -10px 40px rgba(0, 0, 0, 0.6); }
  .al-note-body { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; }
  .al-note-pic { grid-row: span 2; width: 72px; margin: 10px 0 0; }
  .al-name { margin-top: 10px; }
  .al-desc { margin-top: 2px; font-size: var(--t-small); line-height: 1.55; }
}
@media (max-width: 520px) { .al-dex { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ── The whole page is one deep sea ──
   The page is one tall tank: the water behind everything darkens the deeper you scroll. The
   waterline at the top, the light shafts, rock walls, marine snow, the creatures of each depth
   and, at the very bottom, the seabed are drawn by tank.js and move with the page (far things
   slower), so scrolling down is looking further down the tank. */
.al-sea {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 46% at 50% 0, rgba(140, 215, 200, calc(0.24 - var(--depth, 0) * 1.2)), transparent 72%),
    linear-gradient(hsl(178 52% calc(13% - var(--depth, 0) * 9%)), hsl(182 66% calc(7% - var(--depth, 0) * 4.5%)) 70%, hsl(184 70% calc(5% - var(--depth, 0) * 3%)));
}
.al-sea canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.al-sea::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.45)); }

/* Sections lie over the water */
.app-abyss-lure .ap-hero, .app-abyss-lure .ap-section, .app-abyss-lure .ap-screens,
.app-abyss-lure .ap-download, .app-abyss-lure .al-dex-section { background: transparent; }
.app-abyss-lure main { text-shadow: 0 1px 12px rgba(2, 10, 10, 0.65); }
.app-abyss-lure .ap-feature,
.app-abyss-lure .al-note, .app-abyss-lure .al-shop-wrap { background: rgba(8, 24, 27, 0.62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.app-abyss-lure .al-shadow { background: rgba(6, 20, 23, 0.7); }
.app-abyss-lure .al-shadow.is-lit { background: radial-gradient(circle at 50% 60%, rgba(127, 232, 196, 0.2), transparent 70%), rgba(11, 32, 36, 0.8); }

/* The soulfire counter stays in the corner; it leads to the creature list */
.al-hud {
  position: fixed; z-index: 15; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px; padding: 7px 16px 7px 9px; border-radius: 99px; text-decoration: none;
  background: rgba(2, 12, 12, 0.66); box-shadow: inset 0 0 0 1px var(--rule), 0 10px 30px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #e6fff5;
}
.al-hud img { width: 28px; height: 28px; filter: drop-shadow(0 0 6px rgba(127, 232, 196, 0.8)); }
.al-hud b { display: inline-block; font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.al-hud span { font-size: var(--t-small); color: #a6f3d8; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .al-hud:hover { box-shadow: inset 0 0 0 1.5px rgba(127, 232, 196, 0.7), 0 10px 30px rgba(0, 0, 0, 0.5); } }
.al-hint, .al-toast {
  position: fixed; z-index: 15; left: 50%; translate: -50% 0; margin: 0; pointer-events: none; text-align: center;
  max-width: calc(100vw - 32px); padding: 8px 18px; border-radius: 99px; font-weight: 800;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.al-hint { bottom: max(22px, calc(env(safe-area-inset-bottom) + 6px)); background: rgba(2, 12, 12, 0.66); color: #e6fff5; box-shadow: inset 0 0 0 1px var(--rule); }
.al-hint[hidden] { display: none; }
.al-toast { top: 16px; background: rgba(13, 39, 42, 0.85); color: #c8ffe9; font-size: var(--t-small); box-shadow: inset 0 0 0 1px rgba(127, 232, 196, 0.4); opacity: 0; transition: opacity 400ms ease; }
.al-toast.is-on { opacity: 1; }

/* The creature list */
.al-shop-wrap { margin-top: clamp(28px, 4vw, 44px); padding: clamp(16px, 2vw, 24px); border-radius: 24px; box-shadow: inset 0 0 0 1px var(--rule); }
.al-shop-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.al-shop-title { font-size: var(--t-body); font-weight: 800; color: #a6f3d8; }
.al-gather {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 18px 4px 6px; border: 0; border-radius: 99px; cursor: pointer;
  background: #7fe8c4; color: #04110f; font-weight: 800; text-shadow: none; transition: transform 160ms var(--ease-spring);
}
.al-gather img { width: 34px; height: 34px; }
.al-gather:active { transform: scale(0.95); }
.al-shop { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; padding: 0; list-style: none; }
.al-buy {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  width: 100%; padding: 6px 12px 6px 6px; border: 0; border-radius: 14px; cursor: pointer; text-align: left; text-shadow: none;
  background: rgba(6, 20, 23, 0.75); box-shadow: inset 0 0 0 1px var(--rule); color: var(--muted);
  transition: background 200ms ease, box-shadow 200ms ease, transform 160ms var(--ease-spring);
}
.al-buy > img { grid-column: 1; grid-row: 1 / 3; width: 44px; height: 44px; filter: brightness(0.6) saturate(0.6); transition: filter 300ms ease; }
.al-buy-name { grid-column: 2; grid-row: 1; font-weight: 800; font-size: var(--t-small); line-height: 1.3; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-buy-cost { grid-column: 2; grid-row: 2; display: flex; align-items: center; gap: 4px; font-size: var(--t-small); font-variant-numeric: tabular-nums; }
.al-buy-cost img { width: 16px; height: 16px; }
.al-buy-own { grid-row: 1 / 3; grid-column: 3; font-weight: 800; font-size: var(--t-small); color: #a6f3d8; font-variant-numeric: tabular-nums; }
.al-buy.is-ready { background: rgba(13, 39, 42, 0.9); box-shadow: inset 0 0 0 1.5px rgba(127, 232, 196, 0.7); color: #c8ffe9; }
.al-buy.is-ready > img { filter: none; }
.al-buy[aria-disabled="true"] { cursor: default; }
@media (hover: hover) { .al-buy.is-ready:hover { background: rgba(17, 50, 54, 0.95); } }
.al-buy.is-ready:active { transform: scale(0.97); }
.al-reset { margin-left: 4px; padding: 0; border: 0; background: none; color: #a6f3d8; font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
html:not(.js) .al-tank-section, html:not(.js) .al-hud { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .al-hud.is-bump b { animation: al-bump 260ms var(--ease-spring); }
  .al-buy.is-pop { animation: al-pop 420ms var(--ease-spring); }
}
@keyframes al-bump { 40% { transform: scale(1.22); } }
@keyframes al-pop { 30% { transform: scale(1.05); } 60% { transform: scale(0.98); } }

@media (max-width: 1100px) { .al-shop { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  /* On phones the counter and the hint sit just above the download bar */
  .al-hud { left: 10px; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 78px); padding: 5px 14px 5px 7px; }
  .al-hud img { width: 24px; height: 24px; }
  .al-hud b { font-size: 1.0625rem; }
  .al-hint { bottom: calc(max(10px, env(safe-area-inset-bottom)) + 130px); }
  .al-buy { grid-template-columns: 36px minmax(0, 1fr) auto; padding: 6px 8px 6px 4px; }
  .al-buy > img { width: 36px; height: 36px; }
}
.app-abyss-lure .store, .app-abyss-lure .ap-lang, .app-abyss-lure .al-count { text-shadow: none; }
@media (max-width: 900px) { .al-hint { font-size: var(--t-small); white-space: nowrap; padding: 6px 14px; } }
@media (max-width: 560px) { .al-shop { grid-template-columns: 1fr; } }

/* What it does: the trailer beside the list (English video, Japanese for Japanese) */
.al-about { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; margin-top: clamp(36px, 4vw, 56px); }
.al-about .ap-features-grid { margin-top: 0; }
.al-film .trailer { position: relative; border-radius: 28px; box-shadow: 0 0 0 1px rgba(127, 232, 196, 0.35), 0 0 60px rgba(63, 191, 154, 0.22), 0 30px 70px rgba(0, 0, 0, 0.55); }
.al-film .trailer a { position: relative; display: block; border-radius: 28px; overflow: hidden; color: #e6fff5; text-decoration: none; }
.al-film .trailer img, .al-film .trailer iframe { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border: 0; border-radius: 28px; background: #030b0b; }
.al-film .play-icon { background: #7fe8c4; box-shadow: 0 0 0 10px rgba(127, 232, 196, 0.22), 0 0 40px rgba(127, 232, 196, 0.55); }
.al-film .play-icon::after { border-left-color: #06211c; }
.al-film .trailer-label { background: rgba(3, 14, 14, 0.78); }
@media (hover: hover) { .al-film .trailer a:hover .play-icon { scale: 1.08; } }
.al-film .trailer a:focus-visible { outline: 3px solid #7fe8c4; outline-offset: 4px; }
.al-film .trailer a:focus-visible .play-icon { scale: 1.08; }
@media (max-width: 1100px) { .al-about .ap-features-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .al-about { grid-template-columns: minmax(0, 1fr); }
  .al-film { width: min(76%, 300px); justify-self: center; }
}
