/* shore: spillregler flyttet ut av styles.css 11. oktober 2026, i samme rekkefølge.
   Lastes rett etter styles.min.css på universet.html. */
.shore-game::before {
  content: "";
  position: absolute;
  right: 5%;
  bottom: -70px;
  width: 230px;
  height: 130px;
  border: 20px solid rgba(17, 106, 141, 0.08);
  border-radius: 50%;
  pointer-events: none;
}
.shore-game__head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  margin-bottom: 22px;
}
.shore-game__head h3 {
  margin: 10px 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}
.shore-game__head p {
  max-width: 760px;
  margin-bottom: 0;
}
.shore-game__score > span:first-child,
.shore-game__score em {
  display: block;
  color: #ffe38c;
  font-family: var(--font-title);
  font-style: normal;
  font-weight: 700;
}
.shore-game__score strong {
  display: block;
  margin: 2px 0;
  font-family: var(--font-title);
  font-size: 1.2rem;
}
.shore-game__progress {
  display: block;
  height: 10px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}
.shore-game__progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff816c, #ffe16f);
  transition: width 260ms ease;
}
.shore-game__toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 12px 14px 12px 18px;
  border: 3px solid rgba(255, 255, 255, 0.86);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 10px 22px rgba(18, 59, 83, 0.12);
  backdrop-filter: blur(8px);
}
.shore-game__targets-wrap,
.shore-game__targets {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.shore-game__targets-wrap > strong {
  font-family: var(--font-title);
  white-space: nowrap;
}
.shore-game__target {
  display: inline-flex;
  gap: 7px;
  min-height: 42px;
  padding: 6px 12px 6px 8px;
  align-items: center;
  border: 2px solid rgba(17, 106, 141, 0.22);
  border-radius: 999px;
  background: var(--white);
  color: var(--fjord-deep);
  font-family: var(--font-title);
  font-weight: 700;
  box-shadow: 0 5px 12px rgba(18, 59, 83, 0.12);
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}
.shore-game__target b {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  background: #fff2bd;
  font-size: 1.15rem;
}
.shore-game__target b img,
.shore-stone__discovery img {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px rgba(18, 59, 83, 0.3)) saturate(1.1);
}
.shore-game__target b.has-image {
  padding: 2px;
  background: radial-gradient(circle, #fff7d3 0 43%, rgba(246, 196, 83, 0.35) 62%, transparent 72%);
}
.shore-game__target.is-found {
  background: var(--leaf);
  color: var(--white);
  transform: translateY(-2px);
}
.shore-game__target.is-found::after {
  content: "✓";
  font-weight: 900;
}
.shore-game__sound {
  min-width: 104px;
  min-height: var(--tap);
  padding: 8px 14px;
  border: 2px solid var(--fjord);
  border-radius: 999px;
  background: var(--white);
  color: var(--fjord-deep);
  font-family: var(--font-title);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.shore-game__sound[aria-pressed="true"] {
  background: var(--fjord);
  color: var(--white);
}
.shore-game__sound:focus-visible {
  outline: 4px solid var(--fjord-deep);
  outline-offset: 3px;
}
.shore-game__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 15% 24%, rgba(255, 255, 255, 0.72) 0 3px, transparent 4px),
    radial-gradient(circle at 78% 32%, rgba(255, 255, 255, 0.55) 0 5px, transparent 6px),
    radial-gradient(circle at 52% 73%, rgba(255, 255, 255, 0.45) 0 4px, transparent 5px);
  background-size: 145px 125px, 190px 160px, 170px 145px;
  pointer-events: none;
}
.shore-game__stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 111, 143, 0.08), rgba(7, 66, 91, 0.42));
}
.shore-game__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.3) contrast(1.07) brightness(0.92);
}
.shore-game__stage-badge {
  position: absolute;
  z-index: 5;
  top: 18px;
  left: 50%;
  min-width: 180px;
  padding: 9px 18px;
  border: 3px solid var(--white);
  border-radius: 999px;
  background: var(--plum);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(18, 59, 83, 0.28);
  font-family: var(--font-title);
  font-weight: 800;
  text-align: center;
  transform: translateX(-50%);
}
.shore-stone {
  position: absolute;
  top: var(--shore-top);
  left: var(--shore-left);
  z-index: 2;
  width: 96px;
  height: 82px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}
.shore-stone:disabled {
  opacity: 1;
  cursor: default;
}
.shore-stone::before {
  content: "";
  position: absolute;
  inset: 8px 3px;
  z-index: 2;
  border: 4px solid rgba(255, 255, 255, 0.88);
  border-radius: 58% 42% 52% 48% / 49% 58% 42% 51%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.5), transparent 24%),
    linear-gradient(145deg, #c0aa8b, #685a53 75%);
  box-shadow: 0 11px 0 rgba(18, 59, 83, 0.18), 0 16px 22px rgba(18, 59, 83, 0.34);
  transition: transform 280ms cubic-bezier(.2, .8, .2, 1), box-shadow 220ms ease;
  pointer-events: none;
}
.shore-stone--2::before,
.shore-stone--6::before {
  background:
    radial-gradient(circle at 66% 30%, rgba(255, 239, 174, 0.36), transparent 20%),
    linear-gradient(145deg, #c7b27c, #6f664f 78%);
}
.shore-stone--3::before,
.shore-stone--7::before {
  background:
    radial-gradient(circle at 34% 35%, rgba(207, 244, 221, 0.32), transparent 18%),
    linear-gradient(145deg, #91aaa0, #425d5c 78%);
}
.shore-stone::after {
  content: "";
  position: absolute;
  inset: -6px;
  z-index: 0;
  border: 3px dashed rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}
.shore-stone:hover::after,
.shore-stone:focus-visible::after {
  opacity: 1;
  transform: scale(1);
}
.shore-stone:focus-visible {
  outline: 5px solid var(--sun);
  outline-offset: 4px;
}
.shore-stone__discovery {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 1;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 3px solid var(--white);
  border-radius: 50%;
  background: rgba(255, 248, 232, 0.96);
  box-shadow: 0 8px 18px rgba(18, 59, 83, 0.26);
  font-size: 2rem;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.35);
  transition: opacity 180ms ease 100ms, transform 260ms cubic-bezier(.2, .8, .2, 1) 90ms;
  pointer-events: none;
}
.shore-stone__discovery.has-image {
  width: 78px;
  height: 78px;
  padding: 3px;
  border: 0;
  background: radial-gradient(circle, rgba(255, 249, 214, 0.98) 0 40%, rgba(246, 196, 83, 0.5) 60%, transparent 73%);
  box-shadow: none;
  filter: none;
}
.shore-game__discovery {
  position: absolute;
  z-index: 9;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(88%, 440px);
  padding: clamp(14px, 2.5vw, 22px);
  grid-template-columns: clamp(118px, 28vw, 168px) 1fr;
  gap: 18px;
  align-items: center;
  color: var(--fjord-deep);
  border: 6px solid rgba(255, 255, 255, 0.98);
  border-radius: 30px;
  background: linear-gradient(145deg, #fff8d8, #ffe287 54%, #d6f4ec);
  box-shadow: 0 24px 54px rgba(6, 45, 62, 0.46), 0 0 0 7px rgba(246, 196, 83, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -46%) scale(0.82) rotate(-1deg);
  transition: opacity 180ms ease, transform 280ms cubic-bezier(.18, .84, .28, 1.18);
}
.shore-game__discovery.is-showing {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(0);
}
.shore-game__discovery-art {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  padding: 8px;
  place-items: center;
  border-radius: 28px;
  background: radial-gradient(circle, #fffef1, #ffd66b 58%, #e96f5d 100%);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.74), 0 12px 24px rgba(18, 59, 83, 0.18);
}
.shore-game__discovery-art img {
  width: 100%;
  height: 100%;
  background: transparent;
  object-fit: contain;
  filter: drop-shadow(0 8px 8px rgba(18, 59, 83, 0.32)) saturate(1.08);
}
.shore-game__discovery-art > span { font-size: 4.5rem; }
.shore-game__discovery > div:last-child { display: grid; gap: 6px; }
.shore-game__discovery > div:last-child > span { color: #8b3155; font-family: var(--font-title); font-size: 0.82rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.shore-game__discovery strong { font-family: var(--font-title); font-size: clamp(1.5rem, 3.5vw, 2.25rem); line-height: 1; }
.shore-game__discovery p { margin: 0; font-weight: 780; line-height: 1.42; }
.shore-game__heart-line {
  display: block;
  margin-top: 8px;
  padding: 9px 12px;
  border-left: 4px solid var(--sun);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 246, 207, 0.84);
}
.shore-game__heart-line a { color: var(--fjord); font-weight: 900; }
.shore-game__round-result {
  display: block;
  margin-top: 8px;
  color: var(--fjord-deep);
  font-family: var(--font-title);
}
.shore-game__finish .game-finish-card__actions { margin-top: 14px; }
.shore-game__finish .game-finish-card__actions .button { max-width: 720px; white-space: normal; text-align: center; }
.shore-stone.is-open::before {
  transform: translate(-31px, -35px) rotate(-17deg);
  box-shadow: 0 16px 20px rgba(18, 59, 83, 0.26);
}
.shore-stone.is-open .shore-stone__discovery {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.shore-stone.is-treasure .shore-stone__discovery {
  animation: shore-found 520ms ease both;
}
.shore-stone.is-preview::after {
  border-color: var(--sun);
  opacity: 1;
  transform: scale(1);
  animation: shore-preview 850ms ease-in-out infinite alternate;
}
.shore-stone.is-preview::before {
  box-shadow: 0 0 0 5px rgba(246, 196, 83, 0.72), 0 17px 24px rgba(18, 59, 83, 0.32);
}
.shore-stone.is-missed .shore-stone__discovery {
  opacity: 1;
  box-shadow: 0 0 0 6px var(--coral), 0 8px 18px rgba(18, 59, 83, 0.26);
  transform: translate(-50%, -50%) scale(1);
}
.shore-game__stage.is-complete {
  box-shadow: 0 0 0 5px var(--sun), 0 18px 40px rgba(18, 59, 83, 0.2);
}
.shore-game__stage.is-right {
  box-shadow: 0 0 0 7px #74c77c, 0 18px 40px rgba(18, 59, 83, 0.2);
}
.shore-game__stage.is-wrong {
  animation: shore-wrong 300ms ease;
  box-shadow: 0 0 0 7px var(--coral), 0 18px 40px rgba(18, 59, 83, 0.2);
}
.shore-game__footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}
.shore-game__footer p {
  max-width: 700px;
  margin: 0;
  font-weight: 700;
}
.shore-game__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
@keyframes shore-found {
  0% { transform: translate(-50%, -50%) scale(0.35) rotate(-12deg); }
  65% { transform: translate(-50%, -50%) scale(1.18) rotate(5deg); }
  100% { transform: translate(-50%, -50%) scale(1) rotate(0); }
}
@keyframes shore-wrong {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-7px); }
  70% { transform: translateX(7px); }
}
[data-calm="true"] .shore-stone,
[data-calm="true"] .shore-stone::before,
[data-calm="true"] .shore-stone::after,
[data-calm="true"] .shore-stone__discovery,
[data-calm="true"] .shore-game__discovery,
[data-calm="true"] .shore-game__target,
[data-calm="true"] .shore-game__stage,
[data-calm="true"] .shore-game__progress i {
  animation: none !important;
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .shore-stone,
  .shore-stone::before,
  .shore-stone::after,
  .shore-stone__discovery,
  .shore-game__discovery,
  .shore-game__target,
  .shore-game__stage,
  .shore-game__progress i {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 680px) {
  .shore-game {
    padding: 18px 14px;
    border-radius: 28px;
  }
  .shore-game__head {
    grid-template-columns: 1fr;
  }
  .shore-game__score {
    width: 100%;
  }
  .shore-game__toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .shore-game__targets-wrap {
    align-items: flex-start;
    flex-direction: column;
  }
  .shore-game__targets {
    width: 100%;
  }
  .shore-game__target {
    flex: 1 1 120px;
    justify-content: center;
  }
  .shore-game__sound {
    align-self: flex-start;
  }
  .shore-stone {
    width: 66px;
    height: 58px;
  }
  .shore-stone__discovery {
    width: 46px;
    height: 46px;
    font-size: 1.65rem;
  }
  .shore-stone__discovery.has-image { width: 58px; height: 58px; }
  .shore-game__discovery {
    width: min(92%, 350px);
    grid-template-columns: 92px 1fr;
    gap: 12px;
    padding: 12px;
    border-width: 4px;
    border-radius: 22px;
  }
  .shore-game__discovery-art { padding: 5px; border-radius: 19px; }
  .shore-game__discovery strong { font-size: 1.35rem; }
  .shore-game__discovery p { font-size: 0.82rem; }
  .shore-stone.is-open::before {
    transform: translate(-22px, -28px) rotate(-17deg);
  }
  .shore-game__footer {
    align-items: stretch;
    flex-direction: column;
  }
  .shore-game__footer .button {
    width: 100%;
  }
  .shore-game__actions {
    width: 100%;
  }
  .shore-game__actions .button {
    flex: 1 1 160px;
  }
}
.shore-game {
  background:
    radial-gradient(circle at 92% 6%, rgba(246, 196, 83, 0.3) 0 74px, transparent 76px),
    linear-gradient(145deg, #f4f6ec 0%, #d9eeeb 58%, #c4e3e6 100%);
}
.shore-game__stage::before {
  background:
    radial-gradient(circle at 15% 24%, rgba(255, 255, 255, 0.52) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 32%, rgba(255, 255, 255, 0.38) 0 3px, transparent 4px),
    radial-gradient(circle at 52% 73%, rgba(255, 255, 255, 0.32) 0 3px, transparent 4px);
  background-size: 160px 135px, 210px 175px, 190px 155px;
}
.shore-game__stage::after {
  background: linear-gradient(180deg, rgba(6, 78, 102, 0.02), rgba(5, 58, 78, 0.12));
}
.shore-game__backdrop {
  object-position: center;
  filter: saturate(1.04) contrast(1.02) brightness(1.01);
}
.shore-stone {
  width: 108px;
  height: 92px;
}
.shore-stone::before,
.shore-stone--2::before,
.shore-stone--3::before,
.shore-stone--6::before,
.shore-stone--7::before {
  inset: 6px 2px 10px;
  border: 2px solid rgba(255, 255, 255, 0.62);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(33, 44, 40, 0.2)),
    url("../images/generated/games/fjaerastein-tekstur-v01.jpg") center 48% / 150% auto no-repeat;
  box-shadow: inset 9px 10px 16px rgba(255, 255, 255, 0.18), inset -9px -12px 16px rgba(27, 40, 39, 0.2), 0 8px 0 rgba(19, 63, 70, 0.15), 0 14px 22px rgba(15, 49, 61, 0.27);
}
.shore-stone--2::before,
.shore-stone--5::before { filter: hue-rotate(-7deg) brightness(1.08); }
.shore-stone--3::before,
.shore-stone--7::before { filter: hue-rotate(13deg) brightness(0.92); }
.shore-stone--4::before { filter: saturate(0.72) brightness(1.14); }
.shore-stone--2,
.shore-stone--6 { width: 98px; height: 88px; }
.shore-stone--3 { width: 116px; height: 84px; }
.shore-stone--5 { width: 101px; height: 96px; }
.shore-stone--7 { width: 92px; height: 82px; }
.shore-stone--2::before,
.shore-stone--6::before { border-radius: 48% 52% 57% 43% / 58% 47% 53% 42%; }
.shore-stone--3::before,
.shore-stone--7::before { border-radius: 61% 39% 46% 54% / 44% 59% 41% 56%; }
.shore-stone__discovery {
  border-width: 2px;
  background: rgba(255, 251, 232, 0.94);
  box-shadow: 0 0 0 5px rgba(246, 196, 83, 0.35), 0 9px 22px rgba(18, 59, 83, 0.25);
  backdrop-filter: blur(6px);
}
@media (max-width: 650px) {
  .shore-game__backdrop {
    object-position: 51% center;
  }
  .shore-stone {
    width: 68px;
    height: 60px;
  }
  .shore-stone--1 { top: 44% !important; left: 16% !important; }
  .shore-stone--2 { top: 38% !important; left: 50% !important; }
  .shore-stone--3 { top: 45% !important; left: 83% !important; }
  .shore-stone--4 { top: 72% !important; left: 14% !important; }
  .shore-stone--5 { top: 72% !important; left: 39% !important; }
  .shore-stone--6 { top: 70% !important; left: 65% !important; }
  .shore-stone--7 { top: 73% !important; left: 88% !important; }
  .shore-stone--2,
  .shore-stone--6 { width: 64px; height: 58px; }
  .shore-stone--3 { width: 70px; height: 56px; }
  .shore-stone--5 { width: 66px; height: 62px; }
  .shore-stone--7 { width: 61px; height: 55px; }
}
.shore-stone {
  perspective: 360px;
}
.shore-stone::before {
  transform-origin: 18% 82%;
}
.shore-stone.is-open::before {
  transform: translate(-34px, -38px) rotate(-19deg) rotateX(11deg) scale(1.03);
  box-shadow: inset 8px 9px 14px rgba(255, 255, 255, 0.18), 0 21px 26px rgba(18, 59, 83, 0.32);
}
.shore-stone__discovery {
  width: 62px;
  height: 62px;
  border: 3px solid rgba(255, 255, 255, 0.98);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.96), transparent 28%),
    linear-gradient(145deg, #fff4b3, #ffc95f 64%, #e88454);
  box-shadow: 0 0 0 5px rgba(246, 196, 83, 0.38), 0 11px 22px rgba(18, 59, 83, 0.3);
  font-size: 2.15rem;
  filter: saturate(1.14);
}
.shore-game__target b {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  background:
    radial-gradient(circle at 32% 24%, #fffdf0, transparent 30%),
    linear-gradient(145deg, #ffe99b, #f6b34c);
  box-shadow: 0 4px 9px rgba(18, 59, 83, 0.19);
  filter: saturate(1.12);
}
.shore-game__target.is-found b {
  background: rgba(255, 255, 255, 0.2);
}
@media (max-width: 560px) {
  .shore-stone__discovery {
    width: 54px;
    height: 54px;
    font-size: 1.8rem;
  }
}
