* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  --header-height: 44px;
  --tabs-height: 42px;
  --sticky-top: calc(var(--header-height) + var(--tabs-height));
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  background: #f5f5f5;
  color: #333;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 120px;
}

body.desktop-mode-page {
  max-width: none;
  margin: 0;
  padding-bottom: 0;
  overflow: hidden;
  overscroll-behavior-x: none;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #e60012;
  color: #fff;
  height: 44px;
  padding: 0 12px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-title {
  font-size: 17px;
  font-weight: 500;
}

.header-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  width: 32px;
  cursor: pointer;
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 8px;
  background: #fff;
  overflow-x: auto;
  white-space: nowrap;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: var(--header-height);
  z-index: 95;
}

.tab {
  flex-shrink: 0;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  font-size: 12px;
  color: #666;
  cursor: pointer;
}

.tab.active {
  border-color: #e60012;
  color: #e60012;
}

.tab:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.match-expandable {
  background: #fff;
  border-bottom: 1px solid #eee;
}

.match-expand-header {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  gap: 8px;
}

.expand-left {
  width: 68px;
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1.5;
}

.expand-center {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.match-schedule-status {
  flex-shrink: 0;
  min-width: 72px;
  max-width: 104px;
  text-align: right;
  font-size: 12px;
  line-height: 1.35;
  color: #5f6b7a;
  word-break: break-word;
}

.match-schedule-status.unmatched {
  color: #a07a20;
}

.teams-inline {
  font-size: 14px;
  font-weight: 600;
  margin-top: 2px;
}

.expand-arrow {
  color: #ccc;
  font-size: 12px;
  flex-shrink: 0;
}

.match-expand-body {
  padding: 0 8px 10px;
}

.crs-section {
  margin-bottom: 4px;
}

.crs-section:last-child {
  margin-bottom: 0;
}

.more-games-wrap {
  margin-top: 8px;
  border-top: 1px dashed #eee;
  padding-top: 6px;
}

.teams-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.more-games-btn {
  width: 100%;
  border: none;
  background: none;
  color: #296ca0;
  font-size: 13px;
  padding: 4px 0;
  cursor: pointer;
}

.more-arrow {
  font-size: 10px;
}

.more-games-panel {
  margin-top: 8px;
}

.pool-title {
  position: relative;
  font-size: 12px;
  color: #999;
  margin: 6px 0 4px;
}

.date-toggle {
  color: #e60012;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.toggle-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e60012;
  display: inline-block;
}

.match-list {
  min-height: 200px;
}

.loading,
.error,
.empty {
  text-align: center;
  padding: 40px 16px;
  color: #999;
  font-size: 14px;
}

.error {
  color: #e60012;
}

.date-group {
  margin-bottom: 8px;
}

.date-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ebebeb;
  padding: 8px 12px;
  font-size: 13px;
  color: #666;
  position: sticky;
  top: var(--sticky-top);
  z-index: 90;
}

.date-toggle {
  flex-shrink: 0;
  cursor: pointer;
}

.date-toggle.past {
  color: #a45a00;
}

.match-card {
  background: #fff;
  border-bottom: 1px solid #eee;
  display: flex;
  padding: 10px 8px;
}

.match-info {
  width: 72px;
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1.5;
}

.league-name {
  font-weight: 500;
}

.league-badges {
  position: relative;
  display: inline-block;
}

.single-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #eaf3ff;
  color: #296ca0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(41, 108, 160, 0.08);
}

.league-badges > .single-tag {
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
}

.pool-title > .single-tag {
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
}

.match-num {
  color: #666;
}

.match-time {
  color: #999;
  font-size: 11px;
}

.match-body {
  flex: 1;
  min-width: 0;
}

.teams {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.vs {
  color: #999;
  font-weight: 400;
  font-size: 12px;
}

.odds-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.odds-row {
  display: flex;
  align-items: stretch;
  gap: 4px;
}

.goal-line {
  width: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e60012;
  font-size: 12px;
  font-weight: 600;
}

.goal-line-stack {
  width: 28px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.goal-line-stack .single-tag {
  position: static;
}

.odds-buttons {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.odds-btn {
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  background: #fff;
  padding: 4px 2px;
  cursor: pointer;
  text-align: center;
  line-height: 1.3;
  transition: all 0.15s;
}

.odds-btn .label {
  display: block;
  color: #e60012;
  font-size: 13px;
}

.odds-btn .value {
  display: block;
  color: #999;
  font-size: 12px;
}

.odds-btn.selected {
  background: #e60012;
  border-color: #e60012;
}

.odds-btn.selected .label,
.odds-btn.selected .value {
  color: #fff;
}

.schedule-page {
  padding: 12px;
}

.admin-page {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-panel {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.admin-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
}

.schedule-filters {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
  margin-bottom: 12px;
}

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

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #666;
}

.filter-field input {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: #333;
  background: #fff;
}

.filter-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.primary-btn,
.secondary-btn {
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
}

.primary-btn {
  flex: 1;
  background: #e60012;
  color: #fff;
}

.secondary-btn {
  background: #f3f3f3;
  color: #666;
}

.schedule-summary {
  margin-top: 10px;
  font-size: 12px;
  color: #888;
  line-height: 1.5;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 16px;
}

.schedule-group {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.schedule-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f8f8f8;
  color: #666;
  font-size: 13px;
}

.schedule-group-body {
  display: flex;
  flex-direction: column;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-card {
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  padding: 12px;
  background: #fafafa;
}

.admin-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.admin-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #333;
}

.admin-card-meta {
  font-size: 12px;
  color: #777;
  line-height: 1.5;
}

.admin-card-message {
  margin-top: 8px;
  font-size: 12px;
  color: #555;
  line-height: 1.5;
  word-break: break-word;
}

.admin-badge {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-badge.success {
  background: #e6f7ec;
  color: #15803d;
}

.admin-badge.error {
  background: #fdecec;
  color: #c62828;
}

.admin-badge.warn {
  background: #fff4db;
  color: #b26a00;
}

.cache-fixtures {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cache-fixture {
  font-size: 12px;
  color: #444;
  line-height: 1.5;
}

.empty-text {
  color: #999;
}

.schedule-card {
  padding: 12px;
  border-top: 1px solid #f1f1f1;
}

.schedule-card:first-child {
  border-top: none;
}

.schedule-card-top,
.schedule-card-bottom,
.schedule-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.schedule-card-top {
  margin-bottom: 10px;
}

.schedule-card-main {
  margin-bottom: 10px;
}

.schedule-detail-scores {
  margin-bottom: 10px;
  font-size: 12px;
  color: #777;
  text-align: center;
  line-height: 1.5;
}

.schedule-league {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.schedule-meta,
.schedule-card-bottom {
  font-size: 12px;
  color: #999;
}

.schedule-status {
  color: #e60012;
  font-size: 12px;
  white-space: nowrap;
}

.schedule-team {
  flex: 1;
  color: #333;
}

.schedule-team-en {
  font-size: 14px;
  font-weight: 600;
}

.schedule-team-zh {
  margin-top: 2px;
  font-size: 12px;
  color: #888;
}

.schedule-score {
  min-width: 64px;
  text-align: center;
  color: #e60012;
  font-size: 18px;
  font-weight: 700;
}

.align-right {
  text-align: right;
}

.selected-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.selected-summary {
  background: #fafafa;
  border-radius: 8px;
  padding: 12px;
  font-size: 13px;
  color: #555;
  line-height: 1.7;
}

.selected-card {
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.selected-card-title {
  padding: 10px 12px;
  background: #f8f8f8;
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.selected-card-items {
  padding: 8px 12px;
}

.selected-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #f4f4f4;
  font-size: 13px;
}

.selected-item:first-child {
  border-top: none;
}

.selected-item-label {
  color: #555;
}

.selected-item-value {
  color: #e60012;
  font-weight: 600;
  text-align: right;
}

.selected-warning {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff6e8;
  color: #a45a00;
  font-size: 13px;
  line-height: 1.6;
}

.retro-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff6e8;
  color: #a45a00;
  font-size: 11px;
  font-weight: 700;
}

.wallet-card-link {
  display: block;
  color: inherit;
}

.wallet-order-link {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #e60012;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(230, 0, 18, 0.18);
}

.wallet-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.wallet-card-btn,
.wallet-manage-btn {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
}

.wallet-card-btn.danger,
.wallet-manage-btn.danger {
  border-color: #f3c6c6;
  color: #c62828;
}

.wallet-manage-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 360px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }
}

.footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-top: 1px solid #eee;
  z-index: 100;
}

.footer-row {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  gap: 8px;
}

.footer-bottom {
  border-top: 1px solid #f0f0f0;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}

.footer-btn {
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  position: relative;
}

.selected-btn {
  min-width: 60px;
}

.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #e60012;
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.parlay-btn {
  flex: 1;
}

.clear-btn {
  display: flex;
  align-items: center;
  gap: 4px;
}

.multiplier {
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.summary {
  flex: 1;
  font-size: 12px;
  color: #666;
  line-height: 1.6;
}

.prize-lines {
  margin-top: 2px;
}

.calc-link {
  margin-top: 4px;
  padding: 0;
  border: none;
  background: none;
  color: #296ca0;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.calc-intro {
  color: #666;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.6;
}

.calc-section {
  margin-bottom: 20px;
}

.calc-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #e60012;
  margin-bottom: 6px;
}

.calc-section-desc {
  font-size: 12px;
  color: #999;
  margin-bottom: 10px;
  line-height: 1.5;
}

.calc-step {
  background: #fafafa;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.calc-step-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.calc-step-picks {
  font-size: 12px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 6px;
}

.calc-step-formula {
  font-size: 13px;
  color: #333;
  font-family: Menlo, Monaco, monospace;
}

.calc-total {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.calc-empty {
  color: #999;
  font-size: 13px;
}

.submit-btn {
  background: #e60012;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal.hidden {
  display: none;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.modal-panel {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 480px;
  border-radius: 12px 12px 0 0;
  max-height: 60vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
  font-size: 16px;
  font-weight: 500;
}

.modal-header button {
  background: none;
  border: none;
  font-size: 22px;
  color: #999;
  cursor: pointer;
}

.parlay-options {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  overflow-y: auto;
}

.parlay-option {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  cursor: pointer;
  background: #fff;
}

.parlay-option.active {
  border-color: #e60012;
  color: #e60012;
  background: #fff5f5;
}

.multiplier-custom {
  display: flex;
  gap: 8px;
  padding: 12px 12px 0;
}

.multiplier-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

.multiplier-input:focus {
  border-color: #e60012;
}

.multiplier-confirm {
  border: none;
  border-radius: 4px;
  background: #e60012;
  color: #fff;
  padding: 0 16px;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.plan-panel {
  max-height: 70vh;
}

.plan-content {
  padding: 16px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.8;
}

.plan-item {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.plan-item:last-child {
  border-bottom: none;
}

.calc-group-total {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #e60012;
}

.calc-candidate {
  padding: 6px 0;
  border-bottom: 1px dashed #eee;
  font-size: 12px;
  color: #666;
}

.calc-candidate:last-of-type {
  border-bottom: none;
}

.calc-candidate-max {
  color: #333;
}

.plan-total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  font-weight: 600;
  color: #e60012;
}

.auth-page {
  padding-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #f5f5f5;
}

.auth-card {
  width: calc(100% - 32px);
  max-width: 360px;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.auth-title {
  font-size: 22px;
  text-align: center;
  margin-bottom: 20px;
}

.auth-error {
  background: #fff5f5;
  color: #e60012;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #666;
}

.auth-input {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
}

.auth-input:focus {
  border-color: #e60012;
}

.auth-submit {
  margin-top: 8px;
  background: #e60012;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px;
  font-size: 16px;
  cursor: pointer;
}

.auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: #666;
}

.auth-switch a {
  color: #296ca0;
  text-decoration: none;
}

.account-message {
  background: #f3fbf4;
  color: #2e7d32;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}

.account-user-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fafafa;
}

.account-user-meta {
  min-width: 0;
}

.account-user-name {
  font-size: 15px;
  font-weight: 600;
}

.account-user-desc {
  margin-top: 4px;
  font-size: 12px;
  color: #888;
  line-height: 1.5;
}

.account-user-self {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
}

.account-user-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.account-user-reset-form {
  display: grid;
  grid-template-columns: 120px 120px auto;
  gap: 8px;
  align-items: center;
}

.account-user-reset-form .auth-input {
  min-width: 0;
  padding: 8px 10px;
  font-size: 13px;
}

@media (max-width: 720px) {
  .account-user-row {
    flex-direction: column;
    align-items: stretch;
  }

  .account-user-actions {
    align-items: stretch;
  }

  .account-user-reset-form {
    grid-template-columns: 1fr;
  }
}

.header-btn,
a.header-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  width: 32px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.header-user {
  font-size: 12px;
  width: auto;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-text-btn {
  width: auto;
  min-width: 32px;
  padding: 0 2px;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.home-main {
  padding: 24px 16px;
}

.home-welcome {
  font-size: 16px;
  margin-bottom: 20px;
  color: #666;
}

.home-grid {
  display: grid;
  gap: 16px;
}

.home-card {
  display: block;
  background: #fff;
  border-radius: 12px;
  padding: 24px 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.home-card-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.home-card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.home-card-desc {
  font-size: 13px;
  color: #999;
}

.desktop-header {
  z-index: 120;
}

.desktop-main {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 44px);
  padding: 12px;
  gap: 12px;
  overflow: hidden;
  background: #f2f2f2;
  overscroll-behavior-x: none;
}

.desktop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.desktop-toolbar-text {
  font-size: 13px;
  color: #666;
}

.desktop-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.desktop-toolbar-btn {
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #555;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}

.desktop-toolbar-btn.primary {
  border-color: #e60012;
  color: #e60012;
}

.desktop-toolbar-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.desktop-columns {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-gutter: stable;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}

body.desktop-dragging {
  cursor: col-resize;
  user-select: none;
}

.desktop-columns.is-dragging .desktop-frame {
  pointer-events: none;
}

.desktop-pane {
  flex: 0 0 auto;
  min-width: 320px;
  height: 100%;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.desktop-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #f5f5f5;
}

.desktop-resize-handle {
  position: relative;
  width: 12px;
  flex: 0 0 12px;
  cursor: col-resize;
}

.desktop-resize-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: #d4d4d4;
}

@media (max-width: 900px) {
  .desktop-main {
    height: auto;
    min-height: calc(100vh - 44px);
    overflow: auto;
  }

  .desktop-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .desktop-toolbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .desktop-columns {
    flex-direction: column;
    overflow: auto;
  }

  .desktop-pane {
    width: 100% !important;
    flex-basis: auto !important;
    min-height: 70vh;
  }

  .desktop-resize-handle {
    width: 100%;
    height: 12px;
    flex: 0 0 12px;
    cursor: row-resize;
  }

  .desktop-resize-handle::before {
    width: 44px;
    height: 4px;
  }
}

.page-main {
  padding: 12px;
  padding-bottom: 24px;
}

body:not(.auth-page):not(.has-footer) {
  padding-bottom: 0;
}

body.has-footer {
  padding-bottom: 120px;
}

.modal-form {
  padding: 16px;
}

.wallet-card {
  display: block;
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.wallet-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.wallet-card-name {
  font-size: 16px;
  font-weight: 600;
}

.wallet-card-balance {
  font-size: 15px;
  color: #333;
}

.wallet-card-balance.negative,
.wallet-summary-balance.negative {
  color: #e60012;
}

.wallet-card-remark {
  margin-top: 8px;
  font-size: 13px;
  color: #999;
}

.wallet-summary {
  background: #fff;
  border-radius: 10px;
  padding: 20px 16px;
  margin-bottom: 12px;
  text-align: center;
}

.wallet-summary-name {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.wallet-summary-balance {
  font-size: 28px;
  font-weight: 600;
}

.wallet-summary-remark {
  margin-top: 8px;
  font-size: 13px;
  color: #999;
}

.order-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
}

.filter-btn {
  flex-shrink: 0;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.filter-btn.active {
  border-color: #e60012;
  color: #e60012;
}

.order-card {
  position: relative;
  background: linear-gradient(180deg, #fffdf9 0%, #fffaf3 100%);
  border: 1px solid #efe5d6;
  border-radius: 12px;
  padding: 12px 14px 14px;
  margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(99, 79, 49, 0.08);
  overflow: hidden;
}

.ticket-topline {
  margin: -2px 0 10px;
  border-top: 2px dashed #d7c6aa;
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ticket-header {
  align-items: baseline;
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
}

.ticket-header-main {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
}

.ticket-header-multiplier,
.ticket-header-amount {
  font-size: 15px;
  font-weight: 700;
}

.ticket-status-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.order-card-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-id {
  font-weight: 600;
  font-size: 14px;
}

.order-status {
  font-size: 12px;
  color: #e60012;
}

.order-card.status-deleted .order-status {
  color: #999;
}

.order-meta {
  font-size: 12px;
  color: #666;
  line-height: 1.6;
}

.order-meta.retro-text {
  margin-top: 8px;
  color: #a45a00;
}

.ticket-settlement {
  font-size: 12px;
  color: #666;
}

.ticket-body {
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 14px;
  line-height: 1.5;
}

.ticket-match + .ticket-match {
  margin-top: 8px;
}

.ticket-match-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 700;
}

.ticket-match-teams {
  margin-top: 2px;
  color: #333;
}

.ticket-match-picks {
  color: #222;
}

.ticket-footnote,
.ticket-footer-line {
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}

.ticket-footnote {
  margin-top: 8px;
}

.ticket-footer {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed #d9ccb7;
}

.order-prize {
  margin-top: 8px;
  font-size: 13px;
  color: #e60012;
  font-weight: 600;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.order-action {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.order-action.pay {
  border-color: #e60012;
  color: #e60012;
}

.order-action.settle-won {
  border-color: #296ca0;
  color: #296ca0;
}

.wallet-order-list {
  padding: 12px;
  max-height: 50vh;
  overflow-y: auto;
}

.wallet-order-item {
  width: 100%;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  margin-bottom: 8px;
  text-align: left;
  cursor: pointer;
}

.wallet-order-item:hover {
  border-color: #e60012;
}

.wallet-order-name {
  font-size: 15px;
  font-weight: 600;
}

.wallet-order-balance {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
}

.wallet-order-remark {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

.wallet-order-footer {
  padding: 12px;
  text-align: center;
  border-top: 1px solid #eee;
}

.wallet-create-link {
  color: #296ca0;
  font-size: 13px;
  text-decoration: none;
}
