  :root {
    --bg: #f6f7f9;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-2: #f9fafb;
    --text: #101828;
    --muted: #667085;
    --border: #e5e7eb;
    --border-strong: #d0d5dd;
    --link: #175cd3;
    --link-hover: #1849a9;
    --primary: #111827;
    --success: #067647;
    --danger-bg: #fef3f2;
    --danger-border: #fecdca;
    --danger-text: #b42318;
    --chip-bg: #f8f9fb;
    --chip-border: #dfe3e8;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-md: 0 8px 24px rgba(16, 24, 40, 0.08);
    --radius-lg: 18px;
    --maxw: 1120px;
  }

  * {
    box-sizing: border-box;
  }

  html {
    scroll-behavior: smooth;
  }
 
  body {
    margin: 0;
    font-family: "Open Sans", sans-serif;
    background: linear-gradient(180deg, #f8f9fb 0%, #f3f5f8 100%);
    color: var(--text);
    line-height: 1.5;
  }

  a {
    color: var(--link);
    text-decoration: none;
  }

  a:hover {
    color: var(--link-hover);
  }

  .shell {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 28px 18px 56px;
  }

  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    margin-bottom: 20px;
    background: var(--surface);
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex: 0 0 auto;
    border-radius: 12px;
  }

  .brand-copy {
    min-width: 0;
  }

  .brand-title {
    font-family: "Roboto", "Open Sans", sans-serif;
    font-size: 45px;
    line-height: 0.95;
    font-weight: 400;
    letter-spacing: -0.05em;
    color: var(--text);
  }

  .brand-tagline {
    margin-top: 3px;
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
  }

  .nav a {
    display: inline-flex;
    align-items: center;
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: 0.15s ease;
  }

  .nav a:hover {
    border-color: var(--border-strong);
    background: #f9fafb;
    color: var(--link-hover);
  }

  .hero {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    padding: 24px;
    margin-bottom: 18px;
    backdrop-filter: blur(10px);
  }

  .hero h2,
  .hero .page-title {
    margin: 0 0 6px;
    font-size: 30px;
    line-height: 1.06;
    letter-spacing: -0.03em;
  }

  .hero p,
  .hero .page-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
  }

  .hero-live {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
  }

  .hero-main {
    min-width: 0;
    flex: 1 1 auto;
  }

  .hero-side {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .hero-side .live-status {
    margin: 0;
  }

  .panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 18px;
  }

  .panel + .panel {
    margin-top: 16px;
  }

  form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
  }

  input[type="text"],
  input[type="search"],
  select {
    appearance: none;
    flex: 1 1 360px;
    min-width: 220px;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 0 14px;
    font-size: 15px;
    color: var(--text);
    outline: none;
  }

  input[type="text"]:focus,
  input[type="search"]:focus,
  select:focus {
    border-color: #98a2b3;
    box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.06);
  }

  button,
  .button,
  .tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s ease;
  }

  button:hover,
  .button:hover,
  .tab:hover {
    border-color: var(--border-strong);
    background: var(--surface-2);
  }

  button.primary,
  .button.primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
  }

  button.primary:hover,
  .button.primary:hover {
    filter: brightness(1.05);
  }

  .tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
  }

  .tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
  }

  .meta {
    margin: 12px 0 20px;
    color: var(--muted);
    font-size: 14px;
  }

  .meta strong {
    color: var(--text);
  }

  .error {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--danger-border);
    border-radius: 14px;
    background: var(--danger-bg);
    color: var(--danger-text);
  }

  .section-title {
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }

  .result,
  .trend {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 16px 16px 14px;
    margin: 0 0 14px;
  }

  .result.sponsored {
    background: linear-gradient(180deg, #fffbea 0%, #fffdf5 100%);
    border-color: #eadf9d;
  }

  .title a {
    display: inline-block;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
  }

  .title a:hover {
    color: var(--link-hover);
  }

  .url {
    margin-top: 5px;
    color: var(--success);
    font-size: 13px;
    word-break: break-word;
  }

  .snippet {
    margin-top: 10px;
    color: #344054;
    font-size: 16px;
  }

  .chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    align-items: center;
  }

  .chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border: 1px solid var(--chip-border);
    border-radius: 999px;
    background: var(--chip-bg);
    color: #475467;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }

  .chip.sponsored-chip {
    border-color: #e2cf74;
    background: #fff3bf;
    color: #6a5400;
    font-weight: 700;
  }

  .why {
    margin-top: 9px;
    color: var(--muted);
    font-size: 13px;
  }

  .secondary {
    margin: 10px 0 0;
    padding-left: 18px;
  }

  .secondary li {
    margin: 6px 0;
  }

  .live-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 20px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255,255,255,0.84);
    box-shadow: var(--shadow-sm);
  }

  .live-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e53935;
    box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.55);
    animation: live-pulse 1.8s infinite;
  }

  .live-label {
    font-size: 14px;
    color: var(--muted);
  }

  .countdown-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }

  .countdown-pill.warning {
    background: #b42318;
  }

  .muted {
    color: var(--muted);
  }

  .footer {
    margin-top: 28px;
    padding-top: 18px;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
  }

  .overlay-modal[hidden] {
    display: none;
  }

  .overlay-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
  }

  .overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
  }

  .overlay-card {
    position: relative;
    z-index: 1001;
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    margin: 24px auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(16, 24, 40, 0.22);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.96);
  }

  .overlay-title {
    font-size: 20px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
  }

  .overlay-close {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }

  .overlay-close:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
  }

  .overlay-body {
    padding: 18px 20px 20px;
    overflow: auto;
  }

  .overlay-section + .overlay-section {
    margin-top: 14px;
  }

  @keyframes live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(229, 57, 53, 0); }
    100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0); }
  }

  .result-meta-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
    margin-top: 12px;
  }

  .result-meta-why {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.35;
    max-width: 42ch;
  }

  .result-meta-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-self: end;
    white-space: nowrap;
  }

  .result-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
  }

  .result-pill:hover {
    border-color: var(--border-strong);
    background: #f8fafc;
    color: var(--text);
  }

  @media (max-width: 820px) {
    .shell {
      padding-top: 18px;
    }

    .topbar {
      flex-direction: column;
      align-items: flex-start;
    }

    .brand-tagline {
      white-space: normal;
    }

    .nav {
      width: 100%;
    }

    .hero h2,
    .hero .page-title {
      font-size: 24px;
    }

    .hero-live {
      flex-direction: column;
      align-items: flex-start;
    }

    .hero-side {
      width: 100%;
      justify-content: flex-start;
    }

    .title a {
      font-size: 17px;
    }

    @media (max-width: 700px) {
      .result-meta-row {
        grid-template-columns: 1fr;
        gap: 8px;
      }

      .result-meta-actions {
        justify-self: start;
      }

      .result-meta-why {
        max-width: none;
      }
    }

      .share-panel {
      display: grid;
      gap: 14px;
    }

    .share-panel-copy {
      color: #4b5563;
      font-size: 0.95rem;
      line-height: 1.45;
    }

    .share-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    @media (min-width: 640px) {
      .share-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }
  }
  .share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #d7dce5;
    border-radius: 12px;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
  }

  .share-btn:hover {
    background: #f8fafc;
    border-color: #b8c2d1;
  }

  .share-btn:active {
    transform: translateY(1px);
  }

  .share-btn-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    flex: 0 0 auto;
  }

  .share-url-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
  }

  .share-url-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid #d7dce5;
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    color: #0f172a;
    background: #f8fafc;
  }

  .share-status {
    min-height: 1.25rem;
    font-size: 0.9rem;
    color: #2563eb;
  }

  .share-links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
  }

  .share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #d7dce5;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
  }

  .composer-share-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    align-items: center;
  }

  .composer-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    min-height: 32px;
    border: 1px solid #d7dce5;
    border-radius: 999px;
    background: #ffffff;
    color: #0f172a;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
  }

  .composer-share-btn:hover {
    background: #f8fafc;
    border-color: #b8c2d1;
  }

  .composer-share-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    align-items: center;
  }

  a.composer-share-btn,
  button.composer-share-btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    vertical-align: middle;
    min-height: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #d7dce5;
    border-radius: 999px;
    background: #ffffff;
    color: #0f172a;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
    margin: 0;
  }

  a.composer-share-btn:hover,
  button.composer-share-btn:hover {
    background: #f8fafc;
    border-color: #b8c2d1;
    color: #0f172a;
  }

  .composer-share-icon {
    width: 14px;
    height: 14px;
    display: inline-block;
    flex: 0 0 auto;
    object-fit: contain;
  }

  .composer-share-btn-icon-only {
    width: 32px;
    min-width: 32px;
    padding: 0;
    border-radius: 999px;
  }

  .composer-share-btn-icon-only .composer-share-icon {
    width: 14px;
    height: 14px;
  }