:root {
  color-scheme: dark;
  --ink: #123b35;
  --deep: #0c2928;
  --cream: #fff3db;
  --gold: #eac78e;
  --mint: #a8e4c9;
  --border: rgba(242, 220, 175, 0.2);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--cream);
  background: #0b2423;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 85% 0%, #355a4e 0%, transparent 55%), #0b2423;
}
button,
input {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
}
button:disabled {
  cursor: default;
  opacity: 0.42;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
button svg,
.map-finish svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button:hover:not(:disabled) {
  filter: brightness(1.1);
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
.svg-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.ambient {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 28, 27, 0.94), rgba(7, 28, 27, 0.8)),
    url("/assets/garden.png") center/cover;
  opacity: 0.65;
  pointer-events: none;
}
.app-shell {
  position: relative;
  max-width: 1180px;
  margin: auto;
  padding: 0 48px;
}
.topbar {
  height: 100px;
  display: flex;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  text-decoration: none;
  margin-right: auto;
  font:
    700 23px Georgia,
    serif;
  letter-spacing: -1px;
}
.brand-light {
  font-weight: 400;
  color: var(--mint);
}
.brand small {
  display: block;
  font:
    8px ui-sans-serif,
    system-ui;
  letter-spacing: 3px;
  margin-top: 5px;
  color: #94ada2;
}
.wallet {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #183e36;
  border: 1px solid #47664d;
  border-radius: 24px;
  padding: 8px 17px;
  font-size: 14px;
}
.coin {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe6a6, #b9843a);
  color: #755017;
  width: 24px;
  height: 24px;
  box-shadow: inset 0 0 0 2px #ffe2a85e;
}
.profile-button {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  font-size: 13px;
  color: #d7e1d4;
  max-width: 210px;
}
.profile-button svg {
  width: 26px;
  height: 26px;
  padding: 4px;
  border: 1px solid #aac5a456;
  border-radius: 50%;
}
.profile-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-button.offline svg {
  border-color: #e0a95f;
  border-style: dashed;
}
.sync-note {
  font-size: 13px;
  color: #c7d4bd;
}
.map-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 37px 0 27px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.8px;
  color: var(--gold);
  font-weight: 650;
}
h1 {
  font:
    normal 53px/1.08 Georgia,
    serif;
  letter-spacing: -1.3px;
  margin: 12px 0;
}
h1 em {
  font-weight: normal;
  color: var(--mint);
}
.map-heading p {
  font-size: 13px;
  color: #a2b9ae;
  margin: 18px 0 0;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #22473c96;
  color: var(--gold);
}
.landscape {
  position: relative;
  max-width: 760px;
  height: 730px;
  margin: auto;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid #c6b98e66;
  box-shadow: 0 25px 60px #0005;
  background: #446155;
}
.map-art {
  position: absolute;
  inset: 0;
  background: url("/assets/garden.png") center/cover;
}
.map-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    #0a282961,
    transparent 18%,
    transparent 80%,
    #0b302cdb
  );
}
.map-title {
  position: absolute;
  z-index: 2;
  top: 23px;
  left: 25px;
  right: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-shadow: 0 1px 5px #000;
}
.chapter-chip {
  border: 1px solid #ffefd27a;
  border-radius: 20px;
  padding: 8px 12px;
  background: #17392e70;
}
.level-trail {
  position: absolute;
  inset: 65px 0 80px;
}
.level-node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid #e3c58b;
  box-shadow:
    0 5px 0 #876642,
    0 8px 14px #0005,
    inset 0 0 0 4px #e9c99730;
  background: radial-gradient(circle at 30% 20%, #fcdf9a, #be934e);
  color: #305044;
  font-weight: 800;
  font-size: 17px;
  transition: filter 0.2s;
}
.level-node:active:not(:disabled) {
  transform: translate(-50%, -48%);
}
.level-node.locked {
  opacity: 0.88;
  background: #173e38c9;
  color: #d3dbbf9c;
  border-color: #8da691;
  box-shadow:
    0 4px 0 #183c34,
    0 5px 8px #0003;

  font-size: 13px;
}
.level-node.completed {
  background: radial-gradient(circle at 30% 20%, #bcf1c3, #398977);
  color: #0e493e;
  border-color: #d9eec2;
}
.level-node.current {
  width: 57px;
  height: 57px;
  outline: 1px solid #fff7ce8c;
  outline-offset: 7px;
  box-shadow:
    0 5px 0 #84603a,
    0 0 32px #ffdaa280,
    inset 0 0 0 4px #fff2cf30;
}
.level-node.current::after {
  content: "DEIN NÄCHSTER SCHRITT";
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: #153d36f2;
  border: 1px solid #a0bb8b77;
  border-radius: 14px;
  font-size: 8px;
  letter-spacing: 1px;
  padding: 7px 10px;
  color: #ffedc4;
  pointer-events: none;
}
.map-finish {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 15px;
  text-align: center;
  display: flex;
  gap: 5px;
  flex-direction: column;
  align-items: center;
  color: #d4e0c9;
}
.map-finish span {
  font:
    20px Georgia,
    serif;
}
.map-finish small {
  font-size: 10px;
  color: #a6baae;
}
.map-bottom {
  max-width: 760px;
  margin: 24px auto 0;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
}
.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  background: linear-gradient(135deg, #f4dca5, #ddb474);
  color: #263f32;
  font-weight: 700;
  font-size: 13px;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow:
    0 3px 0 #a77f46,
    0 5px 20px #0002;
}
.primary-button span {
  font-size: 19px;
}
.life-display {
  display: grid;
  grid-template-columns: 24px 20px auto;
  align-items: center;
  gap: 6px;
}
.life-display > span,
.tiny-heart {
  color: #f5988e;
}
.life-display small {
  color: #a5bdb0;
  font-size: 10px;
  margin-left: 8px;
}
.map-note {
  text-align: center;
  color: #809c90;
  font-size: 10px;
  letter-spacing: 0.4px;
  margin: 25px 0;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding: 22px 0;
  color: #7f9a8f;
  font-size: 9px;
  letter-spacing: 1px;
  margin-top: 40px;
}
.site-footer > span:first-child {
  letter-spacing: 3px;
}
.fireflies {
  pointer-events: none;
  position: absolute;
  inset: 0;
}
.fireflies i {
  position: absolute;
  top: 30%;
  left: 14%;
  height: 3px;
  width: 3px;
  background: #fff0b2;
  box-shadow: 0 0 10px 3px #ffe594;
  border-radius: 50%;
  animation: float-light 8s infinite alternate;
}
.fireflies i:nth-child(2) {
  top: 55%;
  left: 77%;
  animation-delay: -2s;
}
.fireflies i:nth-child(3) {
  top: 75%;
  left: 46%;
  animation-delay: -5s;
}
.fireflies i:nth-child(4) {
  top: 20%;
  left: 63%;
  animation-delay: -3s;
}
.fireflies i:nth-child(5) {
  top: 85%;
  left: 20%;
  animation-delay: -7s;
}
@keyframes float-light {
  from {
    transform: translate(0, 0);
    opacity: 0.2;
  }
  to {
    transform: translate(25px, -40px);
    opacity: 1;
  }
}
body.playing {
  overflow: hidden;
}
.playing .app-shell {
  height: 100dvh;
  max-width: 680px;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
}
.playing .topbar {
  height: 68px;
  flex: none;
}
.playing main {
  flex: 1;
  min-height: 0;
}
.playing .site-footer {
  display: none;
}
.game-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.game-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 4px 5px;
  flex: none;
}
.game-heading h2 {
  font:
    22px Georgia,
    serif;
  margin: 5px 0;
  color: #e5ead4;
}
.game-heading .eyebrow {
  font-size: 9px;
}
.attempt-clock {
  margin-left: auto;
  text-align: right;
  font:
    22px Georgia,
    serif;
  color: #e6d7b9;
  font-variant-numeric: tabular-nums;
}
.attempt-clock small {
  display: block;
  font: 10px system-ui;
  color: #9eb7a8;
  margin-top: 6px;
}
.game-board {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.basket-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.basket-control {
  position: absolute;
  pointer-events: auto;
  background: transparent;
  border: 0;
  border-radius: 11px;
  padding: 0;
  touch-action: manipulation;
}
.basket-control:disabled {
  pointer-events: none;
}
.basket-control:focus-visible {
  outline: 2px solid #fff8d4;
  outline-offset: -2px;
}
.play-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 8px 0;
  flex: none;
}
.perk-button {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 6px;
  background: linear-gradient(160deg, #315d4e, #183d36);
  border: 1px solid #95b79055;
  border-radius: 16px;
  padding: 10px 12px 8px;
  width: 127px;
  box-shadow: 0 3px 0 #0b2521;
  color: #d8e7c8;
}
.perk-button > svg {
  width: 26px;
  height: 26px;
  color: #efd6a2;
}
.perk-button > span {
  font-size: 10px;
}
.perk-button strong {
  position: absolute;
  right: 7px;
  top: 5px;
  font-size: 11px;
  color: #f1d59c;
}
.speed-button {
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font:
    700 22px Georgia,
    serif;
  color: #d9c295;
  width: 44px;
}
.speed-button small {
  font: 8px system-ui;
  letter-spacing: 1px;
}
.speed-button.fast {
  color: #b1f3d2;
  text-shadow: 0 0 20px #a4f3d68c;
}
.game-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 35px;
  font-size: 9px;
  color: #a2baac;
  gap: 8px;
  padding-bottom: env(safe-area-inset-bottom);
}
.game-footer > span:nth-child(2) {
  text-align: center;
}
.sound-button {
  display: grid;
  place-items: center;
  background: transparent;
  padding: 3px;
  color: #9db9aa;
}
.sound-button svg {
  width: 17px;
  height: 17px;
}
.sound-button.muted {
  opacity: 0.4;
}
.board-message {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #123b35ed;
  border: 1px solid #d4b87d88;
  color: #f4e6c8;
  text-align: center;
  border-radius: 18px;
  padding: 18px;
  width: 80%;
  font-size: 13px;
  box-shadow: 0 15px 40px #0005;
}
dialog {
  color: #e8edda;
  background: linear-gradient(145deg, #214c43, #0f302d);
  border: 1px solid #a3b28b77;
  border-radius: 24px;
  padding: 35px 28px 28px;
  max-width: 420px;
  width: calc(100% - 36px);
  box-shadow: 0 30px 100px #0009;
}
dialog::backdrop {
  background: #061c1cc2;
}
dialog h2 {
  font:
    32px/1.1 Georgia,
    serif;
  margin: 12px 0 14px;
  color: #fff1cf;
}
dialog p {
  font-size: 13px;
  line-height: 1.7;
  color: #b8cec0;
}
dialog .eyebrow {
  font-size: 9px;
}
dialog .close-modal {
  position: absolute;
  right: 14px;
  top: 10px;
  background: transparent;
  color: #b4c9b8;
  font: 26px Georgia;
  padding: 3px 8px;
}
dialog label {
  display: block;
  font-size: 10px;
  letter-spacing: 1px;
  color: #bfcdaf;
  margin: 20px 0 8px;
}
dialog input {
  width: 100%;
  color: #eef0dc;
  background: #0b2c28;
  border: 1px solid #718c6a80;
  border-radius: 10px;
  padding: 13px;
  outline: none;
}
dialog input:focus {
  border-color: #ecd196;
}
dialog .primary-button {
  width: 100%;
  margin-top: 22px;
}
.secondary-button {
  background: transparent;
  border: 1px solid #a1b38b55;
  border-radius: 10px;
  padding: 12px;
  color: #c7d4bd;
  font-size: 12px;
  margin-top: 12px;
  width: 100%;
}
.recovery-code {
  display: block;
  overflow-wrap: anywhere;
  letter-spacing: 2px;
  color: #efdcaa;
  background: #0b2c28;
  border: 1px dashed #8f9d6c;
  padding: 15px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.8;
  user-select: all;
}
.result-orb {
  font-size: 47px;
  color: #f0cb78;
  text-align: center;
  text-shadow: 0 0 30px #ffcc7366;
  margin-bottom: 8px;
}
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}
.result-grid > div {
  border: 1px solid #9eb88c40;
  border-radius: 12px;
  padding: 15px;
  background: #123c33;
  text-align: center;
}
.result-grid small {
  font-size: 9px;
  color: #a2bfae;
  display: block;
  margin-bottom: 7px;
}
.result-grid strong {
  font: 23px Georgia;
  color: #f4ddb1;
}
.bonus-line {
  border: 1px solid #d4ad6790;
  background: #d6b26215;
  padding: 13px;
  border-radius: 10px;
  text-align: center;
  font-size: 12px;
  color: #efd39a;
}
.ranking-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #d6d9ac20;
  align-items: center;
  font-size: 12px;
}
.ranking-row > span:first-child {
  color: #bfac7d;
}
.ranking-row strong {
  color: #ead4a3;
}
.ranking-row.me {
  color: #aff0ce;
}
.ranking-list {
  max-height: 50vh;
  overflow: auto;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 15px);
  max-width: 90%;
  padding: 13px 20px;
  background: #e9d6ad;
  color: #173d31;
  border-radius: 12px;
  box-shadow: 0 8px 35px #0006;
  font-size: 12px;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: 0.2s;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.loading-flower {
  font-size: 40px;
  display: block;
  text-align: center;
  color: #e9ce94;
  animation: spin 5s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 900px) {
  .map-screen {
    display: grid;
    grid-template-columns: 1fr 540px;
    gap: 0 40px;
  }
  .map-heading {
    grid-column: 1;
    grid-row: 1;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 26px;
    margin: 25px 0;
  }
  .landscape {
    grid-column: 2;
    grid-row: 1/4;
    width: 100%;
    height: 680px;
    margin-top: 30px;
  }
  .map-bottom {
    grid-column: 1;
    grid-row: 2;
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
    width: 100%;
    gap: 25px;
    margin: 0;
  }
  .map-note {
    grid-column: 1;
    grid-row: 3;
    text-align: left;
    margin-top: 30px;
    font-size: 10px;
  }
  .map-heading h1 {
    font-size: 56px;
  }
  .map-heading p {
    max-width: 220px;
    line-height: 1.8;
  }
  .map-screen {
    padding-bottom: 10px;
  }
  .site-footer {
    margin-top: 35px;
  }
  .playing .brand {
    font-size: 21px;
  }
}
@media (max-width: 600px) {
  .app-shell {
    padding: 0 20px;
  }
  .topbar {
    height: 78px;
    gap: 12px;
  }
  .brand {
    font-size: 19px;
    gap: 5px;
  }
  .brand img {
    width: 31px;
    height: 31px;
  }
  .brand small {
    font-size: 6px;
    letter-spacing: 2px;
  }
  .wallet {
    padding: 6px 10px;
    gap: 6px;
    font-size: 12px;
  }
  .coin {
    width: 20px;
    height: 20px;
  }
  .profile-button {
    max-width: 105px;
    gap: 5px;
    font-size: 10px;
    padding: 0;
  }
  .profile-button svg {
    width: 24px;
    height: 24px;
    flex: none;
  }
  .map-heading {
    margin: 25px 0 20px;
  }
  h1 {
    font-size: 38px;
  }
  .map-heading p {
    font-size: 10px;
    margin-top: 12px;
  }
  .map-heading .icon-button {
    width: 38px;
    height: 38px;
  }
  .landscape {
    height: 760px;
    border-radius: 18px;
  }
  .map-title {
    left: 15px;
    right: 15px;
    top: 18px;
    font-size: 8px;
    letter-spacing: 0.8px;
  }
  .chapter-chip {
    padding: 7px 9px;
  }
  .level-trail {
    top: 70px;
    bottom: 90px;
  }
  .level-node {
    width: 40px;
    height: 40px;
    font-size: 15px;
  }
  .level-node.current {
    width: 49px;
    height: 49px;
  }
  .level-node.current::after {
    top: 61px;
    font-size: 7px;
  }
  .map-bottom {
    gap: 10px;
    flex-wrap: wrap;
  }
  .map-bottom .primary-button {
    font-size: 12px;
    gap: 15px;
    padding: 14px 17px;
  }
  .life-display {
    min-width: 150px;
    grid-template-columns: 18px 1fr;
    gap: 4px;
  }
  .life-display small {
    grid-column: 1/3;
    margin: 0;
    font-size: 8px;
  }
  .site-footer {
    font-size: 7px;
    margin-top: 25px;
  }
  .playing .app-shell {
    padding: 0 12px;
  }
  .playing .topbar {
    height: 58px;
    gap: 10px;
    padding-top: env(safe-area-inset-top);
  }
  .playing .brand {
    font-size: 17px;
  }
  .playing .brand img {
    width: 27px;
  }
  .playing .brand small {
    display: none;
  }
  .playing .profile-button {
    max-width: 105px;
  }
  .game-heading {
    gap: 12px;
    padding: 9px 4px 0;
  }
  .game-heading h2 {
    font-size: 18px;
  }
  .game-heading .icon-button {
    width: 33px;
    height: 33px;
  }
  .game-heading .eyebrow {
    font-size: 8px;
  }
  .attempt-clock {
    font-size: 18px;
  }
  .attempt-clock small {
    font-size: 8px;
  }
  .play-controls {
    gap: 23px;
    padding: 5px 0;
  }
  .perk-button {
    width: 111px;
    padding: 8px 8px 6px;
    border-radius: 13px;
  }
  .perk-button > svg {
    width: 23px;
    height: 23px;
  }
  .perk-button > span {
    font-size: 9px;
  }
  .game-footer {
    font-size: 8px;
    min-height: 28px;
  }
  .game-footer > span:nth-child(2) {
    max-width: 205px;
  }
  .map-art {
    background-size: auto 100%;
    background-position: center;
  }
  .site-footer > span:last-child {
    letter-spacing: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fireflies {
    display: none;
  }
  * {
    scroll-behavior: auto !important;
  }
}
/* Keep the moving board on a light compositor surface on mobile Safari. */
.playing .ambient {
  background: radial-gradient(ellipse at 50% 20%, #47745855, transparent 65%);
}
#modal-feedback {
  color: #ffe0ab;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
