:root {
  --bg: #0a0d14;
  --bg-soft: #0e121b;
  --panel: #121826;
  --panel-2: #182031;
  --line: #232c3e;
  --line-soft: #1b2333;
  --text: #e9edf6;
  --muted: #8b96a9;
  --muted-2: #667085;
  --pink: #ff6b8a;
  --violet: #8b5cf6;
  --gold: #f7c948;
  --green: #3ddc97;
  --danger: #ff7b72;
  --radius: 16px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 600px at 12% -10%, rgba(255, 107, 138, 0.12), transparent 60%),
    radial-gradient(900px 520px at 92% 0%, rgba(139, 92, 246, 0.14), transparent 62%),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  height: 100dvh;
  overflow: hidden;
}

/* ---------------- sidebar ---------------- */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 16px 18px;
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.9), rgba(10, 13, 20, 0.92));
  border-right: 1px solid var(--line-soft);
  backdrop-filter: blur(14px);
  min-height: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 6px;
}

.logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  color: #0a0d14;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 8px 22px rgba(255, 107, 138, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.brand-text span {
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.new-chat {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.new-chat:hover {
  border-color: rgba(255, 107, 138, 0.5);
  background: #1c2437;
}

.new-chat .plus {
  color: var(--pink);
  font-size: 18px;
  line-height: 1;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  text-align: left;
  transition: background 0.16s ease, color 0.16s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.nav-item.active {
  background: rgba(255, 107, 138, 0.1);
  color: #ffd7df;
}

.nav-item .count {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.cap {
  margin-top: 4px;
  padding: 14px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.cap-title {
  margin: 0 0 10px;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cap ul {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cap li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.cap li b {
  font-weight: 600;
  color: #c9d2e3;
}

.cap li span {
  color: var(--muted-2);
  font-size: 11px;
  text-align: right;
}

.side-foot {
  margin-top: auto;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.side-foot small {
  width: 100%;
  color: var(--muted-2);
  font-size: 11px;
  padding-left: 13px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.14);
}

/* ---------------- chat ---------------- */

.chat {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(10, 13, 20, 0.72);
  backdrop-filter: blur(12px);
  z-index: 5;
}

.agent {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.agent-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(255, 107, 138, 0.2), rgba(139, 92, 246, 0.22));
  border: 1px solid rgba(255, 107, 138, 0.28);
  color: #ffc4d0;
  font-weight: 700;
  font-size: 15px;
}

.agent h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.agent p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 0;
  color: var(--muted-2);
  font-size: 11.5px;
}

.agent .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.mode-pill {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.mode-pill.llm {
  border-color: rgba(139, 92, 246, 0.45);
  background: rgba(139, 92, 246, 0.12);
  color: #cfc1ff;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.icon-btn.menu {
  display: none;
}

.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 26px 22px 12px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #2a3448 transparent;
}

.messages::-webkit-scrollbar {
  width: 8px;
}

.messages::-webkit-scrollbar-thumb {
  background: #263044;
  border-radius: 999px;
}

.msg {
  display: flex;
  gap: 12px;
  max-width: 860px;
  margin: 0 auto 22px;
  animation: rise 0.32s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.msg-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-top: 2px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 107, 138, 0.18), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(255, 107, 138, 0.22);
  color: #ffc4d0;
  font-size: 13px;
  font-weight: 700;
}

.msg-main {
  min-width: 0;
  flex: 1;
}

.bubble {
  display: inline-block;
  max-width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 4px 16px 16px 16px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.bubble-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.72;
  font-size: 14.5px;
}

.bubble-text strong {
  color: #ffffff;
  font-weight: 650;
}

.bubble-text code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.92em;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.msg.user {
  justify-content: flex-end;
}

.msg.user .bubble {
  border: 1px solid rgba(255, 107, 138, 0.28);
  border-radius: 16px 4px 16px 16px;
  background: linear-gradient(135deg, rgba(255, 107, 138, 0.18), rgba(139, 92, 246, 0.16));
  color: #fff;
}

.msg.user .msg-main {
  flex: 0 1 auto;
  display: flex;
  justify-content: flex-end;
}

.trace {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.trace-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted-2);
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.trace-item::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.trace-item.fail::before {
  background: var(--danger);
}

/* ---------------- cards ---------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 107, 138, 0.32);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #0d1119;
  overflow: hidden;
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.card:hover .poster img {
  transform: scale(1.04);
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(6, 9, 14, 0.75));
  pointer-events: none;
}

.score {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(8, 11, 17, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #dfe6f3;
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.score.gold {
  color: var(--gold);
  border-color: rgba(247, 201, 72, 0.4);
}

.score.green {
  color: var(--green);
  border-color: rgba(61, 220, 151, 0.35);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 12px 12px;
  flex: 1;
}

.card-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-sub {
  margin: 0;
  font-size: 11px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.tag {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(139, 92, 246, 0.12);
  color: #b9a8ff;
  font-size: 10.5px;
}

.card-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
}

.btn {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  transition: all 0.16s ease;
}

.btn:hover {
  border-color: rgba(255, 107, 138, 0.4);
  color: #ffd7df;
}

.btn.primary {
  border-color: rgba(255, 107, 138, 0.32);
  background: rgba(255, 107, 138, 0.12);
  color: #ffd0da;
}

.btn.on {
  border-color: rgba(61, 220, 151, 0.35);
  background: rgba(61, 220, 151, 0.1);
  color: var(--green);
}

/* ---------------- detail hero ---------------- */

.hero {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
}

.hero-poster {
  width: 150px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  object-fit: cover;
  background: #0d1119;
}

.hero-title {
  margin: 0 0 3px;
  font-size: 19px;
  line-height: 1.3;
}

.hero-sub {
  margin: 0 0 10px;
  color: var(--muted-2);
  font-size: 12px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.fact {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
}

.fact b {
  color: #d6deec;
  font-weight: 600;
}

.hero-summary {
  margin: 0 0 10px;
  color: #b9c3d4;
  font-size: 12.5px;
  line-height: 1.7;
  max-height: 8.5em;
  overflow: auto;
}

.hero .card-actions {
  padding-top: 0;
}

.hero .btn {
  flex: 0 0 auto;
  padding: 6px 12px;
}

/* ---------------- calendar ---------------- */

.calendar {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.cal-day {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.cal-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  color: #cfd7e6;
}

.cal-head b {
  font-weight: 650;
}

.cal-head span {
  color: var(--muted-2);
  font-size: 11px;
}

.cal-head.today {
  background: rgba(255, 107, 138, 0.1);
  color: #ffd0da;
}

.cal-list {
  display: flex;
  flex-direction: column;
}

.cal-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px;
  border: 0;
  border-top: 1px solid var(--line-soft);
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: 12.5px;
  transition: background 0.14s ease;
}

.cal-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.cal-item img {
  width: 24px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  background: #0d1119;
}

.cal-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.cal-score {
  color: var(--gold);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* ---------------- typing ---------------- */

.typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 13px 16px;
}

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: blink 1.2s infinite;
}

.typing i:nth-child(2) {
  animation-delay: 0.18s;
}

.typing i:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes blink {
  0%,
  60%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

/* ---------------- composer ---------------- */

.composer-wrap {
  position: relative;
  padding: 8px 22px 16px;
  background: linear-gradient(180deg, transparent, rgba(10, 13, 20, 0.92) 30%);
}

.suggestions {
  display: flex;
  gap: 7px;
  max-width: 860px;
  margin: 0 auto 9px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.suggestions::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.chip:hover {
  border-color: rgba(255, 107, 138, 0.38);
  color: #ffd0da;
  background: rgba(255, 107, 138, 0.08);
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 860px;
  margin: 0 auto;
  padding: 9px 9px 9px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(18, 24, 38, 0.92);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.composer:focus-within {
  border-color: rgba(255, 107, 138, 0.45);
  box-shadow: 0 18px 44px rgba(255, 107, 138, 0.12);
}

.composer textarea {
  flex: 1;
  max-height: 140px;
  padding: 6px 0;
  border: 0;
  outline: 0;
  background: transparent;
  resize: none;
  line-height: 1.6;
  font-size: 14.5px;
}

.composer textarea::placeholder {
  color: var(--muted-2);
}

.send {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  color: #fff;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.send:hover {
  transform: translateY(-1px);
}

.send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.hint {
  max-width: 860px;
  margin: 7px auto 0;
  color: var(--muted-2);
  font-size: 11px;
  text-align: center;
}

/* ---------------- drawer / modal ---------------- */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(3, 5, 9, 0.62);
  backdrop-filter: blur(2px);
  animation: fade 0.18s ease;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: min(420px, 92vw);
  display: flex;
  flex-direction: column;
  background: #0f141f;
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: slide 0.24s ease;
}

@keyframes slide {
  from {
    transform: translateX(24px);
    opacity: 0.6;
  }
}

.drawer header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 18px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.drawer h2 {
  margin: 0;
  font-size: 16px;
}

.drawer header p {
  margin: 4px 0 0;
  color: var(--muted-2);
  font-size: 11px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 24px;
}

.watch-item {
  display: flex;
  gap: 11px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 9px;
}

.watch-item img {
  width: 52px;
  height: 74px;
  border-radius: 7px;
  object-fit: cover;
  background: #0d1119;
}

.watch-info {
  flex: 1;
  min-width: 0;
}

.watch-info h3 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-info p {
  margin: 0 0 8px;
  color: var(--muted-2);
  font-size: 11px;
}

.watch-actions {
  display: flex;
  gap: 6px;
}

.watch-actions .btn {
  flex: 0 0 auto;
  padding: 4px 9px;
}

.empty {
  padding: 40px 10px;
  color: var(--muted-2);
  font-size: 13px;
  text-align: center;
  line-height: 1.9;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 5, 9, 0.72);
  backdrop-filter: blur(3px);
  animation: fade 0.18s ease;
}

.modal-card {
  position: relative;
  width: min(760px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0f141f;
  box-shadow: var(--shadow);
  animation: rise 0.24s ease;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
}

.detail-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
}

.detail-grid > img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: #0d1119;
}

.detail-body h2 {
  margin: 0 0 4px;
  font-size: 22px;
  line-height: 1.3;
  padding-right: 26px;
}

.detail-body .alt {
  margin: 0 0 12px;
  color: var(--muted-2);
  font-size: 12px;
}

.detail-body .summary {
  margin: 12px 0;
  color: #b9c3d4;
  font-size: 13px;
  line-height: 1.85;
  white-space: pre-wrap;
}

.info-table {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 6px 10px;
  margin: 12px 0;
  font-size: 12px;
}

.info-table dt {
  color: var(--muted-2);
}

.info-table dd {
  margin: 0;
  color: #cdd6e5;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 70;
  transform: translateX(-50%);
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #141b29;
  color: #dfe6f3;
  font-size: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  animation: rise 0.2s ease;
}

/* ---------------- responsive ---------------- */

@media (max-width: 1080px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    width: 264px;
    transform: translateX(-102%);
    transition: transform 0.24s ease;
  }

  .sidebar.open {
    transform: none;
    box-shadow: var(--shadow);
  }

  .icon-btn.menu {
    display: grid;
  }

  .topbar {
    padding: 12px 14px;
  }

  .messages {
    padding: 18px 14px 8px;
  }

  .composer-wrap {
    padding: 6px 12px 12px;
  }
}

@media (max-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .card-title {
    font-size: 12.5px;
  }

  .hero {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .hero-poster {
    width: 100px;
  }

  .hero-title {
    font-size: 16px;
  }

  .detail-grid {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 14px;
  }

  .detail-body h2 {
    font-size: 18px;
  }

  .bubble {
    padding: 12px 13px;
  }

  .bubble-text {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
