/* Start Center — modern channel */

.sco-start {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-areas:
    "header header"
    "sidebar main"
    "ad ad"
    "footer footer";
  grid-template-columns: var(--sco-sidebar-w) 1fr;
  grid-template-rows: auto 1fr auto auto;
  background: #2a2a2a;
  color: #eee;
  overflow-x: hidden;
}

.sco-start-header {
  grid-area: header;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  padding-top: max(16px, env(safe-area-inset-top));
  background: var(--sco-xp-title);
  color: #fff;
}

.sco-start-header h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.sco-start-header p {
  margin: 4px 0 0;
  font-size: 12px;
  opacity: 0.85;
}

.sco-start-sidebar {
  grid-area: sidebar;
  padding: 16px 12px;
  background: #1e1e1e;
  border-right: 1px solid #444;
}

.sco-start-sidebar .label {
  font-size: 10px;
  text-transform: uppercase;
  color: #888;
  margin: 20px 0 8px 8px;
}

.sco-start-sidebar .label:first-child {
  margin-top: 0;
}

.side-link {
  display: block;
  padding: 8px 10px;
  color: #9cf;
  text-decoration: none;
  font-size: 12px;
  border-radius: 3px;
  -webkit-tap-highlight-color: transparent;
}

.side-link:hover,
.side-link:focus-visible {
  background: #333;
  color: #fff;
}

.sco-start-main {
  grid-area: main;
  padding: 24px;
  background: #fafafa;
  color: #222;
  min-width: 0;
}

.sco-start-main h2 {
  font-size: 14px;
  margin: 0 0 16px;
  color: #222;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  max-width: 720px;
}

.app-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #222;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.app-tile:hover,
.app-tile:focus-visible {
  background: #eef8f1;
  border-color: var(--sco-green);
}

.app-tile img {
  display: block;
  width: 96px;
  height: auto;
  max-width: 100%;
  margin-bottom: 8px;
  border-radius: 4px;
}

.app-tile strong {
  font-size: 13px;
  color: #222;
}

.app-tile span {
  font-size: 11px;
  color: #666;
  margin-top: 4px;
}

.sco-channel-note {
  margin-top: 24px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.45;
  color: #444;
  max-width: 640px;
}

.sco-channel-note a {
  color: #004488;
}

.sco-mobile-note {
  margin-top: 20px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.45;
  color: #444;
  max-width: 640px;
}

.sco-mobile-note ul {
  margin: 8px 0 8px 20px;
  padding: 0;
}

.sco-mobile-note li {
  margin-bottom: 4px;
}

.sco-mobile-note a {
  color: #004488;
}

.sco-start-footer {
  grid-area: footer;
  padding: 8px 16px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: #1a1a1a;
  font-size: 10px;
  line-height: 1.4;
  color: #777;
  border-top: 1px solid #444;
}

.sco-start-ad {
  grid-area: ad;
}

.sco-start-ad iframe {
  width: 100%;
  height: var(--sco-ad-h);
  border: none;
  display: block;
}

body.ads-off .sco-start-ad {
  display: none;
}

/* Recommended browsers — modern Start Center */
.sco-recommended-browsers {
  margin-top: 28px;
  max-width: 100%;
}

.sco-recommended-browsers h2 {
  font-size: 14px;
  margin: 0 0 8px;
}

.sco-browser-lede {
  font-size: 11px;
  line-height: 1.45;
  color: #555;
  margin: 0 0 12px;
  max-width: 720px;
}

.browserIntro {
  font-size: 11px;
  color: #444;
  line-height: 1.45;
  margin: 0 0 12px;
  max-width: 720px;
}

.browserIntro a {
  color: #004488;
}

.browserPlatformTitle {
  font-size: 13px;
  font-weight: bold;
  margin: 20px 0 8px;
  color: #0d7a3c;
}

.browserTable {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #ccc;
  font-size: 11px;
  min-width: 720px;
}

.browserTable th,
.browserTable td {
  border: 1px solid #ccc;
  padding: 8px;
  vertical-align: top;
  text-align: left;
}

.browserTable thead th {
  background: #ece9d8;
  font-weight: bold;
  font-size: 10px;
}

.browserOsCol {
  width: 11rem;
  min-width: 9rem;
}

.browserOs {
  font-weight: bold;
  background: #f8f8f8;
}

.browserName {
  font-weight: bold;
  font-size: 11px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.browserKind {
  font-size: 10px;
  color: #666;
}

.browserOsNote {
  font-size: 10px;
  color: #444;
  background: #fffef5;
  line-height: 1.4;
}

.browserOsNote a,
.sco-browser-card-note a {
  color: #003399;
}

.browserBtn {
  display: inline-block;
  padding: 6px 10px;
  background: #18a558;
  color: #fff !important;
  text-decoration: none;
  border: 1px solid #0d7a3c;
  font-size: 11px;
  font-weight: bold;
  border-radius: 2px;
  min-height: 32px;
  line-height: 1.2;
  box-sizing: border-box;
}

.browserBtn:hover {
  background: #0d7a3c;
}

.browserBtnSnipe {
  background: #0d7a3c;
  border-color: #065a2a;
}

.browserBtnAlt {
  display: inline-block;
  margin-top: 4px;
  font-size: 10px;
  color: #004488;
}

.browserCellSnipe {
  background: #f7fff9;
}

.browserEmpty {
  background: #fafafa;
}

.browserNotice {
  font-size: 11px;
  color: #444;
  background: #eef8f1;
  border: 1px solid #b8e0c4;
  padding: 8px 10px;
  margin: 12px 0 0;
  line-height: 1.45;
  max-width: 720px;
}

.browserNotice a {
  color: #004488;
}

.browserNoticeSub {
  background: #f8f8f8;
  border-color: #ddd;
}

.sco-browser-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 8px;
  max-width: 100%;
}

.sco-browser-cards {
  display: none;
}

.sco-browser-card {
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 12px;
}

.sco-browser-card-os {
  font-weight: bold;
  font-size: 13px;
  color: #0d7a3c;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #ddd;
}

.sco-browser-card-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.sco-browser-card-item:last-of-type {
  border-bottom: none;
}

.sco-browser-card-snipe {
  background: #f7fff9;
  margin: 0 -8px;
  padding: 10px 8px;
  border-radius: 4px;
}

.sco-browser-card-rank {
  display: none;
}

.sco-browser-card-body {
  flex: 1;
  min-width: 0;
}

.sco-browser-card-note {
  font-size: 10px;
  color: #555;
  margin: 8px 0 0;
  line-height: 1.4;
}

/* Tablet and phone — stack main above sidebar, enlarge tap targets */
@media (max-width: 720px) {
  .sco-start {
    grid-template-areas:
      "header"
      "main"
      "sidebar"
      "ad"
      "footer";
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto;
  }

  .sco-start-header {
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .sco-start-header h1 {
    font-size: 17px;
  }

  .sco-start-header p {
    font-size: 11px;
  }

  .sco-start-main {
    padding: 16px;
  }

  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: none;
  }

  .app-tile {
    padding: 14px 8px;
    min-height: 44px;
  }

  .app-tile img {
    width: 72px;
  }

  .app-tile strong {
    font-size: 12px;
  }

  .sco-channel-note {
    max-width: none;
    font-size: 12px;
  }

  .sco-start-sidebar {
    border-right: none;
    border-top: 1px solid #444;
    padding: 12px 16px 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 8px;
    align-content: start;
  }

  .sco-start-sidebar .label {
    grid-column: 1 / -1;
    margin: 16px 0 6px 4px;
  }

  .sco-start-sidebar .label:first-child {
    margin-top: 0;
  }

  #accountNavSlot {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 8px;
  }

  .side-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    font-size: 13px;
  }

  .sco-start-ad iframe {
    height: 90px;
  }

  .sco-start-footer {
    text-align: center;
    font-size: 11px;
  }

  .sco-browser-table-wrap {
    display: none;
  }

  .sco-browser-cards {
    display: block;
  }

  .browserBtn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
  }
}

/* Narrow phones — single-column app tiles */
@media (max-width: 400px) {
  .sco-start-header {
    flex-wrap: wrap;
  }

  .app-grid {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin: 0 auto;
  }

  .sco-start-sidebar,
  #accountNavSlot {
    grid-template-columns: 1fr;
  }
}
