/* Final review fixes, scoped to the existing country, checkout and document surfaces. */
.r-country-head>div,.r-country-panel-top>div,.r-country-bottom>div,.r-country-bar>div{min-width:0}
.r-country-title{overflow-wrap:anywhere;text-wrap:balance}
.r-country-title span{max-width:100%}
.r-country-panel{overflow:visible}
.r-country-grid{max-height:520px;overflow-y:auto;overflow-x:hidden;padding:3px;scrollbar-width:thin;scrollbar-color:var(--muted) transparent;overscroll-behavior:contain}
.r-country-card{min-width:0}
.r-country-card b,.r-country-card small{overflow-wrap:anywhere}
.r-country-bottom{border-radius:0 0 27px 27px}
.r-country-search{min-width:0}
.s-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.s-steps li{min-width:0;line-height:1.6}
.s-ack input{flex-shrink:0;width:19px;height:19px;margin-top:3px;accent-color:var(--gold)}
.s-ack:has(input:focus-visible){outline:2px solid var(--gold);outline-offset:6px;border-radius:8px}
.s-ack input[aria-invalid=true]{outline:2px solid #ed8b8b;outline-offset:2px}
#s-id-status{min-height:44px}
.s-summary-product>.r-coin-art{flex-shrink:0}
.s-summary .s-row>span:last-child{overflow-wrap:anywhere;text-align:end}
/* The receipt scrolls; the edit and close controls do not scroll out of reach. */
#s-review-dialog{padding:0;overflow:hidden;width:min(510px,calc(100% - 24px));max-height:calc(100dvh - 28px);box-sizing:border-box}
#s-review-dialog[open]{display:flex;flex-direction:column}
.s-modal-header{flex:0 0 auto;padding:24px 26px 16px;text-align:center;border-bottom:1px solid var(--line)}
#s-review-dialog .s-modal-mascot{width:64px;height:64px;margin:0 auto 8px;display:block}
#s-review-title{font-size:26px;line-height:1.45;margin:0 30px 9px;text-wrap:balance}
#s-review-dialog .s-modal-note{font-size:12px;line-height:1.85;margin:0;color:var(--muted-strong)}
.s-modal-body{overflow-y:auto;overscroll-behavior:contain;min-height:0;padding:18px 26px;scrollbar-width:thin}
#s-review-dialog .s-summary-product{margin:0 0 16px}
#s-review-dialog .s-modal-actions{flex:0 0 auto;display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:0;padding:15px 26px 18px;border-top:1px solid var(--line);background:var(--surface)}
#s-review-dialog .s-modal-actions .s-button{min-height:44px;font-size:12px;padding:10px}
#s-review-dialog .s-modal-actions .s-text-button{grid-column:1/-1;justify-self:center;min-height:30px;display:flex;align-items:center;margin:0;font-size:11px}
#s-review-dialog .s-modal-close{position:absolute;inset-inline-end:14px;inset-inline-start:auto;top:12px;width:38px;height:38px;min-width:38px;min-height:38px;padding:0;margin:0;z-index:2}
/* A reading surface, not a second store card. */
.s-legal-tools{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:26px 0 22px;flex-wrap:wrap}
.s-doc-search{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--line);border-radius:13px;padding:5px 12px;width:min(480px,100%);min-width:0}
.s-doc-search:focus-within{outline:2px solid var(--gold);outline-offset:3px}
.s-doc-search input{min-width:0;flex:1;border:0;outline:none!important;background:transparent;color:var(--text);font:inherit;font-size:13px;line-height:1.6;padding:9px 0}
.s-doc-search button{width:36px;height:36px;border:0;border-radius:8px;background:transparent;color:var(--text);cursor:pointer;font-size:22px;flex:none}
.s-doc-actions{display:flex;gap:8px;align-items:center}
.s-doc-actions .s-button{min-height:44px;font-size:12px;padding:9px 13px}
.s-doc-count{color:var(--muted-strong);font-size:12px;line-height:1.6;margin:0 0 16px;min-height:20px}
.s-legal-layout{align-items:start}
.s-toc{max-height:calc(100dvh - 132px);overflow-y:auto;scrollbar-width:thin}
.s-toc>summary{font-size:15px;font-weight:750;cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:36px}
.s-toc>summary::-webkit-details-marker{display:none}
.s-toc>summary::after{content:'+';font:24px/1 system-ui;color:var(--gold)}
.s-toc[open]>summary::after{content:'−'}
.s-toc-links{padding-top:12px}
.s-toc-links button{width:100%;min-height:42px;text-align:start}
.s-toc button[aria-current=location]{background:var(--surface-2);color:var(--gold);border-radius:9px}
.s-legal-body{min-width:0}
.s-legal-section{scroll-margin-top:126px;max-width:100%;padding-block:0 27px;margin-bottom:28px;border-bottom:1px solid var(--line)}
.s-legal-section h2{line-height:1.7;display:flex;align-items:baseline;gap:13px;overflow-wrap:anywhere}
.s-legal-section h2>span{flex-shrink:0}
.s-legal-section p{font-size:15px;line-height:2.05;color:var(--muted-strong);max-width:72ch;overflow-wrap:anywhere}
.s-doc-empty{border:1px dashed var(--line);background:var(--surface);text-align:center;padding:35px 20px;border-radius:20px;margin-block:12px 28px}
.s-doc-empty img{object-fit:contain;image-rendering:pixelated}.s-doc-empty h2{font-size:20px}.s-doc-empty p{font-size:13px;color:var(--muted-strong)}
.s-legal-footer{overflow-wrap:anywhere}
[data-theme=light] .s-toc,[data-theme=light] .s-doc-search,[data-theme=light] .s-doc-empty{background:#fffaf4;color:#30253b}
[data-theme=light] .s-legal-section p,[data-theme=light] .s-doc-count,[data-theme=light] .s-doc-empty p{color:#54485f}
[data-theme=light] .s-legal-section h2,[data-theme=light] .s-toc>summary{color:#2b1d37}
[data-theme=light] .s-toc button[aria-current=location]{background:#f5e7d1;color:#74430d}
@media(max-width:960px){.s-toc{position:relative;top:auto;max-height:none;display:block;grid-template-columns:none}.s-toc-links{display:grid;grid-template-columns:1fr 1fr;gap:2px 12px}.s-legal-layout{grid-template-columns:1fr;gap:24px}}
@media(max-width:760px){
 .r-country-grid{max-height:420px;max-height:min(54dvh,420px)}
 .r-country-bottom{gap:12px;flex-direction:column;align-items:stretch}
 #s-country-continue{width:100%;white-space:normal;min-height:48px;line-height:1.5}
 #s-country-selection{min-height:26px}
 .r-country-title{font-size:clamp(27px,7.6vw,35px);letter-spacing:-.5px}
 .r-country-panel-top{align-items:stretch}
 .s-steps{grid-template-columns:repeat(2,minmax(0,1fr));font-size:11px}
 .s-doc-search{width:100%}.s-doc-actions{width:100%}.s-doc-actions .s-button{flex:1}
 .s-legal-section h2{font-size:19px;gap:9px}.s-legal-section p{font-size:14px;line-height:2.05}
 .s-modal-header{padding:18px 18px 12px}
 #s-review-dialog .s-modal-mascot{width:48px;height:48px;margin-bottom:5px}
 #s-review-title{font-size:23px;margin-inline:26px;line-height:1.5}
 #s-review-dialog .s-modal-note{font-size:11px;line-height:1.7}
 .s-modal-body{padding:15px 19px}
 #s-review-dialog .s-modal-actions{padding:12px 18px calc(12px + env(safe-area-inset-bottom));gap:7px}
 #s-review-dialog .s-row{font-size:12px;gap:12px}
 #s-review-dialog .s-small{font-size:10px;line-height:1.7}
}
@media(max-width:365px){.s-toc-links{grid-template-columns:1fr}.r-country-card{padding:10px 7px}.r-country-code{width:31px;height:34px;letter-spacing:.2px}.r-country-panel{padding:17px}.r-country-bottom{margin:20px -17px -17px;padding:15px 17px}}
@media(max-height:500px){#s-review-dialog .s-modal-mascot{display:none}.s-modal-header{padding:12px 18px}#s-review-title{font-size:19px;margin-bottom:4px}#s-review-dialog .s-modal-actions{padding:8px 18px}.s-modal-body{padding:10px 18px}}
@media(prefers-reduced-motion:reduce){.r-country-card,.s-toc button{transition:none!important}}
@media print{.s-legal-tools,.s-doc-count,.s-doc-empty,.s-source-link{display:none!important}.s-legal-section[hidden]{display:block!important}.s-legal-section,.s-legal-section p,.s-legal-section h2{color:#111!important;background:#fff!important}.s-legal-section{break-inside:auto}.s-legal-section h2{break-after:avoid}.s-legal-section p{orphans:3;widows:3}}

[data-theme=light] .s-doc-actions .s-button{background:#fffaf2;color:#573c21;border-color:#cdbb9e}
.r-country-title{hyphens:none;word-break:normal}
