/* KoreaStore account v5 */
:root{--ksa-ink:#211e1b;--ksa-muted:#81776f;--ksa-line:#e2dad3}
body[data-account-page]{background:#fbfaf8;color:var(--ksa-ink)}
.ksa-page{width:min(1320px,calc(100% - 40px));margin:0 auto;padding:14px 0 38px}
.ksa-breadcrumbs{margin-bottom:10px}
.ksa-eyebrow{font-size:12px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#82776f}
.ksa-hero{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:22px;align-items:center;min-height:245px;padding:24px 26px;border:1px solid var(--ksa-line);border-radius:22px;background:radial-gradient(circle at 84% 14%,rgba(255,255,255,.94),transparent 27%),linear-gradient(135deg,#f5f1ed,#edf3ed 56%,#f5ecef);overflow:hidden}
.ksa-hero__copy{position:relative;z-index:3}.ksa-hero h1{max-width:670px;margin:6px 0 9px;font-family:Georgia,serif;font-size:clamp(46px,5vw,66px);line-height:.92;letter-spacing:-.06em;font-weight:400}.ksa-hero__copy>p{max-width:580px;margin:0;color:#756c65;font-size:12px;line-height:1.55}
.ksa-hero__chips{display:flex;gap:6px;flex-wrap:wrap;margin-top:14px}.ksa-hero__chips span{display:flex;align-items:center;gap:6px;min-height:29px;padding:0 9px;border:1px solid rgba(65,54,47,.1);border-radius:999px;background:rgba(255,255,255,.63);font-size:12px;color:#6d645d}.ksa-hero__chips img{width:15px;height:15px;opacity:.55}
.ksa-hero__art{position:relative;height:188px;border-radius:17px;background:rgba(255,255,255,.34);overflow:hidden}.ksa-hero__art:before{content:"";position:absolute;inset:13px;border:1px solid rgba(60,50,44,.07);border-radius:13px}.ksa-art-index{position:absolute;left:14px;top:12px;font-size:12px;font-weight:800;letter-spacing:.13em;color:#857b73}.ksa-art-caption{position:absolute;right:14px;bottom:11px;text-align:right;font-size:12px;font-weight:800;line-height:1.4;letter-spacing:.11em;color:#827870}
.ksa-art-profile{position:absolute;right:54px;top:11px;width:142px;opacity:.35;color:#5d6f60}.ksa-art-bottle{position:absolute;right:7px;bottom:-34px;width:86px;opacity:.25;transform:rotate(7deg)}.ksa-art-spark{position:absolute;left:10px;bottom:8px;width:82px;opacity:.09}
.ksa-loading{display:flex;align-items:center;justify-content:center;gap:9px;min-height:84px;margin-top:9px;border:1px solid var(--ksa-line);border-radius:16px;background:#fff;color:#766d66;font-size:12px}.ksa-loading[hidden]{display:none!important}.ksa-loading>span{width:15px;height:15px;border:2px solid #e2dad3;border-top-color:#211e1b;border-radius:50%;animation:ksaSpin .7s linear infinite}@keyframes ksaSpin{to{transform:rotate(360deg)}}
.ksa-auth{display:grid;grid-template-columns:.82fr 1fr;max-width:920px;margin:12px auto 0;border:1px solid var(--ksa-line);border-radius:18px;overflow:hidden;background:#fff}.ksa-auth[hidden]{display:none!important}
.ksa-auth__visual{position:relative;min-height:390px;padding:28px;background:#211e1b;color:#fff;overflow:hidden}.ksa-auth__visual .ksa-eyebrow{color:rgba(255,255,255,.48)}.ksa-auth__visual h2{max-width:370px;margin:23px 0 10px;font-family:Georgia,serif;font-size:35px;line-height:.98;font-weight:400;letter-spacing:-.045em}.ksa-auth__visual>p{max-width:370px;margin:0;color:rgba(255,255,255,.56);font-size:12px;line-height:1.55}.ksa-auth__watermark{position:absolute;right:-42px;bottom:-54px;width:230px;filter:brightness(0) invert(1);opacity:.035}
.ksa-auth__benefits{display:grid;gap:8px;margin-top:30px}.ksa-auth__benefits span{display:flex;align-items:center;gap:8px;font-size:12px;color:rgba(255,255,255,.72)}.ksa-auth__benefits img{width:27px;height:27px;filter:brightness(0) invert(1);opacity:.58}
.ksa-auth__box{padding:24px}.ksa-auth__tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin-bottom:15px;border-radius:11px;background:#f2eeea}.ksa-auth__tabs button{min-height:38px;border:0;border-radius:8px;background:transparent;font-size:12px;font-weight:800;color:#766d66;cursor:pointer}.ksa-auth__tabs button.active{background:#fff;color:#211e1b;box-shadow:0 3px 10px rgba(46,38,33,.05)}
.ksa-auth__form{display:grid;gap:10px}.ksa-auth__form[hidden]{display:none!important}.ksa-auth__grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.ksa-auth .ks-field{gap:5px}.ksa-auth .ks-field label{font-size:12px}.ksa-auth .ks-field input{min-height:41px;border-radius:9px;padding:9px 10px;font-size:12px;background:#fcfbfa}
.ksa-auth__secure{display:grid;grid-template-columns:23px 1fr;gap:8px;align-items:center;margin-top:14px;padding-top:11px;border-top:1px solid #eee8e3;color:#827970;font-size:12px;line-height:1.4}.ksa-auth__secure img{width:22px;height:22px;opacity:.52}
.ksa-btn{min-height:40px;padding:9px 13px;border:1px solid #ded6cf;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;gap:8px;background:#fff;color:#211e1b;font-size:12px;font-weight:800;cursor:pointer;text-decoration:none;transition:.18s ease}.ksa-btn:hover{transform:translateY(-1px);border-color:#cfc5bd}.ksa-btn.primary{background:#211e1b;border-color:#211e1b;color:#fff}.ksa-btn.logout{color:#b94f67;background:#fffafb;border-color:#ecd9de}.ksa-btn svg{width:15px;height:15px;stroke-width:1.6}
.ksa-dashboard[hidden]{display:none!important}
.ksa-profile-card{display:grid;grid-template-columns:72px minmax(0,1fr) auto;gap:15px;align-items:center;margin-top:9px;padding:15px 17px;border:1px solid var(--ksa-line);border-radius:17px;background:#fff}.ksa-avatar-wrap{position:relative;width:64px;height:64px}.ksa-avatar{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#f4dfe5,#f1e9e4);font-family:Georgia,serif;font-size:21px}.ksa-avatar-wrap>span{position:absolute;right:1px;bottom:3px;width:10px;height:10px;border:2px solid #fff;border-radius:50%;background:#6f8a70}
.ksa-profile-card__info h2{margin:5px 0 7px;font-family:Georgia,serif;font-size:27px;font-weight:400;letter-spacing:-.04em}.ksa-profile-contacts{display:flex;gap:15px;flex-wrap:wrap}.ksa-profile-contacts span{display:flex;align-items:center;gap:6px;color:#766d66}.ksa-profile-contacts svg{width:13px;height:13px;stroke-width:1.5}.ksa-profile-contacts b{font-size:12px;font-weight:600}.ksa-profile-card__actions{display:flex;gap:6px}
.ksa-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-top:8px}.ksa-stat{position:relative;min-height:90px;padding:12px;border:1px solid rgba(57,48,42,.08);border-radius:14px;display:grid;grid-template-columns:38px minmax(0,1fr) 15px;gap:10px;align-items:center;color:#211e1b;text-decoration:none;background:#f7f4f0;overflow:hidden}.ksa-stat.orders{background:#f5ecef}.ksa-stat.favorites{background:#edf3e9}.ksa-stat.spent{background:#f5f1e9}.ksa-stat.bonus{background:#eef1f7}.ksa-stat>img,.ksa-stat>svg{width:34px;height:34px;object-fit:contain;opacity:.55}.ksa-stat>svg{padding:5px;box-sizing:border-box}.ksa-stat div{display:grid;gap:2px}.ksa-stat span{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#80766f}.ksa-stat strong{font-family:Georgia,serif;font-size:22px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ksa-stat small{font-size:12px;color:#857b73}.ksa-stat i{font-style:normal;opacity:.4}
.ksa-content-grid{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:8px;margin-top:8px;align-items:start}.ksa-orders-panel,.ksa-useful{border:1px solid var(--ksa-line);border-radius:16px;background:#fff;padding:15px}.ksa-useful{position:sticky;top:96px}
.ksa-section-head{display:flex;align-items:end;justify-content:space-between;gap:14px;margin-bottom:11px}.ksa-section-head.compact{align-items:flex-start}.ksa-section-head h2{margin:4px 0 4px;font-family:Georgia,serif;font-size:25px;font-weight:400;letter-spacing:-.035em}.ksa-section-head p{margin:0;color:#81776f;font-size:12px;line-height:1.45}.ksa-section-head>a{flex:0 0 auto;color:#5c554f;text-decoration:none;font-size:12px;font-weight:800}.ksa-section-head>a span{font-size:12px}
.ksa-order-list{display:grid;gap:6px}.ksa-order-card{padding:11px;border:1px solid #eae4de;border-radius:11px;background:#fbfaf8}.ksa-order-card__head{display:flex;justify-content:space-between;gap:12px}.ksa-order-card__head small{display:block;margin-bottom:2px;color:#8b8179;font-size:12px}.ksa-order-card__head h3{margin:0;font-size:12px}.ksa-order-card__head>strong{font-family:Georgia,serif;font-size:16px;font-weight:400}.ksa-order-card__badges{display:flex;gap:4px;flex-wrap:wrap;margin-top:7px}.ksa-order-card__badges span{padding:4px 6px;border-radius:999px;background:#f0ece8;font-size:12px;color:#6d645e}.ksa-order-card__items{display:flex;gap:5px;flex-wrap:wrap;margin-top:8px;padding-top:8px;border-top:1px solid #eee8e3}.ksa-order-card__items span{font-size:12px;color:#7d746d}
.ksa-empty-order{display:grid;grid-template-columns:90px 1fr;gap:14px;align-items:center;min-height:145px;padding:14px;border:1px dashed #ddd5ce;border-radius:13px;background:#fbfaf8}.ksa-empty-order__art{position:relative;height:100px}.ksa-empty-bag{position:absolute;inset:8px;background:url("../svg/account-orders.svg") center/contain no-repeat;opacity:.18}.ksa-empty-order__copy h3{margin:0 0 5px;font-family:Georgia,serif;font-size:22px;font-weight:400}.ksa-empty-order__copy p{margin:0 0 10px;color:#81776f;font-size:12px;line-height:1.45}
.ksa-useful-list{display:grid}.ksa-useful-item{width:100%;min-height:53px;display:grid;grid-template-columns:32px minmax(0,1fr) 14px;gap:9px;align-items:center;padding:8px 0;border:0;border-top:1px solid #eee8e3;background:transparent;color:#211e1b;text-decoration:none;text-align:left;cursor:pointer}.ksa-useful-item:first-child{border-top:0}.ksa-useful-item>span{width:31px;height:31px;border-radius:9px;display:grid;place-items:center;background:#f4f0ec}.ksa-useful-item svg{width:16px;height:16px;stroke-width:1.6}.ksa-useful-item b{display:grid;gap:2px;font-size:12px}.ksa-useful-item small{font-size:12px;color:#877d75;font-weight:500}.ksa-useful-item>i{font-style:normal;opacity:.38}.ksa-useful-item[disabled]{opacity:.42;cursor:not-allowed}
.ksa-dialog{width:min(540px,calc(100% - 24px));max-height:92vh;max-height:92dvh;overflow:auto;overscroll-behavior:contain;padding:0;border:0;border-radius:18px;background:transparent;box-shadow:0 25px 70px rgba(33,28,24,.20)}.ksa-dialog::backdrop{background:rgba(28,24,21,.42);backdrop-filter:blur(4px)}.ksa-dialog__card{position:relative;padding:22px;border:1px solid var(--ksa-line);border-radius:18px;background:#fff}.ksa-dialog__close{position:absolute;right:12px;top:12px;width:32px;height:32px;border:1px solid #e3dcd5;border-radius:50%;background:#fff;font-size:18px}.ksa-dialog h2{margin:8px 0 5px;font-family:Georgia,serif;font-size:28px;font-weight:400}.ksa-dialog p{margin:0 0 14px;color:#81776f;font-size:12px}.ksa-dialog__grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.ksa-dialog__grid .full{grid-column:1/-1}.ksa-dialog__actions{display:flex;justify-content:flex-end;gap:7px;margin-top:14px}
.ksa-footer{margin-top:0}
@media(max-width:980px){.ksa-hero{grid-template-columns:minmax(0,1fr) 280px}.ksa-content-grid{grid-template-columns:1fr}.ksa-useful{position:static}.ksa-stats{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){
 body[data-account-page]{padding-bottom:calc(76px + env(safe-area-inset-bottom))}.ksa-page{width:calc(100% - 20px);padding-top:10px}.ksa-breadcrumbs{display:none}
 .ksa-hero{min-height:190px;padding:17px;border-radius:17px;grid-template-columns:1fr}.ksa-hero__copy{max-width:80%}.ksa-hero h1{font-size:39px}.ksa-hero__copy>p{font-size:12px}.ksa-hero__chips span:nth-child(2){display:none}
 .ksa-hero__art{position:absolute;right:5px;top:6px;width:130px;height:120px;opacity:.42;background:transparent}.ksa-hero__art:before,.ksa-art-index,.ksa-art-caption,.ksa-art-bottle{display:none}.ksa-art-profile{right:0;top:1px;width:100px}.ksa-art-spark{left:4px;bottom:0;width:58px}
 .ksa-auth{grid-template-columns:1fr;margin-top:8px;border-radius:15px}.ksa-auth__visual{min-height:190px;padding:18px}.ksa-auth__visual h2{margin-top:15px;font-size:29px}.ksa-auth__visual>p{font-size:12px}.ksa-auth__benefits{grid-template-columns:repeat(3,1fr);gap:5px;margin-top:18px}.ksa-auth__benefits span{display:grid;justify-items:start;font-size:12px}.ksa-auth__benefits img{width:22px;height:22px}.ksa-auth__box{padding:15px}.ksa-auth__grid{grid-template-columns:1fr}
 .ksa-profile-card{grid-template-columns:58px minmax(0,1fr);gap:11px;padding:12px}.ksa-avatar-wrap,.ksa-avatar{width:56px;height:56px}.ksa-profile-card__info h2{font-size:23px}.ksa-profile-contacts{display:grid;gap:4px}.ksa-profile-card__actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr}.ksa-profile-card__actions .ksa-btn{width:100%}
 .ksa-stats{display:flex;overflow:auto;gap:6px;margin:7px -10px 0;padding:0 10px 4px;scrollbar-width:none}.ksa-stats::-webkit-scrollbar{display:none}.ksa-stat{flex:0 0 210px;min-height:82px}
 .ksa-content-grid{margin-top:5px}.ksa-orders-panel,.ksa-useful{padding:12px;border-radius:14px}.ksa-section-head{align-items:flex-start}.ksa-section-head h2{font-size:22px}.ksa-section-head p{max-width:230px}.ksa-empty-order{grid-template-columns:65px 1fr;min-height:120px;padding:10px}.ksa-empty-order__art{height:78px}.ksa-empty-order__copy h3{font-size:19px}
 .ksa-dialog__card{padding:18px}.ksa-dialog__grid{grid-template-columns:1fr}.ksa-dialog__grid .full{grid-column:auto}
 .ksa-footer{display:none}
}
@media(max-width:430px){.ksa-hero__copy{max-width:75%}.ksa-profile-card__actions{grid-template-columns:1fr}.ksa-section-head{display:block}.ksa-section-head>a{display:inline-flex;margin-top:7px}.ksa-auth__benefits{grid-template-columns:1fr}.ksa-auth__benefits span:nth-child(2),.ksa-auth__benefits span:nth-child(3){display:none}}
@media(prefers-reduced-motion:reduce){.ksa-loading>span{animation:none}.ksa-btn{transition:none}}

.ksa-auth__forgot-row{display:flex;justify-content:flex-end;margin-top:-3px}
.ksa-auth__forgot-row button{padding:0;border:0;background:transparent;color:#8b5a68;font-size:12px;font-weight:800;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.ksa-forgot-dialog{width:min(500px,calc(100% - 24px))}
.ksa-forgot-card{background:linear-gradient(145deg,#fff,#fbf7f4)}
.ksa-forgot-card__note{display:grid;grid-template-columns:24px 1fr;gap:8px;align-items:center;margin-top:10px;padding:9px;border:1px solid #ece5df;border-radius:9px;background:#f8f5f1;color:#81776f;font-size:12px;line-height:1.4}
.ksa-forgot-card__note img{width:22px;height:22px;opacity:.48}
@media(max-width:700px){.ksa-forgot-dialog{width:calc(100% - 16px)}}


/* Account data — stage 7 */
.ksa-account-data-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);gap:8px;margin-top:8px}
.ksa-data-panel{padding:15px;border:1px solid var(--ksa-line);border-radius:16px;background:#fff}
.ksa-inline-action{min-height:34px;padding:0 10px;border:1px solid #dcd4cd;border-radius:8px;background:#fff;color:#322d29;font-size:12px;font-weight:800;cursor:pointer}
.ksa-address-list{display:grid;gap:6px}
.ksa-address-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:11px;border:1px solid #e9e2dc;border-radius:11px;background:#fbfaf8}
.ksa-address-card__main{min-width:0}.ksa-address-card__head{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.ksa-address-card__head strong{font-size:12px}.ksa-address-card__head span{padding:3px 5px;border-radius:999px;background:#e9f0e6;color:#53634e;font-size:12px;font-weight:800}
.ksa-address-card p{margin:5px 0 0;color:#756d66;font-size:12px;line-height:1.45}.ksa-address-card small{display:block;margin-top:4px;color:#948a82;font-size:12px}
.ksa-address-card__actions{display:flex;gap:4px;align-self:start}.ksa-address-card__actions button{min-height:28px;padding:0 8px;border:1px solid #ddd5ce;border-radius:7px;background:#fff;color:#4c4540;font-size:12px;font-weight:800;cursor:pointer}.ksa-address-card__actions button.danger{color:#9c4c54}
.ksa-address-empty{padding:17px;border:1px dashed #ddd5ce;border-radius:11px;background:#fbfaf8;color:#837a72;font-size:12px;line-height:1.45}
.ksa-linked-list{display:grid}.ksa-linked-list>div{display:grid;grid-template-columns:90px minmax(0,1fr);gap:12px;padding:10px 0;border-top:1px solid #eee8e3}.ksa-linked-list>div:first-child{border-top:0}.ksa-linked-list span{font-size:12px;color:#8c827a}.ksa-linked-list strong{min-width:0;text-align:right;font-size:12px;overflow-wrap:anywhere}
.ksa-address-default{display:flex;align-items:center;gap:7px;font-size:12px;color:#6f675f}.ksa-address-default input{width:15px;height:15px}
@media(max-width:980px){.ksa-account-data-grid{grid-template-columns:1fr}.ksa-stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.ksa-account-data-grid{margin-top:5px}.ksa-data-panel{padding:12px;border-radius:14px}.ksa-address-card{grid-template-columns:1fr}.ksa-address-card__actions{justify-content:flex-end}.ksa-linked-list>div{grid-template-columns:80px 1fr}}

/* Account Telegram link — stage 5 final */
.ksa-linked-value{min-width:0;display:grid;justify-items:end;gap:5px}
.ksa-linked-value strong{text-align:right}
.ksa-linked-value small{max-width:240px;text-align:right;color:#8b8179;font-size:11px;line-height:1.35}
.ksa-linked-value small[hidden]{display:none!important}
.ksa-telegram-link-btn{min-height:31px;padding:0 9px;border:1px solid #d9d1ca;border-radius:8px;background:#fff;color:#322d29;font-size:11px;font-weight:800;cursor:pointer;transition:.18s ease}
.ksa-telegram-link-btn:hover{border-color:#c7bbb2;transform:translateY(-1px)}
.ksa-telegram-link-btn:disabled{opacity:.55;cursor:wait;transform:none}
.ksa-telegram-link-btn[hidden]{display:none!important}
@media(max-width:700px){.ksa-linked-value small{max-width:190px}}
