* {
    box-sizing: border-box;
}

/* Prevent transitions on page load */
.preload * {
    transition: none !important;
    animation: none !important;
}

/* Hide content until ready (avoids flash of images, JS-injected "submitted", and prefilled fields) */
.preload body {
    visibility: hidden;
}

html, body {
    font-family: 'Times New Roman', Times, serif;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    max-width: 100%;
    width: 100%;
}

/* Positioning */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;  /* centers vertically in viewport */
  align-items: center;      /* centers horizontally */
  height: 95vh;
}

.hero h1 {
  margin: 0 0 1rem 0;
  font-size: 3em;
  display: inline-block;   /* keep as block for centering */
}

.hero h2 {
  margin: 0 0 0.5rem 0; /* bottom margin 0.5rem */
}

.hero p {
  margin: 0; /* remove default spacing */
}

.hero img {
  margin-bottom: 1.2rem; /* or px, em, etc. */
  width: 115px;
  height: auto;
}

.page-header {
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: center;
  text-align: center;
  margin-top: 20px;
}

.page-header h1 {
  margin: 0 0 1rem 0;
  font-size: 3em;
  display: inline-block;   /* keep as block for centering */
}

.page-header h2 {
  margin: 0 0 0.5rem 0; /* bottom margin 0.5rem */
}

.page-header p {
  margin: 0; /* remove default spacing */
}

.page-footer {
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  text-align: center;
  margin-bottom: 20px;
}

.page-footer h1 {
  margin: 0 0 1rem 0;
  font-size: 3em;
  display: inline-block;   /* keep as block for centering */
}

.page-footer h2 {
  margin: 0 0 0.5rem 0; /* bottom margin 0.5rem */
}

.page-footer p {
  margin: 0; /* remove default spacing */
}

  /* Override Markdown defaults */
  h1 {
    font-weight: normal;
    font-size: 3em;
  }
  
  h2 {
    font-weight: normal;
    font-size: 1.5em;
  }

  h3 {
    font-weight: normal;
  }

  .hero-title {
    display: inline-flex;       /* makes the text and symbol a flex row */
    align-items: center;        /* vertically centers the symbol relative to text */
    justify-content: center;    /* centers the whole h1 inline */
    font-size: 3em;
  }  
  
  .h1-symbol {
    font-family: Georgia, 'Times New Roman', Times, serif; /* or whatever font you like */
    font-size: 0.72em; /* optional: smaller/larger than the main h1 */
    vertical-align: text-middle; /* optional: tweak alignment with text */
    position: relative;
    margin-left: 0;
  }

  .entry {
    margin-left: 10px;
  }

  .entry img {
    width: 300px;
  }

  .entry-images {
    display: flex;
    justify-content: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    margin-left: 10px; /* match text alignment */
  }
  
  .entry-images img {
    height: 200px;     /* uniform height for all images */
    width: auto;       /* maintain aspect ratio */
    object-fit: contain; /* ensures no distortion or cropping */
  }  

  /* ===========================
   Collection Item Grid Styles
   =========================== */

/* Show/hide for mobile vs desktop */
.desktop-only {
  display: grid; /* Will be overridden on mobile */
}

.mobile-only {
  display: none; /* Will be overridden on mobile */
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5rem;
  margin: 3rem auto 0;
  max-width: 1600px;
  padding: 0 5rem;
}

.collection-item {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid black;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.collection-item[data-checked="true"] {
  background-color: purple;
  position: relative;
  cursor: pointer;
}

/* Odd positions (1, 3): purple background with black border */
.collection-item:nth-child(odd)[data-checked="true"] {
  background-color: purple;
  border: 1px solid black;
}

/* Even positions (2, 4): black background with purple outline when checked */
.collection-item:nth-child(even)[data-checked="true"] {
  background-color: black;
  border: 1px solid purple;
}

/* One-time glitter effect for selected items */
.collection-item.glitter-once::before,
.collection-item.glitter-once::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  animation: glitterOnce 0.75s ease-out forwards;
  z-index: 1;
}

.collection-item.glitter-once::before {
  box-shadow:
    10px 10px 0 2px rgba(255, 255, 255, 0.8),
    -15px 20px 0 1px rgba(255, 255, 255, 0.7),
    25px -10px 0 3px rgba(255, 255, 255, 0.6),
    -30px -15px 0 2px rgba(255, 255, 255, 0.8),
    40px 25px 0 1px rgba(255, 255, 255, 0.7),
    -25px 35px 0 2px rgba(255, 255, 255, 0.6),
    50px -20px 0 3px rgba(255, 255, 255, 0.8),
    -40px 5px 0 1px rgba(255, 255, 255, 0.7),
    15px 40px 0 2px rgba(255, 255, 255, 0.6),
    -10px -30px 0 3px rgba(255, 255, 255, 0.7);
}

.collection-item.glitter-once::after {
  box-shadow:
    -20px 15px 0 2px rgba(255, 255, 255, 0.7),
    30px 5px 0 1px rgba(255, 255, 255, 0.8),
    -35px -20px 0 3px rgba(255, 255, 255, 0.6),
    20px 30px 0 2px rgba(255, 255, 255, 0.7),
    -45px 10px 0 1px rgba(255, 255, 255, 0.8),
    35px -25px 0 2px rgba(255, 255, 255, 0.6),
    -15px 40px 0 3px rgba(255, 255, 255, 0.7),
    45px 15px 0 1px rgba(255, 255, 255, 0.8),
    -25px -5px 0 2px rgba(255, 255, 255, 0.6),
    5px -35px 0 3px rgba(255, 255, 255, 0.7);
}

@keyframes glitterOnce {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

.collection-item img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  pointer-events: none;
}

/* Checkbox square - top left */
.item-checkbox {
  position: absolute;
  top: -25px;
  left: -25px;
  width: 50px;
  height: 50px;
  border: 1px solid black;
  background-color: white;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
}

.item-checkbox .check-icon {
  display: none;
  width: 70%;
  height: 70%;
}

.collection-item[data-checked="true"] .item-checkbox {
  background-color: purple;
  border-color: black;
}

.collection-item[data-checked="true"] .item-checkbox .check-icon {
  display: block;
  color: white;
}

/* Even positions (2, 4): black checkbox with purple border when checked */
.collection-item:nth-child(even)[data-checked="true"] .item-checkbox {
  background-color: black;
  border-color: purple;
}

/* Checkbox hover - when hovering checkbox or item (but not enlarge button) */
.item-checkbox:hover,
.collection-item:hover:not(:has(.item-enlarge:hover)) .item-checkbox {
  background-color: #f0e6ff;
}

.collection-item[data-checked="true"] .item-checkbox:hover,
.collection-item[data-checked="true"]:hover:not(:has(.item-enlarge:hover)) .item-checkbox {
  background-color: purple;
  border-color: black;
}

/* Even positions (2, 4): maintain black checkbox with purple border on hover */
.collection-item:nth-child(even)[data-checked="true"] .item-checkbox:hover,
.collection-item:nth-child(even)[data-checked="true"]:hover:not(:has(.item-enlarge:hover)) .item-checkbox {
  background-color: black;
  border-color: purple;
}


/* Enlarge square - bottom right */
.item-enlarge {
  position: absolute;
  bottom: -25px;
  right: -25px;
  width: 50px;
  height: 50px;
  border: 1px solid black;
  background-color: white;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  box-sizing: border-box;
}

.item-enlarge svg {
  width: 70%;
  height: 70%;
}

.item-enlarge:hover {
  background-color: #e6f3ff;
}

/* Responsive - 2 columns on tablet */
@media (max-width: 900px) {
  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4.5rem;
    padding: 0 4.5rem;
  }
}

/* Responsive - Mobile carousel */
@media (max-width: 600px) {
  /* Hide desktop grid on mobile */
  .desktop-only {
    display: none !important;
  }

  /* Show carousel on mobile */
  .mobile-only {
    display: block;
    margin-bottom: 0;
  }

  /* Carousel wrapper */
  .collection-carousel-wrapper {
    width: 100%;
    overflow: visible;
    position: relative;
    margin: 1.5rem 0 0;
    padding: 0;
  }

  /* Carousel scroll container */
  .collection-carousel {
    display: flex;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 50px;
    padding: 25px calc((100vw - 50vw) / 2);
    margin: -25px 0;
  }

  .collection-carousel::-webkit-scrollbar {
    display: none;
  }

  /* Carousel items */
  .collection-carousel .collection-item {
    flex: 0 0 50vw;
    height: 50vw;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    overflow: visible;
  }

  /* Active item - no scaling to prevent vertical overflow */
  .collection-carousel .collection-item.active {
    /* No transform - prevents vertical scroll issues */
  }

  /* Checkbox and enlarge buttons for carousel - match desktop size */
  .collection-carousel .item-checkbox,
  .collection-carousel .item-enlarge {
    width: 50px;
    height: 50px;
  }

  .collection-carousel .item-checkbox {
    top: -25px;
    left: -25px;
  }

  .collection-carousel .item-enlarge {
    bottom: -25px;
    right: -25px;
    padding: 10px;
  }

  /* Mobile carousel - match desktop pattern (no clones, normal odd/even) */
  .collection-carousel .collection-item:nth-child(odd)[data-checked="true"] {
    background-color: purple;
    border: 1px solid black;
  }

  .collection-carousel .collection-item:nth-child(even)[data-checked="true"] {
    background-color: black;
    border: 1px solid purple;
  }

  /* Checkbox colors - normal pattern */
  .collection-carousel .collection-item:nth-child(odd)[data-checked="true"] .item-checkbox {
    background-color: purple;
    border-color: black;
  }

  .collection-carousel .collection-item:nth-child(even)[data-checked="true"] .item-checkbox {
    background-color: black;
    border-color: purple;
  }

  /* Maintain checkbox colors on hover - normal pattern */
  .collection-carousel .collection-item:nth-child(odd)[data-checked="true"] .item-checkbox:hover,
  .collection-carousel .collection-item:nth-child(odd)[data-checked="true"]:hover:not(:has(.item-enlarge:hover)) .item-checkbox {
    background-color: purple;
    border-color: black;
  }

  .collection-carousel .collection-item:nth-child(even)[data-checked="true"] .item-checkbox:hover,
  .collection-carousel .collection-item:nth-child(even)[data-checked="true"]:hover:not(:has(.item-enlarge:hover)) .item-checkbox {
    background-color: black;
    border-color: purple;
  }

  /* Navigation dots */
  .carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.5rem 0 0 0;
    padding: 0;
  }

  .carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 0;
    border: 1px solid black;
    background-color: white;
    cursor: pointer;
    padding: 0;
  }

  .carousel-dot.active {
    background-color: purple;
    border-color: purple;
    transform: scale(1.2);
  }

  .carousel-dot:hover:not(.active) {
    background-color: #f0e6ff;
  }
}

/* Form centering */
form {
  max-width: 1600px;
  margin: 0 auto 2rem;
  padding: 0 5rem;
  text-align: left;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 5rem;
  row-gap: 0;
}

.form-fields {
  display: flex;
  flex-direction: column;
  grid-column: 1;
  margin-top: 0;
}

.size-selector {
  position: relative;
  grid-column: 2;
}

.form-submit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  grid-column: 3 / 5;
  margin-top: 2rem;
}

form p {
  margin: 1rem 0 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

form p:first-of-type {
  margin-top: 0;
}

/* Form input styling */
form input {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1rem;
  padding: 0.5rem;
  border: 1px solid black;
  border-radius: 0;
}

form input:focus {
  outline: 1px solid #0066ff;
  outline-offset: 2px;
  border-radius: 0;
}

form button {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.625rem;
  padding: 0.625rem;
  border: 1px solid black;
  border-radius: 0;
}

form input {
  width: 100%;
  max-width: 350px;
  box-sizing: border-box;
}

form label {
  margin-top: 0.25rem;
  font-size: 1.1rem;
  text-align: left;
}

form .error-message {
  color: purple;
  font-size: 0.9rem;
  text-align: left;
  margin-top: 0.15rem;
  height: 1rem;
  visibility: hidden;
}

form .error-message.visible {
  visibility: visible;
}

form .email-field {
  position: relative;
  padding-bottom: 1rem;
}

form .email-field .error-message {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.15rem;
}

.hidden-item-inputs {
  display: none;
  grid-column: 1 / -1;
}

.items-error-container {
  display: block;
  margin-top: 2.5rem;
  margin-bottom: 0;
  grid-column: 1 / -1;
  text-align: center;
}

form .items-error {
  color: purple;
  font-size: 1.1rem;
  text-align: center;
}

form button {
  background-color: black;
  color: white;
  cursor: pointer;
  padding: 1rem 1.625rem;
  position: relative;
}

form button:hover {
  background-color: #333;
}

/* Purple glitter effect on click for submit button */
form button.glitter-once::before,
form button.glitter-once::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  animation: glitterOnce 0.75s ease-out forwards;
  z-index: 1;
}

form button.glitter-once::before {
  box-shadow:
    10px 10px 0 2px rgba(128, 0, 128, 0.8),
    -15px 20px 0 1px rgba(147, 112, 219, 0.7),
    25px -10px 0 3px rgba(138, 43, 226, 0.6),
    -30px -15px 0 2px rgba(153, 50, 204, 0.8),
    40px 25px 0 1px rgba(186, 85, 211, 0.7),
    -25px 35px 0 2px rgba(221, 160, 221, 0.6),
    50px -20px 0 3px rgba(128, 0, 128, 0.8),
    -40px 5px 0 1px rgba(147, 112, 219, 0.7),
    15px 40px 0 2px rgba(138, 43, 226, 0.6),
    -10px -30px 0 3px rgba(153, 50, 204, 0.7);
}

form button.glitter-once::after {
  box-shadow:
    -20px 15px 0 2px rgba(186, 85, 211, 0.7),
    30px 5px 0 1px rgba(128, 0, 128, 0.8),
    -35px -20px 0 3px rgba(147, 112, 219, 0.6),
    20px 30px 0 2px rgba(138, 43, 226, 0.7),
    -45px 10px 0 1px rgba(153, 50, 204, 0.8),
    35px -25px 0 2px rgba(221, 160, 221, 0.6),
    -15px 40px 0 3px rgba(128, 0, 128, 0.7),
    45px 15px 0 1px rgba(147, 112, 219, 0.8),
    -25px -5px 0 2px rgba(138, 43, 226, 0.6),
    5px -35px 0 3px rgba(186, 85, 211, 0.7);
}

/* Submitted message: same padding as submit button, minus 1px per side so total size matches (message has border, button doesn’t show one) */
.submission-message {
  font-size: 1.625rem;
  font-family: 'Times New Roman', Times, serif;
  padding: calc(0.6875rem - 1px) calc(1.5rem - 1px);
  position: relative;
  cursor: pointer;
  margin: 0 auto;
  display: block;
  text-align: center;
  border: 1px solid black;
  border-radius: 0;
}

/* Purple glitter effect on hover */
.submission-message:hover::before,
.submission-message:hover::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  animation: glitter 1.5s infinite;
}

.submission-message:hover::before {
  box-shadow:
    10px 10px 0 2px rgba(128, 0, 128, 0.8),
    -15px 20px 0 1px rgba(147, 112, 219, 0.7),
    25px -10px 0 3px rgba(138, 43, 226, 0.6),
    -30px -15px 0 2px rgba(153, 50, 204, 0.8),
    40px 25px 0 1px rgba(186, 85, 211, 0.7),
    -25px 35px 0 2px rgba(221, 160, 221, 0.6),
    50px -20px 0 3px rgba(128, 0, 128, 0.8),
    -40px 5px 0 1px rgba(147, 112, 219, 0.7),
    15px 40px 0 2px rgba(138, 43, 226, 0.6),
    -10px -30px 0 3px rgba(153, 50, 204, 0.7);
}

.submission-message:hover::after {
  animation-delay: 0.75s;
  box-shadow:
    -20px 15px 0 2px rgba(186, 85, 211, 0.7),
    30px 5px 0 1px rgba(128, 0, 128, 0.8),
    -35px -20px 0 3px rgba(147, 112, 219, 0.6),
    20px 30px 0 2px rgba(138, 43, 226, 0.7),
    -45px 10px 0 1px rgba(153, 50, 204, 0.8),
    35px -25px 0 2px rgba(221, 160, 221, 0.6),
    -15px 40px 0 3px rgba(128, 0, 128, 0.7),
    45px 15px 0 1px rgba(147, 112, 219, 0.8),
    -25px -5px 0 2px rgba(138, 43, 226, 0.6),
    5px -35px 0 3px rgba(186, 85, 211, 0.7);
}

@keyframes glitter {
  0%, 100% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Size selector styling */
.size-selector {
  width: 100%;
  height: 200px;
  align-self: start;
  margin-top: 0.5rem;
}

/* Hide dropdown on desktop, show overlapping buttons */
.size-dropdown {
  display: none;
}

.size-options {
  position: relative;
  width: 100%;
  height: 100%;
}

.size-option {
  position: absolute;
  cursor: pointer;
}

.size-option:nth-child(1) { top: 5px; left: -15px; }
.size-option:nth-child(2) { top: 35px; left: 70px; }
.size-option:nth-child(3) { top: 5px; left: 155px; }
.size-option:nth-child(4) { top: 80px; left: -15px; }
.size-option:nth-child(5) { top: 105px; left: 70px; }
.size-option:nth-child(6) { top: 80px; left: 155px; }
.size-option:nth-child(7) { top: 155px; left: 155px; }

.size-option input[type="radio"] {
  display: none;
}

.size-option span {
  display: block;
  padding: 1.2rem 1.5rem;
  border: 1px solid black;
  background-color: white;
  color: black;
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.1rem;
  min-width: 60px;
  text-align: center;
  box-sizing: content-box;
}

/* ROYGBIV hover colors for each size option */
.size-option:nth-child(1) span:hover {
  background-color: #ffe6e6; /* light red */
}

.size-option:nth-child(2) span:hover {
  background-color: #ffe6cc; /* light orange */
}

.size-option:nth-child(3) span:hover {
  background-color: #ffffcc; /* light yellow */
}

.size-option:nth-child(4) span:hover {
  background-color: #e6ffe6; /* light green */
}

.size-option:nth-child(5) span:hover {
  background-color: #e6f3ff; /* light blue */
}

.size-option:nth-child(6) span:hover {
  background-color: #e6e6ff; /* light indigo */
}

.size-option:nth-child(7) span:hover {
  background-color: #f0e6ff; /* light violet */
}

.size-option input[type="radio"]:checked + span {
  background-color: black;
  color: white;
}

.size-option input[type="radio"]:checked + span:hover {
  background-color: black;
}

.size-label {
  position: absolute;
  bottom: 0;
  left: -15px;
  margin: 0;
  font-size: 1.1rem;
  text-align: left;
}

.size-selector .error-message {
  position: absolute;
  bottom: -20px;
  left: -15px;
}

/* Medium desktop - 3 column layout */
@media (max-width: 1200px) {
  form {
    padding: 0 3rem;
    grid-template-columns: auto minmax(280px, auto) 1fr;
    column-gap: 3rem;
    row-gap: 2rem;
  }

  .form-fields {
    grid-column: 1;
  }

  .size-selector {
    grid-column: 2;
    height: 220px;
    min-width: 280px;
  }

  .size-option:nth-child(1) { top: 5px; left: 10px; }
  .size-option:nth-child(2) { top: 35px; left: 85px; }
  .size-option:nth-child(3) { top: 5px; left: 160px; }
  .size-option:nth-child(4) { top: 80px; left: 10px; }
  .size-option:nth-child(5) { top: 105px; left: 85px; }
  .size-option:nth-child(6) { top: 80px; left: 160px; }
  .size-option:nth-child(7) { top: 155px; left: 160px; }

  .size-option span {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    min-width: 55px;
  }

  .size-label {
    left: 10px;
  }

  .size-selector .error-message {
    left: 10px;
  }

  .form-submit {
    grid-column: 3;
    align-items: center;
    justify-content: flex-start;
    margin-top: 0.5rem;
  }

  .items-error-container {
    margin-top: 2.5rem;
  }
}

/* Tablet - 2 column layout with submit below */
@media (max-width: 900px) {
  form {
    padding: 0 4.5rem;
    grid-template-columns: 1fr 1fr;
    column-gap: 4.5rem;
  }

  .form-submit {
    grid-column: 1 / -1;
    align-items: center;
    margin-top: 1rem;
  }

  .items-error-container {
    margin-top: 2.5rem;
  }
}

/* Mobile optimizations - compact for above-the-fold */
@media (max-width: 600px) {
  .page-header {
    margin-top: 8px;
  }

  .page-header h1 {
    font-size: 1.75em;
    margin: 0 0 0.3rem 0;
  }

  .page-header p {
    font-size: 0.85rem;
  }

  form {
    padding: 0 2rem;
    grid-template-columns: 1fr;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
    margin-top: 0;
  }

  .form-fields {
    grid-column: 1;
    align-items: stretch;
    margin-top: 0;
  }

  .form-fields p {
    width: 100%;
    margin: 0.3rem 0 0 0;
    display: block;
  }

  .form-fields p:first-of-type {
    margin-top: 0;
  }

  form .email-field {
    padding-bottom: 0;
    position: static;
  }

  form .email-field .error-message {
    position: static;
  }

  form input {
    width: 100%;
    padding: 0.5rem 0.6rem;
    font-size: 1rem;
    display: block;
  }

  /* Position label and error message inline on mobile */
  form label {
    font-size: 0.95rem;
    display: inline;
    margin-top: 0.25rem;
  }

  form .error-message {
    display: inline;
    margin-left: 0.5rem;
    margin-top: 0;
    font-size: 0.8rem;
    height: auto;
  }

  .size-selector {
    grid-column: 1;
    width: 100%;
    margin: 0.3rem 0 0 0;
    display: block;
    height: auto;
  }

  /* Hide the overlapping buttons on mobile */
  .size-options {
    display: none;
  }

  /* Show size options as a dropdown on mobile */
  .size-selector select {
    display: block;
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.6rem;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
    border: 1px solid black;
    border-radius: 0;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23000' d='M1.41 0L6 4.59L10.59 0L12 1.41L6 7.41L0 1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 12px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  }

  .size-selector select:focus {
    outline: 1px solid #0066ff;
    outline-offset: 2px;
  }

  .size-label {
    position: static;
    font-size: 0.95rem;
    display: inline;
    margin: 0;
    padding: 0;
  }

  .size-selector .error-message {
    position: static;
    display: inline;
    margin-left: 0.5rem;
    margin-top: 0;
    font-size: 0.8rem;
    height: auto;
  }

  .form-submit {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0;
    text-align: center;
  }

  form button {
    font-size: 1.25rem;
    padding: 0.625rem 1.1rem;
  }

  .form-right {
    min-height: auto;
  }

  .items-error-container {
    margin-top: 0;
    margin-bottom: 0;
  }

  form .items-error {
    font-size: 0.95rem;
  }

  /* Slightly less vertical padding than button so submitted reads shorter (same ratio as desktop) */
  .submission-message {
    font-size: 1.25rem;
    padding: calc(0.4rem - 1px) calc(1rem - 1px);
  }

  /* Hide modal close button on mobile - tap backdrop to close */
  .modal-close {
    display: none !important;
  }
}

/* ===========================
   Image Modal Styles
   =========================== */

.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  cursor: pointer;
}

.modal-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.modal-close {
  position: absolute;
  top: 0;
  right: -50px;
  background: white;
  border: 1px solid black;
  border-radius: 0;
  cursor: pointer;
  padding: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.modal-close svg {
  width: 70%;
  height: 70%;
}

.modal-close:hover {
  background-color: #ffe6e6;
}
