* { box-sizing: border-box; }
    body {
      font-family: system-ui, -apple-system, sans-serif;
      max-width: 1200px;
      margin: 40px auto;
      padding: 0 20px;
      background: #f5f5f5;
      color: #222;
    }
    h1 { font-size: 1.5rem; margin-bottom: 24px; line-height: 1.35; }
    h1 a { color: inherit !important; font-size: inherit !important; text-decoration: none }
    .site-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 24px;
      min-height: calc(1.5rem * 1.35 * 2);
    }
    .site-header h1 {
      margin-bottom: 0;
      flex: 1;
      min-width: 0;
      font-size: 1.5rem;
      line-height: 1.35;
    }
    .lang-switch {
      display: flex;
      flex-shrink: 0;
      border: 1px solid #ccc;
      border-radius: 6px;
      overflow: hidden;
      background: #fff;
      box-shadow: 0 1px 2px rgba(0,0,0,.04);
    }
    .lang-switch-btn {
      padding: 6px 10px;
      font-size: 0.8125rem;
      font-weight: 500;
      color: #555;
      text-decoration: none;
      line-height: 1.4;
      transition: background .15s, color .15s;
    }
    .lang-switch-btn:hover:not(.active) {
      background: #f5f5f5;
      color: #222;
    }
    .lang-switch-btn.active {
      background: #1a73e8;
      color: #fff;
      cursor: default;
      pointer-events: none;
    }
    .lang-switch-btn + .lang-switch-btn {
      border-left: 1px solid #ccc;
    }
    .layout {
      display: flex;
      gap: 20px;
      align-items: flex-start;
    }
    .left {
      flex: 0 0 430px;
      min-width: 390px;
    }
    .right {
      flex: 1;
      min-width: 0;
    }
    .card {
      background: #fff;
      border-radius: 8px;
      padding: 20px;
      margin-bottom: 16px;
      box-shadow: 0 1px 3px rgba(0,0,0,.1);
    }
    .now-block {
      display: flex;
      flex-direction: column;
    }
    .now-row {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: nowrap;
    }
    .now {
      font-size: 1.75rem;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      color: #1a73e8;
      line-height: 1.2;
      flex-shrink: 0;
    }
    .now-row .unit-toggle-btn,
    .now-row .copy-btn {
      flex-shrink: 0;
    }
    .now-cn {
      margin-top: 10px;
      font-size: 0.9375rem;
      font-variant-numeric: tabular-nums;
      font-family: Consolas, monospace;
      color: #444;
    }
    .now-cn-label {
      color: #666;
      font-size: 0.75rem;
      font-weight: 600;
      margin-right: 6px;
    }
    .label { color: #666; font-size: 0.875rem; margin-bottom: 8px; }
    input {
      width: 100%;
      padding: 10px 12px;
      font-size: 1rem;
      border: 1px solid #ccc;
      border-radius: 6px;
    }
    input:focus { outline: none; border-color: #1a73e8; }
    .hint { color: #999; font-size: 0.8rem; margin-top: 8px; }
    .mode-btns {
      display: flex;
      gap: 7px;
      margin-bottom: 16px;
    }
    .mode-btn {
      flex: 1;
      padding:8px;
      border: 1px solid #ccc;
      border-radius: 6px;
      background: #fff;
      cursor: pointer;
      font-size: 0.8rem;
      line-height: 1.4;
      white-space: nowrap;
    }
    .mode-btn.active {
      background: #1a73e8;
      color: #fff;
      border-color: #1a73e8;
    }
    /* 西班牙语文案较长：两列网格 + 第三项通栏 */
    html[lang=es] .mode-btns {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 7px;
    }
    html[lang=es] .mode-btn {
      flex: none;
      white-space: normal;
      text-align: center;
      font-size: 0.72rem;
      line-height: 1.35;
      padding: 8px 6px;
      min-width: 0;
    }
    html[lang=es] .mode-btn:nth-child(3) {
      grid-column: 1 / -1;
    }
    .unit-toggle-btn {
      padding: 4px 10px;
      font-size: 0.75rem;
      border: 1px solid #ccc;
      border-radius: 4px;
      background: #fff;
      cursor: pointer;
      white-space: nowrap;
      color: #555;
    }
    .unit-toggle-btn:hover { background: #f0f0f0; }
    .unit-toggle-btn.ms {
      background: #1a73e8;
      color: #fff;
      border-color: #1a73e8;
    }
    #tsInput,#dateInput{
      margin-top: 0.3rem;
      font-size: 0.8rem;
    }
    .source-zone-wrap {
      margin-bottom: 10px;
    }
    .source-zone-wrap .label {
      margin-bottom: 6px;
    }
    .source-zone-select {
      width: 100%;
      padding: 8px 10px;
      font-size: 0.8rem;
      border: 1px solid #ccc;
      border-radius: 6px;
      background: #fafafa;
      cursor: pointer;
    }
    .source-zone-select:focus { outline: none; border-color: #1a73e8; }
    .copy-btn {
      padding: 4px 10px;
      font-size: 0.75rem;
      border: 1px solid #ccc;
      border-radius: 4px;
      background: #fafafa;
      cursor: pointer;
      white-space: nowrap;
    }
    .copy-btn:hover { background: #eee; }
    .copy-btn.copied { color: #0a0; border-color: #0a0; }
    #resultGroups {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    #resultGroups > .card {
      margin-bottom: 0;
    }
    .continent-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }
    .continent-header .continent-title {
      margin-bottom: 0;
      flex: 1;
      min-width: 0;
    }
    .continent-toggle-btn {
      flex-shrink: 0;
      padding: 4px 10px;
      font-size: 0.75rem;
      border: 1px solid #ccc;
      border-radius: 4px;
      background: #fff;
      cursor: pointer;
      color: #555;
      line-height: 1.4;
    }
    .continent-toggle-btn:hover {
      background: #f5f5f5;
      border-color: #bbb;
    }
    .continent-section.is-collapsed .continent-header {
      margin-bottom: 0;
    }
    .continent-section.is-collapsed .continent-body {
      display: none;
    }
    .continent-title {
      font-size: 1rem;
      font-weight: 600;
      color: #222;
      margin: 0 0 12px 0;
      padding-left: 10px;
      border-left: 3px solid #1a73e8;
      line-height: 1.3;
    }
    .result-error {
      color: #999;
      text-align: center;
      padding: 24px 16px;
    }
    table,
    .region-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
    th, td {
      text-align: left;
      padding: 10px 8px;
      border-bottom: 1px solid #eee;
    }
    th { color: #666; font-weight: 500; font-size: 0.875rem; }
    #resultGroups tr[data-region] {
      cursor: pointer;
    }
    #resultGroups tr[data-region]:hover {
      background: #fafafa;
    }
    #resultGroups tr[data-region]:hover .value-text {
      color: #181818;
    }
    #resultGroups tr[data-region].row-highlight {
      background: #fff3e0;
    }
    #resultGroups tr[data-region].row-highlight:hover {
      background: #fff3e0;
    }
    #resultGroups tr[data-region].row-highlight td {
      border-bottom-color: #fff3e0;
    }
    th.time-col,
    .value-cell {
      width: 34%;
      min-width: 170px;
    }
    th.relative-col,
    .relative-cell {
      width: 120px;
      min-width: 108px;
      max-width: 150px;
      text-align: center;
      padding-left: 8px;
      padding-right: 8px;
    }
    .relative-cell .day-hint {
      margin: 0 auto;
    }
    .region-col,
    .region-cell {
      width: 118px;
      min-width: 118px;
      max-width: 118px;
    }
    .region-cell {
      font-size: 0.8125rem;
      font-weight: 700;
      color: #333;
    }
    .region-cell-inner {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .region-flag {
      width: 18px;
      height: 14px;
      object-fit: cover;
      border-radius: 2px;
      flex-shrink: 0;
      box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    }
    .region-col-wide,
    .region-cell-wide {
      width: 160px;
      min-width: 160px;
      max-width: 160px;
    }
    .region-cell-wide {
      font-size: 0.8125rem;
      font-weight: 700;
      color: #333;
    }
    .region-cell-wide .region-cell-inner {
      white-space: nowrap;
    }
    .zone-cell {
      font-size: 0.75rem;
      color: #555;
    }
    .zone-name {
      word-break: break-all;
    }
    .zone-select {
      font-size: 0.75rem;
      padding: 3px 6px;
      border: 1px solid #ccc;
      border-radius: 4px;
      background: #fafafa;
      max-width: 100%;
      cursor: pointer;
    }
    .zone-select:focus { outline: none; border-color: #1a73e8; }
    .value-cell {
      font-variant-numeric: tabular-nums;
      font-family: Consolas, monospace;
    }
    .day-hint {
      display: inline-block;
      padding: 1px 6px;
      font-size: 0.6875rem;
      font-family: system-ui, -apple-system, sans-serif;
      font-weight: 500;
      color: #666;
      background: #eee;
      border-radius: 3px;
      flex-shrink: 0;
      line-height: 1.4;
    }
    .value-text {
      color: #686868;
      white-space: nowrap;
    }
    .value-row {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: nowrap;
    }
    .row-copy-btn {
      padding: 2px 6px;
      font-size: 0.6875rem;
      border-radius: 3px;
    }
    .site-footer {
      margin-top: 32px;
      padding: 20px 0 8px;
      border-top: 1px solid #e0e0e0;
      text-align: center;
      font-size: 0.8125rem;
      color: #888;
    }
    .footer-links {
      margin-bottom: 10px;
    }
    .footer-label {
      color: #666;
      margin-right: 8px;
    }
    .footer-links a {
      color: #1a73e8;
      text-decoration: none;
    }
    .footer-links a:hover {
      text-decoration: underline;
    }
    .footer-sep {
      margin: 0 8px;
      color: #ccc;
    }
    .footer-copy {
      margin: 0;
      font-size: 0.75rem;
      color: #aaa;
    }
    @media (max-width: 768px) {
      body {
        margin: 20px auto;
        padding: 0 12px;
      }

      .site-header {
        min-height: calc(1.2rem * 1.35 * 2);
      }

      .site-header h1 {
        font-size: 1.2rem;
        line-height: 1.35;
      }

      .layout {
        flex-direction: column;
      }

      .left {
        flex: none;
        width: 100%;
        min-width: 0;
      }

      .right {
        width: 100%;
        min-width: 0;
      }

      .right .card {
        padding: 12px;
      }

      .mode-btns {
        flex-wrap: wrap;
      }

      .mode-btn {
        flex: 1 1 calc(33% - 5px);
        min-width: 0;
        white-space: normal;
        font-size: 0.72rem;
        padding: 8px 4px;
      }

      .now {
        font-size: 1.375rem;
      }

      .now-row {
        flex-wrap: wrap;
      }

      .now-cn {
        font-size: 0.8125rem;
        word-break: break-all;
      }

      #resultGroups {
        gap: 16px;
      }

      /* 移动端：表格改为卡片列表 */
      .right .region-table {
        display: block;
      }

      .right .region-table thead {
        display: none;
      }

      .right .region-table tbody {
        display: block;
      }

      .right .region-table tbody tr[data-region] {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        margin-bottom: 10px;
        border: 1px solid #eee;
        border-radius: 8px;
        overflow: hidden;
      }

      .right .region-table tbody tr[data-region].row-highlight {
        background: #fff3e0;
        border-color: #ffcc80;
      }

      .right .region-table tbody tr[data-region] td {
        border-bottom: none;
      }

      .right .region-table tbody tr[data-region] .region-cell,
      .right .region-table tbody tr[data-region] .region-cell-wide {
        flex: 0 1 auto;
        display: block;
        width: auto !important;
        min-width: 0 !important;
        max-width: 42%;
        padding: 8px 4px 8px 12px;
      }

      .region-cell-wide .region-cell-inner,
      .region-cell .region-cell-inner {
        white-space: nowrap;
      }

      .region-cell-wide .region-cell-inner span,
      .region-cell .region-cell-inner span {
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
      }

      .right .region-table tbody tr[data-region] .zone-cell {
        flex: 1 1 0;
        display: block;
        width: auto !important;
        min-width: 0 !important;
        max-width: none;
        padding: 8px 12px 8px 0;
      }

      .right .region-table tbody tr[data-region] .relative-cell {
        flex: 0 0 auto;
        display: block;
        width: auto !important;
        min-width: 0 !important;
        max-width: none;
        padding: 8px 8px 8px 0;
        align-self: center;
      }

      .right .region-table tbody tr[data-region] .value-cell {
        flex: 1 1 100%;
        display: block;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 8px 12px 10px;
        background: #fafafa;
        border-top: 1px solid #eee;
      }

      .right .region-table tbody tr[data-region].row-highlight .value-cell {
        background: #ffe0b2;
      }

      .continent-section > .continent-title {
        font-size: 0.9375rem;
        margin-bottom: 12px;
      }

      .continent-header .continent-title {
        margin-bottom: 0;
      }

      .continent-header {
        margin-bottom: 12px;
      }

      .continent-section.is-collapsed .continent-header {
        margin-bottom: 0;
      }

      .continent-toggle-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
      }

      th.time-col,
      .value-cell,
      th.relative-col,
      .relative-cell,
      .region-col,
      .region-cell,
      .region-col-wide,
      .region-cell-wide {
        width: auto;
        min-width: 0;
        max-width: none;
      }

      .zone-select {
        width: 100%;
        max-width: 100%;
      }

      .zone-name {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .value-row {
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
      }

      .value-text {
        white-space: normal;
        word-break: break-all;
        font-size: 0.8125rem;
        line-height: 1.4;
        flex: 1 1 auto;
        min-width: 0;
      }

      .row-copy-btn {
        flex-shrink: 0;
      }
    }

    @media (max-width: 400px) {
      .mode-btns {
        flex-direction: column;
      }

      .mode-btn {
        flex: none;
        width: 100%;
        font-size: 0.8rem;
      }

      html[lang=es] .mode-btns {
        grid-template-columns: 1fr;
      }

      html[lang=es] .mode-btn:nth-child(3) {
        grid-column: auto;
      }
    }