/* Order cards remain flexible for translated and user-supplied content. */
#main .orders-screen{--filter-control-inline-padding:10px;min-width:0}
#main .orders-screen .orders-filters{display:flex;overflow-x:auto;overscroll-behavior-x:contain}
#main .orders-screen .orders-filters button{flex:0 0 auto;min-height:var(--filter-control-min-height,44px);height:auto;white-space:normal;line-height:1.25}
/* Non-Chinese labels keep their full width; the arrow exposes additional filters. */
#main .orders-screen .orders-filters-row{display:contents}
#main .orders-screen .orders-filter-page{display:contents}
#main .orders-screen .orders-filter-next{display:none}
/* Chinese keeps four filters visible while using the available width. */
html:lang(zh) #main .orders-screen .orders-filters{gap:4px;overflow:visible}
html:lang(zh) #main .orders-screen .orders-filters button{box-sizing:border-box;flex:1 1 0;min-width:0;min-height:44px;height:auto;padding:8px 3px;font-size:12px;line-height:1.25;white-space:normal;word-break:normal;overflow-wrap:anywhere}
html:not(:lang(zh)) #main .orders-screen .orders-filters-row{display:flex;align-items:center;gap:var(--filter-control-gap,6px);min-width:0;margin:0 0 8px}
html:not(:lang(zh)) #main .orders-screen .orders-filters{flex:1 1 0;width:auto;min-width:0;margin:0;padding:4px 1px 8px;gap:var(--filter-control-gap,6px);overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;scrollbar-width:none;-webkit-overflow-scrolling:touch}
html:not(:lang(zh)) #main .orders-screen .orders-filters::-webkit-scrollbar{display:none}
html:not(:lang(zh)) #main .orders-screen .orders-filter-page{display:flex;flex-wrap:nowrap;align-items:stretch;flex:0 0 auto;width:max-content;min-width:0;gap:var(--filter-control-gap,6px);scroll-snap-align:start}
html:not(:lang(zh)) #main .orders-screen .orders-filters button{box-sizing:border-box;flex:0 0 auto;width:auto;min-width:max-content;max-width:none;min-height:var(--filter-control-min-height,44px);height:auto;padding:9px var(--filter-control-inline-padding,12px);font-size:13px;line-height:1.25;white-space:nowrap;word-break:normal;overflow-wrap:normal}
html:not(:lang(zh)) #main .orders-screen .orders-filters button span{white-space:nowrap;word-break:normal;overflow-wrap:normal}
@media(max-width:349px){
  #main .orders-screen{--filter-control-inline-padding:8px}
  html:not(:lang(zh)) #main .orders-screen .orders-filters button{font-size:12px}
}
html:not(:lang(zh)) #main .orders-screen .orders-filter-next{display:grid;place-items:center;box-sizing:border-box;flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:14px;background:#e8f3e7;color:#126337;font-size:22px;line-height:1;cursor:pointer}
#main .orders-screen .orders-filter-next[hidden]{display:none!important}
#main .orders-screen .orders-filter-next:focus-visible{outline:3px solid #8bcf90;outline-offset:2px}
#main .orders-screen .mock-order .order-heading{flex-wrap:wrap;align-items:baseline}
#main .orders-screen .mock-order .order-heading strong{flex:1 1 135px;min-width:0;overflow-wrap:anywhere}
#main .orders-screen .mock-order .order-heading small{flex:0 1 auto;white-space:normal}
#main .orders-screen .order-item-info,#main .orders-screen .order-bottom{min-width:0}
#main .orders-screen .order-numbers-toggle,#main .orders-screen .claim-action,#main .orders-screen .claim-cancel{height:auto;min-height:44px;max-width:100%;font-size:var(--subpage-action-size,14px);white-space:normal;overflow-wrap:break-word;line-height:1.35}
#main .orders-screen .mock-order .order-item-info h3{font-size:var(--subpage-heading-size,16px);line-height:1.4;overflow-wrap:anywhere}
#main .orders-screen .mock-order .status-line{height:auto;min-height:40px;gap:8px;flex-wrap:wrap;padding-block:6px}
#main .orders-screen .status-line .status-label{flex:1 1 100px;min-width:min(100%,100px);overflow-wrap:break-word;line-height:1.35}
#main .orders-screen .status-line .badge{flex:0 1 auto;min-width:min-content;max-width:100%;height:auto;margin-left:auto;white-space:normal;overflow-wrap:break-word;word-break:normal}
#main .orders-screen .claim-steps li>b{max-width:100%;word-break:normal;overflow-wrap:break-word;hyphens:auto}
#main .orders-screen .claim-heading,#main .orders-screen .claim-form label,#main .orders-screen .order-details{overflow-wrap:break-word}
#main .orders-screen .claim-form input,#main .orders-screen .claim-form textarea{box-sizing:border-box;min-width:0;max-width:100%}
/* The mobile shell is narrow even when its browser viewport is wide. */
html:not(:lang(zh)) #main .orders-screen .claim-steps{grid-template-columns:minmax(0,1fr);gap:0}
html:not(:lang(zh)) #main .orders-screen .claim-steps li{display:grid;grid-template-columns:24px minmax(0,1fr);align-items:start;column-gap:10px;min-height:36px;text-align:left}
html:not(:lang(zh)) #main .orders-screen .claim-steps li:before{top:0;left:11px;width:2px;height:100%}
html:not(:lang(zh)) #main .orders-screen .claim-steps li:first-child:before{top:12px;left:11px;width:2px;height:calc(100% - 12px)}
html:not(:lang(zh)) #main .orders-screen .claim-steps li:last-child:before{top:0;left:11px;width:2px;height:12px}
html:not(:lang(zh)) #main .orders-screen .claim-steps li>b{padding-top:4px;font-size:12px;line-height:1.4;word-break:normal;overflow-wrap:normal;hyphens:none}

/* Compact secondary controls keep a full-height touch area around the visible frame. */
#main .orders-screen :is(#reloadOrders,.order-page-controls button,.order-number-pages button),
#main .history-screen .history-pagination .history-page-button,
#main .winner-screen .winner-more{
  position:relative;isolation:isolate;box-sizing:border-box;min-height:44px;
  border:0;background:transparent;box-shadow:none;padding:8px 10px;
  font-size:13px;line-height:1.3;white-space:normal;overflow-wrap:break-word;
}
#main .orders-screen :is(#reloadOrders,.order-page-controls button,.order-number-pages button)::before,
#main .history-screen .history-pagination .history-page-button::before,
#main .winner-screen .winner-more::before{
  content:'';position:absolute;inset:5px 0;z-index:-1;border:1px solid #d5e4d9;
  border-radius:9px;background:#fff;
}
#main .orders-screen :is(.order-page-controls,.order-number-pages) button:disabled,
#main .history-screen .history-pagination .history-page-button:disabled{color:#83968a}
#main .orders-screen :is(.order-page-controls,.order-number-pages) button:disabled::before,
#main .history-screen .history-pagination .history-page-button:disabled::before{border-color:#e3e8df;background:#f5f6f2}
#main .history-screen .history-pagination .history-page-jump .history-page-button{border:0;background:transparent}
#main .history-screen .history-pagination .history-page-jump .history-page-button::before{border-color:#d8b34b;background:#fff5d7}
#main .winner-screen .winner-more{width:auto;max-width:100%;margin:14px auto 0}
#main .winner-screen .winner-more::before{border-color:#9fc9ab;background:#f0f8ef}
#main .orders-screen :is(.order-page-controls,.order-number-pages)[hidden]{display:none}

/* Equal, aligned tap targets with compact visual capsules. */
#main .orders-screen .orders-filters button{
  position:relative;isolation:isolate;border:0;background:transparent;box-shadow:none;
  text-align:center;font-variant-numeric:tabular-nums;
}
#main .orders-screen .orders-filters button::before{
  content:'';position:absolute;inset:4px 0;z-index:-1;border:1px solid #e6dfd5;
  border-radius:22px;background:linear-gradient(180deg,#fff,#f9f7f3);
  box-shadow:0 2px 5px rgba(57,43,21,.12);
}
#main .orders-screen .orders-filters button.active{background:transparent;box-shadow:none;color:#fff}
#main .orders-screen .orders-filters button.active::before{
  border-color:#168332;background:linear-gradient(180deg,#17a63b,#087a25);
  box-shadow:0 2px 5px rgba(7,93,35,.25),inset 0 1px 1px rgba(255,255,255,.3);
}
#main .orders-screen :is(.order-page-controls,.order-number-pages):not([hidden]){
  display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;gap:8px;max-width:360px;margin:10px auto;
}
#main .orders-screen :is(.order-page-controls,.order-number-pages)>button{min-width:0;max-width:100%}
#main .orders-screen :is(.order-page-controls,.order-number-pages)>span{
  min-width:0;text-align:center;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;
}

/* My numbers: branded header, compact controls and a useful empty state. */
#main:has(.orders-screen){background:radial-gradient(ellipse 88% 250px at 100% 0,#0b754f80 0,transparent 72%),radial-gradient(ellipse 75% 230px at 0 0,#00673c8c 0,transparent 70%),linear-gradient(180deg,#003d2a 0,#004b30 184px,#dce9d4 224px,#f9f4ed 247px,#f9f4ed 100%)}
#main .orders-screen{min-height:calc(100dvh - 80px);padding-bottom:16px}
#main .orders-screen .orders-brand{display:flex;align-items:center;justify-content:center;min-height:54px;padding-top:max(8px,env(safe-area-inset-top));color:#fff9eb;font-size:18px;font-weight:800;letter-spacing:-.5px;line-height:1}
#main .orders-screen .orders-brand span{position:relative}
#main .orders-screen .orders-brand span::before{content:'';position:absolute;width:12px;height:5px;top:-5px;left:13px;border-radius:100% 0;background:#a6d994;transform:rotate(-12deg)}
#main .orders-screen .orders-top.page-top{height:46px;min-height:46px;padding-inline:20px}
#main .orders-screen .orders-top.page-top h1{font-size:20px;line-height:1.25}
#main .orders-screen .orders-top #ordersHelp{width:44px;height:44px;min-height:44px;padding:8px}
#main .orders-screen .orders-top #ordersHelp .ui-icon{width:25px;height:25px}
#main .orders-screen .orders-banner{min-height:99px;margin:5px 0 12px;padding:20px 12px 17px;border:1px solid #d8eaa8;border-radius:16px;background:linear-gradient(90deg,rgba(0,64,38,.98) 0%,rgba(0,77,43,.92) 50%,rgba(0,63,32,.12) 100%),url('/home-products.jpg') right center/cover no-repeat;box-shadow:0 3px 8px #193c2333,inset 0 1px 1px #fff2b880}
#main .orders-screen .orders-banner .orders-banner-icon{top:23px;left:12px;width:45px;height:39px;border-right:1px solid #d4e9b480;color:#e9ffd5}
#main .orders-screen .orders-banner .orders-banner-icon .ui-icon{width:30px;height:30px}
#main .orders-screen .orders-banner h2{margin:0 0 4px 57px;font-size:17px;color:#fff;line-height:1.3}
#main .orders-screen .orders-banner p{max-width:calc(100% - 90px);margin-left:57px;color:#f5fff1;font-size:11px;line-height:1.4;overflow-wrap:break-word}
#main .orders-screen #reloadOrders{display:flex;align-items:center;justify-content:center;gap:5px;width:max-content;max-width:100%;margin:6px 0 9px auto;padding:8px 11px;color:#076537;font-size:13px;font-weight:700}
#main .orders-screen #reloadOrders::before{border-color:#bad9bc;border-radius:9px;background:#fbf7f0}
#main .orders-screen .orders-refresh-icon{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#main .orders-screen .orders-empty{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:0;padding:18px 16px 20px;border:1px solid #fff;border-radius:17px;background:linear-gradient(160deg,#fffcf8,#f9f4ed);box-shadow:0 4px 15px #634d2e0c;text-align:center}
#main .orders-screen .orders-empty[hidden]{display:none}
#main .orders-screen .orders-empty-art{display:block;width:min(64px,55%);height:auto;flex:none}
#main .orders-screen .orders-empty h2{max-width:100%;margin:0;color:#0b3e2c;font-size:14px;font-weight:700;line-height:1.4;overflow-wrap:break-word}
#main .orders-screen #ordersBrowse{position:relative;isolation:isolate;display:inline-flex;align-items:center;justify-content:center;gap:5px;box-sizing:border-box;width:auto;min-width:44px;max-width:100%;min-height:44px;padding:8px 15px;border:0;background:transparent;box-shadow:none;color:#fff;font-size:14px;font-weight:700;line-height:1.3;white-space:normal;overflow-wrap:break-word}
#main .orders-screen #ordersBrowse::before{content:'';position:absolute;inset:4px 0;z-index:-1;border:1px solid #006438;border-radius:20px;background:linear-gradient(120deg,#078044,#004e30);box-shadow:0 2px 5px #00452629}
#main .orders-screen #ordersBrowse span{font-size:18px;line-height:1}
#main .orders-screen #ordersBrowse:focus-visible{outline:3px solid #d6a82a;outline-offset:3px}
@media(max-width:349px){#main .orders-screen .orders-brand{min-height:50px}#main .orders-screen .orders-banner p{max-width:calc(100% - 67px);font-size:10px}#main .orders-screen .orders-empty{padding-inline:12px}}

/* The trend filters keep their 44px tap targets while the visible outlines
   sit closer to the label, including selected and translated states. */
#main .history-trend-screen :is(.history-trend-range-button,.history-trend-position-button){
  position:relative;isolation:isolate;min-height:44px;padding:8px 6px;
  border:0;background:transparent;box-shadow:none;
}
#main .history-trend-screen :is(.history-trend-range-button,.history-trend-position-button)::before{
  content:'';position:absolute;inset:4px 0;z-index:-1;border:1px solid #d3e2d1;
  border-radius:10px;background:#f6faf4;
}
#main .history-trend-screen :is(.history-trend-range-button,.history-trend-position-button)[aria-pressed="true"]{
  background:transparent;box-shadow:none;
}
#main .history-trend-screen :is(.history-trend-range-button,.history-trend-position-button)[aria-pressed="true"]::before{
  border-color:#08733c;background:#e4f4df;box-shadow:inset 0 0 0 1px #08733c;
}
