/* Reference layout translated into existing UDS navy/coral tokens and both themes. */
.content[data-reference] .view-head { position:relative; min-height:72px; padding-top:20px; padding-bottom:20px; }
.content[data-reference] .view-head h1 { font-size:21px; line-height:1.2; text-align:center; padding:0 32px; }
.content[data-reference] .view-head .back { position:absolute; left:20px; top:14px; width:40px; height:40px; }
.content[data-reference] .page-body { padding-bottom:24px; }
.content[data-reference] .card { box-shadow:0 3px 12px #23356C09; }
.ref-balance { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:20px; min-height:150px; margin-bottom:12px; }
.ref-balance > div { position:relative; z-index:1; min-width:0; }
.ref-balance p { margin:0 0 8px; font-size:13px; }
.ref-balance .loyalty-balance { font-size:36px; white-space:nowrap; letter-spacing:-.7px; }
.ref-balance .loyalty-balance small { font-size:15px; }
.ref-balance > div > small { display:block; margin-top:8px; color:#E1E8FB; font-size:10px; }
.ref-balance > img { flex:none; width:98px; height:110px; object-fit:contain; margin-right:-10px; }
.ref-quick { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-bottom:12px; }
.ref-quick button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; min-height:86px; padding:12px 8px; border:1px solid var(--line); border-radius:var(--radius-16); color:var(--ink); background:linear-gradient(145deg,#FFFFFFE6,#E9EEF8D9); }
.ref-quick .icon { width:25px; height:25px; color:var(--theme-accent); }
.ref-quick span { max-width:75px; font-size:12px; line-height:1.25; text-align:center; }
.ref-between { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.ref-icon-box { display:grid; place-items:center; width:36px; height:36px; flex:none; border-radius:10px; background:var(--theme-surface-raised); color:var(--theme-accent); font-size:24px; }
.ref-privilege { padding:14px; }
.page-body .ref-privilege h3 { font-size:13px; margin:0 0 4px; }
.page-body .ref-privilege p { color:var(--muted); font-size:11px; margin:0; }
.ref-privilege > .ref-between + .ref-between { margin-top:12px; }
.ref-privilege progress { flex:1; min-width:0; }
.ref-privilege small { flex:none; font-size:10px; color:var(--muted); }
.ref-expiry { display:flex; align-items:center; gap:12px; padding:12px 14px; border-color:#D9AC6A55; background:linear-gradient(110deg,#FFF4DEEB,#F9ECD8E0); }
.ref-expiry-icon { color:#CF6B3E; flex:none; }
.ref-expiry strong { display:block; font-size:13px; }
.ref-expiry small { display:block; margin-top:4px; font-size:11px; color:#74624B; }
.ref-section-title { display:flex; align-items:center; justify-content:space-between; margin:20px 0 10px; }
.page-body .ref-section-title h2 { margin:0; font-size:17px; }
.ref-section-title .text-button { padding:0; min-height:28px; font-size:12px; }
.ref-history-filters { padding:0; margin-bottom:10px; gap:6px; }
.ref-history-filters .chip { min-height:30px; padding:6px 10px; font-size:11px; }
.ref-ledger { padding:0 14px; }
.ref-operation { display:grid; grid-template-columns:62px 22px minmax(0,1fr) 38px; align-items:start; gap:8px; padding:14px 0; border-bottom:1px solid var(--line); }
.ref-operation:last-child { border-bottom:0; }
.ref-operation-amount strong { display:block; font-size:18px; line-height:1.1; }
.ref-operation-amount small { display:block; font-size:10px; margin-top:4px; color:var(--muted); }
.ref-operation-amount.positive { color:#27704D; }
.ref-operation-amount.negative { color:#B14737; }
.ref-operation-icon { color:var(--theme-accent); }
.ref-operation-icon .icon { width:20px; height:20px; }
.ref-operation-text { font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.ref-operation time { font-size:10px; color:var(--muted); text-align:right; line-height:1.4; }
.ref-details { margin-top:12px; padding:14px 16px; }
.ref-plan-filters { padding:0; margin:12px 0 14px; }
.ref-plan { padding:14px; border-radius:var(--radius-16); margin-bottom:12px; }
.ref-plan-head { display:grid; grid-template-columns:44px minmax(0,1fr) auto; gap:10px; align-items:center; }
.ref-plan-head h2 { margin:0; font-size:17px; line-height:1.15; }
.page-body .ref-plan-head p { margin:4px 0 0; font-size:11px; line-height:1.3; }
.ref-plan-art { display:grid; place-items:center; width:44px; height:44px; border-radius:12px; background:var(--theme-surface-raised); }
.ref-plan-art img { width:42px; height:42px; object-fit:contain; }
.ref-badge { display:inline-block; flex:none; padding:5px 8px; color:#805A2F; background:#F7E5C7; border-radius:var(--radius-1000); font-size:10px; white-space:nowrap; font-weight:600; }
.ref-plan .list-plain { margin:12px 0; font-size:12px; line-height:1.35; }
.ref-plan .list-plain li { margin:4px 0; }
.ref-plan .plan-footer { flex-direction:row; align-items:center; }
.ref-plan .plan-footer > strong { font-size:21px; }
.ref-plan .plan-footer small { font-size:10px; }
.ref-plan .plan-footer .primary { min-height:36px; padding:8px 14px; font-size:12px; width:auto; }
.ref-membership { position:relative; isolation:isolate; overflow:hidden; min-height:180px; padding:20px; }
.ref-membership-art { position:absolute; right:-13px; bottom:-17px; width:170px; height:170px; object-fit:contain; z-index:-2; }
.ref-membership::after { content:""; position:absolute; inset:0; z-index:-1; pointer-events:none; background:linear-gradient(90deg,#23356CE0 20%,#23356C55 65%,transparent); }
.ref-membership .status { position:absolute; top:16px; right:16px; font-size:10px; padding:5px 9px; }
.page-body .ref-membership h2 { display:flex; align-items:center; gap:8px; max-width:72%; font-size:25px; margin:0 0 16px; line-height:1.15; }
.ref-membership h2 .icon { width:26px; height:26px; }
.page-body .ref-membership p { font-size:11px; margin:6px 0; max-width:73%; }
.ref-membership-date { display:flex; align-items:center; gap:8px; }
.ref-membership-date .icon { width:16px; height:16px; }
.ref-membership > strong { display:block; margin-top:14px; font-size:16px; }
.ref-membership > strong small { font-size:10px; font-weight:400; }
.ref-allowance { padding:14px; }
.ref-allowance-head { display:grid; grid-template-columns:36px minmax(0,1fr) 58px; align-items:center; gap:9px; }
.ref-allowance-art img { display:block; width:36px; height:36px; object-fit:contain; }
.page-body .ref-allowance h3 { font-size:13px; line-height:1.25; margin:0 0 4px; }
.ref-allowance small { font-size:11px; color:var(--muted); }
.ref-used { text-align:right; }
.ref-used strong { display:block; font-size:12px; }
.ref-used small { display:block; font-size:9px; margin-top:4px; }
.ref-allowance progress { display:block; margin:14px 0 8px; }
.ref-allowance .text-button { width:auto; font-size:11px; min-height:28px; padding:0; }
.ref-feature-list { padding:0 14px; }
.ref-feature { display:flex; align-items:center; gap:10px; padding:12px 0; border-bottom:1px solid var(--line); }
.ref-feature:last-child { border-bottom:0; }
.ref-feature > span:nth-child(2) { flex:1; min-width:0; }
.ref-feature strong { display:block; font-size:13px; }
.ref-feature small { display:block; color:var(--muted); font-size:11px; line-height:1.4; margin-top:4px; }
.ref-feature > .ref-badge { font-size:13px; }
.ref-order-summary { display:flex; align-items:center; gap:14px; padding:14px; }
.ref-order-thumb { display:grid; place-items:center; flex:none; width:70px; height:76px; border-radius:12px; background:var(--theme-surface-raised); }
.ref-order-thumb img { width:64px; height:64px; object-fit:contain; }
.page-body .ref-order-summary h3 { margin:0 0 5px; font-size:15px; line-height:1.3; }
.page-body .ref-order-summary p { margin:0 0 7px; color:var(--muted); font-size:11px; }
.ref-order-summary strong { font-size:19px; color:var(--theme-accent); }
.ref-checkout .market-total .info-pair { padding:9px 0; font-size:13px; }
.ref-checkout .market-total .total { font-size:17px; }
.ref-checkout .ref-bonus-switch { border:0; padding:8px 0; background:transparent; gap:12px; }
.ref-bonus-switch input[type="checkbox"] { appearance:none; -webkit-appearance:none; position:relative; flex:none; width:44px; min-width:44px; height:25px; min-height:25px; padding:0; border:1px solid var(--line); border-radius:100px; background:#C3CBDA; cursor:pointer; }
.ref-bonus-switch input[type="checkbox"]::after { content:""; position:absolute; width:19px; height:19px; top:2px; left:2px; background:#fff; border-radius:50%; box-shadow:0 1px 3px #17244433; transition:transform 180ms ease; }
.ref-bonus-switch input[type="checkbox"]:checked { background:var(--navy); border-color:var(--navy); }
.ref-bonus-switch input[type="checkbox"]:checked::after { transform:translateX(19px); }
.ref-bonus-switch input:focus-visible { outline:2px solid var(--theme-accent); outline-offset:3px; }
.ref-bonus-amount { display:flex; flex-direction:row; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; margin-top:8px; border:1px solid var(--line); border-radius:12px; }
.ref-bonus-amount input { width:100px!important; text-align:right; min-height:36px; padding:6px!important; border:0!important; background:transparent!important; font-weight:700; }
.ref-payment-methods { margin:18px 0; padding:0; }
.ref-payment-methods legend { font-size:16px; font-weight:700; margin-bottom:10px; }
.ref-payment-methods .option { margin:0; border-radius:0; min-height:54px; gap:10px; }
.ref-payment-methods .option:first-of-type { border-radius:14px 14px 0 0; }
.ref-payment-methods .option:last-of-type { border-radius:0 0 14px 14px; border-top:0; }
.ref-payment-methods .icon { width:23px; height:23px; color:var(--theme-accent); }
.ref-payment-glyph { display:grid; place-items:center; width:25px; height:24px; flex:none; font-size:9px; font-weight:750; color:var(--theme-accent); }
.ref-payment-methods input { flex:none; }
:root[data-theme="dark"] .ref-quick button { background:linear-gradient(140deg,#34466C,#27334D); border-color:var(--line); }
:root[data-theme="dark"] .content[data-reference] .card { box-shadow:0 3px 12px #00000015; }
:root[data-theme="dark"] .ref-expiry { background:linear-gradient(110deg,#59492CB3,#3B3529D9); border-color:#B78E4555; }
:root[data-theme="dark"] .ref-expiry-icon { color:#FFBA81; }
:root[data-theme="dark"] .ref-expiry small { color:#DDC7A8; }
:root[data-theme="dark"] .ref-badge { color:#FFE0A8; background:#634A2C; }
:root[data-theme="dark"] .ref-operation-amount.positive { color:#A0D9B9; }
:root[data-theme="dark"] .ref-operation-amount.negative { color:#FFA58E; }
:root[data-theme="dark"] .ref-bonus-switch input[type="checkbox"]:checked { background:#607AC1; border-color:#8DA2D8; }
@media(max-width:350px) {
 .content[data-reference] .view-head h1 { font-size:18px; }
 .content[data-reference] .view-head .back { left:16px; }
 .ref-balance { padding:16px; min-height:138px; }
 .ref-balance .loyalty-balance { font-size:30px; }
 .ref-balance .loyalty-balance small { font-size:12px; }
 .ref-balance > img { width:72px; height:92px; }
 .ref-operation { grid-template-columns:52px 18px minmax(0,1fr) 32px; gap:6px; }
 .ref-operation-amount strong { font-size:16px; }
 .ref-operation-icon .icon { width:17px; height:17px; }
 .ref-operation-text { font-size:11px; }
 .ref-plan-head { grid-template-columns:40px minmax(0,1fr); gap:8px; }
 .ref-plan-head .ref-badge { grid-column:2; justify-self:start; padding:3px 7px; }
 .ref-plan-head h2 { font-size:16px; }
 .ref-plan .plan-footer > strong { font-size:19px; }
 .ref-membership-art { width:145px; height:145px; right:-22px; }
 .ref-membership .status { right:12px; top:12px; }
 .page-body .ref-membership h2 { max-width:70%; font-size:22px; padding-top:18px; }
 .ref-allowance-head { grid-template-columns:30px minmax(0,1fr) 50px; gap:6px; }
 .ref-allowance-art img { width:30px; height:30px; }
 .ref-allowance { padding:12px; }
}
@media(prefers-reduced-motion:reduce) { .ref-bonus-switch input::after { transition:none; } }

.content[data-reference] .list-plain { list-style:none; padding-left:0; }

.ref-order-details > .card { border:0; box-shadow:none!important; background:transparent; padding:14px 0 0; margin:0; }
.ref-checkout > h2 { margin-top:16px; font-size:16px; }

.ref-payment-methods .ref-payment-glyph { flex:none; }
