
  /* --- Base Styles for Clean, Readable Interface --- */
  * {
      box-sizing: border-box;
  }
  body {
    background-color: #fdfdfd;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: #333333;
    margin: 0;
    padding: 10px;
    line-height: 1.5;
  }

  /* --- Main Module Container --- */
  .sg-maritime-time-module {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    /* --- Visual Enhancement: Subtle background gradient --- */
    background: linear-gradient(to bottom, #fafafa, #ffffff);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
  }

  /* --- Titles --- */
  .sg-maritime-time-module h1 {
    color: #000000;
    text-align: center;
    margin-top: 0;
    margin-bottom: 8px;
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    font-weight: 600;
  }

  .sg-maritime-time-module h2 {
    /* --- Visual Enhancement: Slightly darker subtitle color --- */
    color: #4d4d4d;
    text-align: center;
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    font-weight: 400;
    margin-top: 0;
    margin-bottom: 20px;
  }

  /* --- Set My Time Zone Table Button --- */
  #sg-openSettingsBtn {
    display: block;
    margin: 20px auto 15px auto;
    padding: 10px 20px;
    background-color: #e8f0fe;
    color: #1a73e8;
    border: 1px solid #d2e3fc;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    /* --- Visual Enhancement: Enhanced transition --- */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }

  #sg-openSettingsBtn:hover {
    background-color: #d2e3fc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
  }

  /* --- Custom Selector Panel (Initially Hidden) --- */
  .sg-custom-selector {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
    display: none; /* Controlled by JavaScript */
  }

  .sg-custom-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #202124;
  }

  .sg-custom-selector select {
    padding: 10px;
    font-size: 0.9rem;
    border: 1px solid #dadce0;
    border-radius: 4px;
    background-color: #ffffff;
    color: #202124;
    margin-bottom: 15px;
    width: 95%;
    max-width: 500px;
    box-sizing: border-box;
  }

  .sg-custom-selector button {
    padding: 10px 20px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    margin: 5px 10px;
    transition: background-color 0.2s ease;
  }

  .sg-custom-selector button:hover {
    background-color: #1555a5;
  }

  /* --- Time Display Grid (Responsive Layout) --- */
  .sg-time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    justify-items: center;
    margin-top: 10px;
  }

  @media (max-width: 480px) {
    .sg-time-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    .sg-custom-selector button {
        display: block;
        width: 90%;
        margin: 10px auto;
    }
  }

  /* --- Individual Time Card --- */
  .sg-time-card {
    width: 100%;
    max-width: 180px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px 12px;
    background-color: #ffffff;
    /* --- Visual Enhancement: Stronger base shadow --- */
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
  }

  .sg-time-card:hover {
    transform: translateY(-3px);
    /* --- Visual Enhancement: Stronger hover shadow --- */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  }

  .sg-time-card .sg-city-name {
    font-weight: 600;
    color: #1a73e8;
    margin-bottom: 8px;
    font-size: 0.95rem;
    word-break: break-word;
  }

  .sg-time-card .sg-time-display {
    font-size: 1.4rem;
    /* --- Visual Enhancement: Specific monospace font and optimized spacing --- */
    font-family: 'Roboto Mono', 'Courier New', monospace;
    color: #202124;
    letter-spacing: 0.5px; /* Slightly reduced from 1px for better readability */
    margin-bottom: 5px;
    font-weight: 500; /* Slightly bolder time */
  }

  .sg-time-card .sg-date-display {
    font-size: 0.75rem;
    color: #5f6368;
    margin-bottom: 5px;
  }

  /* --- Day/Night Label Style --- */
  .sg-time-card .sg-day-night-label {
    font-size: 0.7rem;
    font-weight: 500;
  }
  .sg-time-card .sg-day-night-label[data-status="D"] {
    color: #34a853; /* Green for Day */
  }
  .sg-time-card .sg-day-night-label[data-status="N"] {
    color: #ea4335; /* Softer red for Night */
  }

  /* --- "HOME" Tag Style --- */
  .sg-time-card.sg-user-home::before {
    content: "HOME";
    position: absolute;
    top: 8px; /* Moved inside the card */
    right: 8px; /* Positioned to the right */
    background-color: #ffffff; /* Background for better contrast */
    color: #34a853; /* Match day label color */
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border: 1px solid #34a853;
    border-radius: 3px;
    z-index: 1;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1); /* Subtle shadow for tag */
  }

  /* --- Footer Note --- */
  .sg-instructions {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.75rem;
    color: #80868b;
    text-align: center;
  }

  .sg-instructions strong {
      color: #ea4335; /* Softer red for note */
  }

