html, body { overflow-x: clip; }
.layout { display: grid; grid-template-columns: minmax(0, 440px); justify-content: center; padding: 0 16px 120px; }
.layout.demo { grid-template-columns: minmax(0, 440px); gap: 28px; }
@media (min-width: 980px) { .layout.demo { grid-template-columns: 420px minmax(0, 460px); align-items: start; padding-top: 12px; } }
.client { width: min(440px, 100%); }
.loading { text-align: center; padding-top: 30vh; }

.demo-bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding: 10px 16px; background: var(--ink); color: var(--bg); font-size: 13px; text-align: center; }

.rv-head { padding: 22px 0 14px; display: grid; gap: 8px; }
.rv-head h1 { font-size: 24px; }
.rv-msg { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 14px; white-space: pre-wrap; }
.progress { display: flex; gap: 4px; margin: 6px 0 2px; }
.progress i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); transition: background 0.3s; }
.progress i.approve { background: var(--green); }
.progress i.changes { background: var(--amber); }
.progress i.reject { background: var(--red); }
.progress i.current { background: var(--ink); opacity: 0.35; }

.deck { position: relative; min-height: 380px; margin-top: 8px; }
.deck .card { position: relative; touch-action: pan-y; user-select: none; transition: transform 0.3s ease, opacity 0.3s ease; will-change: transform; }
.deck .card.dragging { transition: none; }
.deck .card.gone-right { transform: translateX(130%) rotate(16deg); opacity: 0; }
.deck .card.gone-left { transform: translateX(-130%) rotate(-16deg); opacity: 0; }
.deck .under { position: absolute; inset: 10px 10px auto; height: 100%; transform: translateY(10px) scale(0.96); opacity: 0.5; z-index: -1; pointer-events: none; }
.stamp { position: absolute; top: 18px; padding: 4px 12px; border: 3px solid; border-radius: 10px; font: 800 20px 'Inter Tight', sans-serif; letter-spacing: 0.06em; opacity: 0; pointer-events: none; transform: rotate(-12deg); z-index: 2; background: var(--card); }
.stamp.yes { left: 16px; color: var(--green); }
.stamp.no { right: 16px; color: var(--amber); transform: rotate(12deg); }

.actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 14px; position: sticky; bottom: 0; z-index: 5; padding: 10px 0 calc(10px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.deck .post.photo .media img { aspect-ratio: 4 / 3.4; }
.deck .media.n1 img, .deck .media.n1 video { max-height: min(46vh, 420px); }
.deck .post.pin .media img { max-height: min(52vh, 460px); }
.actions .btn { padding: 14px; font-size: 16px; }
.actions .approve { background: var(--green); border-color: var(--green); color: #fff; }
@media (prefers-color-scheme: dark) { .actions .approve { color: #06210f; } }
.hint { text-align: center; font-size: 12px; color: var(--muted); margin-top: 10px; }

.list { margin-top: 26px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.list h2 { font-size: 15px; margin-bottom: 4px; }
.row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-align: left; width: 100%; }
.row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.row.active { outline: 2px solid var(--ink); }
.note { font-size: 13px; color: var(--muted); margin-top: 6px; white-space: pre-wrap; }

.done { text-align: center; padding: 40px 10px 10px; display: grid; gap: 10px; justify-items: center; }
.done .big { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-size: 40px; color: #fff; background: radial-gradient(circle at 35% 35%, #6ef0a4, var(--green) 65%); box-shadow: 0 0 0 10px var(--green-soft), 0 0 40px rgba(30, 200, 110, 0.5); animation: pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes pop { from { transform: scale(0.3); } }

.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick button { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 5px 11px; font-size: 13px; }
.sheet h3 { font-size: 18px; }
.sheet .btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sheet .btns .grow { margin-right: auto; }
.err { color: var(--red); }

/* ---- demo: the agency side ---- */
.agency { display: grid; gap: 14px; padding-top: 22px; }
.agency h2 { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(30, 200, 110, 0.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(30, 200, 110, 0); } 100% { box-shadow: 0 0 0 0 rgba(30, 200, 110, 0); } }
.panel { padding: 14px; display: grid; gap: 8px; }
.panel h3 { font-size: 14px; color: var(--muted); font-weight: 600; font-family: inherit; letter-spacing: 0; }
.qslot { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--bg); font-size: 13px; }
.qslot.new { animation: flash 1.4s ease-out; }
@keyframes flash { 0% { background: var(--green-soft); transform: scale(1.02); } 100% { background: var(--bg); } }
.qslot .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qslot time { color: var(--muted); font-variant-numeric: tabular-nums; }
.log { font-size: 13px; display: grid; gap: 6px; }
.log div { animation: up 0.3s ease-out; }
