/* TTD look: Tabler base, water palette. Not MingPan's or removepaywall's identity. */
:root {
  --ttd-ink: #0b2540;
  --ttd-blue: #1572d3;
  --ttd-teal: #14a3a3;
  --ttd-bg: #f3f8fd;
  --ttd-line: #dbe7f3;
  --ttd-muted: #5b7088;
  --tblr-primary: #1572d3;
  --tblr-primary-rgb: 21, 114, 211;
  --tblr-font-sans-serif: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html, body { height: 100%; }
body { background: var(--ttd-bg); color: var(--ttd-ink); }

.ttd-shell { min-height: 100vh; display: flex; flex-direction: column; }
.ttd-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 1.5rem; background: var(--ttd-ink); color: #fff;
}
.ttd-brand { font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; display: flex; align-items: center; gap: .55rem; }
.ttd-sub { font-weight: 400; opacity: .7; }
.ttd-drop {
  width: 18px; height: 18px; border-radius: 0 50% 50% 50%; transform: rotate(45deg);
  background: linear-gradient(135deg, var(--ttd-teal), var(--ttd-blue));
}
.ttd-live { display: flex; align-items: center; gap: .5rem; font-size: .85rem; opacity: .9; }
.ttd-dot { width: 9px; height: 9px; border-radius: 50%; background: #3ddc97; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(61,220,151,.6); } 50% { box-shadow: 0 0 0 7px rgba(61,220,151,0); } }

.ttd-main { flex: 1; display: grid; grid-template-columns: 1fr 300px; gap: 1rem; padding: 1rem 1.5rem 1.5rem; min-height: 0; }
.ttd-stage { display: flex; flex-direction: column; min-height: 70vh; border-color: var(--ttd-line); overflow: hidden; }
.ttd-stage-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--ttd-line); }
.ttd-kicker { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ttd-teal); font-weight: 600; }
.ttd-title { margin: .1rem 0 0; font-size: 1.35rem; font-weight: 700; }
.ttd-frame-wrap { position: relative; flex: 1; background: #fff; }
.ttd-frame-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.ttd-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem; }
.ttd-empty-drop {
  width: 72px; height: 72px; border-radius: 0 50% 50% 50%; transform: rotate(45deg); margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--ttd-teal), var(--ttd-blue)); animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: rotate(45deg) translate(0,0); } 50% { transform: rotate(45deg) translate(-6px,-6px); } }
.ttd-empty-lead { font-size: 1.2rem; max-width: 34rem; margin: 0 0 .5rem; }
.ttd-empty-eg { color: var(--ttd-muted); font-style: italic; }

.ttd-flash {
  position: absolute; left: 50%; top: 1.25rem; transform: translateX(-50%);
  background: var(--ttd-ink); color: #fff; border-radius: 999px; padding: .55rem 1.1rem;
  display: flex; gap: .6rem; align-items: center; box-shadow: 0 10px 30px rgba(11,37,64,.25); z-index: 2;
}
.ttd-flash span { color: #3ddc97; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.ttd-flash.go { animation: flash 2.6s ease both; }
@keyframes flash { 0% { opacity: 0; transform: translate(-50%,-12px); } 12%,80% { opacity: 1; transform: translate(-50%,0); } 100% { opacity: 0; } }

.ttd-side { border-color: var(--ttd-line); padding: 1rem; overflow: auto; }
.ttd-side-head { font-weight: 600; margin-bottom: .6rem; }
.ttd-list { list-style: none; margin: 0; padding: 0; }
.ttd-list li { display: flex; flex-direction: column; padding: .55rem 0; border-bottom: 1px solid var(--ttd-line); }
.ttd-list li a { color: var(--ttd-ink); font-weight: 500; text-decoration: none; }
.ttd-list li a:hover { color: var(--ttd-blue); }
.ttd-list li span { font-size: .78rem; color: var(--ttd-muted); }
.ttd-list-empty { color: var(--ttd-muted); }

@media (max-width: 900px) {
  .ttd-main { grid-template-columns: 1fr; padding: .75rem; }
  .ttd-stage { min-height: 75vh; }
  .ttd-bar { padding: .75rem 1rem; }
  .ttd-sub { display: none; }
}
