:root {
  --paper: #e1e1e1;
  --card: #fafafa;
  --line: #f3f3f3;
  --surface-hover: #f2f2f2;
  --input: #eeeeee;

  --ink: #541e1e;
  --ink-60: #5b6472;
  --white: #ffffff;

  --shadow: #bfbfbf;
  --shadow-input: #cfcfcf;
  --shadow-soft: rgba(163, 177, 198, 0.35);

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

* {
  box-sizing: border-box;
}

.video-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background: var(--card);
}

body {
  margin: 0;
  min-height: 100vh;
  user-select: none
}

main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 56px;
}

.planner {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 40px 32px 32px;
  width: min(100%, 640px);
  height: min(80vh, 760px);
  background: var(--card);
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: 12px 12px 16px var(--shadow),
    -12px -12px 16px var(--white);
}

.planner-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

#monthLabel {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 34px;
  line-height: 1;
  color: var(--ink);
}

.head-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn {
  font-family: var(--font-body);
  font-size: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
  cursor: pointer;
  padding: 7px 10px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-btn {
  line-height: 1;
}

.nav-btn:hover {
  border-color: var(--ink);
}

.nav-btn:focus-visible,
.day:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}

.weekdays span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-60);
  text-align: center;
  padding-bottom: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(0, 1fr);
  gap: 4px;
  flex: 1;
}

.day {
  position: relative;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  text-align: center;
  padding: 6px 6px 0;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--ink);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.day:hover {
  background: var(--paper);
}

.day .num {
  font-family: var(--font-mono);
  font-size: 13px;
}

.day.muted {
  color: var(--ink-60);
  opacity: 0.45;
}

.day.limit {
  background: var(--ink);
  color: var(--white);
}


@media (max-width: 520px) {
  .planner {
    padding: 32px 16px 20px;
  }

  #monthLabel {
    font-size: 26px;
  }

  .grid {
    grid-auto-rows: 56px;
    gap: 3px;
  }
}


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

.planner:hover,
.planner:focus-visible {
  box-shadow:
    inset 4px 4px 8px var(--shadow),
    inset -4px -4px 8px var(--white);

  background: var(--surface-hover);
  filter: none;
}

footer {
  font-family: "Domine", serif;
  color: var(--ink);
  line-height: 1;
  font-size: 0.7em;
  position: fixed;
  bottom: 20px;
  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;
}

.botao-flutuante .lista a {
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-body);
}

.botao-flutuante .item,
.botao-flutuante .item-flut {
  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 var(--white), 8px 8px 15px var(--shadow-soft);
  padding: 12px 15px;
  border-radius: 5px;
}

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

.botao-flutuante button {
  border: none;
  cursor: pointer;
  border-radius: 30px;
  background: var(--surface-hover);
  box-shadow: -8px -8px 15px var(--white), 8px 8px 15px var(--shadow-soft);
  transition: filter 0.8s ease, transform 0.2s ease;
  position: relative;
  padding: 5px;
}

.botao-flutuante button .icon {
  padding: 3px;
  display: flex;
  align-items: center;
  color: var(--ink);
}

.botao-flutuante button:active {
  box-shadow: inset -5px -5px 10px var(--white), inset 5px 5px 10px var(--shadow-soft);
}

/* ---------------- 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: var(--surface-hover);
  border-radius: 20px;

  box-shadow:
    12px 12px 20px var(--shadow),
    -12px -12px 20px var(--white);

  text-align: center;
  color: var(--ink);
  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: var(--input);

  color: var(--ink);
  font-family: "Domine", serif;
  font-size: 13px;

  outline: none;

  box-shadow:
    inset 3px 3px 6px var(--shadow-input),
    inset -3px -3px 6px var(--white);
}

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

#btnDesbloquear {
  margin-top: 18px;

  padding: 11px 22px;

  border-radius: 8px;

  background: var(--surface-hover);
  color: var(--ink);

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

  box-shadow:
    -5px -5px 10px var(--white),
    5px 5px 10px var(--shadow-soft);
}

#btnDesbloquear:active {
  box-shadow:
    inset -3px -3px 6px var(--white),
    inset 3px 3px 6px var(--shadow-soft);
}

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

  font-size: 11px !important;
}