.phone-shell.canada28-active .game-list.pg-open {
  padding: 0;
}

.canada28-card .game-art {
  object-fit: cover;
}

.canada-room-modal[hidden],
.canada-credit-modal[hidden],
.canada-bet-modal[hidden] {
  display: none;
}

.canada-room-modal,
.canada-credit-modal,
.canada-bet-modal {
  position: fixed;
  inset: 0 auto auto 50%;
  z-index: 140;
  width: min(100vw, var(--app-max-width));
  height: 100dvh;
  min-height: 100vh;
  transform: translateX(-50%);
}

.canada-room-mask,
.canada-credit-mask,
.canada-bet-mask {
  position: absolute;
  inset: 0;
  background: rgba(11, 16, 40, 0.48);
}

.canada-room-sheet,
.canada-credit-sheet,
.canada-bet-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 72vh;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  background: #fff;
  box-shadow: 0 -18px 48px rgba(26, 31, 58, 0.22);
}

.canada-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid #edf0f7;
}

.canada-sheet-head strong {
  color: #0b1028;
  font-size: 16px;
  line-height: 22px;
}

.canada-sheet-head button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f2f3f8;
  color: #737b94;
  font-size: 22px;
  line-height: 30px;
}

.canada-room-list,
.canada-credit-grid {
  max-height: calc(72vh - 48px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.canada-room-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid #eef1f8;
  background: #fff;
  text-align: left;
}

.canada-room-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.canada-room-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 28% 18%, rgba(255,255,255,.88), transparent 35%), linear-gradient(135deg, #bb4dff, #7d31e7);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(141, 48, 232, .18);
}

.canada-room-text {
  min-width: 0;
}

.canada-room-text strong {
  display: block;
  overflow: hidden;
  color: #0b1028;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.canada-room-text span {
  display: block;
  margin-top: 2px;
  color: #7e88ad;
  font-size: 12px;
  line-height: 16px;
}

.canada-room-enter {
  flex: 0 0 auto;
  color: #8f33e9;
  font-size: 20px;
}

.canada28-view {
  min-height: calc(100vh - 45px);
  padding: 10px 10px 86px;
  background: #edf0f7;
}

.canada28-top {
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #b942ff, #7632df);
  color: #fff;
  box-shadow: 0 10px 22px rgba(124, 55, 214, .18);
}

.canada28-period {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 14px 14px 12px;
}

.canada28-period span {
  display: block;
  color: rgba(255,255,255,.75);
  font-size: 12px;
  line-height: 16px;
}

.canada28-period strong {
  display: block;
  margin-top: 2px;
  font-size: 17px;
  line-height: 22px;
}

.canada28-countdown {
  display: grid;
  place-items: center;
  min-width: 88px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.18);
  font-family: DIN, "DIN Alternate", Arial, sans-serif;
  font-size: 22px;
  font-weight: 800;
}

.canada28-countdown.is-opening {
  font-family: inherit;
  font-size: 16px;
}

.canada28-balls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 14px;
}

.canada28-ball,
.canada28-sum {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #8c2fe7;
  font-size: 17px;
  font-weight: 900;
  box-shadow: inset 0 -2px 4px rgba(139, 49, 229, .12);
}

.canada28-plus {
  color: rgba(255,255,255,.82);
  font-size: 17px;
  font-weight: 900;
}

.canada28-sum {
  background: #fff3d4;
  color: #c98200;
}

.canada28-panel {
  margin-top: 10px;
  border: 1px solid #e7ebf5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(92, 101, 138, .06);
}

.canada28-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px;
  border-bottom: 1px solid #eef1f8;
}

.canada28-panel-head strong {
  color: #141a31;
  font-size: 15px;
}

.canada28-panel-head span {
  color: #8d94aa;
  font-size: 12px;
}

.canada28-history {
  display: grid;
}

.canada28-history article {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border-bottom: 1px solid #f1f3f8;
  color: #242a3c;
  font-size: 12px;
}

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

.canada28-mini-balls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.canada28-mini-balls i {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f1e7ff;
  color: #8a2de6;
  font-style: normal;
  font-weight: 800;
}

.canada28-tag {
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f5edff;
  color: #922eea;
  line-height: 20px;
  font-weight: 800;
}

.canada28-chat {
  padding: 10px 12px 12px;
}

.canada28-chat p {
  margin: 0 0 8px;
  color: #303850;
  font-size: 13px;
  line-height: 19px;
}

.canada28-chat strong {
  color: #6c5ea8;
}

.canada28-footer {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: 1fr repeat(4, 54px);
  gap: 7px;
  align-items: center;
  width: min(100vw, var(--app-max-width));
  min-height: 58px;
  padding: 7px 9px calc(7px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  border-top: 1px solid #e4e8f2;
  background: rgba(255,255,255,.98);
  box-shadow: 0 -8px 20px rgba(58, 66, 100, .08);
}

.canada28-input {
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border-radius: 19px;
  background: #f1f3f8;
  color: #9aa1b4;
  font-size: 13px;
  line-height: 38px;
}

.canada28-footer button {
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #b642fb, #8130e8);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 12px rgba(139, 49, 229, .18);
}

.canada-credit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 8px;
  padding: 16px 14px 20px;
}

.canada-credit-item {
  min-width: 0;
  text-align: center;
}

.canada-credit-item img {
  display: block;
  width: 58px;
  height: 58px;
  margin: 0 auto 6px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 6px 12px rgba(111,63,177,.14);
}

.canada-credit-item span {
  display: block;
  overflow: hidden;
  color: #10142c;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.canada-bet-body {
  display: grid;
  gap: 12px;
  max-height: calc(78vh - 48px);
  padding: 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.canada-bet-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.canada-bet-tabs button,
.canada-bet-chip,
.canada-bet-num {
  min-width: 0;
  border: 0;
  background: #f2f3f8;
  color: #23283b;
  font-weight: 800;
}

.canada-bet-tabs button {
  height: 34px;
  border-radius: 17px;
  font-size: 13px;
}

.canada-bet-tabs button.active,
.canada-bet-chip.active,
.canada-bet-num.active {
  background: linear-gradient(135deg, #b642fb, #8130e8);
  color: #fff;
  box-shadow: 0 6px 12px rgba(139,49,229,.18);
}

.canada-bet-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.canada-bet-chip {
  min-height: 42px;
  border-radius: 12px;
  font-size: 14px;
}

.canada-bet-chip span,
.canada-bet-num span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  opacity: .72;
}

.canada-bet-numbers {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.canada-bet-num {
  height: 38px;
  border-radius: 12px;
  font-size: 14px;
}

.canada-bet-money {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.canada-bet-money input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #dfe4ef;
  border-radius: 13px;
  outline: 0;
  background: #fbfcff;
  color: #0b1028;
  font-size: 14px;
  font-weight: 700;
}

.canada-bet-presets {
  display: flex;
  gap: 6px;
}

.canada-bet-presets button {
  height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 15px;
  background: #f0e8ff;
  color: #8f33e9;
  font-size: 12px;
  font-weight: 800;
}

.canada-bet-submit {
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #b642fb, #8130e8);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 9px 18px rgba(139,49,229,.2);
}

.canada-bet-summary {
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f7f4ff;
  color: #555f82;
  font-size: 12px;
  line-height: 18px;
}

.canada-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 90px;
  color: #8d94aa;
  font-size: 13px;
}

@media (max-width: 340px) {
  .canada28-footer {
    grid-template-columns: 1fr repeat(4, 48px);
    gap: 5px;
  }

  .canada28-footer button {
    font-size: 11px;
  }
}

/* Canada 28 source-page skin */
.phone-shell.canada28-active {
  padding: 0 !important;
}

.phone-shell.canada28-active > .topbar {
  display: none !important;
}

.phone-shell.canada28-active .game-list.pg-open {
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.canada28-view {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  background: #f2f4f7;
  color: #222;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.canada28-view .c28-container {
  width: 100%;
  max-width: var(--app-max-width);
  height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #e8eaed;
}

.canada28-view .c28-topbar {
  height: 54px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: linear-gradient(90deg, #01d1ff, #0aabff);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
}

.canada28-view .c28-topbar .left,
.canada28-view .c28-topbar .right {
  width: 72px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.canada28-view .c28-topbar .left {
  justify-content: flex-start;
}

.canada28-view .c28-topbar .right {
  justify-content: flex-end;
}

.canada28-view .c28-topbar .title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 500;
  line-height: 20px;
}

.canada28-view .tb-ico {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  cursor: pointer;
}

.canada28-view .tb-ico svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.canada28-view .statusline {
  position: static;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e9edf2;
  background: #fff;
}

.canada28-view .sl-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.canada28-view .sl-period {
  transform: translateX(30px);
  color: #222;
  font-size: 14px;
  white-space: nowrap;
}

.canada28-view .sl-period .p {
  color: #68a6f7;
}

.canada28-view .sl-timer {
  min-width: 62px;
  padding: 4px 10px;
  transform: translateX(56px);
  border-radius: 6px;
  background: #3b4351;
  color: #fff;
  font-size: 14px;
  text-align: center;
}

.canada28-view .sl-mid-sep {
  width: 2px;
  height: 36px;
  background: #e9edf2;
}

.canada28-view .sl-right {
  width: 130px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.canada28-view .sl-right .lab {
  color: #666;
  font-size: 12px;
}

.canada28-view .sl-right .bal {
  color: #ff3b30;
  font-size: 14px;
}

.canada28-view .lastrow {
  position: static;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #e9edf2;
  background: #fff;
}

.canada28-view .lr-period {
  color: #222;
  font-size: 14px;
  white-space: nowrap;
}

.canada28-view .lr-period .p {
  color: #2d7cff;
}

.canada28-view .lr-res {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.canada28-view .ball,
.canada28-view .sum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.canada28-view .b-blue {
  background: #0aabff;
}

.canada28-view .sum,
.canada28-view .b-red {
  background: #ff4d4f;
  font-weight: 900;
}

.canada28-view .lr-tag {
  transform: translateX(6px);
  color: #111;
  font-size: 14px;
  white-space: nowrap;
}

.canada28-view .lr-toggle {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #7b8794;
  cursor: pointer;
}

.canada28-view .tri {
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 10px solid #7b8794;
  transition: transform .18s ease;
}

.canada28-view .tri.down {
  transform: rotate(180deg);
}

.canada28-view .historyWrap {
  flex-shrink: 0;
  display: none;
  border-bottom: 1px solid #e9edf2;
  background: #fff;
}

.canada28-view .historyWrap.show {
  display: block;
}

.canada28-view .his-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 13px;
  text-align: center;
}

.canada28-view .his-table th {
  padding: 10px 6px;
  border-bottom: 1px solid #eef2f6;
  background: #eef1f5;
  color: #666;
  font-weight: 600;
}

.canada28-view .his-table td {
  padding: 10px 6px;
  border-bottom: 1px solid #f0f2f5;
  color: #222;
  vertical-align: middle;
}

.canada28-view .his-period {
  color: #2d7cff;
  font-weight: 700;
}

.canada28-view .his-res {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
}

.canada28-view .his-more {
  padding: 12px 0;
  border-top: 1px solid #e8eaed;
  color: #2d7cff;
  font-size: 13px;
  text-align: center;
}

.canada28-view .c28-chat-container {
  flex: 1;
  min-height: 0;
  display: block;
  margin: 0 16px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.canada28-view .c28-chat {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 0 0;
}

.canada28-view .c28-message {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.canada28-view .c28-message-avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #12b0e7;
}

.canada28-view .c28-message-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.canada28-view .c28-message-body {
  flex: 1;
  min-width: 0;
}

.canada28-view .c28-message-username {
  margin-bottom: 4px;
  color: #999;
  font-size: 12px;
  text-align: left;
}

.canada28-view .c28-message-username.is-user {
  color: #12b0e7;
  font-weight: 700;
}

.canada28-view .c28-message-content {
  display: inline-block;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 0 16px 16px 16px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
  color: #333;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.canada28-view .c28-lottery-title {
  padding: 8px 12px;
  background: #12b0e7;
  color: #fff;
  font-weight: 700;
  text-align: center;
}

.canada28-view .c28-lottery-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  white-space: nowrap;
}

.canada28-view .c28-footer {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  width: 100%;
  padding: 10px 12px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(0, 0, 0, .06);
  background: #e8eaed;
}

.canada28-view .footer-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.canada28-view .bet-input-wrapper {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 15px;
  border: 1px solid #e2e6ea;
  border-radius: 30px;
  background: #f5f7fa;
}

.canada28-view .bet-input-wrapper input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #333;
  font: inherit;
  font-size: 14px;
}

.canada28-view .c28-send-btn {
  width: 60px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 0;
  border-radius: 20px;
  background: #4da8ff;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
}

.canada28-view .footer-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 8px;
}

.canada28-view .action-btn {
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.canada28-view .action-btn img {
  display: block;
  width: 28px;
  height: 28px;
  margin-bottom: 4px;
}

.canada28-view .action-btn span {
  color: #555;
  font-size: 11px;
  font-weight: 500;
}

.canada28-view .is-locked,
.c28-keyboard-modal .is-locked {
  opacity: .5 !important;
  pointer-events: none !important;
}

.canada28-view input.is-locked {
  background: #e2e5ec !important;
}

.c28-keyboard-modal[hidden] {
  display: none !important;
}

.c28-keyboard-modal {
  position: fixed;
  inset: 0 auto auto 50%;
  z-index: 150;
  width: min(100vw, var(--app-max-width));
  height: 100dvh;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform: translateX(-50%);
}

.c28-keyboard-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .5);
}

.c28-keyboard-container {
  position: relative;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background: #fff;
  animation: c28SlideUp .24s ease;
}

@keyframes c28SlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.c28-kb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.c28-kb-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #666;
  font-size: 20px;
  cursor: pointer;
}

.c28-kb-title {
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

.c28-kb-tab-content {
  display: block;
  max-height: calc(85vh - 142px);
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.canada-source-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.canada-source-tabs button {
  height: 34px;
  border: 1px solid #e2e6ea;
  border-radius: 8px;
  background: #f5f7fa;
  color: #333;
  font-size: 12px;
}

.canada-source-tabs button.active {
  border-color: #12b0e7;
  background: #e8f4ff;
  color: #12b0e7;
}

.c28-kb-bet-types {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.c28-kb-type-btn,
.c28-kb-num-btn-full {
  min-height: 48px;
  padding: 8px 4px;
  border: 1px solid #e2e6ea;
  border-radius: 8px;
  background: #f5f7fa;
  color: #333;
  font-size: 12px;
}

.c28-kb-type-btn.selected,
.c28-kb-num-btn-full.selected {
  border-color: #12b0e7;
  background: #e8f4ff;
  color: #12b0e7;
}

.c28-kb-type-btn span,
.c28-kb-num-btn-full span {
  display: block;
}

.c28-kb-type-btn .odds,
.c28-kb-num-btn-full .odds-num {
  margin-top: 2px;
  color: #999;
  font-size: 12px;
}

.c28-kb-type-btn .bet-amount,
.c28-kb-num-btn-full .bet-amount {
  margin-top: 2px;
  color: #12b0e7;
  font-size: 13px;
  font-weight: 700;
}

.c28-kb-num-grid-full {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.quick-amount-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid #f0f0f0;
  background: #fff;
}

.quick-amount-btn {
  flex: 1;
  min-width: 0;
  padding: 10px 4px;
  border: 1px solid #e2e6ea;
  border-radius: 8px;
  background: #f5f7fa;
  color: #333;
  font-size: 13px;
}

.quick-amount-btn.active {
  border-color: #4da8ff;
  background: #4da8ff;
  color: #fff;
}

#canadaBetAmount {
  width: 46px;
  height: 40px;
  border: 1px solid #e2e6ea;
  border-radius: 8px;
  text-align: center;
}

.bet-bottom-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid #f0f0f0;
  background: #fff;
}

.bet-status {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  background: #f5f7fa;
  color: #333;
  font-size: 14px;
}

.bet-clear,
.bet-confirm {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
}

.bet-clear {
  border: 1px solid #e2e6ea;
  background: #f5f7fa;
  color: #666;
}

.bet-confirm {
  border: 0;
  background: #4da8ff;
  color: #fff;
  font-weight: 500;
}

.bet-record-container {
  margin: 8px 0 8px 48px;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.bet-record-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: #f2fbff;
  color: #12b0e7;
  font-size: 13px;
  font-weight: 700;
}

.bet-record-content {
  display: none;
  padding: 8px 12px;
}

.bet-record-content.show {
  display: block;
}

.bet-record-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #eef2f5;
  color: #333;
  font-size: 12px;
}

.bet-record-item:last-child {
  border-bottom: 0;
}

.sponsor-card-container {
  margin: 12px 0 8px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.sponsor-title {
  margin-bottom: 12px;
  padding-left: 4px;
  border-left: 3px solid #12b0e7;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.sponsor-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 6px;
  text-align: center;
  text-decoration: none;
  color: #333;
}

.sponsor-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  border-radius: 12px;
  object-fit: contain;
}

.sponsor-name {
  color: #222;
  font-size: 14px;
  font-weight: 500;
}

.venue-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  cursor: pointer;
}

.venue-name {
  color: #222;
  font-size: 18px;
  font-weight: 600;
}

.venue-players {
  margin-top: 4px;
  color: #888;
  font-size: 13px;
}

.venue-arrow {
  color: #ccc;
  font-size: 20px;
}

.phone-shell.canada28-active,
.phone-shell.canada28-active .page-content {
  height: 100dvh !important;
  min-height: 0 !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}

.phone-shell.canada28-active .game-list.pg-open {
  height: 100dvh !important;
  min-height: 0 !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
}

.canada28-view {
  height: 100dvh;
  min-height: 0;
  max-height: 100dvh;
  padding: 0 !important;
  background: #f2f4f7;
}

.canada28-view .c28-container {
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
}

.canada28-view .c28-chat-container {
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 0;
}

.canada28-view .c28-footer {
  padding-bottom: max(14px, env(safe-area-inset-bottom));
}

.canada28-view .tb-sun img {
  display: block;
  width: auto;
  height: 15px;
  margin-right: .37333rem;
  object-fit: contain;
}

.canada28-view .scratchPanel[hidden] {
  display: none !important;
}

.canada28-view .scratchPanel {
  flex-shrink: 0;
  margin: 8px 16px;
}

.canada28-view .scratchBox {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}

.canada28-view .scratchRow {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.canada28-view .scratchCol {
  flex: 1;
  min-width: 0;
}

.canada28-view .scratchTitle {
  margin-bottom: 10px;
  color: #333;
  font-size: 13px;
  white-space: nowrap;
}

.canada28-view .scratchTitle b {
  color: #68a6f7;
}

.canada28-view .scratchLeftMid {
  height: 70px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.canada28-view .scratchStatusPill {
  transform: translateX(18px);
  padding: 8px 16px;
  border-radius: 8px;
  background: #3b4351;
  color: #fff;
  font-size: 14px;
  line-height: 1;
}

.canada28-view .scratchRefresh {
  margin-top: 10px;
  transform: translateX(23px);
  color: #2d7cff;
  font-size: 12px;
  user-select: none;
  cursor: pointer;
}

.canada28-view .scratchCard {
  position: relative;
  width: min(225px, calc(100vw - 180px));
  min-width: 150px;
  height: 68px;
  overflow: hidden;
  border-radius: 9px;
  background: #f2f3f7;
  transform: translateX(-50px);
}

.canada28-view .scratchInner,
.canada28-view .scratchCanvas,
.canada28-view .scratchTip {
  position: absolute;
  inset: 0;
}

.canada28-view .scratchInner {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.canada28-view .scratchCanvas {
  touch-action: none;
}

.canada28-view .scratchTip {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  font-size: 14px;
  letter-spacing: 1px;
  pointer-events: none;
}

.canada28-view .zjlcpt {
  position: fixed;
  inset: 0 auto auto 50%;
  z-index: 2000;
  width: min(100vw, var(--app-max-width));
  height: 100dvh;
  display: none;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, .7);
}

.canada28-view .zjlcpt.show {
  display: flex;
}

.canada28-view .win-bg {
  position: relative;
  width: 90%;
  max-width: 500px;
  aspect-ratio: 750 / 887;
  background: url("/assets/c28/zj/zj.png") no-repeat center center / contain;
  animation: c28WinPop .26s ease both;
}

.canada28-view .win-amount {
  position: absolute;
  left: 15%;
  top: 55%;
  bottom: 30%;
  width: 70%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffd700;
  font-family: "Courier New", monospace;
  font-size: clamp(30px, 7vw, 46px);
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, .5);
  white-space: nowrap;
}

.canada28-view .win-amount span {
  margin-left: 4px;
  font-size: clamp(18px, 4vw, 26px);
}

.canada28-view .win-close-btn {
  position: absolute;
  top: 3%;
  right: 6%;
  z-index: 10;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

@keyframes c28WinPop {
  from {
    opacity: 0;
    transform: scale(.86);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 520px) {
  .canada28-view .c28-topbar {
    height: 58px;
  }

  .canada28-view .statusline,
  .canada28-view .lastrow {
    padding-left: 12px;
    padding-right: 12px;
  }

  .canada28-view .c28-chat-container {
    margin-left: 16px;
    margin-right: 16px;
  }

  .canada28-view .c28-footer {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .canada28-view .footer-row-bottom {
    gap: 2px;
  }

  .c28-keyboard-modal {
    height: 100dvh;
    min-height: 0;
    padding-bottom: 128px;
    align-items: flex-end;
    pointer-events: none;
  }

  .c28-keyboard-overlay {
    pointer-events: auto;
  }

  .c28-keyboard-container {
    max-height: calc(100dvh - 160px);
    pointer-events: auto;
  }

  .c28-kb-tab-content {
    max-height: calc(100dvh - 304px);
  }
}
