:root {
  --green: #1b7d4a;
  --green-dark: #145c36;
  --red: #c62828;
  --pink: #ff5fa2;
  --gold: #fdd835;
  --cream: #fffaf2;
  --night: #0f1b2b;
  --app-bg-color: #0f1b2b;
  --app-bg: radial-gradient(circle at 15% 20%, rgba(255, 111, 183, 0.35), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(255, 111, 183, 0.25), transparent 45%),
    radial-gradient(circle at top, #0f1b2b, #0b1a2a 70%) fixed;
  --shadow: rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--app-bg);
  background-color: var(--app-bg-color);
  color-scheme: dark;
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

body {
  margin: 0;
  font-family: 'Nunito', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--cream);
  min-height: 100vh;
  background: var(--app-bg);
  background-color: var(--app-bg-color);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--app-bg);
  background-color: var(--app-bg-color);
  pointer-events: none; /* keep interactions unaffected */
}

.experience-wrapper {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 2rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.app-shell {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.panel {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 111, 183, 0.35);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.panel h1,
.panel h2 {
  margin-top: 0;
  color: var(--pink);
}

.intro-text,
.hint-text {
  color: rgba(255, 255, 255, 0.85);
}

.hint-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hint-row .info-container {
  margin-left: auto;
}

.info-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.info-icon {
  position: relative;
  top: -2rem;
  width: 2.3rem;
  height: 2.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 1.1rem;
  color: var(--cream);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.info-popup {
  position: absolute;
  top: 130%;
  left: 0;
  width: min(360px, 80vw);
  background: rgba(10, 16, 33, 0.95);
  color: rgba(255, 255, 255, 0.95);
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 111, 183, 0.45);
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.55);
  line-height: 1.5;
  font-size: 0.95rem;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.info-popup p {
  margin: 0;
}

.info-popup[hidden] {
  display: none;
}

.footer-info {
  width: 100%;
  justify-content: center;
}

.site-footer .info-container {
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.site-footer .info-popup {
  position: static;
  margin-top: 0.75rem;
  width: min(520px, 100%);
  text-align: center;
}

.info-toggle-arrow {
  display: inline-block;
  margin-left: 0.35rem;
  transition: transform 0.2s ease;
  font-size: 0.95rem;
}

.info-icon[aria-expanded="true"] .info-toggle-arrow {
  transform: rotate(180deg);
}

.site-footer {
  margin: 2rem auto 15rem;
  text-align: center;
  font-family: 'VT323', 'Share Tech Mono', 'Courier New', monospace;
  font-size: 1.35rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.08em;
  text-shadow: 0 0 12px rgba(255, 95, 162, 0.35);
}

.emoji-garland {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(255, 95, 162, 0.08);
  border: 1px dashed rgba(255, 95, 162, 0.4);
  line-height: 1.8;
  font-size: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: center;
}

.emoji-garland.small {
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  margin-bottom: 0;
}

.ios-pwa-prompt {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(15px);
  width: min(420px, calc(100% - 2rem));
  padding: 1.25rem 1.5rem 1.5rem;
  background: rgba(11, 26, 42, 0.95);
  border: 1px solid rgba(255, 111, 183, 0.35);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  line-height: 1.5;
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.ios-pwa-prompt.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.ios-pwa-prompt__close {
  position: absolute;
  top: 0.4rem;
  right: 0.35rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.45rem;
  cursor: pointer;
}

.ios-pwa-prompt__title {
  margin: 0 0 0.5rem;
  font-weight: 700;
  color: var(--pink);
  font-size: 1.05rem;
}

.ios-pwa-prompt__text {
  margin: 0 0 1rem;
}

.ios-pwa-prompt__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 0.15rem;
}

.ios-pwa-prompt__action {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: linear-gradient(120deg, var(--pink), var(--red));
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(255, 95, 162, 0.35);
}

.ios-pwa-prompt[hidden] {
  display: none;
}

/* duplicate block removed for consistency */

.welcome {
  color: var(--pink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

label {
  font-weight: 600;
}

input {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: none;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.9);
}

button {
  cursor: pointer;
  border: none;
  border-radius: 14px;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05));
  color: var(--cream);
}

button:active {
  transform: scale(0.97);
}

#login-form button {
  margin-top: 0.5rem;
  background: linear-gradient(135deg, var(--pink), var(--red));
  color: #fff;
  box-shadow: 0 10px 25px rgba(255, 95, 162, 0.4);
}

#login-screen {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
}

.login-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.login-copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.login-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.login-actions .gate-button {
  margin-top: 0;
}

@media (min-width: 768px) {
  .login-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .login-copy {
    padding-right: 1.5rem;
  }

  .login-actions {
    padding-left: 1.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
  }
}

#login-screen .intro-text {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.7;
}

#login-screen h1 {
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  line-height: 1.2;
  word-break: break-word;
}

#login-screen .info-container {
  flex-wrap: wrap;
  width: 100%;
}

#login-screen .info-popup {
  width: min(420px, 90vw);
}

#login-screen input,
.login-actions button,
.login-actions form button {
  width: 100%;
}

#login-form {
  margin-top: 0;
}

#username {
  color: black;
}
#password {
  color: black;
}

.login-actions form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0;
}

.gate-button {
  width: 100%;
  margin-top: 1rem;
  background: linear-gradient(120deg, var(--pink), var(--gold));
  color: #2b0f0f;
  box-shadow: 0 15px 30px rgba(255, 95, 162, 0.35);
}

.gate-button.hidden {
  display: none;
}

#login-form.collapsed {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  pointer-events: none;
}

.error-message {
  min-height: 1.2em;
  color: var(--pink);
}

.hidden {
  display: none !important;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.ghost-button {
  background: transparent;
  border: 2px solid rgba(255, 95, 162, 0.8);
  color: var(--pink);
  box-shadow: inset 0 0 10px rgba(255, 95, 162, 0.3);
}

.ghost-button:hover {
  background: rgba(255, 95, 162, 0.15);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ambient-controls {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  width: min(100%, 640px);
  z-index: 40;
  padding: 0.75rem 1rem;
  border-radius: 24px;
  background: rgba(15, 27, 43, 0.75);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
}

.ambient-controls button {
  flex: 1;
  min-width: 120px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.ambient-controls button.active {
  background: linear-gradient(135deg, var(--pink), var(--gold));
  color: #2b0f0f;
}

.ambient-toggle {
  display: none;
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.6rem 1.75rem;
  border-radius: 16px;
  border: none;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(255, 95, 162, 0.95), rgba(255, 190, 92, 0.95));
  color: #2b0f0f;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
  z-index: 42;
  cursor: pointer;
  letter-spacing: 0.03em;
}

.day-card {
  position: relative;
  border-radius: 12px;
  border: 2px solid rgba(255, 95, 162, 0.25);
  padding: 1.5rem 1rem;
  text-align: center;
  min-height: 140px;
  background: linear-gradient(
    150deg,
    rgba(255, 95, 162, 0.25),
    rgba(255, 255, 255, 0.05)
  );
  color: var(--cream);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.door-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 0.75rem;
  font-size: 2.8rem;
  line-height: 1;
}

.day-number {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.day-card.available:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
}

.day-card.locked {
  opacity: 0.4;
  filter: grayscale(0.6);
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.1);
}

.day-card.today {
  border-color: var(--pink);
  box-shadow: 0 0 30px rgba(255, 95, 162, 0.45);
}

.day-card.opened {
  background: linear-gradient(
    150deg,
    rgba(255, 95, 162, 0.3),
    rgba(27, 125, 74, 0.3)
  );
  border-color: rgba(255, 95, 162, 0.35);
}

.day-status {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.8);
  min-height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.day-status-opened {
  color: var(--pink);
}

.day-card .opened-label {
  color: var(--pink);
  display: inline-flex;
  font-size: 1.4rem;
  line-height: 1;
}

.modal {
  position: relative;
  background: linear-gradient(#142236, #142236) padding-box,
    linear-gradient(130deg, #ff4d6d, #ff77a9, #2ad168, #ffd15c) border-box;
  border-radius: 16px;
  padding: 2rem;
  width: min(600px, 90vw);
  max-height: 90vh;
  overflow-y: auto;
  border: 3px solid transparent;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  animation: modal-border-shift 6s linear infinite;
  background-size: 250% 250%;
}

.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.modal__body {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .modal {
    min-height: min(720px, 90vh);
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .modal__body {
    flex: 1;
    justify-content: center;
  }
}

#modal-title {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.35;
}

#modal-close {
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 1.25rem;
  border-radius: 12px;
  border: 2px solid rgba(255, 95, 162, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pink);
  box-shadow: 0 10px 25px rgba(255, 95, 162, 0.25);
}

#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
}

#modal-overlay.hidden {
  pointer-events: none;
  opacity: 0;
}

#modal-image {
  width: min(480px, 95%);
  border-radius: 10px;
  margin: 0.5rem auto 1.25rem;
  display: block;
}

#modal-video-container iframe,
#modal-video-container video {
  width: 100%;
  margin-top: 1rem;
  border-radius: 10px;
  border: none;
}

#modal-text,
#scratch-prize-text {
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: center;
  margin-top: 0;
}

.scratch-card {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  width: 100%;
}

.scratch-card__canvas-wrapper {
  position: relative;
  width: min(520px, 100%);
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 30, 0.35);
}

.scratch-underlay {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
}

.scratch-underlay--concealed {
  visibility: hidden;
}

#scratch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  border-radius: inherit;
  transition: opacity 0.6s ease;
}

#scratch-canvas.scratch-canvas--cleared {
  opacity: 0;
  pointer-events: none;
}

.scratch-hint {
  margin-top: 0.85rem;
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  background: rgba(14, 24, 42, 0.85);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
  align-self: center;
}

.scratch-card__content {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: fade-in 0.45s ease forwards;
  width: min(520px, 100%);
}

.scratch-card__content img {
  width: min(360px, 85%);
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
}

.scratch-card--finished .scratch-card__canvas-wrapper {
  display: none;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#snow-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

#snow-bank-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  transition: opacity 0.6s ease;
  touch-action: none;
}

#snow-bank-canvas.is-visible {
  opacity: 0.85;
}

.snowflake {
  position: absolute;
  top: -10px;
  animation: snowfall linear forwards;
  font-size: 1.2rem;
  opacity: 0.8;
  --snow-drift: 0px;
  --snow-spin: 0deg;
}

#data-warning {
  margin-top: 0.5rem;
}

@keyframes snowfall {
  0% {
    transform: translate3d(0, -5vh, 0) rotate(0deg);
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--snow-drift), 110vh, 0) rotate(var(--snow-spin));
    opacity: 0;
  }
}

.santa {
  position: fixed;
  top: 10%;
  left: -80px;
  font-size: 2.5rem;
  z-index: 20;
  animation: santa-flight 12s linear forwards;
}

.tree {
  position: fixed;
  top: 65%;
  right: -80px;
  font-size: 2.2rem;
  z-index: 12;
  animation: tree-flight 15s linear forwards;
}

.music-player {
  position: relative;
  width: min(90vw, 560px);
  margin: 0 auto;
  background: rgba(10, 16, 33, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.55);
  z-index: 10;
  backdrop-filter: blur(8px);
  max-height: 320px;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease, width 0.3s ease;
}

.music-player__header {
  margin-bottom: 0.75rem;
}

.music-player__header p {
  margin: 0;
  font-weight: 600;
}

.music-player__controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.music-player audio {
  width: 100%;
}

.music-next {
  margin-top: 0.75rem;
  align-self: flex-end;
  border: none;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transform: translateY(-4px);
  transition: transform 0.2s ease;
}

.music-next img {
  width: 64px;
  height: 64px;
}

.emoji-burst {
  position: absolute;
  pointer-events: none;
  z-index: 50;
}

.emoji-burst span {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 2rem;
  animation: emoji-pop var(--duration, 1.3s) ease forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes emoji-pop {
  0% {
    transform: translateX(0) translateY(0) scale(0.5);
    opacity: 1;
  }
  100% {
    transform: translate(var(--offset-x, 0px), var(--offset-y, -140px)) rotate(var(--rotation, 0deg)) scale(1.25);
    opacity: 0;
  }
}

.music-effect {
  position: fixed;
  inset: 10% 5% auto 5%;
  height: 40vh;
  background: radial-gradient(circle, rgba(255, 95, 162, 0.28), transparent 60%);
  filter: blur(20px);
  animation: pulse-halo 4s ease-in-out infinite;
  opacity: 0;
  pointer-events: none;
  z-index: 30;
  transition: opacity 0.5s ease;
}

.music-effect.active {
  opacity: 1;
}

.gif-wall {
  width: min(1100px, 95vw);
  margin: 2.5rem auto 5rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 95, 162, 0.2);
  background: rgba(10, 16, 33, 0.6);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.3);
  display: none;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.gif-wall.is-visible {
  display: flex;
}

.gif-tile {
  padding: 0.4rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gif-tile img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

@keyframes modal-border-shift {
  0% {
    background-position: 0% 50%;
    box-shadow: 0 0 8px rgba(255, 77, 142, 0.5);
  }
  50% {
    background-position: 100% 50%;
    box-shadow: 0 0 14px rgba(255, 119, 169, 0.55);
  }
  100% {
    background-position: 0% 50%;
    box-shadow: 0 0 10px rgba(255, 77, 109, 0.5);
  }
}

@keyframes santa-flight {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(110vw);
  }
}

@keyframes tree-flight {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-120vw);
  }
}

.music-player.hidden,
#music-effect.hidden {
  display: none;
}

@keyframes pulse-halo {
  0% {
    transform: scale(0.9);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
  100% {
    transform: scale(0.9);
    opacity: 0.4;
  }
}

.day-card.opening {
  animation: door-pop 0.45s ease;
}

@keyframes door-pop {
  0% {
    transform: scale(0.95);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@media (min-width: 640px) {
  .calendar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .calendar-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  body {
    font-size: 18px;
  }
}

@media (max-width: 600px) {
  .panel {
    padding: 1.5rem;
  }

  .login-layout {
    gap: 1rem;
  }

  .login-copy,
  .login-actions {
    padding: 0;
    border: none;
  }

  #login-screen {
    width: 100%;
  }

  #login-form {
    gap: 0.65rem;
  }

  #login-screen .intro-text {
    font-size: 1rem;
  }

  #login-screen .info-container {
    align-items: flex-start;
    flex-direction: column;
  }

  #login-screen .info-popup {
    position: static;
    width: 100%;
    margin-top: 0.5rem;
    left: 0;
  }

  .hint-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .hint-row .info-container {
    margin-left: 0;
  }

  body {
    font-size: 15px;
  }

  h1 {
    font-size: 1.7rem;
  }

  .day-card {
    min-height: 98px;
    padding: 0.75rem 0.5rem;
  }

  .door-icon {
    width: 48px;
    height: 48px;
    font-size: 2.2rem;
    margin-bottom: 0.35rem;
  }

  .day-number {
    font-size: 1.4rem;
  }

  .day-status {
    font-size: 0.8rem;
  }

  .calendar-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .calendar-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }

  .ambient-controls {
    flex-direction: column;
    width: min(90vw, 360px);
    border-radius: 16px;
    padding: 1rem;
    bottom: 4.75rem;
    transform: translate(-50%, 120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .ambient-controls.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
  }

  .ambient-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: min(88vw, 360px);
  }

}
