/* Optional features (sign-in, study list, house sponsors). Loaded only when a
   flag is on. Minimal, neutral styling; Designer owns final sponsor visuals. */

/* --- account / sign-in --- */
.account { display: flex; gap: 0.35rem; align-items: center; margin-left: auto; align-self: flex-start; padding-top: 0.1rem; }
.account a.signin-google {
  display: inline-block; padding: 0.3rem 0.65rem; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; color: var(--fg); font-size: 0.82rem; text-decoration: none; white-space: nowrap;
}
.account a.signin-google:hover { border-color: var(--accent); }
.account button { font-size: 0.82rem; white-space: nowrap; }

/* --- star on table rows --- */
.browse-table td.col-add .star {
  border: 0; background: transparent; color: var(--muted); font-size: 1rem; line-height: 1;
  padding: 0 0.2rem; cursor: pointer; min-width: 0;
}
.browse-table td.col-add .star.is-on { color: #c9a227; }

/* --- my list panel --- */
.my-list { margin: 0.8rem 0; padding: 0.7rem 0.8rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.my-list-head { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.my-list-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.my-list-table td { padding: 0.25rem 0.4rem; border-top: 1px solid var(--line); }
.my-list-table .my-num { text-align: right; white-space: nowrap; }
.my-list-table .up { color: var(--accent); }
.my-list-table .down { color: var(--down); }
.my-list-table .my-note input { width: 100%; min-width: 8rem; font-size: 0.82rem; }
.my-list-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.5rem; }
.my-list-foot .hint { margin: 0; font-size: 0.78rem; }
button.danger { color: var(--down); border-color: var(--down); }

/* --- sponsor: shared --- */
.sponsor-label { display: block; font-size: 0.66rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.sponsor-name { font-weight: 600; color: var(--fg); }
a.sponsor-name { text-decoration: none; border-bottom: 1px solid var(--line); }
a.sponsor-name:hover { border-bottom-color: var(--accent); }
.sponsor-text { color: var(--fg); }
[data-sponsor="goldvng"] { border-left: 3px solid #c9a227; }   /* placeholder accent */
[data-sponsor="directly"] { border-left: 3px solid var(--accent); } /* placeholder accent */

/* --- sponsor: top strip (text fallback, ~60px, one sponsor per visit, dismissible) --- */
.sponsor-strip {
  display: flex; align-items: center; gap: 0.75rem; min-height: 44px; max-height: 60px; overflow: hidden;
  margin: 0.6rem 0 0.2rem; padding: 0.4rem 0.6rem 0.4rem 0.8rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; font-size: 0.82rem;
}
.sponsor-strip .sponsor-label { flex: 0 0 auto; }
.sponsor-strip-body { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.sponsor-text { margin: 0; }
.sponsor-strip-body .sponsor-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sponsor-close { flex: 0 0 auto; border: 0; background: transparent; color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0.1rem 0.3rem; }
.sponsor-close:hover { color: var(--fg); }

/* --- sponsor: artwork banner (GoldVNG), responsive, no layout shift --- */
.sponsor-strip.sponsor-banner {
  display: block;
  position: relative;
  max-height: none;
  min-height: 0;
  width: 100%;
  max-width: 728px;
  margin: 0.6rem auto 0.2rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  border-left-width: 1px;
}
.sponsor-banner-link { display: block; line-height: 0; }
.sponsor-banner-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 728px;
  aspect-ratio: 728 / 90;
}
.sponsor-strip.sponsor-banner .sponsor-close {
  position: absolute;
  top: 0.15rem;
  right: 0.15rem;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  z-index: 2;
}
@media (max-width: 720px) {
  .sponsor-strip.sponsor-banner .sponsor-close {
    top: 0.1rem;
    right: 0.1rem;
    width: 1.1rem;
    height: 1.1rem;
    font-size: 0.75rem;
  }
}

/* --- sponsor: side cards, only in wide-screen margins; never shrink the table --- */
.sponsor-side { display: none; }
@media (min-width: 1440px) {
  .sponsor-side {
    display: block; position: fixed; top: 11.5rem; width: 140px; box-sizing: border-box;
    padding: 0.6rem 0.65rem; background: var(--card); border: 1px solid var(--line); border-radius: 8px;
    font-size: 0.78rem; line-height: 1.35; z-index: 1;
  }
  .sponsor-left { left: calc(50% - 550px - 156px); }
  .sponsor-right { right: calc(50% - 550px - 156px); }
  .sponsor-side-body { margin-top: 0.3rem; }
}
@media (max-width: 720px) {
  .sponsor-strip-body .sponsor-text { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .account a.signin-google, .account button { font-size: 0.74rem; padding: 0.25rem 0.45rem; }
}
