/* src/index.css */
:root {
  --buncss-light: initial;
  --buncss-dark: ;
  color-scheme: light;
  color: #2d3748;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Noto Sans, Ubuntu, Cantarell, Helvetica Neue, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  overflow-x: hidden;
  background: linear-gradient(#1e3a5f 0%, #2d5a7b 30%, #4a7ba7 60%, #87ceeb 100%);
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

body:before {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 20%, #ffffff1a 0%, #0000 50%), radial-gradient(circle at 80% 80%, #ffffff26 0%, #0000 50%), radial-gradient(circle at 40% 20%, #add8e633 0%, #0000 50%);
  inset: 0;
}

body:after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  clip-path: polygon(0% 15%, 5% 12%, 10% 10%, 15% 8%, 20% 7%, 25% 8%, 30% 10%, 35% 13%, 40% 15%, 45% 16%, 50% 15%, 55% 13%, 60% 10%, 65% 8%, 70% 7%, 75% 8%, 80% 10%, 85% 12%, 90% 14%, 95% 15%, 100% 15%, 100% 100%, 0% 100%);
  background: #fff;
  height: 120px;
  bottom: 0;
  left: 0;
  right: 0;
}

.snow-floor {
  position: fixed;
  z-index: -3;
  pointer-events: none;
  clip-path: polygon(0% 15%, 5% 12%, 10% 10%, 15% 8%, 20% 7%, 25% 8%, 30% 10%, 35% 13%, 40% 15%, 45% 16%, 50% 15%, 55% 13%, 60% 10%, 65% 8%, 70% 7%, 75% 8%, 80% 10%, 85% 12%, 90% 14%, 95% 15%, 100% 15%, 100% 100%, 0% 100%);
  background: #fff;
  height: 120px;
  bottom: 0;
  left: 0;
  right: 0;
}

.snow-floor:before {
  content: "";
  position: absolute;
  background: radial-gradient(200px 30px at 10% 10%, #e0f2fe99 0%, #0000 100%), radial-gradient(250px 35px at 30% 12%, #f0f9ff80 0%, #0000 100%), radial-gradient(180px 28px at 50% 15%, #e0f2fe99 0%, #0000 100%), radial-gradient(220px 32px at 70% 10%, #f0f9ff80 0%, #0000 100%), radial-gradient(200px 30px at 90% 12%, #e0f2fe99 0%, #0000 100%);
  height: 40px;
  top: 0;
  left: 0;
  right: 0;
}

.snowman {
  position: fixed;
  z-index: -2;
  pointer-events: none;
  width: 80px;
  height: 160px;
  bottom: 80px;
  left: 80px;
}

.snowman:before {
  content: "";
  position: absolute;
  background: radial-gradient(circle at 35% 35%, #fff 0%, #f0f9ff 60%, #e0f2fe 100%);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: inset -5px -5px 10px #0000001a, 2px 2px 8px #0003;
}

.snowman:after {
  content: "";
  position: absolute;
  background: radial-gradient(circle at 35% 35%, #fff 0%, #f0f9ff 60%, #e0f2fe 100%);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: inset -3px -3px 8px #0000001a, 2px 2px 8px #0003;
}

.snowman-face {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  text-align: center;
  width: 80px;
  bottom: 140px;
  left: 80px;
}

.snowman-face:before {
  content: "••";
  position: absolute;
  color: #1e3a5f;
  letter-spacing: 10px;
  text-align: center;
  width: 100%;
  font-size: 20px;
  font-weight: bold;
  top: -65px;
  left: 50%;
  transform: translateX(-40%);
}

.snowman-face:after {
  content: "";
  position: absolute;
  border: 2.5px solid #1e3a5f;
  border-top: none;
  border-radius: 0 0 30px 30px;
  width: 18px;
  height: 8px;
  top: -30px;
  left: 50%;
  transform: translateX(-40%);
}

.snowman-nose {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  filter: drop-shadow(1px 1px 2px #0003);
  border-top: 12px solid #ff6b35;
  border-left: 3px solid #0000;
  border-right: 3px solid #0000;
  width: 0;
  height: 0;
  bottom: 170px;
  left: 125px;
  transform: rotate(-90deg);
}

.snowman-tophat {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  width: 60px;
  bottom: 205px;
  left: 90px;
}

.snowman-tophat:before {
  content: "";
  position: absolute;
  background: #1a1a1a;
  border-radius: 4px;
  width: 50px;
  height: 8px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 4px #0000004d;
}

.snowman-tophat:after {
  content: "";
  position: absolute;
  background: #1a1a1a;
  border-radius: 4px 4px 2px 2px;
  width: 35px;
  height: 25px;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: inset -2px -2px 4px #ffffff1a, 2px 2px 6px #0000004d;
}

.snowman-buttons {
  position: fixed;
  z-index: -1;
  display: flex;
  pointer-events: none;
  flex-direction: column;
  gap: 12px;
  bottom: 95px;
  left: 120px;
  transform: translateX(-50%);
}

.snowman-button {
  background: #1e3a5f;
  border-radius: 50%;
  width: 8px;
  height: 8px;
  box-shadow: 1px 1px 3px #0000004d;
}

.app {
  display: flex;
  position: relative;
  z-index: 1;
  justify-content: center;
  align-items:  center;
  min-height: 100vh;
  padding: 2rem;
}

.content {
  text-align: center;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(10px);
  background: #fffffff2;
  border-radius: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  box-shadow: 0 20px 60px #0000004d;
}

.snowflakes {
  position: fixed;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
  inset: 0;
}

.snowflake-physics {
  position: absolute;
  color: #fff;
  user-select: none;
  text-shadow: 0 0 5px #ffffff80;
  opacity: .8;
  will-change: transform;
  font-size: 1em;
}

.title {
  background: linear-gradient(135deg, #c41e3a 0%, #165b33 50%, #c41e3a 100%);
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 4px #0000001a;
  animation: shimmer 3s ease-in-out infinite;
  -webkit-background-clip: text;
  background-clip: text;
  margin: 0 0 1rem;
  padding: .2em 0;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 90%;
}

.pretitle {
  margin: 0;
  font-size: 2.5rem;
}

@keyframes shimmer {
  0%, 100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.2);
  }
}

.subtitle {
  color: #4a5568;
  font-size: 1.25rem;
}

.hero-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature-card {
  background: linear-gradient(135deg, #fff 0%, #f7fafc 100%);
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 2rem;
  transition: transform .3s, box-shadow .3s;
  box-shadow: 0 4px 20px #0000001a;
}

.feature-card:hover {
  border-color: #c41e3a;
  transform: translateY(-8px);
  box-shadow: 0 12px 30px #00000026;
}

.feature-card .icon {
  display: block;
  animation: bounce 2s ease-in-out infinite;
  margin-bottom: 1rem;
  font-size: 3rem;
}

.feature-card:first-child .icon {
  animation-delay: 0s;
}

.feature-card:nth-child(2) .icon {
  animation-delay: .2s;
}

.feature-card:nth-child(3) .icon {
  animation-delay: .4s;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.feature-card h3 {
  color: #2d3748;
  margin: 0 0 .5rem;
  font-size: 1.5rem;
}

.feature-card p {
  color: #718096;
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.cta-button {
  color: #fff;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #c41e3a 0%, #a01729 100%);
  border: none;
  border-radius: 50px;
  padding: 1rem 3rem;
  transition: all .3s;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: 0 4px 15px #c41e3a4d;
}

.cta-button:hover {
  background: linear-gradient(135deg, #d41e3a 0%, #b01729 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px #c41e3a66;
}

.cta-button:active {
  transform: translateY(-1px);
}

.home-actions {
  margin-top: 1rem;
}

.home-text {
  color: #4a5568;
  margin: 1rem 0;
  font-size: 1.1rem;
}

.cta-button {
  color: #fff;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #c41e3a 0%, #a01729 100%);
  border: none;
  border-radius: 50px;
  margin-top: 1rem;
  padding: 1rem 3rem;
  transition: all .3s;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: 0 4px 15px #c41e3a4d;
}

.cta-button:hover {
  background: linear-gradient(135deg, #d41e3a 0%, #b01729 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px #c41e3a66;
}

.cta-button:active {
  transform: translateY(-1px);
}

.auth-container {
  display: flex;
  justify-content: center;
  align-items:  center;
}

.auth-card {
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 2;
  background: #fffffff2;
  border-radius: 24px;
  width: 100%;
  max-width: 450px;
  padding: 3rem;
  box-shadow: 0 20px 60px #0000004d;
}

.auth-card h2 {
  color: #2d3748;
  margin: 0 0 .5rem;
  font-size: 2rem;
}

.auth-subtitle {
  color: #718096;
  margin: 0 0 2rem;
  font-size: 1rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  color: #2d3748;
  margin-bottom: .5rem;
  font-weight: 600;
}

.form-group input {
  box-sizing: border-box;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  width: 100%;
  padding: .75rem 1rem;
  transition: border-color .2s;
  font-size: 1rem;
}

.form-group input:focus {
  outline: none;
  border-color: #c41e3a;
}

.auth-button {
  color: #fff;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #c41e3a 0%, #a01729 100%);
  border: none;
  border-radius: 12px;
  width: 100%;
  padding: 1rem;
  transition: all .3s;
  font-size: 1.1rem;
  font-weight: 700;
}

.auth-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px #c41e3a4d;
}

.auth-button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.error-message {
  color: #c53030;
  background: #fed7d7;
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: .75rem;
  font-size: .9rem;
}

.toast {
  position: fixed;
  z-index: 9999;
  animation: slideIn .3s ease-out;
  border-radius: 12px;
  min-width: 300px;
  padding: 1rem 1.5rem;
  font-weight: 500;
  bottom: 2rem;
  right: 2rem;
  box-shadow: 0 8px 32px #0003;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-content {
  display: flex;
  align-items:  center;
  gap: .75rem;
}

.toast-icon {
  display: flex;
  border-radius: 50%;
  flex-shrink: 0;
  justify-content: center;
  align-items:  center;
  width: 24px;
  height: 24px;
  font-size: 1.25rem;
  font-weight: bold;
}

.toast-message {
  flex: 1;
}

.toast-success {
  color: #155724;
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border-left: 4px solid #28a745;
}

.toast-success .toast-icon {
  color: #fff;
  background: #28a745;
}

.toast-error {
  color: #721c24;
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  border-left: 4px solid #dc3545;
}

.toast-error .toast-icon {
  color: #fff;
  background: #dc3545;
}

.toast-info {
  color: #0c5460;
  background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
  border-left: 4px solid #17a2b8;
}

.toast-info .toast-icon {
  color: #fff;
  background: #17a2b8;
}

.editor-page {
  display: flex;
  position: relative;
  z-index: 2;
  align-items: stretch;
  gap: 2rem;
  width: 100%;
  max-width: 1300px;
  margin: 2rem auto;
}

.editor-sidebar {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 1rem;
  max-width: 500px;
}

.editor-main {
  display: flex;
  flex-direction: column;
  flex: 0 auto;
  width: -moz-fit-content;
  width: fit-content;
  min-width: 0;
  max-width: 100%;
}

.countdown-timer {
  text-align: center;
  background: #fffffff2;
  border-radius: 16px;
  margin-bottom: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 20px #0000001a;
}

.countdown-timer.urgent {
  animation: pulse 2s ease-in-out infinite;
  background: linear-gradient(135deg, #fed7d7 0%, #fff5f5 100%);
  border: 2px solid #c41e3a;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

.countdown-label {
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: .5rem;
  font-size: .9rem;
}

.countdown-time {
  color: #c41e3a;
  margin-bottom: .5rem;
  font-family: monospace;
  font-size: 2rem;
  font-weight: 800;
}

.countdown-date {
  color: #4a5568;
  font-size: .9rem;
}

.deadline-notice {
  color: #c53030;
  text-align: center;
  background: #fed7d7;
  border-radius: 12px;
  margin-bottom: 1rem;
  padding: 1rem;
  font-weight: 600;
}

.welcome-card {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 3px solid #3b82f6;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px #3b82f633;
}

.welcome-title {
  color: #1e40af;
  text-align: center;
  margin: 0 0 1.5rem;
  font-size: 1.75rem;
}

.rules-section {
  margin: 0;
}

.rules-intro {
  color: #1e40af;
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.rules-list {
  background: #fff;
  border-radius: 12px;
  margin: 0;
  padding: 1.5rem 1.5rem 1.5rem 2.5rem;
  box-shadow: 0 2px 10px #3b82f61a;
}

.rules-list li {
  color: #1e40af;
  margin-bottom: .75rem;
  font-size: .95rem;
  line-height: 1.7;
}

.rules-list li:last-child {
  margin-bottom: 0;
}

.rules-list strong {
  color: #c41e3a;
  font-weight: 700;
}

.editor-container {
  overflow: hidden;
  display: flex;
  background: #fffffff2;
  border-radius: 24px;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 20px 60px #0000004d;
}

.editor-header {
  color: #fff;
  display: flex;
  background: linear-gradient(135deg, #c41e3a 0%, #a01729 100%);
  justify-content: space-between;
  align-items:  center;
  padding: 2rem;
}

.editor-title-section h2 {
  margin: 0 0 .5rem;
  font-size: 2rem;
}

.editor-subtitle {
  opacity: .9;
  margin: 0;
  font-size: 1rem;
}

.logout-button {
  color: #fff;
  cursor: pointer;
  background: #fff3;
  border: 2px solid #fff;
  border-radius: 8px;
  padding: .5rem 1.5rem;
  transition: all .2s;
  font-weight: 600;
}

.logout-button:hover {
  color: #c41e3a;
  background: #fff;
}

.editor-tip {
  color: #856404;
  display: flex;
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border-left: 4px solid #ffc107;
  border-radius: 8px;
  align-items:  center;
  gap: .5rem;
  margin: 1rem;
  padding: .875rem 1.25rem;
  font-size: .9rem;
  line-height: 1.5;
}

.editor-tip strong {
  color: #856404;
}

.toolbar {
  display: flex;
  background: #f7fafc;
  border-bottom: 2px solid #e2e8f0;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 1rem;
}

.toolbar-button {
  cursor: pointer;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  min-width: 40px;
  padding: .5rem 1rem;
  transition: all .2s;
  font-size: 1rem;
}

.toolbar-button:hover {
  background: #edf2f7;
  border-color: #c41e3a;
}

.toolbar-button:active {
  transform: scale(.95);
}

.toolbar-divider {
  background: #e2e8f0;
  width: 2px;
  margin: 0 .5rem;
}

.toolbar-select {
  cursor: pointer;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: .5rem;
  transition: border-color .2s;
  font-size: .9rem;
}

.toolbar-select:focus {
  outline: none;
  border-color: #c41e3a;
}

.toolbar-button.active {
  color: #fff;
  background: #c41e3a;
  border-color: #c41e3a;
}

.color-picker-label {
  display: flex;
  color: #2d3748;
  align-items:  center;
  gap: .5rem;
  font-size: .9rem;
  font-weight: 600;
}

.color-picker {
  cursor: pointer;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  width: 40px;
  height: 40px;
}

.editor-content-container {
  position: relative;
  overflow-y: auto;
  background: #fefefe;
  flex: 1;
}

.editor-content {
  color: #1a202c;
  outline: none;
  position: relative;
  cursor: text;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  background-color: #0000;
  background-image: linear-gradient(to right, #e53e3e 0 2px, #0000 2px), repeating-linear-gradient(#0000, #0000 1.95rem, #cbd5e0 1.95rem 2rem);
  background-position: 3.5rem 0, 0 0;
  background-repeat: repeat;
  background-size: 100% 100%, 100% 2rem;
  background-attachment: scroll;
  background-origin: padding-box;
  background-clip: border-box;
  width: 100%;
  max-width: 80ch;
  height: 34.5rem;
  min-height: 34.5rem;
  max-height: 34.5rem;
  padding: .5rem 2rem 2rem 5rem;
  font-family: Courier New, Courier, monospace;
  font-size: 1.1rem;
  line-height: 2rem;
}

.drawing-canvas {
  width: 100%;
  max-width: calc(80ch + 7rem);
  height: 34.5rem;
  font-size: 1.1rem;
}

.editor-content * {
  line-height: 2rem !important;
  font-size: inherit !important;
}

.editor-content:empty:before {
  content: attr(data-placeholder);
  color: #a0aec0;
  font-style: italic;
}

.editor-content:focus {
  background-image: linear-gradient(to right, #e53e3e 0 2px, #0000 2px), repeating-linear-gradient(#0000, #0000 1.95rem, #cbd5e0 1.95rem 2rem);
}

.editor-footer {
  display: flex;
  background: #f7fafc;
  border-top: 2px solid #e2e8f0;
  justify-content: space-between;
  align-items:  center;
  padding: 1.5rem 2rem;
}

.save-info {
  color: #718096;
  font-size: .9rem;
}

.save-button {
  color: #fff;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #165b33 0%, #0d3d22 100%);
  border: none;
  border-radius: 12px;
  padding: .75rem 2rem;
  transition: all .3s;
  font-weight: 700;
}

.save-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px #165b334d;
}

.save-button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.editor-error {
  margin: 1rem 2rem;
}

.santa-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
}

.santa-header {
  color: #fff;
  display: flex;
  background: linear-gradient(135deg, #165b33 0%, #0d3d22 100%);
  border-radius: 24px;
  justify-content: space-between;
  align-items:  center;
  margin-bottom: 1.5rem;
  padding: 2rem;
  box-shadow: 0 4px 20px #0003;
}

.santa-title-section h1 {
  margin: 0 0 .5rem;
  font-size: 2rem;
}

.santa-subtitle {
  opacity: .9;
  margin: 0;
  font-size: 1.1rem;
}

.event-reminder {
  display: flex;
  animation: gentle-pulse 3s ease-in-out infinite;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 3px solid #f59e0b;
  border-radius: 16px;
  align-items:  center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 15px #f59e0b4d;
}

@keyframes gentle-pulse {
  0%, 100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

.event-icon {
  animation: swing 2s ease-in-out infinite;
  font-size: 3rem;
}

@keyframes swing {
  0%, 100% {
    transform: rotate(0);
  }

  25% {
    transform: rotate(-10deg);
  }

  75% {
    transform: rotate(10deg);
  }
}

.event-details {
  flex: 1;
}

.event-title {
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: .5rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.event-info {
  color: #78350f;
  margin-bottom: .3rem;
  font-size: 1.3rem;
}

.event-location {
  color: #92400e;
  font-size: 1.1rem;
  font-weight: 600;
}

.editor-sidebar .event-reminder, .santa-container .event-reminder {
  gap: 1rem;
  padding: 1rem;
}

.editor-sidebar .event-icon, .santa-container .event-icon {
  font-size: 2rem;
}

.editor-sidebar .event-title, .santa-container .event-title {
  margin-bottom: .25rem;
  font-size: .85rem;
}

.editor-sidebar .event-info, .santa-container .event-info {
  margin-bottom: .2rem;
  font-size: .95rem;
}

.editor-sidebar .event-location, .santa-container .event-location {
  font-size: .9rem;
}

.recipient-card {
  overflow: hidden;
  background: #fffffff2;
  border-radius: 24px;
  box-shadow: 0 20px 60px #0000004d;
}

.recipient-header {
  color: #fff;
  text-align: center;
  background: linear-gradient(135deg, #c41e3a 0%, #a01729 100%);
  padding: 2rem;
}

.recipient-header h2 {
  margin: 0 0 1rem;
  font-size: 1.8rem;
}

.recipient-name {
  text-shadow: 2px 2px 4px #0003;
  margin: 1rem 0;
  font-size: 2.5rem;
  font-weight: 800;
}

.budget-reminder {
  display: inline-block;
  background: #fff3;
  border-radius: 50px;
  margin-top: .5rem;
  padding: .5rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.santa-info {
  color: #2e7d32;
  display: flex;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-left: 4px solid #4caf50;
  border-radius: 8px;
  align-items:  center;
  gap: .5rem;
  margin: 1.5rem;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}

.santa-info strong {
  color: #1b5e20;
}

.letter-display h3 {
  color: #2d3748;
  margin-bottom: 1.5rem;
  padding: .5rem 2rem;
  font-size: 1.5rem;
}

.letter-content-container {
  position: relative;
  overflow: hidden;
  background: #fefefe;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  min-height: 200px;
}

.letter-content {
  color: #1a202c;
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  background-color: #0000;
  background-image: linear-gradient(to right, #e53e3e 0 2px, #0000 2px), repeating-linear-gradient(#0000, #0000 1.95rem, #cbd5e0 1.95rem 2rem);
  background-position: 3.5rem 0, 0 0;
  background-repeat: repeat;
  background-size: 100% 100%, 100% 2rem;
  background-attachment: scroll;
  background-origin: padding-box;
  background-clip: border-box;
  width: 100%;
  max-width: 80ch;
  min-height: 500px;
  padding: .5rem 2rem 2rem 5rem;
  font-family: Courier New, Courier, monospace;
  font-size: 1.1rem;
  line-height: 2rem;
}

.letter-content * {
  line-height: 2rem !important;
}

.no-letter {
  display: flex;
  color: #718096;
  background: #f7fafc;
  border: 2px dashed #cbd5e0;
  border-radius: 12px;
  justify-content: center;
  align-items:  center;
  min-height: 200px;
  padding: 2rem;
  font-size: 1.1rem;
}

.loading {
  text-align: center;
  color: #718096;
  padding: 3rem;
  font-size: 1.2rem;
}

.santa-card {
  background: #fffffff2;
  border-radius: 24px;
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem;
  box-shadow: 0 20px 60px #0000004d;
}

.debug-button {
  position: fixed;
  color: #fff;
  cursor: pointer;
  z-index: 9999;
  background: #ff6b6b;
  border: 2px solid red;
  border-radius: 8px;
  padding: .75rem 1.5rem;
  transition: all .2s;
  font-size: .9rem;
  font-weight: 700;
  right: 2rem;
  box-shadow: 0 4px 15px #ff00004d;
}

.debug-button:hover {
  background: #ff5252;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px #f006;
}

.debug-button-santa {
  bottom: 2rem;
}

.debug-button-assign {
  background: #ff9800;
  border-color: #f57c00;
  bottom: 5.5rem;
}

.debug-button-assign:hover {
  background: #fb8c00;
}

@media (width <= 1200px) {
  .editor-page {
    flex-direction: column;
  }

  .editor-sidebar {
    position: static;
    flex: none;
    width: 100%;
    max-width: 100%;
  }

  .editor-main {
    width: 100%;
  }
}

@media (width <= 768px) {
  .title {
    font-size: 2rem;
  }

  .pretitle {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: .95rem;
  }

  .cta-button {
    padding: .875rem 2rem;
    font-size: 1rem;
  }

  .content {
    padding: 2rem 1.5rem;
  }

  .auth-card {
    padding: 2rem;
  }

  .editor-header {
    flex-direction: column;
    align-items:  flex-start;
    gap: 1rem;
  }

  .editor-tip {
    margin: .75rem;
    padding: .75rem 1rem;
    font-size: .85rem;
  }

  .editor-content {
    font-size: .95rem;
  }

  .toolbar {
    padding: .75rem;
  }

  .toolbar-button {
    min-width: 35px;
    padding: .4rem .8rem;
  }

  .editor-content {
    background-position: 2.5rem 0, 0 0;
    padding: .5rem 1rem 2rem 4rem;
  }

  .color-picker-label {
    font-size: .8rem;
  }

  .color-picker {
    width: 35px;
    height: 35px;
  }

  .editor-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .save-button {
    width: 100%;
  }

  .toast {
    min-width: auto;
    padding: .875rem 1.25rem;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
  }

  .toast-message {
    font-size: .9rem;
  }

  .countdown-time {
    font-size: 1.5rem;
  }

  .santa-header {
    flex-direction: column;
    align-items:  flex-start;
    gap: 1rem;
    padding: 1.5rem;
  }

  .santa-title-section h1 {
    font-size: 1.5rem;
  }

  .event-reminder {
    text-align: center;
    flex-direction: column;
    padding: 1.5rem 1rem;
  }

  .event-icon {
    font-size: 2.5rem;
  }

  .recipient-name {
    font-size: 2rem;
  }

  .santa-info {
    text-align: left;
    flex-direction: column;
    gap: .25rem;
    margin: 1rem;
    padding: .875rem 1rem;
    font-size: .9rem;
  }

  .editor-content {
    overflow-y: auto;
    background-image: linear-gradient(to right, #e53e3e 0 2px, #0000 2px), repeating-linear-gradient(#0000, #0000 1.7rem, #cbd5e0 1.7rem 1.75rem);
    background-position: 2.5rem 0, 0 0;
    background-size: 100% 100%, 100% 1.75rem;
    height: 30.25rem;
    min-height: 30.25rem;
    max-height: 30.25rem;
    padding: .5rem 1.5rem 2rem 4rem;
    font-size: .95rem;
    line-height: 1.75rem;
  }

  .editor-content * {
    line-height: 1.75rem !important;
    font-size: inherit !important;
  }

  .editor-content:focus {
    background-image: linear-gradient(to right, #e53e3e 0 2px, #0000 2px), repeating-linear-gradient(#0000, #0000 1.7rem, #cbd5e0 1.7rem 1.75rem);
  }

  .drawing-canvas {
    height: 30.25rem;
  }

  .letter-content {
    background-image: linear-gradient(to right, #e53e3e 0 2px, #0000 2px), repeating-linear-gradient(#0000, #0000 1.7rem, #cbd5e0 1.7rem 1.75rem);
    background-position: 2.5rem 0, 0 0;
    background-size: 100% 100%, 100% 1.75rem;
    min-height: 450px;
    padding: .5rem 1.5rem 2rem 4rem;
    font-size: .95rem;
    line-height: 1.75rem;
  }

  .letter-content * {
    line-height: 1.75rem !important;
    font-size: inherit !important;
  }

  .debug-button {
    padding: .5rem 1rem;
    font-size: .8rem;
    right: 1rem;
  }

  .debug-button-santa {
    bottom: 1rem;
  }

  .debug-button-assign {
    bottom: 4rem;
  }

  .welcome-card {
    padding: 1.5rem 1rem;
  }

  .welcome-title {
    font-size: 1.4rem;
  }

  .rules-list {
    padding: 1rem 1rem 1rem 1.75rem;
  }

  .rules-list li {
    margin-bottom: .5rem;
    font-size: .9rem;
  }

  .rules-intro {
    font-size: .95rem;
  }
}

@media (width <= 480px) {
  .editor-content {
    overflow-y: auto;
    background-image: linear-gradient(to right, #e53e3e 0 1.2px, #0000 1.2px), repeating-linear-gradient(#0000, #0000 calc(.9rem - 1px), #cbd5e0 calc(.9rem - 1px) .9rem);
    background-position: 1.2rem 0, 0 0;
    background-size: 100% 100%, 100% .9rem;
    height: 15.525rem;
    min-height: 15.525rem;
    max-height: 15.525rem;
    padding: .225rem .6rem .9rem 2.1rem;
    font-size: .5rem;
    line-height: .9rem;
  }

  .editor-content * {
    line-height: .9rem !important;
    font-size: inherit !important;
  }

  .editor-content:focus {
    background-image: linear-gradient(to right, #e53e3e 0 1.2px, #0000 1.2px), repeating-linear-gradient(#0000, #0000 calc(.9rem - 1px), #cbd5e0 calc(.9rem - 1px) .9rem);
  }

  .drawing-canvas {
    height: 15.525rem;
  }

  .letter-display h3 {
    margin-bottom: 1rem;
    padding: .5rem 1rem;
    font-size: 1.2rem;
  }

  .letter-content {
    background-image: linear-gradient(to right, #e53e3e 0 1.2px, #0000 1.2px), repeating-linear-gradient(#0000, #0000 calc(.9rem - 1px), #cbd5e0 calc(.9rem - 1px) .9rem);
    background-position: 1.2rem 0, 0 0;
    background-size: 100% 100%, 100% .9rem;
    min-height: 240px;
    padding: .225rem .6rem .9rem 2.1rem;
    font-size: .5rem;
    line-height: .9rem;
  }

  .letter-content * {
    line-height: .9rem !important;
    font-size: inherit !important;
  }
}

@media (prefers-reduced-motion) {
  *, :before, :after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
