.cmgy { margin-top: 8px; }
.cmgy-hang { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cmgy-ta { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.cmgy-ta-anh { flex: none; width: 56px; height: 56px; object-fit: cover; border-radius: 9px; border: 1px solid var(--cm-border, rgba(255, 255, 255, .1)); background: rgba(0, 0, 0, .25); }
.cmgy-ta-chu { min-width: 0; font-size: 12px; line-height: 1.5; color: var(--cm-text-secondary, #cbd5e1); overflow-wrap: anywhere; }
.cmgy-may {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; max-width: 100%; min-width: 0; padding: 0 10px;
  border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--cm-border, rgba(255, 255, 255, .1));
  color: var(--cm-text-primary, #fff); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.cmgy-may:hover:not(:disabled), .cmgy-may.on { border-color: var(--ais-accent, #6366f1); background: var(--ais-soft-fill, rgba(99, 102, 241, .12)); }
.cmgy-may:disabled { opacity: .6; cursor: default; }
.cmgy-may-ic { flex: 0 0 auto; color: var(--ais-accent2, #a855f7); font-size: 11px; }
.cmgy-may-ten { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmgy-caret { flex: 0 0 auto; color: var(--cm-text-muted, #64748b); font-size: 10px; }
.cmgy-gia {
  flex: 0 0 auto; padding: 1px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap;
  background: rgba(16, 185, 129, .16); color: #6ee7b7;
}
.cmgy-gia.tra { background: rgba(139, 92, 246, .2); color: #c4b5fd; }
.cmgy-tao {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, .45); background: rgba(139, 92, 246, .18); color: #ede9fe;
  font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; transition: background-color .15s ease;
}
.cmgy-tao:hover:not(:disabled) { background: rgba(139, 92, 246, .3); }
.cmgy-tao:disabled { opacity: .55; cursor: default; }
.cmgy-may[hidden], .cmgy-tao[hidden], .cmgy-ta[hidden], .cmgy-hang[hidden] { display: none; }
.cmgy-thay { font-size: 12px; color: var(--cm-text-muted, #64748b); }
.cmgy-lien { background: none; border: 0; padding: 0; color: var(--ais-accent3, #c084fc); font: inherit; font-weight: 600; cursor: pointer; }
.cmgy-lien:hover { text-decoration: underline; }
.cmgy-khung {
  margin-top: 8px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, .35); background: rgba(139, 92, 246, .07);
}
.cmgy-cho { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--cm-text-muted, #64748b); }
.cmgy-dem { margin-left: auto; font-variant-numeric: tabular-nums; }
.cmgy-ra { font-size: var(--cm-font-sm, 13px); line-height: 1.6; color: var(--cm-text-primary, #fff); white-space: pre-wrap; overflow-wrap: anywhere; }
.cmgy-ghi { margin: 0 0 8px; font-size: 11.5px; line-height: 1.5; color: #93c5fd; }
.cmgy-canh { margin: 6px 0 0; font-size: 11.5px; line-height: 1.5; color: #fbbf24; }
.cmgy-meta { margin-top: 6px; font-size: 11px; color: var(--cm-text-muted, #64748b); overflow-wrap: anywhere; }
.cmgy-loi { margin: 0; font-size: 12px; line-height: 1.5; color: var(--cm-danger, #ef4444); }
.cmgy-loi a { color: var(--ais-accent3, #c084fc); font-weight: 600; }
.cmgy-nut { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cmgy-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 9px;
  border: 1px solid var(--cm-border, rgba(255, 255, 255, .1)); background: rgba(255, 255, 255, .05);
  color: var(--cm-text-primary, #fff); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.cmgy-btn:hover { border-color: var(--ais-accent, #6366f1); background: var(--ais-soft-fill, rgba(99, 102, 241, .12)); }
.cmgy-btn.cmgy-chinh { border-color: rgba(139, 92, 246, .5); background: rgba(139, 92, 246, .22); color: #ede9fe; }
.cmgy-btn.cmgy-chinh:hover { background: rgba(139, 92, 246, .34); }
.cmgy-nen { position: fixed; inset: 0; z-index: 10010; }
.cmgy-nen.day { background: rgba(0, 0, 0, .45); }
.cmgy-menu {
  position: fixed; z-index: 10011; max-height: 340px; overflow-y: auto; padding: 6px;
  background: var(--ais-panel, #171a24); border: 1px solid var(--cm-border-strong, rgba(255, 255, 255, .2));
  border-radius: 16px; box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
}
.cmgy-menu.day {
  max-height: 70vh; border-radius: 18px 18px 0 0; border-bottom: 0;
  padding: 10px max(10px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
}
.cmgy-menu-tieu { padding: 4px 8px 8px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--cm-text-muted, #64748b); }
.cmgy-menu-ghi { margin: 6px 8px 2px; font-size: 11.5px; line-height: 1.5; color: var(--cm-text-muted, #64748b); }
.cmgy-dong {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: 100%;
  padding: 9px 32px 9px 11px; border: 0; border-radius: 10px; background: none;
  color: var(--cm-text-secondary, #cbd5e1); font: inherit; text-align: left; cursor: pointer;
}
.cmgy-dong:hover, .cmgy-dong:focus-visible { background: rgba(99, 102, 241, .14); color: #fff; outline: none; }
.cmgy-dong.on { background: var(--ais-soft-fill2, rgba(99, 102, 241, .2)); color: #fff; }
.cmgy-dong-dau { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cmgy-dong-ten { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmgy-dong-mo { font-size: 11.5px; line-height: 1.4; color: var(--cm-text-muted, #64748b); }
.cmgy-dong-ok { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--ais-accent3, #c084fc); font-size: 11px; }
.cmgy-menu.day .cmgy-dong { padding-top: 12px; padding-bottom: 12px; }
.cmgy-trong { margin: 0; font-size: 12px; line-height: 1.5; color: var(--cm-text-muted, #64748b); }
.cmgy-pn {
  position: absolute; top: 12px; right: 12px; z-index: 35; width: 340px; max-width: calc(100% - 24px); max-height: calc(100% - 170px);
  overflow-y: auto; overscroll-behavior: contain; padding: 12px 12px 14px; border-radius: 16px;
  background: var(--ais-panel, #171a24); border: 1px solid var(--cm-border-strong, rgba(255, 255, 255, .2));
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5); cursor: auto;
}
.cmgy-pn-dau { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cmgy-pn-chu { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cmgy-pn-tieu { font-size: 13px; font-weight: 700; color: var(--cm-text-primary, #fff); }
.cmgy-pn-ten { font-size: 11.5px; color: var(--cm-text-muted, #64748b); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmgy-pn-x {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid var(--cm-border, rgba(255, 255, 255, .1)); background: rgba(255, 255, 255, .05);
  color: var(--cm-text-secondary, #cbd5e1); font-size: 12px; cursor: pointer;
}
.cmgy-pn-x:hover { border-color: var(--ais-accent, #6366f1); color: #fff; }
.cmgy-pn .cmgy { margin-top: 0; }
.cmgy-pn .cmgy-may { flex: 1 1 0; }
.cmgy-hop { position: fixed; inset: 0; z-index: 10003; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cmgy-hop[hidden] { display: none; }
.cmgy-hop-nen { position: absolute; inset: 0; background: rgba(5, 8, 16, .62); }
.cmgy-hop-cho { position: relative; display: flex; justify-content: center; width: min(480px, 100%); }
html.cmgy-hop-mo .swal2-container { z-index: 10020 !important; }
@media (min-width: 641px) {
  .cmgy-hop .cmgy-pn { position: relative; top: auto; right: auto; width: 100%; max-width: 100%; max-height: calc(100vh - 32px); }
}
@media (max-width: 640px) {
  .cmgy-pn {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 10005; width: auto; max-width: none; max-height: 72vh;
    border-radius: 18px 18px 0 0; border-bottom: 0;
    padding: 12px max(12px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .cmgy-hang { gap: 6px; }
  .cmgy-may { flex: 1 1 0; height: 36px; }
  .cmgy-tao { flex: 0 0 auto; height: 36px; }
  .cmgy-thay { flex: 1 1 100%; }
  .cmgy-btn { height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .cmgy-may, .cmgy-tao { transition: none; }
}
