/* Tweetbot hybrid homepage */
:root {
  --tb-bg: #0f0f0f;
  --tb-fg: #e8e8e8;
  --tb-muted: #888;
  --tb-dim: #aaa;
  --tb-divider: #222;
  --tb-chip-active: #4a90d9;
  --tb-chip-border: #555;
  --tb-notes: #ff6600;
  --tb-public: #2dd4bf;
  --tb-link: #e8e8e8;
}

* { box-sizing: border-box; }

html, body.tb {
  margin: 0;
  padding: 0;
  background: var(--tb-bg);
  color: var(--tb-fg);
  font-family: "IBM Plex Sans", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.5;
  min-height: 100%;
}

.tb .skip {
  position: absolute;
  left: -9999px;
}
.tb .skip:focus {
  left: 8px;
  top: 8px;
  z-index: 20;
  background: #111;
  color: var(--tb-chip-active);
  padding: 8px 12px;
}

.tb-wrap {
  max-width: 680px;
  margin: 0 auto;
  min-height: 100vh;
  border-left: 1px solid var(--tb-divider);
  border-right: 1px solid var(--tb-divider);
  background: var(--tb-bg);
}

.tb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--tb-divider);
  position: sticky;
  top: 0;
  background: rgba(15, 15, 15, 0.92);
  backdrop-filter: blur(8px);
  z-index: 5;
}

.tb-brand {
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.tb-brand:hover { opacity: 0.85; }

.tb-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.tb-header-actions a {
  color: var(--tb-dim);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid #333;
  border-radius: 999px;
}
.tb-header-actions a:hover {
  color: #fff;
  border-color: #666;
}

.tb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--tb-divider);
}

.tb-chip {
  appearance: none;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--tb-chip-border);
  color: var(--tb-dim);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  line-height: 1.2;
  font-family: inherit;
}
.tb-chip:hover { color: #fff; border-color: #777; }
.tb-chip.is-active {
  background: var(--tb-chip-active);
  border-color: var(--tb-chip-active);
  color: #fff;
}

.tb-feed {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tb-row {
  display: block;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--tb-divider);
  padding: 14px 16px;
  transition: background 0.12s ease;
}
.tb-row:hover { background: #141414; }
.tb-row.is-hidden { display: none; }

.tb-row-inner {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.tb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2a2a2a;
  color: #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.tb-main { min-width: 0; }

.tb-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 4px;
  font-size: 13px;
}

.tb-name {
  color: #fff;
  font-weight: 700;
}

.tb-pill {
  display: inline-block;
  font-size: 11px;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid;
  font-weight: 600;
  text-transform: lowercase;
}
.tb-pill--notes {
  color: var(--tb-notes);
  border-color: var(--tb-notes);
}
.tb-pill--public {
  color: var(--tb-public);
  border-color: var(--tb-public);
}

.tb-time {
  color: var(--tb-muted);
  font-size: 12px;
}

.tb-title {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin: 2px 0 4px;
  line-height: 1.4;
}

.tb-summary {
  color: #a8a8a8;
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tb-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: #1a1a1a;
  flex-shrink: 0;
}

.tb-empty {
  padding: 28px 16px;
  color: var(--tb-muted);
  font-size: 14px;
  display: none;
}
.tb-empty.is-visible { display: block; }


.tb-pager {
  padding: 8px 16px 4px;
  border-top: 1px solid #2a2a2a;
}
.tb-pager-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.tb-pager-btn {
  color: var(--tb-muted);
  font-size: 13px;
  text-decoration: none;
  padding: 6px 10px;
  border: 1px solid var(--tb-chip-border);
  border-radius: 999px;
}
.tb-pager-btn:hover { color: #fff; border-color: #777; }
.tb-pager-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}
.tb-pager-pages {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}
.tb-pager-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--tb-muted);
  text-decoration: none;
  font-size: 13px;
  border: 1px solid transparent;
}
.tb-pager-num:hover { color: #fff; border-color: #777; }
.tb-pager-num.is-current {
  color: #fff;
  background: var(--tb-chip-active);
  border-color: var(--tb-chip-active);
}

.tb-foot {
  padding: 24px 16px 40px;
  color: #555;
  font-size: 12px;
}

@media (max-width: 520px) {
  .tb-thumb { width: 56px; height: 56px; }
  .tb-row-inner { gap: 10px; }
}
