:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #25304a;
  background: #f4f6fb;
  font-synthesis: none;
  --accent: #4b55d8;
  --muted: #8992a7;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button { cursor: pointer; transition: background .15s; }
button:disabled { opacity: .35; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #b7bafa; outline-offset: 3px; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.page { width: min(100% - 48px, 820px); margin: 0 auto; padding-bottom: env(safe-area-inset-bottom); }
.page-header { display: flex; align-items: center; justify-content: space-between; padding: 29px 0 26px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 700; font-size: 18px; }
.logo { display: grid; place-items: center; width: 42px; height: 42px; background: var(--accent); color: white; border-radius: 12px; font-size: 24px; }
.brand small { display: block; font-size: 10px; letter-spacing: .4px; font-weight: 400; color: var(--muted); margin-top: 5px; }
.access-badge { color: #8a90aa; font-size: 11px; background: white; border: 1px solid #e5e8f2; border-radius: 20px; padding: 7px 12px; white-space: nowrap; }
.demo-banner { border: 1px solid #efdfb8; background: #fffaed; color: #a38341; padding: 11px 14px; border-radius: 9px; font-size: 12px; line-height: 1.8; margin-bottom: 25px; }
.page-intro { padding: 11px 0 28px; }
.eyebrow { color: #9a9fb8; font-size: 9px; font-weight: 600; letter-spacing: 2px; margin-bottom: 12px; }
h1 { font-size: 30px; letter-spacing: -.7px; line-height: 1.5; }
h1 span { color: var(--accent); }
.page-intro > p:last-child { font-size: 12px; color: var(--muted); line-height: 1.9; margin-top: 10px; }
.rotation { position: sticky; top: 12px; z-index: 2; background: #fff; border: 1px solid #dedff3; border-radius: 16px; box-shadow: 0 10px 30px #31376d09; padding: 21px 23px 0; overflow: hidden; }
.rotation-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rotation-label { display: flex; gap: 8px; align-items: center; font-size: 12px; color: #6f72a1; font-weight: 600; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #8b83e7; box-shadow: 0 0 0 4px #f1effe; }
.rotation-order { color: #a3a6b9; font-size: 10px; }
.rotation-content { padding: 22px 0 17px; }
.rotation-content .message-sender { font-size: 19px; }
.rotation-content .message-body { font-size: 16px; line-height: 1.9; margin: 16px 0 12px; max-height: 34vh; max-height: 34svh; overflow-y: auto; overscroll-behavior: contain; }
.rotation-content .message-meta { font-size: 11px; }
.rotation-content .message-recipient { font-size: 11px; }
.rotation-empty { color: var(--muted); padding: 16px 0; font-size: 14px; }
.rotation-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f0eff8; padding: 12px 0; gap: 10px; }
.rotation-footer > span { font-size: 10px; color: #9b9db5; }
.rotation-controls { display: flex; align-items: center; gap: 5px; }
.rotation-controls button { border: 0; background: transparent; color: #8382ad; padding: 6px 10px; border-radius: 6px; font-size: 12px; }
.rotation-controls button:hover { background: #f3f2fc; }
.rotation-controls button[aria-pressed="true"] { color: var(--accent); background: #eeedfc; }
.progress-track { height: 3px; background: #f1effa; margin: 0 -23px; }
#progress { height: 100%; background: #9391e5; width: 0; }
.rotation-error { color: #af7951; font-size: 11px; padding-bottom: 10px; line-height: 1.8; }
.sync-strip { display: flex; justify-content: space-between; align-items: center; padding: 16px 2px 28px; gap: 10px; }
.sync-strip > span { font-size: 10px; color: #8d96aa; }
.sync-strip button { background: transparent; border: 0; font-size: 11px; color: #7c86a1; padding: 5px 0 5px 12px; white-space: nowrap; }
.load-error { background: #fff1e9; color: #a16f52; border-radius: 8px; padding: 12px; font-size: 12px; line-height: 1.8; margin-bottom: 15px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-title h2 { font-size: 16px; font-weight: 600; }
.section-title h2 > span { background: #e9ecf5; border-radius: 5px; color: #838da5; font-size: 10px; padding: 3px 7px; margin-left: 7px; vertical-align: middle; }
.section-title > span { font-size: 10px; color: #a4aabb; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; padding: 18px 0 16px; }
.filters button { background: transparent; border: 1px solid #e4e7f0; color: #858ea5; font-size: 11px; border-radius: 7px; padding: 8px 12px; display: flex; align-items: center; gap: 7px; max-width: 100%; overflow-wrap: anywhere; }
.filters button[aria-pressed="true"] { color: #6262c4; background: #edecfd; border-color: #dcdaf6; }
.dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dot.blue { background: #7b9ce6; }
.dot.purple { background: #a492da; }
.search { display: flex; align-items: center; gap: 9px; padding: 0 13px; background: white; border: 1px solid #e6e9f1; border-radius: 9px; margin-bottom: 17px; }
.search > span { font-size: 24px; color: #a4abc0; }
.search input { width: 100%; min-width: 0; border: 0; background: transparent; padding: 12px 0; font-size: 12px; color: #3c4761; }
.search input::placeholder { color: #a0a8b9; }
.message-list { display: grid; gap: 13px; }
.message-card { border: 1px solid #e6e9f2; border-radius: 12px; background: white; padding: 20px; }
.message-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.message-sender { font-size: 14px; font-weight: 650; overflow-wrap: anywhere; min-width: 0; }
.sim-pill { color: #7389bd; background: #eff3fc; padding: 4px 9px; border-radius: 5px; font-size: 10px; flex-shrink: 0; max-width: 45%; overflow-wrap: anywhere; }
.sim-pill.sim2 { color: #9880c5; background: #f3effd; }
.sim-pill.unknown { color: #8e96a9; background: #f1f3f7; }
.message-body { color: #5b667e; font-size: 13px; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; margin: 14px 0 16px; }
.message-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: #a1a8ba; font-size: 10px; }
.message-recipient { color: #9ca4b7; font-size: 10px; line-height: 1.7; margin-top: 8px; overflow-wrap: anywhere; }
.new-message { background: #eaeafc; color: #7372ba; font-size: 12px; padding: 11px 13px; border-radius: 8px; margin-bottom: 14px; }
.empty { text-align: center; padding: 42px 15px; }
.empty > span { font-size: 34px; color: #bcc4dc; }
.empty h3 { color: #8290aa; font-size: 14px; font-weight: 500; margin: 12px 0; }
.empty p { color: #9da6b9; font-size: 12px; line-height: 1.8; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 10px; color: #9ca5b8; padding: 23px 1px; }
.pagination > div { display: flex; gap: 13px; align-items: center; }
.pagination button { background: #fff; border: 1px solid #e2e6f0; border-radius: 6px; padding: 6px 10px; color: #8390ac; }
.page-footer { font-size: 10px; color: #a5acbd; text-align: center; line-height: 1.9; padding: 15px 0 30px; }
@media (max-width: 480px) {
  .page { width: calc(100% - 32px); }
  .page-header { padding: 22px 0; }
  .brand { font-size: 16px; }
  .logo { width: 38px; height: 38px; border-radius: 10px; }
  .access-badge { font-size: 10px; padding: 6px 10px; }
  h1 { font-size: 24px; }
  .page-intro { padding: 7px 0 23px; }
  .page-intro > p:last-child { font-size: 11px; }
  .demo-banner { font-size: 11px; margin-bottom: 21px; }
  .rotation { top: 8px; padding: 18px 17px 0; border-radius: 13px; }
  .rotation-content .message-sender { font-size: 17px; }
  .rotation-content .message-body { font-size: 14px; max-height: 30vh; max-height: 30svh; }
  .rotation-order { font-size: 9px; }
  .rotation-footer { flex-wrap: wrap; }
  .progress-track { margin: 0 -17px; }
  .filters { gap: 6px; }
  .filters button { font-size: 10px; padding: 8px 10px; }
  .message-card { padding: 17px; }
  .message-body { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  button { transition: none; }
}
