/* Order, account, and history: consistent compact reading rhythm. */
#main {
  --account-ink: #153b29;
  --account-muted: #52695a;
  --account-line: #d8e6db;
  --account-surface: #fff;
  --account-focus: #0a7944;
}

/* Four filters stay reachable without horizontal page overflow. */
#main .orders-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  overflow: visible;
}
#main .orders-filters button {
  min-width: 0;
  min-height: 44px;
  height: auto;
  padding: 7px 3px;
  font-size: 12px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}
#main #reloadOrders { min-height: 40px; padding: 8px 12px; }
#main .mock-order {
  min-width: 0;
  margin-bottom: 14px;
  border-color: var(--account-line);
  border-radius: 16px;
  overflow: hidden;
}
#main .mock-order .order-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 3px 10px;
  padding: 10px 12px;
  line-height: 1.4;
}
#main .mock-order .order-heading strong { min-width: 0; overflow-wrap: anywhere; }
#main .mock-order .order-heading small { white-space: normal; color: #536c5b; }
#main .mock-order .order-item { align-items: flex-start; }
#main .mock-order .order-item-info { min-width: 0; }
#main .mock-order .order-item-info h3 { color: #183b2a; overflow-wrap: anywhere; }
#main .mock-order .order-item-info p { color: #52695a; font-size: 12px; line-height: 1.5; }
#main .mock-order .number-chips span { padding: 4px 7px; line-height: 1.35; }
#main .mock-order .number-extra { max-height: 200px; overflow-y: auto; overscroll-behavior: contain; }
#main .mock-order .number-extra[hidden] { display: none; }
#main .mock-order .order-numbers-toggle { min-height: 44px; margin-top: 6px; padding: 8px 10px; font-size: 12px; line-height: 1.35; }
#main .mock-order .order-bottom { min-width: 0; }
#main .mock-order .status-line { gap: 8px; }
#main .mock-order .status-line .status-label { min-width: 0; line-height: 1.35; }
#main .mock-order .status-line .badge { max-width: 65%; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
#main .order-draw p { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
#main .order-draw small { font-size: 12px; line-height: 1.5; }
#main .mock-order .order-details summary { min-height: 44px; line-height: 1.4; }
#main .mock-order .order-details p { line-height: 1.6; overflow-wrap: anywhere; }
#main .order-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#main .order-actions button { min-height: 44px; }

/* The current claim step remains red; completed and upcoming steps are labelled. */
#main .prize-claim { padding: 14px; overflow-wrap: anywhere; }
#main .claim-heading { gap: 5px; }
#main .claim-heading strong { line-height: 1.4; }
#main .claim-heading > span { font-size: 13px; line-height: 1.5; }
#main .claim-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }
#main .claim-steps li { min-width: 0; }
#main .claim-steps li > b { max-width: 100%; font-size: 11px; word-break: normal; overflow-wrap: anywhere; }
#main .claim-steps li.is-current > span { background: #c81720; }
#main .claim-action, #main .claim-cancel { min-height: 44px; line-height: 1.35; }
#main .claim-form { gap: 12px; }
#main .claim-form label { min-width: 0; font-size: 13px; line-height: 1.45; }
#main .claim-form input, #main .claim-form textarea { box-sizing: border-box; min-width: 0; font-size: 16px; line-height: 1.45; }
#main .claim-form textarea { min-height: 88px; }
#main .claim-return, #main .claim-feedback, #main .claim-footnote { line-height: 1.55; overflow-wrap: anywhere; }

/* Account, addresses, coupons, and messages keep readable text and 44px actions. */
#main .account-profile > div:nth-child(2) { min-width: 0; }
#main .account-profile h1, #main .account-profile p { overflow-wrap: anywhere; white-space: normal; }
#main .account-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#main .account-stats button { min-width: 0; min-height: 64px; padding: 4px 2px; }
#main .account-stats strong { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#main .account-stats small { line-height: 1.35; text-align: center; }
#main .account-menu .account-row { min-height: 52px; gap: 10px; }
#main .account-menu .account-row strong { min-width: 0; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
#main .guest-identity-note { font-size: 12px; line-height: 1.6; color: #355344; overflow-wrap: anywhere; }
#main .secondary-content { min-width: 0; }
#main .secondary-card p, #main .secondary-card h2, #main .address-card p, #main .message-card p { overflow-wrap: anywhere; }
#main .secondary-card p, #main .address-card p, #main .message-card p { line-height: 1.6; }
#main .inline-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#main .inline-actions button, #main .secondary-action, #main .settings-list button, #main [data-read-message], #main #readAllMessages { min-height: 44px; }
#main .account-form label { line-height: 1.45; }
#main .account-form input:not([type=checkbox]), #main .account-form textarea, #main .account-form select { box-sizing: border-box; min-width: 0; min-height: 44px; font-size: 16px; line-height: 1.4; }
#main .coupon-card { gap: 10px; min-width: 0; padding: 15px 12px; }
#main .coupon-card > div { min-width: 56px; }
#main .coupon-card > div strong { font-size: clamp(28px, 8vw, 38px); }
#main .coupon-card section { flex: 1 1 auto; min-width: 0; padding-left: 10px; }
#main .coupon-card h2, #main .coupon-card p, #main .coupon-card section small { overflow-wrap: anywhere; line-height: 1.4; }
#main .coupon-card button { flex: none; min-height: 44px; padding: 7px 10px; }

/* Published history remains scannable even with long product names or many numbers. */
#main .history-page { min-width: 0; }
#main .history-intro, #main .history-card { min-width: 0; }
#main .history-card-head > div { min-width: 0; }
#main .history-card-head h2, #main .history-card-head p { overflow-wrap: anywhere; line-height: 1.4; }
#main .history-card-head p { color: #52695a; }
#main .history-number-label { gap: 8px; line-height: 1.4; }
#main .history-numbers { max-height: 260px; overscroll-behavior: contain; }
#main .history-error button { min-height: 44px; }

#main :is(.order-numbers-toggle,.claim-action,.claim-cancel,.account-row,.account-stats button,.secondary-action,.history-error button):focus-visible {
  outline: 3px solid var(--account-focus);
  outline-offset: 2px;
}
@media (max-width: 350px) {
  #main .orders-filters { gap: 4px; }
  #main .orders-filters button { padding-inline: 2px; font-size: 12px; }
  #main .mock-order .order-item { gap: 8px; padding: 10px; }
  #main .coupon-card { gap: 7px; padding: 12px 10px; }
  #main .coupon-card > div { min-width: 48px; }
  #main .coupon-card section { padding-left: 8px; }
  #main .coupon-card button { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  #main :is(.account-row,.account-stats button,.order-numbers-toggle,.claim-action,.claim-cancel) { transition: none; }
}
#main .number-extra:focus-visible, #main .history-numbers:focus-visible { outline: 3px solid var(--account-focus); outline-offset: 2px; }

/* Account subpages: keep forms, empty states and long content comfortable to use. */
#main .secondary-content { padding-bottom: 24px; }
#main .secondary-empty { margin-bottom: 12px; padding: 22px 14px; }
#main .secondary-empty .ui-icon { width: 36px; height: 36px; }
#main .secondary-empty h2 { margin: 8px 0 4px; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
#main .secondary-empty p { max-width: 28em; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
#main .profile-sheet h2, #main .profile-sheet p { overflow-wrap: anywhere; }
#main .profile-sheet p { line-height: 1.6; }
#main .profile-sheet p + p { margin-top: 6px; }
#main .settings-list button { gap: 10px; }
#main .settings-list button span { min-width: 0; overflow-wrap: anywhere; }
#main .settings-list button small { max-width: 50%; line-height: 1.4; text-align: right; overflow-wrap: anywhere; }
#main .settings-list button b { flex: none; }
#main .secondary-card h2, #main .favorite-card h2 { line-height: 1.4; }
#main .secondary-card small { line-height: 1.5; overflow-wrap: anywhere; }
#main .address-card h2 small { display: inline-block; font-size: 12px; }
#main .secondary-content .account-form .inline-actions { align-items: stretch; }
#main .secondary-content .account-form .inline-actions .secondary-action {
  flex: 1 1 150px;
  width: auto;
  margin: 0;
  border-color: #087c36;
  background: #087c36;
  color: #fff;
}
#main .account-form label:has(input[type=checkbox]) { min-height: 44px; margin-bottom: 8px; }
#main .account-form input[type=checkbox] { flex: none; width: 20px; height: 20px; }
#main .account-form .form-feedback:empty { display: none; }
#main .account-form .form-feedback:not(:empty) { margin: 10px 0 0; color: #aa1f1f; font-size: 13px; }
#main .coupon-card button:disabled { background: #edf1eb; color: #536154; opacity: 1; }
#main .message-card h2 { display: flex; align-items: baseline; gap: 6px; }
#main .message-card .unread-dot { flex: none; }
#main .message-card [data-read-message] { margin-left: 0; }
#main .faq-list details { padding: 8px 0; }
#main .faq-list summary { min-height: 44px; padding: 10px 0; box-sizing: border-box; line-height: 1.5; overflow-wrap: anywhere; }
#main .faq-list details p { margin: 0 0 8px; overflow-wrap: anywhere; }
#main .support-intro :is(h2,p) { overflow-wrap: anywhere; }
#main #supportForm :is(input,textarea) { max-width: 100%; }
#main .benefit-row > div { min-width: 0; }
#main .benefit-row p, #main .member-intro p, #main .support-reply p { overflow-wrap: anywhere; }
#main .business-notes p { margin: 8px 0; }
#main :is(.settings-list button,.inline-actions button,.coupon-card button,#readAllMessages,[data-read-message],.faq-list summary,.account-form input,.account-form textarea,.account-form select):focus-visible {
  outline: 3px solid var(--account-focus);
  outline-offset: 2px;
}

/* Account and participation: quieter surfaces, stronger information hierarchy. */
#main {
  --account-deep: #073e2b;
  --account-green: #0a7044;
  --account-soft: #f3f8f4;
  --account-shadow: 0 5px 18px rgba(12, 54, 33, .07);
}
#main .orders-banner {
  min-height: 88px;
  padding-top: 16px;
  padding-bottom: 17px;
  border-radius: 0 0 18px 18px;
}
#main .orders-banner h2 { letter-spacing: .01em; }
#main .orders-banner p { color: #d7ebdd; }
#main .orders-banner b { display: none; }
#main .orders-filters button {
  border: 1px solid #d5e4d9;
  border-radius: 11px;
  background: #fff;
  color: #3c5747;
  font-weight: 650;
  box-shadow: none;
}
#main .orders-filters button.active {
  border-color: #0a7044;
  background: #0a7044;
  color: #fff;
}
#main #reloadOrders {
  min-height: 44px;
  margin-bottom: 8px;
  border: 1px solid #d6e6da;
  border-radius: 10px;
  background: #fff;
  color: #245b3a;
  font-weight: 650;
  box-shadow: none;
}
#main .mock-order {
  margin-bottom: 16px;
  border: 1px solid #dce9df;
  background: #fff;
  box-shadow: var(--account-shadow);
}
#main .mock-order .order-heading {
  padding: 11px 14px;
  border-bottom: 1px solid #e9f0ea;
  background: #f5f9f5;
}
#main .mock-order .order-heading strong {
  color: #315a41;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .015em;
}
#main .mock-order .order-item { padding: 15px 14px; }
#main .mock-order .order-thumb { border: 1px solid #e4eee5; border-radius: 12px; }
#main .mock-order .order-item-info h3 { margin-bottom: 5px; color: #193b2b; font-size: 16px; }
#main .mock-order .order-item-info p { margin-bottom: 6px; color: #607668; }
#main .mock-order .number-chips span {
  padding: 5px 8px;
  border: 1px solid #b8d8c0;
  border-radius: 8px;
  background: #f1f8f1;
  color: #075c35;
  font-size: 13px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: .035em;
}
#main .mock-order .order-numbers-toggle { border-radius: 9px; background: #f6faf6; }
#main .mock-order .status-line { border-bottom-color: #edf2ee; }
#main .mock-order .status-line .status-label { color: #435c4b; }
#main .mock-order .status-line .badge { border-radius: 999px; }
#main .mock-order .status-line .badge.status-win { border-color: #af131b; background: #c81720; }
#main .order-draw { margin: 12px 0; }
#main .order-draw-title { letter-spacing: .02em; }
#main .order-countdown { font-weight: 750; }
#main .order-draw p strong { font-variant-numeric: tabular-nums; letter-spacing: .025em; }
#main .prize-claim {
  padding: 15px 14px;
  border: 1px solid #f0c8c4;
  background: #fff8f7;
}
#main .claim-heading strong { color: #a81820; }
#main .claim-heading > span { color: #654945; }
#main .claim-steps { margin: 15px 0 14px; }
#main .claim-steps li > span { width: 26px; height: 26px; }
#main .claim-steps li:before { top: 12px; }
#main .claim-action { background: #c81720; }
#main .mock-order .order-details summary { color: #24583b; font-weight: 700; }

/* Keep the account page coherent with the participation cards. */


#main .account-profile .avatar-photo { border-color: rgba(255,255,255,.8); box-shadow: none; }
#main .account-overview .membership-card {
  border: 1px solid rgba(230, 212, 148, .5);
  background: rgba(4, 49, 31, .72);
  box-shadow: none;
}
#main .account-stats,
#main .account-menu,
#main .secondary-card,
#main .coupon-card,
#main .settings-list {
  border-color: #e0ebe2;
  background: #fff;
  box-shadow: var(--account-shadow);
}
#main .account-stats strong { color: #173e2a; }
#main .account-menu .account-row { border-bottom-color: #edf2ee; }
#main .account-menu .account-row strong { color: #243f30; }
#main .account-menu .menu-icon { color: #176744; }
#main .guest-identity-note { border: 1px solid #e1ebe1; background: #f5f9f3; color: #4a6251; }
#main .history-intro { background: #edf6ee; }
#main .history-card { border-color: #deebe0; }
#main .history-card-head h2 { color: #193e2b; }
#main .history-card-head p { font-size: 12px; }

@media (max-width: 350px) {
  #main .mock-order .order-item { gap: 8px; padding: 12px 10px; }
}
#main .membership-card strong { color: #f6e6ad; text-shadow: none; }
#main .membership-card small { color: #e6eee7; line-height: 1.4; }
#main .membership-card button {
  min-height: 44px;
  border: 1px solid #ead795;
  border-radius: 10px;
  background: #f5e6b3;
  color: #3b361c;
  box-shadow: none;
  text-shadow: none;
}

/* Nombor identity: a restrained emerald canvas, warm metal and clear paper. */
#main {
  --account-deep: #073b2b;
  --account-green: #08784b;
  --account-ink: #183b30;
  --account-muted: #61776a;
  --account-line: #e3e9df;
  --account-soft: #f6f8f2;
  --account-focus: #08784b;
  --account-shadow: 0 8px 22px rgba(25, 59, 42, .055);
}

/* Participation opens with an unmistakable, quiet title area. */
#main .orders-top,
#main .history-top,
#main .secondary-top {
  color: #173b2a;
}
#main .orders-top h1,
#main .history-top h1,
#main .secondary-top h1 {
  color: #173b2a;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .01em;
}
#main .orders-top button,
#main .history-top button,
#main .secondary-top button { color: #173b2a; }
#main .orders-banner {
  min-height: 104px;
  margin-bottom: 16px;
  padding: 18px 18px 20px;
  border: 0;
  border-radius: 0 0 22px 22px;
}
#main .orders-banner .orders-banner-icon {
  top: 17px;
  left: 17px;
  width: 43px;
  height: 43px;
  border: 1px solid #cbded0;
  border-radius: 13px;
  color: #08784b;
}
#main .orders-banner .orders-banner-icon .ui-icon { width: 23px; height: 23px; }
#main .orders-banner h2 { margin: 1px 0 5px 55px; color: #173b2a; font-weight: 720; }
#main .orders-banner p { margin-left: 55px; color: #50675a; font-size: 12px; }
#main .orders-filters {
  gap: 5px;
  margin: 0 0 10px;
  padding: 4px;
  border: 1px solid #e2e9e0;
  border-radius: 15px;
  background: #eef2ea;
}
#main .orders-filters button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #526a5c;
  font-weight: 650;
}
#main .orders-filters button.active {
  border-color: #166445;
  background: #08784b;
  box-shadow: 0 2px 6px rgba(7,59,43,.16);
  color: #fff;
}
#main #reloadOrders {
  min-height: 40px;
  margin-bottom: 10px;
  padding: 7px 12px;
  border: 1px solid #dce6da;
  border-radius: 10px;
  background: #fff;
  color: #285840;
}

/* Orders read as one piece, with status and number information carrying the emphasis. */
#main .mock-order {
  margin-bottom: 18px;
  border: 1px solid #e0e8dc;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(20,53,37,.055);
}
#main .mock-order .order-heading {
  padding: 11px 14px;
  border-bottom: 1px solid #ecefe7;
  background: #f7f8f2;
}
#main .mock-order .order-heading strong { color: #3d6250; font-size: 12px; letter-spacing: .01em; }
#main .mock-order .order-heading small { color: #748379; font-size: 11px; }
#main .mock-order .order-item { gap: 12px; padding: 16px 14px; border-bottom-color: #edf0e9; }
#main .mock-order .order-thumb {
  border: 1px solid #e0e8d9;
  border-radius: 13px;
  box-shadow: 0 3px 9px rgba(6,48,30,.12);
}
#main .mock-order .order-item-info h3 { color: #183b30; font-size: 15px; line-height: 1.4; font-weight: 750; }
#main .mock-order .order-item-info p { color: #667c6d; }
#main .mock-order .number-chips { gap: 5px; }
#main .mock-order .number-chips span {
  border: 1px solid #cbded1;
  border-radius: 8px;
  background: #f3f8f2;
  color: #08613d;
  font-weight: 750;
  letter-spacing: .03em;
}
#main .mock-order .order-numbers-toggle {
  border-color: #d6e6da;
  background: #f7faf5;
  color: #176444;
}
#main .mock-order .order-bottom { padding: 2px 14px 10px; }
#main .mock-order .status-line { min-height: 48px; border-bottom: 1px solid #edf0e9; }
#main .mock-order .status-line .status-label { color: #4d6657; font-size: 13px; font-weight: 650; }
#main .mock-order .status-label .ui-icon { color: #18805a; }
#main .mock-order .status-line .badge { padding: 5px 10px; border-radius: 9px; font-size: 12px; }
#main .mock-order .status-line .badge.status-win { border-color: #ae1421; background: #c51f2c; }
#main .order-draw { margin: 14px 0; padding: 14px; border-radius: 12px; }
#main .order-draw.status-win { border-color: #edb3b3; background: #fff2f1; color: #a31825; }
#main .order-draw.status-win .order-draw-title { color: #a31825; }
#main .order-draw.status-miss, #main .order-draw.status-inactive { border-color: #dbe3e4; background: #f4f7f6; color: #51635e; }
#main .order-draw.status-awaiting { border-color: #d5e6d6; background: #f3f8f1; color: #285b3e; }
#main .order-draw.status-awaiting .order-draw-title { color: #527260; }
#main .order-draw-title { font-size: 12px; font-weight: 750; }
#main .order-countdown { font-size: 20px; font-variant-numeric: tabular-nums; }
#main .mock-order .order-details summary { color: #1d6345; }

/* Red is reserved for a win and the action the winner must take. */
#main .prize-claim {
  margin: 14px 0;
  padding: 15px 14px;
  border: 1px solid #efd3cb;
  border-radius: 13px;
  background: #fffaf7;
}
#main .claim-heading strong { color: #a31825; font-size: 15px; }
#main .claim-heading > span { color: #705954; }
#main .claim-steps li.is-done > span { background: #e6f2e9; color: #176143; }
#main .claim-steps li.is-current > span { background: #c51f2c; color: #fff; }
#main .claim-steps li.is-current { color: #a31825; }
#main .claim-action { border-color: #b91a26; background: #c51f2c; }

/* Account profile and membership spacing. */
#main .account-overview {
  padding-top: max(18px, env(safe-area-inset-top));
  padding-bottom: 15px;
}
#main .account-screen .account-hero { padding-top: 5px; padding-bottom: 12px; }
#main .account-profile { min-height: 52px; gap: 12px; }
#main .account-profile .avatar-photo { width: 52px; height: 52px; border: 2px solid #e9d19b; box-shadow: none; }
#main .account-profile h1 { color: #173b2a; font-size: 20px; font-weight: 720; }
#main .account-profile p { color: #50675a; font-size: 12px; }
#main .account-overview .membership-card {
  min-height: 74px;
  padding: 11px 13px;
  border: 1px solid rgba(215,174,85,.46);
  border-radius: 15px;
  background: #114f38;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
#main .membership-card strong { color: #f2dea8; font-size: 16px; }
#main .membership-card small { color: #d8e7d9; font-size: 11px; }
#main .membership-card button {
  min-height: 42px;
  border: 1px solid #e5cb90;
  border-radius: 10px;
  background: #e9d49c;
  color: #3f361f;
  font-size: 12px;
  box-shadow: none;
}
#main .account-stats, #main .account-menu, #main .secondary-card, #main .coupon-card, #main .settings-list {
  border: 1px solid #e3e9de;
  background: #fff;
  box-shadow: var(--account-shadow);
}
#main .account-stats { margin-top: 13px; margin-bottom: 14px; padding: 13px 3px; border-radius: 16px; }
#main .account-stats button { gap: 5px; border-right-color: #edf1e9; }
#main .account-stats .ui-icon { color: #28815e !important; filter: none; }
#main .account-stats button:nth-child(3) .ui-icon { color: #b38635 !important; }
#main .account-stats strong { color: #163e2e; font-size: 20px; }
#main .account-stats small { color: #61766a; font-size: 12px; }
#main .account-menu { padding: 0 16px; border-radius: 16px; }
#main .account-menu .account-row { min-height: 54px; border-bottom-color: #edf1e9; }
#main .account-menu .account-row strong { color: #244435; font-weight: 650; }
#main .account-menu .menu-icon { color: #4e8168; }
#main .account-menu .chevron { color: #8ba293; }
#main .account-trust {
  border: 1px solid #e6eadf;
  border-radius: 14px;
  background: #f4f7ef;
  box-shadow: none;
  color: #4c6a56;
}
#main .account-trust .trust-laurel { opacity: .45; }
#main .guest-identity-note { border-color: #e3e9dc; background: #f6f8f2; color: #5d7061; }

/* History uses gold for published numbers, separate from win and loss states. */
#main .history-intro { padding: 17px; border: 1px solid #dcead9; border-radius: 15px; background: #eef6ec; }
#main .history-intro h2 { color: #1a5137; font-size: 16px; }
#main .history-card { padding: 17px; border: 1px solid #e1e9dd; border-radius: 16px; background: #fff; box-shadow: var(--account-shadow); }
#main .history-card-head h2 { color: #183b30; font-size: 15px; }
#main .history-card-icon, #main .history-intro > span { background: #e8f2e8; color: #18734b; }
#main .history-published { background: #e8f3e9; color: #256846; }
#main .history-numbers span { border-color: #e8d5a6; background: #fbf6e8; color: #815b17; }
#main .secondary-card, #main .coupon-card, #main .settings-list { border-radius: 15px; }
#main .secondary-action { border-color: #08784b; background: #08784b; color: #fff; }

@media (max-width:350px) {
  #main .orders-banner { min-height: 98px; }
  #main .orders-filters { gap: 3px; padding: 3px; }
  #main .orders-filters button { min-height: 42px; padding-inline: 2px; font-size: 12px; }
  #main .mock-order .order-heading { padding-inline: 10px; }
  #main .mock-order .order-item { gap: 8px; padding: 13px 10px; }
  #main .mock-order .order-item-info h3 { font-size: 14px; }
  #main .mock-order .number-chips span { padding: 4px 5px; font-size: 12px; }
  #main .mock-order .order-bottom { padding-inline: 10px; }
  #main .claim-steps { gap: 2px; }
  #main .claim-steps li > b { font-size: 11px; }
  #main .membership-card small { font-size: 11px; }
}

/* Readable secondary text and consistent finger-sized actions. */
#main .mock-order .order-heading small { color: #596f60; }
#main .orders-filters button, #main #reloadOrders, #main .membership-card button { min-height: 44px; }
#main .orders-top button, #main .history-top button, #main .secondary-top button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
}
/* Balance the back button so secondary-page titles stay centered. */
#main .secondary-top .header-spacer { flex: 0 0 44px; }

/* Consistent, legible detail across orders and account subpages. */
#main .mock-order .order-heading strong { white-space: normal; }
#main .mock-order .order-heading small { color: #52695a; font-size: 12px; }
#main .claim-steps li > b { font-size: 12px; line-height: 1.35; }
#main .claim-form :is(input,textarea),
#main .account-form :is(input:not([type=checkbox]),textarea,select) {
  border-color: #829689;
  color: #183b30;
}
#main .claim-form :is(input,textarea):focus-visible,
#main .account-form :is(input,textarea,select):focus-visible {
  border-color: #08784b;
  outline: 3px solid #9bcbb0;
  outline-offset: 2px;
}
#main .claim-feedback:not(:empty) { margin: 4px 0 8px; color: #9e1c28; font-size: 13px; font-weight: 650; }
#main .secondary-content .secondary-card { margin-bottom: 14px; }
#main .secondary-content .secondary-card :is(h2,h3) { color: #183b30; }
#main .secondary-content .secondary-card p { color: #4f6759; }
#main .coupon-card > div { color: #815b17; font-variant-numeric: tabular-nums; }
#main .coupon-card section { border-left-color: #dccb9d; }
#main .coupon-card button:not(:disabled) { background: #08784b; }
#main .address-card .detail-tag { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 9px; border-radius: 7px; background: #e7f3e9; color: #246642; font-size: 12px; font-weight: 700; }
#main .account-menu .chevron, #main .settings-list button b { color: #627d6d; }
#main .message-card h2 { align-items: center; }
#main .message-card .unread-dot { width: 8px; height: 8px; border-radius: 50%; background: #c51f2c; }
#main .support-reply { border-left-color: #08784b; background: #f0f7f1; color: #244435; }
#main .history-numbers { padding: 2px; scroll-padding: 4px; }
#main .history-number-label span { color: #52695a; font-size: 12px; }
#main .secondary-empty p { margin-inline: auto; color: #52695a; }
@media (max-width: 350px) {
  #main .claim-steps li > b { font-size: 12px; }
  #main .account-menu { padding-inline: 12px; }
  #main .account-menu .account-row { gap: 8px; }
}
/* Preserve five readable step labels on the narrowest screens. */
@media(max-width:350px){#main .prize-claim .claim-steps{margin-left:-6px;margin-right:-6px}}
@media(max-width:350px){#main .prize-claim .claim-steps li>b{max-width:2.1em;margin-inline:auto;line-height:1.25;word-break:break-all}}

/* Focus and long-content details for the account and participation flows. */
#main :is(.orders-filters button,#reloadOrders,.order-details summary):focus-visible {
  outline: 3px solid #08784b;
  outline-offset: 2px;
}
#main :is(.orders-top button,.secondary-top button,.history-top button):focus-visible {
  outline: 3px solid #08784b;
  outline-offset: -3px;
}
#main .account-profile:focus-visible {
  outline: 3px solid #08784b;
  outline-offset: -3px;
}
#main .account-trust strong {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
  line-height: 1.5;
}
#main :is(.number-extra,.history-numbers) {
  scrollbar-width: thin;
  scrollbar-color: #9ab7a3 transparent;
}

/* Commerce emphasis: red identifies a clear purchase, saving or winner action. */
#main .coupon-card {
  border-color: #efded8;
  background: #fffdfb;
}
#main .coupon-card > div,
#main .coupon-card > div :is(strong,small) {
  color: #ad252d;
}
#main .coupon-card section { border-left-color: #e7cec4; }
#main .coupon-card button:not(:disabled) {
  border: 1px solid #9f1d28;
  background: #b5212b;
  color: #fff;
}
#main .coupon-card:has(button:disabled) > div,
#main .coupon-card:has(button:disabled) > div :is(strong,small) { color: #627367; }
#main .order-actions [data-live-pay] {
  border: 1px solid #9f1d28;
  background: #b5212b;
  color: #fff;
}
#main .mock-order .status-line .badge.status-win {
  border-color: #920d1b;
  background: #b01020;
  color: #fff;
}
#main .claim-action {
  border-color: #920d1b;
  background: #b01020;
  color: #fff;
}

/* Account header remains legible on the page canvas. */
#main .account-profile .chevron{color:#24543d}
#main .membership-card>div:nth-child(2){min-width:0}
#main .membership-card small{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere;line-height:1.45}
#main .membership-card button{flex:none}
@media(max-width:350px){
  #main .membership-crown{width:36px;flex-basis:36px}
  #main .membership-crown svg{width:36px;height:36px}
  #main .account-overview .membership-card{gap:7px;padding-inline:10px}
}

/* Account and order details echo the supplied green, gold and red storefront. */
#main .orders-filters{border-color:#e7dbc2;background:#fbf7ed}
#main .orders-filters button{color:#435e4b}
#main .orders-filters button.active{border-color:#075829;background:linear-gradient(180deg,#0a833d,#06702d);color:#fff;box-shadow:0 2px 5px rgba(9,74,39,.2),inset 0 1px 0 rgba(255,255,255,.24)}
#main .mock-order { border-color: #e8ddc9; box-shadow: 0 3px 10px rgba(81,53,18,.09); }
#main .mock-order .order-heading{border-bottom-color:#e9dfcc;background:#fbf6e9}
#main .mock-order .order-heading strong{color:#155f36}
#main .mock-order .order-item{border-bottom-color:#eee6d9}
#main .mock-order .order-thumb{border-color:#e7d4a8}
#main .mock-order .number-chips span{border-color:#b8d9b4;background:#f1faed;color:#075c2e}
#main .mock-order .order-numbers-toggle{border-color:#b9daba;background:#f3faf0;color:#08653b}
#main .mock-order .status-line{border-bottom-color:#eee9df}
#main .mock-order .status-label .ui-icon{color:#07843c}
#main .order-draw.status-win{border-color:#e5a7a5;background:#fff0ee;color:#9b1720}
#main .order-draw.status-win .order-draw-title{color:#a20e1d}
#main .prize-claim{border-color:#e9c983;background:#fffaf0}
#main .claim-heading strong{color:#9d1420}
#main .claim-steps li.is-current>span{background:#ad1620;color:#fff}
#main .claim-action{border-color:#9d1720;background:linear-gradient(180deg,#d52b2b,#b3121b);color:#fff}
#main .history-card{border-color:#e8dfce;background:#fffdfa;box-shadow:0 3px 9px rgba(81,53,18,.07)}
#main .history-card-icon,#main .history-intro>span{background:#f9edcf;color:#755012}
#main .history-numbers span{border-color:#dfc47f;background:#fff7df;color:#76500e}
#main .account-stats,#main .account-menu,#main .secondary-card,#main .settings-list{border-color:#e9e2d4;background:#fffdfa}
#main .coupon-card:has(button:not(:disabled)){border-color:#e8c5b5;background:linear-gradient(110deg,#fffaf2,#fff2ea);box-shadow:0 3px 9px rgba(116,44,24,.09)}
#main .coupon-card button:not(:disabled){border-color:#a61720;background:linear-gradient(180deg,#dc3330,#b51620);color:#fff}
#main .coupon-card:has(button:disabled){background:#f8faf7}
@media(prefers-reduced-motion:reduce){#main .orders-filters button,#main .claim-action,#main .coupon-card button{transition:none}}

/* One continuous green backdrop joins the page title and participation card. */
#main:has(.orders-top){background:linear-gradient(180deg,#003e25 0,#006b34 140px,rgba(0,107,52,0) 195px)}
#main .orders-top.page-top{background:transparent;color:#fff}
#main .orders-top.page-top h1{color:#fff}
#main .orders-top.page-top #ordersHelp{color:#fff}
#main .orders-top.page-top #ordersHelp:focus-visible{outline-color:#fff}

/* Participation card and individual filters follow the reference storefront. */
#main .orders-banner{
  width:100%;min-height:94px;margin:2px 0 12px;padding:19px 14px 17px;
  border:1px solid #b5cf8c;border-radius:16px;
  background:linear-gradient(90deg,rgba(0,59,28,.98) 0%,rgba(0,75,35,.94) 56%,rgba(0,64,31,.52) 100%),url('/home-products.jpg') right center/cover no-repeat;
  box-shadow:0 3px 8px rgba(28,65,31,.18),inset 0 1px 1px rgba(255,242,180,.5);
}
#main .orders-banner .orders-banner-icon{
  top:18px;left:13px;width:42px;height:42px;border:0;border-radius:0;
  color:#d6f5ad;
}
#main .orders-banner .orders-banner-icon .ui-icon{width:32px;height:32px;stroke-width:2}
#main .orders-banner h2{margin:0 0 4px 50px;color:#fff;font-size:19px;font-weight:800;line-height:1.3}
#main .orders-banner p{max-width:75%;margin:0 0 0 50px;color:#effbe9;font-size:11px;line-height:1.4}
#main .orders-filters{gap:6px;margin-bottom:8px;padding:0;border:0;border-radius:0;background:transparent}
#main .orders-filters button{
  min-height:44px;padding:7px 3px;border:1px solid #e6dfd5;border-radius:22px;
  background:linear-gradient(180deg,#fff,#f9f7f3);color:#202921;font-weight:750;
  box-shadow:0 2px 5px rgba(57,43,21,.12);
}
#main .orders-filters button.active{
  border-color:#168332;background:linear-gradient(180deg,#17a63b,#087a25);color:#fff;
  box-shadow:0 2px 5px rgba(7,93,35,.25),inset 0 1px 1px rgba(255,255,255,.3);
}
#main .mock-order{margin-bottom:12px;border-color:#e8dfd2;border-radius:16px;background:#fffdfa;box-shadow:0 3px 8px rgba(61,43,21,.11)}
#main .mock-order .order-heading{padding:9px 12px;border-bottom-color:#efe8dc;background:#fffdfa}
#main .mock-order .order-heading strong{color:#087039;font-weight:800}
#main .mock-order .order-item{gap:10px;padding:12px;border-bottom-color:#eee8dc}
#main .mock-order .order-thumb{width:94px;height:94px;border-color:#e3d4a9;border-radius:11px}
#main .mock-order .order-item-info h3{color:#151c17;font-weight:800;line-height:1.3}
#main .mock-order .number-chips span{border-color:#b6d9b1;border-radius:18px;background:linear-gradient(#fff,#e7f7df);color:#08612c;box-shadow:0 1px 2px rgba(20,75,32,.12)}
#main .mock-order .order-bottom{padding:1px 12px 8px}
#main .mock-order .status-line{min-height:44px;border-bottom-color:#eee8dd}
#main .mock-order .status-line .status-label{color:#1d2a21;font-weight:700}
#main .mock-order .status-line .badge.status-win{border-color:#980b17;background:#bf101b;color:#fff}
@media(max-width:350px){
  #main .orders-banner{min-height:90px;padding-block:17px}
  #main .orders-filters{gap:4px}
  #main .orders-filters button{font-size:12px}
  #main .mock-order .order-item{gap:8px;padding:10px}
  #main .mock-order .order-thumb{width:80px;height:80px}
  #main .mock-order .order-bottom{padding-inline:10px}
}

/* Keep account actions proportionate to their labels, including long translations. */
#main .orders-filters button{
  box-sizing:border-box;min-width:0;min-height:44px;height:auto;padding:7px 3px;
  line-height:1.25;text-align:center;white-space:normal;overflow-wrap:anywhere;
}
#main :is(.secondary-content,.mock-order) :is(.inline-actions button,.secondary-action,.order-numbers-toggle,.claim-action,.claim-cancel){
  box-sizing:border-box;min-height:44px;max-width:100%;line-height:1.35;white-space:normal;overflow-wrap:anywhere;
}
#main .secondary-content .inline-actions button{min-width:44px;padding:9px 12px;font-size:14px}
#main .secondary-content .account-form .inline-actions .quiet{margin:0}
#main .secondary-top h1{min-width:0;flex:1 1 auto;line-height:1.2;overflow-wrap:anywhere}
#main .coupon-card button{box-sizing:border-box;min-width:44px;max-width:38%;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
#main .account-menu .coupon-count [data-i18n-key]{color:inherit;float:none;font:inherit}
#main .account-menu .account-points-balance{flex:0 1 auto;min-width:0;max-width:48%;color:#087638;font-size:14px;font-weight:750;line-height:1.35;text-align:right;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
#main .account-menu .account-language-name{flex:0 1 auto;min-width:0;max-width:48%;color:#647c6c;font-size:12px;line-height:1.35;text-align:right;overflow-wrap:anywhere}
#main .account-menu .menu-icon{flex:0 0 24px;justify-content:center}
#main .account-menu .chevron{flex:0 0 auto}
#main .account-menu .account-row strong{flex:1 1 auto;min-width:0}
#main .account-menu .account-row .coupon-count,
html:not(:lang(zh)) #main .account-menu .account-row .coupon-count{flex:0 1 auto;min-width:0;max-width:42%;white-space:normal;overflow-wrap:anywhere;text-align:center;line-height:1.2}
#main .account-subpage :is(.address-card,.favorite-card) .inline-actions{align-items:center;gap:8px}
#main .account-overview .membership-card button{display:inline-flex;align-items:center;justify-content:center;gap:3px}
#main .account-overview .membership-card button>[data-i18n-key]{min-width:0;white-space:normal}
#main :is(#readAllMessages,[data-read-message],.history-error button){box-sizing:border-box;min-height:44px;line-height:1.35}
#main .mock-order .order-heading strong{min-width:0;white-space:normal;overflow-wrap:anywhere}
@media(max-width:350px){#main .orders-banner p{font-size:12px;line-height:1.4}}

/* On narrow screens, longer translations need room without squeezing titles. */
#main .history-screen .history-top :is(h1, button) { color: #fff; }
#main .history-screen .history-top button:focus-visible { outline-color: #f4d56b; }
@media (max-width: 360px) {
  html:not(:lang(zh)) #main .secondary-top { height: auto; min-height: 52px; padding-top: 4px; padding-bottom: 4px; }
  html:not(:lang(zh)) #main .history-card-head { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 10px; align-items: start; }
  html:not(:lang(zh)) #main .history-card-head .history-published { grid-column: 2; justify-self: start; }
}

/* Platform guide: one compact, readable sequence for every locale. */
#main .play-guide .secondary-content{padding-top:16px}
#main .play-guide .secondary-top h1{white-space:normal;overflow-wrap:anywhere}
#main .play-guide-intro{margin:0 0 14px;color:#42604f;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
#main .play-guide-steps{list-style:none;margin:0;padding:0 16px;border:1px solid #e8dfd0;border-radius:16px;background:#fffdfa;box-shadow:0 3px 12px #173e2410}
#main .play-guide-steps li{display:flex;align-items:flex-start;gap:12px;padding:15px 0;min-width:0}
#main .play-guide-steps li+li{border-top:1px solid #eee9df}
#main .play-guide-steps li>div{flex:1;min-width:0}
#main .play-guide-number{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:#e5f4df;color:#087133;font-size:13px;font-weight:800}
#main .play-guide-steps h2{margin:0 0 4px;color:#153d2b;font-size:15px;font-weight:800;line-height:1.4;overflow-wrap:anywhere}
#main .play-guide-steps p{margin:0;color:#506559;font-size:14px;line-height:1.65;overflow-wrap:anywhere}
#main .play-guide-notice{margin:14px 0 0;padding:12px 14px;border:1px solid #f2d69d;border-radius:12px;background:#fff8e8;color:#79551d;font-size:13px;line-height:1.65;overflow-wrap:anywhere}
@media(max-width:350px){
  #main .play-guide-steps{padding-inline:12px}
  #main .play-guide-steps li{gap:10px}
}

#main .points-page .secondary-content{padding-top:16px}
#main .points-summary{display:flex;flex-direction:column;gap:5px;margin-bottom:14px;padding:18px;border:1px solid #d8b64d;border-radius:16px;background:linear-gradient(125deg,#004425,#087343);color:#fff}
#main .points-summary>span{font-size:13px;line-height:1.4;color:#e5f4dd}
#main .points-summary>strong{font-size:32px;line-height:1.1;color:#ffe277;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
#main .points-summary>small{font-size:12px;line-height:1.5;color:#e9f6e8;overflow-wrap:anywhere}
#main .points-list{display:grid;gap:10px}
#main .points-record{min-width:0;padding:14px;border:1px solid #e7dfd0;border-radius:14px;background:#fffdfa;box-shadow:0 3px 10px #493a1b0e}
#main .points-record-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
#main .points-record h2{min-width:0;flex:1;margin:0;color:#173b29;font-size:15px;line-height:1.4;overflow-wrap:anywhere}
#main .points-record-top strong{max-width:45%;color:#087433;font-size:14px;line-height:1.4;text-align:right;overflow-wrap:anywhere}
#main .points-record p,#main .points-record time{display:block;margin:6px 0 0;color:#607268;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
#main .points-empty{padding:22px 14px;text-align:center;color:#5a7060}
#main .points-empty .ui-icon{width:30px;height:30px;color:#08743a}
#main .points-empty h2{margin:8px 0 4px;color:#1d4230;font-size:14px;line-height:1.4;overflow-wrap:anywhere}
#main .points-empty p,#main .points-message,#main .points-end{margin:0;color:#687b6c;font-size:13px;line-height:1.5;overflow-wrap:anywhere;text-align:center}
#main .points-message:not(:empty),#main .points-end{padding-top:15px}
#main .points-more{width:100%;min-height:44px;margin:14px 0 0;padding:9px 14px;border:1px solid #9fc9ab;border-radius:12px;background:#f0f8ef;color:#086634;font-weight:750;line-height:1.3;white-space:normal;overflow-wrap:anywhere}
#main .points-more[hidden],#main .points-empty[hidden],#main .points-end[hidden]{display:none}
#main .points-more:focus-visible{outline:3px solid #e3aa24;outline-offset:2px}
@media(max-width:350px){#main .points-summary{padding:15px}#main .points-record{padding:12px}}

/* Mobile subpages share a readable hierarchy; amounts and charts keep their own emphasis. */
#main{--subpage-title-size:19px;--subpage-heading-size:16px;--subpage-body-size:14px;--subpage-meta-size:12px;--subpage-action-size:14px}
#main :is(.account-subpage,.history-screen,.history-trend-screen,.winner-screen,.detail-screen) :is(.secondary-top,.detail-top) h1{font-size:var(--subpage-title-size);line-height:1.25;min-width:0;overflow-wrap:anywhere;white-space:normal}
#main :is(.account-subpage,.history-screen,.winner-screen) .history-error h2,
#main .account-subpage :is(.secondary-card,.play-guide-steps,.support-intro,.coupon-card) h2,
#main .history-screen .history-page .history-list-head h2,
#main .winner-screen .winner-intro h2,
#main .detail-screen .detail-info h3{font-size:var(--subpage-heading-size);line-height:1.4;overflow-wrap:anywhere}
#main :is(.account-subpage,.history-screen,.winner-screen) .history-error p,
#main .account-subpage :is(.secondary-card,.play-guide-steps,.support-intro,.about-brand,.profile-sheet,.coupon-card,.faq-list) p,
#main .account-subpage :is(.account-form label,.settings-list button,.faq-list summary),
#main .winner-screen .winner-intro p,
#main .detail-screen .product-detail-page .detail-info-panel :is(p,dd),
#main .detail-screen .product-detail-page .detail-info-panel p[data-detail-field]{font-size:var(--subpage-body-size);line-height:1.6;overflow-wrap:anywhere}
#main .account-subpage :is(.secondary-card small,.settings-list button small,.secondary-note,.points-record time,.points-summary small,.coupon-card section small),
#main .winner-screen :is(.winner-result time,.winner-result>div),
#main .history-screen .history-list-head #historyResultCount{font-size:var(--subpage-meta-size);line-height:1.45;overflow-wrap:anywhere}
#main .account-subpage .secondary-content :is(.secondary-action,.points-more,.inline-actions button,.coupon-card button,#readAllMessages,[data-read-message]),
#main .history-screen :is(.history-error button,.history-page #historyServerRetry),
#main .winner-screen .winner-more,
#main .detail-screen .product-detail-page .detail-action button{font-size:var(--subpage-action-size);line-height:1.35;min-height:44px;max-width:100%;white-space:normal;overflow-wrap:anywhere}

/* Let translated account headings grow rather than clip beyond narrow-phone widths. */
#main .account-subpage .secondary-top{height:auto;min-height:52px;padding-block:4px}

/* Long coupon amounts and translated actions may need a second row. */
#main .account-subpage .coupon-card{flex-wrap:wrap}
#main .account-subpage .coupon-card>div{flex:0 1 auto;min-width:48px;max-width:100%}
#main .account-subpage .coupon-card>div strong{min-width:0;overflow-wrap:anywhere}
#main .account-subpage .coupon-card section{flex:1 1 110px;min-width:0}
#main .account-subpage .coupon-card button{flex:0 1 auto;max-width:100%;overflow-wrap:anywhere}

/* Small account actions keep a 44px touch target while the visible surface
   sits closer to the label. Long translations grow instead of clipping. */
#main .account-subpage .secondary-content :is(.inline-actions button:not(.secondary-action),.coupon-card button,#readAllMessages,[data-read-message],.points-more),
dialog.language-dialog > .quiet{
  position:relative;isolation:isolate;box-sizing:border-box;min-width:44px;min-height:44px;height:auto;
  padding:8px 12px;border:0!important;background:transparent!important;box-shadow:none!important;
  font-size:14px;line-height:1.3;text-align:center;white-space:normal;overflow-wrap:anywhere;
}
#main .account-subpage .secondary-content :is(.inline-actions button:not(.secondary-action),.coupon-card button,#readAllMessages,[data-read-message],.points-more)::before,
dialog.language-dialog > .quiet::before{
  content:'';position:absolute;z-index:-1;inset:4px 0;pointer-events:none;
  border:1px solid #cbdccd;border-radius:11px;background:#f4f8f2;
}
#main .account-subpage .secondary-content :is([data-delete-address],[data-remove-favorite]){color:#ad3022}
#main .account-subpage .secondary-content :is([data-delete-address],[data-remove-favorite])::before{border-color:#efd1c9;background:#fff7f4}
#main .account-subpage .coupon-card button:not(:disabled)::before{border-color:#a61720;background:linear-gradient(180deg,#dc3330,#b51620)}
#main .account-subpage .coupon-card button:disabled::before{border-color:#dce5dc;background:#edf1eb}
#main .account-subpage .secondary-content .points-more{width:fit-content;margin-inline:auto}
dialog.language-dialog > .quiet{display:block;width:fit-content;max-width:100%;margin-inline:auto;color:#08642d}
