* { margin: 0; padding: 0; box-sizing: border-box; user-select: none; -webkit-user-select: none; }

body {
  background-color: #000;
  font-family: 'Syne', 'Syne', sans-serif;
  color: #f7f709;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 32px 16px;
}

main {
  max-width: 760px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ── Canvas ── */
.beta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}
.testing-canvas {
  width: 100%;
  display: flex;
  justify-content: center;
}

#beta-canvas {
  width: 100%;
  height: auto;
  display: block;
  cursor: default;
}

#foto-input { display: none; }

/* ── Controls row ── */
.controls {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  gap: 0;
  margin-top: 6px;
}

/* shared */
.controls button,
.ctrl-input-wrap {
  height: 44px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 2px solid #f7f709;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* UPLOAD */
#btn-foto {
  background-color: #f7f709;
  color: #000;
  padding: 0 16px;
  border-color: #f7f709;
  flex: 0 0 auto;
  min-width: 90px;
  white-space: nowrap;
}
#btn-foto:hover { background-color: #e6e600; }

/* Input wrappers */
.ctrl-input-wrap {
  flex: 1;
  position: relative;
  background-color: #000;
  border-color: #f7f709;
  cursor: text;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  margin-left: -2px;
}

.ctrl-input-wrap label {
  display: block;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  color: #f7f709;
  text-transform: uppercase;
  padding: 4px 10px 0;
  line-height: 1;
  pointer-events: none;
}

.ctrl-input-wrap input,
.ctrl-input-wrap input[type="date"] {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: #f7f709;
  text-transform: uppercase;
  padding: 2px 10px 4px;
  caret-color: #f7f709;
  -webkit-text-fill-color: #f7f709;
  color-scheme: dark;
  user-select: text;
  -webkit-user-select: text;
}

.ctrl-input-wrap input::placeholder {
  color: rgba(247, 247, 9, 0.35);
  -webkit-text-fill-color: rgba(247, 247, 9, 0.35);
}

.ctrl-input-wrap input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px #000 inset;
  -webkit-text-fill-color: #f7f709;
}

/* DOWNLOAD */
#btn-download {
  background-color: #f7f709;
  color: #000;
  border-color: #f7f709;
  flex: 0 0 auto;
  width: 48px;
  margin-left: -2px;
}
#btn-download:hover { background-color: #e6e600; }
#btn-download svg { stroke: #000; }

/* ── Tablet (max 600px) ── */
@media (max-width: 600px) {
  body { padding: 12px 10px; }

  .controls {
    flex-wrap: wrap;
    gap: 0;
  }

  #btn-foto {
    flex: 1 1 auto;
    min-width: unset;
    margin-bottom: -2px;
  }

  #btn-download {
    flex: 0 0 48px;
    margin-left: -2px;
    margin-bottom: -2px;
  }

  /* DOB and tweet each take half the row */
  .ctrl-input-wrap {
    flex: 1 1 45%;
    margin-left: 0;
    margin-top: -2px;
  }

  #dob-wrap  { margin-right: -2px; }
}

/* ── Mobile (max 400px) ── */
@media (max-width: 400px) {
  .ctrl-input-wrap { flex: 1 1 100%; }
  #dob-wrap { margin-right: 0; margin-bottom: -2px; }
}

/* ── Custom date picker popup ── */
#cal-popup {
  position: fixed;
  background: #000;
  border: 2px solid #f7f709;
  padding: 14px;
  width: 260px;
  z-index: 9999;
  font-family: 'Syne', sans-serif;
  color: #f7f709;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 6px;
}

.cal-header button {
  background: transparent;
  border: none;
  color: #f7f709;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 4px 6px;
  text-transform: uppercase;
}
.cal-header button:hover { color: #f7f709; opacity: 0.7; }

#cal-month-year {
  flex: 1;
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  border: 1px solid #f7f709 !important;
  padding: 4px 6px !important;
}

.cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: rgba(247,247,9,0.5);
  margin-bottom: 4px;
}

#cal-popup.mode-my .cal-dow { display: none; }

.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-days button {
  background: transparent;
  border: none;
  color: #f7f709;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 5px 0;
  cursor: pointer;
  text-align: center;
}
.cal-days button:hover:not(:disabled) { background: #f7f709; color: #000; }
.cal-days button:disabled { color: rgba(247,247,9,0.2); cursor: default; }
.cal-days button.cal-today { outline: 1px solid #f7f709; }
.cal-days button.cal-selected { background: #f7f709; color: #000; }
.cal-days button.cal-empty { visibility: hidden; pointer-events: none; }

#cal-clear {
  margin-top: 10px;
  width: 100%;
  background: transparent;
  border: 1px solid #f7f709;
  color: #f7f709;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  padding: 5px;
  cursor: pointer;
  text-transform: uppercase;
}
#cal-clear:hover { background: #f7f709; color: #000; }

#dob-display { cursor: pointer; }

/* ── Month/year picker ── */
.cal-year-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  margin-bottom: 8px;
}

.cal-year-grid button {
  background: transparent;
  border: none;
  color: #f7f709;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 5px 2px;
  cursor: pointer;
  text-align: center;
}
.cal-year-grid button:hover { background: #f7f709; color: #000; }
.cal-year-grid button.cal-selected { background: #f7f709; color: #000; }

.cal-month-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.cal-month-grid button {
  background: transparent;
  border: none;
  color: #f7f709;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 7px 2px;
  cursor: pointer;
  text-align: center;
}
.cal-month-grid button:hover:not(:disabled) { background: #f7f709; color: #000; }
.cal-month-grid button:disabled { color: rgba(247,247,9,0.2); cursor: default; }
.cal-month-grid button.cal-selected { background: #f7f709; color: #000; }

/* ── Footer links ── */
.footer-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: #f7f709;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-transform: uppercase;
  padding: 2px 4px;
}
.footer-links a:hover {
  background-color: #f7f709;
  color: #000;
  text-decoration: none;
}

.footer-sep {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  color: #f7f709;
  opacity: 0.5;
}

/* ── Logo ── */
.logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.site-logo {
  height: 32px;
  width: auto;
  display: block;
}

@media (max-width: 600px) {
  .site-logo { height: 24px; }
}
