.legacy-comp-app{
  --lco-accent:#5ec2ff;
  --lco-accent-rgb:94,194,255;
  --lco-pad-x:22px;
  position:relative;min-width:0;min-height:0;overflow:hidden;background:transparent;
  container-type:inline-size;container-name:legacycomp;
}
.lco-header{flex:none;margin-bottom:7px;}
.lco-header h3{font-size:16px;}
.lco-header p{margin-top:3px;font-size:10px;}
.lco-content{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;margin-right:calc(0px - var(--lco-pad-x));padding:0 var(--lco-pad-x) 3px 1px;scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.12) transparent;}
.lco-content::-webkit-scrollbar{width:8px;}
.lco-content::-webkit-scrollbar-thumb{border-radius:999px;background:rgba(255,255,255,.12);}

/* 一行台账摘要，不再使用仪表盘卡片。 */
.lco-summary{height:27px;padding:0 2px;display:flex;align-items:center;gap:12px;color:rgba(255,255,255,.34);font-size:9.5px;}
.lco-summary>div{display:flex;align-items:center;gap:6px;min-width:0;}
.lco-summary .section-title{margin:0 3px 0 0;}
.lco-summary i,.lco-order-meta i{width:2px;height:2px;flex:none;border-radius:50%;background:rgba(255,255,255,.2);}
.lco-summary strong{color:rgba(255,255,255,.72);font-weight:650;font-variant-numeric:tabular-nums;}

/* 单一列表容器复用购买页卡片表面，内部采用原生列表分隔。 */
.lco-orders-shell{display:block;padding:0;overflow:hidden;}
.lco-orders-shell:hover{background:rgba(255,255,255,.015);border-color:rgba(255,255,255,.06);}
.lco-orders-shell:active{transform:none;}
.lco-orders{display:block;}
.lco-order{display:grid;grid-template-columns:78px minmax(0,1fr) 82px 150px;align-items:center;gap:10px;min-width:0;padding:9px 12px;border-bottom:1px solid rgba(255,255,255,.055);transition:background .15s;}
.lco-order:last-child{border-bottom:0;}
.lco-order:hover{background:rgba(255,255,255,.025);}
.lco-cover{width:76px;aspect-ratio:16/9;border-radius:6px;overflow:hidden;background:rgba(255,255,255,.04);
  box-shadow:0 1px 5px rgba(0,0,0,.22),0 0 0 1px rgba(255,255,255,.055);}
.lco-cover img{display:block;width:100%;height:100%;object-fit:cover;}
.lco-main-info{min-width:0;padding-right:4px;}
.lco-order-topline{display:flex;align-items:center;gap:7px;min-width:0;}
.lco-goods-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.lco-status{height:17px;flex:none;display:inline-flex;align-items:center;padding:0 5px;border-radius:4px;background:#24668f;color:#f5f8fb;font-size:8px;font-weight:700;line-height:1;white-space:nowrap;}
.lco-status-pending{background:#555a61;color:#e1e4e8;}
.lco-status-refunded{background:#a84e4a;color:#fff;}
.lco-compensation-state{height:17px;min-width:0;display:inline-flex;align-items:center;gap:3px;padding:0 6px;border:0;border-radius:4px;background:#555a61;color:#e7e9ec;font-size:8px;font-weight:700;line-height:1;white-space:nowrap;}
.lco-compensation-state em{color:inherit;font-style:normal;font-variant-numeric:tabular-nums;}
.lco-compensation-eligible{background:#2f66b5;color:#fff;}
.lco-compensation-redeemed{background:#2d744d;color:#fff;}
.lco-compensation-capped,.lco-compensation-permanent,.lco-compensation-ineligible,.lco-compensation-unknown{background:#555a61;color:#e1e4e8;}
.lco-order[data-compensation-status="redeemed"] .lco-cover{opacity:.48;filter:saturate(.55);}
.lco-order[data-compensation-status="redeemed"] .lco-goods-name,
.lco-order[data-compensation-status="redeemed"] .lco-order-meta,
.lco-order[data-compensation-status="redeemed"] .lco-pay-info{text-decoration-line:line-through;text-decoration-color:rgba(255,255,255,.48);text-decoration-thickness:1px;opacity:.52;}
.lco-order-meta{min-width:0;margin-top:4px;display:flex;align-items:center;gap:5px;overflow:hidden;color:rgba(255,255,255,.34);font-size:9px;line-height:1.25;}
.lco-order-meta span,.lco-order-meta time{flex:none;white-space:nowrap;}
.lco-pay-info{min-width:0;display:flex;flex-direction:column;align-items:flex-end;gap:1px;}
.lco-pay-info .card-price{font-size:15px;}
.lco-pay-info .card-period{margin-left:0;font-size:9px;}
.lco-order-actions{min-width:0;display:flex;align-items:center;justify-content:flex-end;gap:5px;}
.lco-action-btn{height:25px;min-width:45px;padding:0 9px;border-radius:7px;font-size:10px;white-space:nowrap;}
.lco-action-btn.on{background:var(--blue);filter:brightness(1.12);box-shadow:0 0 0 2px rgba(var(--lco-accent-rgb),.13);}
.lco-redeem-btn:not(:disabled){box-shadow:0 0 0 1px rgba(123,179,255,.11),0 4px 12px rgba(12,85,214,.14);}
.lco-redeem-btn:disabled{cursor:not-allowed;filter:none;opacity:.56;}
.lco-redeem-redeemed:disabled{border:0;background:#2d744d;color:#fff;box-shadow:none;opacity:1;}
.lco-content.is-refreshing .lco-orders-shell{opacity:.72;transition:opacity .15s;}

.lco-order-detail{grid-column:1 / -1;min-width:0;margin:1px -12px -9px;padding:8px 12px 9px;border-top:1px solid rgba(255,255,255,.055);background:rgba(0,0,0,.08);}
.lco-order-detail[hidden]{display:none;}
.lco-detail-loading{min-height:38px;display:flex;align-items:center;justify-content:center;gap:8px;color:rgba(255,255,255,.35);font-size:10px;}
.lco-detail-loading .lco-spinner{width:15px;height:15px;}
.lco-detail-head{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:25px;}
.lco-detail-head>div{display:flex;align-items:baseline;gap:7px;min-width:0;}
.lco-detail-head strong{color:rgba(255,255,255,.72);font-size:10.5px;font-weight:600;}
.lco-detail-head span{color:rgba(255,255,255,.28);font-size:9px;}
.lco-detail-list{margin-top:3px;}
.lco-detail-item{min-width:0;padding:8px 0;border-top:1px solid rgba(255,255,255,.05);}
.lco-detail-item-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:5px;}
.lco-detail-item-head>span{min-width:0;overflow:hidden;color:rgba(255,255,255,.4);font-size:9px;text-overflow:ellipsis;white-space:nowrap;}
.lco-detail-item-head>div{display:flex;align-items:center;gap:5px;}
.lco-mini-btn{height:23px;padding:0 8px;border-radius:7px;font-size:9px;white-space:nowrap;}
.lco-detail-item code{display:block;overflow-wrap:anywhere;color:rgba(255,255,255,.68);font:500 9.5px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;user-select:text;}
.lco-detail-empty{padding:9px 0;color:rgba(255,255,255,.34);font-size:10px;text-align:center;}
.lco-detail-error{color:#ff918a;}

.lco-loading,.lco-error,.lco-empty{min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;}
.lco-loading{gap:8px;color:rgba(255,255,255,.34);}
.lco-loading strong{color:rgba(255,255,255,.78);font-size:12px;font-weight:600;}
.lco-loading>span:last-child{font-size:9.5px;}
.lco-spinner{width:24px;height:24px;border:2px solid rgba(var(--lco-accent-rgb),.12);border-top-color:var(--lco-accent);border-radius:50%;animation:lcoSpin .8s linear infinite;}
@keyframes lcoSpin{to{transform:rotate(360deg)}}
.lco-error{gap:8px;padding:28px;color:rgba(255,255,255,.36);}
.lco-error-icon{width:29px;height:29px;display:flex;align-items:center;justify-content:center;border:1px solid rgba(255,95,87,.24);border-radius:50%;color:#ff8179;background:rgba(255,95,87,.06);font-weight:700;}
.lco-error strong,.lco-empty strong{color:rgba(255,255,255,.82);font-size:13px;font-weight:600;}
.lco-error p,.lco-empty span{max-width:390px;margin:0;color:rgba(255,255,255,.34);font-size:10px;line-height:1.5;}
.lco-retry-btn{height:28px;margin-top:3px;padding:0 13px;border-radius:7px;font-size:10px;}
.lco-empty{gap:7px;padding:30px;}
.lco-empty img{width:46px;height:46px;margin-bottom:2px;opacity:.72;}

/* 兑换弹层是一张“权益票据”：强调实际发放天数，而不是再造一套仪表盘。 */
.lco-redeem-layer{position:absolute;inset:0;z-index:45;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(9,11,14,.66);-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);animation:lcoNoticeIn .14s ease-out both;}
.lco-redeem-layer[hidden]{display:none;}
.lco-redeem-dialog{width:min(440px,100%);max-height:calc(100% - 4px);display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(255,255,255,.72);border-radius:14px;background:linear-gradient(160deg,#e8ebe9 0%,#d2d7d4 56%,#bcc3c0 100%);box-shadow:0 28px 76px rgba(0,0,0,.42),inset 0 1px 0 #fff,inset 0 -1px 0 rgba(40,45,48,.15);animation:lcoTicketIn .18s cubic-bezier(.2,.8,.2,1) both;}
.lco-redeem-head{min-height:56px;flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px 9px 16px;border-bottom:1px solid rgba(48,55,58,.18);}
.lco-redeem-head>div{display:flex;flex-direction:column;gap:2px;min-width:0;}
.lco-redeem-head strong{overflow:hidden;color:#252c30;font-size:14px;font-weight:680;text-overflow:ellipsis;white-space:nowrap;}
.lco-redeem-kicker{color:#2f6fbf;font-size:8px;font-weight:700;letter-spacing:.13em;text-transform:uppercase;}
.lco-redeem-close{width:28px;height:28px;flex:none;display:flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:8px;background:transparent;color:#687275;font:400 20px/1 inherit;cursor:pointer;}
.lco-redeem-close:hover{background:rgba(40,45,48,.08);color:#252c30;}
.lco-redeem-close:focus-visible,.lco-redeem-actions .abtn:focus-visible{outline:2px solid #147eff;outline-offset:2px;}
.lco-redeem-close:disabled{cursor:wait;opacity:.35;}
.lco-redeem-body{min-height:0;overflow-y:auto;padding:17px 18px 15px;scrollbar-width:thin;scrollbar-color:rgba(40,45,48,.2) transparent;}
.lco-ticket{position:relative;overflow:hidden;padding:15px 16px 13px;border:1px solid rgba(47,111,191,.32);border-radius:12px;background:linear-gradient(135deg,rgba(47,111,191,.12),rgba(255,255,255,.5));box-shadow:inset 0 1px 0 rgba(255,255,255,.6);}
.lco-ticket::after{content:"";position:absolute;right:-32px;top:-46px;width:138px;height:138px;border:1px solid rgba(47,111,191,.16);border-radius:50%;box-shadow:0 0 0 19px rgba(47,111,191,.03),0 0 0 40px rgba(47,111,191,.02);pointer-events:none;}
.lco-ticket-label{position:relative;z-index:1;color:#5b6469;font-size:9px;font-weight:600;letter-spacing:.03em;}
.lco-ticket-days{position:relative;z-index:1;display:flex;align-items:baseline;gap:5px;margin-top:2px;color:#233; font-variant-numeric:tabular-nums;}
.lco-ticket-days strong{font-size:40px;font-weight:760;line-height:1;letter-spacing:-.055em;color:#1f4f8f;text-shadow:0 4px 14px rgba(35,113,255,.16);}
.lco-ticket-days span{color:#2f6fbf;font-size:13px;font-weight:650;}
.lco-ticket-breakdown{position:relative;z-index:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-top:13px;}
.lco-ticket-breakdown span{min-width:0;display:flex;align-items:center;justify-content:space-between;gap:8px;padding-top:8px;border-top:1px solid rgba(48,55,58,.16);font-size:9px;}
.lco-ticket-breakdown b{overflow:hidden;color:#5b6469;font-weight:550;text-overflow:ellipsis;white-space:nowrap;}
.lco-ticket-breakdown em{flex:none;color:#2c3336;font-style:normal;font-weight:700;font-variant-numeric:tabular-nums;}
.lco-ticket-success{border-color:rgba(42,133,82,.36);background:linear-gradient(135deg,rgba(42,133,82,.14),rgba(255,255,255,.5));}
.lco-ticket-success::after{border-color:rgba(42,133,82,.16);box-shadow:0 0 0 19px rgba(42,133,82,.03),0 0 0 40px rgba(42,133,82,.02);}
.lco-ticket-success .lco-ticket-days strong{color:#2a7d4e;}
.lco-ticket-success .lco-ticket-days span{color:#2a8552;}
.lco-redeem-order{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:3px 10px;margin-top:13px;padding:11px 12px;border:1px solid rgba(48,55,58,.14);border-radius:9px;background:rgba(255,255,255,.4);}
.lco-redeem-order>span{grid-row:1 / 3;color:#7b8488;font-size:8.5px;white-space:nowrap;}
.lco-redeem-order strong{min-width:0;overflow:hidden;color:#2c3336;font-size:10px;font-weight:600;text-overflow:ellipsis;white-space:nowrap;}
.lco-redeem-order code{min-width:0;overflow:hidden;color:#7b8488;font:500 8.5px/1.3 ui-monospace,SFMono-Regular,Consolas,monospace;text-overflow:ellipsis;white-space:nowrap;}
.lco-redeem-body>p{margin:12px 2px 0;color:#5b6469;font-size:9.5px;line-height:1.6;}
.lco-redeem-actions{flex:none;display:flex;align-items:center;justify-content:flex-end;gap:7px;padding:11px 13px;border-top:1px solid rgba(48,55,58,.18);}
.lco-redeem-actions .abtn{height:30px;padding:0 14px;border-radius:8px;font-size:10px;}
.lco-redeem-confirm{min-width:118px;}
.lco-redeem-confirm:disabled{cursor:wait;opacity:.72;}
.lco-redeem-error-mark{width:38px;height:38px;display:flex;align-items:center;justify-content:center;margin:2px auto 10px;border:1px solid rgba(196,68,58,.36);border-radius:50%;background:rgba(196,68,58,.1);color:#c4443a;font-size:18px;font-weight:750;}
.lco-redeem-error-copy{margin:0 auto 13px!important;max-width:330px;color:#9b332a!important;font-size:10.5px!important;text-align:center;}
@keyframes lcoTicketIn{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}

.lco-notice{position:absolute;inset:0;z-index:40;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(10,12,15,.62);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);animation:lcoNoticeIn .14s ease-out both;}
.lco-notice.closing{pointer-events:none;animation:lcoNoticeOut .14s ease-in both;}
.lco-notice-dialog{width:min(520px,100%);max-height:calc(100% - 4px);display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(255,255,255,.72);border-radius:11px;background:linear-gradient(160deg,#e8ebe9 0%,#d2d7d4 56%,#bcc3c0 100%);box-shadow:0 24px 64px rgba(0,0,0,.38),inset 0 1px 0 #fff,inset 0 -1px 0 rgba(40,45,48,.15);animation:lcoNoticeDialogIn .16s cubic-bezier(.2,.8,.2,1) both;}
.lco-notice-head{height:43px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 12px 0 16px;border-bottom:1px solid rgba(48,55,58,.18);}
.lco-notice-head strong{color:#252c30;font-size:13px;font-weight:650;letter-spacing:-.004em;}
.lco-notice-close{width:27px;height:27px;display:flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:7px;background:transparent;color:#687275;font:400 20px/1 inherit;cursor:pointer;}
.lco-notice-close:hover{background:rgba(40,45,48,.08);color:#252c30;}
.lco-notice-close:focus-visible{outline:2px solid #147eff;outline-offset:1px;}
.lco-notice-body{min-height:0;overflow-y:auto;padding:17px 18px 18px;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.12) transparent;}
.lco-notice-body p{margin:0;color:#4f585c;font-size:12px;font-weight:520;line-height:1.8;text-align:left;user-select:text;}
.lco-notice-body p+p{margin-top:10px;}
.lco-notice-actions{flex:none;display:flex;justify-content:flex-end;padding:11px 14px;border-top:1px solid rgba(48,55,58,.18);}
.lco-notice-confirm{height:30px;padding:0 16px;border-radius:8px;font-size:11px;}
@keyframes lcoNoticeIn{from{opacity:0}to{opacity:1}}
@keyframes lcoNoticeOut{to{opacity:0}}
@keyframes lcoNoticeDialogIn{from{opacity:0;transform:translateY(5px) scale(.985)}to{opacity:1;transform:none}}

@container legacycomp (max-width:720px){
  .legacy-comp-app{--lco-pad-x:16px;padding:16px;}
  .lco-order{grid-template-columns:72px minmax(0,1fr) 76px 150px;gap:9px;padding:9px 10px;}
  .lco-cover{width:70px;}
  .lco-order-detail{margin-right:-10px;margin-left:-10px;}
}

@container legacycomp (max-width:500px){
  .legacy-comp-app{--lco-pad-x:10px;padding:13px 10px 16px;}
  .lco-header{margin-bottom:5px;}
  .lco-notice,.lco-redeem-layer{padding:10px;}
  .lco-notice-dialog,.lco-redeem-dialog{max-height:calc(100% - 2px);border-radius:10px;}
  .lco-notice-body{padding:15px 16px 16px;}
  .lco-notice-body p{font-size:11px;line-height:1.72;}
  .lco-summary{height:25px;overflow:hidden;}
  .lco-summary .section-title,.lco-summary [data-summary-paid],.lco-summary i:first-of-type{display:none;}
  .lco-order{grid-template-columns:66px minmax(0,1fr);gap:8px;padding:9px;}
  .lco-cover{width:64px;}
  .lco-order-topline{align-items:flex-start;flex-wrap:wrap;gap:4px 6px;}
  .lco-goods-name{flex-basis:100%;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
  .lco-order-meta span:first-child{max-width:150px;overflow:hidden;text-overflow:ellipsis;}
  .lco-pay-info{grid-column:1;align-items:flex-start;}
  .lco-order-actions{grid-column:2;justify-content:flex-start;flex-wrap:wrap;}
  .lco-order-detail{margin-right:-9px;margin-left:-9px;}
  .lco-detail-item-head{align-items:flex-start;}
  .lco-detail-item-head>div{flex-wrap:wrap;justify-content:flex-end;}
  .lco-redeem-head{min-height:52px;padding-left:14px;}
  .lco-redeem-body{padding:14px;}
  .lco-ticket{padding:14px;}
  .lco-ticket-days strong{font-size:35px;}
  .lco-ticket-breakdown{grid-template-columns:1fr;gap:2px;}
  .lco-redeem-order{grid-template-columns:1fr;}
  .lco-redeem-order>span{grid-row:auto;}
  .lco-redeem-actions{padding:10px;}
  .lco-redeem-actions .abtn{flex:1;min-width:0;padding:0 9px;}
}

@media (prefers-reduced-motion:reduce){
  .legacy-comp-app .abtn,.lco-order,.lco-content.is-refreshing .lco-orders-shell{transition:none;}
  .lco-spinner{animation:none;}
  .lco-redeem-dialog,.lco-redeem-layer,.lco-notice,.lco-notice-dialog{animation:none;}
}

/* 主窗口关闭确认：复用公告同款浅色弹窗，但挂在 document 根部覆盖登录页与桌面。 */
.window-close-prompt{position:fixed;z-index:100000;}
.window-close-prompt[hidden]{display:none!important;}
.window-close-dialog{width:min(460px,100%);}
.window-close-body{display:flex;flex-direction:column;gap:13px;}
.window-close-body p{margin:0;}
.window-close-remember{display:flex;align-items:center;gap:9px;padding:10px 11px;border:1px solid rgba(48,55,58,.14);border-radius:8px;background:rgba(255,255,255,.24);color:#4f585c;font-size:11.5px;line-height:1.4;cursor:pointer;user-select:none;}
.window-close-remember:hover{background:rgba(255,255,255,.42);border-color:rgba(48,55,58,.22);}
.window-close-remember input{flex:none;width:15px;height:15px;margin:0;accent-color:#147eff;cursor:pointer;}
.window-close-error{margin-top:-3px;color:#9b332a;font-size:11px;line-height:1.5;}
.window-close-actions{align-items:center;gap:8px;}
.window-close-actions .abtn.gray{height:30px;padding:0 14px;border-radius:8px;background:rgba(40,45,48,.08);color:#4f585c;font-size:11px;}
.window-close-actions .abtn.gray:hover{background:rgba(40,45,48,.16);color:#252c30;}
.window-close-actions .abtn:disabled{cursor:wait;opacity:.62;}

@media (max-width:500px){
  .window-close-prompt{padding:10px;}
  .window-close-body{padding:15px 16px 16px;}
  .window-close-actions{padding:10px;}
  .window-close-actions .abtn{flex:1;min-width:0;padding-inline:8px;}
}
