/* Lago das Lembranças */
.lake-screen {
  height: calc(100vh - var(--topbar-h));
  min-height: 0;
  padding: 14px 104px 28px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.lake-back {
  position: fixed;
  left: 14px;
  top: calc(var(--topbar-h) + 12px);
  z-index: 50;
  border: 4px solid var(--wood-900);
  background: rgba(58,38,16,.94);
  color: var(--cream-100);
  padding: 7px 10px;
  font: inherit;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(0,0,0,.32);
}

.lake-panel {
  width: min(1180px, 100%);
  margin: 0 auto;
  border: 5px solid var(--wood-900);
  background: rgba(67, 44, 22, .96);
  box-shadow: 0 0 0 4px rgba(0,0,0,.28), 7px 7px 0 rgba(0,0,0,.35);
  padding: 14px;
  position: relative;
}

.lake-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
}

.lake-kicker {
  display: block;
  color: var(--green-400);
  font-size: 19px;
  line-height: 1;
  margin-bottom: 4px;
}

.lake-header h1 {
  margin: 0;
  color: var(--gold-300);
  font-size: clamp(34px, 4vw, 52px);
  line-height: .92;
  text-shadow: 4px 4px 0 var(--shadow-hard);
}

.lake-header p {
  margin: 6px 0 0;
  color: var(--cream-100);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.12;
}

.lake-hud {
  display: grid;
  gap: 6px;
}

.lake-hud span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px;
  border: 3px solid var(--wood-900);
  background: rgba(28,13,5,.70);
  color: var(--cream-100);
  font-size: 19px;
}

.lake-hud b {
  color: var(--gold-300);
}

.lake-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
}

.lake-game-area {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 300px;
  border: 5px solid var(--wood-900);
  background: #16456a;
  box-shadow: 5px 5px 0 rgba(0,0,0,.28);
  overflow: hidden;
}

.lake-phaser-container {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #153f5c;
}

.lake-phaser-container canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  image-rendering: auto;
}

.lake-phaser-error {
  position: absolute;
  inset: 14px;
  z-index: 4;
  display: grid;
  place-items: center;
  text-align: center;
  border: 4px dashed rgba(240,200,64,.62);
  background: rgba(18,8,3,.78);
  color: var(--cream-100);
  padding: 18px;
}

.lake-phaser-error[hidden],
.lake-phaser-error:empty {
  display: none !important;
}

.lake-phaser-error strong {
  display: block;
  color: var(--gold-300);
  font-size: 36px;
  margin-bottom: 8px;
}

.lake-phaser-error p {
  font-size: 22px;
  line-height: 1.25;
}

.lake-side {
  display: grid;
  gap: 9px;
  align-content: start;
}

.lake-side-card,
.lake-status,
.lake-category,
.lake-tutorial {
  border: 4px solid var(--wood-900);
  background: rgba(28,13,5,.72);
  box-shadow: 4px 4px 0 rgba(0,0,0,.24);
}

.lake-side-card {
  padding: 10px;
}

.lake-side-card > strong {
  display: block;
  color: var(--gold-300);
  font-size: 22px;
  margin-bottom: 8px;
}

.lake-categories {
  display: grid;
  gap: 7px;
}

.lake-category {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 8px;
  align-items: center;
  padding: 7px;
}

.lake-category-token {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 3px solid var(--wood-900);
  color: var(--wood-900);
  box-shadow: 2px 2px 0 rgba(0,0,0,.25);
}

.lake-category-token img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(1px 1px 0 rgba(255,255,255,.28));
}

.lake-category strong {
  display: block;
  color: var(--cream-100);
  font-size: 18px;
  line-height: 1;
}

.lake-category span {
  color: var(--gold-300);
  font-size: 16px;
}

.lake-category.is-active {
  outline: 3px solid rgba(240,200,64,.36);
  background: rgba(60,34,12,.82);
}

.lake-category.is-done {
  background: rgba(49,89,38,.78);
}

.lake-status {
  padding: 10px;
  color: var(--cream-100);
  font-size: 19px;
  line-height: 1.16;
}

.lake-pull {
  width: 100%;
  min-height: 54px !important;
  touch-action: none;
}

.lake-pull.is-pulling {
  transform: translateY(2px);
  background: var(--gold-300);
}

.lake-tutorial {
  position: absolute;
  z-index: 30;
  left: 50%;
  top: 50%;
  width: min(640px, calc(100% - 32px));
  transform: translate(-50%, -50%);
  padding: 18px;
  background: rgba(58,38,16,.98);
  text-align: center;
}

.lake-tutorial.is-hidden {
  display: none;
}

.lake-tutorial strong {
  color: var(--gold-300);
  font-size: 34px;
}

.lake-tutorial p {
  color: var(--cream-100);
  font-size: 21px;
  line-height: 1.18;
}

.lake-result {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(18,8,3,.70);
}

.lake-result-card {
  width: min(580px, calc(100% - 34px));
  padding: 24px;
  text-align: center;
  border: 5px solid var(--wood-900);
  background: rgba(75,45,19,.98);
  box-shadow: 8px 8px 0 rgba(0,0,0,.36);
}

.lake-result-card img {
  width: 62px;
  height: 62px;
  object-fit: contain;
}

.lake-result-card h2 {
  color: var(--gold-300);
  font-size: 42px;
  line-height: 1;
  margin: 10px 0;
}

.lake-result-card p {
  font-size: 24px;
  line-height: 1.18;
  color: var(--cream-100);
}

.lake-result-card .gold-button + .gold-button {
  margin-top: 10px;
}

@media (max-width: 1100px) {
  .lake-screen {
    padding-right: 14px;
  }

  .lake-panel {
    width: 100%;
  }
}

@media (max-width: 1000px) {
  .lake-header {
    grid-template-columns: 1fr;
  }

  .lake-layout {
    grid-template-columns: 1fr;
  }

  .lake-game-area {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .lake-screen {
    padding-left: 8px;
    padding-right: 8px;
  }

  .lake-panel {
    padding: 10px;
  }

  .lake-tutorial p,
  .lake-status {
    font-size: 18px;
  }
}


/* Ajustes V2: painel de calibração da elipse do lago */
.lake-debug-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 9px;
  border: 3px dashed rgba(124,255,143,.75);
  background: rgba(11, 34, 20, .78);
  color: #eaffdf;
  font-size: 16px;
}

.lake-debug-panel strong,
.lake-debug-panel button {
  grid-column: 1 / -1;
}

.lake-debug-panel label {
  display: grid;
  gap: 3px;
}

.lake-debug-panel input {
  width: 100%;
  border: 2px solid var(--wood-900);
  background: #fff0bd;
  color: #2a1408;
  padding: 3px 5px;
  font: inherit;
  font-size: 15px;
}

.lake-debug-panel button {
  border: 3px solid var(--wood-900);
  background: #f0c840;
  color: #2a1408;
  padding: 5px 7px;
  font: inherit;
  cursor: pointer;
}


.lake-debug-caption {
  grid-column: 1 / -1;
  color: #7cff8f;
  font-size: 14px;
  opacity: .95;
  margin-top: 2px;
}

.lake-pull.is-pulling {
  filter: brightness(1.08);
  transform: translateY(2px);
}
