  /* Ticker Bars - Mobile Optimized & Enhanced Readability */
  /* ===== V3 PRO TICKER SYSTEM ===== */
  .twh-ticker-bar {
    width: 100%;
    min-height: 42px;
    height: 42px;
    background: linear-gradient(180deg, #0d1724 0%, #09111c 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.025);
    display: flex;
    align-items: stretch;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  .twh-ticker-bar.hidden {
    display: none !important;
  }

  .twh-ticker-badge {
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0 0.65rem;
    height: 100%;
    min-width: 104px;
    width: 104px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.45rem;
    white-space: nowrap;
    z-index: 5;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    text-align: left;
    box-shadow: inset -1px 0 rgba(255,255,255,0.15), 7px 0 18px rgba(0,0,0,0.22);
  }

  @media (min-width: 640px) {
    .twh-ticker-badge {
      min-width: 110px;
      width: 110px;
      font-size: 0.72rem;
      padding: 0 0.7rem;
    }
  }

  .twh-ticker-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    background: #d1fae5;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(74,222,128,.7);
    animation: pulseDot 1.5s infinite;
    -webkit-animation: pulseDot 1.5s infinite;
  }

  .twh-ticker-badge.pulse-green::before {
    background: #4ade80 !important;
    box-shadow: 0 0 10px #4ade80;
    animation: pulseGreenAnim 1.2s infinite;
    -webkit-animation: pulseGreenAnim 1.2s infinite;
  }

  @keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
  }
  @-webkit-keyframes pulseDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
  }
  @keyframes pulseGreenAnim {
    0% { transform: scale(1); opacity: 1; }
    70% { transform: scale(1.35); opacity: .75; }
    100% { transform: scale(1); opacity: 1; }
  }
  @-webkit-keyframes pulseGreenAnim {
    0% { -webkit-transform: scale(1); opacity: 1; }
    70% { -webkit-transform: scale(1.35); opacity: .75; }
    100% { -webkit-transform: scale(1); opacity: 1; }
  }

  .twh-ticker-track {
    flex: 1;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    background:
      linear-gradient(90deg, rgba(30,41,59,.08), transparent 14%, transparent 86%, rgba(2,6,23,.55)),
      #0b1420;
    mask-image: linear-gradient(to right, transparent 0, black 10px, black calc(100% - 20px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 10px, black calc(100% - 20px), transparent 100%);
  }

  .twh-ticker-content {
    display: inline-flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    width: max-content;
    height: 100%;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  /* Uniform ticker motion:
     JS calculates --ticker-duration from the rendered content width,
     so every ticker set to the same speed moves at the same pixels/second. */
  .twh-ticker-content.speed-slowest,
  .twh-ticker-content.speed-slower,
  .twh-ticker-content.speed-slow,
  .twh-ticker-content.speed-normal,
  .twh-ticker-content.speed-fast {
    animation: tickerScroll var(--ticker-duration, 75s) linear infinite;
    -webkit-animation: tickerScroll var(--ticker-duration, 75s) linear infinite;
  }
  .twh-ticker-content.speed-paused  { animation: none !important; -webkit-animation: none !important; }

  .twh-ticker-content:hover {
    animation-play-state: paused;
    -webkit-animation-play-state: paused;
  }

  @keyframes tickerScroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
  }
  @-webkit-keyframes tickerScroll {
    0% { -webkit-transform: translate3d(0, 0, 0); }
    100% { -webkit-transform: translate3d(-50%, 0, 0); }
  }

  /* Flat professional items — no pill cards */
  .twh-game-item {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    height: 30px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #e5edf7;
    background: transparent;
    padding: 0 0.72rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    flex-shrink: 0;
    position: relative;
  }

  .twh-game-item::after {
    content: '';
    position: absolute;
    right: 0;
    top: 5px;
    bottom: 5px;
    width: 1px;
    background: rgba(148,163,184,.22);
  }

  .twh-game-item .league,
  .twh-game-item .crypto-symbol,
  .twh-game-item .stock-symbol,
  .twh-game-item .weather-city {
    color: #f8fafc !important;
    font-weight: 800;
    font-size: 0.74rem;
    letter-spacing: .01em;
  }

  .twh-game-item .news-source {
    color: #f8fafc !important;
    font-weight: 800;
    font-size: 0.74rem;
  }

  .twh-game-item .score-live,
  .twh-game-item .crypto-price,
  .twh-game-item .weather-temp {
    color: #4ade80;
    font-weight: 800;
  }

  .twh-game-item .stock-price {
    color: #f8fafc;
    font-weight: 800;
  }

  .twh-game-item .status {
    color: #a7b4c5;
    font-size: 0.7rem;
    font-weight: 600;
  }

  .twh-ticker-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    line-height: 1;
    border-radius: 5px;
    background: rgba(255,255,255,.04);
  }

  .twh-market-name {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.05;
    gap: 3px;
  }

  .twh-market-name strong {
    color: #f8fafc;
    font-size: .73rem;
    letter-spacing: .015em;
  }

  .twh-market-name small {
    color: #cbd5e1;
    font-size: .72rem;
    font-weight: 700;
  }

  .twh-change {
    font-size: .71rem;
    font-weight: 800;
  }
  .twh-change.up { color: #22c55e; }
  .twh-change.down { color: #ef4444; }
  .twh-change.flat { color: #94a3b8; }

  .twh-weather-stack {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.05;
    gap: 4px;
  }

  .twh-weather-stack .weather-city {
    font-size: .72rem;
  }

  .twh-game-item a.news-link,
  .twh-game-item a.sports-link,
  .twh-game-item a.crypto-link,
  .twh-game-item a.stock-link,
  .twh-game-item a.weather-link,
  .twh-game-item a.updates-link {
    color: #e5edf7;
    text-decoration: none;
    font-weight: 600;
    transition: color .2s ease;
  }

  .twh-game-item a.news-link:hover,
  .twh-game-item a.sports-link:hover,
  .twh-game-item a.crypto-link:hover,
  .twh-game-item a.stock-link:hover,
  .twh-game-item a.weather-link:hover,
  .twh-game-item a.updates-link:hover {
    color: #60a5fa;
    text-decoration: none;
  }

  #announcementsTickerBar .twh-game-item,
  #newsTickerBar .twh-game-item {
    height: 32px;
    margin: 0 3px;
    border: 1px solid rgba(148,163,184,.13);
    border-radius: 9px;
    background: linear-gradient(180deg, rgba(30,41,59,.42), rgba(15,23,42,.38));
    padding: 0 .7rem;
  }

  #announcementsTickerBar .twh-game-item::after,
  #newsTickerBar .twh-game-item::after {
    display: none;
  }

  #announcementsTickerBar .twh-game-item:first-child::before {
    content: '✨';
    margin-right: .1rem;
  }

  /* On narrow screens keep rows readable without making them huge */
  @media (max-width: 700px) {
    .twh-ticker-bar {
      height: 40px;
      min-height: 40px;
    }
    .twh-ticker-badge {
      min-width: 88px;
      width: 88px;
      font-size: .64rem;
      padding: 0 .45rem;
    }
    .twh-game-item {
      padding: 0 .55rem;
      font-size: .68rem;
    }
    .twh-ticker-icon {
      width: 18px;
      height: 18px;
      min-width: 18px;
      font-size: .85rem;
    }
  }


  /* ===== V4 USER-FRIENDLY SETTINGS ===== */
  #twhSettingsModal .twh-modal-card {
    width: min(760px, calc(100vw - 32px));
    max-width: 760px;
    max-height: min(82vh, 760px);
    padding: 0;
    gap: 0;
    overflow: hidden;
  }

  #twhSettingsModal .twh-modal-header {
    padding: 1rem 1.1rem 0.85rem;
    margin: 0;
    flex-shrink: 0;
  }

  #twhSettingsModal .twh-modal-header h3 {
    font-size: 1rem;
    margin: 0;
  }

  .twh-settings-tabs {
    display: flex;
    gap: 0.3rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.35);
    overflow-x: auto;
    flex-shrink: 0;
    scrollbar-width: thin;
  }

  .twh-settings-tab {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    border-radius: 8px;
    padding: 0.5rem 0.72rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
  }

  .twh-settings-tab:hover {
    color: var(--text-main);
    background: rgba(148, 163, 184, 0.08);
  }

  .twh-settings-tab.active {
    color: #fff;
    background: var(--accent);
    border-color: rgba(255,255,255,.08);
  }

  .twh-settings-body {
    overflow-y: auto;
    padding: 1rem;
    min-height: 0;
    flex: 1;
    scrollbar-width: thin;
  }

  .twh-settings-panel {
    display: none;
  }

  .twh-settings-panel.active {
    display: block;
  }

  .twh-settings-section {
    border: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.22);
    border-radius: 12px;
    padding: 0.9rem;
    margin-bottom: 0.8rem;
  }

  .twh-settings-section:last-child {
    margin-bottom: 0;
  }

  .twh-settings-section-title {
    margin: 0 0 0.25rem;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 800;
  }

  .twh-settings-section-help {
    margin: 0 0 0.8rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.4;
  }

  .twh-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .twh-setting-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
  }

  .twh-setting-field label,
  .twh-setting-label {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
  }

  .twh-setting-field select,
  .twh-setting-field input[type="text"],
  .twh-setting-field input[type="url"] {
    width: 100%;
    max-width: none;
  }

  .twh-setting-inline {
    display: flex;
    align-items: end;
    gap: 0.55rem;
  }

  .twh-setting-inline .twh-setting-field {
    flex: 1;
  }

  /* Ticker settings cards */
  #twhTickersOrderList {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem !important;
  }

  .twh-ticker-setting-card {
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 10px;
    padding: 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
  }

  .twh-ticker-setting-top {
    display: flex;
    align-items: center;
    gap: 0.55rem;
  }

  .twh-ticker-reorder {
    display: flex;
    gap: 0.25rem;
  }

  .twh-ticker-reorder button {
    width: 27px;
    height: 27px;
    border-radius: 7px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.7rem;
    line-height: 1;
  }

  .twh-ticker-reorder button:disabled {
    opacity: 0.28;
    cursor: default;
  }

  .twh-ticker-setting-name {
    flex: 1;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-main);
    min-width: 0;
  }

  .twh-ticker-setting-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.55rem;
    align-items: end;
  }

  .twh-ticker-speed {
    min-width: 0;
  }

  .twh-ticker-speed select {
    width: 100%;
    max-width: none;
    font-size: 0.72rem;
    padding: 0.4rem 0.45rem;
  }

  .twh-color-control {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
  }

  .twh-color-control input[type="color"] {
    width: 38px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: transparent;
    cursor: pointer;
  }

  .twh-switch {
    position: relative;
    display: inline-flex;
    width: 38px;
    height: 22px;
    flex-shrink: 0;
  }

  .twh-switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  .twh-switch-slider {
    position: absolute;
    inset: 0;
    background: #475569;
    border-radius: 999px;
    cursor: pointer;
    transition: .18s ease;
  }

  .twh-switch-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: .18s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.35);
  }

  .twh-switch input:checked + .twh-switch-slider {
    background: var(--accent);
  }

  .twh-switch input:checked + .twh-switch-slider::before {
    transform: translateX(16px);
  }

  .twh-settings-action-row {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
  }

  .twh-settings-action-row > button {
    flex: 1;
    min-width: 145px;
  }

  .twh-settings-footer {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    border-top: 1px solid var(--border-color);
    background: rgba(15,23,42,.45);
    flex-shrink: 0;
  }

  .twh-settings-footer button {
    min-width: 120px;
  }

  @media (max-width: 650px) {
    #twhSettingsModal .twh-modal-card {
      width: calc(100vw - 18px);
      max-height: 88vh;
    }

    .twh-settings-grid,
    #twhTickersOrderList {
      grid-template-columns: 1fr !important;
    }

    .twh-setting-inline {
      align-items: stretch;
      flex-direction: column;
    }

    .twh-settings-footer {
      flex-direction: column-reverse;
    }

    .twh-settings-footer button {
      width: 100%;
    }
  }

  /* Sleek Glassmorphism Modal Styles */
  .twh-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .twh-modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  #twhDeleteModal, #twhResetModal, #twhResetColorModal, #twhResetEngineModal, #twhSponsorModal, #twhPinModal, #twhClearCacheModal {
    z-index: 2000;
  }

  .twh-modal-card {
    background: var(--card-bg, #151c2e);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 20px;
    width: 92%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 1.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
    color: var(--text-main, #f8fafc);
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .twh-modal-overlay.open .twh-modal-card {
    transform: scale(1);
  }

  .twh-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.85rem;
  }

  .twh-modal-header h3 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.01em;
  }

  .twh-close-btn {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
  }

  .twh-close-btn:hover {
    color: var(--text-main);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
  }

  .twh-control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .twh-control-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .twh-control-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: var(--text-main);
    user-select: none;
    font-weight: 500;
    font-size: 0.85rem;
  }

  .twh-control-group input[type="checkbox"] {
    accent-color: var(--accent);
    cursor: pointer;
    width: 16px;
    height: 16px;
  }

  .twh-control-group select {
    background: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    width: 100%;
    max-width: 190px;
    transition: border-color 0.2s;
  }

  .twh-control-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
  }

  /* Open Manila Filing Folder Styling */
  .twh-shortcuts-container {
    position: relative;
    width: 100%;
    margin-top: 3.2rem;
    transition: margin-top 0.2s ease;
  }

  .twh-shortcuts-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    justify-content: flex-start;
    align-items: flex-end;
    padding: 0 0.5rem;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 5;
    width: 100%;
    pointer-events: none;
  }

  @media (min-width: 640px) {
    .twh-shortcuts-container {
      padding: 0 1.25rem;
    }
  }

  /* Individual Compact Mobile-Optimized Handwritten Tab Styling */
  .twh-shortcut-chip {
    pointer-events: auto;
    background: var(--tab-bg, #ebd49f);
    color: var(--tab-text, #3b2a0f);
    border: 2px solid var(--tab-border, #5c471c);
    border-bottom: 8px solid var(--tab-bg, #ebd49f);
    padding: 0.2rem 0.55rem 0.55rem 0.55rem;
    border-radius: 8px 10px 0 0;
    font-family: 'Caveat', cursive !important;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    margin-right: -2px;
    margin-bottom: -6px;
    white-space: nowrap;
    z-index: 10;
    flex-shrink: 0;
  }
  @media (min-width: 640px) {
    .twh-shortcut-chip {
      padding: 0.3rem 0.8rem 0.65rem 0.8rem;
      font-size: 1.1rem;
    }
  }

  .twh-shortcut-chip:hover {
    filter: brightness(1.08);
    transform: translateY(-3px);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.22);
    z-index: 30;
  }

  .twh-shortcut-del {
    color: inherit;
    opacity: 0.75;
    font-size: 0.65rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 2px;
    font-weight: 800;
    transition: opacity 0.15s;
  }
  .twh-shortcut-del:hover {
    opacity: 1;
    color: #dc2626;
  }

  .twh-color-swatches {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.4rem;
  }

  .twh-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.25);
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
  }
  .twh-swatch:hover {
    transform: scale(1.15);
    border-color: #5c471c;
  }

  .twh-add-shortcut-btn {
    pointer-events: auto;
    background: #10b981;
    color: #ffffff;
    border: 2px solid #047857;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    margin-left: 0.3rem;
    margin-bottom: 0.2rem;
    z-index: 20;
    flex-shrink: 0;
  }

  .twh-add-shortcut-btn:hover {
    background: #059669;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.6);
  }

  /* Minimalist Gear Button on Top Right of Manila Folder */
  .twh-top-gear-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    background: transparent;
    border: none;
    color: #5c471c;
    font-size: 1.35rem;
    cursor: pointer;
    z-index: 30;
    padding: 0;
    line-height: 1;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s;
  }
  .twh-top-gear-btn:hover {
    transform: scale(1.2) rotate(45deg);
    color: #1f1402;
  }




  /* ===== V7.2 THEME-SAFE READABILITY ===== */
  .twh-dropdown-section,
  .twh-dropdown-section * {
    box-sizing: border-box;
  }

  .twh-dropdown-accordion,
  .twh-dropdown-accordion summary,
  .twh-accordion-content,
  .twh-guide-card,
  .twh-sub-item,
  .twh-help-tip,
  .twh-footer,
  .twh-footer details,
  .twh-footer summary {
    color: var(--text-main) !important;
  }

  .twh-dropdown-accordion summary {
    background: var(--card-bg) !important;
    border-color: var(--border-color) !important;
  }

  .twh-accordion-content {
    background: transparent !important;
  }

  .twh-guide-card,
  .twh-sub-item {
    background: var(--card-bg) !important;
    border-color: var(--border-color) !important;
  }

  .twh-guide-card h3,
  .twh-sub-item h4,
  .twh-accordion-content h3,
  .twh-accordion-content strong,
  .twh-help-tip strong,
  .twh-footer strong {
    color: var(--text-main) !important;
  }

  .twh-guide-card p,
  .twh-sub-item p,
  .twh-accordion-content p,
  .twh-footer p,
  .twh-footer div {
    color: var(--text-muted) !important;
  }

  .twh-guide-badge {
    color: #ffffff !important;
  }

  .twh-accordion-content code,
  .twh-help-tip code {
    color: var(--text-main) !important;
    background: rgba(127, 127, 127, 0.16) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 4px;
    padding: 0.06rem 0.25rem;
  }

  .twh-help-tip {
    background: color-mix(in srgb, var(--accent) 12%, var(--card-bg)) !important;
    border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border-color)) !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
  }

  .twh-help-tip,
  .twh-help-tip p,
  .twh-help-tip span,
  .twh-help-tip div {
    color: var(--text-main) !important;
  }

  .twh-help-tip code {
    color: var(--text-main) !important;
  }

  .twh-footer details > summary {
    color: var(--text-main) !important;
  }

  /* Fallbacks for browsers without color-mix(). */
  @supports not (background: color-mix(in srgb, white 50%, black)) {
    .twh-help-tip {
      background: var(--card-bg) !important;
      border-color: var(--accent) !important;
    }
  }

  /* Light themes: keep cards and helper text readable without relying on dark-theme colors. */
  [data-theme="light"] .twh-dropdown-accordion,
  [data-theme="light"] .twh-dropdown-accordion summary,
  [data-theme="light"] .twh-guide-card,
  [data-theme="light"] .twh-sub-item,
  [data-theme="light"] .twh-help-tip,
  [data-theme="light"] .twh-footer {
    color: var(--text-main) !important;
  }

  /* OLED/Cyberpunk: prevent inherited near-black text in dark cards. */
  [data-theme="oled"] .twh-dropdown-section *,
  [data-theme="cyberpunk"] .twh-dropdown-section *,
  [data-theme="dark"] .twh-dropdown-section * {
    text-shadow: none;
  }

  /* ===== V7 POWER UPGRADE ===== */

  /* Active ticker count on the quick button */
  .twh-ticker-count-badge {
    position: absolute;
    top: -8px;
    right: -11px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    border: 2px solid #f1dfb2;
    font-size: .58rem;
    font-weight: 900;
    line-height: 1;
  }

  /* Ticker presets */
  .twh-preset-row {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
    margin: .55rem 0 .65rem;
  }

  .twh-preset-btn {
    flex: 1 1 70px;
    min-width: 68px;
    padding: .38rem .42rem;
    border-radius: 7px;
    border: 1px solid rgba(148,163,184,.25);
    background: rgba(30,41,59,.78);
    color: #e2e8f0;
    font-size: .62rem;
    font-weight: 800;
    cursor: pointer;
  }

  .twh-preset-btn:hover {
    background: rgba(51,65,85,.95);
  }

  /* Density controls */
  .twh-density-compact .twh-ticker-bar {
    height: 34px !important;
    min-height: 34px !important;
  }
  .twh-density-compact .twh-game-item {
    height: 26px !important;
    font-size: .66rem !important;
  }
  .twh-density-compact .twh-ticker-badge {
    font-size: .64rem !important;
  }

  .twh-density-comfortable .twh-ticker-bar {
    height: 48px !important;
    min-height: 48px !important;
  }
  .twh-density-comfortable .twh-game-item {
    height: 35px !important;
    font-size: .76rem !important;
  }

  /* Pause behavior */
  .twh-ticker-track:hover .twh-ticker-content,
  .twh-ticker-bar.twh-manual-paused .twh-ticker-content,
  .twh-reduced-motion .twh-ticker-content,
  .twh-reduced-motion .twh-marquee-track {
    animation-play-state: paused !important;
    -webkit-animation-play-state: paused !important;
  }

  .twh-ticker-badge {
    cursor: pointer;
    user-select: none;
  }

  .twh-ticker-bar.twh-manual-paused .twh-ticker-badge::after {
    content: ' Ⅱ';
    font-size: .58rem;
    opacity: .9;
  }

  /* Collapsed ticker area */
  .twh-collapsed-ticker-summary {
    display: none;
    width: 100%;
    height: 30px;
    min-height: 30px;
    align-items: center;
    gap: .55rem;
    padding: 0 .75rem;
    border-bottom: 1px solid rgba(148,163,184,.22);
    background: #0b1421;
    color: #cbd5e1;
    font-size: .68rem;
    font-weight: 700;
  }

  #twhTickersContainer.twh-tickers-collapsed .twh-ticker-bar {
    display: none !important;
  }

  #twhTickersContainer.twh-tickers-collapsed .twh-collapsed-ticker-summary {
    display: flex;
  }

  /* Feed-health UI */
  .twh-health-wrap {
    display: flex;
    align-items: center;
    gap: .28rem;
    margin-left: auto;
    min-width: 0;
  }

  .twh-health-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex: 0 0 7px;
    background: #64748b;
  }

  .twh-health-dot.ok { background: #22c55e; }
  .twh-health-dot.stale { background: #f59e0b; }
  .twh-health-dot.error { background: #ef4444; }
  .twh-health-dot.idle { background: #64748b; }

  .twh-health-text {
    font-size: .56rem;
    color: var(--text-muted);
    white-space: nowrap;
  }

  /* Drag ticker cards */
  .twh-ticker-setting-card[draggable="true"] {
    cursor: grab;
  }

  .twh-ticker-setting-card.twh-dragging {
    opacity: .45;
    cursor: grabbing;
  }

  .twh-ticker-setting-card.twh-drag-over {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  /* Search history */
  .twh-search-history {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 70;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    border: 1px solid rgba(92,71,28,.35);
    border-radius: 10px;
    background: #fffaf0;
    color: #4b3710;
    box-shadow: 0 12px 28px rgba(0,0,0,.2);
    padding: .35rem;
  }

  .twh-search-history.open {
    display: block;
  }

  .twh-history-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    padding: .35rem .45rem .4rem;
    font-size: .67rem;
    font-weight: 800;
    color: #765d24;
  }

  .twh-history-clear {
    border: 0;
    background: transparent;
    color: #9a3412;
    font-size: .61rem;
    cursor: pointer;
  }

  .twh-history-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .45rem;
    border: 0;
    background: transparent;
    padding: .45rem .5rem;
    border-radius: 7px;
    color: #4b3710;
    text-align: left;
    cursor: pointer;
    font-size: .7rem;
  }

  .twh-history-item:hover,
  .twh-history-item:focus {
    background: #f4e7c5;
    outline: none;
  }

  .twh-history-query {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .twh-history-engine {
    color: #997a31;
    font-size: .58rem;
  }

  /* Favorite engine stars */
  .twh-engine-chip {
    position: relative;
  }

  .twh-engine-favorite {
    border: 0;
    background: transparent;
    color: #a16207;
    cursor: pointer;
    padding: 0 .08rem;
    font-size: .78rem;
    line-height: 1;
  }

  .twh-engine-favorite.is-favorite {
    color: #eab308;
  }

  /* Command palette */
  .twh-command-palette-card {
    width: min(620px, calc(100vw - 28px));
    padding: .75rem;
  }

  .twh-command-input {
    width: 100%;
    padding: .72rem .8rem;
    border-radius: 9px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-main);
    font-size: .92rem;
  }

  .twh-command-results {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    max-height: 360px;
    overflow-y: auto;
    margin-top: .55rem;
  }

  .twh-command-result {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .58rem .65rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
  }

  .twh-command-result:hover,
  .twh-command-result.active {
    background: rgba(148,163,184,.1);
    border-color: var(--border-color);
  }

  .twh-command-key {
    margin-left: auto;
    color: var(--text-muted);
    font-size: .62rem;
  }

  /* Custom engine management */
  .twh-custom-engine-list {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-top: .65rem;
  }

  .twh-custom-engine-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .55rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(15,23,42,.18);
  }

  .twh-custom-engine-row span {
    flex: 1;
    min-width: 0;
    font-size: .7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .twh-mini-danger {
    border: 1px solid rgba(239,68,68,.35);
    background: rgba(239,68,68,.1);
    color: #ef4444;
    border-radius: 6px;
    padding: .28rem .45rem;
    cursor: pointer;
    font-size: .62rem;
  }

  /* Mobile single-ticker rotation mode */
  @media (max-width: 600px) {
    .twh-mobile-rotate-active .twh-ticker-bar.twh-mobile-rotate-hidden {
      display: none !important;
    }
  }

  /* ===== QUICK TICKER BUTTON + PANEL ===== */
  .twh-top-ticker-btn {
    position: absolute;
    top: 16px;
    left: 20px;
    background: transparent;
    border: none;
    color: #5c471c;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 45;
    padding: 0;
    line-height: 1;
    transition: transform .18s ease, color .18s ease;
  }

  .twh-top-ticker-btn:hover,
  .twh-top-ticker-btn[aria-expanded="true"] {
    transform: scale(1.16);
    color: #1f1402;
  }

  .twh-quick-ticker-panel {
    position: absolute;
    top: 48px;
    left: 16px;
    z-index: 60;
    width: min(430px, calc(100% - 32px));
    background: rgba(15, 23, 42, .98);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(0,0,0,.45);
    padding: .8rem;
    display: none;
  }

  .twh-quick-ticker-panel.open {
    display: block;
  }

  .twh-quick-ticker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid rgba(148,163,184,.2);
  }

  .twh-quick-ticker-title {
    font-size: .82rem;
    font-weight: 800;
    color: #f8fafc;
  }

  .twh-quick-ticker-subtitle {
    font-size: .64rem;
    color: #94a3b8;
    margin-top: .12rem;
  }

  .twh-quick-close {
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    padding: .2rem;
  }


  .twh-quick-master-row {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin: .65rem 0;
    padding: .62rem .7rem;
    background: rgba(37, 99, 235, .10);
    border: 1px solid rgba(96, 165, 250, .28);
    border-radius: 9px;
  }

  .twh-quick-master-copy {
    flex: 1;
    min-width: 0;
  }

  .twh-quick-master-title {
    font-size: .72rem;
    font-weight: 800;
    color: #f8fafc;
  }

  .twh-quick-master-note {
    margin-top: .1rem;
    font-size: .61rem;
    line-height: 1.3;
    color: #94a3b8;
  }

  .twh-master-switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex: 0 0 46px;
  }

  .twh-master-switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  .twh-master-switch span {
    position: absolute;
    inset: 0;
    cursor: pointer;
    border-radius: 999px;
    background: #475569;
    transition: .18s ease;
  }

  .twh-master-switch span::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    transition: .18s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.35);
  }

  .twh-master-switch input:checked + span {
    background: #22c55e;
  }

  .twh-master-switch input:checked + span::before {
    transform: translateX(20px);
  }

  .twh-quick-speed-row {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: .65rem 0;
    padding: .55rem;
    background: rgba(148,163,184,.07);
    border: 1px solid rgba(148,163,184,.15);
    border-radius: 9px;
  }

  .twh-quick-speed-row label {
    flex: 1;
    font-size: .7rem;
    font-weight: 700;
    color: #cbd5e1;
  }

  .twh-quick-speed-row select {
    min-width: 118px;
    padding: .38rem .45rem;
    border-radius: 7px;
    border: 1px solid rgba(148,163,184,.3);
    background: #0f172a;
    color: #f8fafc;
    font-size: .7rem;
  }

  .twh-quick-ticker-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: .35rem;
    max-height: 270px;
    overflow-y: auto;
    padding-right: .15rem;
    scrollbar-width: thin;
  }

  .twh-quick-ticker-item {
    display: flex;
    align-items: center;
    gap: .45rem;
    min-width: 0;
    padding: .42rem .48rem;
    border: 1px solid rgba(148,163,184,.16);
    background: rgba(30,41,59,.72);
    border-radius: 8px;
  }

  .twh-quick-ticker-icon {
    width: 20px;
    text-align: center;
    flex: 0 0 20px;
    font-size: .82rem;
  }

  .twh-quick-ticker-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .69rem;
    font-weight: 700;
    color: #e2e8f0;
  }

  .twh-quick-switch {
    position: relative;
    width: 34px;
    height: 20px;
    flex: 0 0 34px;
  }

  .twh-quick-switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  .twh-quick-switch span {
    position: absolute;
    inset: 0;
    cursor: pointer;
    border-radius: 999px;
    background: #475569;
    transition: .18s ease;
  }

  .twh-quick-switch span::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: #fff;
    transition: .18s ease;
  }

  .twh-quick-switch input:checked + span {
    background: #2563eb;
  }

  .twh-quick-switch input:checked + span::before {
    transform: translateX(14px);
  }

  .twh-quick-actions {
    display: flex;
    gap: .45rem;
    margin-top: .65rem;
    padding-top: .65rem;
    border-top: 1px solid rgba(148,163,184,.2);
  }

  .twh-quick-actions button {
    flex: 1;
    border-radius: 8px;
    padding: .5rem .6rem;
    border: 1px solid rgba(148,163,184,.28);
    cursor: pointer;
    font-size: .68rem;
    font-weight: 800;
  }

  .twh-quick-full-settings {
    background: #2563eb;
    color: white;
  }

  .twh-quick-hide-all {
    background: rgba(148,163,184,.08);
    color: #cbd5e1;
  }

  @media (max-width: 520px) {
    .twh-quick-ticker-panel {
      left: 8px;
      width: calc(100% - 16px);
    }

    .twh-quick-ticker-grid {
      grid-template-columns: 1fr;
      max-height: 310px;
    }
  }

  .twh-search-card {
    width: 100%;
    background: linear-gradient(135deg, #f4e3be 0%, #ebd29c 100%);
    border: 2px solid #5c471c;
    border-radius: 16px;
    padding: 1.5rem 1.25rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), inset 0 2px 5px rgba(255, 255, 255, 0.5);
    color: #2b1f0b !important;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .twh-search-card::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 8px;
    right: 8px;
    height: 4px;
    background: rgba(92, 71, 28, 0.15);
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
    pointer-events: none;
  }

  @media (min-width: 640px) {
    .twh-search-card { padding: 2rem 1.75rem; }
  }

  .twh-search-card input {
    background-color: #fbf7ee !important;
    border: 1px solid #9e7f38 !important;
    color: #2b1f0b !important;
  }
  .twh-search-card input::placeholder {
    color: #8c7344 !important;
  }

  .twh-search-card .twh-tab-btn {
    background: #ebd49f !important;
    border: 1px solid #9e7f38 !important;
    color: #5c471c !important;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: grab;
    transition: all 0.2s;
    user-select: none;
  }
  .twh-search-card .twh-tab-btn:active {
    cursor: grabbing;
  }
  .twh-search-card .twh-tab-btn:hover {
    background: #f1dcab !important;
    color: #1f1402 !important;
    border-color: #5c471c !important;
    transform: translateY(-1px);
  }
  .twh-search-card .twh-tab-btn.active {
    color: #1f1402 !important;
    background-color: #dfbf75 !important;
    border-color: #5c471c !important;
    font-weight: 700;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  }
  .twh-tab-btn.dragging {
    opacity: 0.4;
    border: 2px dashed #5c471c !important;
  }

  .twh-category-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    padding-bottom: 0.25rem;
    margin-bottom: 0.15rem;
  }

  .twh-engine-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
  }

  .twh-search-card .twh-engine-chip {
    background: #fcf8ee !important;
    border: 1px solid #9e7f38 !important;
    color: #3b2a0f !important;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: grab;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    user-select: none;
  }
  .twh-search-card .twh-engine-chip:active {
    cursor: grabbing;
  }
  .twh-search-card .twh-engine-chip:hover {
    background: #fffdf9 !important;
    border-color: #5c471c !important;
    transform: translateY(-1px);
  }
  .twh-search-card .twh-engine-chip.active-default {
    background: #ebd49f !important;
    border-color: #5c471c !important;
  }
  .twh-engine-chip.dragging {
    opacity: 0.4;
    border: 2px dashed #5c471c !important;
  }

  /* Dynamic Folder Themes & Print Patterns */
  .twh-folder-manila {
    background: linear-gradient(135deg, #f4e3be 0%, #ebd29c 100%) !important;
    border-color: #5c471c !important;
    color: #2b1f0b !important;
  }
  .twh-folder-charcoal {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
  }
  .twh-folder-navy {
    background: linear-gradient(135deg, #1e3a8a 0%, #172554 100%) !important;
    border-color: #3b82f6 !important;
    color: #eff6ff !important;
  }
  .twh-folder-green {
    background: linear-gradient(135deg, #064e3b 0%, #022c22 100%) !important;
    border-color: #059669 !important;
    color: #ecfdf5 !important;
  }
  .twh-folder-cork {
    background: #c89658 radial-gradient(circle, #b88648 10%, transparent 11%) 0 0/16px 16px, #a87232 !important;
    border-color: #5c3a1c !important;
    color: #2b1705 !important;
  }
  .twh-folder-newspaper {
    background: #e8e4dc repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px) !important;
    border-color: #333333 !important;
    color: #111111 !important;
  }
  .twh-folder-blueprint {
    background: #1d4ed8 linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px), #1d4ed8 linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px) 0 0/20px 20px !important;
    border-color: #93c5fd !important;
    color: #ffffff !important;
  }

  /* Crisp Rubber Stamp Header Style */
  .twh-folder-stamp {
    text-align: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px dashed rgba(0, 0, 0, 0.2);
  }

  .twh-folder-stamp h2 {
    font-family: 'Courier Prime', monospace;
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transform: rotate(-1.5deg);
    word-break: break-word;
    opacity: 0.92;
  }

  .twh-folder-stamp h2 span {
    color: var(--accent);
    transition: color 0.3s ease;
  }

  .twh-folder-stamp p {
    font-family: 'Courier Prime', monospace;
    font-size: clamp(0.65rem, 2vw, 0.75rem);
    font-weight: 700;
    margin-top: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
  }

  /* Partner Logo Marquee Section */
  .twh-marquee-section {
    width: 100%;
    max-width: var(--box-width, 800px);
    height: var(--box-height, auto);
    min-height: 80px;
    margin: 1.5rem auto 0 auto;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.5rem 0;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    transition: max-width 0.3s ease, height 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .twh-marquee-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.6rem;
    gap: 0.5rem;
  }

  .twh-marquee-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted, #94a3b8);
    margin: 0;
    text-align: center;
  }

  .twh-marquee-track-wrapper {
    overflow: hidden;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    mask-image: linear-gradient(to right, transparent, black 15px, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15px, black 85%, transparent);
  }

  .twh-marquee-track {
    display: flex;
    align-items: center;
    gap: 3rem;
    width: max-content;
    will-change: transform;
  }

  .twh-marquee-track.speed-slowest { animation: logoScroll 150s linear infinite; }
  .twh-marquee-track.speed-slower { animation: logoScroll 100s linear infinite; }
  .twh-marquee-track.speed-slow { animation: logoScroll 75s linear infinite; }
  .twh-marquee-track.speed-normal { animation: logoScroll 30s linear infinite; }
  .twh-marquee-track.speed-fast { animation: logoScroll 15s linear infinite; }
  .twh-marquee-track.speed-paused { animation: none !important; }

  .twh-marquee-track:hover {
    animation-play-state: paused;
  }

  @keyframes logoScroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
  }

  .twh-partner-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.25rem 0.5rem;
    color: var(--text-main, #f8fafc);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
    transition: opacity 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
  }

  .twh-partner-logo:hover {
    opacity: 0.85;
    transform: translateY(-2px);
  }

  .twh-partner-logo img {
    height: var(--logo-height, 56px);
    max-height: 120px;
    width: auto;
    object-fit: contain;
    display: block;
  }

  /* Pizza Quick-Select Panel */
  .twh-pizza-panel {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  }

  .twh-pizza-panel h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #3b82f6;
    font-weight: 700;
  }

  .twh-pizza-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
  }

  .twh-pizza-btn {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-decoration: none;
  }

  .twh-pizza-btn:hover {
    border-color: #3b82f6;
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
  }

  /* Food Delivery Panel */
  .twh-food-panel {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: center;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  }

  .twh-food-panel h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #3b82f6;
    font-weight: 700;
  }

  .twh-food-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
  }

  .twh-food-btn {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-decoration: none;
  }

  .twh-food-btn:hover {
    border-color: #3b82f6;
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
  }

  /* Collapsible Dropdown Guide & Request Sections */
  .twh-dropdown-section {
    width: 100%;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
  }

  .twh-dropdown-accordion {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.15rem 1.25rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  }

  .twh-dropdown-accordion summary {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
    cursor: pointer;
    outline: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .twh-dropdown-accordion summary::-webkit-details-marker {
    display: none;
  }

  .twh-dropdown-accordion summary::before {
    content: '▶';
    font-size: 0.75rem;
    transition: transform 0.2s;
  }

  .twh-dropdown-accordion[open] summary::before {
    transform: rotate(90deg);
  }

  .twh-accordion-content {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .twh-guide-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
  }

  .twh-guide-card {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
  }

  .twh-guide-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(37, 99, 235, 0.15);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    width: max-content;
  }

  .twh-guide-card h3 {
    font-size: 0.92rem;
    color: var(--text-main);
    margin: 0;
    font-weight: 700;
  }

  .twh-guide-card p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
  }

  .twh-sub-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
  }

  .twh-sub-item h4 {
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 0.25rem;
    font-weight: 700;
  }

  .twh-sub-item p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
  }

  /* Modal Form Inputs */
  .twh-modal-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .twh-modal-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
  }

  /* Stealth PIN Input Style to Hide Dots/Length */
  .twh-stealth-pin {
    -webkit-text-security: disc;
    letter-spacing: 0.15em;
  }

  /* Modernized Engine Toggle Grid */
  .twh-engine-toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
    max-height: 180px;
    overflow-y: auto;
    padding: 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 100%;
  }

  .twh-engine-toggle-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
  }

  .twh-engine-toggle-pill:hover {
    border-color: var(--accent);
  }

  .twh-engine-toggle-pill.active {
    background-color: rgba(37, 99, 235, 0.15);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 600;
  }

  /* Themes Collection */
  .twh-wrapper.theme-dark {
    --bg-color: #0b0f19; --card-bg: rgba(21, 28, 46, 0.85); --text-main: #f8fafc; --text-muted: #94a3b8; --border-color: rgba(255, 255, 255, 0.1); --input-bg: #101726; --ticker-bg: #070a10; --ticker-item-bg: rgba(30, 41, 59, 0.8); --ticker-text: #ffffff;
  }
  .twh-wrapper.theme-light {
    --bg-color: #f1f5f9; --card-bg: rgba(255, 255, 255, 0.9); --text-main: #0f172a; --text-muted: #64748b; --border-color: rgba(0, 0, 0, 0.08); --input-bg: #e2e8f0; --ticker-bg: #1e293b; --ticker-item-bg: rgba(15, 23, 42, 0.08); --ticker-text: #f8fafc;
  }
  .twh-wrapper.theme-oled {
    --bg-color: #000000; --card-bg: rgba(12, 12, 12, 0.9); --text-main: #ffffff; --text-muted: #a1a1aa; --border-color: rgba(255, 255, 255, 0.12); --input-bg: #080808; --ticker-bg: #000000; --ticker-item-bg: rgba(39, 39, 42, 0.6); --ticker-text: #ffffff;
  }
  .twh-wrapper.theme-cyberpunk {
    --bg-color: #0d0221; --card-bg: rgba(25, 9, 51, 0.85); --text-main: #00ffcc; --text-muted: #d946ef; --border-color: rgba(217, 70, 239, 0.25); --input-bg: #120428; --ticker-bg: #080114; --ticker-item-bg: rgba(76, 29, 149, 0.5); --ticker-text: #ffffff;
  }
  .twh-wrapper.theme-amber {
    --bg-color: #120f0a; --card-bg: rgba(31, 25, 17, 0.85); --text-main: #fbbf24; --text-muted: #b45309; --border-color: rgba(251, 191, 36, 0.2); --input-bg: #18130c; --ticker-bg: #0a0805; --ticker-item-bg: rgba(120, 53, 15, 0.4); --ticker-text: #fef3c7;
  }

  /* Accent Colors */
  .twh-wrapper.accent-red { --accent: #ef4444; --accent-hover: #dc2626; }
  .twh-wrapper.accent-white { --accent: #ffffff; --accent-hover: #e2e8f0; }
  .twh-wrapper.accent-blue { --accent: #2563eb; --accent-hover: #1d4ed8; }
  .twh-wrapper.accent-manila { --accent: #ebd49f; --accent-hover: #dfc282; }
  .twh-wrapper.accent-green { --accent: #10b981; --accent-hover: #059669; }
  .twh-wrapper.accent-amber { --accent: #f59e0b; --accent-hover: #d97706; }
  .twh-wrapper.accent-purple { --accent: #8b5cf6; --accent-hover: #7c3aed; }
  .twh-wrapper.accent-charcoal { --accent: #1e293b; --accent-hover: #0f172a; }

  /* Main Wrapper */
  .twh-wrapper {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0.75rem;
    border-radius: 0 0 16px 16px;
    box-sizing: border-box;
    width: 100%;
    transition: background-color 0.3s ease, color 0.3s ease;
  }

  .twh-wrapper * { box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; }

  .twh-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .twh-brand { margin-bottom: 1.5rem; width: 100%; padding: 0 0.5rem; display: none; }

  .twh-search-bar { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.5rem; }
  @media (min-width: 480px) {
    .twh-search-bar { flex-direction: row; }
  }

  .twh-input-wrapper { position: relative; flex: 1; display: flex; align-items: center; width: 100%; }

  .twh-search-bar input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 1rem;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
    border-radius: 12px;
  }
  @media (min-width: 640px) {
    .twh-search-bar input { font-size: 1.1rem; padding: 1rem 3rem 1rem 1.25rem; }
  }

  .twh-search-bar input:focus {
    border-color: #5c471c !important;
    box-shadow: 0 0 0 3px rgba(92, 71, 28, 0.3) !important;
  }

  /* Hide shortcut hint on small screens, show only on desktop */
  .twh-key-hint {
    display: none;
  }
  @media (min-width: 768px) {
    .twh-key-hint {
      display: block;
      position: absolute; right: 12px; background: #fbf7ee; border: 1px solid #9e7f38;
      color: #5c471c; font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.5rem; border-radius: 6px; pointer-events: none;
    }
    .twh-search-bar input {
      padding-right: 2.8rem;
    }
  }

  .twh-search-bar button {
    padding: 0.9rem 1.5rem; font-size: 1rem; font-weight: 600; background-color: var(--accent);
    color: white; border: none; border-radius: 12px; cursor: pointer; transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    width: 100%;
  }
  @media (min-width: 480px) {
    .twh-search-bar button { width: auto; padding: 1rem 1.75rem; font-size: 1.05rem; }
  }
  .twh-search-bar button:hover { background-color: var(--accent-hover); transform: translateY(-1px); }

  .twh-footer { margin-top: 2.5rem; text-align: center; font-size: 0.78rem; color: var(--text-muted); width: 100%; max-width: 650px; font-weight: 500; }
  .twh-footer details { margin-bottom: 1rem; cursor: pointer; }
  .twh-footer details summary { color: var(--text-muted); font-weight: 600; outline: none; }
  .twh-footer details p { margin-top: 0.75rem; line-height: 1.4; font-size: 0.75rem; text-align: justify; }

  /* ===== V7.3 TWH ARCADE LINK ===== */
  .twh-arcade-promo-wrap { margin: .9rem auto 0; max-width: 1200px; padding: 0 1rem; width: 100%; box-sizing: border-box; }
  .twh-arcade-promo { position: relative; display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 1rem 1.25rem; border-radius: 16px; text-decoration: none !important;
    background: var(--card-bg); color: var(--text-main) !important; border: 1px solid var(--border-color); overflow: hidden; text-align: center;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 8px 26px rgba(0,0,0,.18); transition: transform .18s ease, box-shadow .18s ease; }
  .twh-arcade-promo::before { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%; pointer-events: none;
    background: linear-gradient(100deg, transparent, color-mix(in srgb, var(--accent) 22%, transparent), transparent); animation: twhArcadeSheen 5s ease-in-out infinite; }
  @keyframes twhArcadeSheen { 0%, 60% { left: -40%; } 100% { left: 120%; } }
  .twh-arcade-promo:hover, .twh-arcade-promo:focus-visible { transform: translateY(-2px); outline: none; box-shadow: 0 0 0 2px var(--accent), 0 12px 32px rgba(0,0,0,.25); }
  .twh-arcade-icon { font-size: 2rem; line-height: 1; flex: none; }
  .twh-arcade-copy { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
  .twh-arcade-title { font-family: 'Courier Prime', monospace !important; font-weight: 700; font-size: 1.15rem; letter-spacing: .14em; color: var(--accent); }
  .twh-arcade-sub { font-size: .86rem; line-height: 1.45; color: var(--text-muted); }
  .twh-arcade-sub b { color: var(--text-main); }
  .twh-arcade-btn { flex: none; background: var(--accent); color: #fff; font-weight: 800; font-size: .9rem; padding: .6rem 1.2rem; border-radius: 999px; white-space: nowrap; }
  .twh-wrapper.accent-white .twh-arcade-btn, .twh-wrapper.accent-manila .twh-arcade-btn { color: #0f172a; }
  @media (max-width: 640px) {
    .twh-arcade-promo { flex-direction: column; gap: .55rem; padding: 1rem; }
  }
  @media (prefers-reduced-motion: reduce) { .twh-arcade-promo::before { animation: none; display: none; } }
