:root {
  --primary: #FE9063;
  --secondary: #704FFE;
  --primary-light-2: #FFCD90;
  --primary-hover: #fe6c30;
  --primary-dark: #c73b01;
  --rgba-primary-1: rgba(254, 144, 99, 0.1);
  --rgba-primary-2: rgba(254, 144, 99, 0.2);
  --gradient: linear-gradient(73.08deg, #2C406E 15.14%, #d5bdff 92.25%);
  --gradient-bg: linear-gradient(169.71deg, #FFCD90 0.8%, #FE9063 100.86%);
  --gradient-bg-2: linear-gradient(169.71deg, #FFFBF7 0.8%, #FBE7DF 100.86%);
  --dark: #2F2F2F;
  --title: #2F2F2F;
  --body-color: rgba(0, 0, 0, 0.7);
  --border-color: #E6E6E6;
  --border-color-2: #F0F0F0;
  --bg-white: #FFF;
  --success: #84CA93;
  --font-family-base: 'Nunito', sans-serif;
  --font-family-title: 'Poppins', 'Nunito', sans-serif;
  --border-radius-base: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-family-base);
  background: #f3ebe4;
  color: var(--body-color);
  min-height: 100vh;
}
h1,h2,h3,h4 { font-family: var(--font-family-title); color: var(--title); }
.topbar {
  background: var(--dark);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand img { width: 36px; height: 36px; border-radius: 12px; }
.brand h1 { font-size: 17px; font-weight: 700; color: #fff; }
.brand .range { font-size: 11px; color: #b0b0b0; margin-left: 4px; font-weight: 600; }
.search {
  flex: 1;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 9px 14px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
}
.search::placeholder { color: #999; }
.lang-switch {
  display: flex;
  background: rgba(255,255,255,.1);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.15);
}
.lang-switch button {
  border: none; background: transparent; color: #bbb;
  padding: 7px 12px; font-size: 12px; font-weight: 800;
  font-family: var(--font-family-title); cursor: pointer;
}
.lang-switch button.active { background: var(--primary); color: #fff; }
.btn-read {
  background: var(--gradient-bg); color: #fff; border: none;
  border-radius: 12px; padding: 9px 16px; font-size: 13px; font-weight: 700;
  font-family: var(--font-family-title); cursor: pointer;
  box-shadow: 0 4px 14px rgba(254,144,99,.35);
}
.chips {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 14px;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  border: 1px solid var(--border-color); background: #FFFBF7; color: var(--title);
  cursor: pointer;
}
.chip.active {
  background: var(--secondary); color: #fff; border-color: var(--secondary);
  box-shadow: 0 4px 12px rgba(112,79,254,.3);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip .cnt {
  background: rgba(0,0,0,.06); padding: 0 7px; border-radius: 8px;
  font-size: 11px; font-weight: 800;
}
.chip.active .cnt { background: rgba(255,255,255,.25); }
.layout { display: flex; min-height: calc(100vh - 110px); }
.sidebar {
  width: 280px; background: var(--bg-white);
  border-right: 1px solid var(--border-color);
  padding: 12px; display: flex; flex-direction: column; gap: 7px;
  overflow-y: auto; max-height: calc(100vh - 110px); position: sticky; top: 110px;
}
.side-all {
  background: var(--gradient); color: #fff; border-radius: 12px;
  padding: 11px 13px; display: flex; justify-content: space-between;
  align-items: center; font-size: 13px; font-weight: 800;
  font-family: var(--font-family-title); cursor: pointer; border: none; width: 100%;
}
.day {
  border: 1px solid var(--border-color); border-radius: 12px;
  padding: 9px 11px; background: #FFFBF7; cursor: pointer; text-align: left;
  font: inherit; color: inherit;
}
.day.sel {
  border: 2px solid var(--primary); background: var(--rgba-primary-1);
  box-shadow: 0 4px 14px rgba(254,144,99,.15);
}
.day .dh { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.day .dh b { font-size: 13px; font-family: var(--font-family-title); color: var(--title); }
.day .n { font-size: 11px; color: #888; font-weight: 700; }
.day .badge {
  background: var(--primary); color: #fff; font-size: 10px;
  padding: 2px 7px; border-radius: 8px; margin-left: 4px; font-weight: 800;
}
.day .previews { font-size: 11px; color: #777; line-height: 1.45; font-weight: 600; }
.day .previews div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main {
  flex: 1; padding: 16px 20px 40px;
  background: linear-gradient(180deg, #FFFBF7 0%, #FBE7DF40 100%);
}
.day-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.day-head h2 { font-size: 21px; font-weight: 700; }
.day-head .cnt { color: #888; font-size: 14px; font-weight: 600; margin-left: 8px; font-family: var(--font-family-base); }
.btn-day {
  background: var(--rgba-primary-2); color: var(--primary-dark);
  border: 1px solid var(--primary-light-2); border-radius: 12px;
  padding: 8px 14px; font-size: 12.5px; font-weight: 800;
  font-family: var(--font-family-title); cursor: pointer;
}
.day-sum {
  background: var(--bg-white); border-left: 4px solid var(--secondary);
  padding: 10px 14px; font-size: 13px; color: var(--body-color);
  font-style: italic; line-height: 1.55; margin-bottom: 14px;
  border-radius: 0 12px 12px 0; box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.section-mark {
  display: flex; align-items: center; gap: 8px; margin: 14px 0 10px;
  color: var(--secondary); font-size: 13.5px; font-weight: 800;
  font-family: var(--font-family-title);
}
.card {
  background: var(--bg-white); border: 1.5px solid var(--primary-light-2);
  border-radius: var(--border-radius-base); padding: 15px; margin-bottom: 14px;
  box-shadow: 0 6px 20px rgba(254,144,99,.08);
}
.meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 9px; font-size: 11px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; font-weight: 800; font-size: 11px;
}
.b-new { background: rgba(112,79,254,.12); color: var(--secondary); }
.b-topic { background: var(--rgba-primary-1); color: var(--primary-dark); }
.b-src { background: #f5f5f5; color: #555; }
.b-tr { background: #E8F8EC; color: #2d7a3e; border: 1px dashed #84CA93; }
.meta .time { color: #999; margin-left: auto; font-weight: 700; }
.card-body { display: flex; gap: 14px; }
.thumb {
  width: 160px; height: 112px; object-fit: cover;
  background: var(--gradient-bg-2); border-radius: 12px; flex-shrink: 0;
  border: 1px solid var(--primary-light-2);
}
.thumb.ph {
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-dark); font-size: 11px; text-align: center;
  font-weight: 700; padding: 8px; border-style: dashed;
}
.content { flex: 1; min-width: 0; }
.content h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; line-height: 1.35; }
.content p { font-size: 13px; color: var(--body-color); line-height: 1.55; margin-bottom: 6px; font-weight: 600; }
.ynghia { font-size: 12.5px; color: #555; margin-bottom: 8px; font-weight: 600; }
.ynghia b { color: var(--secondary); font-weight: 800; }
.quote {
  background: #FFFBF7; border-left: 3px solid var(--primary);
  padding: 7px 11px; font-size: 12px; color: #666; font-style: italic;
  border-radius: 0 8px 8px 0; margin-bottom: 6px;
}
.tr-toggle {
  font-size: 11.5px; font-weight: 800; color: var(--secondary);
  background: rgba(112,79,254,.08); border: 1px solid rgba(112,79,254,.25);
  border-radius: 8px; padding: 4px 10px; cursor: pointer; font-family: inherit;
}
.orig-block {
  display: none; margin-top: 8px; padding: 10px 12px; background: #f8f8fc;
  border: 1px dashed var(--secondary); border-radius: 10px;
}
.orig-block.show { display: block; }
.orig-block .olabel {
  font-size: 10px; font-weight: 800; color: var(--secondary);
  text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px;
}
.actions {
  display: flex; align-items: center; gap: 10px; margin-top: 11px;
  padding-top: 11px; border-top: 1px solid var(--border-color-2); font-size: 12px; flex-wrap: wrap;
}
.btn-this {
  background: var(--gradient-bg); color: #fff; border: none; border-radius: 10px;
  padding: 6px 12px; font-weight: 800; font-size: 12px;
  font-family: var(--font-family-title); cursor: pointer; text-decoration: none;
}
.link-orig { color: var(--secondary); text-decoration: none; font-weight: 800; }
.reactions { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.reactions button {
  background: #FFFBF7; border: 1px solid var(--border-color); border-radius: 999px;
  padding: 2px 7px; font-size: 11px; font-weight: 700; cursor: pointer;
}
.empty {
  padding: 40px; text-align: center; color: #888; font-weight: 700;
}
.status-bar {
  font-size: 11px; color: #888; padding: 8px 16px; background: #fff;
  border-top: 1px dashed var(--border-color); text-align: center; font-weight: 700;
}
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; max-height: none; position: static; }
  .card-body { flex-direction: column; }
  .thumb { width: 100%; height: 160px; }
}

/* competitor brand / platform filter rows */
.chips-sub { padding-top: 0; margin-top: -4px; }
.chips-sub .chip { font-size: 12px; padding: 4px 10px; }
.chip-label { font-size: 11px; font-weight: 650; color: #64748b; align-self: center; margin-right: 4px; padding: 0 4px; }
.badge.b-brand { background: #eef2ff; color: #3730a3; }
.badge.b-platform { background: #f1f5f9; color: #334155; }
