
#cot-truyen {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 64px);
  transform: translateX(-50%);
  width: min(460px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 10px 34px 8px 14px;
  z-index: 150;
  background: linear-gradient(180deg, rgba(28, 20, 12, 0.94), rgba(14, 10, 6, 0.94));
  border: 1px solid rgba(214, 178, 102, 0.75);
  border-radius: 8px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 230, 170, 0.08);
  color: #f3e6c8;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
#cot-truyen.hidden { display: none; }
#cot-truyen.ct-moi { animation: ct-hien 0.35s ease-out both; }
@keyframes ct-hien {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
#cot-truyen .ct-hoi {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(214, 178, 102, 0.85);
  margin-bottom: 4px;
}
#cot-truyen .ct-ai {
  font-weight: bold;
  font-size: 13px;
  color: #ffd27a;
  margin-bottom: 2px;
}
#cot-truyen .ct-cau {
  font-size: 14px;
  line-height: 1.45;
}
#cot-truyen.ct-ta .ct-ai { color: #b9d4ff; }
#cot-truyen.ct-ta .ct-cau { font-style: italic; color: #e4ecff; }
#cot-truyen .ct-chan {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
  color: rgba(243, 230, 200, 0.55);
}
#cot-truyen .ct-dong {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: rgba(243, 230, 200, 0.7);
  font-size: 14px;
  cursor: pointer;
}
@media (max-height: 480px) {
  #cot-truyen { top: calc(env(safe-area-inset-top, 0px) + 70px); width: min(400px, calc(100vw - 32px));
                padding: 6px 30px 5px 12px; }
  #cot-truyen .ct-hoi { margin-bottom: 2px; }
  #cot-truyen .ct-ai { font-size: 12px; }
  #cot-truyen .ct-cau { font-size: 12.5px; line-height: 1.35; }
  #cot-truyen .ct-chan { margin-top: 3px; }
}
@media (max-width: 760px) {
  #cot-truyen { top: calc(env(safe-area-inset-top, 0px) + 52px); }
  #cot-truyen .ct-cau { font-size: 13px; }
}
