/* WOC App Core 2.1 — non-game UI */
.app-core-skip {
  position: fixed;
  left: 12px;
  top: calc(8px + env(safe-area-inset-top));
  z-index: 99999;
  transform: translateY(-180%);
  background: #111;
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
}
.app-core-skip:focus { transform: translateY(0); }

.app-core-connection {
  position: fixed;
  z-index: 99990;
  left: 50%;
  top: calc(10px + env(safe-area-inset-top));
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 24px));
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
  background: #171717;
  color: #fff;
}
.app-core-connection[data-state="online"] { background: #176b3a; }

.app-core-for-you {
  margin: 0 0 16px;
  padding: 15px 0 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.app-core-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px 11px;
}
.app-core-section-head h2 { margin: 2px 0 3px; font-size: 21px; line-height: 1.05; }
.app-core-section-head p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.35; max-width: 54ch; }
.app-core-kicker { color: var(--red-dark); font-size: 10px; font-weight: 950; text-transform: uppercase; letter-spacing: .55px; }
.app-core-reset {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--surface-soft, rgba(127,127,127,.08));
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 9px;
  font-size: 10px;
  font-weight: 900;
}
.app-core-for-you-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 78vw);
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  padding: 0 14px 12px;
  scrollbar-width: none;
}
.app-core-for-you-track::-webkit-scrollbar { display: none; }
.app-core-reco {
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: 92px minmax(0,1fr);
  gap: 10px;
  min-height: 88px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  text-align: left;
  box-shadow: 0 8px 22px rgba(0,0,0,.055);
}
.app-core-reco img, .app-core-reco-fallback { width: 92px; height: 72px; border-radius: 11px; object-fit: cover; background: var(--surface-soft, rgba(127,127,127,.08)); }
.app-core-reco-copy { min-width: 0; align-self: center; }
.app-core-reco-copy small { display: block; margin-bottom: 5px; color: var(--red-dark); font-size: 9.5px; font-weight: 950; }
.app-core-reco-copy strong { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; line-height: 1.18; }

.app-core-offline-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft, rgba(127,127,127,.06));
}
.app-core-offline-tools strong { display: block; font-size: 13px; }
.app-core-offline-tools span { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.app-core-offline-tools button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  padding: 8px 10px;
  font-size: 10.5px;
  font-weight: 950;
}
.app-core-offline-tools button:disabled { opacity: .55; }
.app-core-offline-badge {
  align-self: center;
  justify-self: end;
  color: #176b3a;
  background: rgba(23,107,58,.10);
  border: 1px solid rgba(23,107,58,.17);
  border-radius: 999px;
  padding: 5px 7px;
  font-size: 9.5px;
  font-weight: 950;
  white-space: nowrap;
}
.app-core-offline-badge[data-ready="0"] { color: var(--muted); background: var(--surface-soft, rgba(127,127,127,.07)); border-color: var(--line); }
.app-core-updated { color: var(--muted); font-weight: 850; }
.app-core-reader-offline { color: #176b3a; font-weight: 900; }

:where(button,a,input,[tabindex]):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--red) 70%, white 30%);
  outline-offset: 3px;
}

@media (min-width: 760px) {
  .app-core-for-you-track { grid-auto-columns: minmax(245px, 31vw); }
}

@media (prefers-reduced-motion: reduce) {
  .app-core-skip, .app-core-connection, .app-core-for-you * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.app-core-follow-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0 18px;
}
.app-core-follow-row > span { color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .45px; }
.app-core-follow-row button,
.app-core-followed-chips button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 9px;
  background: var(--surface-soft, rgba(127,127,127,.07));
  color: var(--text);
  font-size: 10.5px;
  font-weight: 900;
}
.app-core-follow-row button[aria-pressed="true"] { background: var(--soft-red); border-color: rgba(209,43,47,.25); color: var(--red-dark); }
.app-core-followed-box { margin: 0 0 18px; }
.app-core-followed-chips { display:flex; flex-wrap:wrap; gap:7px; }
.app-core-followed-empty { padding: 12px; border:1px dashed var(--line); border-radius:14px; color:var(--muted); }
.app-core-followed-empty strong { display:block; color:var(--text); margin-bottom:3px; font-size:13px; }
.app-core-followed-empty span { display:block; font-size:11px; line-height:1.35; }

/* App Core 2.1 — travel pack, followed feed and privacy controls */
.app-core-offline-tools { align-items: flex-start; }
.app-core-offline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.app-core-offline-tools .app-core-secondary-action {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}
.app-core-offline-library { margin: 18px 0 0; }
.app-core-offline-item .saved-item-meta { color: #176b3a; }
.app-core-preferences {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 18px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft, rgba(127,127,127,.06));
}
.app-core-pref-copy { min-width: 0; }
.app-core-pref-copy strong { display:block; font-size:13px; margin-bottom:3px; }
.app-core-pref-copy span { display:block; color:var(--muted); font-size:10.5px; line-height:1.4; }
.app-core-preferences [role="switch"] {
  flex: 0 0 auto;
  min-width: 78px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  background: var(--surface-soft, rgba(127,127,127,.08));
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 950;
}
.app-core-preferences [role="switch"][aria-checked="true"] {
  background: rgba(23,107,58,.11);
  border-color: rgba(23,107,58,.25);
  color: #176b3a;
}
.app-core-followed-home .app-core-kicker { color:#176b3a; }
@media (max-width: 560px) {
  .app-core-offline-tools { display:block; }
  .app-core-offline-actions { margin-top:10px; justify-content:flex-start; }
  .app-core-offline-actions button { flex:1 1 auto; }
  .app-core-preferences { align-items:flex-start; }
}
