.language-overlay {
  background: rgba(43, 22, 58, .52);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.language-sheet {
  width: min(100%, 430px);
  height: 50vh;
  max-height: none;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  padding: 0 14px 12px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}
.language-sheet .lang-sheet-head {
  height: 49px;
  min-height: 49px;
  padding: 15px 0 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
}
.language-sheet .lang-sheet-head h2 {
  flex: 1;
  grid-column: auto;
  text-align: left;
  font-size: 16.8px;
  font-weight: 800;
  line-height: 24px;
  margin: 0;
  letter-spacing: 0;
}
.language-sheet .lang-sheet-head button {
  grid-column: auto;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  padding: 3px;
  border: 0;
  border-radius: 50%;
  background: #f1e7f8;
  color: #8a49b5;
  display: grid;
  place-items: center;
  transform: none;
}
.language-sheet .lang-sheet-head svg { width: 18px; height: 18px; }
.language-sheet .lang-sheet-body {
  display: block;
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 0 0 4px;
  scrollbar-width: thin;
}

/* Reference-aligned online service screen, using the local purple palette. */
.service-screen{min-height:100vh;background:#f5f1fb}
.service-head{height:68px;display:flex;align-items:center;justify-content:space-between;padding:0 12px;background:#fff;border-bottom:1px solid #eee8f5}
.service-head button,.service-head>span{width:40px;height:40px;border:0;border-radius:50%;display:grid;place-items:center;background:#eadcf8;color:#7b4bb1}
.service-head h1{margin:0;font-size:27px;line-height:1;font-weight:800;color:#342250;text-align:center;flex:1}
.service-head svg{width:22px;height:22px}
.service-page{min-height:calc(100vh - 68px);padding:17px 16px 32px;background:#f5f1fb}
.service-hero{padding:29px 20px 24px;border-radius:24px;background:linear-gradient(135deg,#9b67d0,#6838a0);color:#fff;text-align:center;box-shadow:0 12px 25px #6838a03d}
.service-icon{width:74px;height:74px;margin:0 auto 18px;border:1px solid #ffffff70;border-radius:50%;display:grid;place-items:center;background:#ffffff1f}
.service-icon svg{width:38px;height:38px}
.service-hero h2{margin:0;font-size:25px;line-height:1.2;color:#fff}
.service-status{display:inline-flex;align-items:center;gap:6px;margin-top:12px;padding:6px 14px;border-radius:99px;background:#8271b4;color:#dfffe9;font-size:14px;font-weight:700}
.service-status i{width:9px;height:9px;border-radius:50%;background:#43e68b}
.service-hero>p{margin:18px 0 22px;color:#eadcf8;font-size:14px;line-height:1.5}
.service-contact{width:100%;height:54px;border:0;border-radius:28px;background:#fff;color:#7043a7;font-size:20px;font-weight:800}
.service-card{display:flex;align-items:flex-start;gap:16px;margin-top:16px;padding:22px 20px;border-radius:22px;background:#fff;box-shadow:0 5px 15px #4a2b7a0a}
.service-card-icon{width:50px;height:50px;flex:0 0 50px;border-radius:16px;display:grid;place-items:center;background:#efe3fb;color:#7d4db5}
.service-card-icon svg{width:25px;height:25px}
.service-card h3{margin:0;color:#342250;font-size:19px;line-height:1.3}
.service-card p{margin:10px 0 0;color:#9c8db4;font-size:14px;line-height:1.6}
.service-notice{padding-bottom:24px}
.language-sheet .language-options button {
  width: 100%;
  min-height: 45px;
  margin: 0 0 8px;
  padding: 12.8px 12px;
  border: .667px solid transparent;
  border-radius: 12px;
  background: #f8f3fb;
  color: #302837;
  font-size: 15.75px;
  font-weight: 600;
  line-height: 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}
.language-sheet .language-options button.selected {
  min-height: 49px;
  border-color: #d9c3f5;
  background: #f5effa;
  color: #302837;
  font-weight: 800;
}
.language-sheet .language-options button svg {
  width: 22px;
  height: 22px;
  color: #8a49b5;
  flex: 0 0 22px;
}

/* Reference Mine page: balance spans the row; credit and frozen values share the next row. */
.page-mine .stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
.page-mine .mine-hero,.page-mine .mine-hero { padding: 14px 16px 18px; }
.page-mine .hero-top { min-height: 30px; }
.page-mine .identity { gap: 12px; margin-top: 16px; }
.page-mine .avatar { width: 48px; height: 48px; }
.page-mine .code { display: inline-flex; align-items: center; gap: 6px; padding: 2.4px 3px 2.4px 8px; }
.page-mine .copy-code { min-height: 22.4px; padding: 3.2px 8px; }
.page-mine .mine-body { padding-top: 14px; padding-bottom: 0; }
.page-mine .row { min-height: 56px; height: 56px; }
.page-mine .stat { padding: 12px; text-align: left; background: #ffffff24; border: 1px solid #fff3; border-radius: 14px; }
.page-mine .stat.main-stat { grid-column: 1 / -1; }
.page-mine .stat > span { margin: 0; background: #fff3; }
.page-mine .stat strong { margin-top: 8px; font-size: 21px; }
.page-mine .stat small { font-size: 11px; }
.page-mine .identity-copy { flex: 1; }
.page-mine .code { display: inline-flex; align-items: center; gap: 6px; width: max-content; margin-top: 4px; padding: 2.4px 3px 2.4px 8px; }
.page-mine .copy-code { min-height: 22.4px; padding: 3.2px 8px; border-radius: 12px; background: #fff; color: #7b45b3; }
.page-mine .copy-code svg { width: 13px; height: 13px; }
.page-mine .row { min-height: 55px; padding-top: 10px; padding-bottom: 10px; font-size: 15.75px; }
.page-mine .row .ico { width: 32px; height: 32px; }
.page-mine .logout { min-height: 43px; padding: 10px; }
.page-mine + .nav { height: 64px; }
.register-page .auth-body { padding-bottom: 36px; }
.registration-kyc { margin: 24px 0 18px; color: #fff; }
.registration-kyc h2 { margin: 0 0 8px; font-size: 18px; }
.registration-kyc p { font-size: 12px; line-height: 1.6; color: #e0d4ef; }
.registration-kyc .auth-field { margin-top: 14px; }
.registration-label { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; font-size: 13px; }
.registration-label[hidden] { display: none; }
.registration-label input, .registration-label select { width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 12px; border: 1px solid #ffffff35; border-radius: 10px; background: #ffffff12; color: #fff; font: inherit; color-scheme: dark; }
.registration-label option { background: #412b64; }
.registration-label output { overflow-wrap: anywhere; color: #e0d4ef; font-size: 12px; }

/* Reference palette: warm ivory, dusty rose, and sage green. */
:root{--warm-ivory:#FAF7F2;--dusty-rose:#C77B83;--sage:#879783;--ink:#3b3431;--rose-soft:#f2e1df;--sage-soft:#e3e9e1}
body{background:var(--warm-ivory);color:var(--ink)}
.shell,.page-lottery.shell,.lottery-page,.notification-page{background:var(--warm-ivory)}
.mine-hero{background:linear-gradient(135deg,#c77b83,#a96570);box-shadow:0 9px 24px #9d687044}
.primary,.date-her,.withdraw-submit{background:var(--dusty-rose);color:#fff}
.row .ico,.quick-nav span,.bank-icon,.status-card{background:var(--rose-soft);color:#a95f68}
.section-title,.page-lottery .vote-section-title{border-color:var(--dusty-rose)}
.nav button.active,.home-header button,.text-btn{color:var(--dusty-rose)}
.nav button.active:before{background:var(--dusty-rose)}
.notice-wrap{background:var(--sage-soft);color:#607362}
.tags small,.tags small:nth-child(2n),.tags small:nth-child(3n){background:var(--sage);color:#fff}
.profile-label,.profile-tags span{color:#6c806e}.profile-tags span{background:var(--sage-soft)}
.page-lottery .vote-hero{background:linear-gradient(120deg,#b86f78,#d39a9d);box-shadow:0 12px 22px #9d687044}
.page-lottery .vote-option-card.selected{outline-color:var(--dusty-rose);background:var(--rose-soft)}
.page-lottery .live-vote h3{background:linear-gradient(90deg,#c77b83,#d59a9e)}
.vote-drawer button[type=submit]{background:var(--dusty-rose)}

/* The rendered shell uses page-withdraw; keep the limits line on one line. */
.page-withdraw .withdrawal-balance > div{flex:1;min-width:0}
.page-withdraw .withdrawal-balance small{display:block;max-width:none;white-space:nowrap;font-size:10px;line-height:1.35}
.vote-record-page{min-height:calc(100vh - 58px);padding:18px 14px 96px;background:var(--warm-ivory)}
.shell.page-voterecord{width:min(100%,430px);padding-bottom:0}.page-voterecord .nav{width:min(100%,430px)}
.vote-record-filters{display:grid;grid-template-columns:repeat(3,1fr);gap:0;padding:4px;background:#fff;border-radius:24px;box-shadow:0 4px 14px #4a2b7a0c;margin-bottom:18px}
.vote-record-filters button{height:38px;border:0;border-radius:20px;background:transparent;color:#879783;font-size:16px}
.vote-record-filters button.active{background:var(--dusty-rose);color:#fff;font-weight:700;box-shadow:0 5px 12px #9d687044}
.vote-record-list{display:grid;gap:16px}.vote-record-card{background:#fff;border-radius:20px;padding:20px 20px 15px;box-shadow:0 5px 16px #4a2b7a0d;color:#403743}
.vote-record-card>header{display:flex;align-items:center;gap:10px;border:0;padding:0 0 16px}.vote-record-card>header strong{font-size:20px;letter-spacing:0}.record-status{margin-left:auto;padding:6px 13px;border-radius:18px;font-weight:700;font-size:14px}.record-status.pending{background:#f9ebe2;color:#b87152}.record-status.drawn{background:var(--sage-soft);color:#607362}.record-chevron{color:#b7a69e;font-size:26px;line-height:16px}
.record-draw-result{display:flex;align-items:center;gap:10px;color:#879783;font-size:14px;margin:0 0 14px}.record-draw-result b{padding:6px 11px;border-radius:14px;background:var(--rose-soft);color:#a95f68}
.record-bet{display:flex;align-items:center;gap:10px;border-bottom:1px solid #f0e9f1;padding:0 0 16px}.record-gift{width:44px;height:44px;display:grid;place-items:center;border-radius:13px;background:var(--dusty-rose);color:#fff;font-size:22px;box-shadow:0 5px 10px #9d687044}.record-bet>strong{font-size:17px;white-space:nowrap}.record-selection{margin-left:auto;padding:7px 11px;border-radius:18px;background:var(--rose-soft);color:#a95f68;font-size:14px;font-weight:700;text-align:right}
.vote-record-card>footer{display:flex;align-items:center;justify-content:space-between;padding-top:14px}.vote-record-card>footer strong{font-size:17px}.vote-record-card>footer time{color:#a99ab6;font-size:13px}.record-outcome.won{color:#00b96b}.record-outcome.lost{color:#f0182b}
@media(max-width:380px){.record-selection{font-size:12px;padding:6px 8px}.record-bet>strong{font-size:15px}.vote-record-card{padding-left:14px;padding-right:14px}}
.registration-label input,.registration-label select{border-color:#ffffff66;background:#ffffff20}
.auth-page{background-image:linear-gradient(135deg,#879783d9,#c77b83c2),url('/assets/login-bg.png');background-color:var(--sage);background-blend-mode:multiply,normal}
.auth-submit{color:#a95f68}
.copy-code{color:#a95f68}
.page-head button,.row .ico,.home-header button,.date-her,.text-btn,.profile-label{color:#a95f68}
.withdrawal-balance{background:linear-gradient(115deg,#c77b83,#a96570);box-shadow:0 13px 26px #9d687044}
.withdraw-submit{box-shadow:0 12px 24px #9d687044}
.page-withdrawal .page-head button{background:var(--rose-soft)}
.pill{background:var(--sage-soft);color:#607362}
.profile-hero{background:var(--warm-ivory)}
.profile-tags span{background:var(--sage-soft);color:#607362}
.shell.page-video{padding-bottom:0;background:#f2eff7}
.page-video .coming-soon-page{min-height:100vh;display:grid;place-items:center;background:#fff;color:#999;font-size:16px}

/* Final palette pass: remove legacy purple accents from every front-end view. */
:root{--warm-ivory:#FAF7F2;--dusty-rose:#C77B83;--sage:#879783;--ink:#3b3431;--rose-soft:#f2e1df;--sage-soft:#e3e9e1}
body{background:var(--warm-ivory);color:var(--ink)}
.shell,.video-page,.notification-page,.lottery-page,.service-screen,.service-page{background:var(--warm-ivory)}
.page-head,.home-header,.video-brand,.notification-head{background:#fff;border-color:#eadfda}
.page-head h1,.home-header-title,.video-title-row h1,.service-head h1{color:var(--ink)}
.page-head button,.home-header button,.video-brand strong,.text-btn,.profile-label{color:#a95f68}
.nav{border-color:#eadfda}.nav button.active{color:#a95f68}.nav button.active:before{background:var(--dusty-rose)}
.quick-nav,.menu,.card,.post-card,.video-card,.service-card,.language-sheet{background:#fff}
.quick-nav span,.row .ico,.bank-icon,.service-card-icon,.video-title-row button,.page-withdrawal .page-head button{background:var(--rose-soft);color:#a95f68}
.row+.row,.profile-card,.post-card header{border-color:#eee5df}
.row small,.video-brand small,.service-card p,.notification-page time,.no-more{color:#8d817c}
.banner-wrap{background-color:#d9b2ae}.date-her,.primary,.withdraw-submit,.service-contact{background:var(--dusty-rose);color:#fff}
.notice-wrap{background:var(--sage-soft);color:#607362}.section-title{border-color:var(--dusty-rose)}
.tags small,.tags small:nth-child(2n),.tags small:nth-child(3n),.service-status{background:var(--sage);color:#fff}
.profile-tags span,.pill{background:var(--sage-soft);color:#607362}
.video-brand button:not(.video-brand-title){background:var(--dusty-rose);box-shadow:0 5px 12px #9d687044}
.video-page .video-cover{background:#3b3431}.video-page .video-cover i{background:#3b3431d9}
.video-page .video-card strong{color:var(--ink)}
.service-head button{background:var(--rose-soft);color:#a95f68}.service-hero{background:linear-gradient(135deg,#c77b83,#a96570);box-shadow:0 12px 25px #9d687044}.service-contact{color:#a95f68;background:#fff}
.service-hero>p{color:#f8e8e7}.service-status i{background:#b9d3b7}
.auth-page{background-color:var(--sage);background-image:linear-gradient(135deg,#879783d9,#c77b83c2),url('/assets/login-bg.png')}.auth-submit{color:#a95f68}.auth-lang-chip{background:#ffffff24}
.history-toggle,.page-lottery .vote-hero-bottom button#toggle-history{color:#fff}
.vote-header{background:linear-gradient(135deg,#c77b83,#a96570)}.vote-main h2,.balance-line strong{color:#a95f68}.vote-option-card.selected{border-color:var(--dusty-rose);background:var(--rose-soft)}
.vote-drawer button[type=submit]{background:var(--dusty-rose)}
