:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", sans-serif;
  line-height: 1.5;
  background: #f7f7fa;
  color: #1a1f2b;
  
  /* ============================================
     MOBILE RESPONSIVE VARIABLES
     All mobile-specific values defined here for easy maintenance
     ============================================ */
  
  /* Mobile Breakpoints */
  --mobile-breakpoint-tablet: 768px;
  --mobile-breakpoint-phone: 480px;
  
  /* Mobile Page Layout */
  --mobile-page-padding-tablet: 16px 12px 24px;
  --mobile-page-padding-left-tablet: 12px;
  --mobile-page-margin-left: 0px;
  --mobile-page-gap-tablet: 16px;
  
  --mobile-page-padding-phone: 12px 8px 20px;
  --mobile-page-padding-left-phone: 8px;
  --mobile-page-gap-phone: 16px;
  
  /* Mobile Header */
  --mobile-header-gap: 16px;
  --mobile-header-margin-bottom: 16px;
  --mobile-header-h1-size-tablet: 1.5rem;
  --mobile-header-h1-size-phone: 1.25rem;
  --mobile-header-p-size-tablet: 0.9rem;
  --mobile-header-p-size-phone: 0.85rem;
  --mobile-header-featured-title-tablet: 18pt;
  --mobile-header-featured-title-phone: 16pt;
  
  /* Mobile Logo/Icon */
  --mobile-icon-max-width-tablet: 200px;
  --mobile-icon-max-height-tablet: 160px;
  --mobile-icon-max-width-phone: 150px;
  --mobile-icon-max-height-phone: 120px;
  
  /* Mobile Buttons */
  --mobile-button-padding: 12px 16px;
  --mobile-button-font-size: 1rem;
  --mobile-button-gap: 12px;
  --mobile-button-width: 100%;
  
  /* Mobile Table */
  --mobile-table-font-size-tablet: 0.85rem;
  --mobile-table-font-size-phone: 0.8rem;
  --mobile-table-min-width-tablet: 520px;
  --mobile-table-min-width-phone: 360px;
  --mobile-table-padding: 12px;
  --mobile-table-cell-padding: 8px 12px;
  
  /* Mobile Table Columns */
  --mobile-col-1-width-tablet: 160px;
  --mobile-col-1-width-phone: 120px;
  --mobile-col-2-width-tablet: 220px;
  --mobile-col-2-width-phone: 170px;
  --mobile-col-2-padding-left-tablet: 42px;
  --mobile-col-2-padding-left-phone: 40px;
  --mobile-col-3-width: 100px;
  --mobile-col-3-margin-left: 40px;
  
  /* Mobile Forms */
  --mobile-form-padding: 16px 12px;
  --mobile-form-title-size: 1.25rem;
  --mobile-form-field-gap: 8px;
  --mobile-form-field-margin-bottom: 16px;
  --mobile-form-input-padding: 12px;
  --mobile-form-button-padding: 12px 16px;
  
  /* Mobile Search */
  --mobile-search-padding: 12px;
  --mobile-search-gap: 12px;
  --mobile-search-margin-top: 16px;
  
  /* Mobile Right Side Container */
  --mobile-right-container-width: 140px;
  --mobile-right-container-margin-top: 20px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: repeating-linear-gradient(
    45deg,
    #f5f5f5,
    #f5f5f5 20px,
    #ffffff 20px,
    #ffffff 40px
  );
}

.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

header {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "left content buttons";
  align-items: start;
  gap: 40px;
  padding: 0;
  margin-bottom: 12px;
}

.left-images-container {
  grid-area: logo;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.left-images-container .canon-icon,
.left-images-container .left-graphic-container .feature-image {
  vertical-align: top;
}


.header-buttons-container {
  grid-area: buttons;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-end;
  padding-left: 20px;
  position: relative;
}

.header-left-container {
  grid-area: left;
}

.header-content {
  grid-area: content;
  display: flex;
  align-items: flex-start;
  gap: 40px;
  justify-content: center;
  padding-top: 0;
  margin-left: -120px;
}


.header-title-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  justify-content: center;
  width: 100%;
}

.canon-logo-link {
  text-decoration: none;
  display: inline-block;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.canon-icon {
  display: block;
  max-width: 300px;
  max-height: 240px;
  width: auto;
  height: auto;
  flex-shrink: 0;
  border-radius: 12px;
}

.header-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

header h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.2;
}

.canon-link {
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  padding-bottom: 2px;
  white-space: nowrap;
  display: inline-block;
}

header p {
  margin: 0;
  color: #4b5565;
  text-align: center;
  width: 100%;
}

#tableCount {
  margin-top: 8px;
  margin-bottom: 2em; /* Two blank lines below Total */
  text-align: center;
  color: #4b5565;
  font-size: 0.95rem;
  width: 100%;
  margin-left: 0;
  align-self: center;
}

.graphic-container-header {
  margin-top: 16px;
  text-align: center;
  width: 100%;
  position: relative;
}

.graphic-container-header .featured-site-title {
  margin-bottom: 8px;
}

.graphic-container-header a {
  display: inline-block;
  text-decoration: none;
  border: none;
}

.graphic-container-header .feature-image {
  max-width: 280px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.submit-button-container {
  margin-bottom: 16px;
  display: flex;
  justify-content: flex-end;
}

.submit-new-button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: #1f6feb;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
  font-family: "Inter", "Segoe UI", sans-serif;
}

.submit-new-button:hover {
  background: #1b5fd1;
}

.top-right-buttons {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  align-items: flex-start;
  padding: 0;
  box-sizing: border-box;
  flex-shrink: 0;
}

.top-right-buttons .header-button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: #1f6feb;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
  font-size: 0.95rem;
  margin: 0;
  display: block;
  width: 100%;
}

.top-right-buttons a.header-button {
  text-decoration: none;
  text-align: center;
}


.header-buttons {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.header-buttons .header-button + .header-button {
  margin-top: 100px !important;
}

#requestChangeButtonForm3 {
  margin-top: 20px !important;
}

#aboutButtonForm3 {
  margin-top: 20px !important;
}

#aboutForm .header-buttons {
  margin-left: 100px;
}

.top-right-buttons .header-button:hover {
  background: #1b5fd1;
}

.search-controls-wrapper {
  position: relative;
  width: 100%;
}

.search-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e2e7ef;
  margin-top: 2px;
}


.search-controls #searchInput {
  flex: 1;
  min-width: 200px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #d5d9e0;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-controls #searchInput:focus {
  outline: none;
  border-color: #1f6feb;
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.1);
}

.search-controls button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: #1f6feb;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.search-controls button:hover {
  background: #1b5fd1;
}

.search-controls #prevMatchButton,
.search-controls #nextMatchButton {
  background: #10b981;
  font-size: 0.9rem;
}

.search-controls #prevMatchButton:hover,
.search-controls #nextMatchButton:hover {
  background: #059669;
}

.search-controls #clearSearchButton {
  background: #6b7280;
}

.search-controls #clearSearchButton:hover {
  background: #4b5563;
}

.search-results {
  font-size: 0.9rem;
  color: #4b5565;
  margin-left: auto;
}

.search-results.highlight {
  color: #1f6feb;
  font-weight: 600;
}

.file-control {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #d5d9e0;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.file-control:hover {
  border-color: #1f6feb;
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.1);
}

.file-control input {
  font-size: 0.95rem;
  cursor: pointer;
}

.file-control input::file-selector-button {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #d5d9e0;
  background: #f7f8fa;
  color: #1a1f2b;
  font-weight: 500;
  cursor: pointer;
  margin-right: 8px;
  transition: background 0.2s, border-color 0.2s;
}

.file-control input::file-selector-button:hover {
  background: #e8ebef;
  border-color: #b8bcc5;
}

button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: #1f6feb;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: #1b5fd1;
}

.table-wrapper {
  background: #ffffff;
  border-radius: 0 0 16px 16px;
  padding: 20px;
  box-shadow: 0 12px 24px rgba(18, 38, 63, 0.08);
  overflow-x: auto;
  overflow-y: auto;
  max-height: 70vh;
  min-height: 200px;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0;
}

.table-section-wrapper {
  position: relative;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.header-left-container .left-side-container {
  position: relative;
  width: 300px;
}

.left-side-container {
  position: absolute;
  left: 40px;
  top: 40px;
  width: 300px;
}

.header-left-container .left-side-container {
  position: relative;
  top: 0;
  left: 0;
}

.left-side-container .canon-icon {
  max-width: 300px;
  max-height: 240px;
  width: auto;
  height: auto;
  border-radius: 12px;
}

#mainPage .featured-hidden-link {
  display: none;
}

#mainPage .featured-image-link {
  position: relative;
  z-index: 2;
}

#mainPage .featured-stack {
  position: relative;
  display: inline-block;
}

#mainPage .featured-links-box {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 260px;
  min-height: 190px;
  padding: 14px 12px 10px;
  border: 2px solid #111111;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 2px;
  transform: translateX(-50%);
  z-index: 1;
  box-sizing: border-box;
}

#mainPage .featured-links-box h4 {
  margin: 0 0 8px 0;
  font-size: 1rem;
  color: #111111;
  font-weight: 600;
  text-align: left;
}

#mainPage .featured-links-box a {
  display: block;
  color: #1f6feb;
  text-decoration: underline;
  font-size: 0.9rem;
  line-height: 1.3;
  word-break: break-word;
  text-align: left;
}

.right-side-container {
  position: relative;
  width: 140px;
  margin-top: 20px;
  margin-left: -60px;
  align-self: flex-end;
  min-width: 140px;
}

.brought-to-you-title {
  font-size: 9pt;
  font-weight: bold;
  font-style: italic;
  margin: 0 0 8px 0;
  color: #1a1f2b;
  text-align: center;
  white-space: nowrap;
  overflow: visible;
  width: 100%;
}

.right-side-container a {
  display: block;
  text-decoration: none;
  border: none;
}

.right-side-container .right-side-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.left-graphic-container {
  width: 280px;
  padding: 0;
}

.left-graphic-container .featured-site-title {
  margin-top: 0;
  margin-bottom: 0;
}

.left-graphic-container a {
  display: block;
  text-decoration: none;
  border: none;
}

.left-graphic-container .feature-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.graphic-container {
  position: absolute;
  right: -340px;
  top: -38px;
  width: 280px;
  padding: 0;
}

.featured-site-title {
  font-size: 21pt; /* Increased by 7 from 14pt */
  font-weight: bold;
  color: red;
  text-decoration: underline;
  margin: 0 0 12px 0;
  color: #1a1f2b;
}

.graphic-container a {
  display: block;
  text-decoration: none;
  border: none;
}

.graphic-container .feature-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

@media screen and (max-width: 1400px) {
  .left-graphic-container {
    display: none;
  }
  
  .graphic-container {
    display: none;
  }
}

.column-aligned-text {
  margin: 0;
  padding: 0;
  height: 0;
  overflow: hidden;
}

#csvTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  table-layout: fixed;
}

/* Table headers */
#csvTable th {
  border-bottom: 2px solid #d5d9e0;
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #1a1f2b;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Table cells */
#csvTable td {
  border-bottom: 1px solid #e2e7ef;
  padding: 12px 16px;
  text-align: left;
  color: #4b5565;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Styling for links in table cells */
#csvTable td a {
  color: #1f6feb;
  text-decoration: none;
  transition: text-decoration 0.2s;
}

#csvTable td a:hover {
  text-decoration: underline;
  color: #1b5fd1;
}

#csvTable td a:visited {
  color: #6b46c1;
}

/* Column widths using fixed table layout */
#csvTable th:nth-child(1),
#csvTable td:nth-child(1) {
  width: 15%;
  max-width: 180px;
}

#csvTable th:nth-child(2),
#csvTable td:nth-child(2) {
  width: 70%;
  max-width: none;
  word-break: break-all;
  padding-left: 16px;
}

#csvTable th:nth-child(3),
#csvTable td:nth-child(3) {
  width: 15%;
  max-width: 144px;
}

#csvTable th:nth-child(4),
#csvTable td:nth-child(4) {
  width: 15%;
  max-width: 144px;
}

/* Table header section - hide thead since we use static HTML header */
#csvTable thead {
  display: none;
}

#csvTable thead th {
  display: none;
}

/* Static table heading section (HTML-based header below search) */
.table-heading {
  display: flex;
  width: 100%;
  background: #f0f4fa;
  border-bottom: 2px solid #d5d9e0;
  box-sizing: border-box;
  border-radius: 16px 16px 0 0;
  padding-left: 20px;
  padding-right: 20px;
  margin-bottom: 2px;
}

.heading-column {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  color: #1a1f2b;
  word-wrap: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
  flex-shrink: 0;
}

.heading-column-1 {
  width: 15%;
  max-width: 180px;
}

.heading-column-2 {
  width: 70%;
  word-break: break-all;
  padding-left: 81px;
}

.heading-column-3 {
  width: 15%;
  max-width: 144px;
  margin-left: -28px;
}

#csvTable tbody tr:hover {
  background: #f5f7fa;
}

#csvTable tbody tr:nth-child(even) {
  background: #fafbfd;
}

#csvTable tbody tr:nth-child(even):hover {
  background: #f5f7fa;
}

#csvTable tbody:empty::after {
  content: "No data to display";
  display: block;
  padding: 40px;
  text-align: center;
  color: #8b95a6;
  font-style: italic;
}

/* Highlighted search results */
#csvTable tbody tr.search-match {
  background: #fef3c7 !important;
  border-left: 4px solid #f59e0b;
}

#csvTable tbody tr.search-match:hover {
  background: #fde68a !important;
}

#csvTable tbody tr.search-current {
  background: #dbeafe !important;
  border-left: 4px solid #1f6feb;
}

#csvTable tbody tr.search-current:hover {
  background: #bfdbfe !important;
}

.status {
  font-size: 0.95rem;
  color: #4b5565;
  padding: 8px 0;
}

.status p {
  margin: 0;
}

.seo-bottom-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  margin-bottom: 2px;
  font-size: 6pt;
  line-height: 1.2;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-left: 0;
  text-align: left;
}

.seo-bottom-links a {
  color: #1f6feb;
  text-decoration: underline;
}

.seo-bottom-links-label {
  color: #1a1f2b;
  font-weight: 600;
}

/* Align links rows with form input column on non-index pages */
#registrationForm .seo-bottom-links {
  max-width: 800px;
  margin: 16px auto 0;
  padding-left: 135px;
}

#requestChangeForm .seo-bottom-links {
  width: 100%;
  max-width: none;
  margin: 16px 0 0;
  padding-left: 135px;
}

.about-page .seo-bottom-links {
  max-width: 800px;
  margin: 16px auto 0;
  padding-left: 0;
}

/* Registration Form Styles */
.registration-form {
  min-height: 100vh;
  padding: 20px;
}

.registration-form-title {
  text-align: center;
  margin: 24px auto 20px auto;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1f2b;
  max-width: 800px;
  width: 100%;
  transform: translateX(40px);
}

#aboutForm .registration-form-title {
  transform: translateX(20px);
}

.about-page .registration-form-title {
  transform: translateX(20px);
}

.about-content {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  text-align: left;
  padding: 20px;
}

.about-content p {
  margin: 0 0 1em 0;
  line-height: 1.6;
  text-align: left;
}

#registrationForm .registration-form-fields {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  background: transparent;
}

.form-field {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  gap: 15px;
}

.form-field label {
  min-width: 120px;
  text-align: right;
  font-weight: 500;
  color: #1a1f2b;
  flex-shrink: 0;
}

.form-field input,
.form-field select {
  flex: 1;
  min-width: 400px;
  padding: 10px 12px;
  border: 1px solid #d5d9e0;
  border-radius: 4px;
  background: #ffffff;
  font-size: 0.95rem;
  color: #1a1f2b;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: #1f6feb;
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.1);
}

.form-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  padding-top: 20px;
  margin-left: 40px;
}

/* Submission Modal Dialog */
.submission-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  z-index: 1001;
  width: 90%;
  max-width: 500px;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-content {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.modal-header {
  background: #1f6feb;
  color: #ffffff;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e7ef;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-body {
  padding: 24px;
  text-align: center;
}

.modal-body p {
  margin: 0;
  font-size: 1rem;
  color: #4b5565;
  line-height: 1.5;
}

.form-button {
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: #1f6feb;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.95rem;
}

.form-button:hover {
  background: #1b5fd1;
}

.form-button-submit {
  background: #1f6feb;
  color: #ffffff;
  border: none;
}

.form-button-submit:hover {
  background: #1b5fd1;
}

.form-button-submit:disabled {
  background: #d5d9e0;
  color: #8b95a6;
  cursor: not-allowed;
}

/* Hide debug information on register.html (both desktop and mobile) */
#registrationForm #testStatus,
.registration-form #testStatus {
  display: none !important;
}

/* Hide About button only for the embedded request-change form on index.html */
#mainPage ~ #requestChangeForm #aboutButton,
#mainPage ~ #requestChangeForm .top-right-buttons #aboutButton {
  display: none !important;
}

/* Remove Submit New button only for the embedded request-change form on index.html */
#mainPage ~ #requestChangeForm .top-right-buttons [id^="registerButton"],
#mainPage ~ #requestChangeForm [id^="registerButton"] {
  display: none !important;
}

/* Hide About button only for the embedded registration form on index.html */
#mainPage ~ #registrationForm .top-right-buttons #aboutButton,
#mainPage ~ #registrationForm #aboutButton {
  display: none !important;
}

/* ============================================
   MOBILE RESPONSIVE STYLES - TABLET (≤768px)
   COMPLETELY ISOLATED - All styles use !important
   Desktop changes CANNOT affect mobile
   ============================================ */
@media screen and (max-width: 768px) {
  /* ============================================
     MOBILE PAGE CONTAINER - COMPLETELY ISOLATED
     ============================================ */
  .page {
    padding: var(--mobile-page-padding-tablet) !important;
    padding-left: var(--mobile-page-padding-left-tablet) !important;
    padding-right: 12px !important;
    margin-left: var(--mobile-page-margin-left) !important;
    margin-right: 0 !important;
    gap: var(--mobile-page-gap-tablet) !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    box-sizing: border-box !important;
  }
  
  /* ============================================
     MOBILE TABLE SECTION WRAPPER - ISOLATED
     ============================================ */
  .table-section-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* ============================================
     MOBILE HEADER - COMPLETELY ISOLATED
     ============================================ */
  header {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-areas: 
      "logo"
      "content"
      "buttons" !important;
    gap: var(--mobile-header-gap) !important;
    margin-bottom: var(--mobile-header-margin-bottom) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Mobile Header Left Container */
  .header-left-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    grid-area: logo !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .header-left-container .left-side-container {
    position: relative !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    box-sizing: border-box !important;
  }

  .header-left-container .canon-logo-link {
    display: block !important;
    margin: 0 auto !important;
    text-align: center !important;
    width: auto !important;
    max-width: 100% !important;
  }

  /* Mobile Logo/Icon */
  .canon-icon {
    max-width: var(--mobile-icon-max-width-tablet) !important;
    max-height: var(--mobile-icon-max-height-tablet) !important;
    width: auto !important;
    height: auto !important;
    margin: 0 auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  /* Mobile Header Content */
  .header-content {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .header-title-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
  
  .header-title {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .header-title h1,
  .header-title .canon-link {
    text-align: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Mobile Typography */
  header h1 {
    font-size: var(--mobile-header-h1-size-tablet) !important;
    margin: 0 auto !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }
  
  header h1 .canon-link {
    text-align: center !important;
    margin: 0 auto !important;
    display: inline-block !important;
  }

  header p {
    font-size: var(--mobile-header-p-size-tablet) !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .featured-site-title {
    font-size: var(--mobile-header-featured-title-tablet) !important;
    color: red !important;
    text-decoration: underline !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Mobile Header Buttons Container */
  .header-buttons-container {
    display: flex !important;
    flex-direction: column !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  .right-side-container {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 20px !important;
    margin-bottom: 0 !important;
    width: 140px !important;
    max-width: 140px !important;
    min-width: 140px !important;
    align-self: center !important;
    box-sizing: border-box !important;
  }

  .brought-to-you-title {
    text-align: center !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .right-side-container .right-side-image {
    margin: 0 auto !important;
    display: block !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Mobile Debug Display - Hide in mobile view */
  #mobileSearchDebug {
    display: none !important;
    visibility: hidden !important;
  }

  /* Mobile Top Right Buttons */
  .top-right-buttons {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  /* Mobile Header Buttons */
  .top-right-buttons .header-button {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: var(--mobile-button-padding) !important;
    font-size: var(--mobile-button-font-size) !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
  }
  
  /* Ensure About button is visible on index.html main page in mobile view */
  #mainPage .top-right-buttons #aboutButton,
  #mainPage #aboutButton {
    display: block !important;
    visibility: visible !important;
  }
  
  /* Hide About button in mobile view ONLY when it's inside a registration form container */
  /* This targets register.html and the registration form sections on index.html */
  #mainPage ~ #registrationForm .top-right-buttons #aboutButton,
  #mainPage ~ #registrationForm #aboutButton {
    display: none !important;
  }
  
  /* Hide About button in mobile view ONLY when it's inside a request change form container */
  /* This targets requestachange.html and the request change form section on index.html */
  #mainPage ~ #requestChangeForm .top-right-buttons #aboutButton,
  #mainPage ~ #requestChangeForm #aboutButton {
    display: none !important;
  }
  

  .header-buttons {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .header-buttons .header-button + .header-button {
    margin-top: 12px !important;
  }

  #requestChangeButtonForm3 {
    margin-top: 12px !important;
  }

  #aboutButtonForm3 {
    margin-top: 12px !important;
  }

  #aboutForm .header-buttons {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .left-graphic-container {
    display: none !important;
  }
  
  .graphic-container {
    display: none !important;
  }
  
  /* ============================================
     MOBILE SEARCH CONTROLS - FLEXBOX CONTAINER
     Simple flex solution that guarantees containment
     ============================================ */
  
  /* Mobile Search Controls Wrapper - Flex container */
  .search-controls-wrapper {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Mobile Search Controls Container - Flex child */
  .search-controls {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    flex: 0 0 auto !important;
    gap: var(--mobile-search-gap) !important;
    padding: var(--mobile-search-padding) !important;
    margin: var(--mobile-search-margin-top) 0 0 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    align-items: stretch !important;
  }

  /* Mobile Search Input - Flex child, reduced by 50px */
  .search-controls #searchInput {
    flex: 0 0 auto !important;
    flex-grow: 0 !important;
    flex-shrink: 1 !important;
    width: calc(100% - 50px) !important;
    min-width: 0 !important;
    max-width: calc(100% - 50px) !important;
    box-sizing: border-box !important;
    padding: 10px 16px !important;
    margin: 0 !important;
    border: 1px solid #d5d9e0 !important;
    overflow: hidden !important;
  }

  /* Mobile Search Button - Flex child, matches input (also reduced by 50px) */
  .search-controls button {
    flex: 0 0 auto !important;
    flex-grow: 0 !important;
    flex-shrink: 1 !important;
    width: calc(100% - 50px) !important;
    min-width: 0 !important;
    max-width: calc(100% - 50px) !important;
    box-sizing: border-box !important;
    padding: var(--mobile-button-padding) !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
    white-space: normal !important;
  }
  
  /* Page level - ensure no overflow */
  .page {
    overflow-x: hidden !important;
  }
  
  body {
    overflow-x: hidden !important;
  }

  /* ============================================
     MOBILE TABLE - COMPLETELY ISOLATED
     ============================================ */
  .table-heading {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    padding: var(--mobile-table-padding) !important;
    margin: 0 !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    min-width: var(--mobile-table-min-width-tablet) !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .heading-column-3 {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .heading-column {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    padding: 10px 12px !important;
    margin: 0 !important;
    text-align: left !important;
    box-sizing: border-box !important;
  }

  /* Mobile Table Columns */
  .heading-column-1 {
    width: var(--mobile-col-1-width-tablet) !important;
    min-width: var(--mobile-col-1-width-tablet) !important;
    max-width: var(--mobile-col-1-width-tablet) !important;
    box-sizing: border-box !important;
  }

  .heading-column-2 {
    width: var(--mobile-col-2-width-tablet) !important;
    min-width: var(--mobile-col-2-width-tablet) !important;
    max-width: var(--mobile-col-2-width-tablet) !important;
    padding-left: var(--mobile-col-2-padding-left-tablet) !important;
    padding-right: 12px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  .heading-column-3 {
    width: var(--mobile-col-3-width) !important;
    min-width: var(--mobile-col-3-width) !important;
    max-width: var(--mobile-col-3-width) !important;
    margin-left: var(--mobile-col-3-margin-left) !important;
    margin-right: 0 !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
  }

  /* Mobile Table Wrapper */
  .table-wrapper {
    padding: var(--mobile-table-padding) !important;
    margin: 0 !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    min-width: var(--mobile-table-min-width-tablet) !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #csvTable {
    font-size: var(--mobile-table-font-size-tablet) !important;
    min-width: var(--mobile-table-min-width-tablet) !important;
    max-width: 100% !important;
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    box-sizing: border-box !important;
  }

  #csvTable th:nth-child(1),
  #csvTable td:nth-child(1) {
    width: var(--mobile-col-1-width-tablet) !important;
    min-width: var(--mobile-col-1-width-tablet) !important;
    max-width: var(--mobile-col-1-width-tablet) !important;
    box-sizing: border-box !important;
  }

  #csvTable th:nth-child(2),
  #csvTable td:nth-child(2) {
    width: var(--mobile-col-2-width-tablet) !important;
    min-width: var(--mobile-col-2-width-tablet) !important;
    max-width: var(--mobile-col-2-width-tablet) !important;
    box-sizing: border-box !important;
  }

  #csvTable th:nth-child(3),
  #csvTable td:nth-child(3) {
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    box-sizing: border-box !important;
  }

  #csvTable td {
    padding: var(--mobile-table-cell-padding) !important;
    font-size: var(--mobile-table-font-size-tablet) !important;
    box-sizing: border-box !important;
  }

  /* ============================================
     MOBILE FORMS - COMPLETELY ISOLATED
     ============================================ */
  .registration-form {
    padding: var(--mobile-form-padding) !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .registration-form-title {
    font-size: var(--mobile-form-title-size) !important;
    margin: 0 0 20px 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    transform: none !important;
  }

  .registration-form-fields {
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .form-field {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: var(--mobile-form-field-gap) !important;
    margin-bottom: var(--mobile-form-field-margin-bottom) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .form-field label {
    min-width: 0 !important;
    max-width: 100% !important;
    text-align: left !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .form-field input,
  .form-field select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: var(--mobile-form-input-padding) !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .form-buttons {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: var(--mobile-button-gap) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .form-button {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: var(--mobile-form-button-padding) !important;
    font-size: var(--mobile-button-font-size) !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
  }

  .modal-dialog {
    width: 95%;
    max-width: 400px;
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-header h3 {
    font-size: 1.1rem;
  }

  .modal-body {
    padding: 20px;
  }

  .submit-button-container {
    margin-bottom: 12px;
  }

  .submit-new-button {
    width: 100%;
    padding: 12px 16px;
  }
}

/* ============================================
   MOBILE RESPONSIVE STYLES - PHONE (≤480px)
   COMPLETELY ISOLATED - All styles use !important
   Desktop changes CANNOT affect mobile
   ============================================ */
@media screen and (max-width: 480px) {
  /* ============================================
     MOBILE PHONE PAGE CONTAINER - ISOLATED
     ============================================ */
  .page {
    padding: var(--mobile-page-padding-phone) !important;
    padding-left: var(--mobile-page-padding-left-phone) !important;
    padding-right: 8px !important;
    margin-left: var(--mobile-page-margin-left) !important;
    margin-right: 0 !important;
    gap: var(--mobile-page-gap-phone) !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    box-sizing: border-box !important;
  }

  /* Mobile Phone Logo/Icon */
  .canon-icon {
    max-width: var(--mobile-icon-max-width-phone) !important;
    max-height: var(--mobile-icon-max-height-phone) !important;
    margin: 0 auto !important;
    display: block !important;
  }

  .header-left-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    grid-area: logo !important;
  }

  .header-left-container .left-side-container {
    position: relative !important;
    width: auto !important;
    margin: 0 auto !important;
    left: auto !important;
    top: auto !important;
  }

  .header-left-container .canon-logo-link {
    display: block;
    margin: 0 auto;
    text-align: center;
  }

  /* Mobile Phone Typography */
  header h1 {
    font-size: var(--mobile-header-h1-size-phone);
  }

  header p {
    font-size: var(--mobile-header-p-size-phone);
  }

  .featured-site-title {
    font-size: var(--mobile-header-featured-title-phone);
    color: red;
    text-decoration: underline;
  }

  /* ============================================
     MOBILE PHONE SEARCH CONTROLS - FLEXBOX
     ============================================ */
  .search-controls-wrapper {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  
  .search-controls {
    display: flex !important;
    flex-direction: column !important;
    flex: 0 0 auto !important;
    padding: 10px !important;
    margin: var(--mobile-search-margin-top) 0 0 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  
  .search-controls #searchInput {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  
  .search-controls button {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* ============================================
     MOBILE PHONE TABLE - ISOLATED
     ============================================ */
  .table-heading {
    padding: 10px !important;
    margin: 0 !important;
    min-width: var(--mobile-table-min-width-phone) !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .heading-column {
    padding: 8px 10px !important;
    margin: 0 !important;
    font-size: 0.9rem !important;
    box-sizing: border-box !important;
  }

  /* Mobile Phone Table Columns */
  .heading-column-1 {
    width: var(--mobile-col-1-width-phone) !important;
    min-width: var(--mobile-col-1-width-phone) !important;
    max-width: var(--mobile-col-1-width-phone) !important;
    box-sizing: border-box !important;
  }

  .heading-column-2 {
    width: var(--mobile-col-2-width-phone) !important;
    min-width: var(--mobile-col-2-width-phone) !important;
    max-width: var(--mobile-col-2-width-phone) !important;
    padding-left: var(--mobile-col-2-padding-left-phone) !important;
    padding-right: 10px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  .heading-column-3 {
    width: var(--mobile-col-3-width) !important;
    min-width: var(--mobile-col-3-width) !important;
    max-width: var(--mobile-col-3-width) !important;
    margin-left: var(--mobile-col-3-margin-left) !important;
    margin-right: 0 !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
  }

  #csvTable {
    font-size: var(--mobile-table-font-size-phone) !important;
    min-width: var(--mobile-table-min-width-phone) !important;
    max-width: 100% !important;
    width: 100% !important;
    table-layout: fixed !important;
    box-sizing: border-box !important;
  }

  #csvTable th:nth-child(1),
  #csvTable td:nth-child(1) {
    width: var(--mobile-col-1-width-phone) !important;
    min-width: var(--mobile-col-1-width-phone) !important;
    max-width: var(--mobile-col-1-width-phone) !important;
    box-sizing: border-box !important;
  }

  #csvTable th:nth-child(2),
  #csvTable td:nth-child(2) {
    width: var(--mobile-col-2-width-phone) !important;
    min-width: var(--mobile-col-2-width-phone) !important;
    max-width: var(--mobile-col-2-width-phone) !important;
    box-sizing: border-box !important;
  }

  #csvTable th:nth-child(3),
  #csvTable td:nth-child(3) {
    display: table-cell !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    box-sizing: border-box !important;
  }

  #csvTable td {
    padding: 6px 10px !important;
    margin: 0 !important;
    font-size: 0.8rem !important;
    box-sizing: border-box !important;
  }

  /* ============================================
     MOBILE PHONE FORMS - ISOLATED
     ============================================ */
  .registration-form-title {
    font-size: 1.1rem !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    transform: none !important;
  }

  .form-field input,
  .form-field select {
    padding: 10px !important;
    margin: 0 !important;
    font-size: 0.9rem !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .modal-dialog {
    width: 98%;
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-body {
    padding: 16px;
  }

  .header-buttons-container {
    align-items: center !important;
  }

  /* Prevent clipped "Submit New" text from appearing under the featured image on small phones */
  #mainPage .top-right-buttons #registerButton {
    display: none !important;
  }

  .right-side-container {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: 20px !important;
    width: 140px !important;
    align-self: center !important;
  }

  .brought-to-you-title {
    text-align: center !important;
  }

  .right-side-container .right-side-image {
    margin: 0 auto;
  }
}
