@import url("https://fonts.googleapis.com/css2?family=Ramabhadra&family=Noto+Sans+Telugu:wght@400;600;700;800&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --ink: #1a1a1a;
  --tb-black: #000000;
  --tb-white: #ffffff;
  --tb-yellow: #f5c518;
  --tb-orange: #c45c26;
  --tb-cream: #f5f0e6;
  --tb-red: #8b1a1a;
  --tb-blue: #1a5fb4;
  --tb-gray-100: #f5f5f5;
  --tb-gray-200: #e8e8e8;
  --tb-gray-400: #9ca3af;
  --tb-gray-600: #6b7280;
  --tb-gray-800: #1f2937;
  --tb-border: #e5e7eb;
  --tb-radius: 18px;
  --tb-font:
    "Ramabhadra", "Segoe UI Emoji", "Segoe UI Symbol", "Apple Color Emoji",
    "Noto Color Emoji", system-ui, sans-serif;
  --tb-title-font:
    "Noto Sans Telugu", "Segoe UI Emoji", "Segoe UI Symbol", "Apple Color Emoji",
    "Noto Color Emoji", system-ui, sans-serif;
  --tb-emoji-font:
    "Segoe UI Emoji", "Segoe UI Symbol", "Apple Color Emoji",
    "Noto Color Emoji", sans-serif;
  /* News bullet cards — compact (~30% shorter than default) */
  --tb-point-gap: 0.25rem;
  --tb-point-pad-y: 0.3rem;
  --tb-point-pad-x: 0.44rem;
  --tb-point-font: 0.8rem;
  --tb-point-line: 1.28;
  --tb-point-radius: 6px;
  --tb-point-bullet: 5px;
  /* Mobile dock — tied to brand + news accent stripe */
  --tb-dock-ink: rgba(0, 0, 0, 0.86);
  --tb-dock-ink-mid: rgba(15, 23, 42, 0.82);
  --tb-dock-gold: rgba(245, 197, 24, 0.28);
  --tb-dock-muted: rgba(245, 240, 230, 0.78);
  --tb-dock-active-grad: linear-gradient(
    135deg,
    #2563eb 0%,
    #0891b2 48%,
    #10b981 100%
  );
  --tb-dock-active-glow: 0 6px 22px rgba(37, 99, 235, 0.42);
  --tb-dock-label-active: #fde68a;
}

* {
  box-sizing: border-box;
}

body.tb-app {
  margin: 0;
  font-family: var(--tb-font);
  background: linear-gradient(160deg, #f0f2f5 0%, #e4e8ee 100%);
  min-height: 100vh;
  color: var(--tb-gray-800);
}

/* Smooth in-app navigation (SPA) */
@view-transition {
  navigation: auto;
}

.tb-nav-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 20000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
  overflow: hidden;
}

.tb-nav-progress.is-active {
  opacity: 1;
}

.tb-nav-progress__bar {
  width: 36%;
  height: 100%;
  background: linear-gradient(
    90deg,
    #2563eb,
    #06b6d4,
    var(--tb-yellow),
    var(--tb-orange)
  );
  border-radius: 0 2px 2px 0;
  animation: tb-nav-progress-move 0.85s ease-in-out infinite;
}

@keyframes tb-nav-progress-move {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(320%);
  }
}

body.tb-nav-busy #tb-main-content {
  opacity: 0.94;
  transition: opacity 0.12s ease;
}

@media (prefers-reduced-motion: reduce) {
  .tb-nav-progress__bar {
    animation: none;
    width: 100%;
    transform: none;
  }

  body.tb-nav-busy #tb-main-content {
    transition: none;
  }
}

/* Site header — mobile toolbar default, desktop rows at 901px+ */
.tb-site-header {
  background: var(--tb-white);
  border-bottom: 1px solid var(--tb-border);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
  position: sticky;
  top: 0;
  z-index: 500;
}

.tb-site-accent {
  height: 2px;
  background: #b91c1c;
  display: none;
}

.tb-site-bar {
  height: 3px;
  background: #2b2118;
  display: none;
}

.tb-site-topline {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: #eceff2;
  padding: 0.2rem 1rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.7rem;
  color: var(--tb-gray-600);
}

.tb-site-datetime {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  line-height: 1.25;
}

.tb-site-date {
  white-space: nowrap;
}

.tb-site-time {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--tb-gray-800);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.tb-site-tagline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.28em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: right;
  font-size: 0.68rem;
  line-height: 1.35;
  margin: 0;
}

.tb-tagline-word {
  font-weight: 800;
}

.tb-tagline-word--orange {
  color: #ea580c;
}

.tb-tagline-word--blue {
  color: #2563eb;
}

.tb-tagline-word--yellow {
  color: #ca8a04;
}

.tb-tagline-word--green {
  color: #16a34a;
}

.tb-tagline-sep {
  color: #64748b;
  font-weight: 600;
}

.tb-site-brand-shell {
  display: block;
}

.tb-site-brand-row {
  display: none;
  align-items: center;
  gap: 0.75rem;
  min-height: 0;
}

.tb-site-brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.tb-site-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  min-height: 3.25rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  flex-wrap: nowrap;
}

.tb-drawer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 50%;
  background: #f1f5f9;
  color: #0f172a;
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.2s ease,
    border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.tb-drawer-btn__icon {
  width: 1.15rem;
  height: 1.15rem;
  transition: transform 0.2s ease;
}

.tb-drawer-btn--open {
  background: rgba(37, 99, 235, 0.14);
  border-color: rgba(37, 99, 235, 0.35);
  color: #1d4ed8;
}

.tb-drawer-btn--open .tb-drawer-btn__icon {
  transform: rotate(180deg);
}

.tb-drawer-btn--edge {
  display: none;
}

.tb-site-toolbar .tb-site-brand-link {
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.45rem;
}

.tb-site-toolbar .tb-site-logo {
  width: 2.15rem;
  height: 2.15rem;
  border-width: 2px;
}

.tb-site-toolbar .logo-headline {
  display: none;
}

.tb-site-toolbar .tb-site-sub {
  display: block;
  margin: 0;
  font-family: "Ramabhadra", var(--tb-font);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.1;
  color: var(--tb-orange);
  letter-spacing: 0.02em;
}

.tb-site-toolbar-time {
  display: block;
  flex: 0 0 auto;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1.2;
}

.tb-site-brand-mark {
  display: none;
}

.tb-mobile-nav-backdrop {
  display: none;
}

.tb-mobile-nav-backdrop[hidden] {
  display: none;
}

.tb-site-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--tb-orange);
  object-fit: cover;
  flex-shrink: 0;
}

.tb-site-header .logo-headline {
  font-family: "Ramabhadra", var(--tb-font);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
  letter-spacing: 0.5px;
  margin: 0;
}

.logo-telangana {
  color: var(--ink);
}

.logo-muchatlu {
  color: var(--tb-orange);
}

.tb-site-sub {
  margin: 0;
  font-family: "Ramabhadra", var(--tb-font);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.1;
  color: var(--tb-orange);
  letter-spacing: 0.02em;
}

.tb-site-brand-shell .logo-headline {
  display: none;
}

.tb-site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem 0.35rem;
  flex: 1;
  min-width: 0;
}

.tb-site-nav a,
.tb-site-nav .tb-nav-action,
.tb-site-nav .tb-nav-link {
  color: var(--tb-gray-800);
  text-decoration: none;
  font-size: 0.75rem;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
  transition:
    background 0.15s,
    color 0.15s;
}

.tb-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.2;
}

.tb-nav-link__icon {
  width: 0.92rem;
  height: 0.92rem;
  flex-shrink: 0;
}

.tb-nav-link__icon--x {
  width: 0.85rem;
  height: 0.85rem;
}

.tb-site-nav .tb-nav-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.tb-site-nav a:hover,
.tb-site-nav .tb-nav-action:hover,
.tb-site-nav .tb-nav-link:hover {
  background: var(--tb-gray-100);
}

.tb-site-nav a.active,
.tb-site-nav .tb-nav-link.active {
  color: var(--tb-white);
  background: var(--tb-black);
}

.tb-nav-action-load {
  color: #0f172a;
  border: 1px solid #dbeafe;
  background: #eff6ff;
}

.tb-nav-action-load:hover {
  background: #dbeafe;
}

.tb-nav-link--logout {
  border: 1px solid var(--tb-border);
  background: var(--tb-white);
}

/* Profile avatar in nav → Options page */
.tb-nav-profile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--tb-border);
  padding: 0;
  flex-shrink: 0;
  text-decoration: none;
  background: #f3f4f6;
}
.tb-nav-profile:hover {
  border-color: var(--tb-blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.tb-nav-profile.active {
  border-color: var(--tb-black);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}
.tb-nav-profile__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tb-nav-profile__icon {
  width: 20px;
  height: 20px;
  color: #374151;
}
.tb-side-hint {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: var(--tb-gray-600);
  line-height: 1.4;
}

.tb-site-nav .tb-nav-logout-form {
  display: inline;
  margin: 0;
}

.tb-site-nav .tb-nav-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.68rem;
  padding: 0.15rem 0.4rem;
  line-height: 1.2;
}

@media (max-width: 900px) {
  :root {
    --tb-mobile-header-h: 3.5rem;
    --tb-mobile-edge-btn: 2.15rem;
    --tb-mobile-content-gap: 1rem;
  }

  .tb-site-header {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    z-index: 600;
  }

  .tb-site-toolbar {
    display: flex !important;
    visibility: visible !important;
    justify-content: center;
    position: relative;
    min-height: 3.25rem;
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }

  .tb-site-toolbar .tb-site-brand-link {
    flex: 0 1 auto;
    justify-content: center;
  }

  .tb-site-toolbar-time {
    position: absolute;
    right: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
  }

  .tb-drawer-btn--edge {
    display: inline-flex;
    position: fixed;
    left: -0.8rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 590;
    width: 2.35rem;
    height: 2.35rem;
    margin: 0;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.14);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
  }

  .tb-drawer-btn--edge:active {
    transform: translateY(-50%) scale(0.96);
  }

  .tb-site-brand-shell {
    display: block;
  }

  .tb-card {
    scroll-margin-top: calc(var(--tb-mobile-header-h, 3.5rem) + 0.75rem);
  }

  .tb-card-header {
    padding: 0.45rem 0.75rem;
    min-height: 0;
  }

  .tb-card-heading-text {
    font-size: 0.82rem;
  }

  .tb-card-heading-sub {
    font-size: 0.62rem;
  }

  .tb-date,
  .tb-live {
    font-size: 0.62rem;
  }

  .tb-site-nav {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 310;
    width: min(82vw, 300px);
    max-width: 300px;
    display: flex;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.35rem;
    min-width: 0;
    padding: 3.25rem 0.85rem 1.25rem;
    background: var(--tb-white);
    border-right: 1px solid var(--tb-border);
    box-shadow: 12px 0 40px rgba(15, 23, 42, 0.2);
    overflow-y: auto;
    transform: translateX(-100%);
    opacity: 1;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  }

  .tb-site-nav--open {
    transform: translateX(0);
    pointer-events: auto;
  }

  .tb-site-nav a,
  .tb-site-nav .tb-nav-action,
  .tb-site-nav .tb-nav-link {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    font-size: 0.95rem;
    width: 100%;
    text-align: left;
  }

  .tb-nav-link__icon {
    width: 1.1rem;
    height: 1.1rem;
  }

  .tb-site-nav .tb-nav-profile {
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    justify-content: center;
  }

  .tb-site-nav .tb-nav-logout-form {
    display: block;
    margin-top: 0.4rem;
  }

  .tb-site-nav .tb-nav-logout {
    width: 100%;
    min-height: 40px;
    font-size: 0.9rem;
    border-radius: 10px;
  }

  .tb-mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: block;
    border: 0;
    background: rgba(15, 23, 42, 0.38);
    cursor: default;
  }

  .tb-site-tagline {
    display: none;
  }

  body.tb-mobile-menu-open {
    overflow: hidden;
  }
}

@media (min-width: 901px) {
  .tb-site-header {
    position: sticky;
  }

  .tb-site-accent {
    display: block;
  }

  .tb-site-bar {
    display: block;
  }

  .tb-site-toolbar {
    display: none;
  }

  .tb-site-topline {
    display: flex;
  }

  .tb-site-brand-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.3rem 1rem;
  }

  .tb-site-brand-row {
    display: flex;
    flex-shrink: 0;
  }

  .tb-site-brand-shell .tb-site-nav {
    flex: 1;
    min-width: 0;
  }

  .tb-site-brand-link--desktop {
    display: flex;
  }

  .tb-drawer-btn--edge {
    display: none;
  }

  .tb-site-time--desktop {
    display: inline;
  }

  .tb-mobile-nav-backdrop {
    display: none !important;
  }
}

.tb-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* Wide split layout: max left space (admin + user dashboard) */
.tb-main-wide {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 1.25rem 1rem 3rem 1.5rem;
}

/* Must follow .tb-main / .tb-main-wide — their padding shorthand was overriding mobile top offset */
@media (max-width: 900px) {
  .tb-main,
  .tb-main-wide {
    padding-top: calc(
      env(safe-area-inset-top, 0px) + var(--tb-mobile-header-h, 3.5rem) +
        var(--tb-mobile-content-gap, 1rem)
    );
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }
}

.tb-split {
  display: grid;
  /* Dashboard: news 60% · sidebar 40% */
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 1.25rem;
  align-items: start;
  width: 100%;
}

.tb-split--equal {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.tb-admin-split.tb-split--equal {
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.tb-split-primary {
  min-width: 0;
}

.tb-split-secondary {
  min-width: 0;
}

.tb-side-panel {
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  padding: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 3.25rem;
}

.tb-side-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.tb-side-panel .tb-side-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tb-side-panel .tb-side-actions .tb-btn {
  width: 100%;
  text-align: center;
}

.tb-preview-panel iframe {
  width: 100%;
  min-height: 520px;
  border: 1px solid var(--tb-border);
  border-radius: 10px;
  background: #fff;
}

.tb-preview-panel .tb-preview-empty,
.tb-preview-empty {
  color: var(--tb-gray-600);
  font-size: 0.85rem;
  padding: 0.5rem 0;
  text-align: center;
}

.tb-split-primary .tb-panel {
  max-width: none;
}

.tb-split-primary .tb-table {
  width: 100%;
}

/* Admin 50/50 layout */
.tb-admin-split {
  align-items: stretch;
  min-height: calc(100vh - 5rem);
}

.tb-admin-left {
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
  min-width: 0;
}

.tb-admin-right {
  min-width: 0;
}

.tb-panel-compact h1 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.tb-admin-h2 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1rem;
}

.tb-table-compact {
  font-size: 0.82rem;
}

.tb-table-compact th,
.tb-table-compact td {
  padding: 0.4rem 0.5rem;
  vertical-align: middle;
}

.tb-cell-title {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tb-cell-time {
  white-space: nowrap;
  font-size: 0.75rem;
}

.tb-col-actions {
  width: 1%;
  white-space: nowrap;
}

.tb-admin-row.is-previewing {
  background: #fef9c3;
}

.tb-muted {
  color: var(--tb-gray-600);
  font-size: 0.9rem;
}

/* Icon action buttons */
.tb-icon-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.2rem;
  align-items: center;
}

.tb-icon-form {
  display: inline;
  margin: 0;
}

.tb-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: 1px solid var(--tb-border);
  border-radius: 4px;
  background: var(--tb-white);
  color: var(--tb-gray-800);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.12s,
    border-color 0.12s;
}

.tb-icon-btn:hover {
  background: var(--tb-gray-100);
}

.tb-icon-approve {
  color: #166534;
  border-color: #86efac;
  background: #f0fdf4;
}
.tb-icon-approve:hover {
  background: #dcfce7;
}

.tb-icon-reject {
  color: #991b1b;
  border-color: #fca5a5;
  background: #fef2f2;
}
.tb-icon-reject:hover {
  background: #fee2e2;
}

.tb-icon-duplicate {
  color: #3730a3;
  border-color: #a5b4fc;
  background: #eef2ff;
}
.tb-icon-delete {
  color: #991b1b;
  border-color: #fecaca;
  background: #fef2f2;
}
.tb-icon-delete:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}
.tb-icon-delete svg {
  width: 0.9rem;
  height: 0.9rem;
}
.tb-icon-view {
  color: var(--tb-blue);
  border-color: #93c5fd;
  background: #eff6ff;
}
.tb-icon-edit {
  color: #854d0e;
  border-color: #fde047;
  background: #fefce8;
}
.tb-icon-open {
  color: var(--tb-gray-600);
  font-size: 0.75rem;
}

.tb-icon-format {
  color: #15803d;
  border-color: #86efac;
  background: #f0fdf4;
}
.tb-icon-format:hover {
  background: #dcfce7;
}
.tb-icon-manual {
  color: #6d28d9;
  border-color: #c4b5fd;
  background: #f5f3ff;
}
.tb-icon-manual:hover {
  background: #ede9fe;
}

.tb-icon-skip {
  color: #c2410c;
  border-color: #fdba74;
  background: #fff7ed;
}
.tb-icon-skip:hover {
  background: #ffedd5;
}

.tb-icon-unignore {
  color: #166534;
  border-color: #86efac;
  background: #f0fdf4;
}
.tb-icon-unignore:hover {
  background: #dcfce7;
}

.tw-action-glyph {
  font-size: 0.95rem;
  line-height: 1;
  font-weight: 800;
}
.tw-action-icon {
  width: 17px;
  height: 17px;
  display: block;
}

button.tb-preview-link {
  font-family: inherit;
}

/* Admin preview pane — full height, no inner scroll on panel */
.tb-admin-preview-pane {
  position: sticky;
  top: 3.25rem;
  height: calc(100vh - 3.5rem);
  display: flex;
  flex-direction: column;
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  padding: 0.75rem;
  min-width: 0;
}

.tb-admin-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-bottom: 0.35rem;
}

.tb-admin-preview-head h2 {
  margin: 0;
  font-size: 1rem;
}

.tb-admin-preview-open {
  font-size: 0.75rem;
  color: var(--tb-blue);
  text-decoration: none;
}

.tb-admin-preview-frame-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  background: #f0f2f5;
}

.tb-admin-preview-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Admin — users side panel (2 columns) */
.tb-admin-users-panel {
  position: sticky;
  top: 3.25rem;
  height: calc(100vh - 3.5rem);
  display: flex;
  flex-direction: column;
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  padding: 0.75rem;
  min-width: 0;
  overflow: hidden;
}

.tb-admin-users-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-bottom: 0.5rem;
}

.tb-admin-users-panel__head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.tb-admin-users-panel__count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tb-gray-600);
  white-space: nowrap;
}

.tb-admin-users-panel__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  flex-shrink: 0;
  margin-bottom: 0.5rem;
}

.tb-admin-users-panel__stat {
  background: #f8fafc;
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  padding: 0.35rem 0.45rem;
  text-align: center;
}

.tb-admin-users-panel__stat--alert {
  border-color: #fde68a;
  background: #fffbeb;
}

.tb-admin-users-panel__stat-value {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
}

.tb-admin-users-panel__stat-label {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--tb-gray-600);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tb-admin-users-panel__search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  background: #f8fafc;
  border: 1px solid var(--tb-border);
  border-radius: 10px;
  flex-shrink: 0;
  margin-bottom: 0.55rem;
}

.tb-admin-users-panel__search svg {
  width: 15px;
  height: 15px;
  color: var(--tb-gray-400);
  flex-shrink: 0;
}

.tb-admin-users-panel__search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
}

.tb-admin-users-panel__grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  align-content: start;
  padding-right: 0.15rem;
}

.tb-admin-users-panel__empty,
.tb-admin-users-panel__no-results {
  margin: 0;
  padding: 1rem 0.5rem;
  text-align: center;
  color: var(--tb-gray-600);
  font-size: 0.85rem;
}

.tb-admin-users-panel .tb-user-card__name {
  font-size: 0.78rem;
}

.tb-admin-users-panel .tb-user-card__email {
  font-size: 0.65rem;
}

.tb-admin-users-panel .tb-user-card__actions {
  flex-direction: column;
  align-items: stretch;
}

.tb-admin-users-panel .tb-user-card__toolbar .tb-user-role-toggles {
  width: 100%;
}

@media (max-width: 900px) {
  .tb-admin-users-panel {
    position: static;
    height: auto;
    max-height: none;
    margin-top: 0.75rem;
  }

  .tb-admin-users-panel__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 520px) {
  .tb-admin-users-panel__grid {
    grid-template-columns: 1fr;
  }
}

.tb-card-embed .tb-card-embed-body {
  padding: 0.85rem 1rem;
}

.tb-card-embed .tb-embed-headline {
  font-size: 1.1rem;
  margin: 0.35rem 0;
}

.tb-embed-meta {
  font-size: 0.8rem;
  color: var(--tb-gray-600);
  margin: 0.75rem 0 0;
}

@media (max-width: 1024px) {
  .tb-split,
  .tb-split--equal,
  .tb-admin-split,
  .tb-admin-split.tb-split--equal {
    grid-template-columns: 1fr;
  }

  .tb-admin-left {
    max-height: none;
  }

  .tb-admin-preview-pane {
    position: static;
    height: 70vh;
  }

  .tb-side-panel {
    position: static;
  }
}

/* Mobile: quick actions live in the header menu, not below the feed */
@media (max-width: 900px) {
  .tb-side-panel--quick-actions {
    display: none;
  }

  .tb-split-secondary:not(:has(.tb-twitter-feed)):not(:has(.tb-trends)):not(
      :has(.tb-admin-users-panel)
    ) {
    display: none;
  }

  /* Trends open from bottom dock + sheet, not sidebar */
  .tb-split-secondary .tb-trends {
    display: none;
  }

  body.tb-has-mobile-dock.tb-mobile-dock-on .tb-main-wide,
  body.tb-has-mobile-dock .tb-main-wide,
  body.tb-has-mobile-dock.tb-mobile-dock-on .tb-main,
  body.tb-has-mobile-dock .tb-main {
    padding-bottom: calc(4.2rem + env(safe-area-inset-bottom, 0px));
  }

  .tb-headline {
    cursor: pointer;
  }
}

/* Telugu Brief Card */
.tb-card {
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.tb-card-header {
  background: var(--tb-black);
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: var(--tb-radius) var(--tb-radius) 0 0;
}

.tb-card-heading {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.tb-card-heading-text {
  color: var(--tb-yellow);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.tb-card-heading-sub {
  color: #9ca3af;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tb-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.tb-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--tb-orange);
  object-fit: cover;
  flex-shrink: 0;
}

.tb-logo-text.logo-headline {
  font-family: "Ramabhadra", var(--tb-font);
  font-size: 1.35rem;
  color: var(--tb-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tb-logo-text .logo-telangana {
  color: var(--tb-yellow);
}

.tb-logo-text .logo-muchatlu {
  color: var(--tb-white);
}

.tb-date {
  color: #9ca3af;
  font-size: 0.8rem;
  white-space: nowrap;
}

.tb-live {
  background: var(--tb-red);
  color: var(--tb-white);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.tb-live-dot {
  width: 6px;
  height: 6px;
  background: var(--tb-white);
  border-radius: 50%;
  animation: tb-pulse 1.5s infinite;
}

@keyframes tb-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.tb-card-body {
  padding: 0.7rem;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: linear-gradient(180deg, #faf8f5 0%, #f7f4ef 100%);
}

.tb-feed-recent {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tb-news-group {
  position: relative;
  overflow: hidden;
  border: 1px solid #e3ddd3;
  border-radius: 20px;
  background: var(--tb-white);
  box-shadow:
    0 1px 2px rgba(43, 37, 32, 0.04),
    0 6px 18px rgba(43, 37, 32, 0.05);
  transition:
    border-color 0.2s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease;
}

.tb-news-group:has(.tb-news-admin-menu.is-open) {
  overflow: visible;
  z-index: 4;
}

.tb-news-group:hover {
  border-color: #d4cdc2;
  box-shadow:
    0 2px 4px rgba(43, 37, 32, 0.05),
    0 10px 24px rgba(43, 37, 32, 0.07);
}

.tb-news-group--hidden {
  background: #fffdf8;
  border-color: #e8d4a8;
  box-shadow:
    0 1px 2px rgba(146, 110, 14, 0.06),
    0 6px 16px rgba(146, 110, 14, 0.05);
}

.tb-news-hidden-banner {
  position: absolute;
  top: 0.55rem;
  right: 0.75rem;
  z-index: 2;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Admin ⋮ menu sits in the card action pill */
.tb-news-item .tb-item-content {
  position: relative;
  min-width: 0;
  flex: 1;
  padding-right: 3.1rem;
  padding-bottom: 0.1rem;
}

.tb-news-admin-menu {
  position: relative;
  z-index: 4;
  flex-shrink: 0;
}

.tb-news-admin-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  color: #475569;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
}

.tb-news-admin-trigger svg {
  width: 0.88rem;
  height: 0.88rem;
}

.tb-news-admin-trigger:hover,
.tb-news-admin-menu.is-open .tb-news-admin-trigger {
  background: #fff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.tb-news-admin-menu.is-open .tb-news-admin-trigger {
  color: #0f172a;
  transform: scale(1.02);
}

.tb-news-admin-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 30;
  min-width: 10.5rem;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 12px 32px rgba(15, 23, 42, 0.14),
    0 2px 8px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(8px);
  animation: tb-admin-menu-in 0.16s ease-out;
}

@keyframes tb-admin-menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tb-news-admin-action {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.12s ease,
    color 0.12s ease;
}

.tb-news-admin-action svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  opacity: 0.85;
}

.tb-news-admin-action:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.tb-news-admin-action--danger {
  color: #b91c1c;
}

.tb-news-admin-action--danger:hover {
  background: #fef2f2;
  color: #991b1b;
}

.tw-publish-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
}

.tw-publish-tick--both {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.tw-publish-tick--news {
  color: #c2410c;
  background: #ffedd5;
  border: 1px solid #fdba74;
}

.tw-publish-tick--twitter {
  color: #1d4ed8;
  background: #dbeafe;
  border: 1px solid #93c5fd;
}

.tb-expand-author-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  margin-left: auto;
}

.tb-edited-meta {
  font-size: 0.68rem;
  color: #64748b;
  font-style: italic;
  white-space: nowrap;
}

@media (min-width: 901px) {
  .tb-expand.open .tb-expand-author-block {
    align-items: flex-end;
  }
}

.tb-news-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0.5rem 0.5rem 0.45rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease;
  user-select: none;
  border-radius: 20px;
  background: #fff;
}

.tb-news-item-top {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.55rem;
  width: 100%;
  position: relative;
  padding: 0.58rem 0.68rem 1.72rem 0.78rem;
  border-radius: 12px;
  background: linear-gradient(
    115deg,
    rgba(239, 246, 255, 0.98) 0%,
    rgba(224, 242, 254, 0.95) 42%,
    rgba(236, 253, 245, 0.96) 100%
  );
  border: 1px solid rgba(147, 197, 253, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 2px 8px rgba(37, 99, 235, 0.05);
  overflow: visible;
}

.tb-time-relative {
  position: absolute;
  top: 0.42rem;
  right: 0.48rem;
  z-index: 2;
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  font-family: "Inter", var(--tb-font), sans-serif;
  padding: 0.14rem 0.38rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  pointer-events: auto;
  cursor: default;
}
.tb-time-relative--fresh {
  color: #047857;
  background: rgba(236, 253, 245, 0.95);
  border-color: rgba(16, 185, 129, 0.28);
}
.tb-time-relative--mins {
  color: #0369a1;
  background: rgba(240, 249, 255, 0.95);
  border-color: rgba(14, 165, 233, 0.24);
}
.tb-time-relative--hrs {
  color: #c2410c;
  background: rgba(255, 247, 237, 0.96);
  border-color: rgba(249, 115, 22, 0.24);
}
.tb-time-relative--days {
  color: #b91c1c;
  background: rgba(254, 242, 242, 0.96);
  border-color: rgba(239, 68, 68, 0.22);
}


.tb-news-item-foot {
  display: none;
}

.tb-news-item-toolbar {
  position: absolute;
  right: 0.48rem;
  bottom: 0.38rem;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  pointer-events: auto;
}

.tb-news-item-toolbar .tb-news-admin-menu {
  flex-shrink: 0;
}

.tb-news-item-toolbar .tb-news-admin-trigger {
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  pointer-events: auto;
  cursor: pointer;
}

.tb-news-item-toolbar .tb-news-admin-trigger:hover,
.tb-news-item-toolbar .tb-news-admin-menu.is-open .tb-news-admin-trigger {
  border-color: #cbd5e1;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.tb-news-item-toolbar .tb-expand-toggle {
  width: 1.5rem;
  height: 1.5rem;
  border: 1.5px solid #d4cdc2;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(43, 37, 32, 0.06);
  pointer-events: auto;
  cursor: pointer;
}

.tb-news-item-toolbar .tb-expand-toggle:hover {
  border-color: var(--tb-blue);
  color: var(--tb-blue);
  background: #f8fbff;
}

.tb-news-item.expanded .tb-news-item-toolbar .tb-expand-toggle {
  transform: rotate(180deg);
  border-color: var(--tb-blue);
  color: #fff;
  background: var(--tb-blue);
  box-shadow: 0 2px 8px rgba(26, 95, 180, 0.28);
}

.tb-thumb-wrap {
  flex-shrink: 0;
  align-self: flex-start;
}

.tb-news-item:hover {
  background: #fff;
}

.tb-news-item:hover .tb-news-item-top {
  border-color: rgba(59, 130, 246, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 4px 14px rgba(37, 99, 235, 0.1);
}

.tb-news-item.expanded {
  background: #fff;
}

.tb-news-item.expanded .tb-news-item-top {
  background: none;
  border-color: transparent;
  box-shadow: none;
}

/* Thumbnail in compact row */
.tb-thumb {
  width: 80px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid #e8e2d8;
  display: block;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(43, 37, 32, 0.06);
}

/* Accordion expand panel */
.tb-expand {
  display: block;
  background: #faf7f2;
  border-top: 1px solid #ebe6de;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.55s cubic-bezier(0.25, 1, 0.5, 1),
    opacity 0.28s ease,
    border-color 0.35s ease;
  will-change: max-height, opacity;
}

.tb-expand.open {
  max-height: 2200px;
  opacity: 1;
}

/* Desktop: instant accordion (no max-height animation = stable page) */
@media (min-width: 901px) {
  .tb-expand-stage {
    display: contents;
  }

  .tb-expand-inner {
    display: contents;
  }

  .tb-expand {
    display: none;
    max-height: none;
    opacity: 1;
    transition: none;
    border-top: none;
  }

  /* Section 1 (left): media · Section 2 (right): news points */
  .tb-expand.open:not(.tb-expand--no-media),
  .tb-expand--landscape.open:not(.tb-expand--no-media),
  .tb-expand--portrait.open:not(.tb-expand--no-media) {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    grid-template-areas: "media body";
    align-items: start;
    gap: 1rem 1.2rem;
    padding: 1rem 1.35rem 1.2rem;
    border-top: 1px solid #ebe6de;
    background: linear-gradient(180deg, #f5f1ea 0%, #faf7f2 38%, #fff 100%);
  }

  /* Text-only: full-width story (no empty media column) */
  .tb-expand.open.tb-expand--no-media,
  .tb-expand--no-media.tb-expand--landscape.open,
  .tb-expand--no-media.tb-expand--portrait.open {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "body";
    gap: 0;
    padding: 1rem 1.35rem 1.2rem;
    border-top: 1px solid #ebe6de;
    background: #eceff2;
  }

  .tb-expand.open.tb-expand--no-media .tb-expand-body {
    grid-area: body;
    width: 100%;
  }

  /* Section 1 — media frame (left column, natural height only) */
  .tb-expand.open:not(.tb-expand--no-media) .tb-expand-img-wrap {
    grid-area: media;
    position: relative;
    align-self: start;
    justify-self: stretch;
    width: 100%;
    overflow: visible;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
    background: #0f172a;
  }

  .tb-expand--portrait.open:not(.tb-expand--no-media) .tb-expand-img-wrap {
    max-width: 280px;
  }

  .tb-expand--tall.open:not(.tb-expand--no-media) {
    grid-template-columns: minmax(200px, 320px) minmax(0, 1fr);
  }

  .tb-expand--landscape.open:not(.tb-expand--no-media) .tb-expand-img-wrap {
    max-height: 240px;
  }

  .tb-expand.open .tb-expand-img {
    position: static;
    width: 100%;
    height: auto;
    max-height: min(78vh, 720px);
    min-height: 0;
    object-fit: contain;
    display: block;
    border-radius: 13px;
  }

  .tb-expand--landscape.open .tb-expand-img {
    max-height: 240px;
    object-fit: cover;
  }

  /* Section 2 — news points, tags, actions (right column) */
  .tb-expand.open .tb-expand-body {
    grid-area: body;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.52rem 0.7rem 0.6rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  }

  .tb-expand.open:not(.tb-expand--no-media) .tb-expand-body {
    align-self: stretch;
  }

  .tb-expand.open .tb-expand-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    margin: 0;
  }

  .tb-expand.open .tb-expand-points,
  .tb-expand.open .tb-expand-points.tb-points-html {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--tb-point-gap);
    font-size: var(--tb-point-font);
    line-height: var(--tb-point-line);
    color: #1e293b;
  }

  .tb-expand.open .tb-expand-points > li,
  .tb-expand.open .tb-expand-points.tb-points-html > li,
  .tb-expand.open .tb-expand-points.tb-points-html > p {
    display: flex;
    align-items: flex-start;
    gap: 0.32rem;
    position: relative;
    margin: 0;
    padding: var(--tb-point-pad-y) var(--tb-point-pad-x);
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: var(--tb-point-radius);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  }

  .tb-expand.open .tb-expand-points > li::before,
  .tb-expand.open .tb-expand-points.tb-points-html > li::before {
    content: "";
    position: static;
    flex: 0 0 var(--tb-point-bullet);
    width: var(--tb-point-bullet);
    height: var(--tb-point-bullet);
    margin-top: 0.26em;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 1.5px rgba(37, 99, 235, 0.12);
  }

  .tb-expand.open .tb-expand-points.tb-points-html ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--tb-point-gap);
  }

  .tb-expand.open .tb-expand-points.tb-points-html ul > li {
    display: flex;
    align-items: flex-start;
    gap: 0.32rem;
    position: relative;
    margin: 0;
    padding: var(--tb-point-pad-y) var(--tb-point-pad-x);
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .tb-expand.open .tb-expand-points.tb-points-html ul > li::before {
    display: none;
  }

  .tb-expand.open .tb-expand-points.tb-points-trimmed > li,
  .tb-expand.open .tb-expand-points.tb-points-trimmed.tb-points-html > li,
  .tb-expand.open .tb-expand-points.tb-points-trimmed ul > li,
  .tb-expand.open .tb-expand-points.tb-points-trimmed.tb-points-html ul > li {
    display: block;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    gap: 0;
  }

  .tb-expand.open .tb-expand-points.tb-points-trimmed > li::before,
  .tb-expand.open
    .tb-expand-points.tb-points-trimmed.tb-points-html
    > li::before,
  .tb-expand.open .tb-expand-points.tb-points-trimmed ul > li::before,
  .tb-expand.open
    .tb-expand-points.tb-points-trimmed.tb-points-html
    ul
    > li::before {
    display: none;
    content: none;
  }

  .tb-expand.open .tb-expand-footer {
    order: 3;
    margin: 0.25rem 0 0;
    padding-top: 0.25rem;
    border-top: 1px dashed rgba(226, 232, 240, 0.9);
  }

  .tb-expand.open .tb-expand-footer .tb-expand-meta-strip,
  .tb-expand.open .tb-expand-footer .tb-react-bar {
    margin: 0;
    padding: 0;
    border: none;
  }

  .tb-expand.open .tb-expand-meta-strip .tb-expand-tags a {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.38rem;
    margin: 0;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    border: none;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    color: #2563eb;
  }

  .tb-expand.open .tb-expand-meta-strip .tb-expand-author {
    margin-left: auto;
    font-size: 0.62rem;
    color: #94a3b8;
  }

  .tb-expand.open .tb-expand-footer .tb-react-bar {
    flex-wrap: nowrap;
    gap: 0.25rem;
  }
}

.tb-expand-body {
  padding: 0.65rem 1.1rem 0.75rem;
}

.tb-expand-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.45rem;
  margin: 0;
  font-size: 0.74rem;
  color: var(--tb-gray-600);
}

.tb-expand-location {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  color: var(--tb-gray-600);
  font-size: 0.72rem;
  font-weight: 500;
}
.tb-expand-location svg {
  width: 12px;
  height: 12px;
  color: #ef4444;
  flex-shrink: 0;
}

.tb-expand-points {
  margin: 0.28rem 0 0.35rem;
  padding-left: 0;
  line-height: var(--tb-point-line);
  font-size: var(--tb-point-font);
  color: var(--tb-gray-800);
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--tb-point-gap);
}

.tb-expand-meta-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  min-width: 0;
}

.tb-expand-footer {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.5rem;
  margin-top: 0.3rem;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(226, 232, 240, 0.9);
  min-width: 0;
}

.tb-expand-footer .tb-expand-meta-strip {
  flex: 1 1 auto;
  min-width: 0;
}

.tb-expand-footer .tb-react-bar {
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  border: none;
}

.tb-expand-footer .tb-react-bookmark--end {
  margin-left: 0;
}

.tb-expand-meta-strip .tb-expand-tags {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.2rem;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
  overflow: hidden;
}

.tb-expand-tags a,
.tb-hashtag.tb-expand-tags a,
.tb-hashtag-link,
.tb-expand-meta-strip .tb-expand-tags a {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0.1rem 0.38rem;
  margin: 0;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: none;
  color: #2563eb;
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
}

.tb-expand-tags a:hover,
.tb-hashtag.tb-expand-tags a:hover,
.tb-expand-meta-strip .tb-expand-tags a:hover {
  text-decoration: none;
  background: rgba(37, 99, 235, 0.14);
}

.tb-expand-meta-strip .tb-expand-author,
.tb-expand-meta-strip .tb-edited-meta {
  flex-shrink: 0;
  white-space: nowrap;
}

.tb-expand-meta-strip .tb-expand-author {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.01em;
}

.tb-expand-meta-strip .tb-edited-meta {
  font-size: 0.58rem;
  color: #94a3b8;
  font-style: normal;
}

.tb-index {
  font-size: 1.75rem;
  font-weight: 300;
  color: #d1d5db;
  line-height: 1;
  padding-top: 0.2rem;
  font-family: "Inter", sans-serif;
}

.tb-category {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--tb-gray-600);
  margin-bottom: 0.25rem;
}

/* Category pill with SVG icon */
.tb-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem 0.28rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 0.4rem;
  border: 1px solid transparent;
}
.tb-category-pill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.tb-category-pill__icon svg {
  width: 14px;
  height: 14px;
}
.tb-category-pill__label {
  white-space: nowrap;
}

.tb-category-pill--general {
  background: #f3f4f6;
  color: #374151;
  border-color: #e5e7eb;
}
.tb-category-pill--politics {
  background: #ede9fe;
  color: #5b21b6;
  border-color: #ddd6fe;
}
.tb-category-pill--sports {
  background: #dcfce7;
  color: #166534;
  border-color: #bbf7d0;
}
.tb-category-pill--traffic {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}
.tb-category-pill--airport {
  background: #e0f2fe;
  color: #075985;
  border-color: #bae6fd;
}
.tb-category-pill--development {
  background: #fce7f3;
  color: #9d174d;
  border-color: #fbcfe8;
}

.tb-headline {
  position: relative;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.38;
  margin: 0 0 0.2rem;
  color: #0f172a;
  scroll-margin-top: 96px;
  font-family: var(--tb-title-font);
  letter-spacing: -0.01em;
}

/* Expanded: hide thumb + summary; time stays on foot row */
.tb-news-item.expanded .tb-thumb-wrap,
.tb-news-item.expanded .tb-thumb {
  display: none;
}

.tb-news-item.expanded .tb-summary {
  display: none;
}

.tb-news-item.expanded .tb-headline {
  margin: 0;
  line-height: 1.45;
}

.tb-summary {
  position: relative;
  font-size: 0.82rem;
  color: #475569;
  margin: 0;
  line-height: 1.38;
  font-family: var(--tb-font);
}

.tb-time {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--tb-gray-600);
  font-family: "Inter", sans-serif;
}
.tb-time__icon {
  width: 11px;
  height: 11px;
  color: var(--tb-gray-400);
  flex-shrink: 0;
}

/* Expand / collapse chevron — compact circle button */
.tb-expand-toggle {
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: 1.5px solid #d4cdc2;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  background: #fff;
  box-shadow: 0 1px 2px rgba(43, 37, 32, 0.06);
  flex-shrink: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.28s cubic-bezier(0.25, 1, 0.5, 1),
    border-color 0.15s ease,
    color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.tb-expand-toggle__icon {
  width: 12px;
  height: 12px;
  pointer-events: none;
}

.tb-news-item:hover .tb-expand-toggle,
.tb-expand-toggle:hover {
  border-color: var(--tb-blue);
  color: var(--tb-blue);
  background: #f8fbff;
}

.tb-news-item.expanded .tb-expand-toggle {
  transform: rotate(180deg);
  border-color: var(--tb-blue);
  color: #fff;
  background: var(--tb-blue);
  box-shadow: 0 2px 8px rgba(26, 95, 180, 0.28);
}

/* Legacy alias */
.tb-arrow-btn {
  display: none;
}

.tb-card-footer {
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--tb-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tb-link-all {
  color: var(--tb-blue);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tb-link-all svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.tb-link-all:hover {
  text-decoration: underline;
}

.tb-share {
  color: var(--tb-gray-700);
  font-size: 0.84rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 5.25rem;
  min-height: 36px;
  box-sizing: border-box;
  cursor: pointer;
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  padding: 0.36rem 0.85rem;
  background: #fff;
  font-family: inherit;
  white-space: nowrap;
}
.tb-share svg {
  width: 16px;
  height: 16px;
}
.tb-share:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

/* Page panels */
.tb-panel {
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  padding: 1.25rem;
  margin-top: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.tb-panel h1,
.tb-panel h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.tb-btn-primary {
  background: var(--tb-black);
  color: var(--tb-white);
}
.tb-btn-primary:hover {
  background: #333;
  color: #fff;
}
.tb-btn-success {
  background: #15803d;
  color: #fff;
}
.tb-btn-danger {
  background: #b91c1c;
  color: #fff;
}
.tb-btn-outline {
  background: #fff;
  border: 1px solid var(--tb-border);
  color: var(--tb-gray-800);
}
.tb-btn-claude {
  background: #a5542a;
  border: 1px solid #8f4320;
  color: #fff;
}
.tb-btn-claude:hover {
  background: #8f4320;
  color: #fff;
}
.tb-btn-gpt-outline {
  background: #ecfdf5;
  border: 1px solid #097242;
  color: #065f46;
}
.tb-btn-gpt-outline:hover {
  background: #d1fae5;
  color: #064e3b;
  border-color: #065f46;
}
.tb-btn-image-outline {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}
.tb-btn-image-outline:hover {
  background: #dbeafe;
  color: #1e40af;
}
.tb-btn-flyer {
  background: #7c3aed;
  border: 1px solid #6d28d9;
  color: #fff;
}
.tb-btn-flyer:hover {
  background: #6d28d9;
  color: #fff;
}
.tb-btn-post {
  background: #0d9488;
  border: 1px solid #0f766e;
  color: #fff;
}
.tb-btn-post:hover {
  background: #0f766e;
  color: #fff;
}
.tb-btn-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}
.tb-btn-symbol-claude {
  background: rgba(255, 255, 255, 0.18);
  color: #fff7ed;
}
.tb-btn-symbol-gpt {
  background: #10a37f;
  color: #fff;
  font-size: 0.66rem;
  letter-spacing: 0.02em;
}
.tb-btn-symbol-image {
  background: #2563eb;
  color: #fff;
  font-size: 0.9rem;
}
.tb-btn-symbol-flyer {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.86rem;
}
.tb-btn-symbol-post {
  background: #fff;
  color: #0f766e;
  font-size: 0.72rem;
}
.tb-btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
}

.tb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.tb-table th,
.tb-table td {
  border: 1px solid var(--tb-border);
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.tb-table th {
  background: var(--tb-gray-100);
  font-weight: 600;
}

.tb-form-group {
  margin-bottom: 1rem;
}
.tb-form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}
.tb-form-group input,
.tb-form-group textarea,
.tb-form-group select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
}

.tb-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0;
}

.tb-form-row .tb-form-group {
  margin-bottom: 1rem;
}

/* Post form — breaking / web-only option cards */
.tb-post-options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.tb-post-options--modal {
  margin: 0.65rem 0 0.25rem;
  padding: 0 0.15rem;
}

.tb-post-options--modal-row {
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.tb-option-card--compact {
  flex: 1 1 0;
  min-width: 0;
  max-width: 11.5rem;
}

.tb-option-card--compact .tb-option-card__body {
  padding: 0.45rem 0.55rem;
  gap: 0.4rem;
  border-radius: 10px;
}

.tb-option-card--compact .tb-option-card__icon {
  width: 1.65rem;
  height: 1.65rem;
  font-size: 0.95rem;
  border-radius: 8px;
}

.tb-option-card--compact .tb-option-card__title {
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tb-option-card--compact .tb-option-card__desc {
  display: none;
}

.tb-option-card--compact .tb-option-card__switch {
  width: 38px;
  height: 22px;
}

.tb-option-card--compact .tb-option-card__switch::after {
  width: 16px;
  height: 16px;
  top: 3px;
  left: 3px;
}

.tb-option-card--compact .tb-option-card__input:checked + .tb-option-card__body .tb-option-card__switch::after {
  transform: translateX(16px);
}

.tb-option-card {
  display: block;
  cursor: pointer;
  margin: 0;
  position: relative;
}

.tb-option-card__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.tb-option-card__body {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--tb-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.tb-option-card:hover .tb-option-card__body {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
}

.tb-option-card__input:checked + .tb-option-card__body {
  border-color: #2563eb;
  background: linear-gradient(135deg, #fafbff 0%, #eff6ff 100%);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.14);
}

.tb-option-card--breaking .tb-option-card__input:checked + .tb-option-card__body {
  border-color: #ea580c;
  background: linear-gradient(135deg, #fffbf7 0%, #ffedd5 100%);
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.14);
}

.tb-option-card--web .tb-option-card__input:checked + .tb-option-card__body {
  border-color: #0891b2;
  background: linear-gradient(135deg, #f7fefc 0%, #ecfeff 100%);
  box-shadow: 0 4px 16px rgba(8, 145, 178, 0.14);
}

.tb-option-card__input:disabled + .tb-option-card__body {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.tb-option-card__input:disabled + .tb-option-card__body .tb-option-card__switch {
  opacity: 0.7;
}

.tb-option-card__icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 10px;
  background: var(--tb-gray-100);
}

.tb-option-card--breaking .tb-option-card__input:checked + .tb-option-card__body .tb-option-card__icon {
  background: rgba(234, 88, 12, 0.12);
}

.tb-option-card--web .tb-option-card__input:checked + .tb-option-card__body .tb-option-card__icon {
  background: rgba(8, 145, 178, 0.12);
}

.tb-option-card__text {
  flex: 1;
  min-width: 0;
}

.tb-option-card__title {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--tb-gray-800);
  line-height: 1.25;
}

.tb-option-card__desc {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--tb-gray-600);
  margin-top: 0.2rem;
  line-height: 1.4;
}

.tb-option-card__switch {
  flex-shrink: 0;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  transition: background 0.22s ease;
}

.tb-option-card__switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.tb-option-card__input:checked + .tb-option-card__body .tb-option-card__switch {
  background: #2563eb;
}

.tb-option-card--breaking .tb-option-card__input:checked + .tb-option-card__body .tb-option-card__switch {
  background: #ea580c;
}

.tb-option-card--web .tb-option-card__input:checked + .tb-option-card__body .tb-option-card__switch {
  background: #0891b2;
}

.tb-option-card__input:checked + .tb-option-card__body .tb-option-card__switch::after {
  transform: translateX(18px);
}

.tb-option-card__input:focus-visible + .tb-option-card__body {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.tb-form-existing-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.tb-form-existing-images img {
  max-width: 88px;
  border-radius: 8px;
  border: 1px solid var(--tb-border);
}

.tb-required {
  color: #dc2626;
  font-weight: 700;
  margin-left: 0.15rem;
}

.tb-hashtag-wrap {
  position: relative;
}

.tb-hashtag-suggestions {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--tb-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.tb-hashtag-suggestion {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--tb-blue);
  cursor: pointer;
  font-family: inherit;
}

.tb-hashtag-suggestion:hover,
.tb-hashtag-suggestion.is-active {
  background: #eff6ff;
}

.tb-field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--tb-gray-600);
}

.tb-news-length-counter--over {
  color: var(--tb-danger, #b91c1c);
  font-weight: 600;
}

@media (max-width: 640px) {
  .tb-form-row {
    grid-template-columns: 1fr;
  }
}

.tb-alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.tb-alert-success {
  background: #dcfce7;
  color: #166534;
}
.tb-alert-error {
  background: #fee2e2;
  color: #991b1b;
}

/* Toast notifications */
.tb-toast-stack {
  position: fixed;
  right: 1rem;
  top: 4.25rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}
.tb-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  background: #fff;
  color: #0f172a;
  transform: translateY(-6px);
  opacity: 0;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease;
}
.tb-toast-show {
  transform: translateY(0);
  opacity: 1;
}
.tb-toast-hide {
  transform: translateY(-4px);
  opacity: 0;
}
.tb-toast-body {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  line-height: 1.35;
}
.tb-toast-close {
  border: 0;
  background: transparent;
  color: #334155;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 8px;
}
.tb-toast-close:hover {
  background: #f3f4f6;
}
.tb-toast-success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #14532d;
}
.tb-toast-error {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #7f1d1d;
}
.tb-toast-info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}
.tb-toast-warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #78350f;
}

.tb-toast-rich {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
}
.tb-toast-rich__icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}
.tb-toast-rich__icon--x {
  background: #0f172a;
  color: #fff;
}
.tb-toast-rich__icon--warn {
  background: #fecaca;
  color: #991b1b;
}
.tb-toast-rich__main {
  flex: 1;
  min-width: 0;
}
.tb-toast-rich__title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.tb-toast-rich__text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  opacity: 0.92;
}
.tb-toast-rich__link {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tb-toast-success .tb-toast-rich__link {
  color: #166534;
}
.tb-toast-error .tb-toast-rich__link {
  color: #991b1b;
}
.tb-toast-rich__note {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
  opacity: 0.9;
}

/* Admin error log */
.tb-admin-error-log__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.tb-admin-error-log__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.tb-admin-error-log__list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.tb-admin-error-log__item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: #fff;
}
.tb-admin-error-log__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
  color: #64748b;
}
.tb-admin-error-log__category {
  font-weight: 700;
  color: #b91c1c;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.tb-admin-error-log__http {
  background: #fef2f2;
  color: #991b1b;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
}
.tb-admin-error-log__message {
  font-size: 1rem;
  margin: 0 0 0.35rem;
}
.tb-admin-error-log__heading,
.tb-admin-error-log__op {
  margin: 0.2rem 0;
  font-size: 0.88rem;
  color: #334155;
}
.tb-admin-error-log__details {
  margin: 0.65rem 0 0;
  padding: 0.75rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow: auto;
}
.tb-admin-error-log__stack-wrap {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}
.tb-admin-error-log__stack-wrap summary {
  cursor: pointer;
  color: #475569;
}

/* Hide empty ASP.NET validation summary on first load */
.validation-summary-valid {
  display: none !important;
}

.tb-image-dropzone {
  position: relative;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 1rem;
  background: #f8fafc;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
  min-height: 110px;
  outline: none;
}

.tb-image-upload__input {
  display: block;
  width: 100%;
  max-width: 28rem;
  margin-top: 0.35rem;
  font-size: 0.9rem;
}

.tb-image-upload__preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.tb-image-upload__preview:empty {
  display: none;
}

.tb-image-dropzone:focus-visible {
  border-color: var(--tb-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.tb-image-dropzone:hover,
.tb-image-dropzone.is-dragover {
  border-color: var(--tb-blue);
  background: #eff6ff;
}

.tb-image-dropzone__body {
  position: relative;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.45;
  padding: 0.25rem 0;
}

.tb-image-dropzone__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.tb-image-dropzone__body strong {
  color: var(--tb-blue);
}

.tb-image-dropzone__preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.75rem;
  pointer-events: auto;
}

.tb-image-dropzone__preview:empty {
  display: none;
}

.tb-image-preview-item {
  position: relative;
  width: 88px;
  text-align: center;
}

.tb-image-dropzone__thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--tb-border);
  cursor: pointer;
  display: block;
}

.tb-image-preview-item__actions {
  display: flex;
  gap: 0.25rem;
  justify-content: center;
  margin-top: 0.25rem;
}

.tb-image-preview-item__btn {
  border: none;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.68rem;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}

.tb-image-preview-item__btn:hover {
  background: #cbd5e1;
}

.tb-image-preview-item__btn--remove {
  color: #991b1b;
}

.tb-crop-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.tb-crop-modal[hidden] {
  display: none !important;
}

.tb-crop-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  border: none;
  cursor: pointer;
}

.tb-crop-modal__card {
  position: relative;
  z-index: 1;
  width: min(92vw, 640px);
  max-height: 90vh;
  background: #fff;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tb-crop-modal__card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.tb-crop-modal__stage {
  max-height: 55vh;
  overflow: hidden;
  background: #0f172a;
  border-radius: 10px;
}

.tb-crop-modal__stage img {
  display: block;
  max-width: 100%;
}

.tb-crop-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.tb-image-dropzone__name {
  font-size: 0.75rem;
  color: #475569;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tb-hashtag a {
  color: var(--tb-blue);
  text-decoration: none;
  margin-right: 0.22rem;
  font-size: 0.76rem;
}

.tb-hashtag a:hover {
  text-decoration: underline;
}

.tb-status {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tb-status-approved {
  background: #dcfce7;
  color: #166534;
}
.tb-status-pending {
  background: #fef9c3;
  color: #854d0e;
}
.tb-status-rejected {
  background: #fee2e2;
  color: #991b1b;
}
.tb-status-draft {
  background: #f3f4f6;
  color: #4b5563;
}

.tb-status-duplicate {
  background: #e0e7ff;
  color: #3730a3;
}

.tb-rich-editor {
  min-height: 180px;
  background: #fff;
  border-radius: 8px;
}

.tb-news-editor {
  width: 100%;
  min-height: 320px;
  resize: vertical;
  font-family: var(--tb-font);
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  box-sizing: border-box;
}

.tb-points-html,
.tb-expand-points.tb-points-html {
  line-height: var(--tb-point-line);
  font-size: var(--tb-point-font);
  font-family: var(--tb-font);
}

.tb-expand-points,
.tb-expand-points li {
  font-family: var(--tb-font);
}

.tb-points-html ul,
.tb-expand-points.tb-points-html ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--tb-point-gap);
}

.tb-points-html > li,
.tb-expand-points.tb-points-html > li,
.tb-expand-points > li {
  display: flex;
  align-items: flex-start;
  gap: 0.32rem;
  position: relative;
  margin: 0;
  padding: var(--tb-point-pad-y) var(--tb-point-pad-x);
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: var(--tb-point-radius);
  line-height: var(--tb-point-line);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.tb-points-html ul > li,
.tb-expand-points.tb-points-html ul > li {
  display: flex;
  align-items: flex-start;
  gap: 0.32rem;
  position: relative;
  margin: 0;
  padding: var(--tb-point-pad-y) var(--tb-point-pad-x);
  background: transparent;
  border: none;
  border-radius: 0;
  line-height: var(--tb-point-line);
  box-shadow: none;
}

.tb-points-html > li::before,
.tb-expand-points.tb-points-html > li::before,
.tb-expand-points > li::before {
  content: "";
  position: static;
  flex: 0 0 var(--tb-point-bullet);
  width: var(--tb-point-bullet);
  height: var(--tb-point-bullet);
  margin-top: 0.26em;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 1.5px rgba(37, 99, 235, 0.12);
}

.tb-points-html ul > li::before,
.tb-expand-points.tb-points-html ul > li::before {
  display: none;
}

/* Dashboard feed: raw JSON text, no CSS bullet cards */
.tb-points-trimmed > li,
.tb-expand-points.tb-points-trimmed > li,
.tb-expand-points.tb-points-trimmed.tb-points-html > li,
.tb-points-trimmed ul > li,
.tb-expand-points.tb-points-trimmed ul > li,
.tb-expand-points.tb-points-trimmed.tb-points-html ul > li {
  display: block;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  gap: 0;
}

.tb-points-trimmed > li::before,
.tb-expand-points.tb-points-trimmed > li::before,
.tb-expand-points.tb-points-trimmed.tb-points-html > li::before,
.tb-points-trimmed ul > li::before,
.tb-expand-points.tb-points-trimmed ul > li::before,
.tb-expand-points.tb-points-trimmed.tb-points-html ul > li::before {
  display: none;
  content: none;
}

.tb-points-trimmed > p,
.tb-expand-points.tb-points-trimmed > p,
.tb-expand-points.tb-points-trimmed.tb-points-html > p {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.tb-points-trimmed ul,
.tb-expand-points.tb-points-trimmed ul,
.tb-expand-points.tb-points-trimmed.tb-points-html ul {
  gap: 0.55rem;
}

.tb-points-html > p,
.tb-expand-points.tb-points-html > p {
  margin: 0;
  padding: var(--tb-point-pad-y) var(--tb-point-pad-x);
  background: #fff;
  border: 1px solid #e8edf3;
  border-radius: var(--tb-point-radius);
  line-height: var(--tb-point-line);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.tb-points-html ul > li > p,
.tb-expand-points.tb-points-html ul > li > p,
.tb-points-html > li > p {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  line-height: var(--tb-point-line);
  font-size: var(--tb-point-font);
}

.tb-search-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.tb-search-bar input {
  flex: 1 1 12rem;
  min-width: 0;
}

/* Search page */
.tb-search-page {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.tb-search-hero {
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  padding: 1.15rem 1.2rem 1.25rem;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
}

.tb-search-hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #3b82f6 0%, #06b6d4 52%, #10b981 100%);
}

.tb-search-hero--compact {
  padding: 0.95rem 1.1rem;
}

.tb-search-hero__head {
  margin-bottom: 1rem;
}

.tb-search-hero--compact .tb-search-hero__head {
  margin-bottom: 0.75rem;
}

.tb-search-hero__title {
  margin: 0 0 0.25rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--tb-gray-800);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.tb-search-hero--compact .tb-search-hero__title {
  font-size: 1.15rem;
  color: var(--tb-orange);
}

.tb-search-hero__sub {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.82rem;
  color: var(--tb-gray-600);
  line-height: 1.4;
}

.tb-search-page__form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.tb-search-page__fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.tb-search-page__field--wide {
  grid-column: 1 / -1;
}

.tb-search-page__input-wrap {
  position: relative;
  display: block;
}

.tb-search-page__input-wrap input {
  width: 100%;
  padding-right: 2.75rem;
}

.tb-search-page__clear {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #3b82f6;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.tb-search-page__clear svg {
  width: 1.05rem;
  height: 1.05rem;
}

.tb-search-page__clear:hover {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.08);
}

.tb-search-page__clear:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.tb-search-page__query-count {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tb-gray-600);
  margin-left: 0.35rem;
}

.tb-search-page--loading .tb-search-page__submit {
  opacity: 0.75;
  pointer-events: none;
}

.tb-search-page--loading .tb-search-page__submit-icon {
  animation: tb-search-spin 0.8s linear infinite;
}

@keyframes tb-search-spin {
  to { transform: rotate(360deg); }
}

.tb-search-page__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.tb-search-page__label {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tb-gray-600);
}

.tb-search-page__field input {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--tb-border);
  border-radius: 10px;
  font-family: var(--tb-font);
  font-size: 0.92rem;
  color: var(--tb-gray-800);
  background: #f8fafc;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.tb-search-page__field input::placeholder {
  color: var(--tb-gray-400);
}

.tb-search-page__field input:focus {
  outline: none;
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.tb-search-page__form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.55rem;
}

.tb-search-page__form-actions .tb-search-page__submit {
  flex: 1 1 auto;
}

.tb-search-page__cancel-btn {
  flex: 0 0 auto;
  min-height: 2.75rem;
  display: none;
}

.tb-search-page--edit .tb-search-page__cancel-btn {
  display: inline-flex;
}

.tb-search-page--has-results:not(.tb-search-page--edit) .tb-search-hero {
  display: none;
}

.tb-search-page__query-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  padding: 0.7rem 0.85rem;
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.tb-search-page--edit .tb-search-page__query-bar {
  display: none;
}

.tb-search-page__query-summary {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tb-search-page__query-label {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tb-gray-600);
}

.tb-search-page__query-value {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--tb-gray-800);
  line-height: 1.3;
  word-break: break-word;
}

.tb-search-page__edit-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.35rem;
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
  white-space: nowrap;
  border-color: rgba(59, 130, 246, 0.35);
  color: #1d4ed8;
  background: #eff6ff;
}

.tb-search-page__edit-btn:hover {
  background: #dbeafe;
  border-color: #3b82f6;
}

.tb-search-page__submit {
  width: 100%;
  min-height: 2.75rem;
  border-radius: 10px;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #1a1a1a 0%, #1f2937 100%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.tb-search-page__submit:hover {
  background: linear-gradient(135deg, #333 0%, #374151 100%);
}

.tb-search-page__submit-icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

.tb-search-page__back {
  width: fit-content;
  min-height: 2.25rem;
  font-size: 0.85rem;
}

.tb-search-page--has-results .tb-search-page__results {
  margin-top: 0;
}

.tb-search-page__results .tb-card {
  margin-top: 0;
}

.tb-search-page__empty {
  margin-top: 1rem;
  padding: 2rem 1.25rem;
  text-align: center;
  background: var(--tb-white);
  border: 1px dashed rgba(148, 163, 184, 0.55);
  border-radius: var(--tb-radius);
}

.tb-search-page__empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(239, 246, 255, 0.95),
    rgba(236, 253, 245, 0.95)
  );
  color: #3b82f6;
}

.tb-search-page__empty-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.tb-search-page__empty-title {
  margin: 0 0 0.35rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--tb-gray-800);
}

.tb-search-page__empty-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--tb-gray-600);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .tb-search-page {
    max-width: 100%;
  }

  .tb-search-hero {
    padding: 0.95rem 0.9rem 1rem;
    border-radius: 14px;
    margin-top: 0;
  }

  .tb-search-hero__head {
    margin-bottom: 0.85rem;
  }

  .tb-search-hero__title {
    font-size: 1.12rem;
  }

  .tb-search-hero__sub {
    font-size: 0.78rem;
  }

  .tb-search-page__fields {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .tb-search-page__field input {
    min-height: 2.85rem;
    font-size: 1rem;
    border-radius: 12px;
  }

  .tb-search-page__submit {
    min-height: 3rem;
    font-size: 1rem;
    border-radius: 12px;
  }

  .tb-search-page__results {
    margin-top: 0;
  }

  .tb-search-page__query-bar {
    flex-wrap: wrap;
    padding: 0.65rem 0.75rem;
  }

  .tb-search-page__edit-btn {
    width: 100%;
    justify-content: center;
    min-height: 2.5rem;
  }

  .tb-search-page__empty {
    margin-top: 0.75rem;
    padding: 1.5rem 1rem;
  }
}

@media (min-width: 901px) {
  .tb-search-page__form {
    flex-direction: row;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .tb-search-page__fields {
    flex: 1 1 20rem;
    min-width: 0;
  }

  .tb-search-page__form-actions .tb-search-page__submit {
    width: auto;
    min-width: 8.5rem;
    flex: 0 0 auto;
  }

  .tb-search-page__edit-btn {
    width: auto;
  }

  .tb-search-hero__title {
    font-size: 1.5rem;
  }
}

.tb-detail-images img {
  max-width: 100%;
  border-radius: 8px;
  margin: 0.5rem 0;
}

.tb-reactions {
  display: flex;
  gap: 0.75rem;
  margin: 1rem 0;
}

.tb-flyer {
  background: var(--tb-black);
  color: var(--tb-white);
  padding: 2rem;
  border-radius: var(--tb-radius);
  text-align: center;
}

.tb-flyer h2 {
  color: var(--tb-yellow);
  margin-top: 0;
}

@media (max-width: 520px) {
  .tb-card-body {
    padding: 0.55rem;
    gap: 0.55rem;
  }
  .tb-feed-recent {
    gap: 1rem;
    overflow-anchor: auto;
  }
  .tb-hashtag-sheet__feed {
    gap: 1rem;
    overflow-anchor: auto;
  }
  .tb-news-group {
    border-radius: 16px;
    transition:
      border-color 0.2s ease,
      box-shadow 0.2s ease;
  }

  .tb-news-group:hover {
    transform: none;
  }
  .tb-news-item {
    padding: 0.45rem 0.45rem 0.4rem;
    border-radius: 16px;
  }
  .tb-news-item-top {
    padding: 0.5rem 0.58rem 1.6rem 0.65rem;
    border-radius: 10px;
    gap: 0.45rem;
  }
  .tb-time-relative {
    top: 0.34rem;
    right: 0.38rem;
    font-size: 0.58rem;
    padding: 0.1rem 0.32rem;
  }
  .tb-news-item .tb-item-content {
    padding-right: 2.75rem;
    flex: 1 1 auto;
    min-width: 0;
  }
  .tb-news-item-toolbar {
    right: 0.38rem;
    bottom: 0.32rem;
    gap: 0.42rem;
  }
  .tb-news-item-toolbar .tb-news-admin-trigger,
  .tb-news-item-toolbar .tb-expand-toggle {
    width: 1.38rem;
    height: 1.38rem;
  }
  .tb-headline {
    font-size: 0.94rem;
    line-height: 1.36;
  }
  .tb-thumb {
    width: 60px;
    height: 48px;
    border-radius: 6px;
  }
}

/* Mobile expanded story order:
   1. image, 2. points, 3. hashtags, 4. footer, 5. react bar */
@media (max-width: 900px) {
  .tb-site-topline {
    background: #eceff2;
  }

  .tb-site-toolbar {
    background: #eceff2;
    border-bottom-color: rgba(15, 23, 42, 0.06);
  }

  .tb-expand.open.tb-expand--no-media,
  .tb-expand--no-media.tb-expand--landscape.open,
  .tb-expand--no-media.tb-expand--portrait.open {
    background: #eceff2;
  }

  .tb-news-item {
    cursor: pointer;
  }

  .tb-news-item .tb-headline {
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
  }

  .tb-news-item:active .tb-headline {
    text-decoration: underline;
  }

  .tb-expand-stage {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.44s cubic-bezier(0.33, 1, 0.68, 1);
  }

  .tb-expand-stage.is-open {
    grid-template-rows: 1fr;
  }

  .tb-expand-stage.tb-expand-stage--instant {
    transition: none !important;
  }

  /* ~30% longer, softer open when story has a hero image */
  .tb-expand-stage.tb-expand-stage--has-media {
    transition: grid-template-rows 0.58s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .tb-expand-stage.tb-expand-stage--has-media .tb-expand-img-wrap {
    opacity: 0;
    transform: translateY(10px);
    transition:
      opacity 0.52s ease 0.1s,
      transform 0.58s cubic-bezier(0.22, 1, 0.36, 1) 0.08s;
  }

  .tb-expand-stage.tb-expand-stage--has-media.is-open .tb-expand-img-wrap {
    opacity: 1;
    transform: translateY(0);
  }

  .tb-expand-stage.tb-expand-stage--has-media .tb-expand-img {
    transition: opacity 0.48s ease 0.14s;
  }

  .tb-expand-stage.tb-expand-stage--has-media:not(.is-open) .tb-expand-img {
    opacity: 0;
  }

  .tb-expand-stage.tb-expand-stage--has-media.is-open .tb-expand-img {
    opacity: 1;
  }

  .tb-expand-inner {
    overflow: hidden;
    min-height: 0;
  }

  .tb-expand-stage .tb-expand {
    display: flex;
    flex-direction: column;
    max-height: none !important;
    opacity: 1;
    overflow: visible;
    transition: none;
  }

  .tb-expand-stage:not(.is-open) .tb-expand {
    pointer-events: none;
  }

  .tb-expand.open .tb-expand-body {
    display: contents;
  }

  .tb-expand.open .tb-expand-img-wrap {
    order: 1;
    display: block;
    width: 100%;
    padding: 0.85rem 1.25rem 0.5rem;
    overflow: visible;
    background: #0f172a;
    border-radius: 12px;
  }

  .tb-expand.open .tb-expand-points,
  .tb-expand.open .tb-expand-points.tb-points-html {
    order: 2;
    margin: 0;
    padding: 0.28rem 0.85rem 0.35rem;
    gap: var(--tb-point-gap);
    font-size: var(--tb-point-font);
    line-height: var(--tb-point-line);
  }

  .tb-expand.open .tb-expand-points.tb-points-html > li,
  .tb-expand.open .tb-expand-points.tb-points-html ul > li,
  .tb-expand.open .tb-expand-points > li {
    padding: var(--tb-point-pad-y) var(--tb-point-pad-x);
    gap: 0.32rem;
    border-radius: var(--tb-point-radius);
  }

  .tb-expand.open .tb-expand-points.tb-points-trimmed > li,
  .tb-expand.open .tb-expand-points.tb-points-trimmed.tb-points-html > li,
  .tb-expand.open .tb-expand-points.tb-points-trimmed ul > li,
  .tb-expand.open .tb-expand-points.tb-points-trimmed.tb-points-html ul > li {
    padding: 0;
    gap: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .tb-expand.open .tb-expand-img {
    width: 100%;
    height: auto;
    max-height: min(75vh, 680px);
    object-fit: contain;
    border-radius: 10px;
  }

  .tb-expand.open .tb-expand-footer {
    order: 3;
    margin: 0 0.85rem;
    padding-top: 0.25rem;
    border-top: 1px dashed rgba(226, 232, 240, 0.9);
  }

  .tb-expand.open .tb-expand-footer .tb-expand-meta-strip,
  .tb-expand.open .tb-expand-footer .tb-react-bar {
    margin: 0;
    padding: 0;
    border: none;
  }
}

/* ── Twitter List Modal ─────────────────────────────────────────────────── */
.tw-modal {
  position: fixed;
  inset: 0;
  z-index: 10200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 2.5rem;
}
.tw-modal[hidden] {
  display: none !important;
}

.tw-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}
.tw-modal-box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: var(--tb-radius);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
  width: min(96vw, 1100px);
  max-height: calc(100vh - 5rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tw-modal-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.tw-modal-head-title {
  flex: 1;
  min-width: 10rem;
}
.tw-modal-head h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}
.tw-title-updated {
  font-weight: 500;
  font-size: 0.88em;
  color: #64748b;
  white-space: nowrap;
}
.tw-updated-age {
  display: inline-block;
  font-weight: 700;
  font-size: 1em;
  padding: 0.06em 0.38em;
  border-radius: 5px;
  letter-spacing: 0.01em;
}
.tw-updated-age--fresh {
  color: #047857;
  background: rgba(16, 185, 129, 0.16);
}
.tw-updated-age--mins {
  color: #0369a1;
  background: rgba(14, 165, 233, 0.14);
}
.tw-updated-age--hrs {
  color: #c2410c;
  background: rgba(249, 115, 22, 0.16);
}
.tw-updated-age--days {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.14);
}
.tw-modal-head-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
.tw-search-input {
  padding: 0.35rem 0.65rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.85rem;
  width: 200px;
  outline: none;
}
.tw-search-input:focus {
  border-color: #111;
}

.tw-status {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.tw-status.tw-status-info {
  background: #eff6ff;
  color: #1d4ed8;
}
.tw-status.tw-status-success {
  background: #f0fdf4;
  color: #166534;
}
.tw-status.tw-status-error {
  background: #fef2f2;
  color: #991b1b;
}

.tw-table-wrap {
  overflow-y: auto;
  flex: 1;
}

.tw-table {
  width: 100%;
  font-size: 0.82rem;
  table-layout: fixed;
}
.tw-table col.tw-col-user {
  width: 15%;
}
.tw-table col.tw-col-post {
  width: auto;
}
.tw-table col.tw-col-media {
  width: 5%;
}
.tw-table col.tw-col-date {
  width: 11%;
}
.tw-table col.tw-col-status {
  width: 8%;
}
.tw-table col.tw-col-actions {
  width: 14%;
}
.tw-col-actions .tb-icon-btn {
  min-width: 30px;
}

.tw-table thead th {
  position: sticky;
  top: 0;
  background: #f9fafb;
  padding: 0.5rem 0.6rem;
  white-space: nowrap;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}
.tw-table td {
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.tw-row-ignored td {
  opacity: 0.55;
}

.tw-user-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
}
.tw-user-row .tw-user-compact {
  flex: 1;
  min-width: 0;
}
.tw-user-compact {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.tb-icon-copy {
  color: #0369a1;
  border-color: #7dd3fc;
  background: #f0f9ff;
}
.tb-icon-copy:hover {
  background: #e0f2fe;
}
.tw-copy-btn {
  flex-shrink: 0;
  margin-top: 0.05rem;
}
.tw-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.tw-avatar-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.tw-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tw-cell-text {
  word-break: break-word;
  line-height: 1.4;
}

.tw-col-media {
  text-align: center;
}
.tw-col-date {
  white-space: normal;
  font-size: 0.72rem;
  color: #6b7280;
  line-height: 1.25;
}
.tw-date-main,
.tw-date-time {
  display: block;
}
.tw-mobile-status-inline {
  display: none;
}
.tw-col-actions .tb-icon-actions {
  flex-wrap: nowrap;
  gap: 2px;
}
.tw-col-actions .tb-icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.tw-loading {
  text-align: center;
  padding: 2rem;
  color: #6b7280;
}

@media (max-width: 720px) {
  .tw-modal {
    align-items: stretch;
    padding: 0.65rem;
  }

  .tw-modal-box {
    width: 100%;
    max-height: calc(100dvh - 1.3rem);
    border-radius: 20px;
  }

  .tw-modal-head {
    align-items: flex-start;
    gap: 0.64rem;
    padding: 0.75rem;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
  }

  .tw-modal-head h2 {
    width: 100%;
    flex: none;
    min-width: 0;
    font-size: 0.79rem;
    line-height: 1.3;
  }

  .tw-title-updated {
    display: block;
    margin-top: 0.12rem;
    font-size: 0.92em;
    white-space: normal;
  }

  .tw-modal-head-title {
    width: 100%;
    min-width: 0;
  }

  .tw-modal-head-actions {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.41rem;
    width: 100%;
  }

  .tw-search-input {
    width: 100%;
    min-height: 32px;
    border-radius: 8px;
    font-size: 0.71rem;
    padding: 0.26rem 0.49rem;
  }

  .tw-modal-head-actions .tb-btn {
    min-height: 32px;
    border-radius: 8px;
    padding: 0.34rem 0.56rem;
    font-size: 0.71rem;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  }

  .tw-status {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .tw-table-wrap {
    background: #f3f4f6;
    padding: 0.75rem;
  }

  .tw-table,
  .tw-table colgroup,
  .tw-table thead,
  .tw-table tbody,
  .tw-table tr,
  .tw-table td {
    display: block;
    width: 100%;
  }

  .tw-table thead,
  .tw-table colgroup {
    display: none;
  }

  .tw-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
  }

  .tw-table tr {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    margin-bottom: 0.8rem;
    overflow: hidden;
  }

  .tw-table td {
    border-bottom: 1px solid #f1f5f9;
    padding: 0.7rem 0.85rem;
  }

  .tw-table td:last-child {
    border-bottom: 0;
  }

  .tw-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.25rem;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
  }

  .tw-cell-user::before,
  .tw-cell-text::before,
  .tw-col-actions::before {
    display: none !important;
  }

  .tw-cell-user {
    background: #f8fafc;
  }

  .tw-user-row {
    align-items: center;
  }

  .tw-user-compact {
    gap: 0.7rem;
  }

  .tw-copy-btn {
    width: 2.15rem;
    height: 2.15rem;
    margin-top: 0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  }

  .tw-copy-btn .tw-action-icon {
    width: 1rem;
    height: 1rem;
  }

  .tw-avatar,
  .tw-avatar-fallback {
    width: 40px;
    height: 40px;
  }

  .tw-name {
    font-size: 0.95rem;
    -webkit-line-clamp: 1;
  }

  .tw-cell-text {
    font-size: 0.96rem;
    line-height: 1.55;
    color: #1f2937;
  }

  .tw-col-media:empty {
    display: none;
  }

  .tw-table td.tw-col-status {
    display: none;
  }

  .tw-col-date {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    color: #475569;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 0.82rem;
    line-height: 1.2;
  }

  .tw-col-date::before {
    width: 100%;
  }

  .tw-date-main,
  .tw-date-time {
    display: inline;
  }

  .tw-date-main {
    font-weight: 700;
    color: #334155;
  }

  .tw-date-time {
    border-radius: 999px;
    background: #f1f5f9;
    padding: 0.15rem 0.45rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .tw-mobile-status-inline {
    display: inline-flex;
    align-items: center;
  }

  .tw-mobile-status-inline .tb-status {
    min-height: 26px;
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    font-size: 0.78rem;
  }

  .tw-col-actions {
    background: #f8fafc;
  }

  .tw-col-actions .tb-icon-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .tw-col-actions .tb-icon-btn,
  .tw-col-media .tb-icon-btn {
    width: 100%;
    min-height: 42px;
    border-radius: 12px;
    gap: 0.35rem;
    font-size: 0.95rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  }

  .tw-col-actions .tb-icon-btn::after,
  .tw-col-media .tb-icon-btn::after {
    content: attr(data-action-label);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
  }
}

/* Media player popup (Plyr) */
.tw-media-modal {
  position: fixed;
  inset: 0;
  z-index: 10210;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tw-media-modal[hidden] {
  display: none !important;
}
.tw-media-inner {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 560px);
  width: 100%;
  padding: 1rem;
}
.tw-media-inner--embed {
  max-width: min(92vw, 600px);
}
.tw-media-close {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background: rgba(0, 0, 0, 0.65);
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  z-index: 2;
}
.tw-embed-wrap {
  width: 100%;
  min-height: 420px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}
.tw-tweet-embed {
  width: 100%;
  min-height: 480px;
  height: 520px;
  border: none;
  display: block;
}
.tw-tweet-embed--compact {
  min-height: 380px;
  height: 420px;
}
.tw-preview-media--embed {
  padding: 0;
  border: none;
  background: transparent;
}
.tw-preview-media--embed .tw-embed-wrap {
  min-height: 380px;
}
.tw-media-img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

/* Tweet preview popup (Twitter-style) */
.tw-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 10210;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.tw-preview-modal[hidden] {
  display: none !important;
}
.tw-preview-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.28);
  width: min(92vw, 520px);
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid #eff3f4;
}
.tw-preview-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  z-index: 2;
  font-size: 0.9rem;
  line-height: 1;
}
.tw-tweet-card {
  padding: 1rem 1.1rem 1.1rem;
}
.tw-tweet-header {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.tw-preview-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.tw-preview-avatar-fallback {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1d9bf0;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.tw-tweet-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.tw-tweet-name {
  font-size: 0.95rem;
  color: #0f1419;
}
.tw-tweet-handle,
.tw-tweet-time {
  font-size: 0.82rem;
  color: #536471;
}
.tw-tweet-body {
  font-size: 0.95rem;
  line-height: 1.45;
  color: #0f1419;
  white-space: pre-wrap;
  word-break: break-word;
}
.tw-tweet-body a {
  color: #1d9bf0;
  text-decoration: none;
}
.tw-tweet-body a:hover {
  text-decoration: underline;
}
.tw-preview-media {
  margin-top: 0.75rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eff3f4;
}
.tw-preview-img {
  width: 100%;
  display: block;
  object-fit: cover;
}
.tw-tweet-footer {
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid #eff3f4;
}
.tw-preview-link {
  color: #1d9bf0;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 500;
}
.tw-preview-link:hover {
  text-decoration: underline;
}

/* INTEGRATED: Paid generation warning popup (above editor modal) */
.tw-cost-modal {
  position: fixed;
  inset: 0;
  z-index: 10250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.tw-cost-modal[hidden] {
  display: none !important;
}
.tw-cost-card {
  position: relative;
  z-index: 1;
  width: min(460px, 94vw);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
  padding: 1.15rem;
}
.tw-cost-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  color: #111827;
}
.tw-cost-card p {
  margin: 0 0 0.9rem;
  color: #475569;
  line-height: 1.5;
  font-size: 0.92rem;
}
.tw-cost-links,
.tw-cost-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.tw-cost-links {
  margin-bottom: 0.9rem;
}
.tw-cost-actions {
  justify-content: flex-end;
}

.tw-cost-progress {
  padding: 0.35rem 0 0.15rem;
}

.tw-cost-progress__label,
.tw-generated-progress__label {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
  text-align: center;
}

.tw-cost-progress__track,
.tw-generated-progress__track {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.tw-cost-progress__bar,
.tw-generated-progress__bar {
  height: 100%;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c3aed, #2563eb, #7c3aed);
  background-size: 200% 100%;
  animation: tw-progress-indeterminate 1.15s ease-in-out infinite;
}

@keyframes tw-progress-indeterminate {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(320%);
  }
}

.tw-generated-progress {
  flex-shrink: 0;
  margin: 0 0 0.35rem;
  padding: 0.55rem 0.65rem 0.65rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #f5f3ff 0%, #eff6ff 100%);
  border: 1px solid #ddd6fe;
}

.tw-generated-progress[hidden] {
  display: none !important;
}

/* INTEGRATED: Claude generated news editor popup */
.tw-generated-modal {
  position: fixed;
  inset: 0;
  z-index: 10230;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.tw-generated-modal[hidden] {
  display: none !important;
}
.tw-generated-card {
  position: relative;
  z-index: 1;
  width: min(736px, 96vw);
  max-height: min(96vh, 1058px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
  border: 1px solid #e5e7eb;
  padding: 1.32rem 1.44rem 1.27rem;
  display: flex;
  flex-direction: column;
  gap: 1.04rem;
}
.tw-generated-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 0.45rem 0.65rem;
  padding-right: 2.25rem;
  align-items: center;
}
.tw-generated-head-text {
  grid-column: 1;
  grid-row: 1 / 3;
  min-width: 0;
  align-self: start;
}
.tw-generated-head h3 {
  margin: 0;
  font-size: 1.08rem;
  color: #111827;
  line-height: 1.25;
}
.tw-generated-head p {
  margin: 0.25rem 0 0;
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.3;
}
.tw-generated-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
}
.tw-generated-head:not(:has(#tw-generated-manual-links:not([hidden])))
  .tw-generated-badge {
  grid-row: 1;
  align-self: start;
}
.tw-generated-manual-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex: none;
  width: auto;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: center;
}
.tw-generated-manual-links[hidden] {
  display: none !important;
}
.tw-generated-manual-links .tb-btn {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 38px;
  padding: 0.42rem 0.9rem;
  border-radius: 10px;
  font-size: 0.84rem;
  box-sizing: border-box;
  white-space: nowrap;
}
.tw-generated-manual-links #tw-generated-gpt,
.tw-generated-manual-links #tw-generated-format {
  flex: 0 0 auto;
}
.tw-generated-manual-links .tb-btn-symbol,
.tw-generated-actions .tb-btn-symbol {
  min-width: 1.35rem;
  height: 1.35rem;
  font-size: 0.72rem;
}
.tw-generated-editor-wrap {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.tw-generated-clear {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #64748b;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s;
}
.tw-generated-clear svg {
  width: 1rem;
  height: 1rem;
}
.tw-generated-clear:hover {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}
.tw-generated-clear:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}
.tw-generated-editor {
  width: 100%;
  resize: vertical;
  min-height: 305px;
  max-height: min(63vh, 503px);
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 0.95rem 2.75rem 0.95rem 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #111827;
  background: #fff;
  font-family: var(--tb-font);
  white-space: pre-wrap;
  word-break: break-word;
  box-sizing: border-box;
}
.tw-generated-editor:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.tw-generated-files {
  min-height: 1rem;
  color: #475569;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.tw-generated-quota,
.tw-generated-hashtag-hint {
  flex-shrink: 0;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
}

.tw-generated-quota--web-only,
.tw-generated-quota--limit {
  color: #b91c1c;
  font-weight: 600;
}

.tw-generated-quota--available {
  color: #0f766e;
  font-weight: 600;
}
.tw-generated-status {
  flex-shrink: 0;
  margin: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.35;
}
.tw-generated-status[hidden] {
  display: none;
}
.tw-generated-status.tw-status-error {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.tw-generated-status.tw-status-info {
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}
.tw-generated-status.tw-status-success {
  color: #0f766e;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}
.tw-generated-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 0.65rem;
  flex-shrink: 0;
  padding-top: 0.15rem;
  border-top: 1px solid #e5e7eb;
  margin-top: 0.1rem;
}
.tw-generated-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  gap: 0.55rem;
  flex-wrap: nowrap;
  flex: 0 0 auto;
}
.tw-generated-actions .tb-btn {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 40px;
  padding: 0.48rem 0.85rem;
  border-radius: 10px;
  font-size: 0.84rem;
  box-sizing: border-box;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .tw-generated-modal {
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
    padding: var(--tw-generated-top, 0.65rem) 0.65rem
      var(
        --tw-generated-bottom,
        calc(5.25rem + env(safe-area-inset-bottom, 0px))
      );
  }

  .tw-generated-card {
    width: 100%;
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    max-height: none;
    border-radius: 20px;
    gap: 0.42rem;
    padding: 0.59rem;
    overflow: hidden;
  }

  .tw-generated-card .tw-preview-close {
    top: 0.42rem;
    right: 0.42rem;
    width: 20px;
    height: 20px;
    font-size: 0.63rem;
  }

  .tw-generated-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: auto auto;
    gap: 0.21rem 0.28rem;
    padding-right: 1.55rem;
    align-items: center;
    flex-shrink: 0;
  }

  .tw-generated-head-text {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: start;
  }

  .tw-generated-head h3 {
    font-size: 0.74rem;
    line-height: 1.15;
  }

  .tw-generated-head p {
    font-size: 0.57rem;
    margin: 0.1rem 0 0;
    line-height: 1.15;
  }

  .tw-generated-manual-links {
    grid-column: 2 / 4;
    grid-row: 1;
    width: auto;
    flex: none;
    gap: 0.21rem;
    justify-self: end;
  }

  .tw-generated-manual-links #tw-generated-gpt {
    flex: 0 1 auto;
    max-width: 7.2rem;
    min-height: 24px;
    padding: 0.22rem 0.34rem;
    font-size: 0.62rem;
  }

  .tw-generated-manual-links #tw-generated-gpt span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 4.5rem;
  }

  .tw-generated-manual-links #tw-generated-format {
    flex: 0 0 auto;
    min-width: 4.2rem;
    min-height: 24px;
    padding: 0.22rem 0.34rem;
    font-size: 0.62rem;
  }

  .tw-generated-badge {
    grid-column: 2 / 4;
    grid-row: 2;
    justify-self: end;
    font-size: 0.53rem;
    padding: 0.12rem 0.42rem;
  }

  .tw-generated-head:not(:has(#tw-generated-manual-links:not([hidden])))
    .tw-generated-badge {
    grid-row: 1;
    align-self: start;
  }

  .tw-generated-manual-links .tb-btn-symbol,
  .tw-generated-actions .tb-btn-symbol {
    min-width: 0.77rem;
    height: 0.77rem;
    font-size: 0.42rem;
  }

  .tw-generated-editor {
    flex: 1 1 0;
    min-height: 120px;
    max-height: none;
    overflow-y: auto;
    padding: 0.7rem 2.4rem 0.7rem 0.7rem;
    font-size: 0.88rem;
    line-height: 1.5;
    border-radius: 10px;
  }

  .tw-generated-clear {
    top: 0.42rem;
    right: 0.42rem;
    width: 1.65rem;
    height: 1.65rem;
  }

  .tw-generated-clear svg {
    width: 0.82rem;
    height: 0.82rem;
  }

  .tw-generated-files {
    min-height: 0;
    font-size: 0.57rem;
  }

  .tw-generated-quota,
  .tw-generated-hashtag-hint {
    font-size: 0.58rem;
    line-height: 1.25;
  }

  .tw-generated-quota--web-only,
  .tw-generated-quota--limit,
  .tw-generated-quota--available {
    font-weight: 600;
  }

  .tw-generated-footer {
    flex-wrap: nowrap;
    gap: 0.28rem 0.35rem;
    padding-top: 0.28rem;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .tb-post-options--modal-row {
    flex: 1 1 auto;
    min-width: 0;
  }

  .tb-option-card--compact {
    max-width: none;
    flex: 1 1 0;
  }

  .tb-option-card--compact .tb-option-card__body {
    padding: 0.32rem 0.4rem;
    gap: 0.28rem;
  }

  .tb-option-card--compact .tb-option-card__icon {
    width: 1.35rem;
    height: 1.35rem;
    font-size: 0.75rem;
  }

  .tb-option-card--compact .tb-option-card__title {
    font-size: 0.62rem;
  }

  .tb-option-card--compact .tb-option-card__switch {
    width: 30px;
    height: 18px;
  }

  .tb-option-card--compact .tb-option-card__switch::after {
    width: 12px;
    height: 12px;
    top: 3px;
    left: 3px;
  }

  .tb-option-card--compact .tb-option-card__input:checked + .tb-option-card__body .tb-option-card__switch::after {
    transform: translateX(12px);
  }

  .tw-generated-actions {
    gap: 0.22rem;
    flex-shrink: 0;
    flex: 0 0 auto;
  }

  .tw-generated-actions .tb-btn {
    flex: 0 0 auto;
    min-height: 28px;
    min-width: 0;
    padding: 0.28rem 0.35rem;
    border-radius: 7px;
    font-size: 0.62rem;
    gap: 0.2rem;
  }

  .tw-generated-actions .tb-btn span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.tw-load-news-btn {
  width: 100%;
  text-align: center;
}
.tb-btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Twitter feed sidebar (admin) */
.tb-twitter-feed {
  margin-top: 1rem;
  position: relative;
  overflow: visible;
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.tb-twitter-feed-head h3 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}
.tb-twitter-feed-head h3 svg {
  width: 18px;
  height: 18px;
  color: #0f1419;
}
.tb-twitter-feed-empty {
  margin: 0;
  font-size: 0.82rem;
  color: var(--tb-gray-600);
  line-height: 1.45;
}
.tb-twitter-feed-table {
  width: 100%;
  font-size: 0.78rem;
  border-collapse: collapse;
  table-layout: fixed;
}

/* Handle compact; News / Posted split ~60/40 of space after handle */
.tb-twitter-col-handle {
  width: 22%;
}

.tb-twitter-col-news {
  width: 47%;
}

.tb-twitter-col-posted {
  width: 31%;
}
.tb-twitter-feed-table th {
  text-align: left;
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid var(--tb-border);
  color: var(--tb-gray-600);
  font-weight: 600;
  white-space: nowrap;
}
.tb-twitter-feed-table td {
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: top;
}
.tb-twitter-feed-handle {
  font-weight: 600;
  color: #1d4ed8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tb-twitter-feed-text {
  color: var(--tb-black);
  font-family: inherit;
  position: relative;
  cursor: help;
  overflow: hidden;
  min-width: 0;
  max-width: 0; /* with table-layout:fixed, clip to col width so ellipsis uses full News column */
}
.tb-twitter-feed-preview {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}
.tb-twitter-feed-table th:last-child,
.tb-twitter-feed-table td.tb-twitter-feed-date {
  text-align: right;
  padding-left: 0.25rem;
}
.tb-twitter-feed-text:hover,
.tb-twitter-feed-text:focus {
  color: #1d4ed8;
  outline: none;
}
.tb-twitter-feed-text:hover::after,
.tb-twitter-feed-text:focus::after {
  content: attr(data-full-text);
  position: absolute;
  right: -0.25rem;
  bottom: calc(100% + 0.65rem);
  z-index: 250;
  width: min(320px, 72vw);
  max-height: 220px;
  overflow: auto;
  white-space: normal;
  line-height: 1.45;
  font-size: 0.82rem;
  font-weight: 500;
  color: #f9fafb;
  background: linear-gradient(135deg, #111827 0%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28);
}
.tb-twitter-feed-text:hover::before,
.tb-twitter-feed-text:focus::before {
  content: "";
  position: absolute;
  right: 1rem;
  bottom: calc(100% + 0.28rem);
  z-index: 251;
  width: 10px;
  height: 10px;
  background: #0f172a;
  transform: rotate(45deg);
}
.tb-twitter-feed-date {
  color: var(--tb-gray-600);
  font-size: 0.72rem;
  line-height: 1.35;
  word-break: break-word;
  white-space: normal;
}
.tb-twitter-feed-date .tw-date-main,
.tb-twitter-feed-date .tw-date-time {
  display: block;
}

/* X trending topics (sidebar) */
.tb-trends {
  margin-top: 1rem;
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.tb-trends-head {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.75rem;
}

.tb-trends-head h3 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.95rem;
}

.tb-trends-head h3 svg {
  width: 18px;
  height: 18px;
  color: #0f1419;
}

.tb-trends-meta {
  font-size: 0.72rem;
  color: var(--tb-gray-600);
}

.tb-trends-empty {
  margin: 0;
  font-size: 0.82rem;
  color: var(--tb-gray-600);
  line-height: 1.45;
}

.tb-trends-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tb-trends-row {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid transparent;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.tb-trends-row--velocity {
  grid-template-columns: 1.6rem minmax(0, 1fr) auto auto;
}

.tb-trends-row--arrow:not(.tb-trends-row--velocity) {
  grid-template-columns: 1.6rem minmax(0, 1fr) auto auto;
}

.tb-trends-row--velocity.tb-trends-row--arrow {
  grid-template-columns: 1.6rem minmax(0, 1fr) auto auto auto;
}

.tb-trends-item {
  display: contents;
  color: inherit;
  text-decoration: none;
}

.tb-trends-row:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.tb-trends-row:hover .tb-trends-name,
.tb-trends-row:hover .tb-trends-rank {
  color: #1d4ed8;
}

.tb-trends-copy {
  order: 3;
  flex-shrink: 0;
  width: 1.55rem;
  height: 1.55rem;
  position: relative;
  z-index: 1;
}

.tb-trends-copy-icon {
  width: 14px;
  height: 14px;
}

.tb-trends-rank {
  order: 1;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--tb-gray-600);
  text-align: center;
}

.tb-trends-name {
  order: 2;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tb-trends-arrow {
  order: 5;
  width: 14px;
  height: 14px;
  opacity: 0.45;
}

.tb-trends-row:hover .tb-trends-arrow {
  opacity: 1;
}

.tb-trends-velocity {
  order: 4;
  display: inline-block;
  max-width: 6.5rem;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.14rem 0.32rem;
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.tb-trends-velocity--fast {
  color: #be123c;
  background: #ffe4e6;
  border: 1px solid #fecdd3;
}

.tb-trends-velocity--rise {
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}

.tb-trends-velocity--stable {
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.tb-trends-velocity--cool {
  color: #15803d;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.tb-trends-row--sheet.tb-trends-row--velocity {
  grid-template-columns: 1.6rem minmax(0, 1fr) auto auto;
}

.tb-trends-row--sheet .tb-trends-name {
  white-space: normal;
}

.tb-trends-row--sheet .tb-trends-velocity {
  justify-self: end;
  flex-shrink: 0;
  max-width: 5.75rem;
  font-size: 0.55rem;
}

/* Mobile bottom sheet when trends refresh */
.tb-trends-sheet {
  position: fixed;
  inset: 0;
  z-index: 1260;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.tb-trends-sheet[hidden] {
  display: none;
}

.tb-trends-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: auto;
}

.tb-trends-sheet__panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: min(78vh, 640px);
  background: var(--tb-white);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.22);
  transform: translateY(105%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tb-trends-sheet.is-open {
  pointer-events: auto;
}

.tb-trends-sheet.is-open .tb-trends-sheet__backdrop {
  opacity: 1;
}

.tb-trends-sheet.is-open .tb-trends-sheet__panel {
  transform: translateY(0);
}

.tb-trends-sheet__handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #d1d5db;
  margin: 0.55rem auto 0;
  flex-shrink: 0;
}

.tb-trends-sheet__header {
  padding: 0.65rem 1rem 0.75rem;
  border-bottom: 1px solid var(--tb-border);
  position: relative;
}

.tb-trends-sheet__header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.tb-trends-sheet__sub {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--tb-gray-600);
}

.tb-trends-sheet__close {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--tb-gray-600);
}

.tb-trends-sheet__list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0.85rem 1.25rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tb-trends-row--sheet {
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  color: var(--tb-black);
}

body.tb-trends-sheet-open {
  overflow: hidden;
}

@media (min-width: 901px) {
  .tb-trends-sheet {
    display: none !important;
  }
}

/* Hashtag bottom sheet — dashboard */
:root {
  --tb-hashtag-sheet-top: 36vh;
}

.tb-hashtag-sheet {
  position: fixed;
  inset: 0;
  z-index: 1270;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.tb-hashtag-sheet[hidden] {
  display: none;
}

.tb-hashtag-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: auto;
}

.tb-hashtag-sheet__panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: min(82vh, 720px);
  background: var(--tb-white);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.22);
  transform: translateY(105%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tb-hashtag-sheet.is-open {
  pointer-events: auto;
}

.tb-hashtag-sheet.is-open .tb-hashtag-sheet__backdrop {
  opacity: 1;
}

.tb-hashtag-sheet.is-open .tb-hashtag-sheet__panel {
  transform: translateY(0);
}

.tb-hashtag-sheet__handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #d1d5db;
  margin: 0.55rem auto 0;
  flex-shrink: 0;
}

.tb-hashtag-sheet__header {
  padding: 0.65rem 1rem 0.75rem;
  border-bottom: 1px solid var(--tb-border);
  position: relative;
  flex-shrink: 0;
}

.tb-hashtag-sheet__header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.tb-hashtag-sheet__sub {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--tb-gray-600);
}

.tb-hashtag-sheet__close {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.tb-hashtag-sheet__close:hover {
  background: #e2e8f0;
}

.tb-hashtag-sheet__trending {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  padding: 0.65rem 0.85rem;
  overflow-x: auto;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
}

.tb-hashtag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}

.tb-hashtag-chip.is-active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.tb-hashtag-chip__count {
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.85;
}

.tb-hashtag-sheet__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.5rem 0.85rem 1rem;
}

.tb-hashtag-sheet__feed {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tb-hashtag-sheet__feed .tb-news-group {
  margin: 0;
}

.tb-hashtag-sheet__more {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--tb-border);
  text-align: center;
}

.tb-hashtag-sheet__more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.tb-hashtag-sheet__more-link:hover {
  background: #dbeafe;
  border-color: #93c5fd;
}

.tb-hashtag-sheet__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.tb-hashtag-sheet__post {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--tb-border);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.tb-hashtag-sheet__post:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.tb-hashtag-sheet__post-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
}

.tb-hashtag-sheet__post-meta {
  font-size: 0.72rem;
  color: var(--tb-gray-600);
}

.tb-hashtag-sheet__hint,
.tb-hashtag-sheet__empty,
.tb-hashtag-sheet__loading {
  margin: 0;
  padding: 1rem 0.25rem;
  text-align: center;
  color: var(--tb-gray-600);
  font-size: 0.88rem;
}

body.tb-hashtag-sheet-open {
  overflow: hidden;
}

@media (min-width: 901px) {
  .tb-hashtag-sheet {
    align-items: center;
    justify-content: center;
  }

  .tb-hashtag-sheet__panel {
    width: 50vw;
    height: 50vh;
    max-width: 50vw;
    max-height: 50vh;
    border-radius: 18px;
    transform: scale(0.96);
    opacity: 0;
    transition:
      transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.28s ease;
  }

  .tb-hashtag-sheet.is-open .tb-hashtag-sheet__panel {
    transform: scale(1);
    opacity: 1;
  }

  .tb-hashtag-sheet__handle {
    display: none;
  }
}

@media (max-width: 900px) {
  body.tb-hashtag-sheet-open .tb-mobile-dock {
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
  }

  .tb-hashtag-sheet {
    align-items: stretch;
    justify-content: stretch;
  }

  .tb-hashtag-sheet__panel {
    position: absolute !important;
    left: 0;
    right: 0;
    bottom: 0;
    top: var(--tb-hashtag-sheet-top, 36vh) !important;
    width: 100%;
    max-width: none;
    max-height: none !important;
    height: auto;
    margin: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

/* ── Options / Profile page ─────────────────────────────────────────────── */
.tb-input {
  width: 100%;
  max-width: 280px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: inherit;
}
/* Auth pages */
.tb-auth-panel {
  max-width: 440px;
  margin: 2rem auto;
}

.tb-auth-sub {
  color: var(--tb-gray-600);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
}

.tb-auth-form .tb-form-group {
  margin-bottom: 1rem;
}

.tb-auth-remember {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tb-auth-remember input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--tb-blue);
}

.tb-auth-remember label {
  display: inline;
  margin: 0;
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
}

.tb-auth-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

.tb-auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--tb-gray-400);
  font-size: 0.85rem;
}

.tb-auth-divider::before,
.tb-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--tb-border);
}

.tb-auth-links {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--tb-gray-600);
}

.tb-auth-links a {
  color: var(--tb-blue);
  font-weight: 600;
  text-decoration: none;
}
.tb-auth-links a:hover {
  text-decoration: underline;
}

.tb-auth-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--tb-gray-400);
}

.tb-google-g {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.5rem;
  font-weight: 700;
  color: #ea4335;
}

.tb-validation-summary {
  color: #b91c1c;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border-radius: 8px;
  border: 1px solid #fecaca;
}

.tb-validation-summary ul {
  margin: 0;
  padding-left: 1.1rem;
}

.tb-field-error {
  display: block;
  color: #b91c1c;
  font-size: 0.82rem;
  margin-top: 0.25rem;
}

.tb-input:focus {
  outline: none;
  border-color: var(--tb-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.tb-options {
  max-width: 720px;
  margin: 0 auto;
}
.tb-options-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
.tb-options-hero h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}
.tb-options-email {
  margin: 0;
  color: var(--tb-gray-600);
  font-size: 0.9rem;
}
.tb-options-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid var(--tb-border);
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tb-options-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tb-options-avatar-fallback {
  font-size: 1.75rem;
  font-weight: 700;
  color: #374151;
}
.tb-options-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .tb-options-grid {
    grid-template-columns: 1fr 1fr;
  }
  .tb-options-card--wide {
    grid-column: 1 / -1;
  }
}
.tb-options-card {
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  padding: 1.15rem 1.25rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.tb-options-card h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 1rem;
}
.tb-options-card h2 svg {
  width: 20px;
  height: 20px;
  color: var(--tb-blue);
  flex-shrink: 0;
}
.tb-options-dl {
  margin: 0 0 1rem;
}
.tb-options-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.35rem 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
}
.tb-options-row:last-child {
  border-bottom: none;
}
.tb-options-row dt {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tb-gray-600);
  margin: 0;
}
.tb-options-row dt svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.tb-options-row dd {
  margin: 0;
  font-size: 0.9rem;
  color: var(--tb-black);
}
.tb-options-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.tb-options-label svg {
  width: 16px;
  height: 16px;
  color: var(--tb-gray-600);
}
.tb-options-field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.tb-role-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.tb-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid transparent;
}
.tb-role-badge__icon {
  font-size: 0.9rem;
}
.tb-role-badge--user {
  background: #f3f4f6;
  color: #374151;
  border-color: #e5e7eb;
}
.tb-role-badge--journalist {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}
.tb-role-badge--admin {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
}
.tb-role-badge--super {
  background: #fef3c7;
  color: #b45309;
  border-color: #fcd34d;
}
.tb-options-perms {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tb-options-perms li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  font-size: 0.88rem;
  color: var(--tb-gray-700);
}
.tb-options-perms li svg {
  width: 18px;
  height: 18px;
  color: var(--tb-gray-500);
  flex-shrink: 0;
}
.tb-options-hint {
  font-size: 0.85rem;
  color: var(--tb-gray-600);
  margin: 0 0 0.75rem;
}
.tb-options-pending {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 0.88rem;
  color: #92400e;
  margin: 0;
}
.tb-options-pending svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}
.tb-options-request-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.tb-options-req-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.tb-options-req-btn svg {
  width: 18px;
  height: 18px;
}
.tb-pending-role {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #b45309;
  background: #fffbeb;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

/* ─── Reaction bar (like / dislike / bookmark) ─────────────────────────── */
.tb-react-bar {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
  border: none;
}
.tb-react-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 1.75rem;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: var(--tb-gray-600);
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s,
    transform 0.12s ease;
  line-height: 1;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.tb-react-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: fill 0.15s;
}
.tb-react-btn:active {
  transform: scale(0.94);
}
.tb-react-btn:hover {
  background: #f1f5f9;
}

.tb-react-like.tb-react-btn--active {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}
.tb-react-dislike.tb-react-btn--active {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}
.tb-react-bookmark.tb-react-btn--bookmarked {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
}
.tb-react-bookmark {
  width: 1.75rem;
  height: 1.75rem;
  min-height: 1.75rem;
  padding: 0;
  border-radius: 50%;
}
.tb-react-bookmark--end {
  margin-left: auto;
}
.tb-react-btn--readonly {
  pointer-events: none;
  opacity: 0.75;
}
.tb-react-bar--anon {
  opacity: 0.7;
}

/* Floating back-to-top (dashboard) */
.tb-scroll-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 1200;
  width: 2.65rem;
  height: 2.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #1e293b;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.tb-scroll-top[hidden] {
  display: none !important;
}

.tb-scroll-top:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
}

.tb-scroll-top:hover {
  background: #f8fafc;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.tb-scroll-top svg {
  width: 1.15rem;
  height: 1.15rem;
}

@media (min-width: 901px) {
  .tb-scroll-top {
    right: 1.5rem;
    bottom: 1.5rem;
  }
}

/* Mobile dashboard bottom dock */
@media (min-width: 901px) {
  .tb-mobile-dock {
    display: none !important;
  }
}

@media (max-width: 900px) {
  body.tb-has-mobile-dock .tb-mobile-dock,
  .tb-mobile-dock {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: space-evenly;
    visibility: visible !important;
    opacity: 1 !important;
    gap: 0.12rem;
    position: fixed;
    left: 50%;
    right: auto;
    bottom: calc(0.56rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: min(94vw, 24.5rem);
    max-width: 94vw;
    box-sizing: border-box;
    z-index: 10000;
    min-height: 0;
    padding: 0.32rem 0.36rem;
    border-radius: 999px;
    background: linear-gradient(
      155deg,
      var(--tb-dock-ink) 0%,
      var(--tb-dock-ink-mid) 42%,
      rgba(28, 25, 23, 0.88) 100%
    );
    border: 1px solid var(--tb-dock-gold);
    box-shadow:
      0 14px 42px rgba(0, 0, 0, 0.48),
      0 0 28px rgba(196, 92, 38, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
  }

  .tb-mobile-dock__item {
    flex: 1 1 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    min-width: 0;
    max-width: 4.6rem;
    padding: 0.29rem 0.26rem;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--tb-dock-muted);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    transition:
      background 0.25s ease,
      color 0.25s ease,
      transform 0.15s ease,
      box-shadow 0.25s ease;
    position: relative;
    box-shadow: none;
  }

  .tb-mobile-dock__item:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.07);
  }

  .tb-mobile-dock__item:active {
    transform: scale(0.96);
  }

  .tb-mobile-dock__item--active {
    color: var(--tb-dock-label-active);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: var(--tb-dock-active-glow);
  }

  .tb-mobile-dock__item--active .tb-mobile-dock__icon {
    width: 1.24rem;
    height: 1.24rem;
    border-radius: 50%;
    background: var(--tb-dock-active-grad);
    color: #ffffff;
    box-shadow:
      0 3px 14px rgba(37, 99, 235, 0.45),
      inset 0 1px 0 rgba(255, 255, 255, 0.35);
  }

  .tb-mobile-dock__item--active .tb-mobile-dock__icon svg {
    stroke: currentColor;
  }

  .tb-mobile-dock__item--active .tb-mobile-dock__icon--home svg {
    fill: currentColor;
    stroke: none;
  }

  .tb-mobile-dock__item--active .tb-mobile-dock__icon--x svg,
  .tb-mobile-dock__item--active .tb-mobile-dock__icon--trends svg {
    fill: currentColor;
    color: currentColor;
  }

  .tb-mobile-dock__item--active .tb-mobile-dock__label {
    font-weight: 600;
    color: var(--tb-dock-label-active);
    text-shadow: 0 0 12px rgba(245, 197, 24, 0.35);
  }

  .tb-mobile-dock__item--disabled {
    opacity: 0.38;
    pointer-events: none;
  }

  .tb-mobile-dock__item--top[hidden] {
    display: none !important;
  }

  .tb-mobile-dock__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.08rem;
    height: 1.08rem;
    flex-shrink: 0;
    position: relative;
  }

  .tb-mobile-dock__icon svg {
    width: 0.98rem;
    height: 0.98rem;
    display: block;
    stroke: currentColor;
    opacity: 0.95;
  }

  .tb-mobile-dock__item--active .tb-mobile-dock__icon svg {
    width: 0.88rem;
    height: 0.88rem;
    opacity: 1;
  }

  .tb-mobile-dock__icon--x svg,
  .tb-mobile-dock__icon--trends svg {
    width: 0.86rem;
    height: 0.86rem;
    fill: currentColor;
    stroke: none;
  }

  .tb-mobile-dock__label {
    display: block;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 0.48rem;
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: 0.02em;
    text-align: center;
    color: currentColor;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .tb-mobile-dock__badge {
    position: absolute;
    top: -0.08rem;
    right: -0.1rem;
    min-width: 0.85rem;
    height: 0.85rem;
    padding: 0 0.16rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--tb-orange) 0%, #e67e22 100%);
    color: #ffffff;
    font-size: 0.53rem;
    font-weight: 700;
    line-height: 0.85rem;
    text-align: center;
    pointer-events: none;
    border: 1.5px solid rgba(0, 0, 0, 0.65);
    box-shadow: 0 2px 8px rgba(196, 92, 38, 0.45);
  }

  .tb-mobile-dock__badge--dot {
    min-width: 0.38rem;
    width: 0.38rem;
    height: 0.38rem;
    padding: 0;
    top: 0.04rem;
    right: 0.04rem;
  }

  .tb-scroll-top {
    display: none !important;
  }

  body.tb-trends-sheet-open .tb-mobile-dock {
    z-index: 10001 !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  body.tw-list-modal-open .tb-mobile-dock {
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
  }
}

.tb-feed-empty-recent {
  margin: 0;
  padding: 1.5rem 1rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.95rem;
}

.tb-feed-recent:has(.tb-news-group) .tb-feed-empty-recent {
  display: none;
}

.tb-feed-sentinel {
  height: 1px;
  width: 100%;
  pointer-events: none;
  visibility: hidden;
}

/* Dashboard news edit modal */
.db-news-edit-card.tw-generated-card {
  width: min(736px, 96vw);
  max-height: min(96vh, 1058px);
}

.db-news-edit-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  max-height: min(62vh, 640px);
  padding-right: 0.15rem;
}

.db-news-edit-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  margin: 0 0 0.2rem;
}

.db-news-edit-heading,
.db-news-edit-hashtags {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  font-family: var(--tb-font);
  color: #111827;
  background: #fff;
}

.db-news-edit-heading:focus,
.db-news-edit-hashtags:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.db-news-edit-points-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.db-news-edit-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.db-news-edit-points .db-news-edit-point {
  display: block;
  margin: 0;
  padding: 0.55rem 0.75rem;
  min-height: 2.5rem;
  outline: none;
  border: 1px solid #e8edf3;
  border-radius: 10px;
  background: #fff;
  font-family: var(--tb-font);
  font-size: 0.95rem;
  line-height: 1.55;
  color: #111827;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: none;
}

.db-news-edit-points .db-news-edit-point::before {
  display: none;
  content: none;
}

.db-news-edit-points .db-news-edit-point:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.db-news-edit-points .db-news-edit-point:empty::before {
  display: block;
  content: "Type a bullet point…";
  color: #9ca3af;
}

.db-news-edit-add-point {
  align-self: flex-start;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #475569;
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--tb-font);
}

.db-news-edit-add-point:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.db-news-edit-image-block {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.db-news-edit-image-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
}

.db-news-edit-image-preview-wrap {
  flex: 0 0 auto;
  max-width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}

.db-news-edit-image-preview {
  display: block;
  max-width: min(280px, 100%);
  max-height: 160px;
  object-fit: cover;
}

.db-news-edit-image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.db-news-edit-image-actions .tb-btn {
  flex: 0 0 auto;
  min-height: 38px;
}

@media (max-width: 720px) {
  .db-news-edit-body {
    max-height: none;
    flex: 1 1 auto;
  }

  .db-news-edit-card.tw-generated-card {
    width: 100%;
  }
}

/* Older-day slice in dashboard feed */
.tb-news-day-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 1.1rem 0 0.55rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--tb-gray-200, #e5e7eb);
}

.tb-news-day-header::before,
.tb-news-day-header::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--tb-gray-200, #e5e7eb);
}

.tb-news-day-header__label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--tb-gray-600, #4b5563);
  white-space: nowrap;
}

.tb-feed-today-boundary {
  display: block;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ── Admin: Dashboard ───────────────────────────────────────────────────── */
.tb-admin-dashboard {
  max-width: none;
  width: 100%;
  padding: 0.25rem 0 1.5rem;
}

.tb-admin-dashboard__header {
  margin-bottom: 0.85rem;
}

.tb-admin-dashboard__title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.tb-admin-dashboard__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--tb-gray-600);
  max-width: 42rem;
}

.tb-admin-dashboard__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tb-admin-dashboard__stat {
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.tb-admin-dashboard__stat--alert {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
}

.tb-admin-dashboard__stat-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
}

.tb-admin-dashboard__stat-label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--tb-gray-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tb-admin-dashboard__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.tb-admin-dashboard__action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  min-height: 2.5rem;
}

.tb-admin-dashboard__action-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.tb-admin-dashboard__section {
  margin-bottom: 1.25rem;
}

.tb-admin-dashboard__section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
}

.tb-admin-dashboard__section-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.tb-admin-dashboard__section-title svg {
  width: 18px;
  height: 18px;
  color: var(--tb-gray-600);
  flex-shrink: 0;
}

.tb-admin-dashboard__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.72rem;
  font-weight: 700;
}

.tb-admin-dashboard__search {
  flex: 1 1 180px;
  max-width: 280px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.tb-admin-dashboard__search svg {
  width: 16px;
  height: 16px;
  color: var(--tb-gray-400);
  flex-shrink: 0;
}

.tb-admin-dashboard__search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 0.85rem;
  color: #0f172a;
}

.tb-admin-dashboard__search input::placeholder {
  color: #9ca3af;
}

.tb-admin-dashboard__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.tb-admin-dashboard__empty {
  text-align: center;
  padding: 1.75rem 1rem;
  background: var(--tb-white);
  border: 1px dashed var(--tb-border);
  border-radius: 12px;
  color: var(--tb-gray-600);
  font-size: 0.9rem;
}

.tb-admin-dashboard__empty svg {
  width: 36px;
  height: 36px;
  color: #86efac;
  margin-bottom: 0.5rem;
}

.tb-admin-dashboard__empty p {
  margin: 0;
}

.tb-admin-dashboard__no-results {
  text-align: center;
  padding: 1.25rem;
  color: var(--tb-gray-600);
  font-size: 0.9rem;
  margin: 0.5rem 0 0;
}

/* Admin post card */
.tb-admin-post-card {
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.tb-admin-post-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.07);
}

.tb-admin-post-card.is-previewing {
  border-color: #fbbf24;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 28%);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.35);
}

.tb-admin-post-card__main {
  padding: 0.75rem 0.85rem 0.55rem;
  min-width: 0;
}

.tb-admin-post-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.tb-admin-post-card__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  flex: 1;
  min-width: 0;
}

.tb-admin-post-card__head .tb-status {
  flex-shrink: 0;
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-weight: 600;
}

.tb-admin-post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
}

.tb-admin-post-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--tb-gray-600);
  line-height: 1.2;
  min-width: 0;
}

.tb-admin-post-card__meta-item svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: #94a3b8;
}

.tb-admin-post-card__meta-time {
  white-space: nowrap;
}

.tb-admin-post-card__actions {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.35rem 0.65rem;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
}

.tb-admin-post-card__actions .tb-icon-actions {
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
}

.tb-admin-post-card__actions .tb-icon-form {
  display: flex;
  margin: 0;
}

.tb-admin-post-card__actions .tb-icon-btn {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 4px;
  font-size: 1.12rem;
}

.tb-admin-post-card__actions .tb-icon-delete svg {
  width: 0.55rem;
  height: 0.55rem;
}

/* Mobile preview sheet — news article popup */
.tb-admin-preview-sheet {
  position: fixed;
  inset: 0;
  z-index: 15000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.tb-admin-preview-sheet[hidden] {
  display: none !important;
}

.tb-admin-preview-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: auto;
}

.tb-admin-preview-sheet__panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: min(88vh, 720px);
  background: var(--tb-white);
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.22);
  transform: translateY(105%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
  overflow: hidden;
}

.tb-admin-preview-sheet.is-open {
  pointer-events: auto;
}

.tb-admin-preview-sheet.is-open .tb-admin-preview-sheet__backdrop {
  opacity: 1;
}

.tb-admin-preview-sheet.is-open .tb-admin-preview-sheet__panel {
  transform: translateY(0);
}

.tb-admin-preview-sheet__handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #d1d5db;
  margin: 0.55rem auto 0;
  flex-shrink: 0;
}

.tb-admin-preview-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--tb-border);
  flex-shrink: 0;
}

.tb-admin-preview-sheet__head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.tb-admin-preview-sheet__head-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tb-admin-preview-sheet__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.tb-admin-preview-sheet__close:hover {
  background: #e2e8f0;
}

.tb-admin-preview-sheet__frame-wrap {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #f0f2f5;
}

.tb-admin-preview-sheet__frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

body.tb-admin-preview-open {
  overflow: hidden;
}

@media (min-width: 901px) {
  .tb-admin-preview-sheet {
    align-items: center;
  }

  .tb-admin-preview-sheet__panel {
    border-radius: 18px;
    height: min(82vh, 720px);
    transform: translateY(8vh);
    opacity: 0;
    transition:
      transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.28s ease;
  }

  .tb-admin-preview-sheet.is-open .tb-admin-preview-sheet__panel {
    transform: translateY(0);
    opacity: 1;
  }

  .tb-admin-dashboard__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }
}

@media (max-width: 900px) {
  .tb-admin-left {
    max-height: none;
    overflow: visible;
    width: 100%;
    grid-column: 1 / -1;
  }

  .tb-admin-split {
    min-height: auto;
    gap: 0;
  }

  .tb-admin-dashboard {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .tb-admin-dashboard__grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .tb-admin-post-card__title {
    font-size: 1rem;
    line-height: 1.4;
  }

  .tb-admin-post-card__meta-item {
    font-size: 0.82rem;
  }

  .tb-admin-dashboard__action-btn {
    flex: 1 1 calc(50% - 0.25rem);
    justify-content: center;
  }

  .tb-admin-dashboard__search {
    max-width: none;
    flex: 1 1 100%;
  }

  .tb-admin-dashboard__section-head {
    flex-direction: column;
    align-items: stretch;
  }

  body:has(.tb-admin-dashboard) .tb-main-wide {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

@media (max-width: 480px) {
  .tb-admin-dashboard__stat-value {
    font-size: 1.15rem;
  }

  .tb-admin-dashboard__stat-label {
    font-size: 0.65rem;
  }

  .tb-admin-dashboard__action-btn {
    flex: 1 1 100%;
  }
}

/* ── Admin: User management ─────────────────────────────────────────────── */
.tb-admin-users {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0.25rem 0 1.5rem;
}

.tb-admin-users__header {
  margin-bottom: 0.75rem;
}

.tb-admin-users__header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.5rem;
}

.tb-admin-users__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  color: var(--tb-gray-800);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.tb-admin-users__back svg {
  width: 16px;
  height: 16px;
}

.tb-admin-users__back:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.tb-admin-users__title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.tb-admin-users__subtitle {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--tb-gray-600);
  max-width: 52rem;
}

.tb-admin-users__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.tb-admin-users__stat {
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.tb-admin-users__stat--alert {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
}

.tb-admin-users__stat-value {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
}

.tb-admin-users__stat-label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--tb-gray-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tb-admin-users__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.65rem;
}

.tb-admin-users__search {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.04);
}

.tb-admin-users__search svg {
  width: 18px;
  height: 18px;
  color: var(--tb-gray-400);
  flex-shrink: 0;
}

.tb-admin-users__search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 0.92rem;
  color: #0f172a;
}

.tb-admin-users__search input::placeholder {
  color: #9ca3af;
}

.tb-admin-users__count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tb-gray-600);
  white-space: nowrap;
}

.tb-admin-users__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.tb-admin-users__empty,
.tb-admin-users__no-results {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--tb-gray-600);
  font-size: 0.95rem;
}

.tb-admin-users__no-results {
  margin-top: 0.5rem;
}

/* User card — compact */
.tb-user-card {
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
}

.tb-user-card--blocked {
  border-color: #fecaca;
}

.tb-user-card--super {
  border-color: #fcd34d;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 22%);
}

.tb-user-card__main {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.55rem 0.6rem 0.45rem;
  min-width: 0;
}

.tb-user-card__avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
}

.tb-user-card--super .tb-user-card__avatar {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

.tb-user-card--blocked .tb-user-card__avatar {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.tb-user-card__meta {
  flex: 1;
  min-width: 0;
}

.tb-user-card__name {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tb-user-card__email {
  margin: 0.05rem 0 0.3rem;
  font-size: 0.7rem;
  color: var(--tb-gray-600);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.tb-user-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  align-items: center;
}

.tb-role-badge--compact {
  padding: 0.12rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 4px;
  gap: 0;
}

.tb-user-card__chip {
  display: inline-block;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #64748b;
}

.tb-user-card__chip--ok {
  background: #ecfdf5;
  color: #047857;
}

.tb-user-card__chip--blocked {
  background: #fef2f2;
  color: #b91c1c;
}

.tb-user-card__pending {
  margin: 0.25rem 0 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: #b45309;
  line-height: 1.2;
}

.tb-user-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.5rem 0.45rem;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
}

.tb-user-card__toolbar,
.tb-user-card__toolbar-form {
  display: contents;
}

.tb-user-card__toolbar .tb-user-role-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.tb-user-role-toggle {
  position: relative;
  cursor: pointer;
}

.tb-user-role-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.tb-user-role-toggle span {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  user-select: none;
}

.tb-user-role-toggle input:checked + span {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.tb-user-card__actions .tb-btn-sm {
  padding: 0.2rem 0.45rem;
  font-size: 0.68rem;
  border-radius: 5px;
  min-height: 1.5rem;
}

.tb-user-card__protected {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  color: #92400e;
}

@media (min-width: 600px) {
  .tb-admin-users__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .tb-admin-users__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
  }
}

@media (max-width: 480px) {
  .tb-admin-users__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tb-admin-users__stat-value {
    font-size: 1rem;
  }

  .tb-admin-users__stat-label {
    font-size: 0.65rem;
  }
}

/* ── My Posts (author) ──────────────────────────────────────────────────── */
.tb-my-posts {
  max-width: 52rem;
  margin: 0 auto;
  padding: 0.35rem 0 2rem;
}

.tb-my-posts__header {
  margin-bottom: 1rem;
}

.tb-my-posts__header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.tb-my-posts__title {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.tb-my-posts__subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--tb-gray-600);
  max-width: 36rem;
}

.tb-my-posts__new-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-shrink: 0;
  padding: 0.58rem 1rem;
  border-radius: 12px;
  background: #0f172a;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  transition:
    background 0.15s ease,
    transform 0.12s ease,
    box-shadow 0.15s ease;
}

.tb-my-posts__new-btn svg {
  width: 1rem;
  height: 1rem;
}

.tb-my-posts__new-btn:hover {
  background: #1e293b;
  color: #fff;
  text-decoration: none;
}

.tb-my-posts__new-btn:active {
  transform: translateY(1px);
}

.tb-my-posts__new-btn--center {
  margin-top: 0.25rem;
}

.tb-my-posts__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.tb-my-posts__stat {
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.tb-my-posts__stat--alert {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
}

.tb-my-posts__stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
}

.tb-my-posts__stat-label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--tb-gray-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tb-my-posts__toolbar {
  margin-bottom: 0.75rem;
}

.tb-my-posts__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tb-my-posts__filter {
  padding: 0.38rem 0.72rem;
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  background: var(--tb-white);
  color: var(--tb-gray-600);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}

.tb-my-posts__filter:hover {
  border-color: #cbd5e1;
  color: #0f172a;
}

.tb-my-posts__filter.is-active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.tb-my-posts__grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.tb-my-post-card {
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.tb-my-post-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.07);
}

.tb-my-post-card__main {
  padding: 0.85rem 1rem 0.65rem;
  min-width: 0;
}

.tb-my-post-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.tb-my-post-card__title {
  margin: 0;
  font-family: var(--tb-title-font, var(--tb-font));
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  flex: 1;
  min-width: 0;
}

.tb-my-post-card__title a {
  color: #0f172a;
  text-decoration: none;
}

.tb-my-post-card__title a:hover {
  color: #1d4ed8;
}

.tb-my-post-card__head .tb-status {
  flex-shrink: 0;
  font-size: 0.68rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.tb-my-post-card__reject {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.82rem;
  line-height: 1.45;
}

.tb-my-post-card__reject svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.tb-my-post-card__time {
  display: block;
  font-size: 0.78rem;
  color: var(--tb-gray-600);
  line-height: 1.3;
}

.tb-my-post-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
}

.tb-my-post-card__delete-form {
  display: inline;
  margin: 0;
}

.tb-my-post-card__action {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.38rem 0.72rem;
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  background: var(--tb-white);
  color: #334155;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}

.tb-my-post-card__action svg {
  width: 0.9rem;
  height: 0.9rem;
  flex-shrink: 0;
}

.tb-my-post-card__action:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
  text-decoration: none;
}

.tb-my-post-card__action--view:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.tb-my-post-card__action--edit:hover {
  background: #fffbeb;
  border-color: #fde68a;
  color: #854d0e;
}

.tb-my-post-card__action--delete {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff;
}

.tb-my-post-card__action--delete:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.tb-my-posts__empty {
  text-align: center;
  padding: 2.5rem 1rem 2rem;
  background: var(--tb-white);
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
}

.tb-my-posts__empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  margin-bottom: 0.85rem;
}

.tb-my-posts__empty-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.tb-my-posts__empty-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
}

.tb-my-posts__empty-text {
  margin: 0.45rem auto 1rem;
  max-width: 22rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--tb-gray-600);
}

.tb-my-posts__no-results {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--tb-gray-600);
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  .tb-my-posts__header-top {
    flex-direction: column;
    align-items: stretch;
  }

  .tb-my-posts__new-btn {
    width: 100%;
  }

  .tb-my-posts__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tb-my-post-card__time {
    font-size: 0.74rem;
  }

  .tb-my-post-card__actions {
    gap: 0.3rem;
  }

  .tb-my-post-card__action {
    flex: 1 1 auto;
    justify-content: center;
    min-width: calc(50% - 0.2rem);
  }
}

@media (max-width: 480px) {
  .tb-my-posts__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tb-my-posts__stat-value {
    font-size: 1.05rem;
  }
}

/* News detail back navigation */
.tb-detail-back {
  margin: 1rem 0 0;
}

.tb-detail-back__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  background: var(--tb-white);
  color: #334155;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    color 0.12s ease;
}

.tb-detail-back__btn svg {
  width: 1rem;
  height: 1rem;
}

.tb-detail-back__btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* Articles */
.tb-articles-page {
  max-width: 52rem;
  margin: 0 auto;
}

.tb-articles-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.tb-articles-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tb-articles-card {
  border: 1px solid var(--tb-gray-200, #e5e7eb);
  border-radius: 0.65rem;
  padding: 1rem 1.1rem;
  background: #fff;
}

.tb-articles-card__title {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.15rem;
  line-height: 1.35;
}

.tb-articles-card__title a {
  color: inherit;
  text-decoration: none;
}

.tb-articles-card__title a:hover {
  text-decoration: underline;
}

.tb-articles-card__excerpt {
  margin: 0 0 0.65rem;
  color: var(--tb-gray-600, #4b5563);
  line-height: 1.55;
}

.tb-articles-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.78rem;
  color: var(--tb-gray-500, #6b7280);
}

.tb-articles-card__admin-meta {
  flex: 1 1 100%;
}

.tb-articles-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-left: auto;
}

.tb-articles-delete-form {
  display: inline;
  margin: 0;
}

.tb-articles-empty {
  color: var(--tb-gray-600, #4b5563);
}

.tb-article-form-page {
  max-width: 48rem;
  margin: 0 auto;
}

.tb-article-editor-wrap {
  border: 1px solid var(--tb-gray-200, #e5e7eb);
  border-radius: 0.5rem;
  overflow: hidden;
  background: #fff;
}

.tb-article-editor-modebar {
  display: flex;
  justify-content: flex-end;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--tb-gray-200, #e5e7eb);
  background: #f9fafb;
}

.tb-article-quill-wrap[hidden] {
  display: none !important;
}

.tb-article-quill {
  min-height: 280px;
  background: #fff;
}

.tb-article-quill .ql-toolbar {
  border: 0;
  border-bottom: 1px solid var(--tb-gray-200, #e5e7eb);
}

.tb-article-quill .ql-container {
  border: 0;
}

.tb-article-quill .ql-editor {
  min-height: 240px;
  font-size: 1rem;
  line-height: 1.65;
}

.tb-article-html-source {
  display: block;
  width: 100%;
  min-height: 320px;
  margin: 0;
  padding: 0.75rem 0.85rem;
  border: 0;
  border-radius: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
  background: #0f172a;
  color: #e2e8f0;
}

.tb-article-html-source:focus {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
}

.tb-article-html-source[hidden] {
  display: none !important;
}

.tb-article-source-preview-wrap {
  border-top: 1px solid var(--tb-gray-200, #e5e7eb);
  padding: 0.75rem;
  background: #f8fafc;
}

.tb-article-source-preview-wrap[hidden] {
  display: none !important;
}

.tb-article-preview-label {
  margin: 0 0 0.5rem;
}

.tb-article-source-preview {
  max-height: 420px;
  overflow: auto;
  background: #fff;
  border-radius: 0.5rem;
  padding: 0.5rem;
}

.tb-article-source-preview-frame {
  display: block;
  width: 100%;
  min-height: 360px;
  border: 1px solid var(--tb-gray-200, #e5e7eb);
  border-radius: 0.5rem;
  background: #fff;
}

.tb-article-source-preview-frame[hidden],
.tb-article-source-preview[hidden] {
  display: none !important;
}

.tb-article-detail--fulldoc {
  padding: 0;
  overflow: hidden;
}

.tb-article-detail--fulldoc .tb-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--tb-gray-200, #e5e7eb);
}

.tb-article-fulldoc-wrap {
  width: 100%;
  background: #f5f7fb;
}

.tb-article-fulldoc-frame {
  display: block;
  width: 100%;
  min-height: 480px;
  border: 0;
  background: #fff;
}

.tb-article-fulldoc-badge {
  margin: 0.35rem 0 0;
}

.tb-article-detail__back {
  margin: 1.25rem;
}

.tb-article-body {
  line-height: 1.7;
  font-size: 1rem;
}

.tb-article-body h1,
.tb-article-body h2,
.tb-article-body h3 {
  margin: 1.25rem 0 0.65rem;
  line-height: 1.3;
}

.tb-article-body p {
  margin: 0 0 0.85rem;
}

.tb-article-body ul,
.tb-article-body ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.tb-article-body a {
  color: var(--tb-link, #2563eb);
}

.tb-article-detail__title {
  font-size: 1.45rem;
  margin: 0 0 0.5rem;
}

.tb-article-detail__body {
  padding: 1.25rem;
}

.tb-article-detail__admin {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--tb-gray-200, #e5e7eb);
}

.tb-article-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tb-article-delete-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--tb-gray-200, #e5e7eb);
}

.tb-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tb-btn-danger-outline {
  color: #b91c1c;
  border-color: #fecaca;
}

.tb-btn-danger-outline:hover {
  background: #fef2f2;
  border-color: #f87171;
}
