:root {
  --red: #ed151c;
  --red-dark: #cf2028;
  --red-soft: #fff0f1;
  --coral: #ff7063;
  --ink: #17191c;
  --muted: #8d939b;
  --line: #eceff2;
  --surface: #ffffff;
  --canvas: #f6f7f9;
  --blue: #2f89e8;
  --green: #26a875;
  --orange: #f3a43b;
  --shadow: 0 5px 18px rgba(26, 30, 38, 0.08);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #e9edf0;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: #e9edf0;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  background: #e9edf0;
}

button,
input,
textarea,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.desktop-backdrop {
  position: fixed;
  inset: 0;
  background-color: #e9edf0;
  background-image:
    linear-gradient(#dfe4e8 1px, transparent 1px),
    linear-gradient(90deg, #dfe4e8 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.45;
  pointer-events: none;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 432px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow-x: hidden;
  background: var(--canvas);
  box-shadow: 0 0 36px rgba(21, 28, 38, 0.18);
}

.boot-screen {
  display: grid;
  min-height: 100dvh;
  place-content: center;
  gap: 14px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.boot-mark {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

.page {
  min-height: 100dvh;
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
  background: var(--canvas);
}

.page.no-nav {
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

.page-home {
  background: var(--red);
}

.page-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  height: 50px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

.page-header h1 {
  overflow: hidden;
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-button svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
}

.page-header .icon-button:first-child {
  margin-left: 3px;
}

.home-stack {
  display: grid;
  gap: 6px;
  padding: 10px 9px 74px;
}

.home-announcement {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 13px 12px;
  border: 1px solid #ffd1d4;
  border-radius: 7px;
  background: #fff7f7;
}

.home-announcement img {
  width: 52px;
  height: 52px;
  border-radius: 7px;
  object-fit: cover;
}

.home-announcement > div {
  min-width: 0;
}

.home-announcement > div > strong {
  display: block;
  margin-bottom: 2px;
  overflow: hidden;
  color: #20191a;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-announcement p {
  margin: 0;
  color: #312527;
  font-size: 13px;
  line-height: 1.65;
}

.home-banner {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 1;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #0b3279;
  cursor: pointer;
}

.home-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.expert-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 4px;
  padding: 13px 8px 12px;
  border-radius: 6px;
  background: var(--surface);
}

.expert-tile {
  position: relative;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  cursor: pointer;
}

.expert-tile .avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  margin: 0 auto 5px;
}

.avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  background: #eef1f3;
  object-fit: cover;
}

.expert-tile .avatar {
  width: 44px;
  height: 44px;
}

.badge-count {
  position: absolute;
  top: -5px;
  right: -8px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  line-height: 15px;
}

.expert-tile strong,
.expert-tile span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expert-tile strong {
  font-size: 12px;
  font-weight: 600;
}

.expert-tile span {
  margin-top: 2px;
  color: var(--red);
  font-size: 11px;
}

.notice-strip {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  min-height: 29px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #d30d14;
  color: #fff;
  font-size: 11px;
}

.notice-strip svg {
  width: 16px;
  height: 16px;
}

.marquee-window {
  overflow: hidden;
  white-space: nowrap;
}

.marquee-window span {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 17s linear infinite;
}

@keyframes marquee {
  to { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-window span { animation: none; padding-left: 0; }
}

.section-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  padding: 6px 10px;
  border-radius: 5px;
  background: var(--surface);
}

.section-toolbar strong {
  font-size: 15px;
}

.search-control {
  position: relative;
  min-width: 0;
}

.search-control svg {
  position: absolute;
  top: 50%;
  left: 9px;
  width: 16px;
  height: 16px;
  color: #a3a8ae;
  transform: translateY(-50%);
}

.search-control input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 31px;
  border: 1px solid transparent;
  border-radius: 4px;
  outline: none;
  background: #f8f9fa;
  color: var(--ink);
  font-size: 13px;
  -webkit-appearance: none;
  appearance: none;
}

.search-control input::-webkit-search-decoration {
  display: none;
  -webkit-appearance: none;
}

.search-control input:focus {
  border-color: #f1a5a9;
  background: #fff;
}

.content-pad {
  padding: 10px 10px 16px;
}

.content-pad.flush {
  padding-top: 0;
}

.material-list {
  display: grid;
  gap: 7px;
}

.material-card {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-height: 126px;
  padding: 12px 70px 9px 10px;
  border: 0;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
  text-align: left;
  cursor: pointer;
}

.material-result-seal {
  position: absolute;
  top: 14px;
  right: 10px;
  display: grid;
  width: 52px;
  height: 52px;
  place-content: center;
  border: 3px double #cf3039;
  border-radius: 50%;
  color: #c92e38;
  line-height: 1.05;
  letter-spacing: 0;
  text-align: center;
  opacity: 0.86;
  transform: rotate(-7deg);
}

.material-result-seal::after {
  position: absolute;
  inset: 4px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
  opacity: 0.55;
}

.material-result-seal b,
.material-result-seal small {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 38px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-result-seal b {
  max-width: 42px;
  font-size: 12px;
}

.material-result-seal small {
  margin-top: 3px;
  font-size: 8px;
}

.material-result-seal.pending {
  border-color: #2f353a;
  color: #20262b;
  opacity: 0.78;
}

.material-result-seal.missed {
  border-color: #252b30;
  color: #171c20;
  opacity: 0.86;
}

.page-home .material-card {
  border: 1px solid #f2c0c2;
}

.material-card.compact {
  min-height: 112px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

@media (max-width: 370px) {
  .material-card {
    padding-right: 60px;
  }

  .material-result-seal {
    right: 7px;
    width: 46px;
    height: 46px;
  }

  .material-result-seal b {
    font-size: 11px;
  }
}

.material-thumb {
  width: 48px;
  height: 48px;
  margin-top: 2px;
  border-radius: 50%;
  background: #edf0f2;
  object-fit: cover;
}

.material-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.material-title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #202124;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.material-card.compact .material-title {
  -webkit-line-clamp: 2;
}

.inline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.material-previous-result {
  display: inline-flex;
  min-height: 20px;
  padding: 1px 7px;
  align-items: center;
  border: 1px solid #e6848b;
  border-radius: 4px;
  background: #fff7f7;
  color: #cc2f38;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0;
}

.material-previous-result.missed {
  border-color: #c7ccd0;
  background: #f7f8f9;
  color: #343b41;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 7px;
  border: 1px solid #ee8b91;
  border-radius: 4px;
  color: #d3313a;
  font-size: 11px;
}

.material-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  margin-top: auto;
  padding-top: 8px;
  color: #777d84;
  font-size: 11px;
}

.material-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-meta .views {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.material-meta svg {
  width: 13px;
  height: 13px;
}

.price {
  color: #d72c38;
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  bottom: 0;
  left: 50%;
  display: grid;
  width: min(100%, 432px);
  height: calc(58px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid #dde1e5;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -4px 14px rgba(24, 30, 38, 0.05);
  transform: translateX(-50%);
}

.nav-button {
  display: grid;
  min-width: 0;
  padding: 6px 0 5px;
  place-items: center;
  gap: 1px;
  border: 0;
  background: transparent;
  color: #71767d;
  font-size: 11px;
  cursor: pointer;
}

.nav-button svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}

.nav-button.active {
  color: var(--red);
  font-weight: 650;
}

.list-page-header {
  padding: 10px;
  background: var(--surface);
}

.expert-list,
.records-list,
.menu-list {
  background: var(--surface);
}

.expert-row {
  display: grid;
  grid-template-columns: 26px 50px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 78px;
  padding: 9px 12px 9px 8px;
  border-bottom: 1px solid #f1f2f4;
}

.rank {
  color: #5e6268;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.rank.medal {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
}

.rank.gold { background: #e8b632; }
.rank.silver { background: #aab3bc; }
.rank.bronze { background: #c58b4b; }

.expert-main {
  min-width: 0;
}

.expert-main strong,
.expert-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expert-main strong {
  font-size: 15px;
}

.expert-main small {
  margin-top: 4px;
  color: #a0a5ab;
  font-size: 12px;
}

.expert-action {
  display: flex;
  align-items: center;
  gap: 8px;
}

.streak {
  color: var(--red);
  font-size: 13px;
  white-space: nowrap;
}

.follow-button,
.small-button,
.solid-button,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
}

.follow-button,
.small-button {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--red);
  background: var(--red);
  color: #fff;
  font-size: 12px;
}

.follow-button.following {
  background: #fff;
  color: var(--red);
}

.soft-note {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.detail-hero {
  padding: 14px 12px 13px;
  background: linear-gradient(115deg, #d52d35, #f0141d);
  color: #fff;
}

.expert-intro {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.expert-intro .avatar {
  width: 52px;
  height: 52px;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.detail-expert-avatar {
  position: relative;
  display: block;
  width: 54px;
  padding-bottom: 8px;
}

.detail-expert-avatar small {
  position: absolute;
  right: 3px;
  bottom: 0;
  left: 3px;
  min-height: 16px;
  border-radius: 3px;
  background: #e5b238;
  color: #fff;
  font-size: 9px;
  line-height: 16px;
  text-align: center;
}

.hero-name {
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-sub {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
}

.detail-hero .follow-button {
  border-color: #fff;
  background: #fff;
  color: var(--red);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.hero-tags span {
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 10px;
}

.recent-record {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 11px;
  padding: 8px 9px;
  border-radius: 5px;
  background: #fff;
  color: #393d42;
  font-size: 11px;
}

.recent-record strong {
  color: var(--red);
}

.recent-record b {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.recent-record b.red { background: #e3323a; }
.recent-record b.dark { background: #4d5258; }
.recent-record b.gray { background: #a5aab0; }

.expert-home-hero {
  padding: 15px 12px 10px;
  background: #df222a;
  color: #fff;
}

.expert-home-main {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.expert-home-avatar {
  position: relative;
  display: block;
  padding-bottom: 9px;
}

.expert-home-avatar .avatar {
  width: 52px;
  height: 52px;
  border: 2px solid rgba(255, 255, 255, 0.88);
}

.expert-home-avatar small {
  position: absolute;
  right: 3px;
  bottom: 0;
  left: 3px;
  min-height: 17px;
  border-radius: 3px;
  background: #e5b238;
  color: #fff;
  font-size: 10px;
  line-height: 17px;
  text-align: center;
}

.expert-home-copy {
  min-width: 0;
}

.expert-home-copy > strong {
  display: block;
  overflow: hidden;
  margin: 2px 0 7px;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expert-home-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.expert-home-tags span {
  min-height: 19px;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 3px;
  background: rgba(137, 18, 24, 0.28);
  font-size: 10px;
}

.expert-follow {
  min-width: 54px;
  margin-top: 2px;
  border-color: #fff;
  background: #fff;
  color: #d8232c;
}

.expert-follow.following {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.expert-recent {
  display: flex;
  min-height: 39px;
  margin-top: 10px;
  padding: 7px 10px;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  background: #fff;
  color: #3f4449;
}

.expert-recent span {
  margin-right: 4px;
  font-size: 12px;
  font-weight: 650;
}

.expert-recent b {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
}

.expert-recent b.red { background: #e3323a; }
.expert-recent b.dark { background: #4d5258; }
.expert-recent b.gray { background: #a5aab0; }

.expert-history {
  background: #fff;
}

.expert-history-title {
  display: flex;
  min-height: 46px;
  padding: 0 13px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.expert-history-title strong {
  font-size: 15px;
}

.expert-history-title span {
  color: #969ba1;
  font-size: 11px;
}

.expert-material-row {
  display: grid;
  width: 100%;
  min-height: 104px;
  padding: 13px 12px;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 10px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.expert-material-copy {
  display: block;
  min-width: 0;
}

.expert-material-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.expert-material-copy time {
  display: block;
  margin-top: 8px;
  color: #a1a6ac;
  font-size: 10px;
}

.result-stack {
  display: grid;
  place-items: center;
  gap: 3px;
}

.expert-result {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 3px double currentColor;
  border-radius: 50%;
  background: #fff;
  font-size: 18px;
  transform: rotate(-8deg);
}

.expert-result.red { color: #dc313a; }
.expert-result.dark { color: #555b61; }
.expert-result.gray { color: #a3a8ae; }

.result-stack small {
  color: #d4343d;
  font-size: 10px;
}

.detail-body {
  display: grid;
  gap: 9px;
  padding: 10px;
}

.detail-section {
  position: relative;
  padding: 15px 12px;
  border-radius: 6px;
  background: var(--surface);
}

.detail-title {
  margin: 0 0 9px;
  font-size: 17px;
  line-height: 1.55;
}

.publish-time {
  color: var(--muted);
  font-size: 12px;
}

.section-label {
  display: inline-flex;
  min-height: 23px;
  margin-bottom: 12px;
  padding: 2px 9px;
  align-items: center;
  border-radius: 3px;
  color: #fff;
  font-size: 11px;
}

.section-label.free { background: var(--orange); }
.section-label.paid { background: var(--red); }
.section-label.history { background: var(--blue); }
.section-label.attachment { background: #667b91; }

.purchased-archive-notice {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: flex-start;
  margin: 8px 10px 0;
  padding: 10px 12px;
  border: 1px solid #efd79d;
  border-radius: 5px;
  background: #fff9e9;
  color: #6f5a25;
}

.purchased-archive-notice > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: #b48117;
}

.purchased-archive-notice div,
.purchased-archive-notice strong,
.purchased-archive-notice span {
  display: block;
  min-width: 0;
}

.purchased-archive-notice strong {
  font-size: 12px;
}

.purchased-archive-notice span {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.5;
}

.detail-text {
  margin: 0;
  color: #626970;
  font-size: 13px;
  line-height: 1.75;
}

.paid-value {
  color: #d8a236;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.detail-attachment-list {
  display: grid;
  gap: 7px;
}

.detail-attachment-wrap {
  position: relative;
  min-width: 0;
}

.detail-attachment-wrap .detail-attachment-row {
  padding-right: 46px;
}

.detail-attachment-preview {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #d8e0e7;
  border-radius: 4px;
  background: #fff;
  color: #55718b;
  cursor: pointer;
  transform: translateY(-50%);
}

.detail-attachment-preview svg {
  width: 15px;
  height: 15px;
}

.attachment-image-preview {
  display: grid;
  min-height: 220px;
  max-height: min(68vh, 680px);
  place-items: center;
  padding: 12px;
  overflow: auto;
  background: #f2f4f6;
}

.attachment-image-preview img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: contain;
}

.detail-attachment-row {
  display: grid;
  min-width: 0;
  min-height: 52px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fafbfc;
  color: #4f5964;
  font: inherit;
  text-align: left;
  text-decoration: none;
}

button.detail-attachment-row {
  width: 100%;
  cursor: pointer;
}

.detail-attachment-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 4px;
  background: #eaf0f5;
  color: #55718b;
}

.detail-attachment-icon svg,
.detail-attachment-row > svg {
  width: 17px;
  height: 17px;
}

.detail-attachment-row > span:nth-child(2),
.detail-attachment-row strong,
.detail-attachment-row small {
  display: block;
  min-width: 0;
}

.detail-attachment-row strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-attachment-row small,
.detail-attachment-row > b {
  margin-top: 3px;
  color: #8c949c;
  font-size: 10px;
  font-weight: 500;
}

.locked-content {
  display: grid;
  min-height: 180px;
  place-content: center;
  gap: 9px;
  color: #c7a16a;
  text-align: center;
}

.draw-result-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #eceff2;
  border-left: 3px solid #a8b0b8;
  border-radius: 4px;
  background: #fafbfc;
}

.draw-result-card.hit {
  border-left-color: var(--red);
  background: #fff8f8;
}

.draw-result-card.missed {
  border-left-color: #555f69;
}

.draw-result-card header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.draw-result-card header strong {
  font-size: 13px;
}

.draw-status-pill {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 1px 8px;
  border-radius: 3px;
  background: #eef1f4;
  color: #687078;
  font-size: 10px;
  font-weight: 700;
}

.draw-status-pill.hit {
  background: #ffecee;
  color: #d3222b;
}

.draw-status-pill.missed {
  background: #eceff1;
  color: #414950;
}

.draw-result-card p,
.draw-result-card small {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.draw-result-card p {
  color: #4f5962;
  font-size: 13px;
  line-height: 1.7;
}

.draw-result-description {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding-top: 8px;
  border-top: 1px solid #eceff2;
}

.draw-result-description b {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  font-size: 11px;
}

.draw-result-description strong,
.draw-result-description small {
  display: block;
}

.draw-result-description small {
  margin-top: 3px;
  color: #777f87;
  font-size: 11px;
  line-height: 1.55;
}

.locked-content > svg {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  color: #e9bd72;
}

.locked-content strong {
  color: #c6964c;
  font-size: 15px;
}

.locked-content span {
  color: var(--muted);
  font-size: 12px;
}

.locked-content .copy-cta {
  min-width: 280px;
  margin-top: 12px;
}

.loading-mask {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  color: #fff;
  font-size: 12px;
  text-align: center;
  backdrop-filter: blur(1px);
}

.loading-mask::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 116px;
  height: 86px;
  border-radius: 5px;
  background: rgba(32, 34, 38, 0.78);
  content: "";
  transform: translate(-50%, -50%);
}

.loading-mask > * {
  position: relative;
  z-index: 1;
}

.spinner {
  width: 23px;
  height: 23px;
  margin: 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.copy-cta,
.sticky-cta {
  display: flex;
  width: 100%;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 22px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(237, 21, 28, 0.18);
}

.history-list {
  display: grid;
}

.history-empty {
  margin: 0;
  padding: 18px 6px;
  color: #9aa0a6;
  font-size: 12px;
  text-align: center;
}

.history-row {
  position: relative;
  padding: 12px 54px 12px 6px;
  border-bottom: 1px solid var(--line);
}

.history-row:last-child {
  border-bottom: 0;
}

.history-row strong {
  display: block;
  font-size: 14px;
  line-height: 1.5;
}

.history-row span {
  display: block;
  margin-top: 7px;
  color: #5a5f66;
  font-size: 13px;
}

.result-seal {
  position: absolute;
  top: 14px;
  right: 4px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid #d84a50;
  border-radius: 50%;
  color: #d84a50;
  font-size: 11px;
  font-weight: 700;
  transform: rotate(-10deg);
}

.floating-back {
  position: fixed;
  z-index: 28;
  right: max(16px, calc((100vw - 432px) / 2 + 16px));
  bottom: calc(72px + env(safe-area-inset-bottom));
  display: grid;
  width: 54px;
  height: 54px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(255, 112, 99, 0.28);
}

.profile-hero {
  padding: 20px 14px 14px;
  background: #fff5f6;
  background-image: linear-gradient(120deg, #fff7f7 0%, #f4efff 100%);
}

.profile-user {
  display: flex;
  gap: 11px;
  align-items: center;
  font-size: 17px;
  font-weight: 700;
}

.profile-user .avatar {
  width: 56px;
  height: 56px;
}

.profile-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
  text-align: left;
}

.profile-copy strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy small {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: #7b8086;
  font-size: 11px;
  font-weight: 400;
}

.profile-copy small b {
  padding: 2px 6px;
  border: 1px solid #efb7bb;
  border-radius: 3px;
  color: #c9303a;
  font-weight: 650;
}

.wallet-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 85px;
  margin-top: 15px;
  padding: 14px;
  border: 1px solid #ffe1e3;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
}

.wallet-card span,
.wallet-card strong {
  display: block;
}

.wallet-card span {
  font-size: 13px;
}

.wallet-card strong {
  margin-top: 6px;
  color: var(--red);
  font-size: 19px;
}

.wallet-button {
  min-width: 72px;
  height: 36px;
  border: 0;
  border-radius: 18px;
  background: var(--coral);
  color: #fff;
  cursor: pointer;
}

.order-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 92px;
  border-bottom: 8px solid var(--canvas);
  background: #fff;
}

.shortcut-button {
  display: grid;
  padding: 12px 4px 9px;
  place-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
}

.shortcut-button svg {
  width: 25px;
  height: 25px;
  stroke-width: 1.6;
}

.menu-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 0 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.menu-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
}

.menu-icon svg {
  width: 17px;
  height: 17px;
}

.menu-icon.orange { background: #f7a23a; }
.menu-icon.green { background: #31b98b; }
.menu-icon.blue { background: #4c98dc; }
.menu-icon.coral { background: #ff7d67; }
.menu-icon.red { background: #ea5160; }
.menu-icon.violet { background: #9271e7; }

.menu-row > span:nth-child(2) {
  font-size: 15px;
}

.menu-row > svg {
  width: 17px;
  color: #c3c7cc;
}

.tabs {
  position: sticky;
  z-index: 18;
  top: 50px;
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.tab-button {
  position: relative;
  min-width: 0;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: #4d5359;
  font-size: 14px;
  cursor: pointer;
}

.tab-button.active {
  color: #222;
  font-weight: 700;
}

.tab-button.active::after {
  position: absolute;
  right: 34%;
  bottom: 0;
  left: 34%;
  height: 3px;
  border-radius: 2px;
  background: var(--red);
  content: "";
}

.empty-state {
  display: grid;
  min-height: 430px;
  padding: 34px 20px;
  place-content: center;
  gap: 13px;
  color: #a2a7ad;
  text-align: center;
}

.empty-illustration {
  position: relative;
  width: 132px;
  height: 98px;
  margin: 0 auto;
  border-bottom: 2px solid #f8cfd2;
}

.empty-illustration::before,
.empty-illustration::after {
  position: absolute;
  border: 2px solid #f3bfc3;
  background: #fff5f5;
  content: "";
}

.empty-illustration::before {
  top: 30px;
  left: 42px;
  width: 48px;
  height: 40px;
  border-radius: 5px;
}

.empty-illustration::after {
  top: 19px;
  left: 52px;
  width: 27px;
  height: 21px;
  border-radius: 4px;
  transform: rotate(8deg);
}

.empty-state svg {
  width: 38px;
  height: 38px;
  margin: -61px auto 16px;
  color: #eea4aa;
}

.stats-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 112px;
  padding: 18px 12px;
  border-radius: 7px;
  background: linear-gradient(115deg, #df242d, #f21a22);
  color: #fff;
}

.stat-item {
  display: grid;
  align-content: center;
  gap: 7px;
  padding-left: 10px;
}

.stat-item span {
  font-size: 12px;
  opacity: 0.84;
}

.stat-item strong {
  font-size: 20px;
}

.record-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 104px;
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.record-row .avatar {
  width: 42px;
  height: 42px;
}

.record-main {
  min-width: 0;
}

.record-main strong {
  font-size: 14px;
}

.record-main time {
  display: block;
  margin-top: 4px;
  color: #a0a5aa;
  font-size: 11px;
}

.record-main p {
  display: -webkit-box;
  overflow: hidden;
  margin: 7px 0 0;
  color: #6e747a;
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.record-main p svg,
.managed-meta svg {
  display: inline-block;
  width: 13px;
  height: 13px;
  vertical-align: -2px;
}

.record-side {
  display: flex;
  align-items: flex-start;
}

.record-amount {
  color: #d52d38;
  font-size: 15px;
  font-weight: 700;
}

.distribution-hero {
  padding: 14px 12px 16px;
  background: linear-gradient(115deg, #d62831, #f11921);
  color: #fff;
}

.distribution-top {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.distribution-top .avatar {
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.distribution-top small {
  display: block;
  margin-bottom: 3px;
  opacity: 0.8;
}

.light-button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 15px;
  background: #fff;
  color: var(--red);
  font-size: 11px;
  cursor: pointer;
}

.distribution-top svg {
  width: 25px;
  height: 25px;
}

.qr-button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 9px 10px 0;
  background: #fff4f4;
}

.metric-item {
  display: grid;
  min-height: 72px;
  padding: 9px 4px;
  place-content: center;
  gap: 5px;
  border: 1px solid #ffe3e5;
  border-radius: 6px;
  background: #fff;
  text-align: center;
}

.metric-item span {
  color: #656a70;
  font-size: 11px;
}

.metric-item strong {
  color: #ce3039;
  font-size: 18px;
}

.subnav-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  align-items: center;
  min-height: 52px;
  padding: 0 7px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.subnav-tabs {
  display: grid;
  grid-auto-columns: minmax(72px, 1fr);
  grid-auto-flow: column;
  min-width: 0;
}

.subnav-row button {
  height: 34px;
  border: 0;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
}

.subnav-row button.active {
  color: var(--red);
  font-weight: 700;
}

.subnav-row .withdraw-button {
  height: 30px;
  padding: 0 10px;
  border-radius: 15px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
}

.frozen-note {
  padding: 9px 12px;
  border-bottom: 1px solid #f2d9db;
  background: #fff4f4;
  color: #8b5559;
  font-size: 11px;
  line-height: 1.5;
}

.application-row {
  align-items: start;
}

.application-actions {
  display: grid;
  gap: 6px;
}

.application-actions button {
  min-width: 48px;
  height: 27px;
  border: 1px solid #e79b9f;
  border-radius: 3px;
  background: #fff;
  color: #cc3039;
  font-size: 11px;
  cursor: pointer;
}

.application-actions button:first-child {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.manager-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: #fff;
}

.outline-button {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #e8868c;
  background: #fff;
  color: #cf3039;
  font-size: 12px;
}

.managed-card {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 10px;
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.managed-card .material-thumb {
  width: 46px;
  height: 46px;
}

.managed-thumb-block {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 3px;
}

.managed-thumb-block small {
  display: block;
  width: 50px;
  overflow: hidden;
  color: #8b9096;
  font-size: 9px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.managed-title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.managed-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  color: #72777d;
  font-size: 11px;
}

.managed-status-line {
  display: flex;
  min-width: 0;
  gap: 7px;
  align-items: center;
  margin-top: 7px;
}

.managed-status-line small {
  min-width: 0;
  overflow: hidden;
  color: #8a9096;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.managed-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 9px;
}

.managed-actions button {
  min-width: 56px;
  height: 29px;
  border: 1px solid #e9a4a8;
  border-radius: 3px;
  background: #fff;
  color: #d3474f;
  font-size: 12px;
  cursor: pointer;
}

.managed-actions button.preview {
  border-color: #cbd5de;
  color: #587084;
}

.sticky-action-wrap {
  position: fixed;
  z-index: 25;
  right: max(9px, calc((100vw - 432px) / 2 + 9px));
  bottom: calc(8px + env(safe-area-inset-bottom));
  left: max(9px, calc((100vw - 432px) / 2 + 9px));
  max-width: 414px;
  margin: 0 auto;
}

.form-card {
  display: grid;
  gap: 18px;
  padding: 17px 13px 28px;
  background: #fff;
}

.field {
  display: grid;
  gap: 8px;
}

.field label,
.field-label {
  font-size: 14px;
  font-weight: 550;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #e7e9ec;
  border-radius: 3px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: #e7969b;
}

.stepper-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.stepper {
  display: grid;
  width: 220px;
  height: 42px;
  grid-template-columns: 45px minmax(0, 1fr) 45px;
  border: 1px solid #eceef0;
  border-radius: 3px;
  overflow: hidden;
}

.stepper button,
.stepper output {
  display: grid;
  place-items: center;
  border: 0;
  background: #f4f5f6;
}

.stepper button {
  font-size: 22px;
  cursor: pointer;
}

.stepper output {
  border-right: 1px solid #e2e5e8;
  border-left: 1px solid #e2e5e8;
  background: #fff;
  font-size: 14px;
}

.solid-button {
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
}

.radio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 6px;
}

.radio-option {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: #555b61;
  font-size: 12px;
}

.radio-option input {
  width: 17px;
  min-height: 17px;
  margin: 0;
  accent-color: var(--blue);
}

.settings-block {
  display: grid;
  gap: 19px;
  padding: 18px 14px;
  background: #fff;
}

.settings-logo {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  object-fit: cover;
}

.binary-row {
  display: grid;
  gap: 9px;
}

.binary-options {
  display: flex;
  gap: 20px;
}

.submit-green {
  width: 116px;
  height: 42px;
  margin: 22px auto 8px;
  border: 0;
  border-radius: 3px;
  background: #45bc2e;
  color: #fff;
  cursor: pointer;
}

.settings-menu {
  margin: 10px;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.logout-button {
  width: calc(100% - 20px);
  height: 48px;
  margin: 12px 10px;
  border: 0;
  border-radius: 5px;
  background: #fff;
  color: var(--red);
  cursor: pointer;
}

.legal-content {
  padding: 18px 15px 90px;
  background: #fff;
  color: #24272b;
  font-size: 14px;
  line-height: 1.8;
}

.legal-content h2 {
  margin: 0 0 12px;
  font-size: 18px;
  text-align: center;
}

.legal-content h3 {
  margin: 18px 0 6px;
  font-size: 15px;
}

.legal-content p {
  margin: 0 0 9px;
}

.recharge-balance {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 0 16px;
  border-radius: 7px;
  background: #fff;
  font-size: 15px;
}

.recharge-balance svg {
  width: 28px;
  height: 28px;
  color: var(--red);
}

.recharge-balance strong {
  color: var(--red);
  font-size: 18px;
}

.recharge-panel {
  margin-top: 10px;
  padding: 16px 13px;
  border-radius: 7px;
  background: #fff;
}

.recharge-panel h2 {
  margin: 0 0 14px;
  font-size: 16px;
}

.recharge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 15px;
}

.custom-amount-field {
  margin-top: 13px;
}

.custom-amount-field input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid #eaa2a7;
  border-radius: 4px;
  outline: none;
  background: #fff;
  color: var(--ink);
}

.custom-amount-field input:focus {
  border-color: var(--red);
}

.amount-button {
  display: grid;
  min-height: 82px;
  padding: 8px;
  place-content: center;
  gap: 4px;
  border: 1px solid #eaa2a7;
  border-radius: 4px;
  background: #fff8f8;
  color: #c92a35;
  cursor: pointer;
}

.amount-button strong {
  font-size: 20px;
}

.amount-button small {
  font-size: 12px;
}

.amount-button.active {
  border-color: var(--red);
  background: linear-gradient(135deg, #e61219, #ff573a);
  color: #fff;
}

.payment-list {
  display: grid;
}

.payment-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 22px;
  gap: 9px;
  align-items: center;
  min-height: 56px;
  cursor: pointer;
}

.payment-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}

.payment-icon.alipay { background: #27a9e8; }
.payment-icon.wechat { background: #24bd63; }

.payment-icon svg {
  width: 18px;
  height: 18px;
}

.payment-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--blue);
}

.tips {
  margin: 14px 2px 4px;
  color: #6c7278;
  font-size: 12px;
  line-height: 1.75;
}

.tips strong {
  display: block;
  color: #ce3039;
  font-size: 13px;
}

.experts-owned .expert-row {
  grid-template-columns: 50px minmax(0, 1fr) auto;
  min-height: 108px;
}

.experts-owned .expert-main p {
  display: -webkit-box;
  overflow: hidden;
  margin: 6px 0 0;
  color: #969ba1;
  font-size: 11px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.payout-summary,
.agent-summary {
  display: grid;
  padding: 12px 10px;
  gap: 8px;
  background: #fff4f4;
}

.payout-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payout-summary > div,
.agent-summary > div {
  display: grid;
  min-height: 72px;
  padding: 10px 6px;
  place-content: center;
  gap: 5px;
  border: 1px solid #f2d7d9;
  border-radius: 6px;
  background: #fff;
  text-align: center;
}

.payout-summary span,
.agent-summary span {
  color: #787e84;
  font-size: 11px;
}

.payout-summary strong,
.agent-summary strong {
  color: #cf2d36;
  font-size: 18px;
}

.withdrawal-list {
  display: grid;
  gap: 8px;
  padding: 8px 10px 90px;
}

.withdrawal-card {
  overflow: hidden;
  border: 1px solid #eceff2;
  border-radius: 7px;
  background: #fff;
}

.withdrawal-card header {
  display: flex;
  min-height: 68px;
  padding: 12px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.withdrawal-card header span,
.withdrawal-card header strong {
  display: block;
}

.withdrawal-card header span {
  margin-bottom: 4px;
  color: #888e94;
  font-size: 11px;
}

.withdrawal-card header strong {
  color: #cc3039;
  font-size: 20px;
}

.withdrawal-status,
.agent-status {
  padding: 4px 7px;
  border-radius: 3px;
  font-size: 11px;
}

.withdrawal-status.pending {
  background: #fff0df;
  color: #c66b0c;
}

.withdrawal-status.paying {
  background: #eaf3ff;
  color: #3479bc;
}

.withdrawal-status.paid {
  background: #e8f8f1;
  color: #23855e;
}

.withdrawal-status.rejected {
  background: #f1f2f3;
  color: #73797f;
}

.withdrawal-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
}

.withdrawal-card dl div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  font-size: 12px;
}

.withdrawal-card dt {
  color: #92979d;
}

.withdrawal-card dd {
  overflow-wrap: anywhere;
  margin: 0;
  color: #454a50;
  text-align: right;
}

.withdraw-balance {
  display: grid;
  min-height: 126px;
  padding: 18px 15px;
  align-content: center;
  gap: 6px;
  background: #dd252e;
  color: #fff;
}

.withdraw-balance span {
  font-size: 12px;
  opacity: 0.84;
}

.withdraw-balance strong {
  font-size: 28px;
}

.withdraw-balance small {
  font-size: 11px;
  opacity: 0.82;
}

.withdraw-form {
  margin-top: 8px;
}

.field > small {
  color: #92979d;
  font-size: 11px;
}

.money-input {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  border: 1px solid #e7e9ec;
  border-radius: 3px;
}

.money-input span {
  text-align: center;
  font-size: 18px;
}

.money-input input {
  border: 0;
  font-size: 18px;
}

.fixed-payment {
  display: grid;
  min-height: 54px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.fixed-payment > span:last-child {
  color: #93989e;
  font-size: 11px;
}

.confirm-row {
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: #62686e;
  font-size: 12px;
  line-height: 1.55;
}

.confirm-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--red);
}

.sticky-cta:disabled {
  background: #bbbfc4;
  cursor: not-allowed;
}

.agent-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rule-note {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  border-bottom: 1px solid #f1dfe0;
  background: #fff8f8;
  color: #77565a;
  font-size: 11px;
  line-height: 1.6;
}

.rule-note strong {
  color: #c63039;
  font-size: 12px;
}

.agent-list {
  display: grid;
  gap: 8px;
  padding: 0 10px 84px;
}

.agent-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid #e9ecef;
  border-radius: 7px;
  background: #fff;
}

.agent-card header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.agent-card header .avatar {
  width: 44px;
  height: 44px;
}

.agent-card header div {
  min-width: 0;
}

.agent-card header strong,
.agent-card header span {
  display: block;
}

.agent-card header strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-card header span {
  margin-top: 5px;
  color: #94999f;
  font-size: 10px;
}

.agent-status.active {
  background: #e9f7f0;
  color: #23845e;
}

.agent-status.paused {
  background: #f0f1f2;
  color: #777d83;
}

.agent-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 9px 10px;
  gap: 8px;
  background: #f7f8f9;
  color: #71777d;
  font-size: 11px;
}

.agent-metrics b {
  display: block;
  margin-top: 3px;
  color: #30353a;
  font-size: 13px;
}

.rate-editor {
  display: grid;
  gap: 7px;
}

.rate-editor label {
  font-size: 12px;
  font-weight: 650;
}

.rate-editor > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px 58px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #e2e5e8;
  border-radius: 3px;
}

.rate-editor input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 9px;
  border: 0;
  outline: 0;
}

.rate-editor > div > span {
  color: #646a70;
  text-align: center;
}

.rate-editor button {
  height: 38px;
  border: 0;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.rate-editor small {
  color: #858b91;
  font-size: 11px;
}

.rate-editor small b {
  color: #ce3039;
}

.agent-toggle {
  justify-self: end;
  height: 29px;
  padding: 0 10px;
  border: 1px solid #d9dde1;
  border-radius: 3px;
  background: #fff;
  color: #666c72;
  font-size: 11px;
  cursor: pointer;
}

.binding-card {
  margin-top: 8px;
  background: #fff;
}

.binding-card > header {
  display: grid;
  min-height: 62px;
  padding: 11px 13px;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.binding-card > header > svg {
  width: 25px;
  height: 25px;
  color: #d42e37;
}

.binding-card header strong,
.binding-card header span {
  display: block;
}

.binding-card header strong {
  font-size: 14px;
}

.binding-card header span {
  margin-top: 3px;
  color: #959aa0;
  font-size: 10px;
}

.binding-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 13px;
}

.binding-card dl div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  font-size: 12px;
}

.binding-card dt {
  color: #92979d;
}

.binding-card dd {
  overflow-wrap: anywhere;
  margin: 0;
  text-align: right;
}

.phone-binding {
  display: flex;
  min-height: 68px;
  padding: 12px 13px;
  align-items: center;
  justify-content: space-between;
}

.phone-binding div strong,
.phone-binding div span {
  display: block;
}

.phone-binding div span {
  margin-top: 4px;
  color: #27845f;
  font-size: 10px;
}

.phone-binding button {
  height: 30px;
  padding: 0 11px;
  border: 1px solid #dc858b;
  border-radius: 3px;
  background: #fff;
  color: #ca3039;
  font-size: 11px;
}

.attribution-chain {
  display: flex;
  padding: 16px 13px 8px;
  align-items: center;
  gap: 8px;
}

.attribution-step {
  display: grid;
  min-width: 0;
  flex: 1 1 0;
  grid-template-columns: 35px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
}

.attribution-step > b {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #e3313a;
  color: #fff;
  font-size: 10px;
}

.attribution-step span,
.attribution-step small {
  display: block;
}

.attribution-step span {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attribution-step small {
  margin-top: 3px;
  color: #989da3;
  font-size: 9px;
}

.chain-line {
  width: 16px;
  height: 1px;
  flex: 0 0 16px;
  background: #d8dce0;
}

.binding-lock {
  display: flex;
  margin: 6px 13px 0;
  padding: 10px 0 16px;
  gap: 6px;
  border-top: 1px solid var(--line);
  color: #777d83;
  font-size: 10px;
  line-height: 1.55;
}

.binding-lock svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.access-denied {
  display: grid;
  min-height: calc(100dvh - 50px);
  padding: 32px 28px;
  place-content: center;
  justify-items: center;
  gap: 12px;
  background: #fff;
  text-align: center;
}

.access-denied > svg {
  width: 46px;
  height: 46px;
  color: #df555d;
}

.access-denied strong {
  font-size: 17px;
}

.access-denied p {
  max-width: 290px;
  margin: 0 0 5px;
  color: #777d83;
  font-size: 12px;
  line-height: 1.7;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 50%;
  bottom: 92px;
  max-width: min(320px, calc(100vw - 36px));
  padding: 10px 16px;
  border-radius: 5px;
  background: rgba(31, 34, 38, 0.9);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(50%, 0);
}

.toast.copy-success {
  right: 50%;
  bottom: 50%;
  display: grid;
  width: 116px;
  height: 86px;
  padding: 13px 8px;
  place-content: center;
  gap: 7px;
  border-radius: 4px;
  background: rgba(32, 34, 38, 0.82);
  font-size: 13px;
  text-align: center;
  transform: translate(50%, 50%);
}

.toast.copy-success::before {
  display: block;
  color: #fff;
  content: "✓";
  font-size: 29px;
  line-height: 1;
}

.touch-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.spacer-8 { height: 8px; }

.header-preview {
  min-width: 54px;
  height: 34px;
  margin-right: 6px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 13px;
  cursor: pointer;
}

.material-editor-page .page-header {
  grid-template-columns: 42px minmax(0, 1fr) 42px;
}

.material-tabs .tab-button {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.material-tabs .tab-button span {
  line-height: 1.25;
  overflow-wrap: anywhere;
}

@media (max-width: 360px) {
  .material-tabs .tab-button {
    min-height: 54px;
    flex-direction: column;
    gap: 2px;
    padding: 4px 2px;
    font-size: 11px;
  }
}

.material-tabs .tab-button small {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  place-items: center;
  border-radius: 9px;
  background: #f1f3f5;
  color: #777d84;
  font-size: 10px;
  font-weight: 500;
}

.material-tabs .tab-button.active small {
  background: #fff0f1;
  color: var(--red);
}

.material-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 7px;
}

.material-search-row > button {
  border: 0;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.manager-toolbar .outline-button {
  gap: 5px;
}

.manager-toolbar .outline-button svg {
  width: 14px;
  height: 14px;
}

.issue-summary {
  display: flex;
  width: 100%;
  gap: 12px;
  align-items: center;
  margin-left: 0;
  color: #7a8087;
  font-size: 11px;
  line-height: 1.5;
}

.issue-summary b {
  color: var(--red);
  font-weight: 500;
}

.batch-toolbar {
  min-height: 48px;
  align-items: center;
}

.batch-toolbar strong {
  font-size: 12px;
}

.batch-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.batch-check input,
.material-select input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--red);
}

.text-button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 12px;
  cursor: pointer;
}

.managed-material-list {
  background: #fff;
}

.managed-material-card {
  grid-template-columns: 50px minmax(0, 1fr);
  transition: background 140ms ease;
}

.managed-material-card.selectable {
  grid-template-columns: 24px 50px minmax(0, 1fr);
  align-items: start;
}

.managed-material-card.selected {
  background: #fff7f7;
}

.material-select {
  display: grid;
  min-height: 46px;
  place-items: center;
}

.managed-card-main {
  min-width: 0;
}

.managed-card-head {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: #8a9096;
  font-size: 11px;
}

.material-status {
  display: inline-flex;
  min-height: 21px;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 7px;
  border-radius: 3px;
  background: #f1f3f5;
  color: #687078;
  font-size: 10px;
  font-weight: 600;
}

.material-status.published {
  background: #e8f7ef;
  color: #168258;
}

.material-status.hit {
  background: #ffecee;
  color: #cf2029;
}

.material-status.draft {
  background: #edf3fb;
  color: #3275b9;
}

.material-status.offline,
.material-status.missed {
  background: #fff0f1;
  color: #cb343d;
}

.managed-time {
  margin-top: 5px;
  color: #a0a5aa;
  font-size: 10px;
}

.managed-actions {
  flex-wrap: wrap;
}

.managed-actions button.danger,
.owned-expert-actions button.danger {
  border-color: #f0c7ca;
  color: #bd3e46;
}

.batch-action-bar {
  position: fixed;
  z-index: 32;
  right: max(0px, calc((100vw - 432px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 432px) / 2));
  display: flex;
  max-width: 432px;
  min-height: 62px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid #e6e9ec;
  background: #fff;
  box-shadow: 0 -5px 16px rgba(25, 30, 38, 0.08);
  font-size: 13px;
}

.batch-action-bar button {
  min-width: 112px;
  height: 40px;
  border: 0;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  cursor: pointer;
}

.batch-action-bar button:disabled {
  background: #d9dde1;
  cursor: default;
}

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

.batch-status-actions button {
  min-width: 82px;
}

.batch-status-actions button:first-child:not(:disabled) {
  border: 1px solid var(--red);
  background: #fff;
  color: var(--red);
}

.material-form {
  gap: 9px;
  padding: 10px 10px 0;
  background: var(--canvas);
}

.recording-material-form {
  gap: 0;
}

.recording-material-fields {
  display: grid;
  gap: 20px;
  padding: 22px 14px 24px;
  background: #fff;
}

.recording-material-fields .category-grid {
  grid-template-columns: auto;
}

.recording-material-fields .field textarea {
  min-height: 112px;
}

.material-delivery-section,
.material-result-section {
  margin-top: 0;
}

.material-result-grid {
  display: grid;
  gap: 17px;
}

.material-result-section textarea {
  min-height: 88px;
}

.form-actions.recording-form-actions {
  position: static;
  display: flex;
  min-height: 92px;
  justify-content: center;
  gap: 18px;
  margin: 0;
  padding: 28px 10px 20px;
  border: 0;
  background: var(--canvas);
  box-shadow: none;
}

.form-actions.recording-form-actions .form-action {
  width: auto;
  min-width: 96px;
  flex: 0 0 auto;
  height: 44px;
  border-color: #b8d8f7;
  border-radius: 2px;
  color: var(--blue);
}

.form-actions.recording-form-actions .form-action.primary {
  min-width: 116px;
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.editor-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 13px;
  border-left: 3px solid var(--red);
  background: #fff;
}

.editor-summary strong,
.editor-summary small {
  display: block;
}

.editor-summary strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-summary small {
  margin-top: 4px;
  color: #93999f;
  font-size: 10px;
}

.editor-navigation {
  display: grid;
  min-height: 42px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: #fff;
}

.editor-navigation button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: #52585f;
  font-size: 12px;
  cursor: pointer;
}

.editor-navigation button:last-child {
  border-left: 1px solid var(--line);
}

.editor-navigation button:first-child {
  border-right: 1px solid var(--line);
}

.editor-navigation button:disabled {
  color: #c0c4c8;
  cursor: default;
}

.editor-navigation button svg {
  width: 14px;
  height: 14px;
}

.editor-navigation span {
  padding: 0 10px;
  color: #92989e;
  font-size: 10px;
}

.form-section {
  display: grid;
  gap: 17px;
  padding: 15px 13px 18px;
  background: #fff;
}

.form-section > header {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.form-section > header > span {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 4px;
  background: #fff0f1;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
}

.form-section > header strong,
.form-section > header small {
  display: block;
}

.form-section > header strong {
  font-size: 14px;
}

.form-section > header small {
  margin-top: 2px;
  color: #969ca2;
  font-size: 10px;
}

.field > small {
  color: #989ea4;
  font-size: 10px;
  line-height: 1.5;
}

.field > small:has([data-title-count]),
.field > small:has([data-content-count]) {
  justify-self: end;
  margin-top: -5px;
}

.form-split {
  display: grid;
  gap: 17px;
}

.category-grid {
  max-width: 220px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.money-field,
.tag-input {
  display: grid;
  min-height: 42px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  border: 1px solid #e7e9ec;
  border-radius: 3px;
  background: #fff;
}

.money-field > span,
.tag-input > svg {
  justify-self: center;
  color: #81878d;
}

.tag-input > svg {
  width: 16px;
  height: 16px;
}

.money-field input,
.tag-input input {
  min-height: 40px;
  border: 0;
}

.money-field:focus-within,
.tag-input:focus-within {
  border-color: #e7969b;
}

.upload-zone {
  display: grid;
  min-height: 92px;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 1px dashed #e9aeb2;
  border-radius: 5px;
  background: #fffafa;
  color: #c93e47;
  cursor: pointer;
}

.upload-zone > svg {
  width: 30px;
  height: 30px;
}

.upload-zone strong,
.upload-zone small {
  display: block;
}

.upload-zone strong {
  font-size: 13px;
}

.upload-zone small {
  margin-top: 4px;
  color: #8a9096;
  font-size: 10px;
  line-height: 1.5;
}

.upload-zone input,
.avatar-upload input,
.image-upload input,
.banner-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.attachment-list {
  display: grid;
  gap: 7px;
}

.attachment-summary {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 1px 4px;
}

.attachment-summary > span,
.attachment-summary strong,
.attachment-summary small {
  display: block;
  min-width: 0;
}

.attachment-summary strong {
  font-size: 12px;
}

.attachment-summary small,
.upload-file-meta {
  margin-top: 3px;
  color: #8f969d;
  font-size: 10px;
}

.attachment-summary button {
  min-width: 42px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #efc8ca;
  border-radius: 3px;
  background: #fff;
  color: #d83b43;
  font-size: 11px;
  cursor: pointer;
}

.upload-file-meta {
  display: block;
  overflow: hidden;
  max-width: 240px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-file-meta.upload-error {
  color: #c52f38;
}

.attachment-empty {
  padding: 11px;
  background: #f7f8f9;
  color: #9ba0a6;
  font-size: 11px;
  text-align: center;
}

.attachment-row {
  display: grid;
  min-height: 54px;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 7px 7px 7px 9px;
  border: 1px solid var(--line);
  background: #fff;
}

.attachment-row.attachment-saving {
  border-color: #c9d8e7;
  background: #f8fbfe;
}

.attachment-row.attachment-failed {
  border-color: #efb9bd;
  background: #fff8f8;
}

.attachment-row.attachment-failed small {
  color: #c23a42;
}

.attachment-row img,
.attachment-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 3px;
  background: #f1f4f7;
  object-fit: cover;
  color: #67809a;
}

.attachment-icon svg {
  width: 18px;
  height: 18px;
}

.attachment-row strong,
.attachment-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-row strong {
  font-size: 12px;
}

.attachment-row small {
  margin-top: 4px;
  color: #92989e;
  font-size: 10px;
  line-height: 1.45;
  white-space: normal;
}

.attachment-row button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: #93999f;
  cursor: pointer;
}

.attachment-row-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}

.attachment-row-actions button[data-action="preview-draft-file"] {
  color: #55718b;
}

.attachment-row-actions button[data-action="retry-material-file"] {
  color: #c23a42;
}

.attachment-row button svg {
  width: 17px;
  height: 17px;
}

.form-actions {
  position: sticky;
  z-index: 22;
  bottom: 0;
  display: grid;
  min-height: 68px;
  grid-template-columns: minmax(72px, .75fr) 1fr 1.2fr;
  gap: 7px;
  align-items: center;
  margin: 0 -10px;
  padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid #e3e6e9;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -5px 18px rgba(28, 34, 42, 0.08);
}

.form-action {
  display: inline-flex;
  min-width: 0;
  height: 42px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid #e7a5aa;
  border-radius: 4px;
  background: #fff;
  color: #c93e47;
  font-size: 12px;
  cursor: pointer;
}

.form-action svg {
  width: 16px;
  height: 16px;
}

.form-action.primary {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.form-action.preview {
  border-color: #dce1e5;
  color: #50575e;
}

.owned-expert-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #eceff2;
}

.owned-expert-summary > div {
  display: grid;
  min-height: 72px;
  place-content: center;
  gap: 5px;
  background: #fff;
  text-align: center;
}

.owned-expert-summary span {
  color: #858b91;
  font-size: 11px;
}

.owned-expert-summary strong {
  color: #cf343d;
  font-size: 19px;
}

.owned-expert-list {
  display: grid;
  background: #fff;
}

.owned-expert-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 13px 11px;
  border-bottom: 1px solid var(--line);
}

.owned-expert-card .avatar {
  width: 50px;
  height: 50px;
}

.owned-expert-main {
  min-width: 0;
}

.owned-expert-main > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.owned-expert-main strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owned-expert-main > b {
  display: block;
  margin-top: 5px;
  color: var(--red);
  font-size: 13px;
}

.owned-expert-main p,
.owned-expert-main small {
  display: block;
  overflow: hidden;
  margin: 5px 0 0;
  color: #6e747a;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owned-expert-main small {
  color: #a0a5aa;
}

.expert-online {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 3px;
  background: #e9f7ef;
  color: #178158;
  font-size: 9px;
}

.expert-online.offline {
  background: #f1f2f4;
  color: #7d8389;
}

.owned-expert-actions {
  display: grid;
  gap: 7px;
}

.owned-expert-actions button {
  min-width: 48px;
  height: 28px;
  border: 1px solid #e6a0a5;
  border-radius: 3px;
  background: #fff;
  color: #cc3d46;
  font-size: 11px;
  cursor: pointer;
}

.hit-description-list {
  display: grid;
  background: #fff;
}

.hit-description-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 13px 11px;
  border-bottom: 1px solid var(--line);
}

.hit-description-card > div:first-child {
  display: grid;
  min-width: 0;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.hit-description-card .result-seal {
  position: static;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid #dc555e;
  border-radius: 50%;
  color: #cf3942;
  font-size: 13px;
  transform: rotate(-8deg);
}

.hit-description-card strong,
.hit-description-card p,
.hit-description-card small {
  display: block;
}

.hit-description-card strong {
  font-size: 13px;
}

.hit-description-card p {
  margin: 4px 0;
  color: #646b72;
  font-size: 11px;
  line-height: 1.5;
}

.hit-description-card small {
  color: #9aa0a6;
  font-size: 10px;
}

.hit-description-card > div:last-child {
  display: grid;
  gap: 7px;
}

.hit-description-card > div:last-child button {
  min-width: 48px;
  height: 28px;
  border: 1px solid #e8a5aa;
  border-radius: 3px;
  background: #fff;
  color: #ca3d46;
  font-size: 11px;
  cursor: pointer;
}

.hit-description-card > div:last-child button.danger {
  border-color: #e1e4e7;
  color: #777d83;
}

.expert-form {
  gap: 18px;
}

.avatar-upload {
  display: inline-grid;
  width: 82px;
  gap: 5px;
  justify-items: center;
  color: #777d83;
  cursor: pointer;
}

.avatar-upload img,
.avatar-upload > span {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border: 1px dashed #d8dde2;
  border-radius: 7px;
  background: #f5f7f8;
  object-fit: cover;
  color: #8e959c;
}

.avatar-upload > span svg {
  width: 25px;
  height: 25px;
}

.avatar-upload small {
  font-size: 10px;
}

.switch-row {
  padding: 12px;
  border: 1px solid var(--line);
}

.toggle-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
}

.toggle-switch > span {
  position: relative;
  width: 43px;
  height: 24px;
  border-radius: 12px;
  background: #d9dde1;
  transition: background 150ms ease;
}

.toggle-switch > span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  content: "";
  transition: transform 150ms ease;
}

.toggle-switch input:checked + span {
  background: #2eaa77;
}

.toggle-switch input:checked + span::after {
  transform: translateX(19px);
}

.toggle-switch b {
  font-size: 12px;
  font-weight: 500;
}

.expert-form-actions {
  grid-template-columns: 1fr 1.5fr;
  margin: 0;
}

.settings-upload-grid {
  display: grid;
  gap: 18px;
}

.image-upload,
.banner-upload {
  position: relative;
  display: inline-grid;
  width: max-content;
  gap: 6px;
  color: #777d83;
  cursor: pointer;
}

.image-upload > span,
.banner-upload > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 10px;
}

.image-upload > span svg,
.banner-upload > span svg {
  width: 13px;
  height: 13px;
}

.banner-upload img {
  width: 180px;
  aspect-ratio: 16 / 6;
  border-radius: 4px;
  object-fit: cover;
}

.text-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: #f2f3f5;
  color: #727981;
  font-size: 17px;
  font-weight: 600;
}

.ui-overlay {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  padding: 18px 10px;
  place-items: center;
  background: rgba(20, 23, 28, 0.52);
}

.ui-dialog {
  display: grid;
  width: min(100%, 410px);
  max-height: min(860px, calc(100dvh - 36px));
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 18px 52px rgba(16, 20, 28, 0.24);
}

.dialog-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
}

.dialog-header h2 {
  margin: 3px 0 0;
  font-size: 17px;
}

.dialog-eyebrow {
  color: #8e949a;
  font-size: 10px;
}

.dialog-header button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: #777d83;
  cursor: pointer;
}

.material-preview {
  overflow-y: auto;
  padding: 14px;
}

.preview-expert {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 11px;
  background: #fff4f4;
}

.preview-expert .avatar {
  width: 46px;
  height: 46px;
}

.preview-expert strong,
.preview-expert small {
  display: block;
}

.preview-expert strong {
  font-size: 14px;
}

.preview-expert small {
  margin-top: 4px;
  color: #777d83;
  font-size: 10px;
}

.preview-expert > b {
  color: var(--red);
  font-size: 14px;
}

.material-preview > h3 {
  margin: 15px 0 7px;
  font-size: 16px;
  line-height: 1.55;
}

.preview-meta {
  display: flex;
  justify-content: space-between;
  color: #92989e;
  font-size: 10px;
}

.preview-meta span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.preview-meta svg {
  width: 13px;
  height: 13px;
}

.material-preview section {
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.material-preview section p,
.preview-paid-content {
  margin: 10px 0 0;
  color: #555c63;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.preview-paid-content {
  padding: 12px;
  background: #fff7f7;
  color: #b8323b;
}

.preview-attachments {
  display: grid;
  gap: 7px;
  margin-top: 17px;
}

.preview-attachments > strong {
  font-size: 13px;
}

.preview-attachments > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: #697078;
  font-size: 11px;
}

.preview-attachments > span > span,
.preview-attachments b,
.preview-attachments small {
  display: block;
  min-width: 0;
}

.preview-attachments > span > span {
  overflow: hidden;
}

.preview-attachments b {
  overflow: hidden;
  color: #4d555d;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-attachments small {
  margin-top: 2px;
  color: #92989e;
  font-size: 10px;
}

.preview-attachments svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  background: #f8f9fa;
}

.dialog-footer button {
  min-width: 92px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid #dfe3e6;
  border-radius: 4px;
  background: #fff;
  color: #555c63;
  font-size: 12px;
  cursor: pointer;
}

.dialog-footer .dialog-primary {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

@media (max-width: 370px) {
  .material-card {
    grid-template-columns: 47px minmax(0, 1fr);
    gap: 8px;
    padding-right: 60px;
    padding-left: 8px;
  }

  .material-thumb {
    width: 43px;
    height: 43px;
  }

  .material-title {
    font-size: 14px;
  }

  .expert-row {
    grid-template-columns: 23px 44px minmax(0, 1fr) auto;
    gap: 6px;
    padding-right: 8px;
  }

  .expert-row .avatar {
    width: 43px;
    height: 43px;
  }

  .expert-action {
    display: grid;
    justify-items: end;
    gap: 4px;
  }

  .follow-button {
    min-height: 28px;
    padding: 0 8px;
  }

  .radio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .managed-material-card.selectable {
    grid-template-columns: 22px 43px minmax(0, 1fr);
    gap: 6px;
  }

  .owned-expert-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .owned-expert-card .avatar {
    width: 43px;
    height: 43px;
  }

  .owned-expert-actions {
    grid-column: 2;
    grid-auto-flow: column;
    justify-content: end;
  }

  .issue-summary {
    width: 100%;
    margin-left: 0;
    line-height: 1.5;
}

}

.editor-floating-nav {
  position: fixed;
  z-index: 28;
  right: max(16px, calc((100vw - 432px) / 2 + 16px));
  bottom: calc(72px + env(safe-area-inset-bottom));
  display: grid;
  gap: 8px;
}

.editor-floating-nav button {
  display: grid;
  width: 54px;
  height: 54px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(255, 112, 99, 0.28);
}

@media (max-width: 699px) {
  .material-manager-page > .batch-action-bar {
    position: sticky;
    right: auto;
    bottom: 0;
    left: auto;
    max-width: none;
    margin: 0;
  }

}

@media (min-width: 700px) {
  body {
    padding: 24px 0;
  }

  .app-shell {
    min-height: calc(100dvh - 48px);
    border-radius: 8px;
  }

  .page {
    min-height: calc(100dvh - 48px);
  }

  .bottom-nav {
    bottom: 24px;
    border-radius: 0 0 8px 8px;
  }

  .floating-back {
    bottom: 96px;
  }

  .editor-floating-nav {
    bottom: 96px;
  }

  .sticky-action-wrap {
    bottom: 32px;
  }
}

/* Customer ownership, visit audit, and the single promotion entry. */
.customer-visit-page {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.customer-visit-page .content-pad,
.customer-section,
.visit-section {
  width: min(100%, 980px);
  margin-right: auto;
  margin-left: auto;
}

.customer-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.customer-stats .stat-item {
  min-width: 0;
  padding: 12px 8px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.customer-stats .stat-item:last-child {
  border-right: 0;
}

.customer-stats span,
.customer-stats strong {
  display: block;
}

.customer-stats span {
  color: #858c93;
  font-size: 9px;
}

.customer-stats strong {
  margin-top: 5px;
  color: #353b42;
  font-size: 16px;
}

.upgrade-mode-banner,
.upgrade-review-note {
  display: grid;
  min-width: 0;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid #cae1d7;
  border-radius: 5px;
  background: #f2faf6;
  color: #31745a;
}

.upgrade-mode-banner {
  margin-top: 9px;
  padding: 10px 11px;
}

.upgrade-review-note {
  padding: 10px;
}

.upgrade-mode-banner.review,
.upgrade-review-note.review {
  border-color: #ead9aa;
  background: #fff9e9;
  color: #8a6819;
}

.upgrade-mode-banner svg,
.upgrade-review-note svg {
  width: 17px;
  height: 17px;
  margin-top: 1px;
}

.upgrade-mode-banner strong,
.upgrade-mode-banner span,
.upgrade-review-note strong,
.upgrade-review-note span {
  display: block;
  min-width: 0;
}

.upgrade-mode-banner strong,
.upgrade-review-note strong {
  margin-bottom: 3px;
  color: inherit;
  font-size: 11px;
}

.upgrade-mode-banner span,
.upgrade-review-note span {
  font-size: 9px;
  line-height: 1.55;
}

.customer-section,
.visit-section {
  margin-top: 12px;
  background: #fff;
}

.section-heading {
  display: flex;
  min-width: 0;
  padding: 12px 11px 9px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2,
.section-heading p {
  margin: 0;
}

.section-heading h2 {
  color: #343a40;
  font-size: 14px;
}

.section-heading p,
.section-heading > span {
  color: #8b9299;
  font-size: 9px;
}

.section-heading p {
  margin-top: 4px;
}

.section-heading > span {
  flex: 0 0 auto;
}

.customer-section .list-page-header,
.visit-section .list-page-header {
  padding-top: 9px;
  padding-bottom: 9px;
}

.customer-list {
  display: grid;
}

.customer-card {
  display: grid;
  min-width: 0;
  padding: 11px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.customer-card .avatar {
  width: 44px;
  height: 44px;
}

.customer-card-main,
.customer-card-main > div {
  min-width: 0;
}

.customer-card-main > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.customer-card-main strong,
.customer-card-main span,
.customer-card-main p,
.customer-card-main small {
  display: block;
  overflow-wrap: anywhere;
}

.customer-card-main strong {
  color: #353b42;
  font-size: 12px;
}

.customer-card-main span,
.customer-card-main small {
  color: #92989e;
  font-size: 8px;
}

.customer-card-main p {
  margin: 4px 0 3px;
  color: #646c73;
  font-size: 9px;
}

.customer-card-action {
  display: flex;
  justify-content: flex-end;
}

.small-button.promote,
.record-side .small-button {
  min-height: 31px;
  padding: 0 9px;
  border: 1px solid #e2b5b8;
  border-radius: 4px;
  background: #fff7f7;
  color: #c4444d;
  font-size: 9px;
  white-space: nowrap;
  cursor: pointer;
}

.record-side .small-button.blocked {
  border-color: #cfd5da;
  background: #f5f6f7;
  color: #626a72;
}

.customer-upgrade-status {
  display: inline-flex;
  min-height: 26px;
  padding: 0 7px;
  align-items: center;
  border-radius: 3px;
  background: #eef8f3;
  color: #2e7e5d;
  font-size: 8px;
  white-space: nowrap;
}

.customer-upgrade-status.pending {
  background: #fff7df;
  color: #896613;
}

.customer-upgrade-status.disabled {
  background: #f1f3f4;
  color: #747b82;
}

.visit-section .record-row {
  min-width: 0;
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.record-main small {
  color: #939aa0;
  font-size: 8px;
}

.customer-upgrade-form {
  display: grid;
  overflow-y: auto;
  padding: 14px;
  gap: 13px;
}

.customer-upgrade-identity {
  display: grid;
  min-width: 0;
  padding: 10px;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  background: #f7f8f9;
}

.customer-upgrade-identity .avatar {
  width: 44px;
  height: 44px;
}

.customer-upgrade-identity strong,
.customer-upgrade-identity span {
  display: block;
  overflow-wrap: anywhere;
}

.customer-upgrade-identity strong {
  font-size: 12px;
}

.customer-upgrade-identity span {
  margin-top: 4px;
  color: #858d94;
  font-size: 9px;
}

.customer-upgrade-form > label {
  display: grid;
  gap: 6px;
  color: #4d555c;
  font-size: 10px;
}

.customer-upgrade-form > label small {
  color: #8b9298;
  font-size: 9px;
  line-height: 1.45;
}

.promotion-dialog-body {
  display: grid;
  overflow-y: auto;
  padding: 17px 16px;
  justify-items: center;
  gap: 12px;
}

.promotion-qr-frame {
  display: grid;
  width: 244px;
  height: 244px;
  padding: 12px;
  place-items: center;
  border: 1px solid #e2e5e8;
  background: #fff;
}

.promotion-qr-frame canvas,
.promotion-qr-frame img {
  display: block;
  width: 220px !important;
  height: 220px !important;
}

.promotion-qr-error {
  color: #a63a42;
  font-size: 11px;
}

.promotion-identity {
  text-align: center;
}

.promotion-identity strong,
.promotion-identity span {
  display: block;
}

.promotion-identity strong {
  color: #343a40;
  font-size: 14px;
}

.promotion-identity span {
  margin-top: 4px;
  color: #858d94;
  font-size: 10px;
}

.promotion-link-field {
  display: grid;
  width: 100%;
  gap: 6px;
  color: #626a71;
  font-size: 9px;
}

.promotion-link-field input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 9px;
  border: 1px solid #dfe3e6;
  border-radius: 4px;
  background: #f7f8f9;
  color: #4f575e;
  font-size: 9px;
}

.promotion-dialog-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.promotion-dialog-actions svg {
  width: 14px;
  height: 14px;
}

@media (min-width: 900px) {
  .customer-list,
  .visit-section .records-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--line);
  }

  .customer-card,
  .visit-section .record-row {
    border-bottom: 0;
    background: #fff;
  }
}

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

  .customer-stats .stat-item:nth-child(2) {
    border-right: 0;
  }

  .customer-stats .stat-item:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .customer-card {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .customer-card .avatar {
    width: 40px;
    height: 40px;
  }

  .customer-card-action {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 370px) {
  .promotion-qr-frame {
    width: 224px;
    height: 224px;
    padding: 10px;
  }

  .promotion-qr-frame canvas,
  .promotion-qr-frame img {
    width: 204px !important;
    height: 204px !important;
  }

  .promotion-dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .promotion-dialog-actions button {
    min-width: 0;
    padding-right: 7px;
    padding-left: 7px;
  }
}

@media (min-width: 900px) {
  .app-shell {
    width: min(calc(100% - 48px), 1120px);
  }

  .bottom-nav {
    width: min(calc(100% - 48px), 1120px);
  }

  .home-stack {
    display: grid;
    max-width: 1080px;
    grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.35fr);
    gap: 12px;
    margin: 0 auto;
    padding: 16px 18px 84px;
    align-items: start;
  }

  .home-announcement {
    grid-column: 1;
    grid-row: 1;
  }

  .home-banner {
    grid-column: 1;
    grid-row: 2;
  }

  .home-stack > .expert-grid {
    grid-column: 1;
    grid-row: 3 / span 2;
  }

  .home-stack > .notice-strip {
    grid-column: 2;
    grid-row: 1;
  }

  .home-stack > .section-toolbar {
    grid-column: 2;
    grid-row: 2;
  }

  .home-stack > .material-list {
    grid-column: 2;
    grid-row: 3 / span 5;
  }

  .page:not(.page-home) > .expert-list,
  .page:not(.page-home) > .material-list,
  .page:not(.page-home) > .records-list,
  .page:not(.page-home) > .withdrawal-list,
  .page:not(.page-home) > .agent-list {
    display: grid;
    max-width: 980px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0 auto;
    background: var(--line);
  }

  .page > .list-page-header,
  .page > .tabs,
  .page > .manager-toolbar,
  .page > .subnav-row,
  .page > .frozen-note,
  .page > .metric-grid,
  .page > .distribution-hero,
  .page > .payout-summary,
  .page > .owned-expert-summary {
    max-width: 980px;
    margin-right: auto;
    margin-left: auto;
  }

  .profile-hero,
  .order-shortcuts,
  .menu-list {
    max-width: 820px;
    margin-right: auto;
    margin-left: auto;
  }

  .managed-material-list,
  .owned-expert-list {
    display: grid;
    max-width: 980px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin: 0 auto;
    background: var(--line);
  }

  .managed-material-card,
  .owned-expert-card {
    border-bottom: 0;
  }

  .material-form,
  .expert-form,
  .settings-block,
  .withdraw-form {
    max-width: 900px;
    margin: 14px auto 0;
  }

  .settings-block {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
  }

  .settings-block > .settings-upload-grid,
  .settings-block > .field,
  .settings-block > .submit-green {
    grid-column: 1 / -1;
  }

  .settings-block > .binary-row {
    padding: 12px 14px;
    border: 1px solid var(--line);
    background: #fafbfc;
  }

  .settings-block > .submit-green {
    min-width: 132px;
    justify-self: center;
  }

  .form-split,
  .settings-upload-grid,
  .material-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-section {
    padding: 18px 22px 21px;
  }

  .form-actions {
    margin-right: -10px;
    margin-left: -10px;
    padding-right: 22px;
    padding-left: 22px;
  }

  .sticky-action-wrap {
    right: calc((100vw - min(calc(100vw - 48px), 1120px)) / 2 + 70px);
    left: calc((100vw - min(calc(100vw - 48px), 1120px)) / 2 + 70px);
    max-width: 980px;
  }

  .batch-action-bar {
    right: calc((100vw - min(calc(100vw - 48px), 1120px)) / 2 + 70px);
    left: calc((100vw - min(calc(100vw - 48px), 1120px)) / 2 + 70px);
    max-width: 980px;
    bottom: 24px;
  }

  .floating-back {
    right: calc((100vw - min(calc(100vw - 48px), 1120px)) / 2 + 20px);
  }

  .editor-floating-nav {
    right: calc((100vw - min(calc(100vw - 48px), 1120px)) / 2 + 20px);
  }

  .ui-dialog {
    width: min(680px, calc(100vw - 48px));
  }

  .material-preview {
    padding: 18px 22px;
  }

  .detail-hero,
  .detail-body,
  .expert-home-hero,
  .expert-history,
  .legal-content,
  .settings-menu {
    max-width: 820px;
    margin-right: auto;
    margin-left: auto;
  }
}

/* Current workflow additions: draw sync, permission state, and purchased-material locks. */
.latest-draw-card {
  display: grid;
  margin: 8px 10px;
  overflow: hidden;
  border: 1px solid #e6eaed;
  border-radius: 6px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  outline: none;
}

.latest-draw-card:focus-visible {
  border-color: #e57980;
  box-shadow: 0 0 0 3px rgba(237, 21, 28, 0.14);
}

.latest-draw-card > header,
.latest-draw-card > footer {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.latest-draw-card > header {
  min-height: 40px;
  padding: 8px 11px;
  border-bottom: 1px solid #edf0f2;
}

.latest-draw-card > header > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  color: #424a52;
  font-size: 12px;
}

.latest-draw-card > header > span svg {
  width: 15px;
  height: 15px;
  color: var(--red);
}

.latest-draw-card > header strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-draw-card > header > b {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 650;
}

.draw-verification-status {
  display: inline-flex;
  min-height: 22px;
  padding: 0 7px;
  align-items: center;
  border: 1px solid #c9ddd4;
  border-radius: 3px;
  background: #f1faf6;
  color: #25845e;
  white-space: nowrap;
}

.draw-verification-status.demo {
  border-color: #eddba6;
  background: #fff9e8;
  color: #8b6710;
}

.latest-draw-main {
  display: grid;
  padding: 12px 11px;
  grid-template-columns: minmax(78px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  background: #fffafa;
}

.latest-draw-main > div:first-child {
  display: grid;
  gap: 4px;
}

.latest-draw-main > div:first-child span {
  color: #444b52;
  font-size: 12px;
  font-weight: 650;
}

.latest-draw-main > div:first-child small {
  color: #8c949b;
  font-size: 10px;
}

.draw-number-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
}

.draw-number-row b {
  display: inline-grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  border: 1px solid #dfe4e8;
  border-radius: 50%;
  background: #fff;
  color: #39434b;
  font-size: 11px;
  font-weight: 700;
}

.draw-number-row b.special {
  border-color: #eba5aa;
  background: #fff0f1;
  color: #cf3039;
}

.draw-number-row i {
  color: #a1a7ac;
  font-size: 12px;
  font-style: normal;
}

.latest-draw-card > footer {
  min-height: 33px;
  padding: 7px 11px;
  border-top: 1px solid #edf0f2;
  color: #90979e;
  font-size: 9px;
}

.draw-source-meta {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.latest-draw-card > footer .draw-source-meta span {
  overflow: hidden;
  color: #4b866e;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draw-source-meta small {
  color: #9a7b2c;
  font-size: 9px;
  line-height: 1.35;
}

.latest-draw-card > footer time {
  flex: 0 0 auto;
  white-space: nowrap;
}

.draw-card-trailing {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 4px;
}

.draw-history-entry {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #cf3039;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.draw-history-entry svg {
  width: 13px;
  height: 13px;
}

.draw-history-page {
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

.draw-history-summary {
  display: flex;
  min-width: 0;
  padding: 14px 12px 10px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e7eaed;
  background: #fff;
}

.draw-history-summary > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.draw-history-summary strong {
  overflow: hidden;
  color: #252b30;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draw-history-summary span,
.draw-history-summary small {
  color: #858d95;
  font-size: 11px;
}

.draw-history-summary small {
  flex: 0 0 auto;
  text-align: right;
}

.draw-history-notice {
  display: grid;
  margin: 9px 10px 0;
  padding: 9px 10px;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  border: 1px solid #eddba6;
  border-radius: 5px;
  background: #fff9e8;
  color: #775a12;
  font-size: 11px;
  line-height: 1.5;
}

.draw-history-notice svg {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.draw-history-list {
  display: grid;
  max-width: 820px;
  margin: 9px auto 0;
  padding: 0 10px;
  gap: 8px;
}

.draw-history-card {
  display: grid;
  min-width: 0;
  padding: 11px;
  gap: 11px;
  border: 1px solid #e3e7ea;
  border-radius: 6px;
  background: #fff;
}

.draw-history-card > header,
.draw-history-card > footer {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.draw-history-card > header > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}

.draw-history-card > header strong {
  color: #252b30;
  font-size: 14px;
}

.draw-history-card > header time,
.draw-history-card > footer {
  color: #8c949b;
  font-size: 10px;
}

.draw-history-card > header > span {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}

.draw-history-card > header em {
  padding: 2px 5px;
  border-radius: 3px;
  background: #ed151c;
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 650;
}

.draw-history-card .draw-number-row {
  justify-content: flex-start;
}

.draw-history-card > footer {
  padding-top: 8px;
  border-top: 1px solid #eef0f2;
}

.draw-history-card > footer span {
  min-width: 0;
  overflow: hidden;
  color: #4b866e;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draw-history-card > footer time {
  flex: 0 0 auto;
  white-space: nowrap;
}

.official-draw-inline {
  display: grid;
  margin-top: 9px;
  padding: 9px 10px;
  gap: 7px;
  border: 1px solid #e6eaed;
  border-radius: 4px;
  background: #fafbfc;
}

.official-draw-inline .draw-number-row {
  justify-content: flex-start;
}

.official-draw-inline .draw-number-row b {
  width: 23px;
  height: 23px;
  flex-basis: 23px;
  font-size: 9px;
}

.official-draw-inline small,
.official-draw-inline time {
  overflow-wrap: anywhere;
  color: #858d95;
  font-size: 9px;
  line-height: 1.4;
}

.admin-controlled-label {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  color: #858c93;
  font-size: 10px;
  line-height: 1.45;
}

.admin-controlled-label::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: #aab1b7;
  content: "";
}

.managed-material-card.content-locked {
  background: #fffdfd;
}

.managed-material-card.content-locked .managed-title {
  color: #5b6269;
}

.material-lock-note {
  display: grid;
  margin-top: 8px;
  padding: 8px 9px;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  border: 1px solid #f0d8da;
  border-radius: 4px;
  background: #fff7f7;
  color: #a13e46;
}

.material-lock-note > svg {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

.material-lock-note b,
.material-lock-note small {
  display: block;
}

.material-lock-note b {
  font-size: 10px;
}

.material-lock-note small {
  margin-top: 3px;
  color: #916b6f;
  font-size: 9px;
  line-height: 1.45;
}

.material-content-lock {
  min-height: calc(100dvh - 96px);
  margin: 10px;
  border: 1px solid #f0d8da;
  border-radius: 6px;
  background: #fffafa;
}

.material-content-lock > svg {
  color: #c9565d;
}

.material-content-lock strong {
  color: #4a3c3e;
}

.material-content-lock p {
  max-width: 360px;
}

.disclaimer-field {
  padding-top: 11px;
  border-top: 1px solid #f1f2f3;
}

@media (max-width: 520px) {
  .latest-draw-card {
    margin-right: 8px;
    margin-left: 8px;
  }

  .latest-draw-main {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .draw-number-row {
    justify-content: flex-start;
  }

  .latest-draw-card > footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .latest-draw-card > footer span,
  .latest-draw-card > footer time {
    max-width: 100%;
  }

  .draw-source-meta {
    width: 100%;
  }
}

@media (max-width: 370px) {
  .latest-draw-card {
    margin-right: 6px;
    margin-left: 6px;
  }

  .latest-draw-card > header {
    gap: 6px;
  }

  .latest-draw-card > header > span {
    font-size: 11px;
  }

  .draw-verification-status {
    min-height: 20px;
    padding-right: 6px;
    padding-left: 6px;
    font-size: 9px;
  }

  .draw-number-row {
    gap: 4px;
  }

  .draw-number-row b {
    width: 25px;
    height: 25px;
    flex-basis: 25px;
    font-size: 10px;
  }

  .agent-card .application-actions {
    align-items: stretch;
  }

  .agent-card .application-actions .agent-toggle {
    width: 100%;
  }
}

/* The manager header already provides Back; keep list actions in flow so no card controls are covered. */
.page.material-manager-page {
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}

.material-manager-page > .floating-back {
  display: none;
}

.material-manager-page > .sticky-action-wrap,
.material-manager-page > .batch-action-bar {
  position: sticky;
  right: auto;
  bottom: 0;
  left: auto;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 9px max(10px, calc((100% - 980px) / 2 + 10px)) calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid #e2e6e9;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -4px 14px rgba(25, 30, 38, 0.08);
}

.material-manager-page > .sticky-action-wrap .sticky-cta {
  max-width: 980px;
  margin: 0 auto;
}

@media (min-width: 700px) {
  .page.material-manager-page {
    padding-bottom: 76px;
  }

  .material-manager-page > .sticky-action-wrap,
  .material-manager-page > .batch-action-bar {
    bottom: 24px;
    padding-bottom: 9px;
  }
}

/* Keep customer upgrades and the single promotion entry bounded on small screens. */
.customer-upgrade-status.accepted,
.application-status-accepted {
  background: #eef8f3;
  color: #2e7e5d;
}

.promotion-dialog,
.customer-upgrade-dialog {
  max-width: calc(100vw - 20px);
}

.promotion-dialog .dialog-header > div,
.customer-upgrade-dialog .dialog-header > div,
.promotion-dialog-body,
.customer-upgrade-form,
.promotion-link-field {
  min-width: 0;
}

.promotion-dialog .dialog-header h2,
.customer-upgrade-dialog .dialog-header h2,
.customer-upgrade-form small,
.upgrade-review-note span {
  overflow-wrap: anywhere;
}

.promotion-qr-frame {
  width: min(246px, calc(100vw - 68px));
  height: min(246px, calc(100vw - 68px));
  aspect-ratio: 1;
  overflow: hidden;
}

.promotion-qr-frame canvas,
.promotion-qr-frame img {
  max-width: 100%;
  max-height: 100%;
}

@media (max-width: 420px) {
  .promotion-dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .promotion-dialog-actions button {
    min-width: 0;
    padding-right: 7px;
    padding-left: 7px;
    white-space: normal;
  }

  .customer-upgrade-dialog .dialog-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-upgrade-dialog .dialog-footer button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .draw-card-trailing {
    width: 100%;
    justify-items: start;
  }

  .draw-history-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .draw-history-summary small {
    text-align: left;
  }

  .draw-history-card > footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .draw-history-card > footer span,
  .draw-history-card > footer time {
    max-width: 100%;
  }
}

@media (max-width: 350px) {
  .draw-history-list {
    padding-right: 7px;
    padding-left: 7px;
  }

  .draw-history-card {
    padding-right: 9px;
    padding-left: 9px;
  }

  .draw-history-card > header > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}
