.bg {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100%;
  z-index: -1;
  overflow: hidden;
  background: #fafafa;
}

:root {
  --board: #F2F2F2;
  --board-borda: #E1E1E1;
  --flap: #E8E8E8;
  --flap-light: #FFF;
  --flap-line: #FFF;
  --flap-text: #FFF;
  --amber: #541E1E;
  --label: #541E1E;

  --font-flap: "Domine", sans-serif;
  --font-mono: "Chonburi", monospace;
}

* {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
  .flap-inner {
    transition: none !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: radial-gradient(circle at 50% 0%, #2b2823, #0f0e0c 75%);
  font-family: var(--font-mono);
  user-select: none
}

.board {
  position: relative;
  width: 400px;
  max-width: 460px;
  border-radius: 18px;
  padding: 22px 22px 26px;
  background-color: var(--board);
  border-radius: 20px;
  box-shadow: 12px 12px 16px #bfbfbf,
    -12px -12px 16px #ffffff;
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.board-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--label);
}

.brand-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 6px 1px rgba(177, 134, 134, 0.7);
}

.board-time {
  font-size: 11px;
  color: var(--label);
  letter-spacing: 0.12em;
}

.flap {
  position: relative;
  background: var(--flap);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 3px 6px -2px rgba(0, 0, 0, 0.6);
  perspective: 240px;
}


.flap-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.61, 0, 0.39, 1);
}

.flap.flipping .flap-inner {
  transform: rotateX(-180deg);
}

.flap-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  backface-visibility: hidden;
  color: var(--label);
  font-family: var(--font-flap);
  text-align: center;
  padding: 2px 6px;
}

.flap-face.front {
  transform: rotateX(0deg);
  background: linear-gradient(180deg, var(--flap-light), var(--flap));
}

.flap-face.back {
  transform: rotateX(180deg);
  background: linear-gradient(180deg, var(--flap-light), var(--flap));
}

.location-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.loc-btn {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid #3a362f;
  background: var(--board);
  color: var(--label);
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.loc-btn:hover {
  color: var(--amber);
  border-color: var(--amber);
}

.loc-btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.location-flap {
  flex: 1;
  height: 40px;
}

.location-flap .flap-face {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.condition-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
}

.condition-icon svg {
  width: 100%;
  height: 100%;
}

.hero-flap {
  height: 78px;
}

.hero-flap .flap-face {
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.condition-flap {
  height: 78px;
  width: 108px;
}

.condition-flap .flap-face {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.3;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.stat-label {
  margin: 0 0 6px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--label);
  text-align: center;
}

.stat-flap {
  height: 40px;
}

.stat-flap .flap-face {
  font-size: 14px;
  font-weight: 600;
}

.forecast-label {
  margin: 0 0 8px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--label);
}

.forecast-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.forecast-flap {
  height: 84px;
}

.forecast-flap .flap-face {
  gap: 3px;
}

.forecast-day {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--label);
  text-transform: uppercase;
}

.forecast-icon {
  width: 20px;
  height: 20px;
  color: var(--amber);
}

.forecast-icon svg {
  width: 100%;
  height: 100%;
}

.forecast-temps {
  font-size: 12px;
  font-weight: 600;
}

.forecast-temps .lo {
  color: var(--label);
  font-weight: 500;
}

@media (max-width: 420px) {
  .hero-flap .flap-face {
    font-size: 34px;
  }

  .condition-flap {
    width: 88px;
  }

  .forecast-row {
    gap: 5px;
  }

  .forecast-flap {
    height: 76px;
  }

  .forecast-temps {
    font-size: 10.5px;
  }
}

.board {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.board:hover,
.board:focus-visible {
  box-shadow:
    inset 4px 4px 8px #bfbfbf,
    inset -4px -4px 8px #ffffff;

  background: #f2f2f2;
  filter: none;
}

footer {
  margin: 20px;
  font-family: "Domine", serif;
  color: #541e1e;
  line-height: 1;
  font-size: 0.7em;
  position: fixed;
  bottom: 0;
  height: 30px;
  width: 100%;
  text-align: center;
  padding: 10px 0;
}

.botao-flutuante {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.botao-flutuante .lista {
  display: none;
  position: absolute;
  bottom: 60px;
  right: 0;
  flex-direction: column;
  gap: 10px;
  min-width: 180px;
}

.botao-flutuante .lista.aberto {
  display: flex;
}

.icon {
  color: #541e1e;
}

.item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  background-color: rgba(242, 242, 242, 0.95);
  box-shadow: -8px -8px 15px white, 8px 8px 15px rgba(163, 177, 198, .35);
  padding: 12px 15px;
  border-radius: 5px;
}

a {
  text-decoration: none;
  color: #541e1e;
  font-family: "Domine", serif;
}

.botao {
  display: flex;
}

button {
  border: none;
  cursor: pointer;
  border-radius: 30px;
  background: #f2f2f2;
  box-shadow: -8px -8px 15px white, 8px 8px 15px rgba(163, 177, 198, .35);
  transition: filter 0.8s ease, transform 0.2s ease;
  position: relative;
  padding: 5px;
}

button .icon {
  padding: 3px;
  display: flex;
  align-items: center;
}

#butao:active {
  box-shadow: inset -5px -5px 10px white, inset 5px 5px 10px rgba(163, 177, 198, .35);
}

/* ---------------- BLOQUEIO DE ACESSO ---------------- */

.bloqueio-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(242, 242, 242, 0.65);
  backdrop-filter: blur(8px);
}

.bloqueio-card {
  width: 50%;
  max-width: 420px;
  min-width: 300px;

  padding: 35px 30px;

  background: #f2f2f2;
  border-radius: 20px;

  box-shadow:
    12px 12px 20px #bfbfbf,
    -12px -12px 20px #ffffff;

  text-align: center;
  color: #541e1e;
  font-family: "Domine", serif;
}

.bloqueio-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.bloqueio-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.bloqueio-card p {
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.5;
}

.bloqueio-card label {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  text-align: left;
}

#codigoAcesso {
  width: 100%;
  padding: 12px;

  border: none;
  border-radius: 8px;

  background: #eeeeee;

  color: #541e1e;
  font-family: "Domine", serif;
  font-size: 13px;

  outline: none;

  box-shadow:
    inset 3px 3px 6px #cfcfcf,
    inset -3px -3px 6px #ffffff;
}

#codigoAcesso:focus {
  box-shadow:
    inset 3px 3px 6px #cfcfcf,
    inset -3px -3px 6px #ffffff,
    0 0 0 2px rgba(84, 30, 30, 0.15);
}

#btnDesbloquear {
  margin-top: 18px;

  padding: 11px 22px;

  border-radius: 8px;

  background: #f2f2f2;
  color: #541e1e;

  font-family: "Domine", serif;
  font-size: 12px;

  box-shadow:
    -5px -5px 10px #ffffff,
    5px 5px 10px rgba(163, 177, 198, 0.35);
}

#btnDesbloquear:active {
  box-shadow:
    inset -3px -3px 6px #ffffff,
    inset 3px 3px 6px rgba(163, 177, 198, 0.35);
}

.mensagem-acesso {
  min-height: 18px;
  margin-top: 14px !important;
  margin-bottom: 0 !important;

  font-size: 11px !important;
}