:root{--red:#e53935;--red-dark:#c62828;--red-soft:#fdecec;--ink:#171717;--muted:#6b7280;--line:#eeeeee;--bg:#f7f8fa;--white:#fff;--green:#087f5b}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Pretendard","Noto Sans KR",sans-serif}.store-app{max-width:480px;min-height:100vh;margin:auto;padding-bottom:36px}.store-header{position:sticky;top:0;z-index:10;display:flex;justify-content:space-between;align-items:center;padding:calc(16px + env(safe-area-inset-top)) 20px 16px;background:var(--white);border-bottom:1px solid var(--line)}.store-logo{color:#222;text-decoration:none;font-size:20px;font-weight:900;letter-spacing:.2px}.store-logo span{color:var(--red)}.store-support{color:var(--muted);font-size:13px;font-weight:700;text-decoration:none}.store-intro{padding:28px 18px 12px}.store-badge{display:inline-block;padding:7px 11px;border-radius:999px;background:var(--red-soft);color:var(--red);font-size:12px;font-weight:800}.store-intro h1{margin:14px 0 10px;font-size:27px;line-height:1.35}.store-intro p,.store-muted{color:var(--muted);font-size:13px;line-height:1.65;margin:0}.store-steps{display:flex;list-style:none;margin:10px 18px 16px;padding:0;gap:4px}.store-steps li{flex:1;text-align:center;color:#adb5bd;font-size:10px}.store-steps b{display:grid;place-items:center;width:25px;height:25px;margin:0 auto 5px;border-radius:50%;background:#e9ecef}.store-steps li.active{color:var(--red);font-weight:700}.store-steps li.active b{background:var(--red);color:#fff}.store-card{margin:0 18px 14px;padding:22px 18px;border:1px solid var(--line);border-radius:18px;background:var(--white)}.store-card h2{margin:0 0 7px;font-size:18px}.product-list{display:grid;gap:10px;margin:18px 0}.product-option{display:flex;align-items:center;gap:12px;border:1px solid #d1d5db;border-radius:13px;padding:14px;cursor:pointer}.product-option.is-selected{border:2px solid var(--red);padding:13px;background:var(--red-soft)}.product-option input{accent-color:var(--red)}.product-option__body{flex:1}.product-option__body strong,.product-option__body small{display:block}.product-option__body small{color:var(--muted);margin-top:4px}.product-option__price{font-weight:800;color:var(--red);text-align:right}.duration-row{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.duration-btn{border:1px solid #d1d5db;background:#fff;border-radius:9px;padding:8px 10px;cursor:pointer;font:inherit}.duration-btn.is-selected{border-color:var(--red);color:var(--red);font-weight:700;background:#fff5f5}.store-card label:not(.store-check){display:block;margin-top:15px;font-size:13px;font-weight:700}.store-card input:not([type=checkbox]),.lookup-form input{display:block;width:100%;height:48px;margin-top:7px;border:1px solid #d1d5db;border-radius:12px;padding:0 13px;font:inherit;font-size:15px}.store-card input:focus,.lookup-form input:focus{outline:3px solid #fdecec;border-color:var(--red)}.store-card small{display:block;color:var(--muted);font-size:11px;margin-top:5px;font-weight:400}.store-check{display:flex;align-items:flex-start;gap:8px;margin-top:17px;font-size:13px;line-height:1.5}.store-check input{margin-top:3px;accent-color:var(--red)}.store-legal{color:var(--muted);font-size:11px;line-height:1.55;white-space:pre-wrap;margin:6px 0 0;padding:10px;background:#f8f9fa;border-radius:8px}.store-summary{display:grid;gap:0;border:1px solid var(--line);border-radius:11px;margin:17px 0;overflow:hidden}.store-summary>div{display:flex;justify-content:space-between;gap:10px;padding:13px;border-bottom:1px solid #f1f3f5;font-size:13px}.store-summary>div:last-child{border:0}.store-summary span{color:var(--muted)}.store-summary strong{text-align:right;word-break:break-all}.store-button{display:inline-flex;align-items:center;justify-content:center;min-height:46px;border:0;border-radius:11px;padding:0 17px;font:inherit;font-weight:800;text-decoration:none;cursor:pointer}.store-button:disabled{cursor:not-allowed;opacity:.45}.store-button--primary{background:var(--red);color:#fff}.store-button--secondary{background:#f1f3f5;color:#495057}.store-button--wide{width:100%}.store-actions{display:flex;gap:8px;margin-top:20px}.store-actions .store-button{flex:1}.store-warning{margin:17px 0;padding:14px;background:#fff8e6;border:1px solid #ffe8a1;border-radius:11px;color:#795000;font-size:12px;line-height:1.6}.store-warning strong{display:block;margin-bottom:3px}.store-warning p{margin:0}.store-message{min-height:18px;color:var(--red);font-size:12px;line-height:1.5;margin-top:10px}.store-loading{text-align:center;color:var(--muted);padding:20px}.complete-mark{display:grid;place-items:center;width:52px;height:52px;margin:0 auto 12px;border-radius:50%;background:#d3f9d8;color:var(--green);font-size:28px;font-weight:900}.store-complete{text-align:center}.store-complete>p{color:var(--muted);font-size:13px;line-height:1.6}.bank-card{padding:18px;text-align:left;background:var(--white);color:var(--ink);border:2px solid var(--red);border-radius:13px}.bank-card span,.bank-card small{display:block;color:var(--muted)}.bank-card strong{display:block;font-size:24px;font-weight:900;margin:4px 0;color:var(--red);word-break:break-all}.bank-card b{display:block;margin-top:13px;padding-top:12px;border-top:1px solid var(--line);font-size:21px}.store-card .bank-card small{color:var(--ink);font-size:15px;font-weight:700;margin-top:6px}.lookup-token{display:grid;gap:7px;padding:14px;margin:17px 0;background:#f8f9fa;border-radius:10px;text-align:left}.lookup-token span{color:var(--muted);font-size:12px}.lookup-token code{font-size:12px;word-break:break-all}.lookup-token button{justify-self:start}.lookup-form{display:flex;gap:8px}.lookup-form input{margin-top:0;flex:1}.lookup-form .store-button{flex-shrink:0}.store-card[hidden]{display:none}footer{text-align:center;color:#adb5bd;font-size:11px;padding:18px}
@media(max-width:360px){.store-card{margin-left:12px;margin-right:12px;padding-left:14px;padding-right:14px}.store-intro{padding-left:12px;padding-right:12px}.store-steps{margin-left:12px;margin-right:12px}.store-actions{flex-direction:column}.lookup-form{flex-direction:column}.lookup-form .store-button{width:100%}}

/* Product cards keep the radio compact and preserve a single-line title/price pair. */
.product-option{min-width:0}
.product-option input[type=radio]{width:auto;height:auto;flex:0 0 auto;margin:0;padding:0}
.product-option__body{min-width:0}
.product-option__body small{white-space:pre-line;overflow-wrap:anywhere}
.product-option__body strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.product-option__price{flex:0 0 auto;white-space:nowrap}

/* Notices (stock and auto issue), the token warning, coupon field and duplicate order box. */
.store-notice{margin:14px 0 0;padding:12px 14px;border-radius:11px;font-size:12px;line-height:1.6;font-weight:700}
.store-notice[hidden]{display:none}
.store-notice--auto{background:#e6f6ef;border:1px solid #b7e3d0;color:var(--green)}
.store-notice--delayed{background:#fff8e6;border:1px solid #ffe8a1;color:#795000}
.token-notice{margin:0;color:var(--red);font-size:12px;font-weight:800;line-height:1.55}
.coupon-box[hidden],.store-warning[hidden],#lookupSupport[hidden]{display:none}
/* Class display rules (.store-summary grid, .store-button flex) must never beat the hidden attribute. */
[hidden]{display:none!important}
/* An empty message keeps its live region but takes no space; the next action keeps its own gap. */
.store-message:empty{min-height:0;margin-top:0}
.store-message + .store-button{margin-top:14px}
.coupon-row{display:flex;gap:8px;margin-top:7px}
.store-card .coupon-row input:not([type=checkbox]){flex:1;min-width:0;margin-top:0}
.coupon-row .store-button{flex-shrink:0}
.coupon-box .store-summary{margin:12px 0 0}
.coupon-box .store-message{margin-top:8px}
#duplicateBox button{margin-top:10px}
#lookupSupport{margin-top:12px}
@media(max-width:360px){.coupon-row{flex-direction:column}.coupon-row .store-button{width:100%}}

/* Issued code: the code row is the main thing on the completion screen and the lookup. It outranks the :last-child border reset (same specificity, later rule). */
.store-summary>div.store-code-row{flex-direction:column;align-items:stretch;gap:6px;margin:8px;padding:16px 14px;background:var(--red-soft);border:2px solid var(--red);border-radius:9px}
.store-summary>div.store-code-row span{color:var(--red-dark);font-size:12px;font-weight:800;text-align:left}
.store-summary>div.store-code-row strong{min-width:0;color:var(--red);font-size:24px;font-weight:900;line-height:1.35;text-align:left;overflow-wrap:anywhere;word-break:break-all}
@media(max-width:360px){.store-summary>div.store-code-row strong{font-size:20px}}

/* 처리 안내 in the red tone, with the stay on the page line. */
.store-warning--alert{background:var(--red-soft);border:1px solid var(--red);color:var(--ink)}
.store-warning--alert strong{color:var(--red)}
.store-warning--alert p + p{margin-top:6px}
.store-warning--alert .store-warning__leave{color:var(--red-dark);font-weight:800}

/* Live status line above the auto notice: the current step with three pulsing dots. */
.store-progress{display:flex;align-items:center;justify-content:center;gap:8px;margin:14px 0 0;padding:12px 14px;border-radius:11px;font-size:14px;font-weight:800;line-height:1.5}
.store-progress--wait{background:#fff;border:1px solid var(--line);color:var(--red-dark)}
.store-progress--ok{background:#e6f6ef;border:1px solid #b7e3d0;color:var(--green)}
.store-progress__dots{display:inline-flex;gap:4px}
.store-progress__dots i{width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.25;animation:store-progress-dot 1.2s infinite ease-in-out}
.store-progress__dots i:nth-child(2){animation-delay:.2s}
.store-progress__dots i:nth-child(3){animation-delay:.4s}
@keyframes store-progress-dot{0%,80%,100%{opacity:.25}40%{opacity:1}}
@media (prefers-reduced-motion:reduce){.store-progress__dots i{animation:none;opacity:.7}}

/* Order lookup: token or 입금자명 and 이메일. */
.lookup-tabs{display:flex;gap:6px;margin:14px 0 12px}
.lookup-tab{flex:1;min-height:42px;padding:6px 8px;line-height:1.35;border:1px solid #d1d5db;border-radius:10px;background:#fff;color:#495057;font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.lookup-tab.is-active{border-color:var(--red);background:var(--red-soft);color:var(--red);font-weight:800}
.lookup-buyer-form .store-button{margin-top:14px}
.lookup-orders{display:grid;gap:4px}
.lookup-orders[hidden]{display:none}
.lookup-order .store-notice{margin-top:0}

/* 코드 사용하기: a full width link right under the code row inside the lookup summary grid, inset like the code row. */
.store-summary>a.store-code-use{margin:0 8px 8px}

/* 이용약관: a collapsed toggle under the consent checkbox; a long text scrolls inside its own body. */
.store-terms{margin:6px 0 0}
.store-terms>summary{display:inline-flex;align-items:center;gap:6px;min-height:32px;color:var(--muted);font-size:12px;font-weight:700;text-decoration:underline;cursor:pointer;list-style:none}
.store-terms>summary::-webkit-details-marker{display:none}
.store-terms>summary::after{content:"";width:6px;height:6px;margin-top:-3px;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg)}
.store-terms[open]>summary::after{margin-top:3px;transform:rotate(-135deg)}
.store-terms__body{max-height:280px;overflow-y:auto;overflow-wrap:anywhere;-webkit-overflow-scrolling:touch}
