:root {
  --bg: #f4f1ea;
  --papel: #ffffff;
  --tinta: #1c2433;
  --suave: #5c6577;
  --linha: #e4dfd4;
  --marca: #1f4e5f;
  --sol: #f2a93b;
  --disp: #2f9e5f;
  --res: #e3a008;
  --vend: #d0453b;
  --sombra: #34507a;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--tinta);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }

.app { display: grid; grid-template-columns: minmax(0, 1fr) 392px; height: 100vh; }
.cena { display: grid; place-items: center; padding: 16px; min-width: 0; }
.palco {
  position: relative;
  width: min(100%, calc((100vh - 32px) * 4 / 3));
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: #dfe8ef;
  box-shadow: 0 12px 40px rgba(28, 36, 51, .16);
  touch-action: pan-y;
  user-select: none;
}
#tela { width: 100%; height: 100%; display: block; cursor: grab; }
#tela.arrastando { cursor: grabbing; }
#tela.sobre { cursor: pointer; }

.marca {
  position: absolute; top: 14px; left: 14px;
  display: flex; gap: 10px; align-items: center;
  background: rgba(255, 255, 255, .92); padding: 8px 14px 8px 10px; border-radius: 12px;
}
.marca svg { width: 30px; height: 30px; }
.marca b { display: block; font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.marca span { display: block; font-size: 12px; color: var(--suave); }
.selo {
  position: absolute; top: 14px; right: 14px;
  background: var(--marca); color: #fff; font-size: 12px; font-weight: 600;
  padding: 7px 12px; border-radius: 999px;
}
.dica {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  background: rgba(28, 36, 51, .78); color: #fff; font-size: 13px; padding: 8px 14px; border-radius: 999px;
  transition: opacity .6s; white-space: nowrap; pointer-events: none;
}
.dica.some { opacity: 0; }
.girar { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 8px; }
.girar button {
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .94); font-size: 24px; line-height: 1; font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.carga {
  position: absolute; left: 14px; bottom: 16px; font-size: 12px; color: var(--suave);
  background: rgba(255, 255, 255, .9); padding: 6px 10px; border-radius: 8px;
}
.carga.pronto { display: none; }
.balao {
  position: absolute; pointer-events: none; transform: translate(-50%, calc(-100% - 14px));
  background: #fff; border-radius: 10px; padding: 8px 12px; font-size: 13px; white-space: nowrap;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}
.balao b { font-weight: 800; }
.balao .st { font-weight: 700; }

.painel {
  background: var(--papel); border-left: 1px solid var(--linha);
  overflow-y: auto; padding: 22px 20px 28px; display: flex; flex-direction: column; gap: 18px;
}
.cabeca h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.cabeca p { margin: 4px 0 14px; color: var(--suave); font-size: 13px; }
.numeros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.numeros div { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.numeros span { display: block; font-size: 11.5px; color: var(--suave); }
.numeros b { display: block; font-size: 18px; font-weight: 800; margin-top: 2px; white-space: nowrap; }
.numeros b small { font-size: 12px; font-weight: 700; color: var(--suave); margin-left: 4px; }
.barra { display: flex; height: 8px; border-radius: 99px; overflow: hidden; margin-top: 12px; background: var(--linha); }
.barra i { display: block; height: 100%; transition: width .4s; }
.barra .d { background: var(--disp); }
.barra .r { background: var(--res); }
.barra .v { background: var(--vend); }

.abas { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border-radius: 12px; padding: 4px; }
.abas button { border: 0; background: none; padding: 9px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--suave); }
.abas button.on { background: #fff; color: var(--tinta); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }

.solctl { display: flex; flex-direction: column; gap: 10px; }
.estacao { display: flex; gap: 6px; flex-wrap: wrap; }
.estacao button {
  border: 1px solid var(--linha); background: #fff; border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600;
}
.estacao button.on { background: var(--sol); border-color: var(--sol); color: #2b1d05; }
.hora { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; }
.hora span { min-width: 58px; }
.hora input { flex: 1; accent-color: var(--sol); }
.solctl p { margin: 0; font-size: 13px; color: var(--suave); }

.legenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--suave); margin-bottom: 10px; }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.grade { display: grid; grid-template-columns: 34px repeat(4, 1fr); gap: 5px; }
.grade .cab { font-size: 11px; color: var(--suave); text-align: center; padding-bottom: 2px; }
.grade .and { font-size: 12px; color: var(--suave); display: grid; place-items: center; font-weight: 600; }
.grade button {
  border: 0; border-radius: 8px; padding: 8px 0; font-weight: 700; font-size: 13px; color: #fff;
  transition: transform .12s, box-shadow .12s;
}
.grade button:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0, 0, 0, .15); }
.grade button.sel { outline: 3px solid var(--tinta); outline-offset: 1px; }
.st-disponivel { background: var(--disp); }
.st-reservado { background: var(--res); color: #2b1d05 !important; }
.st-vendido { background: var(--vend); }
.sol-sim { background: var(--sol); color: #2b1d05 !important; }
.sol-nao { background: var(--sombra); }

.detalhe { border: 1px solid var(--linha); border-radius: 16px; padding: 16px; position: relative; }
.detalhe .fechar { position: absolute; top: 10px; right: 10px; border: 0; background: var(--bg); width: 30px; height: 30px; border-radius: 50%; font-size: 18px; }
.detalhe h2 { margin: 0; font-size: 22px; font-weight: 800; }
.detalhe .sub { margin: 2px 0 10px; color: var(--suave); font-size: 13px; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; color: #fff; }
.preco { font-size: 26px; font-weight: 800; margin: 10px 0 2px; letter-spacing: -.02em; }
.specs { font-size: 13.5px; color: var(--tinta); margin: 0 0 12px; }
.solinfo { background: #fff6e6; border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.solinfo b { font-weight: 800; }
.planta { width: 100%; height: auto; display: block; margin: 4px 0; }
.planta text { font-family: 'Manrope', system-ui, sans-serif; }
.frente { font-size: 12px; color: var(--suave); margin: 0 0 6px; }
.acoes { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.acoes button { border: 0; border-radius: 10px; padding: 9px 12px; font-weight: 700; font-size: 13px; color: #fff; flex: 1; }
.acoes button.on { outline: 3px solid var(--tinta); outline-offset: 1px; }

.rodape { margin-top: auto; font-size: 12.5px; color: var(--suave); }
.rodape p { margin: 8px 0 0; }
.corretor { display: flex; gap: 8px; align-items: center; font-weight: 700; color: var(--tinta); font-size: 14px; }
.corretor input { width: 18px; height: 18px; accent-color: var(--marca); }
.link { border: 0; background: none; padding: 0; color: var(--marca); font-weight: 700; text-decoration: underline; }
.aviso { border-top: 1px solid var(--linha); padding-top: 10px; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; height: auto; }
  .cena { padding: 10px 10px 0; }
  .palco { width: 100%; border-radius: 14px; aspect-ratio: 1 / 1; }
  #tela { object-fit: cover; }
  .selo { display: none; }
  .painel { border-left: 0; padding: 18px 16px 28px; }
  .marca { top: 10px; left: 10px; padding: 6px 10px 6px 8px; }
  .marca svg { width: 24px; height: 24px; }
  .marca b { font-size: 13px; }
  .marca span { font-size: 11px; }
  .dica { bottom: auto; top: 58px; font-size: 12px; }
  .girar { right: 10px; bottom: 10px; }
  .girar button { width: 38px; height: 38px; }
  .carga { left: 10px; bottom: 14px; }
  .numeros b { font-size: 17px; }
}
